diff --git a/.github/workflows/ci-java.yml b/.github/workflows/ci-java.yml new file mode 100644 index 00000000000..5ccde5ca075 --- /dev/null +++ b/.github/workflows/ci-java.yml @@ -0,0 +1,41 @@ +name: Java CI + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + java: [ 8, 11, 17, 21 ] + name: Java ${{ matrix.java }} build + steps: + - uses: actions/checkout@v4 + - name: Prepare multi-module build + run: | + git submodule update --init --recursive + - name: Set up Java + uses: actions/setup-java@v3 + with: + distribution: liberica + java-version: ${{ matrix.java }} + - name: Cache Maven packages + uses: actions/cache@v3 + with: + path: ~/.m2 + key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + restore-keys: ${{ runner.os }}-m2 + - name: Build with Maven + run: ./mvnw clean package -Dgpg.skip + - name: Compile integration tests + run: ./mvnw -Pintegration-test test-compile compile + - if: ${{ matrix.java != 8 }} + name: Check style with Spotless + run: ./mvnw spotless:check -Pintegration-test + diff --git a/.gitignore b/.gitignore index 3da7a742bff..93988501f56 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,12 @@ -*~ -.idea -\#*\# -.\#* +.idea/ +.vscode/ target/ -build/ -.classpath +bin/ +.DS_Store .project -.settings -.gitreview -.metadata -Servers -/*.DS_Store -/*.iml +.classpath +.settings/ +.factorypath +.gradle +.history/ +*.iml \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000000..1080bc2c6d2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vendor/dropsonde-protocol"] + path = vendor/dropsonde-protocol + url = https://github.com/cloudfoundry/dropsonde-protocol.git diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties new file mode 100644 index 00000000000..d58dfb70bab --- /dev/null +++ b/.mvn/wrapper/maven-wrapper.properties @@ -0,0 +1,19 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +wrapperVersion=3.3.2 +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5d0159b035a..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,39 +0,0 @@ ---- -language: java - -before_install: - - ./bin/install-protoc.sh - -before_script: -- protoc --version - -script: mvn install -DskipTests=true -B -V && cd cloudfoundry-client-lib && mvn -P integration-test clean install -Dccng.target=$TARGET - -Dccng.email=$EMAIL -Dccng.passwd=$PASSWD -Dccng.org=$ORG -Dccng.space=$SPACE -Dsurefire.useFile=false - -env: - global: - - secure: ! 'CEnlffjCZBVHaO9yXS6Q1cWdorIovujdzAeRuAXBD9MFGnqWxJkACRyfTC2o - - kTamcocisznrI1IPcQajLvNBQhVjgut/vV1Dpneuy1/xySmhNG3bF+CV7GQf - - /3FrS4yd7Uylpv9SMd3VM+EClDGQ3mR7OT4216+Q+vyE5Lh09WA=' - - secure: ! 'nzRzsqc+3dN9ts10T9SFveaW/hWmzByi81QyMn5LhbmGjU95D3fibgyd/aU3 - - OQPCTR2mTh/Ri7ROb5Bne+6elqPCu99CFoML3QWOSm8cHt2bbwbbbtzDtTC1 - - ZEIyXjUrz5wcvrXWMbYTbxEPVDrHUvK0vjE9gjl2pTK87fd5v+8=' - - secure: ! 'QDCvbb1T+DwyoLhoK1omwhRXBaHz/iYMCcI/miKlExwjCqHsPmnoy4HGe0vq - - Ej+Nm6WraYPkDC7GGmt3i7tNOgMFssxTm0qh62zzIlf1oQC/FQuPK4rQL+D/ - - BOZJB7rFBcko9ONKNTubUfomk3NLuf65/S+GbsSWshXohon4JWU=' - - secure: ! 'gGknileQIFfu2598k93xb/t4EvMvauthat+jVZAqztbnxOopEBgjoSixQG7R - - DAHs6YbbzoJZYuFH0XyyxtNwJ/kYbN3pBn43bIoK0NNZw7cPwew8zkjbBDcw - - Hqg8Qt88FYbZWMepMZre0eN8tMJyjO9YqlpnLX0YFVRJD28wga0=' - - secure: ! 'oEsQwUVp6SCxI0jpPYpYH7cRW/M8GtOFLEuU5ZKlgXANeU8t1AoKeFHIMKww - - 5vLs5J+AqNYyGODeSMZ7EwgmGRVqzHckQUKfMNzkwyFN4Uj0nmRwGXnzSKk6 - - OgG+XFxHZ/RKlCUSwKYwxdMbTon6MlTBCjxDmQIPk/HfoRUVGOc=' diff --git a/LICENSE b/LICENSE index 91b1b80331d..75b52484ea4 100644 --- a/LICENSE +++ b/LICENSE @@ -1,8 +1,8 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. @@ -200,3830 +200,3 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -======================================================================= -cf-cf-java-client - -cf-cf-java-client : includes a number of subcomponents with separate copyright -notices and license terms. The product that includes this file -does not necessarily use all the open source subcomponents referred -to below. Your use of the source code for the these subcomponents -is subject to the terms and conditions of the following licenses. - - - -SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES - - >>> hamcrest-all-1.1 - >>> junit-4.10.0 - >>> junit-4.7 - >>> junit-4.8 - >>> mockito-all-1.8.5 - >>> mockito-all-1.9.0 - >>> mockito-core-1.9.5 - >>> postgresql-9.0-801.jdbc4 - >>> slf4j-api-1.5.10 - >>> slf4j-api-1.5.6 - >>> slf4j-log4j12-1.5.10 - >>> yamlbeans-1.06 - - - -SECTION 2: Apache License, V2.0 - - >>> commons-io-2.1 - >>> httpclient-4.2.5 - >>> jackson-core-asl-1.6.2 - >>> jackson-mapper-asl-1.6.2 - >>> javax.inject-1 - >>> jcl-over-slf4j-1.5.10 - >>> jcl-over-slf4j-1.5.6 - >>> log4j-1.2.14 - >>> log4j-1.2.15 - >>> log4j-over-slf4j-1.5.6 - >>> maven-artifact-manager-2.2.1 - >>> maven-core-2.2.1 - >>> maven-plugin-api-2.0 - >>> maven-plugin-testing-harness-1.1 - >>> spring-amqp-1.0.0.release - >>> spring-context-3.0.7.release - >>> spring-context-support-3.1.0.release - >>> spring-data-mongodb-1.0.1.release - >>> spring-data-redis-1.0.0.release - >>> spring-jdbc-3.0.7.release - >>> spring-rabbit-1.0.0.release - >>> spring-security-oauth2-1.0.0.release - >>> spring-test-3.0.7.release - >>> spring-test-3.2.2.release - >>> spring-web-3.0.7.release - >>> spring-webmvc-3.1.0.release - >>> spring-webmvc-3.2.2.release - >>> wagon-provider-api-2.2 - - - -SECTION 3: Common Development and Distribution License, V1.0 - - >>> jsp-api-2.1 - >>> jstl-1.2 - >>> servlet-api-2.5 - - - -SECTION 4: Common Public License, V1.0 - - >>> junit-4.8.2 - - - -SECTION 5: Eclipse Public License, V1.0 - - >>> aspectjrt-1.6.9 - >>> jetty-server-8.1.12.v20130726 - - - -SECTION 6: GNU General Public License, V2.0 - - >>> mysql-connector-java-5.1.18 - - - -SECTION 7: GNU Lesser General Public License, V2.1 - - >>> byteman-bmunit-2.1.3 - >>> dbunit-2.4.8 - - - -APPENDIX. Standard License Files - - >>> GNU Lesser General Public License, V2.1 - - >>> GNU General Public License, V2.0 - - >>> Common Development and Distribution License, V1.0 - - >>> Common Public License, V1.0 - - >>> Eclipse Public License, V1.0 - - - - - ---------------- SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ---------- - -BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s). - - ->>> hamcrest-all-1.1 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> junit-4.10.0 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of -conditions and the following disclaimer. Redistributions in binary form must reproduce -the above copyright notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse -or promote products derived from this software without specific prior written -permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY -EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT -SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED -TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR -BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY -WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH -DAMAGE. - - ->>> junit-4.7 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> junit-4.8 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> mockito-all-1.8.5 - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -ADDITIONAL LICENSE INFORMATION: - -> BSD - -mockito-all-1.8.5-sources.jar\asm-license.txt - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - -> Apache 2.0 - -mockito-all-1.8.5-sources.jar\org\mockito\cglib\beans\BeanCopier.java - -Copyright 2003,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -> MIT style - - -mockito-all-1.8.5-sources.jar\org\objenesis\instantiator\jrockit\JRockit131Instantiator.java - -COPYRIGHT & LICENSE - -This code is Copyright (c) 2006 BEA Systems, inc. It is provided free, as-is and without any warranties for the purpose of -inclusion in Objenesis or any other open source project with a FSF approved license, as long as this notice is not -removed. There are no limitations on modifying or repackaging the code apart from this. - -BEA does not guarantee that the code works, and provides no support for it. Use at your own risk. - -Originally developed by Leonardo Mesquita. Copyright notice added by Henrik Sthl, BEA JRockit Product Manager. - - ->>> mockito-all-1.9.0 - -The MIT License - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -ADDITIONAL LICENSE INFORMATION: - - -> BSD - -mockito-all-1.9.0-sources.jar\asm-license.txt - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - -> Apache 2.0 - -mockito-all-1.9.0-sources.jar\org\mockito\cglib\beans\ImmutableBean.java - -Copyright 2003,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> mockito-core-1.9.5 - -The MIT License - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -ADDITIONAL LICENSE INFORMATION: - -> BSD - -mockito-core-1.9.5-sources.jar\asm-license.txt - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - -> Apache 2.0 - -mockito-core-1.9.5-sources.jar\org\mockito\cglib\beans\ImmutableBean.java - -Copyright 2003,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> postgresql-9.0-801.jdbc4 - -Copyright (c) 1997-2011, PostgreSQL Global Development Group -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, - this list of conditions and the following disclaimer. -2. Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. -3. Neither the name of the PostgreSQL Global Development Group nor the names - of its contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE -POSSIBILITY OF SUCH DAMAGE. - - ->>> slf4j-api-1.5.10 - -Copyright (c) 2004-2007 QOS.ch - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ->>> slf4j-api-1.5.6 - -Copyright (c) 2004-2008 QOS.ch - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, provided that the above - copyright notice(s) and this permission notice appear in all copies of - the Software and that both the above copyright notice(s) and this - permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY - SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER - RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder - shall not be used in advertising or otherwise to promote the sale, use - or other dealings in this Software without prior written authorization - of the copyright holder. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -slf4j-1.5.6.tar.gz\slf4j-1.5.6.tar\slf4j-1.5.6\log4j-over-slf4j\src\main\java\org\apache\log4j\Logger.java - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ->>> slf4j-log4j12-1.5.10 - -Copyright (c) 2004-2005 SLF4J.ORG -Copyright (c) 2004-2005 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. - - ->>> yamlbeans-1.06 - -Copyright (c) 2008 Nathan Sweet, Copyright (c) 2006 Ola Bini - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation -files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, -modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES -OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ---------------- SECTION 2: Apache License, V2.0 ---------- - -Apache License, V2.0 is applicable to the following component(s). - - ->>> commons-io-2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. - -See the NOTICE file distributed with this work for additional information regarding copyright ownership. - -The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - - ->>> httpclient-4.2.5 - -Apache HttpComponents HttpClient -Copyright 1999-2013 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - - ->>> jackson-core-asl-1.6.2 - -This copy of Jackson JSON processor is licensed under the Apache (Software) License, version 2.0 ("the License"). - -See the License for details about distribution rights, and the specific rights regarding derivate works. - -You may obtain a copy of the License at: http://www.apache.org/licenses/ - -A copy is also included with both the downloadable source code package and jar that contains class bytecodes, as file "ASL 2.0". In both cases, that file should be located next to this file: in source distribution the location should be "release-notes/asl"; and in jar "META-INF/" - - ->>> jackson-mapper-asl-1.6.2 - -This copy of Jackson JSON processor is licensed under the Apache (Software) License, version 2.0 ("the License"). - -See the License for details about distribution rights, and the specific rights regarding derivate works. - -You may obtain a copy of the License at: http://www.apache.org/licenses/ - -A copy is also included with both the downloadable source code package and jar that contains class bytecodes, as file "ASL 2.0". In both cases, that file should be located next to this file: in source distribution the location should be "release-notes/asl"; and in jar "META-INF/" - - ->>> javax.inject-1 - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> jcl-over-slf4j-1.5.10 - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - - ->>> jcl-over-slf4j-1.5.6 - -Copyright 2001-2004 The Apache Software Foundation. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ->>> log4j-1.2.14 - -Apache log4j -Copyright 2007 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ->>> log4j-1.2.15 - -Apache log4j -Copyright 2007 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ->>> log4j-over-slf4j-1.5.6 - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> maven-artifact-manager-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-artifact-manager-2.2.1-sources.jar\META-INF\ DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Artifact Manager - -From: 'Codehaus' (http://www.codehaus.org/) - Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Artifact (http://maven.apache.org/maven-artifact) org.apache.maven:maven-artifact:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Repository Metadata Model (http://maven.apache.org/maven-repository-metadata) org.apache.maven:maven-repository-metadata:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Public Domain - -From: 'Dawid Kurzyniec' (http://www.mathcs.emory.edu/~dawidk/) -- Backport of JSR 166 (http://backport-jsr166.sourceforge.net/) backport-util-concurrent:backport-util-concurrent:jar:3.1 -License: Public Domain (http://creativecommons.org/licenses/publicdomain) - - -> Apapche 1.1 - -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-core-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - - -> Apache 2.0 - -maven-core-2.2.1-sources.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Core - -From: 'an unknown organization' - -- Codec commons-codec:commons-codec:jar:1.2 - -- Neko HTML (http://nekohtml.sourceforge.net/) nekohtml:nekohtml:jar:1.9.6.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) -- Unnamed - nekohtml:xercesMinimal:jar:1.9.6.2 nekohtml:xercesMinimal:jar:1.9.6.2) - -- Plexus Cipher: encryption/decryption Component (http://spice.sonatype.org/plexus-cipher) org.sonatype.plexus:plexus cipher:jar:1.4 -License: Apache Public License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - -- Plexus Security Dispatcher Component (http://spice.sonatype.org/plexus-sec-dispatcher) org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3 -License: Apache Public License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - -From: 'Apache Software Foundation' (http://jakarta.apache.org/) -- HttpClient (http://jakarta.apache.org/commons/httpclient/) commons-httpclient:commons-httpclient:jar:3.0 -License: Apache License (http://www.apache.org/licenses/LICENSE-2.0) - -From: 'Codehaus' (http://www.codehaus.org/) -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Default Interactivity Handler org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 - -- Plexus Interpolation API (http://plexus.codehaus.org/plexus-components/plexus-interpolation) org.codehaus.plexus:plexus-interpolation:jar:1.11 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Jackrabbit JCR Commons (http://jackrabbit.apache.org/jackrabbit-jcr-commons) org.apache.jackrabbit:jackrabbit-jcr-commons:bundle:1.5.0 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Jackrabbit WebDAV Library (http://jackrabbit.apache.org/jackrabbit-webdav) org.apache.jackrabbit:jackrabbit-webdav:jar:1.5.0 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Artifact (http://maven.apache.org/maven-artifact) org.apache.maven:maven-artifact:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Artifact Manager (http://maven.apache.org/maven-artifact-manager) org.apache.maven:maven-artifact-manager:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Error Diagnostics (http://maven.apache.org/maven-error-diagnostics) org.apache.maven:maven-error-diagnostics:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Model (http://maven.apache.org/maven-model) org.apache.maven:maven-model:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Monitor (http://maven.apache.org/maven-monitor) org.apache.maven:maven-monitor:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin API (http://maven.apache.org/maven-plugin-api) org.apache.maven:maven-plugin-api:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Descriptor Model (http://maven.apache.org/maven-plugin-descriptor) org.apache.maven:maven-plugin-descriptor:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Parameter Documenter API (http://maven.apache.org/maven-plugin-parameter-documenter) org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Registry Model (http://maven.apache.org/maven-plugin-registry) org.apache.maven:maven-plugin-registry:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Profile Model (http://maven.apache.org/maven-profile) org.apache.maven:maven-profile:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Project Builder (http://maven.apache.org/maven-project) org.apache.maven:maven-project:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Repository Metadata Model (http://maven.apache.org/maven-repository-metadata) org.apache.maven:maven-repository-metadata:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Local Settings Model (http://maven.apache.org/maven-settings) org.apache.maven:maven-settings:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Doxia :: Logging API (http://maven.apache.org/doxia/doxia/doxia-logging-api) org.apache.maven.doxia:doxia-logging-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Doxia :: Sink API (http://maven.apache.org/doxia/doxia/doxia-sink-api) org.apache.maven.doxia:doxia-sink-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Reporting API (http://maven.apache.org/maven-reporting/maven-reporting-api) org.apache.maven.reporting:maven-reporting-api:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon File Provider (http://maven.apache.org/wagon/wagon-providers/wagon-file) org.apache.maven.wagon:wagon-file:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon HTTP Provider (http://maven.apache.org/wagon/wagon-providers/wagon-http) org.apache.maven.wagon:wagon-http:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon Lightweight HTTP Provider (http://maven.apache.org/wagon/wagon-providers/wagon-http-lightweight) org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon HTTP Shared Library (http://maven.apache.org/wagon/wagon-providers/wagon-http-shared) org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon SSH Provider (http://maven.apache.org/wagon/wagon-providers/wagon-ssh) org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon SSH Common Library (http://maven.apache.org/wagon/wagon-providers/wagon-ssh-common) org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon SSH External Provider (http://maven.apache.org/wagon/wagon-providers/wagon-ssh-external) org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon WebDav Provider (http://maven.apache.org/wagon/wagon-providers/wagon-webdav-jackrabbit) org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Public Domain - -From: 'Dawid Kurzyniec' (http://www.mathcs.emory.edu/~dawidk/) -- Backport of JSR 166 (http://backport-jsr166.sourceforge.net/) backport-util-concurrent:backport-util-concurrent:jar:3.1 -License: Public Domain (http://creativecommons.org/licenses/publicdomain) - -> BSD - -From: 'jcraft' (http://www.jcraft.com/jsch) -- JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.38 -License: BSD (http://www.jcraft.com/jsch/LICENSE.txt - -> MIT - -From: 'QOS.ch' (http://www.qos.ch) - - - JCL 1.1.1 implemented over SLF4J (http://www.slf4j.org) org.slf4j:jcl-over-slf4j:jar:1.5.6 - - - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.5.6 - - - SLF4J JDK14 Binding (http://www.slf4j.org) org.slf4j:slf4j-jdk14:jar:1.5.6 - - - SLF4J NOP Binding (http://www.slf4j.org) org.slf4j:slf4j-nop:jar:1.5.3 - -> Apache 1.1 -From: 'The Codehaus' (http://codehaus.org/) - - classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-plugin-api-2.0 - -Copyright 2001-2005 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - - ->>> maven-plugin-testing-harness-1.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - ->>> spring-amqp-1.0.0.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on -an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - - ->>> spring-context-3.0.7.release - -Copyright 2002-2009 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-context-support-3.1.0.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-data-mongodb-1.0.1.release - -Copyright 2010-2011 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-data-redis-1.0.0.release - -Copyright 2010-2011 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-jdbc-3.0.7.release - -Copyright 2002-2008 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-rabbit-1.0.0.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with -the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on -an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the -specific language governing permissions and limitations under the License. - - ->>> spring-security-oauth2-1.0.0.release - -License: Apache 2.0 - -Copyright 2008-2009 Web Cohesion - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - -ADDITIONAL LICENSE INFORMATION: - -spring-security-oauth2-1.0.0.BUILD-20110927.133043-2-sources.jar\org\springframework\security\oauth2\common\json\JSONArray.java -Copyright (c) 2002 JSON.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -The Software shall be used for Good, not Evil. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ->>> spring-test-3.0.7.release - -Copyright 2002-2009 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-test-3.2.2.release - -Spring Framework 3.2.2.RELEASE -Copyright (c) 2002-2013 SpringSource, a division of VMware, Inc. - -This product is licensed to you under the Apache License, Version 2.0 -(the "License"). You may not use this product except in compliance with -the License. - -This product may include a number of subcomponents with separate -copyright notices and license terms. Your use of the source code for -these subcomponents is subject to the terms and conditions of the -subcomponent's license, as noted in the license.txt file. - -ADDITIONAL LICENSE INFORMATION: - -> BSD -spring-test-3.2.2.RELEASE.jar\META-INF\ license.txt -Copyright (c) 2000-2011 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - ->>> spring-web-3.0.7.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-webmvc-3.1.0.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-webmvc-3.2.2.release - -Copyright 2002-2012 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> wagon-provider-api-2.2 - -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - - ---------------- SECTION 3: Common Development and Distribution License, V1.0 ---------- - -Common Development and Distribution License, V1.0 is applicable to the following component(s). - - ->>> jsp-api-2.1 - -The contents of this file are subject to the terms - of the Common Development and Distribution License - (the "License"). You may not use this file except - in compliance with the License. - - You can obtain a copy of the license at - glassfish/bootstrap/legal/CDDLv1.0.txt or - https://glassfish.dev.java.net/public/CDDLv1.0.html. - See the License for the specific language governing - permissions and limitations under the License. - - When distributing Covered Code, include this CDDL - HEADER in each file and include the License file at - glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, - add the following below this CDDL HEADER, with the - fields enclosed by brackets "[]" replaced with your - own identifying information: Portions Copyright [yyyy] - [name of copyright owner] - - Copyright 2005 Sun Microsystems, Inc. All rights reserved. - - -ADDITIONAL LICENSE INFORMATION: - - -> CDDL 1.0 - -jsp-api-2.1-7.0.0pre1-sources.jar\javax\servlet\jsp\resources\web-jsptaglibrary_2_1.xsd - -[PLEASE NOTE: PIVOTAL SOFTWARE, INC ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE CDDL 1.0. PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE CDDL 1.0. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] - -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. - - Portions Copyright Apache Software Foundation. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can obtain - a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html - or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. - Sun designates this particular file as subject to the "Classpath" exception - as provided by Sun in the GPL Version 2 section of the License file that - accompanied this code. If applicable, add the following below the License - Header, with the fields enclosed by brackets [] replaced by your own - identifying information: "Portions Copyrighted [year] - [name of copyright owner]" - - Contributor(s): - - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - - -> Apache 2.0 - -sp-api-2.1-7.0.0pre1-sources.jar\javax\servlet\jsp\resources\jspxml_2_0.dtd - -Copyright 2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> jstl-1.2 - -The contents of this file are subject to the terms -of the Common Development and Distribution License -(the "License"). You may not use this file except -in compliance with the License. - -You can obtain a copy of the license at -glassfish/bootstrap/legal/CDDLv1.0.txt or -https://glassfish.dev.java.net/public/CDDLv1.0.html. -See the License for the specific language governing -permissions and limitations under the License. - -When distributing Covered Code, include this CDDL -HEADER in each file and include the License file at -glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, -add the following below this CDDL HEADER, with the -fields enclosed by brackets "[]" replaced with your -own identifying information: Portions Copyright [yyyy] -[name of copyright owner] - -Copyright 2005 Sun Microsystems, Inc. All rights reserved. - -Portions Copyright Apache Software Foundation. - - ->>> servlet-api-2.5 - -The contents of this file are subject to the terms -of the Common Development and Distribution License -(the "License"). You may not use this file except -in compliance with the License. - -You can obtain a copy of the license at -glassfish/bootstrap/legal/CDDLv1.0.txt or -https://glassfish.dev.java.net/public/CDDLv1.0.html. -See the License for the specific language governing -permissions and limitations under the License. - -When distributing Covered Code, include this CDDL -HEADER in each file and include the License file at -glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, -add the following below this CDDL HEADER, with the -fields enclosed by brackets "[]" replaced with your -own identifying information: Portions Copyright [yyyy] -[name of copyright owner] - -Copyright 2005 Sun Microsystems, Inc. All rights reserved. - -Portions Copyright Apache Software Foundation. - - ---------------- SECTION 4: Common Public License, V1.0 ---------- - -Common Public License, V1.0 is applicable to the following component(s). - - ->>> junit-4.8.2 - -LICENSE: CPL 1.0 - - ---------------- SECTION 5: Eclipse Public License, V1.0 ---------- - -Eclipse Public License, V1.0 is applicable to the following component(s). - - ->>> aspectjrt-1.6.9 - -Copyright (c) 1999-2001 Xerox Corporation, 2002 Palo Alto Research Center, Incorporated (PARC). - -All rights reserved. - -This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html - -Contributors: Xerox/PARC initial implementation - - ->>> jetty-server-8.1.12.v20130726 - -License:EPL 1.0 - -Copyright (c) 1995-2013 Mort Bay Consulting Pty. Ltd. -All rights reserved. This program and the accompanying materials -are made available under the terms of the Eclipse Public License v1.0 -and Apache License v2.0 which accompanies this distribution. - -The Eclipse Public License is available at -http:www.eclipse.org/legal/epl-v10.html - -The Apache License v2.0 is available at -http:www.opensource.org/licenses/apache2.0.php - -You may elect to redistribute this code under either of these licenses. - -ADDITIONAL LICENSE INFORMATION: - -> MIT -jetty-all-server-8.1.12.v20130726-sources.jar\org\eclipse\jetty\util\security\UnixCrypt.java -Copyright (c) 1996 Aki Yoshida. All rights reserved. - -Permission to use, copy, modify and distribute this software -for non-commercial or commercial purposes and without fee is -hereby granted provided that this copyright notice appears in -all copies. - - ---------------- SECTION 6: GNU General Public License, V2.0 ---------- - -GNU General Public License, V2.0 is applicable to the following component(s). - - ->>> mysql-connector-java-5.1.18 - -LICENSE - -MySQL Connector/J is licensed under the GPL or a commercial license -from MySQL AB. - -If you have licensed this product under the GPL, please see the COPYING -file for more information. - -There are special exceptions to the terms and conditions of the GPL -as it is applied to this software. View the full text of the -exception in file EXCEPTIONS-CONNECTOR-J in the directory of this -software distribution. - -If you have licensed this product under a commercial license from -MySQL AB, please see the file "MySQLEULA.txt" that comes with this -distribution for the terms of the license. - -If you need non-GPL licenses for commercial distribution please contact -me or . - -ADDITIONAL LICENSE INFORMATION: - -> EXCEPTIONS-CONNECTOR-J: - -MySQL FLOSS License Exception - -The MySQL AB Exception for Free/Libre and Open Source -Software-only Applications Using MySQL Client Libraries (the -"FLOSS Exception"). - -Version 0.6, 7 March 2007 - -Exception Intent - -We want specified Free/Libre and Open Source Software (``FLOSS'') -applications to be able to use specified GPL-licensed MySQL client -libraries (the ``Program'') despite the fact that not all FLOSS -licenses are compatible with version 2 of the GNU General Public -License (the ``GPL''). - -Legal Terms and Conditions - -As a special exception to the terms and conditions of version 2.0 -of the GPL: - - 1. You are free to distribute a Derivative Work that is formed - entirely from the Program and one or more works (each, a - "FLOSS Work") licensed under one or more of the licenses - listed below in section 1, as long as: - a. You obey the GPL in all respects for the Program and the - Derivative Work, except for identifiable sections of the - Derivative Work which are not derived from the Program, - and which can reasonably be considered independent and - separate works in themselves, - b. all identifiable sections of the Derivative Work which - are not derived from the Program, and which can - reasonably be considered independent and separate works - in themselves, - i. are distributed subject to one of the FLOSS licenses - listed below, and - ii. the object code or executable form of those sections - are accompanied by the complete corresponding - machine-readable source code for those sections on - the same medium and under the same FLOSS license as - the corresponding object code or executable forms of - those sections, and - c. any works which are aggregated with the Program or with a - Derivative Work on a volume of a storage or distribution - medium in accordance with the GPL, can reasonably be - considered independent and separate works in themselves - which are not derivatives of either the Program, a - Derivative Work or a FLOSS Work. - If the above conditions are not met, then the Program may only - be copied, modified, distributed or used under the terms and - conditions of the GPL or another valid licensing option from - MySQL AB. - - 2. FLOSS License List - -License name Version(s)/Copyright Date -Academic Free License 2.0 -Apache Software License 1.0/1.1/2.0 -Apple Public Source License 2.0 -Artistic license From Perl 5.8.0 -BSD license "July 22 1999" -Common Development and Distribution License (CDDL) 1.0 -Common Public License 1.0 -Eclipse Public License 1.0 -GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1 -Jabber Open Source License 1.0 -MIT license (As listed in file MIT-License.txt) --- -Mozilla Public License (MPL) 1.0/1.1 -Open Software License 2.0 -OpenSSL license (with original SSLeay license) "2003" ("1998") -PHP License 3.0 -Python license (CNRI Python License) --- -Python Software Foundation License 2.1.1 -Sleepycat License "1999" -University of Illinois/NCSA Open Source License --- -W3C License "2001" -X11 License "2001" -Zlib/libpng License --- -Zope Public License 2.0 - - Due to the many variants of some of the above licenses, we - require that any version follow the 2003 version of the Free - Software Foundation's Free Software Definition - (http://www.gnu.org/philosophy/free-sw.html) or version 1.9 of - the Open Source Definition by the Open Source Initiative - (http://www.opensource.org/docs/definition.php). - - 3. Definitions - - a. Terms used, but not defined, herein shall have the - meaning provided in the GPL. - b. Derivative Work means a derivative work under copyright - law. - - 4. Applicability: This FLOSS Exception applies to all Programs - that contain a notice placed by MySQL AB saying that the - Program may be distributed under the terms of this FLOSS - Exception. If you create or distribute a work which is a - Derivative Work of both the Program and any other work - licensed under the GPL, then this FLOSS Exception is not - available for that work; thus, you must remove the FLOSS - Exception notice from that work and comply with the GPL in all - respects, including by retaining all GPL notices. You may - choose to redistribute a copy of the Program exclusively under - the terms of the GPL by removing the FLOSS Exception notice - from that copy of the Program, provided that the copy has - never been modified by you or any third party. - -Appendix A. Qualified Libraries and Packages - -The following is a non-exhaustive list of libraries and packages -which are covered by the FLOSS License Exception. Please note that -this appendix is provided merely as an additional service to -specific FLOSS projects wishing to simplify licensing information -for their users. Compliance with one of the licenses noted under -the "FLOSS license list" section remains a prerequisite. - -Package Name Qualifying License and Version -Apache Portable Runtime (APR) Apache Software License 2.0 - - ---------------- SECTION 7: GNU Lesser General Public License, V2.1 ---------- - -GNU Lesser General Public License, V2.1 is applicable to the following component(s). - - ->>> byteman-bmunit-2.1.3 - -JBoss, Home of Professional Open Source. -Copyright 2011, Red Hat and individual contributors -as indicated by the @author tags. See the copyright.txt file in the -distribution for a full listing of individual contributors. - -This is free software; you can redistribute it and/or modify it -under the terms of the GNU Lesser General Public License as -published by the Free Software Foundation; either version 2.1 of -the License, or (at your option) any later version. - -This software is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -Lesser General Public License for more details. - -You should have received a copy of the GNU Lesser General Public -License along with this software; if not, write to the Free -Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA -02110-1301 USA, or see the FSF site: http://www.fsf.org. - - ->>> dbunit-2.4.8 - -The DbUnit Database Testing Framework - Copyright (C)2002-2004, DbUnit.org - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - -=============== APPENDIX. Standard License Files ============== - - - ---------------- SECTION 1: GNU Lesser General Public License, V2.1 ----------- - - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - - - - ---------------- SECTION 2: GNU General Public License, V2.0 ----------- - - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. - - - - ---------------- SECTION 3: Common Development and Distribution License, V1.0 ----------- - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - -1.1. "Contributor" means each individual or entity that creates or -contributes to the creation of Modifications. - -1.2. "Contributor Version" means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications -made by that particular Contributor. - -1.3. "Covered Software" means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing Original -Software with files containing Modifications, in each case including -portions thereof. - -1.4. "Executable" means the Covered Software in any form other than -Source Code. - -1.5. "Initial Developer" means the individual or entity that first makes -Original Software available under this License. - -1.6. "Larger Work" means a work which combines Covered Software or -portions thereof with code not governed by the terms of this License. - -1.7. "License" means this document. - -1.8. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently -acquired, any and all of the rights conveyed herein. - -1.9. "Modifications" means the Source Code and Executable form of any -of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - -1.10. "Original Software" means the Source Code and Executable form of -computer software code that is originally released under this License. - -1.11. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus -claims, in any patent Licensable by grantor. - -1.12. "Source Code" means (a) the common form of computer software code -in which modifications are made and (b) associated documentation included -in or with such code. - -1.13. "You" (or "Your") means an individual or a legal entity exercising -rights under, and complying with all of the terms of, this License. For -legal entities, "You" includes any entity which controls, is controlled -by, or is under common control with You. For purposes of this definition, -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) -ownership of more than fifty percent (50%) of the outstanding shares or -beneficial ownership of such entity. - -2. License Grants. - -2.1. The Initial Developer Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, the Initial Developer hereby -grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, modify, - display, perform, sublicense and distribute the Original Software - (or portions thereof), with or without Modifications, and/or as part - of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling - of Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective - on the date Initial Developer first distributes or otherwise makes - the Original Software available to a third party under the terms of - this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, - or (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - -2.2. Contributor Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, each Contributor hereby grants -You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications created - by such Contributor (or portions thereof), either on an unmodified - basis, with other Modifications, as Covered Software and/or as part - of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or - in combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor - (or portions thereof); and (2) the combination of Modifications - made by that Contributor with its Contributor Version (or portions - of such combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. - -Any Covered Software that You distribute or otherwise make available -in Executable form must also be made available in Source Code form and -that Source Code form must be distributed only under the terms of this -License. You must include a copy of this License with every copy of the -Source Code form of the Covered Software You distribute or otherwise make -available. You must inform recipients of any such Covered Software in -Executable form as to how they can obtain such Covered Software in Source -Code form in a reasonable manner on or through a medium customarily used -for software exchange. - -3.2. Modifications. - -The Modifications that You create or to which You contribute are governed -by the terms of this License. You represent that You believe Your -Modifications are Your original creation(s) and/or You have sufficient -rights to grant the rights conveyed by this License. - -3.3. Required Notices. - -You must include a notice in each of Your Modifications that identifies -You as the Contributor of the Modification. You may not remove or alter -any copyright, patent or trademark notices contained within the Covered -Software, or any notices of licensing or any descriptive text giving -attribution to any Contributor or the Initial Developer. - -3.4. Application of Additional Terms. - -You may not offer or impose any terms on any Covered Software in Source -Code form that alters or restricts the applicable version of this License -or the recipients' rights hereunder. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to -one or more recipients of Covered Software. However, you may do so only -on Your own behalf, and not on behalf of the Initial Developer or any -Contributor. You must make it absolutely clear that any such warranty, -support, indemnity or liability obligation is offered by You alone, and -You hereby agree to indemnify the Initial Developer and every Contributor -for any liability incurred by the Initial Developer or such Contributor -as a result of warranty, support, indemnity or liability terms You offer. - -3.5. Distribution of Executable Versions. - -You may distribute the Executable form of the Covered Software under the -terms of this License or under the terms of a license of Your choice, -which may contain terms different from this License, provided that You are -in compliance with the terms of this License and that the license for the -Executable form does not attempt to limit or alter the recipient's rights -in the Source Code form from the rights set forth in this License. If -You distribute the Covered Software in Executable form under a different -license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer -or Contributor. You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer -or such Contributor as a result of any such terms You offer. - -3.6. Larger Works. - -You may create a Larger Work by combining Covered Software with other code -not governed by the terms of this License and distribute the Larger Work -as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Software. - -4. Versions of the License. - -4.1. New Versions. - -Sun Microsystems, Inc. is the initial license steward and may publish -revised and/or new versions of this License from time to time. Each -version will be given a distinguishing version number. Except as provided -in Section 4.3, no one other than the license steward has the right to -modify this License. - -4.2. Effect of New Versions. - -You may always continue to use, distribute or otherwise make the Covered -Software available under the terms of the version of the License under -which You originally received the Covered Software. If the Initial -Developer includes a notice in the Original Software prohibiting it -from being distributed or otherwise made available under any subsequent -version of the License, You must distribute and make the Covered Software -available under the terms of the version of the License under which You -originally received the Covered Software. Otherwise, You may also choose -to use, distribute or otherwise make the Covered Software available -under the terms of any subsequent version of the License published by -the license steward. - -4.3. Modified Versions. - -When You are an Initial Developer and You want to create a new license -for Your Original Software, You may create and use a modified version of -this License if You: (a) rename the license and remove any references -to the name of the license steward (except to note that the license -differs from this License); and (b) otherwise make it clear that the -license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF -DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE -ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE -IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, -YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST -OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF -WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY -COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. This License and the rights granted hereunder will terminate -automatically if You fail to comply with terms herein and fail to cure -such breach within 30 days of becoming aware of the breach. Provisions -which, by their nature, must remain in effect beyond the termination of -this License shall survive. - -6.2. If You assert a patent infringement claim (excluding declaratory -judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You assert such claim is -referred to as "Participant") alleging that the Participant Software -(meaning the Contributor Version where the Participant is a Contributor -or the Original Software where the Participant is the Initial Developer) -directly or indirectly infringes any patent, then any and all rights -granted directly or indirectly to You by such Participant, the Initial -Developer (if the Initial Developer is not the Participant) and all -Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 -days notice from Participant terminate prospectively and automatically -at the expiration of such 60 day notice period, unless if within such -60 day period You withdraw Your claim with respect to the Participant -Software against such Participant either unilaterally or pursuant to a -written agreement with Participant. - -6.3. In the event of termination under Sections 6.1 or 6.2 above, all end -user licenses that have been validly granted by You or any distributor -hereunder prior to termination (excluding licenses granted to You by -any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER -OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT -LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, -COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES -OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY -OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY -FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO -THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS -DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL -DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a "commercial item," as that term is defined -in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer -software" (as that term is defined at 48 C.F.R. 252.227-7014(a)(1)) and -"commercial computer software documentation" as such terms are used in -48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 -C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End -Users acquire Covered Software with only those rights set forth herein. -This U.S. Government Rights clause is in lieu of, and supersedes, any -other FAR, DFAR, or other clause or provision that addresses Government -rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter -hereof. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it -enforceable. This License shall be governed by the law of the jurisdiction -specified in a notice contained within the Original Software (except to -the extent applicable law, if any, provides otherwise), excluding such -jurisdiction's conflict-of-law provisions. Any litigation relating to -this License shall be subject to the jurisdiction of the courts located -in the jurisdiction and venue specified in a notice contained within -the Original Software, with the losing party responsible for costs, -including, without limitation, court costs and reasonable attorneys' -fees and expenses. The application of the United Nations Convention on -Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall -be construed against the drafter shall not apply to this License. -You agree that You alone are responsible for compliance with the United -States export administration regulations (and the export control laws and -regulation of any other countries) when You use, distribute or otherwise -make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out -of its utilization of rights under this License and You agree to work -with Initial Developer and Contributors to distribute such responsibility -on an equitable basis. Nothing herein is intended or shall be deemed to -constitute any admission of liability. - - - ---------------- SECTION 4: Common Public License, V1.0 ----------- - -Common Public License Version 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from - and are distributed by that particular Contributor. A Contribution - 'originates' from a Contributor if it was added to the Program - by such Contributor itself or anyone acting on such Contributor's - behalf. Contributions do not include additions to the Program which: - (i) are separate modules of software distributed in conjunction - with the Program under their own license agreement, and (ii) are - not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free copyright - license to reproduce, prepare derivative works of, publicly display, - publicly perform, distribute and sublicense the Contribution of such - Contributor, if any, and such derivative works, in source code and - object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free patent - license under Licensed Patents to make, use, sell, offer to sell, - import and otherwise transfer the Contribution of such Contributor, - if any, in source code and object code form. This patent license - shall apply to the combination of the Contribution and the Program - if, at the time the Contribution is added by the Contributor, such - addition of the Contribution causes such combination to be covered - by the Licensed Patents. The patent license shall not apply to any - other combinations which include the Contribution. No hardware per - se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. Each - Contributor disclaims any liability to Recipient for claims brought by - any other entity based on infringement of intellectual property rights - or otherwise. As a condition to exercising the rights and licenses - granted hereunder, each Recipient hereby assumes sole responsibility - to secure any other intellectual property rights needed, if any. - For example, if a third party patent license is required to allow - Recipient to distribute the Program, it is Recipient's responsibility - to acquire that license before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all - warranties and conditions, express and implied, including - warranties or conditions of title and non-infringement, and - implied warranties or conditions of merchantability and fitness - for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all - liability for damages, including direct, indirect, special, - incidental and consequential damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement - are offered by that Contributor alone and not by any other - party; and - - iv) states that source code for the Program is available from - such Contributor, and informs licensees how to obtain it in a - reasonable manner on or through a medium customarily used for - software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained -within the Program. - -Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities -with respect to end users, business partners and the like. While this -license is intended to facilitate the commercial use of the Program, the -Contributor who includes the Program in a commercial product offering -should do so in a manner which does not create potential liability for -other Contributors. Therefore, if a Contributor includes the Program in a -commercial product offering, such Contributor ("Commercial Contributor") -hereby agrees to defend and indemnify every other Contributor -("Indemnified Contributor") against any losses, damages and costs -(collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any -claims or Losses relating to any actual or alleged intellectual property -infringement. In order to qualify, an Indemnified Contributor must: - - a) promptly notify the Commercial Contributor in writing of such - claim, and - - b) allow the Commercial Contributor to control, and cooperate with - the Commercial Contributor in, the defense and any related settlement - negotiations. The Indemnified Contributor may participate in any - such claim at its own expense. - -For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance claims, -or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under -this section, the Commercial Contributor would have to defend claims -against the other Contributors related to those performance claims and -warranties, and if a court requires any other Contributor to pay any -damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED -ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER -EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR -CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. Each Recipient is solely responsible for determining -the appropriateness of using and distributing the Program and assumes -all risks associated with its exercise of rights under this Agreement, -including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR -ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION -OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with -respect to a patent applicable to software (including a cross-claim or -counterclaim in a lawsuit), then any patent licenses granted by that -Contributor to such Recipient under this Agreement shall terminate -as of the date such litigation is filed. In addition, if Recipient -institutes patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Program itself (excluding -combinations of the Program with other software or hardware) infringes -such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails -to comply with any of the material terms or conditions of this Agreement -and does not cure such failure in a reasonable period of time after -becoming aware of such noncompliance. If all Recipient's rights under -this Agreement terminate, Recipient agrees to cease use and distribution -of the Program as soon as reasonably practicable. However, Recipient's -obligations under this Agreement and any licenses granted by Recipient -relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, -but in order to avoid inconsistency the Agreement is copyrighted and may -only be modified in the following manner. The Agreement Steward reserves -the right to publish new versions (including revisions) of this Agreement -from time to time. No one other than the Agreement Steward has the right -to modify this Agreement. IBM is the initial Agreement Steward. IBM -may assign the responsibility to serve as the Agreement Steward to a -suitable separate entity. Each new version of the Agreement will be given -a distinguishing version number. The Program (including Contributions) -may always be distributed subject to the version of the Agreement under -which it was received. In addition, after a new version of the Agreement -is published, Contributor may elect to distribute the Program (including -its Contributions) under the new version. Except as expressly stated in -Sections 2(a) and 2(b) above, Recipient receives no rights or licenses -to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in -the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to -this Agreement will bring a legal action under this Agreement more than -one year after the cause of action arose. Each party waives its rights -to a jury trial in any resulting litigation. - - - ---------------- SECTION 5: Eclipse Public License, V1.0 ----------- - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE -PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION -OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; where such changes and/or - additions to the Program originate from and are distributed - by that particular Contributor. A Contribution 'originates' - from a Contributor if it was added to the Program by such - Contributor itself or anyone acting on such Contributor's - behalf. Contributions do not include additions to the Program - which: (i) are separate modules of software distributed in - conjunction with the Program under their own license agreement, - and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which -are necessarily infringed by the use or sale of its Contribution alone -or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this -Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free copyright - license to reproduce, prepare derivative works of, publicly display, - publicly perform, distribute and sublicense the Contribution of such - Contributor, if any, and such derivative works, in source code and - object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free patent - license under Licensed Patents to make, use, sell, offer to sell, - import and otherwise transfer the Contribution of such Contributor, - if any, in source code and object code form. This patent license - shall apply to the combination of the Contribution and the Program - if, at the time the Contribution is added by the Contributor, such - addition of the Contribution causes such combination to be covered - by the Licensed Patents. The patent license shall not apply to any - other combinations which include the Contribution. No hardware per - se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. Each - Contributor disclaims any liability to Recipient for claims brought by - any other entity based on infringement of intellectual property rights - or otherwise. As a condition to exercising the rights and licenses - granted hereunder, each Recipient hereby assumes sole responsibility - to secure any other intellectual property rights needed, if any. For - example, if a third party patent license is required to allow - Recipient to distribute the Program, it is Recipient's responsibility - to acquire that license before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form -under its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all - warranties and conditions, express and implied, including - warranties or conditions of title and non-infringement, and - implied warranties or conditions of merchantability and fitness - for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all - liability for damages, including direct, indirect, special, - incidental and consequential damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement - are offered by that Contributor alone and not by any other - party; and - - iv) states that source code for the Program is available from - such Contributor, and informs licensees how to obtain it in a - reasonable manner on or through a medium customarily used for - software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of - the Program. Contributors may not remove or alter any copyright - notices contained within the Program. - -Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities -with respect to end users, business partners and the like. While this -license is intended to facilitate the commercial use of the Program, the -Contributor who includes the Program in a commercial product offering -should do so in a manner which does not create potential liability for -other Contributors. Therefore, if a Contributor includes the Program in a -commercial product offering, such Contributor ("Commercial Contributor") -hereby agrees to defend and indemnify every other Contributor -("Indemnified Contributor") against any losses, damages and costs -(collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any -claims or Losses relating to any actual or alleged intellectual property -infringement. In order to qualify, an Indemnified Contributor must: a) -promptly notify the Commercial Contributor in writing of such claim, -and b) allow the Commercial Contributor to control, and cooperate with -the Commercial Contributor in, the defense and any related settlement -negotiations. The Indemnified Contributor may participate in any such -claim at its own expense. - -For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance claims, -or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under -this section, the Commercial Contributor would have to defend claims -against the other Contributors related to those performance claims and -warranties, and if a court requires any other Contributor to pay any -damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED -ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER -EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR -CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. Each Recipient is solely responsible for determining -the appropriateness of using and distributing the Program and assumes -all risks associated with its exercise of rights under this Agreement -, including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR -ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION -OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including -a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or -hardware) infringes such Recipient's patent(s), then such Recipient's -rights granted under Section 2(b) shall terminate as of the date such -litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails -to comply with any of the material terms or conditions of this Agreement -and does not cure such failure in a reasonable period of time after -becoming aware of such noncompliance. If all Recipient's rights under -this Agreement terminate, Recipient agrees to cease use and distribution -of the Program as soon as reasonably practicable. However, Recipient's -obligations under this Agreement and any licenses granted by Recipient -relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, -but in order to avoid inconsistency the Agreement is copyrighted and may -only be modified in the following manner. The Agreement Steward reserves -the right to publish new versions (including revisions) of this Agreement -from time to time. No one other than the Agreement Steward has the right -to modify this Agreement. The Eclipse Foundation is the initial Agreement -Steward. The Eclipse Foundation may assign the responsibility to serve -as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The -Program (including Contributions) may always be distributed subject to -the version of the Agreement under which it was received. In addition, -after a new version of the Agreement is published, Contributor may elect -to distribute the Program (including its Contributions) under the new -version. Except as expressly stated in Sections 2(a) and 2(b) above, -Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted -under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to -this Agreement will bring a legal action under this Agreement more than -one year after the cause of action arose. Each party waives its rights -to a jury trial in any resulting litigation. - - - -=========================================================================== - -To the extent any open source components are licensed under the -GPL and/or LGPL, or other similar licenses that require the -source code and/or modifications to source code to be made -available (as would be noted above), you may obtain a copy of -the source code corresponding to the binaries for such open -source components and modifications thereto, if any, (the -"Source Files"), by downloading the Source Files from Pivotal抯 website at -http://www.gopivotal.com/open-source, or by sending a request, with -your name and address to: Pivotal Software, Inc., 1900 S. Norfolk Street #125, -San Mateo, CA 94403, Attention: General Counsel. All such requests should clearly -specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. Pivotal shall mail -a copy of the Source Files to you on a CD or equivalent physical medium. This -offer to obtain a copy of the Source Files is valid for three -years from the date you acquired this Software product. -Alternatively, the Source Files may accompany the Pivotal product. - -[CFCFJAVACLIENT11152013NV12202013] diff --git a/NOTICE b/NOTICE index ca8765b26ec..f32b72718da 100644 --- a/NOTICE +++ b/NOTICE @@ -1,10 +1,15 @@ -cf-cf-java-client +Cloud Foundry Java Client -Copyright (c) 2013 Pivotal Software, Inc. All Rights Reserved. +Copyright (c) 2013-Present CloudFoundry.org Foundation, Inc. All Rights Reserved. -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at -This product may include a number of subcomponents with separate copyright notices -and license terms. Your use of these subcomponents is subject to the terms and -conditions of the subcomponent's license, as noted in the LICENSE file. + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/Notice.txt b/Notice.txt deleted file mode 100644 index 3c745d71bc6..00000000000 --- a/Notice.txt +++ /dev/null @@ -1,10 +0,0 @@ -cf-cf-java-client - -Copyright (c) 2013 Pivotal Software, Inc. All Rights Reserved. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices -and license terms. Your use of these subcomponents is subject to the terms and -conditions of the subcomponent's license, as noted in the LICENSE file. diff --git a/README.md b/README.md index bb69dd22944..6f6e77f4ae7 100644 --- a/README.md +++ b/README.md @@ -1,149 +1,327 @@ -cf-java-client -================ - -[![Build Status](https://travis-ci.org/cloudfoundry/cf-java-client.png)](https://travis-ci.org/cloudfoundry/cf-java-client) - -The cf-java-client repo contains a Java client library and tools for Cloud Foundry. Three major components are included -in this repo. - -# Components +# Cloud Foundry Java Client +[![Maven Central](https://img.shields.io/maven-central/v/org.cloudfoundry/cloudfoundry-client)](https://search.maven.org/search?q=g:org.cloudfoundry%20AND%20a:cloudfoundry-client%20AND%20v) + +| Artifact | Javadocs +| -------- | -------- +| `cloudfoundry-client` | [![javadoc](https://javadoc.io/badge2/org.cloudfoundry/cloudfoundry-client/javadoc.svg)](https://javadoc.io/doc/org.cloudfoundry/cloudfoundry-client) +| `cloudfoundry-client-reactor` | [![javadoc](https://javadoc.io/badge2/org.cloudfoundry/cloudfoundry-client-reactor/javadoc.svg)](https://javadoc.io/doc/org.cloudfoundry/cloudfoundry-client-reactor) +| `cloudfoundry-operations` | [![javadoc](https://javadoc.io/badge2/org.cloudfoundry/cloudfoundry-operations/javadoc.svg)](https://javadoc.io/doc/org.cloudfoundry/cloudfoundry-operations) +| `cloudfoundry-util` | [![javadoc](https://javadoc.io/badge2/org.cloudfoundry/cloudfoundry-util/javadoc.svg)](https://javadoc.io/doc/org.cloudfoundry/cloudfoundry-util) + +The `cf-java-client` project is a Java language binding for interacting with a Cloud Foundry instance. The project is broken up into a number of components that expose different levels of abstraction depending on need. + +* `cloudfoundry-client` – Interfaces, request, and response objects mapping to the [Cloud Foundry REST APIs][a]. This project has no implementation and therefore cannot connect to a Cloud Foundry instance on its own. +* `cloudfoundry-client-reactor` – The default implementation of the `cloudfoundry-client` project. This implementation is based on Reactor Netty [`HttpClient`][h]. +* `cloudfoundry-operations` – An API and implementation that corresponds to the [Cloud Foundry CLI][c] operations. This project builds on the `cloudfoundry-client` and therefore has a single implementation. + +## Versions +The Cloud Foundry Java Client has two active versions. The `5.x` line is compatible with Spring Boot `2.4.x - 2.6.x` just to manage its dependencies, while the `4.x` line uses Spring Boot `2.3.x`. + +## Dependencies +Most projects will need two dependencies; the Operations API and an implementation of the Client API. For Maven, the dependencies would be defined like this: + +```xml + + + org.cloudfoundry + cloudfoundry-client-reactor + latest.RELEASE + + + org.cloudfoundry + cloudfoundry-operations + latest.RELEASE + + ... + +``` -## cloudfoundry-client-lib +Snapshot artifacts can be found in the Spring snapshot repository: + +```xml + + + spring-snapshots + Spring Snapshots + https://repo.spring.io/snapshot + + true + + + ... + +``` -The cloudfoundry-client-lib is a Java library that provides a Java language binding for the Cloud Foundry Cloud Controller REST API. -The library can be used by Java, Groovy, and Scala apps to interact with a Cloud Foundry service on behalf of a user. +For Gradle, the dependencies would be defined like this: -[Read more](http://docs.cloudfoundry.org/buildpacks/java/java-client.html) +```groovy +dependencies { + compile 'org.cloudfoundry:cloudfoundry-client-reactor:.RELEASE' + compile 'org.cloudfoundry:cloudfoundry-operations:.RELEASE' + ... +} +``` -## cloudfoundry-maven-plugin +Snapshot artifacts can be found in the Spring snapshot repository: -The Cloud Foundry Maven plugin is a plugin for the [Maven build tool](http://maven.apache.org/) that allows you to -deploy and manage applications with Maven goals. +```groovy +repositories { + maven { url 'https://repo.spring.io/snapshot' } + ... +} +``` -[Read more](./cloudfoundry-maven-plugin) +## Usage +Both the `cloudfoundry-operations` and `cloudfoundry-client` projects follow a ["Reactive"][r] design pattern and expose their responses with [Project Reactor][p] `Monos`s and `Flux`s. -## cloudfoundry-gradle-plugin +### `CloudFoundryClient`, `DopplerClient`, `UaaClient` Builders -The Cloud Foundry Gradle plugin is a plugin for the [Gradle build tool](http://www.gradle.org/) that allows you to -deploy and manage applications with Gradle tasks. +The lowest-level building blocks of the API are `ConnectionContext` and `TokenProvider`. These types are intended to be shared between instances of the clients, and come with out of the box implementations. To instantiate them, you configure them with builders: -[Read more](./cloudfoundry-gradle-plugin) +```java +DefaultConnectionContext.builder() + .apiHost(apiHost) + .build(); -# Building +PasswordGrantTokenProvider.builder() + .password(password) + .username(username) + .build(); +``` -## Prerequisites +In Spring-based applications, you'll want to encapsulate them in bean definitions: + +```java +@Bean +DefaultConnectionContext connectionContext(@Value("${cf.apiHost}") String apiHost) { + return DefaultConnectionContext.builder() + .apiHost(apiHost) + .build(); +} + +@Bean +PasswordGrantTokenProvider tokenProvider(@Value("${cf.username}") String username, + @Value("${cf.password}") String password) { + return PasswordGrantTokenProvider.builder() + .password(password) + .username(username) + .build(); +} +``` -### Apache Maven +`CloudFoundryClient`, `DopplerClient`, and `UaaClient` are only interfaces. Each has a [Reactor][p]-based implementation. To instantiate them, you configure them with builders: -The `cloudfoundry-client-lib` and `cloudfoundry-maven-plugin` components are built with [Apache Maven](http://maven.apache.org/). +```java +ReactorCloudFoundryClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); -### Gradle +ReactorDopplerClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); -The `cloudfoundry-gradle-plugin` component is built with [Gradle](http://www.gradle.org/). +ReactorUaaClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); +``` -### Protocol Buffer compiler +In Spring-based applications, you'll want to encapsulate them in bean definitions: + +```java +@Bean +ReactorCloudFoundryClient cloudFoundryClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorCloudFoundryClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); +} + +@Bean +ReactorDopplerClient dopplerClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorDopplerClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); +} + +@Bean +ReactorUaaClient uaaClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorUaaClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); +} +``` -The `cloudfoundry-client-lib` uses Protocol Buffers to get logs from the Cloud Foundry [loggregator](https://github.com/cloudfoundry/loggregator) -component. A `protoc` Protocol Buffer compiler is required at build time to compile message specifications. `protoc` version -2.5.0 is required. +### `CloudFoundryOperations` Builder -On Linux with `apt`, run the [install-protoc.sh](./bin/install-protoc.sh) script in this repository to compile `protoc` 2.5.0 from source. +The `CloudFoundryClient`, `DopplerClient`, and `UaaClient`s provide direct access to the raw REST APIs. This level of abstraction provides the most detailed and powerful access to the Cloud Foundry instance, but also requires users to perform quite a lot of orchestration on their own. Most users will instead want to work at the `CloudFoundryOperations` layer. Once again this is only an interface and the default implementation of this is the `DefaultCloudFoundryOperations`. To instantiate one, you configure it with a builder: -On OSX with [homebrew](http://brew.sh/), install `protoc` with this command: +**NOTE:** The `DefaultCloudfoundryOperations` type does not require all clients in order to run. Since not all operations touch all kinds of clients, you can selectively configure the minimum needed. If a client is missing, the first invocation of a method that requires that client will return an error. +```java +DefaultCloudFoundryOperations.builder() + .cloudFoundryClient(cloudFoundryClient) + .dopplerClient(dopplerClient) + .uaaClient(uaaClient) + .organization("example-organization") + .space("example-space") + .build(); ``` -$ brew install protobuf -``` - -On Windows, download the [`protoc` binary](https://code.google.com/p/protobuf/downloads/detail?name=protoc-2.5.0-win32.zip), -unzip it, and put `protoc.exe` in the path. -After installing, run this command and check the output to make sure it is similar to the following: - -``` -$ protoc --version -libprotoc 2.5.0 +In Spring-based applications, you'll want to encapsulate this in a bean definition as well: + +```java +@Bean +DefaultCloudFoundryOperations cloudFoundryOperations(CloudFoundryClient cloudFoundryClient, + DopplerClient dopplerClient, + UaaClient uaaClient, + @Value("${cf.organization}") String organization, + @Value("${cf.space}") String space) { + return DefaultCloudFoundryOperations.builder() + .cloudFoundryClient(cloudFoundryClient) + .dopplerClient(dopplerClient) + .uaaClient(uaaClient) + .organization(organization) + .space(space) + .build(); +} ``` -## Compiling and Packaging +### `CloudFoundryOperations` APIs -To build `cloudfoundry-client-lib` and `cloudfoundry-maven-plugin`, run the following command from the project root directory: +Once you've got a reference to the `CloudFoundryOperations`, it's time to start making calls to the Cloud Foundry instance. One of the simplest possible operations is list all of the organizations the user is a member of. The following example does three things: -``` -$ mvn clean install +1. Requests a list of all organizations +1. Extracts the name of each organization +1. Prints the name of each organization to `System.out` + +```java +cloudFoundryOperations.organizations() + .list() + .map(OrganizationSummary::getName) + .subscribe(System.out::println); ``` -To build `cloudfoundry-gradle-plugin`, run the following command from the `cloudfoundry-gradle-plugin` sub-directory after -building `cloudfoundry-client-lib`: +To relate the example to the description above the following happens: -``` -$ gradle clean install -``` +1. `.list()` – Lists the Cloud Foundry organizations as a `Flux` of elements of type `Organization`. +1. `.map(...)` – Maps each organization to its name (type `String`). This example uses a method reference; the equivalent lambda would look like `organizationSummary -> organizationSummary.getName()`. +1. `subscribe...` – The terminal operation that receives each name in the `Flux`. Again, this example uses a method reference and the equivalent lambda would look like `name -> System.out.println(name)`. -## Running Integration Tests +### `CloudFoundryClient` APIs -`cloudfoundry-client-lib` has an extensive set of integration tests which run against a Cloud Foundry service. To execute the -integration tests, run the following command from the project root directory: +As mentioned earlier, the `cloudfoundry-operations` implementation builds upon the `cloudfoundry-client` API. That implementation takes advantage of the same reactive style in the lower-level API. The implementation of the `Organizations.list()` method (which was demonstrated above) looks like the following (roughly): -``` -$ mvn -P integration-test clean install -Dccng.target= -Dccng.email= -Dccng.passwd= -Dccng.org= -Dccng.space= +```java +cloudFoundryClient.organizations() + .list(ListOrganizationsRequest.builder() + .page(1) + .build()) + .flatMapIterable(ListOrganizationsResponse::getResources) + .map(resource -> OrganizationSummary.builder() + .id(resource.getMetadata().getId()) + .name(resource.getEntity().getName()) + .build()); ``` -Following is a complete list of the `-D` parameters that can be passed to the integration test: +The above example is more complicated: -| Parameter | Description | Required/Optional | -| --------- | ----------- | ----------------- | -| ccng.target | target Cloud Foundry endpoint (e.g. https://api.run.pivotal.io) | required | -| ccng.email | Cloud Foundry username | required | -| ccng.passwd | Cloud Foundry password | required | -| ccng.org | Cloud Foundry organization to run tests against | required | -| ccng.space | Cloud Foundry space to run tests against | required | -| ccng.ssl | trust self-signed certificates from target endpoint | optional, default is `false` | -| vcap.mysql.label | label of a MySQL service that can be created | optional, default is `cleardb` | -| vcap.mysql.plan | plan of a MySQL service that can be created | optional, default is `spark` | -| http.proxyHost | host name of an HTTP proxy | optional | -| http.proxyPort | port of an HTTP proxy | optional | +1. `.list(...)` – Retrieves the first page of Cloud Foundry organizations. +1. `.flatMapIterable(...)` – Substitutes the original `Mono` with a `Flux` of the `Resource`s returned by the requested page. +1. `.map(...)` – Maps the `Resource` to an `OrganizationSummary` type. -**Important** +## Troubleshooting -Integration tests should be run against an empty Cloud Foundry space. The integration tests are destructive, -and will delete any apps, services, routes, and domains existing in the target space. +If you are having issues with the cf-java-client in your applications... -# Cloud Foundry Resources +First, [read this article on debugging reactive applications](https://spring.io/blog/2019/03/28/reactor-debugging-experience) and watch this [Spring Tips Video](https://spring.io/blog/2019/05/29/spring-tips-debugging-reactor-applications) also on debugging reactive apps. -_Cloud Foundry Open Source Platform as a Service_ +Beyond that, it is helpful to capture the following information: -## Learn +1. The version of cf-java-client you are using +2. If you are using Spring Boot & if so, the version +3. A description of the problem behavior. +4. A list of things, if any, you have recently changed in your project (even if seemingly unrelated) +5. If you are getting failures with an operation or client request, capture the request and response information. + - You may capture basic request and response information by setting the log level for `cloudfoundry-client` to `DEBUG`. For example with Spring Boot, set `logging.level.cloudfoundry-client=debug`. + - You may perform a wire capture by setting the log level for `cloudfoundry-client.wire` to `TRACE`. For example with Spring Boot, set `logging.level.cloudfoundry-client.wire=trace`. -Our documentation, currently a work in progress, is available here: [http://cloudfoundry.github.com/](http://cloudfoundry.github.com/) +If you open a Github issue with a request for help, please include as much of the information above as possible and do not forget to sanitize any request/response data posted. -## Ask Questions +## Development +The project depends on Java 8. To build from source and install to your local Maven cache, run the following: -Questions about the Cloud Foundry Open Source Project can be directed to our Google Groups. - -* Cloud Foundry Developers: [https://groups.google.com/a/cloudfoundry.org/group/vcap-dev/topics](https://groups.google.com/a/cloudfoundry.org/group/vcap-dev/topics) -* BOSH Developers: [https://groups.google.com/a/cloudfoundry.org/group/bosh-dev/topics](https://groups.google.com/a/cloudfoundry.org/group/bosh-dev/topics) -* BOSH Users:[https://groups.google.com/a/cloudfoundry.org/group/bosh-users/topics](https://groups.google.com/a/cloudfoundry.org/group/bosh-users/topics) +```shell +$ git submodule update --init --recursive +$ ./mvnw clean install +``` -## File a bug +It also depends on [Immutables][i] and won't compile in IDEs like Eclipse or IntelliJ unless you also have an enabled annotation processor. See [this guide][j] for instructions on how to configure your IDE. -Bugs can be filed using Github Issues within the various repositories of the [Cloud Foundry](http://github.com/cloudfoundry) components. +To run the integration tests, run the following: -## OSS Contributions +```shell +$ ./mvnw -Pintegration-test clean test +``` -The Cloud Foundry team uses GitHub and accepts contributions via [pull request](https://help.github.com/articles/using-pull-requests) +To run a specific integration test, run the following replacing with `-Dtest=org.cloudfoundry.TestClass#test-method` (`#test-method` is optional): -Follow these steps to make a contribution to any of our open source repositories: +```shell +./mvnw -Pintegration-test clean test -Dtest=org.cloudfoundry.client.v3.ServiceBrokersTest#update +``` -1. Complete our CLA Agreement for [individuals](http://www.cloudfoundry.org/individualcontribution.pdf) or [corporations](http://www.cloudfoundry.org/corpcontribution.pdf) -2. Set your name and email +To run tests & enable HTTP trace output, execute: +```shell +CLIENT_LOGGING_LEVEL=trace ./mvnw -Pintegration-test clean test ``` -$ git config --global user.name "Firstname Lastname" -$ git config --global user.email "your_email@youremail.com" -``` - -3. Fork the repo -4. Make your changes on a topic branch, commit, and push to github and open a pull request. -Once your commits are approved by Travis CI and reviewed by the core team, they will be merged. +**IMPORTANT** +Integration tests require admin access and should be run against an empty Cloud Foundry instance. The integration tests are destructive, affecting nearly everything on an instance given the chance. + +The integration tests require a running instance of Cloud Foundry to test against. To configure the integration tests with the appropriate connection information use the following environment variables: + +Name | Description +---- | ----------- +`TEST_ADMIN_CLIENTID` | Client ID for a client with permissions for a Client Credentials grant +`TEST_ADMIN_CLIENTSECRET` | Client secret for a client with permissions for a Client Credentials grant +`TEST_ADMIN_PASSWORD` | Password for a user with admin permissions +`TEST_ADMIN_USERNAME` | Username for a user with admin permissions +`TEST_APIHOST` | The host of a Cloud Foundry instance. Typically something like `api.local.pcfdev.io`. +`TEST_PROXY_HOST` | _(Optional)_ The host of a proxy to route all requests through +`TEST_PROXY_PASSWORD` | _(Optional)_ The password for a proxy to route all requests through +`TEST_PROXY_PORT` | _(Optional)_ The port of a proxy to route all requests through. Defaults to `8080`. +`TEST_PROXY_USERNAME` | _(Optional)_ The username for a proxy to route all requests through +`TEST_SKIPSSLVALIDATION` | _(Optional)_ Whether to skip SSL validation when connecting to the Cloud Foundry instance. Defaults to `false`. +`UAA_API_REQUEST_LIMIT` | _(Optional)_ If your UAA server does rate limiting and returns 429 errors, set this variable to the smallest limit configured there. Whether your server limits UAA calls is shown in the log, together with the location of the configuration file on the server. Defaults to `0` (no limit). + +If you do not have access to a CloudFoundry instance with admin access, you can run one locally using [bosh-deployment](https://github.com/cloudfoundry/bosh-deployment) & [cf-deployment](https://github.com/cloudfoundry/cf-deployment/) and Virtualbox. + +For instructions installing Bosh in VirtualBox using `bosh-deployment`, see the [Install Section to install Bosh](https://bosh.io/docs/bosh-lite/). + +With Bosh installed, follow the [deployment guide to get CF installed](https://github.com/cloudfoundry/cf-deployment/blob/main/texts/deployment-guide.md). You can skip to step 4, since you're installing into VirtualBox. Be sure to read the entire document before you begin, however pay specific attention to [this section which has specific instructions for running locally](https://github.com/cloudfoundry/cf-deployment/blob/main/texts/deployment-guide.md#for-operators-deploying-cf-to-local-bosh-lite). + +Lastly before running the tests, it is strongly recommended that you take a snapshot of the VMs in the environment. This allows for the quick rollback of the environment should the tests break something (they don't generally, integration tests should clean up after themselves). + +## Contributing +[Pull requests][u] and [Issues][e] are welcome. + +## License +This project is released under version 2.0 of the [Apache License][l]. + +[a]: https://apidocs.cloudfoundry.org/ +[c]: https://github.com/cloudfoundry/cli +[e]: https://github.com/cloudfoundry/java-client/issues +[g]: https://gradle.org +[h]: https://projectreactor.io/docs/netty/milestone/reference/index.html#http-client +[i]: https://immutables.github.io/ +[j]: https://immutables.github.io/apt.html +[l]: https://www.apache.org/licenses/LICENSE-2.0 +[m]: https://maven.apache.org +[p]: https://projectreactor.io +[r]: http://reactivex.io +[u]: https://help.github.com/articles/using-pull-requests diff --git a/bin/install-protoc.sh b/bin/install-protoc.sh deleted file mode 100755 index a9281506974..00000000000 --- a/bin/install-protoc.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh -sudo apt-get -y install build-essential -wget https://protobuf.googlecode.com/files/protobuf-2.5.0.tar.gz -tar xvfz protobuf-2.5.0.tar.gz -cd protobuf-2.5.0 -./configure --prefix=/usr -make -sudo make install -cd .. -rm protobuf-2.5.0.tar.gz -rm -rf protobuf-2.5.0 diff --git a/cf-java-client-test-apps/.gitignore b/cf-java-client-test-apps/.gitignore deleted file mode 100644 index df657be4ce5..00000000000 --- a/cf-java-client-test-apps/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.iml diff --git a/cf-java-client-test-apps/non-ascii-file-name/.gitignore b/cf-java-client-test-apps/non-ascii-file-name/.gitignore deleted file mode 100644 index df657be4ce5..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.iml diff --git a/cf-java-client-test-apps/non-ascii-file-name/pom.xml b/cf-java-client-test-apps/non-ascii-file-name/pom.xml deleted file mode 100644 index b9522bb4fd2..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - 4.0.0 - org.cloudfoundry.test - non-ascii-file-name - non-ascii-file-name - war - 0.1.0.BUILD-SNAPSHOT - - 1.7 - 3.2.2.RELEASE - 1.6.9 - 1.5.10 - - - - - org.springframework - spring-context - ${org.springframework-version} - - - - commons-logging - commons-logging - - - - - org.springframework - spring-webmvc - ${org.springframework-version} - - - - - org.aspectj - aspectjrt - ${org.aspectj-version} - - - - - org.slf4j - slf4j-api - ${org.slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${org.slf4j-version} - runtime - - - org.slf4j - slf4j-log4j12 - ${org.slf4j-version} - runtime - - - log4j - log4j - 1.2.15 - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - - - - - javax.inject - javax.inject - 1 - - - - - javax.servlet - servlet-api - 2.5 - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - - - - - junit - junit - 4.7 - test - - - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - ${java-version} - ${java-version} - -Xlint:all - true - true - - - - org.apache.maven.plugins - maven-war-plugin - - non-ascii-file-name - - - - - diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/java/com/springdeveloper/test/HomeController.java b/cf-java-client-test-apps/non-ascii-file-name/src/main/java/com/springdeveloper/test/HomeController.java deleted file mode 100644 index 64f453ea8e7..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/java/com/springdeveloper/test/HomeController.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.springdeveloper.test; - -import java.nio.charset.Charset; -import java.text.DateFormat; -import java.util.Date; -import java.util.Locale; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; - -/** - * Handles requests for the application home page. - */ -@Controller -public class HomeController { - - private static final Logger logger = LoggerFactory.getLogger(HomeController.class); - - private MessageBean messageBean; - - @Autowired - public void setMessageBean(MessageBean messageBean) { - this.messageBean = messageBean; - } - - /** - * Simply selects the home view to render by returning its name. - */ - @RequestMapping(value = "/", method = RequestMethod.GET) - public String home(Locale locale, Model model) { - logger.info("Welcome home! the client locale is "+ locale.toString() + " and default encoding is: " + Charset.defaultCharset()); - - Date date = new Date(); - DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); - - String formattedDate = dateFormat.format(date); - - model.addAttribute("serverTime", formattedDate ); - model.addAttribute("message", messageBean.getMessage() ); - - return "home"; - } - -} diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/java/com/springdeveloper/test/MessageBean.java b/cf-java-client-test-apps/non-ascii-file-name/src/main/java/com/springdeveloper/test/MessageBean.java deleted file mode 100644 index 00ebfebf6cf..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/java/com/springdeveloper/test/MessageBean.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.springdeveloper.test; - -public class MessageBean { - - private String message = "[not set]"; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - -} diff --git "a/cf-java-client-test-apps/non-ascii-file-name/src/main/resources/fa\314\212nig.properties" "b/cf-java-client-test-apps/non-ascii-file-name/src/main/resources/fa\314\212nig.properties" deleted file mode 100644 index e45f7654e2c..00000000000 --- "a/cf-java-client-test-apps/non-ascii-file-name/src/main/resources/fa\314\212nig.properties" +++ /dev/null @@ -1 +0,0 @@ -message=Hej från Sverige! \ No newline at end of file diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/resources/log4j.xml b/cf-java-client-test-apps/non-ascii-file-name/src/main/resources/log4j.xml deleted file mode 100644 index e2b7275907f..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml deleted file mode 100644 index 3fd7b28dee9..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/spring/root-context.xml b/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/spring/root-context.xml deleted file mode 100644 index d36fb87c36d..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/spring/root-context.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/views/home.jsp b/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/views/home.jsp deleted file mode 100644 index e30d435246b..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/views/home.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ page session="false" %> - - - Home - - -

Hello world!

- -

The time on the server is ${serverTime} and the message is: ${message}.

- - - diff --git a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/web.xml b/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 5abd82f11a4..00000000000 --- a/cf-java-client-test-apps/non-ascii-file-name/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - contextConfigLocation - /WEB-INF/spring/root-context.xml - - - - - org.springframework.web.context.ContextLoaderListener - - - - - appServlet - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - /WEB-INF/spring/appServlet/servlet-context.xml - - 1 - - - - appServlet - / - - - diff --git a/cf-java-client-test-apps/pom.xml b/cf-java-client-test-apps/pom.xml deleted file mode 100644 index 02003f9f46f..00000000000 --- a/cf-java-client-test-apps/pom.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - 4.0.0 - org.cloudfoundry - cf-java-client-test-apps - pom - Cloud Foundry Java Client test applications - 0.1.0-BUILD-SNAPSHOT - - - non-ascii-file-name - simple-spring-app - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - - diff --git a/cf-java-client-test-apps/simple-spring-app/.gitignore b/cf-java-client-test-apps/simple-spring-app/.gitignore deleted file mode 100644 index df657be4ce5..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.iml diff --git a/cf-java-client-test-apps/simple-spring-app/README.txt b/cf-java-client-test-apps/simple-spring-app/README.txt deleted file mode 100644 index 693be60d01c..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/README.txt +++ /dev/null @@ -1,4 +0,0 @@ -This app is a simple Spring based test app without andy database access. - -The app has a feature where you can force the app to crash on startup to test app crashes. -Set an env variable test=true to enable this and the app will fail with an out-of-memory error. diff --git a/cf-java-client-test-apps/simple-spring-app/pom.xml b/cf-java-client-test-apps/simple-spring-app/pom.xml deleted file mode 100644 index 18e54a48a73..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/pom.xml +++ /dev/null @@ -1,150 +0,0 @@ - - - 4.0.0 - org.cloudfoundry.test - simple-spring-app - simple-spring-app - war - 0.1.0.BUILD-SNAPSHOT - - 1.6 - 3.2.2.RELEASE - 1.6.9 - 1.5.10 - - - - - org.springframework - spring-context - ${org.springframework-version} - - - - commons-logging - commons-logging - - - - - org.springframework - spring-webmvc - ${org.springframework-version} - - - - - org.aspectj - aspectjrt - ${org.aspectj-version} - - - - - org.slf4j - slf4j-api - ${org.slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${org.slf4j-version} - runtime - - - org.slf4j - slf4j-log4j12 - ${org.slf4j-version} - runtime - - - log4j - log4j - 1.2.15 - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - - - - - javax.inject - javax.inject - 1 - - - - - javax.servlet - servlet-api - 2.5 - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - - - - - junit - junit - 4.7 - test - - - - - repository.springframework.maven.milestone - Spring Framework Maven Milestone Repository - http://maven.springframework.org/milestone - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - ${java-version} - ${java-version} - -Xlint:all - true - true - - - - org.apache.maven.plugins - maven-war-plugin - - simple-spring-app - - - - - diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/CrashBean.java b/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/CrashBean.java deleted file mode 100644 index 461dcf6b5f1..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/CrashBean.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.springdeveloper.test; - -import java.util.HashMap; -import java.util.UUID; - -public class CrashBean { - - private HashMap bloat = new HashMap(); - - public CrashBean() { - String crash = System.getenv("crash"); - if ("true".equals(crash)) { - while (true) { - bloat.put(UUID.randomUUID(), new byte[999999999]); - } - } - } -} diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/HomeController.java b/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/HomeController.java deleted file mode 100644 index 64ea3b9f699..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/HomeController.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.springdeveloper.test; - -import java.nio.charset.Charset; -import java.text.DateFormat; -import java.util.Date; -import java.util.Locale; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Controller; -import org.springframework.ui.Model; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RequestMethod; - -/** - * Handles requests for the application home page. - */ -@Controller -public class HomeController { - - private static final Logger logger = LoggerFactory.getLogger(HomeController.class); - - private MessageBean messageBean; - - @Autowired - public void setMessageBean(MessageBean messageBean) { - this.messageBean = messageBean; - } - - /** - * Simply selects the home view to render by returning its name. - */ - @RequestMapping(value = "/", method = RequestMethod.GET) - public String home(Locale locale, Model model) { - logger.info("Welcome home! the client locale is "+ locale.toString() + " and default encoding is: " + Charset.defaultCharset()); - - Date date = new Date(); - DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.LONG, locale); - - String formattedDate = dateFormat.format(date); - - model.addAttribute("serverTime", formattedDate ); - model.addAttribute("message", messageBean.getMessage()); - - return "home"; - } - -} diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/MessageBean.java b/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/MessageBean.java deleted file mode 100644 index 00ebfebf6cf..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/java/com/springdeveloper/test/MessageBean.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.springdeveloper.test; - -public class MessageBean { - - private String message = "[not set]"; - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - -} diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/resources/log4j.xml b/cf-java-client-test-apps/simple-spring-app/src/main/resources/log4j.xml deleted file mode 100644 index e2b7275907f..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/resources/log4j.xml +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/resources/test.properties b/cf-java-client-test-apps/simple-spring-app/src/main/resources/test.properties deleted file mode 100644 index 1eff194d63f..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/resources/test.properties +++ /dev/null @@ -1 +0,0 @@ -message=Hello Spring! \ No newline at end of file diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml b/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml deleted file mode 100644 index 3fd7b28dee9..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/spring/appServlet/servlet-context.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/spring/root-context.xml b/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/spring/root-context.xml deleted file mode 100644 index 7c99cd3b0f3..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/spring/root-context.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/views/home.jsp b/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/views/home.jsp deleted file mode 100644 index e30d435246b..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/views/home.jsp +++ /dev/null @@ -1,13 +0,0 @@ -<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %> -<%@ page session="false" %> - - - Home - - -

Hello world!

- -

The time on the server is ${serverTime} and the message is: ${message}.

- - - diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/web.xml b/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 5abd82f11a4..00000000000 --- a/cf-java-client-test-apps/simple-spring-app/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - contextConfigLocation - /WEB-INF/spring/root-context.xml - - - - - org.springframework.web.context.ContextLoaderListener - - - - - appServlet - org.springframework.web.servlet.DispatcherServlet - - contextConfigLocation - /WEB-INF/spring/appServlet/servlet-context.xml - - 1 - - - - appServlet - / - - - diff --git a/ci/Dockerfile b/ci/Dockerfile new file mode 100644 index 00000000000..8c8b0689925 --- /dev/null +++ b/ci/Dockerfile @@ -0,0 +1,18 @@ +ARG base_image=openjdk:8-jre +ARG script_image=springio/concourse-release-scripts:0.3.4 + +FROM ${script_image} + +FROM ${base_image} + +COPY --from=0 /concourse-release-scripts.jar /opt/ + +RUN apt-get update && apt-get install --no-install-recommends -y \ + ca-certificates \ + curl \ + jq \ + gnupg \ + && rm -rf /var/lib/apt/lists/* + +RUN curl -fL https://getcli.jfrog.io | sh && \ + mv jfrog /usr/local/bin/ diff --git a/ci/claim-environment.sh b/ci/claim-environment.sh new file mode 100755 index 00000000000..7315345453b --- /dev/null +++ b/ci/claim-environment.sh @@ -0,0 +1,87 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")"/../..) + +if [[ -d "${ROOT}"/om ]]; then + printf "âžœ Expanding om\n" + tar xzf "${ROOT}"/om/om-linux-*.tar.gz -C "${ROOT}"/om + export PATH="${ROOT}"/om:${PATH} +fi + +printf "Claiming environment from %s\n" "${POOL}" + +CLAIM=$(curl \ + --fail \ + --location \ + --show-error \ + --silent \ + --header 'Accept: application/json' \ + --request "POST" \ + "https://environments.toolsmiths.cf-app.com/pooled_gcp_engineering_environments/claim?api_token=${API_TOKEN}&pool_name=${POOL}¬es=Claimed%20by%20Java%20Buildpack%20CI") + +printf "Claimed %s\n" "$(jq -n -r --argjson claim "${CLAIM}" '$claim.name')" + +CREDENTIALS=$(om \ + --target "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.url')" \ + --username "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.username')" \ + --password "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.password')" \ + credentials \ + --product-name cf \ + --credential-reference .uaa.admin_credentials \ + --format json) + + jq \ + -n -r \ + --argjson claim "${CLAIM}" \ + --argjson credentials "${CREDENTIALS}" \ + '{ name: $claim.name, username: $credentials.identity, password: $credentials.password }' \ + > "${ROOT}"/environment/cf-creds.json + + +CREDENTIALS=$(om \ + --target "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.url')" \ + --username "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.username')" \ + --password "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.password')" \ + credentials \ + --product-name cf \ + --credential-reference .uaa.admin_client_credentials \ + --format json) + + jq \ + -n -r \ + --argjson claim "${CLAIM}" \ + --argjson credentials "${CREDENTIALS}" \ + '{ client: $credentials.identity, secret: $credentials.password }' \ + > "${ROOT}"/environment/uaa-creds.json + +printf "Patching for TCP Routing Support\n" + +om \ + --target "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.url')" \ + --username "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.username')" \ + --password "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.password')" \ + staged-config \ + --product-name cf > /tmp/cf.yml + +TCP_ROUTES_LB="$(jq -n -r --argjson claim "${CLAIM}" '$claim.tcp_router_pool')" + +om \ + --target "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.url')" \ + --username "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.username')" \ + --password "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.password')" \ + configure-product \ + --config /tmp/cf.yml \ + --ops-file cf-java-client/ci/tcp-routes.yml \ + --var TCP_ROUTES_LB="tcp:${TCP_ROUTES_LB}" \ + --var DEFAULT_QUOTA_MEM_MB=${DEFAULT_QUOTA_MEM_MB} + +om \ + --target "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.url')" \ + --username "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.username')" \ + --password "$(jq -n -r --argjson claim "${CLAIM}" '$claim.ops_manager.password')" \ + apply-changes \ + -n cf + +printf "Environment updated with TCP Routes\n" diff --git a/ci/create-release.sh b/ci/create-release.sh new file mode 100755 index 00000000000..3597667f4c9 --- /dev/null +++ b/ci/create-release.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +set -euo pipefail + +RELEASE=$1 +SNAPSHOT=$2 + +./mvnw versions:set -DnewVersion=$RELEASE -DgenerateBackupPoms=false +git add . +git commit --message "v$RELEASE Release" +git tag -s v$RELEASE -m "v$RELEASE" + +git reset --hard HEAD^1 +./mvnw versions:set -DnewVersion=$SNAPSHOT -DgenerateBackupPoms=false +git add . +git commit --message "v$SNAPSHOT Development" diff --git a/ci/deploy.sh b/ci/deploy.sh new file mode 100755 index 00000000000..285d4a24296 --- /dev/null +++ b/ci/deploy.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash + +set -euox pipefail + +[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2 + +function clean_gpg { + FINGERPRINT=$(gpg --list-keys | head -4 | tail -1 | tr -d ' ') + gpg --batch --yes --delete-secret-keys "$FINGERPRINT" + gpg --batch --yes --delete-keys "$FINGERPRINT" +} + +trap clean_gpg EXIT +gpg --batch --import-options import-show --import <(echo "$MAVEN_GPG_PRIVATE_KEY") + +mkdir -p ~/.m2 +cat < ~/.m2/settings.xml + + + + gpg.passphrase + ${MAVEN_GPG_PASSPHRASE} + + + +EOF + +cd cf-java-client +./mvnw -Dmaven.test.skip=true -DcreateChecksum=true deploy diff --git a/ci/integration-test.sh b/ci/integration-test.sh new file mode 100755 index 00000000000..0d56185de56 --- /dev/null +++ b/ci/integration-test.sh @@ -0,0 +1,38 @@ +#!/usr/bin/env bash + +set -euo pipefail + +# update & install jq +apt-get update && apt-get -y install jq + +[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2 + +ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")"/../..) + +if [[ -d "${ROOT}"/om ]]; then + printf "âžœ Expanding om\n" + tar xzf "${ROOT}"/om/om-linux-*.tar.gz -C "${ROOT}"/om + export PATH="${ROOT}"/om:${PATH} +fi + +CF_CREDS=$(cat "${ROOT}"/environment/cf-creds.json) + +TEST_APIHOST=$(jq -n -r --argjson credentials "${CF_CREDS}" '$credentials.api_url') +export TEST_APIHOST + +TEST_ADMIN_USERNAME=$(jq -n -r --argjson credentials "${CF_CREDS}" '$credentials.username') +export TEST_ADMIN_USERNAME + +TEST_ADMIN_PASSWORD=$(jq -n -r --argjson credentials "${CF_CREDS}" '$credentials.password') +export TEST_ADMIN_PASSWORD + +UAA_CREDS=$(cat "${ROOT}"/environment/uaa-creds.json) + +TEST_ADMIN_CLIENTID=$(jq -n -r --argjson credentials "${UAA_CREDS}" '$credentials.client') +export TEST_ADMIN_CLIENTID + +TEST_ADMIN_CLIENTSECRET=$(jq -n -r --argjson credentials "${UAA_CREDS}" '$credentials.secret') +export TEST_ADMIN_CLIENTSECRET + +cd cf-java-client +./mvnw -P integration-test test diff --git a/ci/promote-to-maven-central.sh b/ci/promote-to-maven-central.sh new file mode 100755 index 00000000000..9ed1a9515b0 --- /dev/null +++ b/ci/promote-to-maven-central.sh @@ -0,0 +1,9 @@ +#!/usr/bin/env bash + +set -euo pipefail + +export BUILD_INFO_LOCATION=$(pwd)/artifactory-repo/build-info.json + +java -jar /opt/concourse-release-scripts.jar publishToCentral 'RELEASE' "$BUILD_INFO_LOCATION" artifactory-repo + +echo "Sync complete" diff --git a/ci/tcp-routes.yml b/ci/tcp-routes.yml new file mode 100644 index 00000000000..306d30ce691 --- /dev/null +++ b/ci/tcp-routes.yml @@ -0,0 +1,27 @@ +--- +- type: replace + path: /product-properties/.properties.tcp_routing + value: + selected_option: enable + value: enable +- type: replace + path: /product-properties/.properties.tcp_routing.enable.request_timeout_in_seconds? + value: + value: 300 +- type: replace + path: /product-properties/.properties.tcp_routing.enable.reservable_ports? + value: + value: 1024-1123 +- type: replace + path: /resource-config/tcp_router/elb_names/- + value: "((TCP_ROUTES_LB))" +- type: replace + path: /resource-config/tcp_router/instances + value: automatic +- type: replace + path: /resource-config/compute/instances + value: 2 +- type: replace + path: /product-properties/.cloud_controller.default_quota_memory_limit_mb + value: + value: ((DEFAULT_QUOTA_MEM_MB)) diff --git a/ci/unclaim-environment.sh b/ci/unclaim-environment.sh new file mode 100755 index 00000000000..9427782dbad --- /dev/null +++ b/ci/unclaim-environment.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail + +ROOT=$(realpath "$(dirname "${BASH_SOURCE[0]}")"/../..) + +CREDENTIALS=$(cat "${ROOT}"/environment/cf-creds.json) + +printf "Unclaiming %s\n" "$(jq -n -r --argjson credentials "${CREDENTIALS}" '$credentials.name')" + +curl \ + --fail \ + --location \ + --show-error \ + --silent \ + --request "POST" \ + "https://environments.toolsmiths.cf-app.com/pooled_gcp_engineering_environments/unclaim?api_token=${API_TOKEN}&name=$(jq -n -r --argjson credentials "${CREDENTIALS}" '$credentials.name')" diff --git a/ci/unit-test.sh b/ci/unit-test.sh new file mode 100755 index 00000000000..18b4bf174a2 --- /dev/null +++ b/ci/unit-test.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -euo pipefail + +[[ -d $PWD/maven && ! -d $HOME/.m2 ]] && ln -s $PWD/maven $HOME/.m2 + +cd cf-java-client +./mvnw -q package diff --git a/cloudfoundry-caldecott-lib/.gitignore b/cloudfoundry-caldecott-lib/.gitignore deleted file mode 100644 index a7329653b01..00000000000 --- a/cloudfoundry-caldecott-lib/.gitignore +++ /dev/null @@ -1,4 +0,0 @@ -/out/ -/caldecott.log* -/target/ -/*.iml diff --git a/cloudfoundry-caldecott-lib/README b/cloudfoundry-caldecott-lib/README deleted file mode 100644 index 606435d5b65..00000000000 --- a/cloudfoundry-caldecott-lib/README +++ /dev/null @@ -1,13 +0,0 @@ -Java client for Caldecott - -This library is intended to be used from a Java application when tunneling into Cloud Foundry data services using the server side Caldecott application. It is similar to the tunnel feature of the command line client vmc. Once the tunnel is started you can connect with a local data client application using the appropriate connection parameters. This library provides functionality to run as a server for a specific Cloud Foundry data service. This server will listen for local connections on a specific port to provide tunneling via the server side Caldecott application. - -There is a Java class (JavaTunnel.java) under the src/test directory that starts up a tunnel server and will prompt for connection information needed. It offers equivalent functionality as 'vmc tunnel'. Currently such usage is intended for testing purpose. This JavaTunnel.java class also shows how to setup and start a tunnel so it can be used as a guide when building your own client code. - -How to run this Java tunnel program: - -You can use the 'tunnel.sh' shell script that uses the mvn exec target. You can provide the email to log in with using a system variable called vcap.email (example: -Dvcap.email=me@mycompany.com). Optionally override the VCAP target using vcap.target with a specific cloud url to run against a local cloud (example: -Dvcap.target=http://api.vcap.me). - -To build and run using Maven simply use: - mvn clean install - mvn --quiet exec:java -Dexec.mainClass="org.cloudfoundry.caldecott.JavaTunnel" -Dexec.classpathScope="test" diff --git a/cloudfoundry-caldecott-lib/pom.xml b/cloudfoundry-caldecott-lib/pom.xml deleted file mode 100644 index f1f8f32c486..00000000000 --- a/cloudfoundry-caldecott-lib/pom.xml +++ /dev/null @@ -1,204 +0,0 @@ - - - 4.0.0 - org.cloudfoundry - cloudfoundry-caldecott-lib - 0.1.4.BUILD-SNAPSHOT - jar - Client library to be used for Caldecott access - - - - Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0 - repo - - - - - 3.0.7.RELEASE - 0.8.5 - 4.8.2 - 1.8.5 - - - - - fast - - true - - - - - - - org.springframework - spring-web - ${spring.framework.version} - - - org.cloudfoundry - cloudfoundry-client-lib - ${cf.client.lib.version} - - - org.codehaus.jackson - jackson-core-asl - 1.6.2 - - - org.codehaus.jackson - jackson-mapper-asl - 1.6.2 - - - - junit - junit - ${junit.version} - test - - - org.mockito - mockito-all - ${mockito.version} - test - - - org.springframework - spring-test - ${spring.framework.version} - test - - - log4j - log4j - 1.2.14 - - - commons-io - commons-io - 2.1 - - - - - - org.springframework.milestone - Spring Framework Milestone Repository - http://maven.springframework.org/milestone - - false - - - - - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.0.0.RELEASE - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.8 - - - - **/*Test.java - - - **/Abstract*.java - - - - - maven-antrun-plugin - 1.7 - - - generate-resources - - - - - - - run - - - - - - - - - - org.eclipse.m2e - lifecycle-mapping - 1.0.0 - - - - - - org.apache.maven.plugins - maven-antrun-plugin - [1.7,) - - run - - - - - - - - - - - - - - - - - spring-milestone - Spring Milestone Repository - s3://maven.springframework.org/milestone - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - - diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/TunnelException.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/TunnelException.java deleted file mode 100644 index a826c555e4f..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/TunnelException.java +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott; - -/** - * Exception thrown as the result of an error condition during tunnel communications. - * - * @author Thomas Risberg - */ -public class TunnelException extends RuntimeException { - - public TunnelException(String message) { - super(message); - } - - public TunnelException(String message, Throwable throwable) { - super(message, throwable); - } -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/Client.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/Client.java deleted file mode 100644 index 718cbc8b54b..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/Client.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import java.io.IOException; - -/** - * The interface defining the client SPI. - * - * @author Thomas Risberg - */ -public interface Client { - - byte[] read() throws IOException; - - void write(byte[] data) throws IOException; - - void forceClose(); - - boolean isOpen(); - - boolean isIdle(); -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/HttpTunnel.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/HttpTunnel.java deleted file mode 100644 index 4aa1574880e..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/HttpTunnel.java +++ /dev/null @@ -1,223 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.ResponseEntity; -import org.springframework.http.client.ClientHttpRequest; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RequestCallback; -import org.springframework.web.client.ResponseExtractor; -import org.springframework.web.client.RestOperations; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.HashMap; -import java.util.Map; - -/** - * The Http implementation of a Tunnel designed to interact with the Caldecott server REST application. - * - * @author Thomas Risberg - */ -public class HttpTunnel implements Tunnel { - - protected final Log logger = LogFactory.getLog(getClass()); - - // configuration options for the tunnel - private String url; - private String host; - private int port; - private String auth; - - // REST template to use for tunnel communication - private final RestOperations restOperations; - - // variables to keep track of communication state with the tunnel web service - private Map tunnelInfo; - private long lastWrite = 0; - private long lastRead = 0; - - public HttpTunnel(String url, String host, int port, String auth, RestOperations restOperations) { - this.url = url; - this.host = host; - this.port = port; - this.auth = auth; - this.restOperations = restOperations; - openTunnel(); - } - - public void write(byte[] data) { - sendBytes(data, ++lastWrite); - } - - public byte[] read(boolean retry) { - if (!retry) { - lastRead++; - } - return receiveBytes(lastRead); - } - - private void openTunnel() { - String initMsg = "{\"host\":\"" + host + "\",\"port\":" + port + "}"; - if (logger.isDebugEnabled()) { - logger.debug("Initializing tunnel: " + initMsg); - } - HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Auth-Token", auth); - requestHeaders.set("Content-Length", initMsg.length()+""); - HttpEntity requestEntity = new HttpEntity(initMsg, requestHeaders); - String jsonResponse; - try { - jsonResponse = restOperations.postForObject(url + "/tunnels", requestEntity, String.class); - } catch (RuntimeException e) { - logger.error("Fatal error while opening tunnel: " + e.getMessage()); - close(); - throw e; - } - try { - this.tunnelInfo = TunnelHelper.convertJsonToMap(jsonResponse); - } catch (IOException ignore) { - this.tunnelInfo = new HashMap(); - } - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - public void close() { - if (logger.isDebugEnabled()) { - logger.debug("Deleting tunnel " + this.tunnelInfo.get("path")); - } - HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Auth-Token", auth); - HttpEntity requestEntity = new HttpEntity(requestHeaders); - try { - restOperations.exchange(url + this.tunnelInfo.get("path"), HttpMethod.DELETE, requestEntity, null); - } catch (HttpClientErrorException e) { - if (e.getStatusCode().value() == 404) { - if (logger.isDebugEnabled()) { - logger.debug("Tunnel not found [" + e.getStatusCode() + "] " + e.getStatusText()); - } - } - else { - logger.warn("Error while deleting tunnel [" + e.getStatusCode() + "] " + e.getStatusText()); - } - } - } - - private void sendBytes(byte[] bytes, long page) { - HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Auth-Token", auth); - requestHeaders.set("Content-Length", bytes.length+""); - String dataUrl = url + this.tunnelInfo.get("path_in") + "/" + page; - HttpEntity requestEntity = new HttpEntity(bytes, requestHeaders); - if (logger.isTraceEnabled()) { - logger.trace("SENDING: " + printBytes(bytes)); - } - ResponseEntity response = restOperations.exchange(dataUrl, HttpMethod.PUT, requestEntity, null); - if (logger.isDebugEnabled()) { - logger.debug("[" + bytes.length + " bytes] PUT to " + dataUrl +" resulted in: " + response.getStatusCode()); - } - } - - private byte[] receiveBytes(long page) { - byte[] response = receiveDataBuffered(page); - if (logger.isTraceEnabled()) { - logger.trace("RECEIVED: " + printBytes(response)); - } - return response; - } - - private byte[] receiveDataBuffered(long page) { - final String dataUrl = url + this.tunnelInfo.get("path_out") + "/" + page; - byte[] responseBytes; - try { - responseBytes = restOperations.execute( - dataUrl, - HttpMethod.GET, - new RequestCallback() { - public void doWithRequest(ClientHttpRequest clientHttpRequest) throws IOException { - clientHttpRequest.getHeaders().set("Auth-Token", auth); - } - }, - new ResponseExtractor() { - public byte[] extractData(ClientHttpResponse clientHttpResponse) throws IOException { - if (logger.isDebugEnabled()) { - logger.debug("HEADER: " + clientHttpResponse.getHeaders().toString()); - } - InputStream stream = clientHttpResponse.getBody(); - byte[] data = readContentData(stream); - if (logger.isDebugEnabled()) { - logger.debug("[" + data.length + " bytes] GET from " + dataUrl + " resulted in: " + clientHttpResponse.getStatusCode()); - } - return data; - } - } - ); - } catch (HttpStatusCodeException e) { - if (logger.isDebugEnabled()) { - logger.debug("GET from " + dataUrl + " resulted in: " + e.getStatusCode().value()); - } - throw e; - } - return responseBytes; - } - - @Override - public String toString() { - return "HttpTunnel for " + url + " on " + host + ":" + port; - } - - private byte[] readContentData(InputStream stream) throws IOException { - ByteArrayOutputStream data = new ByteArrayOutputStream(); - while (true) { - byte[] buffer = new byte[1024]; - int len = stream.read(buffer); - if (len < 0) { - break; - } - data.write(buffer, 0, len); - } - return data.toByteArray(); - } - - private static String printBytes(byte[] array) { - StringBuilder printable = new StringBuilder(); - printable.append("[").append(array.length).append("] = ").append("0x"); - for (byte aByte : array) { - printable.append(byteToHex(aByte)); - } - return printable.toString(); - } - - private static String byteToHex(byte b) { - // Returns hex String representation of byte b - char hexDigit[] = { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' - }; - char[] array = {hexDigit[(b >> 4) & 0x0f], hexDigit[b & 0x0f]}; - return new String(array); - } - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/HttpTunnelFactory.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/HttpTunnelFactory.java deleted file mode 100644 index 91d56d2d799..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/HttpTunnelFactory.java +++ /dev/null @@ -1,86 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.client.lib.HttpProxyConfiguration; -import org.springframework.http.client.CommonsClientHttpRequestFactory; -import org.springframework.web.client.RestOperations; -import org.springframework.web.client.RestTemplate; - -/** - * The factory class used to create an HttpTunnel instance. - * - * @author Thomas Risberg - */ -public class HttpTunnelFactory implements TunnelFactory { - - private static final int TIMEOUT = 20000; - - protected final Log logger = LogFactory.getLog(getClass()); - - private final String url; - private final String host; - private final int port; - private final String auth; - private RestOperations restOperations; - private HttpProxyConfiguration httpProxyConfiguration; - - public HttpTunnelFactory(String url, String host, int port, String auth) { - this.url = url; - this.host = host; - this.port = port; - this.auth = auth; - } - - public HttpTunnelFactory(String url, String host, int port, String auth, HttpProxyConfiguration httpProxyConfiguration) { - this(url, host, port, auth); - this.httpProxyConfiguration = httpProxyConfiguration; - } - - public HttpTunnelFactory(String url, String host, int port, String auth, RestOperations restOperations) { - this(url, host, port, auth); - this.restOperations = restOperations; - } - - public Tunnel createTunnel() { - if (logger.isDebugEnabled()) { - logger.debug("Creating HttpTunnel for " + url + " on " + host + ":" + port); - } - if (restOperations!= null) { - return new HttpTunnel(url, host, port, auth, restOperations); - } - else { - return new HttpTunnel(url, host, port, auth, createRestTemplate()); - } - } - - private RestTemplate createRestTemplate() { - RestTemplate restTemplate = new RestTemplate(); - CommonsClientHttpRequestFactory requestFactory = new CommonsClientHttpRequestFactory(); - requestFactory.setConnectTimeout(TIMEOUT); - requestFactory.setReadTimeout(TIMEOUT); - if (httpProxyConfiguration != null) { - requestFactory.getHttpClient().getHostConfiguration().setProxy(httpProxyConfiguration.getProxyHost(), - httpProxyConfiguration.getProxyPort()); - } - restTemplate.setRequestFactory(requestFactory); - return restTemplate; - } - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/SocketClient.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/SocketClient.java deleted file mode 100644 index 2fe926244d9..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/SocketClient.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.caldecott.TunnelException; - -import java.io.IOException; -import java.io.OutputStream; -import java.net.Socket; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.util.Arrays; - -/** - * The Socket implementation of a Client designed to interact with data access clients. - * - * @author Thomas Risberg - */ -public class SocketClient implements Client { - - private static final int SOCKET_TIMEOUT = 30000; - - private static final int BUFFER_SIZE = 1024 * 1024; - - protected final Log logger = LogFactory.getLog(getClass()); - - // configuration options for the socket - private final Socket socket; - - // variables to keep track of communication state with the client - // these are volatile since they will we checked by other threads - // and open could be altered by another thread via forceCLose() - private volatile boolean open = true; - private volatile boolean idle = false; - - - public SocketClient(Socket socket) { - this.socket = socket; - try { - this.socket.setSoTimeout(SOCKET_TIMEOUT); - } catch (SocketException e) { - throw new TunnelException("Unable to set timeout on socket " + e.getMessage()); - } - } - - public byte[] read() throws IOException { - if (!open) { - return null; - } - byte[] bytes = new byte[BUFFER_SIZE]; - int len; - try { - len = socket.getInputStream().read(bytes); - idle = false; - } - catch (SocketTimeoutException e) { - len = 0; - if (logger.isTraceEnabled()) { - logger.trace("Timeout on read " + e); - } - idle = true; - } - if (len < 0) { - if (len < 0) { - if (logger.isDebugEnabled()) { - logger.debug("[" + len + "] detected closed stream"); - } - open = false; - } - len = 0; - } - else { - if (logger.isTraceEnabled() && len > 0) { - logger.trace("[" + len + " bytes] read from stream"); - } - } - return Arrays.copyOfRange(bytes, 0, len); - } - - public void write(byte[] data) throws IOException { - if (!open) { - return; - } - idle = false; - OutputStream s = socket.getOutputStream(); - s.write(data); - s.flush(); - if (logger.isTraceEnabled()) { - logger.trace("[" + data.length + " bytes] written to stream"); - } - } - - public boolean isOpen() { - return open; - } - - public boolean isIdle() { - return idle; - } - - public void forceClose() { - logger.debug("Force close requested for " + this); - open = false; - } - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/Tunnel.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/Tunnel.java deleted file mode 100644 index 91638474e19..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/Tunnel.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -/** - * The interface defining the tunnel SPI. - * - * @author Thomas Risberg - */ -public interface Tunnel { - - void write(byte[] data); - - byte[] read(boolean retry); - - public void close(); - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelAcceptor.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelAcceptor.java deleted file mode 100644 index a95f5654147..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelAcceptor.java +++ /dev/null @@ -1,123 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.caldecott.TunnelException; -import org.springframework.core.task.TaskExecutor; - -import java.io.IOException; -import java.net.ServerSocket; -import java.net.Socket; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.util.Observable; -import java.util.Observer; -import java.util.concurrent.ConcurrentHashMap; - -/** - * The class responsible for listening for client connection attempts and handing off to - * a TunnelHandler for handling the actual tunneling communications. - * - * @author Thomas Risberg - */ -public class TunnelAcceptor implements Runnable { - - public static final int SOCKET_TIMEOUT = 10000; - - protected final Log logger = LogFactory.getLog(getClass()); - - // configuration options - private final TunnelFactory tunnelFactory; - private final ServerSocket serverSocket; - private final TaskExecutor taskExecutor; - - // variable to keep acceptor active - // this is volatile since it can we altered by another thread via stop() - private volatile boolean keepGoing = true; - - // concurrent map to keep track of handlers, will be modified from handler threads - private ConcurrentHashMap handlers = new ConcurrentHashMap(); - - public TunnelAcceptor(ServerSocket serverSocket, TunnelFactory tunnelFactory, TaskExecutor taskExecutor) { - this.serverSocket = serverSocket; - this.tunnelFactory = tunnelFactory; - this.taskExecutor = taskExecutor; - try { - this.serverSocket.setSoTimeout(SOCKET_TIMEOUT); - } catch (SocketException ignore) {} - } - - public void start() { - logger.info("Starting new acceptor thread: " + this); - taskExecutor.execute(this); - logger.debug("Completed start of: " + taskExecutor); - } - - public boolean isActive() { - return handlers.size() > 0; - } - - public void stop() { - logger.info("Stop requested for: " + this); - keepGoing = false; - } - - public void run() { - while (keepGoing) { - try { - logger.trace("Waiting for client connection"); - Socket sourceSocket = serverSocket.accept(); - logger.debug("Accepted client connection"); - TunnelHandler handler = new TunnelHandler(sourceSocket, tunnelFactory, taskExecutor); - handler.addObserver(new Observer() { - public void update(Observable observable, Object o) { - if (logger.isDebugEnabled()) { - logger.debug("Notified that " + observable + " is now " + o); - } - handlers.remove(observable); - } - }); - handlers.put(handler, true); - handler.start(); - } - catch (SocketTimeoutException ste) {} - catch (IOException e) { - if (!keepGoing && serverSocket.isClosed()) { - // time to quit so we can ignore this exception - } - else { - throw new TunnelException("Error while accepting connections", e); - } - } - } - if (!handlers.isEmpty()) { - while (!handlers.isEmpty()) { - logger.debug("Waiting for " + handlers.size() + " client connections to close"); - for (TunnelHandler handler : handlers.keySet()) { - logger.debug("Poking " + handler); - handler.poke(); - } - try { - Thread.sleep(10000); - } catch (InterruptedException ignore) {} - } - } - logger.info("Completed acceptor thread for: " + this); - } -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelFactory.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelFactory.java deleted file mode 100644 index 617646c285d..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelFactory.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -/** - * The interface defining the TunnelFactory SPI. - * - * @author Thomas Risberg - */ -public interface TunnelFactory { - - Tunnel createTunnel(); - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelHandler.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelHandler.java deleted file mode 100644 index 19f0351cfb6..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelHandler.java +++ /dev/null @@ -1,230 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.caldecott.TunnelException; -import org.springframework.core.task.TaskExecutor; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.ResourceAccessException; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.net.SocketException; -import java.net.SocketTimeoutException; -import java.util.Observable; - -/** - * The class responsible for handling the actual tunneling communications between a data access client and the - * Caldecott server app. - * - * @author Thomas Risberg - */ -public class TunnelHandler extends Observable { - - protected final Log logger = LogFactory.getLog(getClass()); - - // configuration options - private final Socket socket; - private final TunnelFactory tunnelFactory; - private final TaskExecutor taskExecutor; - - // variables to keep state for the tunnel setup - private Client client; - private Tunnel tunnel; - - // variable to keep handler active - // this is volatile since it can we altered by another thread via poke() - private volatile boolean shutdown = false; - - - public TunnelHandler(Socket socket, TunnelFactory tunnelFactory, TaskExecutor taskExecutor) { - this.socket = socket; - this.tunnelFactory = tunnelFactory; - this.taskExecutor = taskExecutor; - try { - this.socket.setSoTimeout(0); - } catch (SocketException ignore) {} - } - - public void start() { - client = new SocketClient(socket); - tunnel = tunnelFactory.createTunnel(); - taskExecutor.execute(new Writer()); - taskExecutor.execute(new Reader()); - if (logger.isDebugEnabled()) { - logger.debug("Completed start of: " + this.getClass().getSimpleName() + " with " + countObservers() + " observers"); - } - } - - public void poke() { - if (client.isIdle()) { - shutdown = true; - } - } - - public void stop() { - try { - InputStream is = socket.getInputStream(); - if (is != null) { - is.close(); - } - } catch (IOException ignore) {} - try { - OutputStream os = socket.getOutputStream(); - if (os != null) { - os.close(); - } - } catch (IOException ignore) {} - if (logger.isDebugEnabled()) { - logger.debug("Closing tunnel: " + tunnel.toString()); - } - tunnel.close(); - if (logger.isDebugEnabled()) { - logger.debug("Notifying observers: " + countObservers()); - } - setChanged(); - notifyObservers("CLOSED"); - } - - - private class Writer implements Runnable { - - public void run() { - if (logger.isDebugEnabled()) { - logger.debug("Starting new writer thread: " + this); - } - try { - while (client.isOpen()) { - byte[] in = client.read(); - if (in.length > 0) { - tunnel.write(in); - } - if (shutdown && client.isIdle()) { - if (logger.isDebugEnabled()) { - logger.debug("Shutdown requested and idle connection thread will be closed: " + this); - } - client.forceClose(); - stop(); - } - } - } catch (SocketTimeoutException e) { - if (logger.isTraceEnabled()) { - logger.trace("Retrying tunnel write after receiving " + e.getClass().getName() + ": " + e.getMessage()); - } - } catch (ResourceAccessException e) { - Throwable t = e.getCause(); - if (t != null && t instanceof SocketTimeoutException) { - if (logger.isTraceEnabled()) { - logger.trace("Retrying tunnel write after receiving " + e.getClass().getName() + ": " + e.getMessage()); - } - } else { - logger.error("Caught exception: " + e.getClass().getName() + ": " + e.getMessage()); - logger.error("Closing tunnel " + this); - stop(); - throw e; - } - } catch (Exception e) { - logger.error("Caught exception: " + e.getClass().getName() + ": " + e.getMessage()); - logger.error("Closing tunnel " + this); - stop(); - throw new TunnelException("Fatal exception during tunnel write", e); - } - if (!shutdown) { - stop(); - } - if (logger.isDebugEnabled()) { - logger.debug("Completed writer thread for: " + this); - } - } - - } - - private class Reader implements Runnable { - public void run() { - if (logger.isDebugEnabled()) { - logger.debug("Starting new reader thread: " + this); - } - boolean retry = false; - try { - while (client.isOpen()) { - try { - byte[] out = tunnel.read(retry); - retry = false; - client.write(out); - } catch (HttpStatusCodeException hsce) { - if (hsce.getStatusCode().value() == 504 || hsce.getStatusCode().value() == 502) { - retry = true; - if (logger.isTraceEnabled()) { - logger.trace("Retrying tunnel read after receiving " + hsce.getStatusCode().value()); - } - } - else if (hsce.getStatusCode().value() == 404) { - retry = false; - if (logger.isDebugEnabled()) { - logger.debug("Tunnel error - [" + hsce.getStatusCode().value() + "] " + hsce.getStatusText()); - } - } - else if (hsce.getStatusCode().value() == 410) { - retry = false; - if (logger.isDebugEnabled()) { - logger.debug("Tunnel error - [" + hsce.getStatusCode().value() + "] " + hsce.getStatusText()); - } - } - else { - logger.warn("Received HTTP Error: [" + hsce.getStatusCode().value() + "] " + hsce.getStatusText()); - throw new TunnelException("Error while reading from tunnel", hsce); - } - } catch (SocketTimeoutException e) { - retry = true; - if (logger.isTraceEnabled()) { - logger.trace("Retrying tunnel read after receiving " + e.getClass().getName() + ": " + e.getMessage()); - } - } catch (ResourceAccessException e) { - Throwable t = e.getCause(); - if (t != null && t instanceof SocketTimeoutException) { - retry = true; - if (logger.isTraceEnabled()) { - logger.trace("Retrying tunnel read after receiving " + e.getClass().getName() + ": " + e.getMessage()); - } - } else { - logger.error("Caught exception: " + e.getClass().getName() + ": " + e.getMessage()); - logger.error("Closing tunnel " + this); - stop(); - throw e; - } - } catch (RuntimeException e) { - logger.error("Caught exception: " + e.getClass().getName() + ": " + e.getMessage()); - logger.error("Closing tunnel " + this); - stop(); - throw e; - } - } - } catch (IOException ioe) { - throw new TunnelException("Error while processing streams", ioe); - } - if (logger.isDebugEnabled()) { - logger.debug("Completed reader thread for: " + this); - } - } - - } - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelHelper.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelHelper.java deleted file mode 100644 index af421b8c355..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelHelper.java +++ /dev/null @@ -1,240 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.cloudfoundry.caldecott.TunnelException; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.domain.Staging; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.map.type.TypeFactory; -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.ResourceAccessException; -import org.springframework.web.client.RestTemplate; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashMap; -import java.util.Map; -import java.util.Random; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; - -/** - * A utility class for accessing information regarding tunnels and data services. - * - * @author Thomas Risberg - */ -public class TunnelHelper { - - private static final String TUNNEL_APP_NAME = "caldecott"; - private static final String[] TUNNEL_URI_SCHEMES = {"https:", "http:"}; - private static final String TUNNEL_AUTH_KEY = "CALDECOTT_AUTH"; - private static final Map TUNNEL_URI_CACHE = new ConcurrentHashMap(); - - private static final RestTemplate restTemplate = new RestTemplate(); - - private static ObjectMapper objectMapper = new ObjectMapper(); - - private TunnelHelper() { - throw new AssertionError("Helper class should not be instantiated."); - } - - public static String getTunnelAppName() { - return TUNNEL_APP_NAME; - } - - public static CloudApplication getTunnelAppInfo(CloudFoundryClient client) { - return client.getApplication(TunnelHelper.getTunnelAppName()); - } - - public static void deployTunnelApp(CloudFoundryClient client) { - ClassPathResource cpr = new ClassPathResource("caldecott_helper.zip"); - try { - File temp = copyCaldecottZipFile(cpr); - client.createApplication(TUNNEL_APP_NAME, new Staging("ruby19", "sinatra"), 64, - Arrays.asList(getRandomUrl(client, TUNNEL_APP_NAME)), - Arrays.asList(new String[] {}), false); - client.uploadApplication(TUNNEL_APP_NAME, temp); - client.updateApplicationEnv(TUNNEL_APP_NAME, - Collections.singletonMap("CALDECOTT_AUTH", UUID.randomUUID().toString())); - client.startApplication(TUNNEL_APP_NAME); - temp.delete(); - } catch (IOException e) { - throw new TunnelException("Unable to deploy the Caldecott server application", e); - } - } - - public static void bindServiceToTunnelApp(CloudFoundryClient client, String serviceName) { - if (getTunnelAppInfo(client).getServices().contains(serviceName)) { - return; - } - client.stopApplication(getTunnelAppName()); - client.bindService(getTunnelAppName(), serviceName); - client.startApplication(getTunnelAppName()); - } - - public static String getTunnelUri(CloudFoundryClient client) { - String uriAuthority = client.getApplication(TunnelHelper.getTunnelAppName()).getUris().get(0); - if (TUNNEL_URI_CACHE.containsKey(uriAuthority)) { - return TUNNEL_URI_CACHE.get(uriAuthority); - } - String uriScheme = testUriSchemes(client, TUNNEL_URI_SCHEMES, uriAuthority); - String uri = uriScheme + "//" + uriAuthority; - TUNNEL_URI_CACHE.put(uriAuthority, uri); - return uri; - } - - public static String getTunnelAuth(CloudFoundryClient client) { - String auth = client.getApplication(TunnelHelper.getTunnelAppName()).getEnvAsMap().get(TUNNEL_AUTH_KEY); - return auth; - } - - public static Map getTunnelServiceInfo(CloudFoundryClient client, String serviceName) { - String urlToUse = getTunnelUri(client) + "/services/" + serviceName; - HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Auth-Token", getTunnelAuth(client)); - HttpEntity requestEntity = new HttpEntity(requestHeaders); - HttpEntity response = restTemplate.exchange(urlToUse, HttpMethod.GET, requestEntity, String.class); - String json = response.getBody().trim(); - Map svcInfo = new HashMap(); - try { - svcInfo = convertJsonToMap(json); - } catch (IOException e) { - return new HashMap(); - } - if (svcInfo.containsKey("url")) { - String svcUrl = svcInfo.get("url"); - try { - URI uri = new URI(svcUrl); - String[] userInfo; - if (uri.getUserInfo().contains(":")) { - userInfo = uri.getUserInfo().split(":"); - } - else { - userInfo = new String[2]; - userInfo[0] = uri.getUserInfo(); - userInfo[1] = ""; - } - svcInfo.put("user", userInfo[0]); - svcInfo.put("username", userInfo[0]); - svcInfo.put("password", userInfo[1]); - svcInfo.put("host", uri.getHost()); - svcInfo.put("hostname", uri.getHost()); - svcInfo.put("port", ""+uri.getPort()); - svcInfo.put("path", (uri.getPath().startsWith("/") ? uri.getPath().substring(1): uri.getPath())); - svcInfo.put("vhost", svcInfo.get("path")); - } catch (URISyntaxException e) {} - } - return svcInfo; - } - - private static String testUriSchemes(CloudFoundryClient client, String[] uriSchemes, String uriAuthority) { - int i = 0; - int retries = 0; - String scheme = null; - while (i < uriSchemes.length) { - scheme = uriSchemes[i]; - String uriToUse = scheme + "//" + uriAuthority; - try { - getTunnelProtocolVersion(client, uriToUse); - break; - } catch (HttpClientErrorException e) { - if (e.getStatusCode().equals(HttpStatus.NOT_FOUND)) { - if (retries < 10) { - retries++; - } else { - throw new TunnelException("Not able to locate tunnel server at: " + uriToUse, e); - } - } else { - throw new TunnelException("Error accessing tunnel server at: " + uriToUse, e); - } - } catch (ResourceAccessException e) { - if (e.getMessage().contains("refused") || e.getMessage().contains("unable")) { - i++; - } - else { - throw e; - } - } catch (RuntimeException e) { - throw e; - } - } - return scheme; - } - - private static File copyCaldecottZipFile(ClassPathResource cpr) throws IOException { - File temp = File.createTempFile("caldecott", "zip"); - InputStream in = cpr.getInputStream(); - OutputStream out = new FileOutputStream(temp); - int read = 0; - byte[] bytes = new byte[1024]; - while ((read = in.read(bytes)) != -1) { - out.write(bytes, 0, read); - } - in.close(); - out.flush(); - out.close(); - return temp; - } - - public static String getRandomUrl(CloudFoundryClient client, String appname) { - int range = 0x01000000; - int r = new Random().nextInt(range - 1); - StringBuilder url = new StringBuilder(); - url.append(appname); - url.append("-"); - url.append(Integer.toHexString((r))); - String domain = client.getCloudControllerUrl().getHost(); - if (domain.startsWith("api.")) { - domain = domain.substring(3); - } - else { - url.append("-"); - } - url.append(domain); - return url.toString(); - } - - public static String getTunnelProtocolVersion(CloudFoundryClient client, String uri) { - String uriToUse = uri + "/info"; - HttpHeaders requestHeaders = new HttpHeaders(); - requestHeaders.set("Auth-Token", getTunnelAuth(client)); - HttpEntity requestEntity = new HttpEntity(requestHeaders); - HttpEntity response = restTemplate.exchange(uriToUse, HttpMethod.GET, requestEntity, String.class); - return response.getBody().trim(); - } - - public static Map convertJsonToMap(String json) throws IOException { - Map svcInfo = - objectMapper.readValue(json, TypeFactory.mapType(HashMap.class, String.class, String.class)); - return svcInfo; - } - -} diff --git a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelServer.java b/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelServer.java deleted file mode 100644 index 3a8e078ce16..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/java/org/cloudfoundry/caldecott/client/TunnelServer.java +++ /dev/null @@ -1,125 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.caldecott.TunnelException; -import org.springframework.core.task.TaskExecutor; -import org.springframework.scheduling.concurrent.ExecutorConfigurationSupport; -import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; - -import java.io.IOException; -import java.net.InetSocketAddress; -import java.net.ServerSocket; - -/** - * A class responsible for starting and stopping the TunnelAcceptor based on the configuration options. - * - * @author Thomas Risberg - */ -public class TunnelServer { - - protected final Log logger = LogFactory.getLog(getClass()); - - // configuration options - private final InetSocketAddress local; - private final TunnelFactory tunnelFactory; - private final TaskExecutor taskExecutor; - - // variables to keep state for server - private final ServerSocket serverSocket; - private TunnelAcceptor acceptor; - - public TunnelServer(InetSocketAddress local, TunnelFactory tunnelFactory) { - this(local, tunnelFactory, getDefaultThreadExecutor()); - } - - public TunnelServer(InetSocketAddress local, TunnelFactory tunnelFactory, TaskExecutor taskExecutor) { - this.local = local; - this.tunnelFactory = tunnelFactory; - this.taskExecutor = taskExecutor; - try { - this.serverSocket = new ServerSocket(); - serverSocket.setReuseAddress(true); - serverSocket.bind(local); - } catch (IOException e) { - throw new TunnelException("Error configuring server socket", e); - } - } - - public void start() { - logger.info("Starting server on " + local); - initializeTaskExecutor(taskExecutor); - synchronized (this) { - if (acceptor == null) { - this.acceptor = new TunnelAcceptor(serverSocket, tunnelFactory, taskExecutor); - acceptor.start(); - } - else { - throw new TunnelException("Server already running."); - } - } - } - - public void stop() { - logger.info("Stopping server on " + local); - synchronized (this) { - shutdownTaskExecutor(taskExecutor); - if (acceptor != null) { - acceptor.stop(); - if (acceptor.isActive()) { - logger.info("Server is actively servicing connections, waiting for client to close"); - while (acceptor.isActive()) { - try { - Thread.sleep(1000); - } catch (InterruptedException ignore) {} - } - } - try { - serverSocket.close(); - } catch (IOException e) { - logger.warn("Error while closing server socket" + e.getMessage()); - } - logger.info("Server on " + local + " is now stopped"); - } - else { - throw new TunnelException("Server is not running."); - } - } - } - - protected static void initializeTaskExecutor(TaskExecutor taskExecutor) { - if (taskExecutor instanceof ExecutorConfigurationSupport) { - ((ExecutorConfigurationSupport)taskExecutor).initialize(); - } - } - - protected static void shutdownTaskExecutor(TaskExecutor taskExecutor) { - if (taskExecutor instanceof ExecutorConfigurationSupport) { - ((ExecutorConfigurationSupport)taskExecutor).shutdown(); - } - } - - protected static TaskExecutor getDefaultThreadExecutor() { - ThreadPoolTaskExecutor te = new ThreadPoolTaskExecutor(); - te.setCorePoolSize(5); - te.setMaxPoolSize(10); - te.setQueueCapacity(100); - return te; - } -} diff --git a/cloudfoundry-caldecott-lib/src/main/resources/.gitignore b/cloudfoundry-caldecott-lib/src/main/resources/.gitignore deleted file mode 100644 index 20cb71e0ed3..00000000000 --- a/cloudfoundry-caldecott-lib/src/main/resources/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/*.zip diff --git a/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/JavaTunnel.java b/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/JavaTunnel.java deleted file mode 100644 index 364a99d0e6c..00000000000 --- a/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/JavaTunnel.java +++ /dev/null @@ -1,209 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott; - -import org.cloudfoundry.caldecott.client.HttpTunnelFactory; -import org.cloudfoundry.caldecott.client.TunnelHelper; -import org.cloudfoundry.caldecott.client.TunnelServer; -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudSpace; - -import java.io.Console; -import java.net.InetSocketAddress; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.List; -import java.util.Map; - -/** - * A class used for testing tunnels. Starts a tunnel server based on provided connection parameters. - * - * @author Thomas Risberg - */ -public class JavaTunnel { - - private static final String CC_URL = System.getProperty("vcap.target", "https://api.cloudfoundry.com"); - private static String vcap_email = System.getProperty("vcap.email"); - private static String vcap_passwd = System.getProperty("vcap.passwd"); - private static String vcap_service = System.getProperty("vcap.service"); - private static String vcap_org = System.getProperty("vcap.org"); - private static String vcap_space = System.getProperty("vcap.space"); - public static final int LOCAL_PORT = 10000; - public static final String LOCAL_HOST = "localhost"; - - public static void main(String[] args) { - - Console console = System.console(); - //read user name, using java.util.Formatter syntax : - if (vcap_email == null) { - vcap_email = console.readLine("Login E-Mail? "); - } - //read the password, without echoing the output - if (vcap_passwd == null) { - vcap_passwd = new String(console.readPassword("Password? ")); - } - - CloudFoundryClient client = clientInit(); - - String version = client.getCloudInfo().getVersion(); - if (Float.valueOf(version) >= 2.0) { - //read org, using java.util.Formatter syntax : - if (vcap_org == null) { - vcap_org = console.readLine("Org to use? "); - } - //read space, using java.util.Formatter syntax : - if (vcap_space == null) { - vcap_space = console.readLine("Space to use? "); - } - - client = clientOrgSpace(client); - } - - CloudApplication serverApp = null; - try { - serverApp = client.getApplication(TunnelHelper.getTunnelAppName()); - } - catch (CloudFoundryException e) {} - if (serverApp == null) { - System.out.println("Deploying Caldecott server app"); - TunnelHelper.deployTunnelApp(client); - } - try { - serverApp = client.getApplication(TunnelHelper.getTunnelAppName()); - } - catch (CloudFoundryException e) { - System.err.println("Unable to deploy Caldecott server app: " + e.getMessage()); - throw e; - } - if (!serverApp.getState().equals(CloudApplication.AppState.STARTED)) { - System.out.println("Starting Caldecott server app"); - client.startApplication(serverApp.getName()); - } - - while (vcap_service == null) { - System.out.println("You have the following services defined:"); - List services = client.getServices(); - int i = 0; - for (CloudService svc : services) { - i++; - System.out.println(i + ": " + svc.getName()); - } - if (i ==0) { - System.err.println("It looks like you don't have any services defined. Please create one first!"); - System.exit(1); - } - String svc = console.readLine("Which Service to connect to (" + 1 + "-" + i +")? "); - int svc_ix = 0; - try { - svc_ix = Integer.parseInt(svc); - } catch (NumberFormatException e) { - System.err.println(svc + " is not a valid choice!"); - continue; - } - if (svc_ix < 1 || svc_ix > i) { - System.err.println(svc + " is not a valid choice!"); - continue; - } - vcap_service = services.get(svc_ix - 1).getName(); - } - System.out.println("Starting tunnel on " + CC_URL + " to service " + vcap_service + " on behalf of " + vcap_email); - - TunnelHelper.bindServiceToTunnelApp(client, vcap_service); - - InetSocketAddress local = new InetSocketAddress(LOCAL_HOST, LOCAL_PORT); - String url = TunnelHelper.getTunnelUri(client); - Map info = TunnelHelper.getTunnelServiceInfo(client, vcap_service); - String host = info.get("hostname"); - int port = Integer.valueOf(info.get("port")); - String auth = TunnelHelper.getTunnelAuth(client); - - String svc_username = info.get("username"); - String svc_passwd = info.get("password"); - String svc_dbname = info.get("db") != null ? info.get("db") : info.get("name"); - String txt_dbname = info.get("db") != null ? "db" : "name"; - String svc_vhost = info.get("vhost"); - - TunnelServer server = new TunnelServer(local, new HttpTunnelFactory(url, host, port, auth)); - - server.start(); - - System.out.println("Tunnel is running on " + LOCAL_HOST +" port " + LOCAL_PORT + " with auth=" + auth); - if (svc_vhost != null) { - System.out.println("Connect client with username=" + svc_username +" password=" + svc_passwd + " " + "vhost=" + svc_vhost); - } - else { - System.out.println("Connect client with username=" + svc_username +" password=" + svc_passwd + " " + txt_dbname + "=" + svc_dbname); - } - while (true) { - if (console != null) { - String command = console.readLine("Enter exit to stop: "); - if (command.toLowerCase().equals("exit")) { - break; - } - } - try { - Thread.sleep(1000L); - } catch (InterruptedException e) {} - } - server.stop(); - - finalize(client); - System.out.println("DONE!"); - } - - public static CloudFoundryClient clientInit() { - CloudFoundryClient client = null; - try { - client = new CloudFoundryClient(new CloudCredentials(vcap_email, vcap_passwd), new URL(CC_URL)); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - client.login(); - return client; - } - - public static CloudFoundryClient clientOrgSpace(CloudFoundryClient client) { - List spaces = client.getSpaces(); - CloudSpace useSpace = null; - for (CloudSpace space : spaces) { - if (space.getOrganization().getName().equals(vcap_org) && space.getName().equals(vcap_space)) { - useSpace = space; - break; - } - } - if (useSpace == null) { - System.err.println("The specified org '" + vcap_org + "' and space '" + vcap_space + "' not found!"); - System.exit(1); - } - CloudFoundryClient spaceClient = null; - try { - client = new CloudFoundryClient(new CloudCredentials(vcap_email, vcap_passwd), new URL(CC_URL), useSpace); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - client.login(); - return client; - } - - public static void finalize(CloudFoundryClient client) { - client.logout(); - } -} diff --git a/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/client/HttpTunnelTest.java b/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/client/HttpTunnelTest.java deleted file mode 100644 index 00280f9db0c..00000000000 --- a/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/client/HttpTunnelTest.java +++ /dev/null @@ -1,114 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import static org.junit.Assert.assertEquals; -import static org.mockito.Matchers.isA; -import static org.mockito.Matchers.isNull; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpMethod; -import org.springframework.http.ResponseEntity; -import org.springframework.web.client.RequestCallback; -import org.springframework.web.client.ResponseExtractor; -import org.springframework.web.client.RestTemplate; - -/** - * Mock tests for the HttpTunnel - * - * @author Thomas Risberg - */ -public class HttpTunnelTest { - - HttpTunnel httpTunnel; - - HttpTunnelFactory httpTunnelFactory; - - @Mock - RestTemplate restTemplate; - - @Mock - ResponseEntity response; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - httpTunnelFactory = new HttpTunnelFactory("http://api.vcap.me", "localhost", 10000, "test", restTemplate); - } - - @Test - @SuppressWarnings("unchecked") - public void testOpenTunnel() { - openTunnel(); - verify(restTemplate).postForObject(isA(String.class), isA(HttpEntity.class), isA(Class.class)); - } - - @Test - @SuppressWarnings("unchecked") - public void testClosingTunnel() { - openTunnel(); - httpTunnel.close(); - verify(restTemplate).exchange(isA(String.class), isA(HttpMethod.class), isA(HttpEntity.class), (Class)isNull()); - } - - @Test - @SuppressWarnings("unchecked") - public void testWritingSomeBytes() { - final byte[] data = "This is some data to write".getBytes(); - openTunnel(); - final byte[][] sent = new byte[1][1]; - when(restTemplate.exchange(isA(String.class), isA(HttpMethod.class), isA(HttpEntity.class), (Class)isNull())) - .thenAnswer(new Answer>() { - public ResponseEntity answer(InvocationOnMock invocation) throws Throwable { - Object[] args = invocation.getArguments(); - HttpEntity arg3 = (HttpEntity) args[2]; - sent[0] = (byte[]) arg3.getBody(); - return response; - } - }); - httpTunnel.write(data); - verify(restTemplate).exchange(isA(String.class), isA(HttpMethod.class), isA(HttpEntity.class), (Class)isNull()); - assertEquals(new String(data), new String(sent[0])); - } - - @Test - @SuppressWarnings("unchecked") - public void testReadingSomeBytes() { - final byte[] data = "This is some data to read".getBytes(); - openTunnel(); - when(restTemplate.execute(isA(String.class), isA(HttpMethod.class), isA(RequestCallback.class), - isA(ResponseExtractor.class))).thenReturn(data); - final byte[] answer = httpTunnel.read(false); - verify(restTemplate).execute(isA(String.class), isA(HttpMethod.class), isA(RequestCallback.class), - isA(ResponseExtractor.class)); - assertEquals(new String(data), new String(answer)); - } - - @SuppressWarnings("unchecked") - private void openTunnel() { - when(restTemplate.postForObject(isA(String.class), isA(HttpEntity.class), isA(Class.class))).thenReturn("{}"); - httpTunnel = (HttpTunnel) httpTunnelFactory.createTunnel(); - } -} diff --git a/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/client/SocketClientTest.java b/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/client/SocketClientTest.java deleted file mode 100644 index 60f3ebde8f2..00000000000 --- a/cloudfoundry-caldecott-lib/src/test/java/org/cloudfoundry/caldecott/client/SocketClientTest.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.caldecott.client; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Matchers.isA; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; - -import org.junit.Before; -import org.junit.Test; -import org.mockito.ArgumentCaptor; -import org.mockito.Mock; -import org.mockito.MockitoAnnotations; -import org.mockito.invocation.InvocationOnMock; -import org.mockito.stubbing.Answer; - -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; - -/** - * Mock tests for the SocketClient - * - * @author Thomas Risberg - */ -public class SocketClientTest { - - @Mock - Socket socket; - - @Mock - InputStream inputStream; - - @Mock - OutputStream outputStream; - - SocketClient client; - - @Before - public void setup() { - MockitoAnnotations.initMocks(this); - client = new SocketClient(socket); - } - - @Test - public void testReadSomeBytes() throws IOException { - final byte[] data = "This is some data to read".getBytes(); - when(socket.getInputStream()).thenReturn(inputStream); - when(inputStream.read(isA(byte[].class))).thenAnswer( new Answer() { - public Integer answer(InvocationOnMock invocation) throws Throwable { - Object[] args = invocation.getArguments(); - System.arraycopy(data, 0, (byte[]) args[0], 0, data.length); - return data.length; - } - }); - byte[] answer = client.read(); - assertEquals(new String(data), new String(answer)); - assertTrue(client.isOpen()); - when(inputStream.read(isA(byte[].class))).thenReturn(-1); - client.read(); - assertFalse(client.isOpen()); - } - - @Test - public void testWriteSomeBytes() throws IOException { - final byte[] data = "This is some data to write".getBytes(); - final byte[] result; - when(socket.getOutputStream()).thenReturn(outputStream); - ArgumentCaptor captor = ArgumentCaptor.forClass(byte[].class); - client.write(data); - verify(outputStream).write(captor.capture()); - assertEquals(new String(data), new String(captor.getValue())); - verify(outputStream).flush(); - } - -} diff --git a/cloudfoundry-caldecott-lib/src/test/resources/log4j.xml b/cloudfoundry-caldecott-lib/src/test/resources/log4j.xml deleted file mode 100644 index 3b5c822e0a5..00000000000 --- a/cloudfoundry-caldecott-lib/src/test/resources/log4j.xml +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cloudfoundry-caldecott-lib/tunnel.sh b/cloudfoundry-caldecott-lib/tunnel.sh deleted file mode 100755 index fa7997949a7..00000000000 --- a/cloudfoundry-caldecott-lib/tunnel.sh +++ /dev/null @@ -1 +0,0 @@ -mvn --quiet -e exec:java -Dexec.mainClass="org.cloudfoundry.caldecott.JavaTunnel" -Dexec.classpathScope="test" $* diff --git a/cloudfoundry-caldecott-test/.gitignore b/cloudfoundry-caldecott-test/.gitignore deleted file mode 100644 index 90d8e770f6d..00000000000 --- a/cloudfoundry-caldecott-test/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -/*.iml -/target/ diff --git a/cloudfoundry-caldecott-test/data/load.json b/cloudfoundry-caldecott-test/data/load.json deleted file mode 100644 index 69433f12951..00000000000 --- a/cloudfoundry-caldecott-test/data/load.json +++ /dev/null @@ -1,1602 +0,0 @@ -{ "records": [ - { "record": - { "_id" : 1, - "name" : "Lucas", - "address" : "9665 Commodo Av.", - "city" : "Truth or Consequences", - "country" : "Bosnia and Herzegovina", - "age" : 11} - }, - { "record": - { "_id" : 2, - "name" : "Shelley", - "address" : "P.O. Box 635, 3581 Nunc Street", - "city" : "Enfield", - "country" : "Turkmenistan", - "age" : 69} - }, - { "record": - { "_id" : 3, - "name" : "Skyler", - "address" : "Ap #645-2695 Nulla Ave", - "city" : "San Gabriel", - "country" : "Tuvalu", - "age" : 56} - }, - { "record": - { "_id" : 4, - "name" : "Portia", - "address" : "1179 Sed St.", - "city" : "Santa Clarita", - "country" : "Japan", - "age" : 96} - }, - { "record": - { "_id" : 5, - "name" : "Palmer", - "address" : "5214 Massa. Av.", - "city" : "Port Arthur", - "country" : "Uzbekistan", - "age" : 85} - }, - { "record": - { "_id" : 6, - "name" : "Taylor", - "address" : "P.O. Box 515, 8741 Sed St.", - "city" : "Asbury Park", - "country" : "Suriname", - "age" : 62} - }, - { "record": - { "_id" : 7, - "name" : "Nelle", - "address" : "429-4356 Sit Av.", - "city" : "Durant", - "country" : "Turks and Caicos Islands", - "age" : 63} - }, - { "record": - { "_id" : 8, - "name" : "Brennan", - "address" : "Ap #984-1800 Convallis Road", - "city" : "Williston", - "country" : "Suriname", - "age" : 3} - }, - { "record": - { "_id" : 9, - "name" : "Jordan", - "address" : "510-5341 Eget Avenue", - "city" : "Manassas Park", - "country" : "New Caledonia", - "age" : 100} - }, - { "record": - { "_id" : 10, - "name" : "Henry", - "address" : "P.O. Box 425, 2861 Lorem Av.", - "city" : "Toledo", - "country" : "Sweden", - "age" : 65} - }, - { "record": - { "_id" : 11, - "name" : "Florence", - "address" : "2300 Nec Rd.", - "city" : "Morrison", - "country" : "Heard Island and Mcdonald Islands", - "age" : 79} - }, - { "record": - { "_id" : 12, - "name" : "Lane", - "address" : "622-2648 Augue Ave", - "city" : "White Plains", - "country" : "Mauritius", - "age" : 60} - }, - { "record": - { "_id" : 13, - "name" : "Illana", - "address" : "P.O. Box 172, 5207 In St.", - "city" : "Portland", - "country" : "Turkmenistan", - "age" : 54} - }, - { "record": - { "_id" : 14, - "name" : "Autumn", - "address" : "8389 Augue Road", - "city" : "Riverside", - "country" : "Antarctica", - "age" : 40} - }, - { "record": - { "_id" : 15, - "name" : "Nicole", - "address" : "P.O. Box 138, 5642 Sed Avenue", - "city" : "Norwich", - "country" : "Slovenia", - "age" : 98} - }, - { "record": - { "_id" : 16, - "name" : "Cyrus", - "address" : "6595 Et Avenue", - "city" : "Harrisburg", - "country" : "Thailand", - "age" : 78} - }, - { "record": - { "_id" : 17, - "name" : "Igor", - "address" : "P.O. Box 884, 8228 Integer Street", - "city" : "Davis", - "country" : "Azerbaijan", - "age" : 25} - }, - { "record": - { "_id" : 18, - "name" : "Cameron", - "address" : "P.O. Box 370, 7095 Sit St.", - "city" : "Kankakee", - "country" : "Fiji", - "age" : 80} - }, - { "record": - { "_id" : 19, - "name" : "Jin", - "address" : "840-6770 Et Rd.", - "city" : "Guánica", - "country" : "Samoa", - "age" : 47} - }, - { "record": - { "_id" : 20, - "name" : "Adrienne", - "address" : "5612 Dictum Road", - "city" : "Florence", - "country" : "Bangladesh", - "age" : 70} - }, - { "record": - { "_id" : 21, - "name" : "Cassady", - "address" : "P.O. Box 230, 824 Morbi Avenue", - "city" : "Cape Coral", - "country" : "Burundi", - "age" : 26} - }, - { "record": - { "_id" : 22, - "name" : "Inez", - "address" : "Ap #684-1929 Turpis Ave", - "city" : "Mission Viejo", - "country" : "Benin", - "age" : 48} - }, - { "record": - { "_id" : 23, - "name" : "Hector", - "address" : "P.O. Box 307, 8478 Tristique Av.", - "city" : "Farrell", - "country" : "Mexico", - "age" : 64} - }, - { "record": - { "_id" : 24, - "name" : "Sharon", - "address" : "Ap #133-6077 Duis Ave", - "city" : "La Verne", - "country" : "Eritrea", - "age" : 75} - }, - { "record": - { "_id" : 25, - "name" : "Kenneth", - "address" : "8388 Egestas, Avenue", - "city" : "Revere", - "country" : "Libyan Arab Jamahiriya", - "age" : 56} - }, - { "record": - { "_id" : 26, - "name" : "Hedy", - "address" : "244-5276 Magna St.", - "city" : "Edmond", - "country" : "Zambia", - "age" : 69} - }, - { "record": - { "_id" : 27, - "name" : "Jolie", - "address" : "P.O. Box 525, 8242 Augue, Avenue", - "city" : "Vincennes", - "country" : "Chile", - "age" : 37} - }, - { "record": - { "_id" : 28, - "name" : "Xandra", - "address" : "P.O. Box 579, 3814 Consectetuer Av.", - "city" : "North Las Vegas", - "country" : "Ireland", - "age" : 18} - }, - { "record": - { "_id" : 29, - "name" : "Jermaine", - "address" : "P.O. Box 612, 3644 Eu, Ave", - "city" : "Christiansted", - "country" : "Azerbaijan", - "age" : 52} - }, - { "record": - { "_id" : 30, - "name" : "Naomi", - "address" : "830-3601 Aenean Rd.", - "city" : "Grambling", - "country" : "Tajikistan", - "age" : 83} - }, - { "record": - { "_id" : 31, - "name" : "Carter", - "address" : "Ap #791-7937 Integer St.", - "city" : "Hastings", - "country" : "Albania", - "age" : 33} - }, - { "record": - { "_id" : 32, - "name" : "Pearl", - "address" : "1317 Et Ave", - "city" : "Vermillion", - "country" : "Morocco", - "age" : 17} - }, - { "record": - { "_id" : 33, - "name" : "Joseph", - "address" : "Ap #524-270 Nunc, Street", - "city" : "Tacoma", - "country" : "Western Sahara", - "age" : 39} - }, - { "record": - { "_id" : 34, - "name" : "Naida", - "address" : "Ap #249-9011 Ligula Ave", - "city" : "Hagerstown", - "country" : "Central African Republic", - "age" : 44} - }, - { "record": - { "_id" : 35, - "name" : "Brock", - "address" : "P.O. Box 360, 5609 Arcu. Av.", - "city" : "Salinas", - "country" : "Argentina", - "age" : 48} - }, - { "record": - { "_id" : 36, - "name" : "Teegan", - "address" : "P.O. Box 514, 365 Et St.", - "city" : "Hollister", - "country" : "American Samoa", - "age" : 50} - }, - { "record": - { "_id" : 37, - "name" : "Hollee", - "address" : "5866 Commodo Rd.", - "city" : "Sedalia", - "country" : "Malawi", - "age" : 15} - }, - { "record": - { "_id" : 38, - "name" : "Zane", - "address" : "P.O. Box 879, 6396 Neque Rd.", - "city" : "Cairo", - "country" : "Palau", - "age" : 78} - }, - { "record": - { "_id" : 39, - "name" : "Hunter", - "address" : "738-4604 Cubilia Rd.", - "city" : "Jackson", - "country" : "Senegal", - "age" : 52} - }, - { "record": - { "_id" : 40, - "name" : "Sydnee", - "address" : "3160 Fringilla Avenue", - "city" : "Fullerton", - "country" : "Seychelles", - "age" : 80} - }, - { "record": - { "_id" : 41, - "name" : "Bradley", - "address" : "Ap #566-6094 Molestie Rd.", - "city" : "Bell Gardens", - "country" : "Angola", - "age" : 77} - }, - { "record": - { "_id" : 42, - "name" : "Vielka", - "address" : "Ap #487-3151 Pede Avenue", - "city" : "South Bend", - "country" : "Wallis and Futuna", - "age" : 77} - }, - { "record": - { "_id" : 43, - "name" : "Kirsten", - "address" : "960-753 Vel St.", - "city" : "Cerritos", - "country" : "Taiwan, Province of China", - "age" : 97} - }, - { "record": - { "_id" : 44, - "name" : "Jakeem", - "address" : "365-1397 Eu, Ave", - "city" : "Stockton", - "country" : "United Kingdom", - "age" : 65} - }, - { "record": - { "_id" : 45, - "name" : "Jena", - "address" : "P.O. Box 952, 3389 Nec Ave", - "city" : "Cape Girardeau", - "country" : "Mauritius", - "age" : 77} - }, - { "record": - { "_id" : 46, - "name" : "Isaac", - "address" : "P.O. Box 965, 1909 Lectus, Ave", - "city" : "Hoboken", - "country" : "France", - "age" : 14} - }, - { "record": - { "_id" : 47, - "name" : "Jael", - "address" : "914-1937 Faucibus St.", - "city" : "Clarksville", - "country" : "Cameroon", - "age" : 49} - }, - { "record": - { "_id" : 48, - "name" : "Evan", - "address" : "5026 Magna. Road", - "city" : "Jeffersontown", - "country" : "New Caledonia", - "age" : 74} - }, - { "record": - { "_id" : 49, - "name" : "Halla", - "address" : "7275 Pharetra Av.", - "city" : "Fremont", - "country" : "Greece", - "age" : 48} - }, - { "record": - { "_id" : 50, - "name" : "Kasimir", - "address" : "6078 Nec Rd.", - "city" : "San Gabriel", - "country" : "Guinea", - "age" : 6} - }, - { "record": - { "_id" : 51, - "name" : "Regina", - "address" : "9629 Elit. Avenue", - "city" : "Brookings", - "country" : "Kiribati", - "age" : 28} - }, - { "record": - { "_id" : 52, - "name" : "Burke", - "address" : "Ap #377-8583 Vulputate, Street", - "city" : "Haverhill", - "country" : "Panama", - "age" : 82} - }, - { "record": - { "_id" : 53, - "name" : "Daryl", - "address" : "Ap #967-235 Eget Rd.", - "city" : "Bentonville", - "country" : "Eritrea", - "age" : 67} - }, - { "record": - { "_id" : 54, - "name" : "Zane", - "address" : "931-2607 Aliquam Rd.", - "city" : "Carson City", - "country" : "Thailand", - "age" : 24} - }, - { "record": - { "_id" : 55, - "name" : "Bertha", - "address" : "219-5800 Enim Ave", - "city" : "Nacogdoches", - "country" : "San Marino", - "age" : 89} - }, - { "record": - { "_id" : 56, - "name" : "Jaime", - "address" : "450-1962 A, Rd.", - "city" : "Scottsdale", - "country" : "United States Minor Outlying Islands", - "age" : 16} - }, - { "record": - { "_id" : 57, - "name" : "Sarah", - "address" : "114-2987 Quisque Road", - "city" : "West Memphis", - "country" : "Guinea-bissau", - "age" : 22} - }, - { "record": - { "_id" : 58, - "name" : "Coby", - "address" : "649-1000 Donec St.", - "city" : "Cary", - "country" : "Western Sahara", - "age" : 23} - }, - { "record": - { "_id" : 59, - "name" : "Nora", - "address" : "Ap #136-1447 Cursus Avenue", - "city" : "Chula Vista", - "country" : "Gabon", - "age" : 53} - }, - { "record": - { "_id" : 60, - "name" : "Ginger", - "address" : "Ap #970-5061 Aenean Rd.", - "city" : "Victoria", - "country" : "Korea, Republic of", - "age" : 52} - }, - { "record": - { "_id" : 61, - "name" : "Conan", - "address" : "671-4014 Est. Av.", - "city" : "Manitowoc", - "country" : "Barbados", - "age" : 1} - }, - { "record": - { "_id" : 62, - "name" : "Madaline", - "address" : "9374 Suscipit Avenue", - "city" : "Modesto", - "country" : "Sudan", - "age" : 54} - }, - { "record": - { "_id" : 63, - "name" : "Lydia", - "address" : "5044 Aliquet Ave", - "city" : "Batavia", - "country" : "Bahamas", - "age" : 98} - }, - { "record": - { "_id" : 64, - "name" : "Lael", - "address" : "548-9912 Tincidunt Rd.", - "city" : "Port Huron", - "country" : "Tuvalu", - "age" : 88} - }, - { "record": - { "_id" : 65, - "name" : "Calista", - "address" : "Ap #673-2865 Malesuada Street", - "city" : "Fontana", - "country" : "Switzerland", - "age" : 27} - }, - { "record": - { "_id" : 66, - "name" : "Cairo", - "address" : "3385 Erat Av.", - "city" : "Knoxville", - "country" : "Vanuatu", - "age" : 4} - }, - { "record": - { "_id" : 67, - "name" : "Harrison", - "address" : "487-6677 Purus. St.", - "city" : "Lansing", - "country" : "Tunisia", - "age" : 16} - }, - { "record": - { "_id" : 68, - "name" : "Yoko", - "address" : "7758 Morbi Av.", - "city" : "Anaheim", - "country" : "Kiribati", - "age" : 5} - }, - { "record": - { "_id" : 69, - "name" : "Nero", - "address" : "9562 Risus. Street", - "city" : "Murray", - "country" : "Burundi", - "age" : 76} - }, - { "record": - { "_id" : 70, - "name" : "Ira", - "address" : "952 Non St.", - "city" : "Buena Park", - "country" : "Ethiopia", - "age" : 55} - }, - { "record": - { "_id" : 71, - "name" : "Colleen", - "address" : "2167 Orci Avenue", - "city" : "Tallahassee", - "country" : "Argentina", - "age" : 19} - }, - { "record": - { "_id" : 72, - "name" : "Rachel", - "address" : "Ap #940-5542 Et St.", - "city" : "Murfreesboro", - "country" : "New Zealand", - "age" : 65} - }, - { "record": - { "_id" : 73, - "name" : "Uma", - "address" : "Ap #800-3604 Sapien. Rd.", - "city" : "West Hartford", - "country" : "Tunisia", - "age" : 44} - }, - { "record": - { "_id" : 74, - "name" : "Shana", - "address" : "P.O. Box 582, 7739 Eget Rd.", - "city" : "Springfield", - "country" : "Luxembourg", - "age" : 66} - }, - { "record": - { "_id" : 75, - "name" : "Ariana", - "address" : "246-6080 Nullam Ave", - "city" : "Gold Beach", - "country" : "Poland", - "age" : 54} - }, - { "record": - { "_id" : 76, - "name" : "Tanek", - "address" : "Ap #303-8079 Nunc St.", - "city" : "Casper", - "country" : "Saint Helena", - "age" : 59} - }, - { "record": - { "_id" : 77, - "name" : "Joseph", - "address" : "5473 Rhoncus. Rd.", - "city" : "Las Cruces", - "country" : "Lesotho", - "age" : 67} - }, - { "record": - { "_id" : 78, - "name" : "Akeem", - "address" : "Ap #920-5907 Aptent Rd.", - "city" : "Valdosta", - "country" : "Myanmar", - "age" : 84} - }, - { "record": - { "_id" : 79, - "name" : "Ava", - "address" : "7480 In, St.", - "city" : "Bell", - "country" : "Bermuda", - "age" : 92} - }, - { "record": - { "_id" : 80, - "name" : "Lucian", - "address" : "754 Cum Ave", - "city" : "Fountain Valley", - "country" : "Dominica", - "age" : 77} - }, - { "record": - { "_id" : 81, - "name" : "Rhiannon", - "address" : "699-9737 Dictum Street", - "city" : "Fort Collins", - "country" : "Uganda", - "age" : 50} - }, - { "record": - { "_id" : 82, - "name" : "Sara", - "address" : "Ap #497-9220 Iaculis, St.", - "city" : "Sheridan", - "country" : "Niue", - "age" : 11} - }, - { "record": - { "_id" : 83, - "name" : "Madeson", - "address" : "Ap #380-7810 Turpis. St.", - "city" : "Augusta", - "country" : "Antigua and Barbuda", - "age" : 53} - }, - { "record": - { "_id" : 84, - "name" : "Bo", - "address" : "1520 Lacinia Ave", - "city" : "West Hartford", - "country" : "Chad", - "age" : 43} - }, - { "record": - { "_id" : 85, - "name" : "Macey", - "address" : "Ap #683-5646 Vitae Ave", - "city" : "Hialeah", - "country" : "Romania", - "age" : 32} - }, - { "record": - { "_id" : 86, - "name" : "Sacha", - "address" : "777-7670 Tristique St.", - "city" : "Stillwater", - "country" : "Tuvalu", - "age" : 49} - }, - { "record": - { "_id" : 87, - "name" : "Chancellor", - "address" : "P.O. Box 308, 6468 Nibh Rd.", - "city" : "Miami Beach", - "country" : "Albania", - "age" : 52} - }, - { "record": - { "_id" : 88, - "name" : "Neville", - "address" : "P.O. Box 620, 8472 Sem Ave", - "city" : "St. Marys", - "country" : "Brazil", - "age" : 50} - }, - { "record": - { "_id" : 89, - "name" : "Ian", - "address" : "Ap #399-8794 Amet, Street", - "city" : "Sturgis", - "country" : "Slovenia", - "age" : 64} - }, - { "record": - { "_id" : 90, - "name" : "Malik", - "address" : "P.O. Box 867, 2644 Curabitur Rd.", - "city" : "Ocean City", - "country" : "Bahamas", - "age" : 49} - }, - { "record": - { "_id" : 91, - "name" : "Elvis", - "address" : "3359 Malesuada Rd.", - "city" : "Kingsport", - "country" : "Lithuania", - "age" : 46} - }, - { "record": - { "_id" : 92, - "name" : "Alice", - "address" : "P.O. Box 860, 7353 Lorem Street", - "city" : "Orange", - "country" : "Bahrain", - "age" : 47} - }, - { "record": - { "_id" : 93, - "name" : "Zephr", - "address" : "5842 Lobortis Street", - "city" : "West Warwick", - "country" : "Kyrgyzstan", - "age" : 14} - }, - { "record": - { "_id" : 94, - "name" : "Avram", - "address" : "Ap #455-8812 Magnis Road", - "city" : "Appleton", - "country" : "Angola", - "age" : 38} - }, - { "record": - { "_id" : 95, - "name" : "Sebastian", - "address" : "828-8603 Rutrum Av.", - "city" : "Philadelphia", - "country" : "Brazil", - "age" : 2} - }, - { "record": - { "_id" : 96, - "name" : "Kermit", - "address" : "Ap #385-6761 Scelerisque Ave", - "city" : "Michigan City", - "country" : "Nigeria", - "age" : 48} - }, - { "record": - { "_id" : 97, - "name" : "Byron", - "address" : "722-2846 Non Avenue", - "city" : "Oro Valley", - "country" : "Ireland", - "age" : 68} - }, - { "record": - { "_id" : 98, - "name" : "Kibo", - "address" : "2997 Porttitor Ave", - "city" : "Auburn Hills", - "country" : "Saint Kitts and Nevis", - "age" : 64} - }, - { "record": - { "_id" : 99, - "name" : "Shelley", - "address" : "6261 Donec Road", - "city" : "Sutter Creek", - "country" : "Sudan", - "age" : 30} - }, - { "record": - { "_id" : 100, - "name" : "Joelle", - "address" : "P.O. Box 818, 4525 Aliquam Avenue", - "city" : "Columbus", - "country" : "India", - "age" : 40} - }, - { "record": - { "_id" : 101, - "name" : "Jaquelyn", - "address" : "P.O. Box 570, 3531 Donec Ave", - "city" : "Paramount", - "country" : "Virgin Islands, U.S.", - "age" : 5} - }, - { "record": - { "_id" : 102, - "name" : "Lillian", - "address" : "916-9397 Quam St.", - "city" : "West Memphis", - "country" : "Djibouti", - "age" : 92} - }, - { "record": - { "_id" : 103, - "name" : "Lavinia", - "address" : "6073 Magna. Ave", - "city" : "Tulsa", - "country" : "Sweden", - "age" : 66} - }, - { "record": - { "_id" : 104, - "name" : "Neve", - "address" : "P.O. Box 726, 3113 Arcu. Av.", - "city" : "Cranston", - "country" : "Guinea-bissau", - "age" : 44} - }, - { "record": - { "_id" : 105, - "name" : "Ora", - "address" : "Ap #781-7177 Nam St.", - "city" : "Williston", - "country" : "Suriname", - "age" : 7} - }, - { "record": - { "_id" : 106, - "name" : "Sydnee", - "address" : "P.O. Box 729, 6065 Ipsum St.", - "city" : "Dover", - "country" : "Kazakhstan", - "age" : 49} - }, - { "record": - { "_id" : 107, - "name" : "Serina", - "address" : "150-6370 Vivamus Road", - "city" : "Gilbert", - "country" : "Cape Verde", - "age" : 33} - }, - { "record": - { "_id" : 108, - "name" : "Margaret", - "address" : "P.O. Box 191, 4218 Nulla. Ave", - "city" : "Columbus", - "country" : "Slovenia", - "age" : 18} - }, - { "record": - { "_id" : 109, - "name" : "Teegan", - "address" : "6697 Consectetuer St.", - "city" : "San Rafael", - "country" : "Yemen", - "age" : 79} - }, - { "record": - { "_id" : 110, - "name" : "Joshua", - "address" : "844 Magna. St.", - "city" : "Sugar Land", - "country" : "French Guiana", - "age" : 41} - }, - { "record": - { "_id" : 111, - "name" : "Gray", - "address" : "Ap #571-3783 A St.", - "city" : "Glendale", - "country" : "Tonga", - "age" : 8} - }, - { "record": - { "_id" : 112, - "name" : "Hop", - "address" : "Ap #825-6640 Interdum Rd.", - "city" : "Lock Haven", - "country" : "Montserrat", - "age" : 68} - }, - { "record": - { "_id" : 113, - "name" : "Jeanette", - "address" : "141-9715 Quis Rd.", - "city" : "Bandon", - "country" : "Bangladesh", - "age" : 92} - }, - { "record": - { "_id" : 114, - "name" : "Brittany", - "address" : "Ap #378-5833 Nibh St.", - "city" : "Montpelier", - "country" : "Albania", - "age" : 11} - }, - { "record": - { "_id" : 115, - "name" : "Whitney", - "address" : "P.O. Box 779, 9957 Lacinia Avenue", - "city" : "Louisville", - "country" : "Guadeloupe", - "age" : 81} - }, - { "record": - { "_id" : 116, - "name" : "Cathleen", - "address" : "3352 Neque Road", - "city" : "Oak Ridge", - "country" : "Georgia", - "age" : 79} - }, - { "record": - { "_id" : 117, - "name" : "Nehru", - "address" : "2222 Sit Av.", - "city" : "Williamsburg", - "country" : "Portugal", - "age" : 44} - }, - { "record": - { "_id" : 118, - "name" : "Kane", - "address" : "P.O. Box 128, 1258 Magna. St.", - "city" : "Avalon", - "country" : "Guyana", - "age" : 12} - }, - { "record": - { "_id" : 119, - "name" : "Athena", - "address" : "Ap #537-9137 Nam St.", - "city" : "Rockville", - "country" : "Greenland", - "age" : 31} - }, - { "record": - { "_id" : 120, - "name" : "Lucius", - "address" : "4673 Nec Avenue", - "city" : "Oakland", - "country" : "Czech Republic", - "age" : 31} - }, - { "record": - { "_id" : 121, - "name" : "Ifeoma", - "address" : "P.O. Box 891, 7946 Felis Street", - "city" : "Cheyenne", - "country" : "Tokelau", - "age" : 89} - }, - { "record": - { "_id" : 122, - "name" : "Cherokee", - "address" : "Ap #212-189 Urna Avenue", - "city" : "Pierre", - "country" : "Denmark", - "age" : 60} - }, - { "record": - { "_id" : 123, - "name" : "Charity", - "address" : "Ap #508-9642 Leo Road", - "city" : "Cortland", - "country" : "India", - "age" : 90} - }, - { "record": - { "_id" : 124, - "name" : "Melissa", - "address" : "4850 Quam St.", - "city" : "Mission Viejo", - "country" : "Dominican Republic", - "age" : 62} - }, - { "record": - { "_id" : 125, - "name" : "Ivory", - "address" : "936-9674 Scelerisque Ave", - "city" : "Greenfield", - "country" : "Taiwan, Province of China", - "age" : 54} - }, - { "record": - { "_id" : 126, - "name" : "Jerome", - "address" : "Ap #521-4269 Volutpat. Street", - "city" : "Staunton", - "country" : "South Georgia and The South Sandwich Islands", - "age" : 96} - }, - { "record": - { "_id" : 127, - "name" : "Felix", - "address" : "Ap #716-8171 Laoreet, St.", - "city" : "San Clemente", - "country" : "Solomon Islands", - "age" : 79} - }, - { "record": - { "_id" : 128, - "name" : "Dieter", - "address" : "8337 Nullam St.", - "city" : "Belpre", - "country" : "Northern Mariana Islands", - "age" : 18} - }, - { "record": - { "_id" : 129, - "name" : "Abra", - "address" : "1679 Tellus. Rd.", - "city" : "Aguadilla", - "country" : "Saint Helena", - "age" : 40} - }, - { "record": - { "_id" : 130, - "name" : "Odessa", - "address" : "Ap #131-7688 Eu Av.", - "city" : "Tucson", - "country" : "South Georgia and The South Sandwich Islands", - "age" : 92} - }, - { "record": - { "_id" : 131, - "name" : "Maisie", - "address" : "386-5232 Sit Ave", - "city" : "Pascagoula", - "country" : "Philippines", - "age" : 56} - }, - { "record": - { "_id" : 132, - "name" : "Lacey", - "address" : "P.O. Box 737, 6372 Mauris Rd.", - "city" : "South Burlington", - "country" : "Denmark", - "age" : 51} - }, - { "record": - { "_id" : 133, - "name" : "Abraham", - "address" : "967-4633 Consequat Street", - "city" : "Dana Point", - "country" : "Marshall Islands", - "age" : 50} - }, - { "record": - { "_id" : 134, - "name" : "Yuri", - "address" : "910 Tellus Street", - "city" : "Seal Beach", - "country" : "New Zealand", - "age" : 50} - }, - { "record": - { "_id" : 135, - "name" : "Byron", - "address" : "7091 Non St.", - "city" : "Rhinelander", - "country" : "Guyana", - "age" : 34} - }, - { "record": - { "_id" : 136, - "name" : "Xaviera", - "address" : "3250 Ultrices Avenue", - "city" : "Laguna Niguel", - "country" : "South Africa", - "age" : 57} - }, - { "record": - { "_id" : 137, - "name" : "Nyssa", - "address" : "P.O. Box 494, 818 Fusce Rd.", - "city" : "Oshkosh", - "country" : "Iraq", - "age" : 53} - }, - { "record": - { "_id" : 138, - "name" : "Yuri", - "address" : "9591 Pede. Rd.", - "city" : "Bradford", - "country" : "United States Minor Outlying Islands", - "age" : 12} - }, - { "record": - { "_id" : 139, - "name" : "Elaine", - "address" : "P.O. Box 245, 1619 Laoreet, Av.", - "city" : "Agat", - "country" : "Dominica", - "age" : 13} - }, - { "record": - { "_id" : 140, - "name" : "Rudyard", - "address" : "Ap #210-3183 Cursus Rd.", - "city" : "Statesboro", - "country" : "Nigeria", - "age" : 49} - }, - { "record": - { "_id" : 141, - "name" : "Erasmus", - "address" : "Ap #318-1477 Tincidunt St.", - "city" : "Aurora", - "country" : "Swaziland", - "age" : 95} - }, - { "record": - { "_id" : 142, - "name" : "Acton", - "address" : "P.O. Box 316, 6799 Ullamcorper Avenue", - "city" : "Waltham", - "country" : "Estonia", - "age" : 84} - }, - { "record": - { "_id" : 143, - "name" : "Basia", - "address" : "P.O. Box 188, 6470 Duis St.", - "city" : "Santa Cruz", - "country" : "Rwanda", - "age" : 77} - }, - { "record": - { "_id" : 144, - "name" : "Bree", - "address" : "Ap #913-1402 Faucibus Road", - "city" : "Rohnert Park", - "country" : "New Caledonia", - "age" : 38} - }, - { "record": - { "_id" : 145, - "name" : "Tatum", - "address" : "6842 Lectus. Street", - "city" : "Clearwater", - "country" : "Russian Federation", - "age" : 80} - }, - { "record": - { "_id" : 146, - "name" : "Idola", - "address" : "Ap #323-8290 Massa. Ave", - "city" : "Wilkes-Barre", - "country" : "Germany", - "age" : 4} - }, - { "record": - { "_id" : 147, - "name" : "Ashton", - "address" : "7420 Auctor Av.", - "city" : "Westfield", - "country" : "Indonesia", - "age" : 16} - }, - { "record": - { "_id" : 148, - "name" : "Laith", - "address" : "950-6616 Facilisis Street", - "city" : "Denver", - "country" : "Netherlands", - "age" : 89} - }, - { "record": - { "_id" : 149, - "name" : "Aspen", - "address" : "1094 Amet St.", - "city" : "Lancaster", - "country" : "Croatia", - "age" : 84} - }, - { "record": - { "_id" : 150, - "name" : "Catherine", - "address" : "P.O. Box 815, 7073 Sodales Rd.", - "city" : "Dana Point", - "country" : "San Marino", - "age" : 56} - }, - { "record": - { "_id" : 151, - "name" : "Alexandra", - "address" : "693-921 Amet, Rd.", - "city" : "Rock Springs", - "country" : "United States", - "age" : 42} - }, - { "record": - { "_id" : 152, - "name" : "Neve", - "address" : "535-7160 Tellus Rd.", - "city" : "New York", - "country" : "Malta", - "age" : 52} - }, - { "record": - { "_id" : 153, - "name" : "Odysseus", - "address" : "Ap #275-2086 Vestibulum Ave", - "city" : "Decatur", - "country" : "Greece", - "age" : 100} - }, - { "record": - { "_id" : 154, - "name" : "Vance", - "address" : "625-2788 Dictum Ave", - "city" : "Yorba Linda", - "country" : "Angola", - "age" : 94} - }, - { "record": - { "_id" : 155, - "name" : "August", - "address" : "533-4807 A, Av.", - "city" : "Camden", - "country" : "Slovakia", - "age" : 96} - }, - { "record": - { "_id" : 156, - "name" : "Serina", - "address" : "233-5292 Laoreet Rd.", - "city" : "Boulder", - "country" : "Poland", - "age" : 72} - }, - { "record": - { "_id" : 157, - "name" : "Emily", - "address" : "876-6189 Felis, St.", - "city" : "Bartlesville", - "country" : "Greece", - "age" : 20} - }, - { "record": - { "_id" : 158, - "name" : "Francis", - "address" : "471-120 Pharetra. St.", - "city" : "Cape May", - "country" : "Trinidad and Tobago", - "age" : 49} - }, - { "record": - { "_id" : 159, - "name" : "Lucy", - "address" : "Ap #887-7157 Vehicula Street", - "city" : "Bell Gardens", - "country" : "Djibouti", - "age" : 87} - }, - { "record": - { "_id" : 160, - "name" : "Lewis", - "address" : "670-5085 Tristique Rd.", - "city" : "Hattiesburg", - "country" : "Ukraine", - "age" : 37} - }, - { "record": - { "_id" : 161, - "name" : "Zelda", - "address" : "P.O. Box 384, 535 Ipsum Ave", - "city" : "Idaho Springs", - "country" : "Moldova", - "age" : 46} - }, - { "record": - { "_id" : 162, - "name" : "Hope", - "address" : "3287 Urna. Road", - "city" : "Hollywood", - "country" : "China", - "age" : 90} - }, - { "record": - { "_id" : 163, - "name" : "Dieter", - "address" : "Ap #781-5639 Morbi Avenue", - "city" : "Sister Bay", - "country" : "Germany", - "age" : 88} - }, - { "record": - { "_id" : 164, - "name" : "Jena", - "address" : "277-2455 Tellus Street", - "city" : "Highland Park", - "country" : "Tunisia", - "age" : 43} - }, - { "record": - { "_id" : 165, - "name" : "Nichole", - "address" : "465-2547 Quis, Av.", - "city" : "Yigo", - "country" : "Samoa", - "age" : 15} - }, - { "record": - { "_id" : 166, - "name" : "Farrah", - "address" : "P.O. Box 481, 2293 Vitae Street", - "city" : "Cicero", - "country" : "Uganda", - "age" : 98} - }, - { "record": - { "_id" : 167, - "name" : "Omar", - "address" : "Ap #315-1461 Metus Street", - "city" : "Spokane", - "country" : "Niger", - "age" : 34} - }, - { "record": - { "_id" : 168, - "name" : "Barry", - "address" : "Ap #760-1970 Ac Street", - "city" : "Green Bay", - "country" : "American Samoa", - "age" : 60} - }, - { "record": - { "_id" : 169, - "name" : "Lila", - "address" : "Ap #389-5228 Aliquam Road", - "city" : "Beacon", - "country" : "Malawi", - "age" : 95} - }, - { "record": - { "_id" : 170, - "name" : "Eliana", - "address" : "482-6392 Donec Av.", - "city" : "Modesto", - "country" : "Anguilla", - "age" : 88} - }, - { "record": - { "_id" : 171, - "name" : "Noel", - "address" : "P.O. Box 973, 5510 Vulputate, Rd.", - "city" : "Fajardo", - "country" : "Lebanon", - "age" : 29} - }, - { "record": - { "_id" : 172, - "name" : "Jenna", - "address" : "P.O. Box 491, 3087 Aliquam Street", - "city" : "Johnson City", - "country" : "Chad", - "age" : 63} - }, - { "record": - { "_id" : 173, - "name" : "Warren", - "address" : "5371 Mollis St.", - "city" : "South Burlington", - "country" : "Saint Vincent and The Grenadines", - "age" : 80} - }, - { "record": - { "_id" : 174, - "name" : "Donna", - "address" : "343-941 Aliquet. Road", - "city" : "Cleveland", - "country" : "Serbia and Montenegro", - "age" : 14} - }, - { "record": - { "_id" : 175, - "name" : "Callie", - "address" : "Ap #652-8927 Eu Road", - "city" : "Laguna Niguel", - "country" : "Turkey", - "age" : 97} - }, - { "record": - { "_id" : 176, - "name" : "Thor", - "address" : "P.O. Box 850, 3482 Mauris Road", - "city" : "Gary", - "country" : "Western Sahara", - "age" : 24} - }, - { "record": - { "_id" : 177, - "name" : "Simon", - "address" : "Ap #191-3933 Tellus Avenue", - "city" : "Asbury Park", - "country" : "Hungary", - "age" : 66} - }, - { "record": - { "_id" : 178, - "name" : "Brendan", - "address" : "755-7817 Hendrerit Rd.", - "city" : "Oro Valley", - "country" : "Guatemala", - "age" : 40} - }, - { "record": - { "_id" : 179, - "name" : "Kuame", - "address" : "Ap #769-5190 Lorem Street", - "city" : "Urbana", - "country" : "Spain", - "age" : 35} - }, - { "record": - { "_id" : 180, - "name" : "Deirdre", - "address" : "115-1714 Vitae Street", - "city" : "Lander", - "country" : "Palestinian Territory, Occupied", - "age" : 27} - }, - { "record": - { "_id" : 181, - "name" : "Sonya", - "address" : "Ap #848-2525 Nunc Rd.", - "city" : "White Plains", - "country" : "Belarus", - "age" : 98} - }, - { "record": - { "_id" : 182, - "name" : "Penelope", - "address" : "P.O. Box 377, 1820 Auctor, Road", - "city" : "Kenner", - "country" : "Spain", - "age" : 92} - }, - { "record": - { "_id" : 183, - "name" : "Winter", - "address" : "996-9036 Ac Ave", - "city" : "North Little Rock", - "country" : "Lebanon", - "age" : 93} - }, - { "record": - { "_id" : 184, - "name" : "Rigel", - "address" : "P.O. Box 846, 3177 Hendrerit Rd.", - "city" : "Rancho Cucamonga", - "country" : "Guadeloupe", - "age" : 15} - }, - { "record": - { "_id" : 185, - "name" : "Yoko", - "address" : "817 Sed Street", - "city" : "Williamsburg", - "country" : "Fiji", - "age" : 22} - }, - { "record": - { "_id" : 186, - "name" : "Eagan", - "address" : "P.O. Box 443, 6259 Vitae Rd.", - "city" : "Spokane", - "country" : "British Indian Ocean Territory", - "age" : 94} - }, - { "record": - { "_id" : 187, - "name" : "Shana", - "address" : "955-3825 Ut Rd.", - "city" : "Fitchburg", - "country" : "Marshall Islands", - "age" : 45} - }, - { "record": - { "_id" : 188, - "name" : "Brian", - "address" : "102-1671 Blandit. St.", - "city" : "Sanford", - "country" : "Cyprus", - "age" : 12} - }, - { "record": - { "_id" : 189, - "name" : "Steven", - "address" : "P.O. Box 533, 8683 Aliquam Road", - "city" : "Richmond", - "country" : "Montserrat", - "age" : 25} - }, - { "record": - { "_id" : 190, - "name" : "Halee", - "address" : "362-4139 Felis Road", - "city" : "Syracuse", - "country" : "Netherlands Antilles", - "age" : 36} - }, - { "record": - { "_id" : 191, - "name" : "Debra", - "address" : "Ap #138-7706 Sem Avenue", - "city" : "Tacoma", - "country" : "Macedonia", - "age" : 78} - }, - { "record": - { "_id" : 192, - "name" : "Allistair", - "address" : "P.O. Box 276, 2070 Nunc Avenue", - "city" : "Mequon", - "country" : "Faroe Islands", - "age" : 69} - }, - { "record": - { "_id" : 193, - "name" : "Ian", - "address" : "Ap #469-7192 Rutrum. Street", - "city" : "Auburn", - "country" : "Portugal", - "age" : 1} - }, - { "record": - { "_id" : 194, - "name" : "Jackson", - "address" : "8459 Imperdiet Rd.", - "city" : "Mentor", - "country" : "Puerto Rico", - "age" : 55} - }, - { "record": - { "_id" : 195, - "name" : "Lesley", - "address" : "P.O. Box 332, 4614 Ornare Road", - "city" : "Joplin", - "country" : "Egypt", - "age" : 61} - }, - { "record": - { "_id" : 196, - "name" : "Maite", - "address" : "1457 Odio St.", - "city" : "Mobile", - "country" : "Uzbekistan", - "age" : 42} - }, - { "record": - { "_id" : 197, - "name" : "Danielle", - "address" : "172-1431 Lorem, St.", - "city" : "Rancho Cucamonga", - "country" : "Pakistan", - "age" : 77} - }, - { "record": - { "_id" : 198, - "name" : "Kiara", - "address" : "152-9077 Sociis Street", - "city" : "Riverside", - "country" : "Kyrgyzstan", - "age" : 2} - }, - { "record": - { "_id" : 199, - "name" : "Adena", - "address" : "584-949 Fringilla, Rd.", - "city" : "Princeton", - "country" : "Paraguay", - "age" : 1} - }, - { "record": - { "_id" : 200, - "name" : "Simon", - "address" : "553-3290 Nostra, Avenue", - "city" : "Hornell", - "country" : "Serbia and Montenegro", - "age" : 41} - }] -} diff --git a/cloudfoundry-caldecott-test/data/load.xml b/cloudfoundry-caldecott-test/data/load.xml deleted file mode 100644 index 25abd2a409a..00000000000 --- a/cloudfoundry-caldecott-test/data/load.xml +++ /dev/null @@ -1,1611 +0,0 @@ - - - - id - name - address - city - country - age - - 1 - Lucas - 9665 Commodo Av. - Truth or Consequences - Bosnia and Herzegovina - 11 - - - 2 - Shelley - P.O. Box 635, 3581 Nunc Street - Enfield - Turkmenistan - 69 - - - 3 - Skyler - Ap #645-2695 Nulla Ave - San Gabriel - Tuvalu - 56 - - - 4 - Portia - 1179 Sed St. - Santa Clarita - Japan - 96 - - - 5 - Palmer - 5214 Massa. Av. - Port Arthur - Uzbekistan - 85 - - - 6 - Taylor - P.O. Box 515, 8741 Sed St. - Asbury Park - Suriname - 62 - - - 7 - Nelle - 429-4356 Sit Av. - Durant - Turks and Caicos Islands - 63 - - - 8 - Brennan - Ap #984-1800 Convallis Road - Williston - Suriname - 3 - - - 9 - Jordan - 510-5341 Eget Avenue - Manassas Park - New Caledonia - 100 - - - 10 - Henry - P.O. Box 425, 2861 Lorem Av. - Toledo - Sweden - 65 - - - 11 - Florence - 2300 Nec Rd. - Morrison - Heard Island and Mcdonald Islands - 79 - - - 12 - Lane - 622-2648 Augue Ave - White Plains - Mauritius - 60 - - - 13 - Illana - P.O. Box 172, 5207 In St. - Portland - Turkmenistan - 54 - - - 14 - Autumn - 8389 Augue Road - Riverside - Antarctica - 40 - - - 15 - Nicole - P.O. Box 138, 5642 Sed Avenue - Norwich - Slovenia - 98 - - - 16 - Cyrus - 6595 Et Avenue - Harrisburg - Thailand - 78 - - - 17 - Igor - P.O. Box 884, 8228 Integer Street - Davis - Azerbaijan - 25 - - - 18 - Cameron - P.O. Box 370, 7095 Sit St. - Kankakee - Fiji - 80 - - - 19 - Jin - 840-6770 Et Rd. - Guánica - Samoa - 47 - - - 20 - Adrienne - 5612 Dictum Road - Florence - Bangladesh - 70 - - - 21 - Cassady - P.O. Box 230, 824 Morbi Avenue - Cape Coral - Burundi - 26 - - - 22 - Inez - Ap #684-1929 Turpis Ave - Mission Viejo - Benin - 48 - - - 23 - Hector - P.O. Box 307, 8478 Tristique Av. - Farrell - Mexico - 64 - - - 24 - Sharon - Ap #133-6077 Duis Ave - La Verne - Eritrea - 75 - - - 25 - Kenneth - 8388 Egestas, Avenue - Revere - Libyan Arab Jamahiriya - 56 - - - 26 - Hedy - 244-5276 Magna St. - Edmond - Zambia - 69 - - - 27 - Jolie - P.O. Box 525, 8242 Augue, Avenue - Vincennes - Chile - 37 - - - 28 - Xandra - P.O. Box 579, 3814 Consectetuer Av. - North Las Vegas - Ireland - 18 - - - 29 - Jermaine - P.O. Box 612, 3644 Eu, Ave - Christiansted - Azerbaijan - 52 - - - 30 - Naomi - 830-3601 Aenean Rd. - Grambling - Tajikistan - 83 - - - 31 - Carter - Ap #791-7937 Integer St. - Hastings - Albania - 33 - - - 32 - Pearl - 1317 Et Ave - Vermillion - Morocco - 17 - - - 33 - Joseph - Ap #524-270 Nunc, Street - Tacoma - Western Sahara - 39 - - - 34 - Naida - Ap #249-9011 Ligula Ave - Hagerstown - Central African Republic - 44 - - - 35 - Brock - P.O. Box 360, 5609 Arcu. Av. - Salinas - Argentina - 48 - - - 36 - Teegan - P.O. Box 514, 365 Et St. - Hollister - American Samoa - 50 - - - 37 - Hollee - 5866 Commodo Rd. - Sedalia - Malawi - 15 - - - 38 - Zane - P.O. Box 879, 6396 Neque Rd. - Cairo - Palau - 78 - - - 39 - Hunter - 738-4604 Cubilia Rd. - Jackson - Senegal - 52 - - - 40 - Sydnee - 3160 Fringilla Avenue - Fullerton - Seychelles - 80 - - - 41 - Bradley - Ap #566-6094 Molestie Rd. - Bell Gardens - Angola - 77 - - - 42 - Vielka - Ap #487-3151 Pede Avenue - South Bend - Wallis and Futuna - 77 - - - 43 - Kirsten - 960-753 Vel St. - Cerritos - Taiwan, Province of China - 97 - - - 44 - Jakeem - 365-1397 Eu, Ave - Stockton - United Kingdom - 65 - - - 45 - Jena - P.O. Box 952, 3389 Nec Ave - Cape Girardeau - Mauritius - 77 - - - 46 - Isaac - P.O. Box 965, 1909 Lectus, Ave - Hoboken - France - 14 - - - 47 - Jael - 914-1937 Faucibus St. - Clarksville - Cameroon - 49 - - - 48 - Evan - 5026 Magna. Road - Jeffersontown - New Caledonia - 74 - - - 49 - Halla - 7275 Pharetra Av. - Fremont - Greece - 48 - - - 50 - Kasimir - 6078 Nec Rd. - San Gabriel - Guinea - 6 - - - 51 - Regina - 9629 Elit. Avenue - Brookings - Kiribati - 28 - - - 52 - Burke - Ap #377-8583 Vulputate, Street - Haverhill - Panama - 82 - - - 53 - Daryl - Ap #967-235 Eget Rd. - Bentonville - Eritrea - 67 - - - 54 - Zane - 931-2607 Aliquam Rd. - Carson City - Thailand - 24 - - - 55 - Bertha - 219-5800 Enim Ave - Nacogdoches - San Marino - 89 - - - 56 - Jaime - 450-1962 A, Rd. - Scottsdale - United States Minor Outlying Islands - 16 - - - 57 - Sarah - 114-2987 Quisque Road - West Memphis - Guinea-bissau - 22 - - - 58 - Coby - 649-1000 Donec St. - Cary - Western Sahara - 23 - - - 59 - Nora - Ap #136-1447 Cursus Avenue - Chula Vista - Gabon - 53 - - - 60 - Ginger - Ap #970-5061 Aenean Rd. - Victoria - Korea, Republic of - 52 - - - 61 - Conan - 671-4014 Est. Av. - Manitowoc - Barbados - 1 - - - 62 - Madaline - 9374 Suscipit Avenue - Modesto - Sudan - 54 - - - 63 - Lydia - 5044 Aliquet Ave - Batavia - Bahamas - 98 - - - 64 - Lael - 548-9912 Tincidunt Rd. - Port Huron - Tuvalu - 88 - - - 65 - Calista - Ap #673-2865 Malesuada Street - Fontana - Switzerland - 27 - - - 66 - Cairo - 3385 Erat Av. - Knoxville - Vanuatu - 4 - - - 67 - Harrison - 487-6677 Purus. St. - Lansing - Tunisia - 16 - - - 68 - Yoko - 7758 Morbi Av. - Anaheim - Kiribati - 5 - - - 69 - Nero - 9562 Risus. Street - Murray - Burundi - 76 - - - 70 - Ira - 952 Non St. - Buena Park - Ethiopia - 55 - - - 71 - Colleen - 2167 Orci Avenue - Tallahassee - Argentina - 19 - - - 72 - Rachel - Ap #940-5542 Et St. - Murfreesboro - New Zealand - 65 - - - 73 - Uma - Ap #800-3604 Sapien. Rd. - West Hartford - Tunisia - 44 - - - 74 - Shana - P.O. Box 582, 7739 Eget Rd. - Springfield - Luxembourg - 66 - - - 75 - Ariana - 246-6080 Nullam Ave - Gold Beach - Poland - 54 - - - 76 - Tanek - Ap #303-8079 Nunc St. - Casper - Saint Helena - 59 - - - 77 - Joseph - 5473 Rhoncus. Rd. - Las Cruces - Lesotho - 67 - - - 78 - Akeem - Ap #920-5907 Aptent Rd. - Valdosta - Myanmar - 84 - - - 79 - Ava - 7480 In, St. - Bell - Bermuda - 92 - - - 80 - Lucian - 754 Cum Ave - Fountain Valley - Dominica - 77 - - - 81 - Rhiannon - 699-9737 Dictum Street - Fort Collins - Uganda - 50 - - - 82 - Sara - Ap #497-9220 Iaculis, St. - Sheridan - Niue - 11 - - - 83 - Madeson - Ap #380-7810 Turpis. St. - Augusta - Antigua and Barbuda - 53 - - - 84 - Bo - 1520 Lacinia Ave - West Hartford - Chad - 43 - - - 85 - Macey - Ap #683-5646 Vitae Ave - Hialeah - Romania - 32 - - - 86 - Sacha - 777-7670 Tristique St. - Stillwater - Tuvalu - 49 - - - 87 - Chancellor - P.O. Box 308, 6468 Nibh Rd. - Miami Beach - Albania - 52 - - - 88 - Neville - P.O. Box 620, 8472 Sem Ave - St. Marys - Brazil - 50 - - - 89 - Ian - Ap #399-8794 Amet, Street - Sturgis - Slovenia - 64 - - - 90 - Malik - P.O. Box 867, 2644 Curabitur Rd. - Ocean City - Bahamas - 49 - - - 91 - Elvis - 3359 Malesuada Rd. - Kingsport - Lithuania - 46 - - - 92 - Alice - P.O. Box 860, 7353 Lorem Street - Orange - Bahrain - 47 - - - 93 - Zephr - 5842 Lobortis Street - West Warwick - Kyrgyzstan - 14 - - - 94 - Avram - Ap #455-8812 Magnis Road - Appleton - Angola - 38 - - - 95 - Sebastian - 828-8603 Rutrum Av. - Philadelphia - Brazil - 2 - - - 96 - Kermit - Ap #385-6761 Scelerisque Ave - Michigan City - Nigeria - 48 - - - 97 - Byron - 722-2846 Non Avenue - Oro Valley - Ireland - 68 - - - 98 - Kibo - 2997 Porttitor Ave - Auburn Hills - Saint Kitts and Nevis - 64 - - - 99 - Shelley - 6261 Donec Road - Sutter Creek - Sudan - 30 - - - 100 - Joelle - P.O. Box 818, 4525 Aliquam Avenue - Columbus - India - 40 - - - 101 - Jaquelyn - P.O. Box 570, 3531 Donec Ave - Paramount - Virgin Islands, U.S. - 5 - - - 102 - Lillian - 916-9397 Quam St. - West Memphis - Djibouti - 92 - - - 103 - Lavinia - 6073 Magna. Ave - Tulsa - Sweden - 66 - - - 104 - Neve - P.O. Box 726, 3113 Arcu. Av. - Cranston - Guinea-bissau - 44 - - - 105 - Ora - Ap #781-7177 Nam St. - Williston - Suriname - 7 - - - 106 - Sydnee - P.O. Box 729, 6065 Ipsum St. - Dover - Kazakhstan - 49 - - - 107 - Serina - 150-6370 Vivamus Road - Gilbert - Cape Verde - 33 - - - 108 - Margaret - P.O. Box 191, 4218 Nulla. Ave - Columbus - Slovenia - 18 - - - 109 - Teegan - 6697 Consectetuer St. - San Rafael - Yemen - 79 - - - 110 - Joshua - 844 Magna. St. - Sugar Land - French Guiana - 41 - - - 111 - Gray - Ap #571-3783 A St. - Glendale - Tonga - 8 - - - 112 - Hop - Ap #825-6640 Interdum Rd. - Lock Haven - Montserrat - 68 - - - 113 - Jeanette - 141-9715 Quis Rd. - Bandon - Bangladesh - 92 - - - 114 - Brittany - Ap #378-5833 Nibh St. - Montpelier - Albania - 11 - - - 115 - Whitney - P.O. Box 779, 9957 Lacinia Avenue - Louisville - Guadeloupe - 81 - - - 116 - Cathleen - 3352 Neque Road - Oak Ridge - Georgia - 79 - - - 117 - Nehru - 2222 Sit Av. - Williamsburg - Portugal - 44 - - - 118 - Kane - P.O. Box 128, 1258 Magna. St. - Avalon - Guyana - 12 - - - 119 - Athena - Ap #537-9137 Nam St. - Rockville - Greenland - 31 - - - 120 - Lucius - 4673 Nec Avenue - Oakland - Czech Republic - 31 - - - 121 - Ifeoma - P.O. Box 891, 7946 Felis Street - Cheyenne - Tokelau - 89 - - - 122 - Cherokee - Ap #212-189 Urna Avenue - Pierre - Denmark - 60 - - - 123 - Charity - Ap #508-9642 Leo Road - Cortland - India - 90 - - - 124 - Melissa - 4850 Quam St. - Mission Viejo - Dominican Republic - 62 - - - 125 - Ivory - 936-9674 Scelerisque Ave - Greenfield - Taiwan, Province of China - 54 - - - 126 - Jerome - Ap #521-4269 Volutpat. Street - Staunton - South Georgia and The South Sandwich Islands - 96 - - - 127 - Felix - Ap #716-8171 Laoreet, St. - San Clemente - Solomon Islands - 79 - - - 128 - Dieter - 8337 Nullam St. - Belpre - Northern Mariana Islands - 18 - - - 129 - Abra - 1679 Tellus. Rd. - Aguadilla - Saint Helena - 40 - - - 130 - Odessa - Ap #131-7688 Eu Av. - Tucson - South Georgia and The South Sandwich Islands - 92 - - - 131 - Maisie - 386-5232 Sit Ave - Pascagoula - Philippines - 56 - - - 132 - Lacey - P.O. Box 737, 6372 Mauris Rd. - South Burlington - Denmark - 51 - - - 133 - Abraham - 967-4633 Consequat Street - Dana Point - Marshall Islands - 50 - - - 134 - Yuri - 910 Tellus Street - Seal Beach - New Zealand - 50 - - - 135 - Byron - 7091 Non St. - Rhinelander - Guyana - 34 - - - 136 - Xaviera - 3250 Ultrices Avenue - Laguna Niguel - South Africa - 57 - - - 137 - Nyssa - P.O. Box 494, 818 Fusce Rd. - Oshkosh - Iraq - 53 - - - 138 - Yuri - 9591 Pede. Rd. - Bradford - United States Minor Outlying Islands - 12 - - - 139 - Elaine - P.O. Box 245, 1619 Laoreet, Av. - Agat - Dominica - 13 - - - 140 - Rudyard - Ap #210-3183 Cursus Rd. - Statesboro - Nigeria - 49 - - - 141 - Erasmus - Ap #318-1477 Tincidunt St. - Aurora - Swaziland - 95 - - - 142 - Acton - P.O. Box 316, 6799 Ullamcorper Avenue - Waltham - Estonia - 84 - - - 143 - Basia - P.O. Box 188, 6470 Duis St. - Santa Cruz - Rwanda - 77 - - - 144 - Bree - Ap #913-1402 Faucibus Road - Rohnert Park - New Caledonia - 38 - - - 145 - Tatum - 6842 Lectus. Street - Clearwater - Russian Federation - 80 - - - 146 - Idola - Ap #323-8290 Massa. Ave - Wilkes-Barre - Germany - 4 - - - 147 - Ashton - 7420 Auctor Av. - Westfield - Indonesia - 16 - - - 148 - Laith - 950-6616 Facilisis Street - Denver - Netherlands - 89 - - - 149 - Aspen - 1094 Amet St. - Lancaster - Croatia - 84 - - - 150 - Catherine - P.O. Box 815, 7073 Sodales Rd. - Dana Point - San Marino - 56 - - - 151 - Alexandra - 693-921 Amet, Rd. - Rock Springs - United States - 42 - - - 152 - Neve - 535-7160 Tellus Rd. - New York - Malta - 52 - - - 153 - Odysseus - Ap #275-2086 Vestibulum Ave - Decatur - Greece - 100 - - - 154 - Vance - 625-2788 Dictum Ave - Yorba Linda - Angola - 94 - - - 155 - August - 533-4807 A, Av. - Camden - Slovakia - 96 - - - 156 - Serina - 233-5292 Laoreet Rd. - Boulder - Poland - 72 - - - 157 - Emily - 876-6189 Felis, St. - Bartlesville - Greece - 20 - - - 158 - Francis - 471-120 Pharetra. St. - Cape May - Trinidad and Tobago - 49 - - - 159 - Lucy - Ap #887-7157 Vehicula Street - Bell Gardens - Djibouti - 87 - - - 160 - Lewis - 670-5085 Tristique Rd. - Hattiesburg - Ukraine - 37 - - - 161 - Zelda - P.O. Box 384, 535 Ipsum Ave - Idaho Springs - Moldova - 46 - - - 162 - Hope - 3287 Urna. Road - Hollywood - China - 90 - - - 163 - Dieter - Ap #781-5639 Morbi Avenue - Sister Bay - Germany - 88 - - - 164 - Jena - 277-2455 Tellus Street - Highland Park - Tunisia - 43 - - - 165 - Nichole - 465-2547 Quis, Av. - Yigo - Samoa - 15 - - - 166 - Farrah - P.O. Box 481, 2293 Vitae Street - Cicero - Uganda - 98 - - - 167 - Omar - Ap #315-1461 Metus Street - Spokane - Niger - 34 - - - 168 - Barry - Ap #760-1970 Ac Street - Green Bay - American Samoa - 60 - - - 169 - Lila - Ap #389-5228 Aliquam Road - Beacon - Malawi - 95 - - - 170 - Eliana - 482-6392 Donec Av. - Modesto - Anguilla - 88 - - - 171 - Noel - P.O. Box 973, 5510 Vulputate, Rd. - Fajardo - Lebanon - 29 - - - 172 - Jenna - P.O. Box 491, 3087 Aliquam Street - Johnson City - Chad - 63 - - - 173 - Warren - 5371 Mollis St. - South Burlington - Saint Vincent and The Grenadines - 80 - - - 174 - Donna - 343-941 Aliquet. Road - Cleveland - Serbia and Montenegro - 14 - - - 175 - Callie - Ap #652-8927 Eu Road - Laguna Niguel - Turkey - 97 - - - 176 - Thor - P.O. Box 850, 3482 Mauris Road - Gary - Western Sahara - 24 - - - 177 - Simon - Ap #191-3933 Tellus Avenue - Asbury Park - Hungary - 66 - - - 178 - Brendan - 755-7817 Hendrerit Rd. - Oro Valley - Guatemala - 40 - - - 179 - Kuame - Ap #769-5190 Lorem Street - Urbana - Spain - 35 - - - 180 - Deirdre - 115-1714 Vitae Street - Lander - Palestinian Territory, Occupied - 27 - - - 181 - Sonya - Ap #848-2525 Nunc Rd. - White Plains - Belarus - 98 - - - 182 - Penelope - P.O. Box 377, 1820 Auctor, Road - Kenner - Spain - 92 - - - 183 - Winter - 996-9036 Ac Ave - North Little Rock - Lebanon - 93 - - - 184 - Rigel - P.O. Box 846, 3177 Hendrerit Rd. - Rancho Cucamonga - Guadeloupe - 15 - - - 185 - Yoko - 817 Sed Street - Williamsburg - Fiji - 22 - - - 186 - Eagan - P.O. Box 443, 6259 Vitae Rd. - Spokane - British Indian Ocean Territory - 94 - - - 187 - Shana - 955-3825 Ut Rd. - Fitchburg - Marshall Islands - 45 - - - 188 - Brian - 102-1671 Blandit. St. - Sanford - Cyprus - 12 - - - 189 - Steven - P.O. Box 533, 8683 Aliquam Road - Richmond - Montserrat - 25 - - - 190 - Halee - 362-4139 Felis Road - Syracuse - Netherlands Antilles - 36 - - - 191 - Debra - Ap #138-7706 Sem Avenue - Tacoma - Macedonia - 78 - - - 192 - Allistair - P.O. Box 276, 2070 Nunc Avenue - Mequon - Faroe Islands - 69 - - - 193 - Ian - Ap #469-7192 Rutrum. Street - Auburn - Portugal - 1 - - - 194 - Jackson - 8459 Imperdiet Rd. - Mentor - Puerto Rico - 55 - - - 195 - Lesley - P.O. Box 332, 4614 Ornare Road - Joplin - Egypt - 61 - - - 196 - Maite - 1457 Odio St. - Mobile - Uzbekistan - 42 - - - 197 - Danielle - 172-1431 Lorem, St. - Rancho Cucamonga - Pakistan - 77 - - - 198 - Kiara - 152-9077 Sociis Street - Riverside - Kyrgyzstan - 2 - - - 199 - Adena - 584-949 Fringilla, Rd. - Princeton - Paraguay - 1 - - - 200 - Simon - 553-3290 Nostra, Avenue - Hornell - Serbia and Montenegro - 41 - -
-
diff --git a/cloudfoundry-caldecott-test/pom.xml b/cloudfoundry-caldecott-test/pom.xml deleted file mode 100644 index ab87b199a1d..00000000000 --- a/cloudfoundry-caldecott-test/pom.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - 4.0.0 - org.cloudfoundry - cloudfoundry-caldecott-test - 0.1.4.BUILD-SNAPSHOT - jar - Tests for Java Client for Caldecott access - - - - Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0 - repo - - - - - 3.0.7.RELEASE - 1.0.1.RELEASE - 1.0.0.RELEASE - 1.0.0.RELEASE - 1.5.10 - - - - - fast - - true - - - - - - - org.springframework - spring-context - ${spring.framework.version} - - - - commons-logging - commons-logging - - - - - org.springframework - spring-jdbc - ${spring.framework.version} - - - org.springframework.data - spring-data-mongodb - ${spring.data.mongo.version} - test - - - org.springframework.data - spring-data-redis - ${spring.data.redis.version} - test - - - org.springframework.amqp - spring-amqp - ${spring.amqp.version} - - - org.springframework.amqp - spring-rabbit - ${spring.amqp.version} - - - org.cloudfoundry - cloudfoundry-caldecott-lib - ${project.version} - - - org.codehaus.jackson - jackson-core-asl - 1.6.2 - - - org.codehaus.jackson - jackson-mapper-asl - 1.6.2 - - - mysql - mysql-connector-java - 5.1.18 - test - - - postgresql - postgresql - 9.0-801.jdbc4 - test - - - org.dbunit - dbunit - 2.4.8 - - - junit - junit - 4.8 - test - - - - org.slf4j - slf4j-api - ${org.slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${org.slf4j-version} - runtime - - - org.slf4j - slf4j-log4j12 - ${org.slf4j-version} - runtime - - - log4j - log4j - 1.2.15 - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - - - - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.0.0.RELEASE - - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.5 - 1.5 - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.8 - - - - **/*Test.java - - - **/Abstract*.java - - - - - - - - - spring-milestone - Spring Milestone Repository - s3://maven.springframework.org/milestone - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - - diff --git a/cloudfoundry-caldecott-test/src/test/java/org/cloudfoundry/caldecott/client/HttpTunnelTest.java b/cloudfoundry-caldecott-test/src/test/java/org/cloudfoundry/caldecott/client/HttpTunnelTest.java deleted file mode 100644 index cabb4ad4965..00000000000 --- a/cloudfoundry-caldecott-test/src/test/java/org/cloudfoundry/caldecott/client/HttpTunnelTest.java +++ /dev/null @@ -1,482 +0,0 @@ -package org.cloudfoundry.caldecott.client; - -import com.mongodb.BasicDBObject; -import com.mongodb.DBCollection; -import com.mongodb.Mongo; -import com.mongodb.MongoException; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.caldecott.TunnelException; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.codehaus.jackson.map.ObjectMapper; -import org.dbunit.DatabaseUnitException; -import org.dbunit.database.DatabaseConfig; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.database.IDatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.xml.XmlDataSet; -import org.dbunit.ext.mysql.MySqlDataTypeFactory; -import org.dbunit.ext.postgresql.PostgresqlDataTypeFactory; -import org.dbunit.operation.DatabaseOperation; -import org.junit.After; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Test; -import org.junit.Assert; -import org.springframework.amqp.core.AmqpAdmin; -import org.springframework.amqp.core.Queue; -import org.springframework.amqp.rabbit.connection.CachingConnectionFactory; -import org.springframework.amqp.rabbit.core.RabbitAdmin; -import org.springframework.amqp.rabbit.core.RabbitTemplate; -import org.springframework.dao.DataAccessException; -import org.springframework.data.authentication.UserCredentials; -import org.springframework.data.mongodb.MongoDbFactory; -import org.springframework.data.mongodb.core.CollectionCallback; -import org.springframework.data.mongodb.core.MongoTemplate; -import org.springframework.data.mongodb.core.SimpleMongoDbFactory; -import org.springframework.data.redis.connection.jedis.JedisConnectionFactory; -import org.springframework.data.redis.core.RedisTemplate; -import org.springframework.data.redis.core.ValueOperations; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.jdbc.datasource.DataSourceUtils; -import org.springframework.jdbc.datasource.SimpleDriverDataSource; - -import javax.sql.DataSource; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.lang.System; -import java.net.InetSocketAddress; -import java.net.MalformedURLException; -import java.net.URL; -import java.net.UnknownHostException; -import java.sql.Connection; -import java.sql.SQLException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Integration tests for testing each data store supported. - * Starts a tunnel and tests the tunneling functionality. - * - * @author Thomas Risberg - */ -public class HttpTunnelTest { - - protected final Log logger = LogFactory.getLog(getClass()); - - private static final String VCAP_TARGET = System.getProperty("vcap.target", "https://api.cloudfoundry.com"); - private static final String VCAP_EMAIL = System.getProperty("vcap.email", "cloud@springdeveloper.com"); - private static final String VCAP_PASSWD = System.getProperty("vcap.passwd"); - private static final String VCAP_ORG = System.getProperty("vcap.org", "springdeveloper.com"); - private static final String VCAP_SPACE = System.getProperty("vcap.space", "test"); - private static final String VCAP_MYSQL_SERVICE = "mysql-caldecott-test"; - private static final String VCAP_POSTGRES_SERVICE = "postgres-caldecott-test"; - private static final String VCAP_MONGO_SERVICE = "mongo-caldecott-test"; - private static final String VCAP_REDIS_SERVICE = "redis-caldecott-test"; - private static final String VCAP_RABBIT_SERVICE = "rabbit-caldecott-test"; - public static final int LOCAL_PORT = 10000; - public static final String LOCAL_HOST = "127.0.0.1"; - - private CloudFoundryClient client; - private String svc_username; - private String svc_passwd; - private String svc_dbname; - private String svc_vhost; - private TunnelServer tunnelServer; - - private DataSource ds; - - @BeforeClass - public static void printTargetInfo() { - System.out.println("Running tests on " + VCAP_TARGET + " on behalf of " + VCAP_EMAIL); - if (VCAP_PASSWD == null) { - Assert.fail("System property vcap.passwd must be specified, supply -Dvcap.passwd="); - } - } - - @Before - public void setUp() throws Exception { - client = clientInit(); - checkForCaldecottServerApp(); - } - - @Test - public void testTunnel() { - logger.info("Tunnel using " + VCAP_TARGET + " for user " + VCAP_EMAIL); - logger.info("Auth token is " + TunnelHelper.getTunnelAuth(client)); - } - - @Test - public void testMysql() { - long start = System.currentTimeMillis(); - logger.info("MySQL:"); - createService(VCAP_MYSQL_SERVICE, "mysql", "5.1"); - int tunnelPort = LOCAL_PORT; - createTunnelServer(VCAP_MYSQL_SERVICE, tunnelPort); - ds = new SimpleDriverDataSource(); - String url = "jdbc:mysql://"+ LOCAL_HOST + ":" + tunnelPort + "/" + svc_dbname + "?rewriteBatchedStatements=true"; - ((SimpleDriverDataSource)ds).setDriverClass(com.mysql.jdbc.Driver.class); - ((SimpleDriverDataSource)ds).setUrl(url); - ((SimpleDriverDataSource)ds).setUsername(svc_username); - ((SimpleDriverDataSource)ds).setPassword(svc_passwd); - JdbcTemplate jdbcTemplate = new JdbcTemplate(ds); - jdbcTemplate.execute("create table records (id smallint, " + - "name varchar(100), address varchar(100), city varchar(100), country varchar(100), " + - "age smallint)"); - Connection con = DataSourceUtils.getConnection(ds); - IDatabaseConnection dbUnitCon = null; - try { - dbUnitCon = new DatabaseConnection(con); - } catch (DatabaseUnitException e) { - System.out.println(e); - } - dbUnitCon.getConfig().setProperty(DatabaseConfig.FEATURE_BATCHED_STATEMENTS, Boolean.TRUE); - dbUnitCon.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new MySqlDataTypeFactory()); - IDataSet dataSet = null; - try { - dataSet = new XmlDataSet(new FileInputStream("data/load.xml")); - } catch (IOException e) { - System.out.println(e); - } catch (DataSetException e) { - System.out.println(e); - } - try { - try { - DatabaseOperation.CLEAN_INSERT.execute(dbUnitCon, dataSet); - } catch (DatabaseUnitException e) { - System.out.println(e); - } catch (SQLException e) { - System.out.println(e); - } - } finally { - DataSourceUtils.releaseConnection(con, ds); - } - - int count = jdbcTemplate.queryForInt("select count(*) from records"); - Assert.assertEquals("Did not load the data correctly", 200, count); - - stopTunnelServer(); - removeService(VCAP_MYSQL_SERVICE); - logger.info("Time elapsed: " + (System.currentTimeMillis() - start) / 1000.0d + " sec"); - } - - @Test - public void testPostgreSql() { - long start = System.currentTimeMillis(); - logger.info("PostgreSQL:"); - createService(VCAP_POSTGRES_SERVICE, "postgresql", "9.0"); - int tunnelPort = LOCAL_PORT + 1; - createTunnelServer(VCAP_POSTGRES_SERVICE, tunnelPort); - ds = new SimpleDriverDataSource(); - String url = "jdbc:postgresql://"+ LOCAL_HOST + ":" + tunnelPort + "/" + svc_dbname; - ((SimpleDriverDataSource)ds).setDriverClass(org.postgresql.Driver.class); - ((SimpleDriverDataSource)ds).setUrl(url); - ((SimpleDriverDataSource)ds).setUsername(svc_username); - ((SimpleDriverDataSource)ds).setPassword(svc_passwd); - JdbcTemplate jdbcTemplate = new JdbcTemplate(ds); - jdbcTemplate.execute("create table records (id smallint, " + - "name varchar(100), address varchar(100), city varchar(100), country varchar(100), " + - "age smallint)"); - // Test data - Connection con = DataSourceUtils.getConnection(ds); - IDatabaseConnection dbUnitCon = null; - try { - dbUnitCon = new DatabaseConnection(con); - } catch (DatabaseUnitException e) { - System.out.println(e); - } - dbUnitCon.getConfig().setProperty(DatabaseConfig.FEATURE_BATCHED_STATEMENTS, Boolean.TRUE); - dbUnitCon.getConfig().setProperty(DatabaseConfig.PROPERTY_DATATYPE_FACTORY, new PostgresqlDataTypeFactory()); - IDataSet dataSet = null; - try { - dataSet = new XmlDataSet(new FileInputStream("data/load.xml")); - } catch (IOException e) { - System.out.println(e); - } catch (DataSetException e) { - System.out.println(e); - } - try { - try { - DatabaseOperation.CLEAN_INSERT.execute(dbUnitCon, dataSet); - } catch (DatabaseUnitException e) { - System.out.println(e); - } catch (SQLException e) { - System.out.println(e); - } - } finally { - DataSourceUtils.releaseConnection(con, ds); - } - - int count = jdbcTemplate.queryForInt("select count(*) from records"); - Assert.assertEquals("Did not load the data correctly", 200, count); - - stopTunnelServer(); - removeService(VCAP_POSTGRES_SERVICE); - logger.info("Time elapsed: " + (System.currentTimeMillis() - start) / 1000.0d + " sec"); - } - - @Test - public void testMongoDb() throws UnknownHostException { - long start = System.currentTimeMillis(); - logger.info("MongoDB:"); - createService(VCAP_MONGO_SERVICE, "mongodb", "1.8"); - int tunnelPort = LOCAL_PORT + 2; - createTunnelServer(VCAP_MONGO_SERVICE, tunnelPort); - Mongo mongo = new Mongo(LOCAL_HOST, tunnelPort); - MongoDbFactory mdbf = new SimpleMongoDbFactory(mongo, svc_dbname, new UserCredentials(svc_username, svc_passwd)); - MongoTemplate mongoTemplate = new MongoTemplate(mdbf); - // Test data - ObjectMapper objectMapper = new ObjectMapper(); - Map dataMap = null; - try { - dataMap = objectMapper.readValue(new File("data/load.json"), Map.class); - } catch (IOException e) { - e.printStackTrace(); - } - List> l = (List>) dataMap.get("records"); - for (Map m : l) { - Map rec = (Map) m.get("record"); - final BasicDBObject dbo = new BasicDBObject(); - dbo.putAll(rec); - mongoTemplate.execute("records", new CollectionCallback() { - public Object doInCollection(DBCollection collection) throws MongoException, DataAccessException { - collection.insert(dbo); - return null; - } - }); - } - List records = mongoTemplate.findAll(BasicDBObject.class, "records"); - Assert.assertEquals("Did not load the data correctly", 200, records.size()); - mongo.close(); - - stopTunnelServer(); - removeService(VCAP_MONGO_SERVICE); - logger.info("Time elapsed: " + (System.currentTimeMillis() - start) / 1000.0d + " sec"); - } - - @Test - public void testRedis() { - long start = System.currentTimeMillis(); - logger.info("Redis:"); - createService(VCAP_REDIS_SERVICE, "redis", "2.2"); - int tunnelPort = LOCAL_PORT + 3; - createTunnelServer(VCAP_REDIS_SERVICE, tunnelPort); - - JedisConnectionFactory connectionFactory = new JedisConnectionFactory(); - connectionFactory.setHostName(LOCAL_HOST); - connectionFactory.setPort(tunnelPort); - connectionFactory.setPassword(svc_passwd); - connectionFactory.setUsePool(true); - connectionFactory.afterPropertiesSet(); - RedisTemplate redisTemplate = new RedisTemplate(); - redisTemplate.setConnectionFactory(connectionFactory); - redisTemplate.afterPropertiesSet(); - - ValueOperations valueOps = redisTemplate.opsForValue(); - - // Test data - ObjectMapper objectMapper = new ObjectMapper(); - Map dataMap = null; - try { - dataMap = objectMapper.readValue(new File("data/load.json"), Map.class); - } catch (IOException e) { - e.printStackTrace(); - } - List> l = (List>) dataMap.get("records"); - Map values = new HashMap(); - List ids = new ArrayList(); - for (Map m : l) { - Map rec = (Map) m.get("record"); - String id = "rec-" + rec.get("_id"); - values.put(id, (String) rec.get("name")); - ids.add(id); - } - valueOps.multiSet(values); - - List names = valueOps.multiGet(ids); - - Assert.assertEquals("Did not load the data correctly", 200, names.size()); - - connectionFactory.destroy(); - - stopTunnelServer(); - removeService(VCAP_REDIS_SERVICE); - logger.info("Time elapsed: " + (System.currentTimeMillis() - start) / 1000.0d + " sec"); - } - - @Test - public void testRabbit() { - long start = System.currentTimeMillis(); - logger.info("RabbitMQ:"); - createService(VCAP_RABBIT_SERVICE, "rabbitmq", "2.4"); - int tunnelPort = LOCAL_PORT + 4; - createTunnelServer(VCAP_RABBIT_SERVICE, tunnelPort); - - CachingConnectionFactory connectionFactory = new CachingConnectionFactory(LOCAL_HOST, tunnelPort); - connectionFactory.setUsername(svc_username); - connectionFactory.setPassword(svc_passwd); - connectionFactory.setVirtualHost(svc_vhost); - - String queueName = "CLOUD"; - AmqpAdmin amqpAdmin = new RabbitAdmin(connectionFactory); - Queue cloudQueue = new Queue(queueName); - amqpAdmin.declareQueue(cloudQueue); - - RabbitTemplate template = new RabbitTemplate(connectionFactory); - template.setRoutingKey(queueName); - template.setQueue(queueName); - template.afterPropertiesSet(); - - template.convertAndSend("Hello, CloudFoundry!"); - template.convertAndSend("Hello, Spring!"); - template.convertAndSend("Hello, Java!"); - template.convertAndSend("Hello, Caldecott!"); - template.convertAndSend("Hello, Rabbit!"); - template.convertAndSend("Hello, AMQP!"); - - int count = 0; - while (true) { - String message = (String) template.receiveAndConvert(); - if (message == null) { - break; - } - else { - count++; - } - } - - Assert.assertEquals("Did not send/receive the messages correctly", 6, count); - - connectionFactory.destroy(); - - stopTunnelServer(); - removeService(VCAP_RABBIT_SERVICE); - logger.info("Time elapsed: " + (System.currentTimeMillis() - start) / 1000.0d + " sec"); - } - - @After - public void cleanup() { - deleteCaldecottServerApp(); - finalize(this.client); - } - - private void deleteCaldecottServerApp() { - CloudApplication app = null; - try { - app = client.getApplication(TunnelHelper.getTunnelAppName()); - } catch (CloudFoundryException ignore) {} - if (app != null) { - client.deleteApplication(TunnelHelper.getTunnelAppName()); - } - } - - private void checkForCaldecottServerApp() throws Exception { - CloudApplication app = null; - try { - try { - app = client.getApplication(TunnelHelper.getTunnelAppName()); - } catch (CloudFoundryException ignore) {} - if (app == null) { - TunnelHelper.deployTunnelApp(client); - app = client.getApplication(TunnelHelper.getTunnelAppName()); - } - } catch (Exception e) { - logger.error("Error deploying Caldecott app", e); - throw new TunnelException("Error deploying Caldecott app", e); - } - } - - private void createService(String dbSvcName, String dbType, String dbVersion) { - try { - client.getService(dbSvcName); - client.deleteService(dbSvcName); - } catch (Exception ignore) {} - client.stopApplication(TunnelHelper.getTunnelAppName()); - CloudService cloudSvc = new CloudService(); - cloudSvc.setName(dbSvcName); - cloudSvc.setVersion(dbVersion); - // for v1 - cloudSvc.setVendor(dbType); - cloudSvc.setTier("free"); - // for v2 - cloudSvc.setLabel(dbType); - cloudSvc.setPlan("D100"); - cloudSvc.setProvider("core"); - // create service - client.createService(cloudSvc); - client.bindService(TunnelHelper.getTunnelAppName(), dbSvcName); - client.startApplication(TunnelHelper.getTunnelAppName()); - try { - Thread.sleep(2000L); - } catch (InterruptedException e) {} - } - - private void removeService(String dbSvcName) { - client.stopApplication(TunnelHelper.getTunnelAppName()); - client.unbindService(TunnelHelper.getTunnelAppName(), dbSvcName); - client.startApplication(TunnelHelper.getTunnelAppName()); - client.deleteService(dbSvcName); - } - - private void createTunnelServer(String dbSvcName, int tunnelPort) { - logger.info("Starting tunnel on " + LOCAL_HOST +" port " + tunnelPort); - InetSocketAddress local = new InetSocketAddress(LOCAL_HOST, tunnelPort); - String url = TunnelHelper.getTunnelUri(client); - Map info = TunnelHelper.getTunnelServiceInfo(client, dbSvcName); - String host = info.get("hostname"); - int port = Integer.valueOf(info.get("port")); - String auth = TunnelHelper.getTunnelAuth(client); - svc_username = info.get("username"); - svc_passwd = info.get("password"); - svc_dbname = info.get("db") != null ? info.get("db") : info.get("name"); - svc_vhost = info.get("vhost"); - tunnelServer = new TunnelServer(local, new HttpTunnelFactory(url, host, port, auth)); - tunnelServer.start(); - } - - private void stopTunnelServer() { - tunnelServer.stop(); - } - - private static CloudFoundryClient clientInit() { - URL vcapUrl = null; - try { - vcapUrl = new URL(VCAP_TARGET); - } catch (MalformedURLException e) { - throw new RuntimeException(e); - } - CloudFoundryClient client = new CloudFoundryClient(new CloudCredentials(VCAP_EMAIL, VCAP_PASSWD), vcapUrl); - client.login(); - String version = client.getCloudInfo().getVersion(); - if (Float.valueOf(version) >= 2.0) { - client = new CloudFoundryClient(new CloudCredentials(VCAP_EMAIL, VCAP_PASSWD), vcapUrl, getSpace(client)); - client.login(); - } - return client; - } - - private static CloudSpace getSpace(CloudFoundryClient client) { - List spaces = client.getSpaces(); - CloudSpace useSpace = null; - for (CloudSpace space : spaces) { - if (space.getOrganization().getName().equals(VCAP_ORG) && space.getName().equals(VCAP_SPACE)) { - useSpace = space; - break; - } - } - return useSpace; - } - - private static void finalize(CloudFoundryClient client) { - client.logout(); - } -} diff --git a/cloudfoundry-caldecott-test/src/test/resources/log4j.xml b/cloudfoundry-caldecott-test/src/test/resources/log4j.xml deleted file mode 100644 index 1748e0582bd..00000000000 --- a/cloudfoundry-caldecott-test/src/test/resources/log4j.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/cloudfoundry-client-lib/.gitignore b/cloudfoundry-client-lib/.gitignore deleted file mode 100644 index 11759d0508c..00000000000 --- a/cloudfoundry-client-lib/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -dependency-reduced-pom.xml -/target diff --git a/cloudfoundry-client-lib/API_changes.md b/cloudfoundry-client-lib/API_changes.md deleted file mode 100644 index 7775abc18ff..00000000000 --- a/cloudfoundry-client-lib/API_changes.md +++ /dev/null @@ -1,83 +0,0 @@ -Cloud Foundry Client Library -============================ - -API Changes for version 0.8.6: ------------------------------- - -### Removed V1 concepts - -* Frameworks -* Runtimes -* ServiceConfiguration (replaced by CloudServiceOffering) -* Application plans -* CloudFoundryClient constructors and parameters modified accordingly - -### Added V2 concepts - -* Buildpack and command fields were added to the Staging object used for createApplication -* Space name and Org name added as a CloudFoundryClient constructor parameters - -API Changes for version 0.8.0 ------------------------------ - -### Package changes: - -The following classes have moved to the _org.cloudfoundry.client.lib.domain_ package - - * ApplicationStats.java - * CloudApplication.java - * CloudEntity.java - * CloudInfo.java - * CloudResource.java - * CloudResources.java - * CloudService.java - * CrashInfo.java - * CrashesInfo.java - * DeploymentInfo.java - * InstanceInfo.java - * InstanceStats.java - * InstancesInfo.java - * ServiceConfiguration.java - * Staging.java - * UploadApplicationPayload.java - -The following classes have moved to the _org.cloudfoundry.client.lib.util_ package - - * CloudUtil.java - * StringHttpMessageConverterWithoutMediaType.java - * UploadApplicationPayloadHttpMessageConverter.java - -You will need to adjust the import statements for these classes - - -### Implementation changes: - -The _org.cloudfoundry.client.lib.CloudFoundryOperations_ interface defines the public API. You can use this interface or continue using the _org.cloudfoundry.client.lib.CloudFoundryClient_ class. - -All entity classes in the _org.cloudfoundry.client.lib.domain_ package have a CloudEntity.Meta property that hold the following attributes: - - * UUID guid; - * Date created; - * Date updated; - * int version; - -This allows you to determine the version of any entity using getMeta().getVersion() which should return 1 or 2 depending on the cloud controller version currently connected to. - -The following method has been removed from _CloudFoundryClient_: - - public T getFile(String appName, int instanceIndex, String filePath, RequestCallback requestCallback, ResponseExtractor responseHandler) - -The following methods have been removed from _CloudApplication_: - - public Map getMeta() - public void setMeta(Map meta) - -They are replaced with the following methods that are now available for all cloud entity classes: - - public CloudEntity.Meta getMeta() - public void setMeta(CloudEntity.Meta meta) - - -### Deprecations: - -The _org.cloudfoundry.client.lib.domain.CloudApplication_ class has been deprecated since it's not used anywhere in the library. You will have to replace this with your own implementation. diff --git a/cloudfoundry-client-lib/pom.xml b/cloudfoundry-client-lib/pom.xml deleted file mode 100644 index 67a59bd70b0..00000000000 --- a/cloudfoundry-client-lib/pom.xml +++ /dev/null @@ -1,440 +0,0 @@ - - - 4.0.0 - org.cloudfoundry - cloudfoundry-client-lib - 1.0.4.BUILD-SNAPSHOT - jar - Cloud Foundry Java Client Library - A Cloud Foundry client library for Java - http://github.com/cloudfoundry/cf-java-client - - - - Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0 - repo - - - - - http://github.com/cloudfoundry/cf-java-client - scm:git:git@github.com/cloudfoundry/cf-java-client - scm:git:git@github.com/cloudfoundry/cf-java-client - - - - 1.7 - 3.2.9.RELEASE - 1.0.5.RELEASE - 1.9.3 - 8.0.8 - 8.1.12.v20130726 - 2.1.3 - - - - - fast - - true - - - - - integration-test - - - - org.apache.maven.plugins - maven-surefire-plugin - - - **/CloudFoundryClientTest.java - - - NONE - - - - - - - org.jboss.byteman - byteman-rulecheck-maven-plugin - 2.1.3 - - - rulecheck-test - - rulecheck - - - - org.cloudfoundry - - - **/*.btm - - true - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - copy-test-app - - copy - - generate-test-resources - - - - org.cloudfoundry.test - non-ascii-file-name - 0.1.0.BUILD-SNAPSHOT - war - ${project.build.directory}/generated-test-resources - - - org.cloudfoundry.test - simple-spring-app - 0.1.0.BUILD-SNAPSHOT - war - ${project.build.directory}/generated-test-resources - - - true - - - - - - - - - - com.sun - tools - ${java.version} - system - ${tools.jar} - - - org.cloudfoundry.test - non-ascii-file-name - 0.1.0.BUILD-SNAPSHOT - war - provided - - - org.cloudfoundry.test - simple-spring-app - 0.1.0.BUILD-SNAPSHOT - war - provided - - - - - - - - default-toolsjar-profile - - - ${java.home}/../lib/tools.jar - - - - ${java.home}/../lib/tools.jar - - - - - mac-toolsjar-profile - - - ${java.home}/../Classes/classes.jar - - - - ${java.home}/../Classes/classes.jar - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.4 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - org.springframework - spring-webmvc - ${spring.framework.version} - - - - org.springframework.security.oauth - spring-security-oauth2 - ${spring.security.oauth.version} - - - org.springframework - spring-jdbc - - - - - - org.apache.httpcomponents - httpclient - 4.2.5 - - - commons-io - commons-io - 2.1 - - - - com.esotericsoftware.yamlbeans - yamlbeans - 1.06 - - - - org.codehaus.jackson - jackson-core-asl - ${jackson.version} - - - org.codehaus.jackson - jackson-mapper-asl - ${jackson.version} - - - - org.apache.tomcat.embed - tomcat-embed-websocket - ${tomcat.version} - - - org.apache.tomcat - juli - 6.0.39 - - - com.google.protobuf - protobuf-java - 2.5.0 - - - - junit - junit - 4.10 - test - - - org.hamcrest - hamcrest-all - 1.1 - test - - - org.mockito - mockito-core - 1.9.5 - test - - - org.springframework - spring-test - ${spring.framework.version} - test - - - org.eclipse.jetty - jetty-server - ${jetty.version} - test - - - org.eclipse.jetty - jetty-servlet - ${jetty.version} - test - - - org.eclipse.jetty - jetty-servlets - ${jetty.version} - test - - - log4j - log4j - 1.2.14 - test - - - org.jboss.byteman - byteman-bmunit - ${byteman.version} - test - - - - - - - org.springframework.build - aws-maven - 4.4.0.RELEASE - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${java.version} - ${java.version} - - - - com.github.igor-petruk.protobuf - protobuf-maven-plugin - 0.6.3 - - - - run - - - - - - org.apache.maven.plugins - maven-source-plugin - - - attach-sources - - jar - - - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.8 - - - - **/*Test.java - - - **/CloudFoundryClientTest.java - **/Abstract*.java - - - - - org.apache.maven.plugins - maven-shade-plugin - 2.1 - - - package - - shade - - - - - org.codehaus.jackson:* - - - - - org.codehaus.jackson - org.cloudfoundry.client.lib.org.codehaus.jackson - - - - - - - - - - src/test/resources - - - ${project.build.directory}/generated-test-resources - - - - - - - sonatype-ossrh-staging - Sonatype OSSRH - http://oss.sonatype.org/service/local/staging/deploy/maven2 - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - - - - rladdad - Ramnivas Laddad - rladdad at gopivotal.com - - - sfrederick - Scott Frederick - sfrederick at gopivotal.com - - - - diff --git a/cloudfoundry-client-lib/src/main/java/META-INF/MANIFEST.MF b/cloudfoundry-client-lib/src/main/java/META-INF/MANIFEST.MF deleted file mode 100644 index b3c893a3a0a..00000000000 --- a/cloudfoundry-client-lib/src/main/java/META-INF/MANIFEST.MF +++ /dev/null @@ -1,3 +0,0 @@ -Manifest-Version: 1.0 -Class-Path: - diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/ApplicationLogListener.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/ApplicationLogListener.java deleted file mode 100644 index 119348f56f7..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/ApplicationLogListener.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.cloudfoundry.client.lib; - -import org.cloudfoundry.client.lib.domain.ApplicationLog; - -public interface ApplicationLogListener { - void onMessage(ApplicationLog log); - - void onComplete(); - - void onError(Throwable exception); - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/ClientHttpResponseCallback.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/ClientHttpResponseCallback.java deleted file mode 100644 index 52f79dd2541..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/ClientHttpResponseCallback.java +++ /dev/null @@ -1,14 +0,0 @@ -package org.cloudfoundry.client.lib; - -import java.io.IOException; - -import org.springframework.http.client.ClientHttpResponse; - -/** - * Callback class while the client receives the server response. - * - */ -public interface ClientHttpResponseCallback { - - public void onClientHttpResponse(ClientHttpResponse clientHttpResponse) throws IOException; -} \ No newline at end of file diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudCredentials.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudCredentials.java deleted file mode 100644 index 965cd43b5e0..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudCredentials.java +++ /dev/null @@ -1,198 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import org.springframework.security.oauth2.common.OAuth2AccessToken; - -/** - * Class that encapsulates credentials used for authentication - * - * @author Thomas Risberg - */ -public class CloudCredentials { - - private String email; - - private String password; - - private String clientId = "cf"; - - private String clientSecret = ""; - - private OAuth2AccessToken token; - - private String proxyUser; - - /** - * Create credentials using email and password. - * - * @param email email to authenticate with - * @param password the password - */ - public CloudCredentials(String email, String password) { - this.email = email; - this.password = password; - } - - /** - * Create credentials using email, password, and client ID. - * - * @param email email to authenticate with - * @param password the password - * @param clientId the client ID to use for authorization - */ - public CloudCredentials(String email, String password, String clientId) { - this.email = email; - this.password = password; - this.clientId = clientId; - } - - /** - * Create credentials using email, password and client ID. - * @param email email to authenticate with - * @param password the password - * @param clientId the client ID to use for authorization - * @param clientSecret the secret for the given client - */ - public CloudCredentials(String email, String password, String clientId, String clientSecret) { - this.email = email; - this.password = password; - this.clientId = clientId; - this.clientSecret = clientSecret; - } - - /** - * Create credentials using a token. - * - * @param token token to use for authorization - */ - public CloudCredentials(OAuth2AccessToken token) { - this.token = token; - } - - /** - * Create credentials using a token. - * - * @param token token to use for authorization - * @param clientId the client ID to use for authorization - */ - public CloudCredentials(OAuth2AccessToken token, String clientId) { - this.token = token; - this.clientId = clientId; - } - - /** - * Create credentials using a token. - * - * @param token token to use for authorization - * @param clientId the client ID to use for authorization - * @param clientSecret the password for the specified client - */ - public CloudCredentials(OAuth2AccessToken token, String clientId, String clientSecret) { - this.token = token; - this.clientId = clientId; - this.clientSecret = clientSecret; - } - - /** - * Create proxy credentials. - * - * @param cloudCredentials credentials to use - * @param proxyForUser user to be proxied - */ - public CloudCredentials(CloudCredentials cloudCredentials, String proxyForUser) { - this.email = cloudCredentials.getEmail(); - this.password = cloudCredentials.getPassword(); - this.clientId = cloudCredentials.getClientId(); - this.token = cloudCredentials.getToken(); - this.proxyUser = proxyForUser; - } - - /** - * Get the email. - * - * @return the email - */ - public String getEmail() { - return email; - } - - /** - * Get the password. - * - * @return the password - */ - public String getPassword() { - return password; - } - - /** - * Get the token. - * - * @return the token - */ - public OAuth2AccessToken getToken() { - return token; - } - - /** - * Get the client ID. - * - * @return the client ID - */ - public String getClientId() { - return clientId; - } - - /** - * Get the client secret - * - * @return the client secret - */ - public String getClientSecret() { - return clientSecret; - } - - /** - * Get the proxy user. - * - * @return the proxy user - */ - public String getProxyUser() { - return proxyUser; - } - - /** - * Is this a proxied set of credentials? - * - * @return whether a proxy user is set - */ - public boolean isProxyUserSet() { - return proxyUser != null; - } - - /** - * Run commands as a different user. The authenticated user must be - * privileged to run as this user. - - * @param user the user to proxy for - * @return credentials for the proxied user - */ - public CloudCredentials proxyForUser(String user) { - return new CloudCredentials(this, user); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryClient.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryClient.java deleted file mode 100644 index 55c1d811c37..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryClient.java +++ /dev/null @@ -1,518 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudApplication.DebugMode; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudQuota; -import org.cloudfoundry.client.lib.domain.CloudRoute; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceBroker; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.domain.CloudStack; -import org.cloudfoundry.client.lib.domain.CrashesInfo; -import org.cloudfoundry.client.lib.domain.InstancesInfo; -import org.cloudfoundry.client.lib.domain.Staging; -import org.cloudfoundry.client.lib.rest.CloudControllerClient; -import org.cloudfoundry.client.lib.rest.CloudControllerClientFactory; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.util.Assert; -import org.springframework.web.client.ResponseErrorHandler; - -/** - * A Java client to exercise the Cloud Foundry API. - * - * @author Ramnivas Laddad - * @author A.B.Srinivasan - * @author Jennifer Hickey - * @author Dave Syer - * @author Thomas Risberg - */ -public class CloudFoundryClient implements CloudFoundryOperations { - - private CloudControllerClient cc; - - private CloudInfo info; - - /** - * Construct client for anonymous user. Useful only to get to the '/info' endpoint. - */ - - public CloudFoundryClient(URL cloudControllerUrl) { - this(null, cloudControllerUrl, null, (HttpProxyConfiguration) null, false); - } - - public CloudFoundryClient(URL cloudControllerUrl, boolean trustSelfSignedCerts) { - this(null, cloudControllerUrl, null, (HttpProxyConfiguration) null, trustSelfSignedCerts); - } - - public CloudFoundryClient(URL cloudControllerUrl, HttpProxyConfiguration httpProxyConfiguration) { - this(null, cloudControllerUrl, null, httpProxyConfiguration, false); - } - - public CloudFoundryClient(URL cloudControllerUrl, HttpProxyConfiguration httpProxyConfiguration, - boolean trustSelfSignedCerts) { - this(null, cloudControllerUrl, null, httpProxyConfiguration, trustSelfSignedCerts); - } - - /** - * Construct client without a default org and space. - */ - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl) { - this(credentials, cloudControllerUrl, null, (HttpProxyConfiguration) null, false); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, - boolean trustSelfSignedCerts) { - this(credentials, cloudControllerUrl, null, (HttpProxyConfiguration) null, trustSelfSignedCerts); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, - HttpProxyConfiguration httpProxyConfiguration) { - this(credentials, cloudControllerUrl, null, httpProxyConfiguration, false); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, - HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - this(credentials, cloudControllerUrl, null, httpProxyConfiguration, trustSelfSignedCerts); - } - - /** - * Construct a client with a default CloudSpace. - */ - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace) { - this(credentials, cloudControllerUrl, sessionSpace, null, false); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace, - boolean trustSelfSignedCerts) { - this(credentials, cloudControllerUrl, sessionSpace, null, trustSelfSignedCerts); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace, - HttpProxyConfiguration httpProxyConfiguration) { - this(credentials, cloudControllerUrl, sessionSpace, httpProxyConfiguration, false); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, CloudSpace sessionSpace, - HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - Assert.notNull(cloudControllerUrl, "URL for cloud controller cannot be null"); - CloudControllerClientFactory cloudControllerClientFactory = - new CloudControllerClientFactory(httpProxyConfiguration, trustSelfSignedCerts); - this.cc = cloudControllerClientFactory.newCloudController(cloudControllerUrl, credentials, sessionSpace); - } - - /** - * Construct a client with a default space name and org name. - */ - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName) { - this(credentials, cloudControllerUrl, orgName, spaceName, null, false); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName, - boolean trustSelfSignedCerts) { - this(credentials, cloudControllerUrl, orgName, spaceName, null, trustSelfSignedCerts); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName, - HttpProxyConfiguration httpProxyConfiguration) { - this(credentials, cloudControllerUrl, orgName, spaceName, httpProxyConfiguration, false); - } - - public CloudFoundryClient(CloudCredentials credentials, URL cloudControllerUrl, String orgName, String spaceName, - HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - Assert.notNull(cloudControllerUrl, "URL for cloud controller cannot be null"); - CloudControllerClientFactory cloudControllerClientFactory = - new CloudControllerClientFactory(httpProxyConfiguration, trustSelfSignedCerts); - this.cc = cloudControllerClientFactory.newCloudController(cloudControllerUrl, credentials, orgName, spaceName); - } - - /** - * Construct a client with a pre-configured CloudControllerClient - */ - public CloudFoundryClient(CloudControllerClient cc) { - this.cc = cc; - } - - public void setResponseErrorHandler(ResponseErrorHandler errorHandler) { - cc.setResponseErrorHandler(errorHandler); - } - - public URL getCloudControllerUrl() { - return cc.getCloudControllerUrl(); - } - - public CloudInfo getCloudInfo() { - if (info == null) { - info = cc.getInfo(); - } - return info; - } - - public List getSpaces() { - return cc.getSpaces(); - } - - public List getOrganizations() { - return cc.getOrganizations(); - } - - public void register(String email, String password) { - cc.register(email, password); - } - - public void updatePassword(String newPassword) { - cc.updatePassword(newPassword); - } - - public void updatePassword(CloudCredentials credentials, String newPassword) { - cc.updatePassword(credentials, newPassword); - } - - public void unregister() { - cc.unregister(); - } - - public OAuth2AccessToken login() { - return cc.login(); - } - - public void logout() { - cc.logout(); - } - - public List getApplications() { - return cc.getApplications(); - } - - public CloudApplication getApplication(String appName) { - return cc.getApplication(appName); - } - - public CloudApplication getApplication(UUID appGuid) { - return cc.getApplication(appGuid); - } - - public ApplicationStats getApplicationStats(String appName) { - return cc.getApplicationStats(appName); - } - - public void createApplication(String appName, Staging staging, Integer memory, List uris, - List serviceNames) { - cc.createApplication(appName, staging, memory, uris, serviceNames); - } - - public void createApplication(String appName, Staging staging, Integer disk, Integer memory, List uris, - List serviceNames) { - cc.createApplication(appName, staging, disk, memory, uris, serviceNames); - } - - public void createService(CloudService service) { - cc.createService(service); - } - - public void createUserProvidedService(CloudService service, Map credentials) { - cc.createUserProvidedService(service, credentials); - } - - public void uploadApplication(String appName, String file) throws IOException { - cc.uploadApplication(appName, new File(file), null); - } - - public void uploadApplication(String appName, File file) throws IOException { - cc.uploadApplication(appName, file, null); - } - - public void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException { - cc.uploadApplication(appName, file, callback); - } - - public void uploadApplication(String appName, ApplicationArchive archive) throws IOException { - cc.uploadApplication(appName, archive, null); - } - - public void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException { - cc.uploadApplication(appName, archive, callback); - } - - public StartingInfo startApplication(String appName) { - return cc.startApplication(appName); - } - - public void debugApplication(String appName, DebugMode mode) { - cc.debugApplication(appName, mode); - } - - public void stopApplication(String appName) { - cc.stopApplication(appName); - } - - public StartingInfo restartApplication(String appName) { - return cc.restartApplication(appName); - } - - public void deleteApplication(String appName) { - cc.deleteApplication(appName); - } - - public void deleteAllApplications() { - cc.deleteAllApplications(); - } - - public void deleteAllServices() { - cc.deleteAllServices(); - } - - public void updateApplicationDiskQuota(String appName, int disk) { - cc.updateApplicationDiskQuota(appName, disk); - } - - public void updateApplicationMemory(String appName, int memory) { - cc.updateApplicationMemory(appName, memory); - } - - public void updateApplicationInstances(String appName, int instances) { - cc.updateApplicationInstances(appName, instances); - } - - public void updateApplicationServices(String appName, List services) { - cc.updateApplicationServices(appName, services); - } - - public void updateApplicationStaging(String appName, Staging staging) { - cc.updateApplicationStaging(appName, staging); - } - - public void updateApplicationUris(String appName, List uris) { - cc.updateApplicationUris(appName, uris); - } - - public void updateApplicationEnv(String appName, Map env) { - cc.updateApplicationEnv(appName, env); - } - - public void updateApplicationEnv(String appName, List env) { - cc.updateApplicationEnv(appName, env); - } - - /** - * @deprecated use {@link #streamLogs(String, ApplicationLogListener)} or {@link #getRecentLogs(String)} - */ - public Map getLogs(String appName) { - return cc.getLogs(appName); - } - - public StreamingLogToken streamLogs(String appName, ApplicationLogListener listener) { - return cc.streamLogs(appName, listener); - } - - public List getRecentLogs(String appName) { - return cc.getRecentLogs(appName); - } - - /** - * @deprecated use {@link #streamLogs(String, ApplicationLogListener)} or {@link #getRecentLogs(String)} - */ - public Map getCrashLogs(String appName) { - return cc.getCrashLogs(appName); - } - - public String getStagingLogs(StartingInfo info, int offset) { - return cc.getStagingLogs(info, offset); - } - - public String getFile(String appName, int instanceIndex, String filePath) { - return cc.getFile(appName, instanceIndex, filePath, 0, -1); - } - - public String getFile(String appName, int instanceIndex, String filePath, int startPosition) { - Assert.isTrue(startPosition >= 0, - startPosition + " is not a valid value for start position, it should be 0 or greater."); - return cc.getFile(appName, instanceIndex, filePath, startPosition, -1); - } - - public String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition) { - Assert.isTrue(startPosition >= 0, - startPosition + " is not a valid value for start position, it should be 0 or greater."); - Assert.isTrue(endPosition > startPosition, - endPosition + " is not a valid value for end position, it should be greater than startPosition " + - "which is " + startPosition + "."); - return cc.getFile(appName, instanceIndex, filePath, startPosition, endPosition - 1); - } - - public void openFile(String appName, int instanceIndex, String filePath, ClientHttpResponseCallback callback) { - cc.openFile(appName, instanceIndex, filePath, callback); - } - - public String getFileTail(String appName, int instanceIndex, String filePath, int length) { - Assert.isTrue(length > 0, length + " is not a valid value for length, it should be 1 or greater."); - return cc.getFile(appName, instanceIndex, filePath, -1, length); - } - - // list services, un/provision services, modify instance - - public List getServices() { - return cc.getServices(); - } - - public List getServiceBrokers() { - return cc.getServiceBrokers(); - } - - public CloudService getService(String service) { - return cc.getService(service); - } - - public void deleteService(String service) { - cc.deleteService(service); - } - - public List getServiceOfferings() { - return cc.getServiceOfferings(); - } - - public void bindService(String appName, String serviceName) { - cc.bindService(appName, serviceName); - } - - public void unbindService(String appName, String serviceName) { - cc.unbindService(appName, serviceName); - } - - public InstancesInfo getApplicationInstances(String appName) { - return cc.getApplicationInstances(appName); - } - - public InstancesInfo getApplicationInstances(CloudApplication app) { - return cc.getApplicationInstances(app); - } - - public CrashesInfo getCrashes(String appName) { - return cc.getCrashes(appName); - } - - public List getStacks() { - return cc.getStacks(); - } - - public CloudStack getStack(String name) { - return cc.getStack(name); - } - - public void rename(String appName, String newName) { - cc.rename(appName, newName); - } - - public List getDomainsForOrg() { - return cc.getDomainsForOrg(); - } - - public List getPrivateDomains() { - return cc.getPrivateDomains(); - } - - public List getSharedDomains() { - return cc.getSharedDomains(); - } - - public List getDomains() { - return cc.getDomains(); - } - - public CloudDomain getDefaultDomain() { - return cc.getDefaultDomain(); - } - - public void addDomain(String domainName) { - cc.addDomain(domainName); - } - - public void deleteDomain(String domainName) { - cc.deleteDomain(domainName); - } - - public void removeDomain(String domainName) { - cc.removeDomain(domainName); - } - - public List getRoutes(String domainName) { - return cc.getRoutes(domainName); - } - - public void addRoute(String host, String domainName) { - cc.addRoute(host, domainName); - } - - public void deleteRoute(String host, String domainName) { - cc.deleteRoute(host, domainName); - } - - public void registerRestLogListener(RestLogCallback callBack) { - cc.registerRestLogListener(callBack); - } - - public void unRegisterRestLogListener(RestLogCallback callBack) { - cc.unRegisterRestLogListener(callBack); - } - - public CloudOrganization getOrgByName(String orgName, boolean required){ - return cc.getOrgByName(orgName, required); - } - - public List getQuotas() { - return cc.getQuotas(); - } - - public CloudQuota getQuotaByName(String quotaName, boolean required){ - return cc.getQuotaByName(quotaName, required); - } - - public void setQuotaToOrg(String orgName, String quotaName) { - cc.setQuotaToOrg(orgName, quotaName); - } - - public void createQuota(CloudQuota quota){ - cc.createQuota(quota); - } - - public void deleteQuota(String quotaName){ - cc.deleteQuota(quotaName); - } - - public void updateQuota(CloudQuota quota, String name) { - cc.updateQuota(quota, name); - - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryException.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryException.java deleted file mode 100644 index cdb6cddce1d..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryException.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import org.springframework.http.HttpStatus; -import org.springframework.web.client.HttpClientErrorException; - -@SuppressWarnings("serial") -public class CloudFoundryException extends HttpClientErrorException { - - - private String description; - - private int cloudFoundryErrorCode = -1; - - public CloudFoundryException(HttpStatus statusCode) { - super(statusCode); - } - - public CloudFoundryException(HttpStatus statusCode, String statusText) { - super(statusCode, statusText); - } - - public CloudFoundryException(HttpStatus statusCode, String statusText, int cloudFoundryErrorCode) { - super(statusCode, statusText); - this.cloudFoundryErrorCode = cloudFoundryErrorCode; - } - - /** - * Construct a new instance of {@code CloudFoundryException} based on a {@link HttpStatus}, status text and description. - * @param statusCode the status code - * @param statusText the status text - * @param description the description - */ - public CloudFoundryException(HttpStatus statusCode, String statusText, String description) { - super(statusCode, statusText); - this.description = description; - } - - public String getDescription() { - return description; - } - - public void setDescription(String description) { - this.description = description; - } - - /** - * Returns an additional error code that is specific to failures in Cloud Foundry requests or behaviour. - * @return Cloud Foundry error code, if available, or -1 if unknown. - */ - public int getCloudFoundryErrorCode() { - return cloudFoundryErrorCode; - } - - @Override - public String toString() { - if (description != null) { - return super.toString() + " (" + description + ")"; - } - return super.toString(); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryOperations.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryOperations.java deleted file mode 100644 index 59268199658..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudFoundryOperations.java +++ /dev/null @@ -1,698 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.Map; - -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudQuota; -import org.cloudfoundry.client.lib.domain.CloudRoute; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceBroker; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.domain.CloudStack; -import org.cloudfoundry.client.lib.domain.CrashesInfo; -import org.cloudfoundry.client.lib.domain.InstancesInfo; -import org.cloudfoundry.client.lib.domain.Staging; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.web.client.ResponseErrorHandler; - -/** - * The interface defining operations making up the Cloud Foundry Java client's API. - * - * @author Ramnivas Laddad - * @author A.B.Srinivasan - * @author Jennifer Hickey - * @author Dave Syer - * @author Thomas Risberg - */ -public interface CloudFoundryOperations { - - /** - * Override the default REST response error handler with a custom error handler. - * - * @param errorHandler - */ - void setResponseErrorHandler(ResponseErrorHandler errorHandler); - - /** - * Get the URL used for the cloud controller. - * - * @return the cloud controller URL - */ - URL getCloudControllerUrl(); - - /** - * Get CloudInfo for the current cloud. - * - * @return CloudInfo object containing the cloud info - */ - CloudInfo getCloudInfo(); - - /** - * Get list of CloudSpaces for the current cloud. - * - * @return List of CloudSpace objects containing the space info - */ - List getSpaces(); - - /** - * Get list of CloudOrganizations for the current cloud. - * - * @return List of CloudOrganizations objects containing the organization info - */ - List getOrganizations(); - - /** - * Register new user account with the provided credentials. - * - * @param email the email account - * @param password the password - */ - void register(String email, String password); - - /** - * Update the password for the logged in user. - * - * @param newPassword the new password - */ - void updatePassword(String newPassword); - - /** - * Update the password for the logged in user using - * the username/old_password provided in the credentials. - * - * @param credentials current credentials - * @param newPassword the new password - */ - void updatePassword(CloudCredentials credentials, String newPassword); - - /** - * Unregister and log out the currently logged in user - */ - void unregister(); - - /** - * Login using the credentials already set for the client. - * - * @return authentication token - */ - OAuth2AccessToken login(); - - /** - * Logout closing the current session. - */ - void logout(); - - /** - * Get all cloud applications. - * - * @return list of cloud applications - */ - List getApplications(); - - /** - * Get cloud application with the specified name. - * - * @param appName name of the app - * @return the cloud application - */ - CloudApplication getApplication(String appName); - - /** - * Get application stats for the app with the specified name. - * - * @param appName name of the app - * @return the cloud application stats - */ - ApplicationStats getApplicationStats(String appName); - - /** - * Create application. - * - * @param appName application name - * @param staging staging info - * @param memory memory to use in MB - * @param uris list of URIs for the app - * @param serviceNames list of service names to bind to app - */ - void createApplication(String appName, Staging staging, Integer memory, List uris, - List serviceNames); - - /** - * Create application. - * - * @param appName application name - * @param staging staging info - * @param disk disk quota to use in MB - * @param memory memory to use in MB - * @param uris list of URIs for the app - * @param serviceNames list of service names to bind to app - */ - public void createApplication(String appName, Staging staging, Integer disk, Integer memory, List uris, - List serviceNames); - - /** - * Create a service. - * - * @param service cloud service info - */ - void createService(CloudService service); - - /** - * Create a user-provided service. - * - * @param service cloud service info - * @param credentials the user-provided service credentials - */ - void createUserProvidedService(CloudService service, Map credentials); - - /** - * Upload an application. - * - * @param appName application name - * @param file path to the application archive or folder - * @throws java.io.IOException - */ - void uploadApplication(String appName, String file) throws IOException; - - /** - * Upload an application to cloud foundry. - * @param appName the application name - * @param file the application archive or folder - * @throws java.io.IOException - */ - void uploadApplication(String appName, File file) throws IOException; - - /** - * Upload an application to cloud foundry. - * @param appName the application name - * @param file the application archive - * @param callback a callback interface used to provide progress information or null - * @throws java.io.IOException - */ - void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException; - - /** - * Upload an application to cloud foundry. - * @param appName the application name - * @param archive the application archive - * @throws java.io.IOException - */ - void uploadApplication(String appName, ApplicationArchive archive) throws IOException; - - /** - * Upload an application to cloud foundry. - * @param appName the application name - * @param archive the application archive - * @param callback a callback interface used to provide progress information or null - * @throws java.io.IOException - */ - void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException; - - /** - * Start application. May return starting info if the response obtained after the start request contains headers. - * If the response does not contain headers, null is returned instead. - * - * @param appName - * name of application - * @return Starting info containing response headers, if headers are present in the response. If there are no headers, return null. - */ - StartingInfo startApplication(String appName); - - /** - * Debug application. - * - * @param appName name of application - * @param mode debug mode info - */ - void debugApplication(String appName, CloudApplication.DebugMode mode); - - /** - * Stop application. - * - * @param appName name of application - */ - void stopApplication(String appName); - - /** - * Restart application. - * - * @param appName name of application - */ - StartingInfo restartApplication(String appName); - - /** - * Delete application. - * - * @param appName name of application - */ - void deleteApplication(String appName); - - /** - * Delete all applications. - */ - void deleteAllApplications(); - - /** - * Delete all services. - */ - void deleteAllServices(); - - /** - * Update application disk quota. - * - * @param appName name of application - * @param disk new disk setting in MB - */ - void updateApplicationDiskQuota(String appName, int disk); - - /** - * Update application memory. - * - * @param appName name of application - * @param memory new memory setting in MB - */ - void updateApplicationMemory(String appName, int memory); - - /** - * Update application instances. - * - * @param appName name of application - * @param instances number of instances to use - */ - void updateApplicationInstances(String appName, int instances); - - /** - * Update application services. - * - * @param appName name of appplication - * @param services list of services that should be bound to app - */ - void updateApplicationServices(String appName, List services); - - /** - * Update application staging information. - * - * @param appName name of appplication - * @param staging staging information for the app - */ - void updateApplicationStaging(String appName, Staging staging); - - /** - * Update application URIs. - * - * @param appName name of application - * @param uris list of URIs the app should use - */ - void updateApplicationUris(String appName, List uris); - - /** - * Update application env using a map where the key specifies the name of the environment variable - * and the value the value of the environment variable.. - * - * @param appName name of application - * @param env map of environment settings - */ - void updateApplicationEnv(String appName, Map env); - - /** - * Update application env using a list of strings each with one environment setting. - * - * @param appName name of application - * @param env list of environment settings - */ - void updateApplicationEnv(String appName, List env); - - - /** - * Get logs from the deployed application. The logs - * will be returned in a Map keyed by the path of the log file - * (logs/stderr.log, logs/stdout.log). - * @param appName name of the application - * @return a Map containing the logs. The logs will be returned with the path to the log file used as the key and - * the full content of the log file will be returned as a String value for the corresponding key. - * @deprecated Use {@link #streamLogs(String, ApplicationLogListener)} or {@link #getRecentLogs(String)} - */ - Map getLogs(String appName); - - /** - * Stream application logs produced after this method is called. - * - * This method has 'tail'-like behavior. Every time there is a new log entry, - * it notifies the listener. - * - * @param appName the name of the application - * @param listener listener object to be notified - * @return token than can be used to cancel listening for logs - */ - StreamingLogToken streamLogs(String appName, ApplicationLogListener listener); - - /** - * Stream recent log entries. - * - * Stream logs that were recently produced for an app. - * - * @param appName the name of the application - * @return the list of recent log entries - */ - List getRecentLogs(String appName); - - /** - * Get logs from most recent crash of the deployed application. The logs - * will be returned in a Map keyed by the path of the log file - * (logs/stderr.log, logs/stdout.log). - * - * @param appName name of the application - * @return a Map containing the logs. The logs will be returned with the path to the log file used as the key and - * the full content of the log file will be returned as a String value for the corresponding key. - * @deprecated Use {@link #streamLogs(String, ApplicationLogListener)} or {@link #getRecentLogs(String)} - */ - Map getCrashLogs(String appName); - - /** - * Get the staging log while an application is starting. A null - * value indicates that no further checks for staging logs should occur as - * staging logs are no longer available. - * - * @param info - * starting information containing staging log file URL. Obtained - * after starting an application. - * @param offset - * starting position from where content should be retrieved. - * @return portion of the staging log content starting from the offset. It - * may contain multiple lines. Returns null if no further content is - * available. - */ - String getStagingLogs(StartingInfo info, int offset); - - - /** - * Get the list of stacks available for staging applications. - * - * @return the list of available stacks - */ - List getStacks(); - - /** - * Get a stack by name. - * - * @param name the name of the stack to get - * @return the stack, or null if not found - */ - CloudStack getStack(String name); - - /** - * Get file from the deployed application. - * - * @param appName name of the application - * @param instanceIndex instance index - * @param filePath path to the file - * @return the contents of the file - */ - String getFile(String appName, int instanceIndex, String filePath); - - /** - * Get a the content, starting at a specific position, of a file from the deployed application. - * - * @param appName name of the application - * @param instanceIndex instance index - * @param filePath path to the file - * @param startPosition the starting position of the file contents (inclusive) - * @return the contents of the file - */ - String getFile(String appName, int instanceIndex, String filePath, int startPosition); - - /** - * Get a range of content of a file from the deployed application. The range begins at the specified startPosition - * and extends to the character at endPosition - 1. - * - * @param appName name of the application - * @param instanceIndex instance index - * @param filePath path to the file - * @param startPosition the starting position of the file contents (inclusive) - * @param endPosition the ending position of the file contents (exclusive) - * @return the contents of the file - */ - String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition); - - /** - * Get a the last bytes, with length as specified, of content of a file from the deployed application. - * - * @param appName name of the application - * @param instanceIndex instance index - * @param filePath path to the file - * @param length the length of the file contents to retrieve - * @return the contents of the file - */ - String getFileTail(String appName, int instanceIndex, String filePath, int length); - - /** - * Get list of cloud services. - * - * @return list of cloud services - */ - List getServices(); - - /** - * Get cloud service. - * - * @param service name of service - * @return the cloud service info - */ - CloudService getService(String service); - - /** - * Delete cloud service. - * - * @param service name of service - */ - void deleteService(String service); - - /** - * Get all service offerings. - * - * @return list of service offerings - */ - List getServiceOfferings(); - - /** - * Get all service brokers. - * - * @return - */ - List getServiceBrokers(); - - /** - * Associate (provision) a service with an application. - * - * @param appName the application name - * @param serviceName the service name - */ - void bindService(String appName, String serviceName); - - /** - * Un-associate (unprovision) a service from an application. - * @param appName the application name - * @param serviceName the service name - */ - void unbindService(String appName, String serviceName); - - /** - * Get application instances info for application. - * - * @param appName name of application. - * @return instances info - */ - InstancesInfo getApplicationInstances(String appName); - - /** - * Get application instances info for application. - * - * @param app the application. - * @return instances info - */ - InstancesInfo getApplicationInstances(CloudApplication app); - - /** - * Get crashes info for application. - * @param appName name of application - * @return crashes info - */ - CrashesInfo getCrashes(String appName); - - /** - * Rename an application. - * - * @param appName the current name - * @param newName the new name - */ - void rename(String appName, String newName); - - /** - * Get list of all domain registered for the current organization. - * - * @return list of domains - */ - List getDomainsForOrg(); - - /** - * Get list of all private domains. - * - * @return list of private domains - */ - List getPrivateDomains(); - - /** - * Get list of all shared domains. - * - * @return list of shared domains - */ - List getSharedDomains(); - - /** - * Get list of all domain shared and private domains. - * - * @return list of domains - */ - List getDomains(); - - /** - * Gets the default domain for the current org, which is the first shared domain. - * - * @return the default domain - */ - CloudDomain getDefaultDomain(); - - /** - * Add a private domain in the current organization. - * - * @param domainName the domain to add - */ - void addDomain(String domainName); - - /** - * Delete a private domain in the current organization. - * - * @param domainName the domain to remove - * @deprecated alias for {@link #deleteDomain} - */ - void removeDomain(String domainName); - - /** - * Delete a private domain in the current organization. - * - * @param domainName the domain to delete - */ - void deleteDomain(String domainName); - - /** - * Get the info for all routes for a domain. - * - * @param domainName the domain the routes belong to - * @return list of routes - */ - List getRoutes(String domainName); - - /** - * Register a new route to the a domain. - * - * @param host the host of the route to register - * @param domainName the domain of the route to register - */ - void addRoute(String host, String domainName); - - /** - * Delete a registered route from the space of the current session. - * - * @param host the host of the route to delete - * @param domainName the domain of the route to delete - */ - void deleteRoute(String host, String domainName); - - /** - * Register a new RestLogCallback - * - * @param callBack the callback to be registered - */ - void registerRestLogListener(RestLogCallback callBack); - - /** - * Un-register a RestLogCallback - * - * @param callBack the callback to be un-registered - */ - void unRegisterRestLogListener(RestLogCallback callBack); - - /** - * Get quota by name - * - * @param quotaName - * @param required - * @return CloudQuota instance - */ - CloudQuota getQuotaByName(String quotaName, boolean required); - - - /** - * Set quota to organization - * - * @param orgName - * @param quotaName - */ - void setQuotaToOrg(String orgName, String quotaName) ; - - /** - * Create quota - * - * @param quota - */ - void createQuota(CloudQuota quota); - - /** - * Delete quota by name - * - * @param quotaName - */ - void deleteQuota(String quotaName); - - /** - * Get quota definitions - * - * @return List - */ - List getQuotas(); - - /** - * Update Quota definition - * - * @param quota - * @param name - */ - void updateQuota(CloudQuota quota, String name); -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudOperationException.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudOperationException.java deleted file mode 100644 index c735562e05c..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/CloudOperationException.java +++ /dev/null @@ -1,12 +0,0 @@ -package org.cloudfoundry.client.lib; - -@SuppressWarnings("serial") -public class CloudOperationException extends RuntimeException { - public CloudOperationException(Throwable cause) { - super(cause); - } - - public CloudOperationException(String message) { - super(message); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/HttpProxyConfiguration.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/HttpProxyConfiguration.java deleted file mode 100644 index 328308ec5f1..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/HttpProxyConfiguration.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - - -/** - * Class that encapsulates http proxy information - * - * @author: Thomas Risberg - */ -public class HttpProxyConfiguration { - - private String proxyHost; - - private int proxyPort; - - public HttpProxyConfiguration(String proxyHost, int proxyPort) { - this.proxyHost = proxyHost; - this.proxyPort = proxyPort; - } - - public String getProxyHost() { - return proxyHost; - } - - public int getProxyPort() { - return proxyPort; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/NotFinishedStagingException.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/NotFinishedStagingException.java deleted file mode 100644 index ad1178afc5c..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/NotFinishedStagingException.java +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.client.lib; - -import org.springframework.http.HttpStatus; - -@SuppressWarnings("serial") -public class NotFinishedStagingException extends CloudFoundryException { - - public static final int ERROR_CODE = 170002; - - public NotFinishedStagingException(HttpStatus statusCode, String statusText) { - super(statusCode, statusText, ERROR_CODE); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogCallback.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogCallback.java deleted file mode 100644 index 822420d41a8..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogCallback.java +++ /dev/null @@ -1,32 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - - -/** - * Callback to support reporting of log information for any REST calls. - * - * @author Thomas Risberg - */ -public interface RestLogCallback { - - /** - * Called once for each log entry. - */ - void onNewLogEntry(RestLogEntry logEntry); - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogEntry.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogEntry.java deleted file mode 100644 index 57bd4ee607e..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogEntry.java +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import java.net.URI; - -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; - -/** - * RestLogEntry containing the values logged for each REST call - * - * @author: Thomas Risberg - */ -public class RestLogEntry { - - private HttpMethod method; - private URI uri; - private String status; - private HttpStatus httpStatus; - private String message; - - public RestLogEntry(HttpMethod method, URI uri, String status, HttpStatus httpStatus, String message) { - this.method = method; - this.uri = uri; - this.status = status; - this.httpStatus = httpStatus; - this.message = message; - } - - public HttpMethod getMethod() { - return method; - } - - public URI getUri() { - return uri; - } - - public String getStatus() { - return status; - } - - public HttpStatus getHttpStatus() { - return httpStatus; - } - - public String getMessage() { - return message; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogger.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogger.java deleted file mode 100644 index 21a1bc26dd0..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/RestLogger.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -/** - * RestLogCallback implementation that logs to application log - * - * @author: Thomas Risberg - */ -public class RestLogger implements RestLogCallback { - - private final Log logger; - - public RestLogger(String category) { - logger = LogFactory.getLog(category == null ? getClass().getName() : category); - } - - public void onNewLogEntry(RestLogEntry logEntry) { - if (logger.isDebugEnabled()) { - logger.debug(formatLogMessage(logEntry)); - } - } - - private String formatLogMessage(RestLogEntry restLogEntry) { - return restLogEntry.getStatus() + - " :: HTTP STATUS: " + restLogEntry.getHttpStatus() + - " :: REQUEST: " + restLogEntry.getMethod() + " " + restLogEntry.getUri() + - " :: " + restLogEntry.getMessage(); - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StagingErrorException.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StagingErrorException.java deleted file mode 100644 index e6967a568f0..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StagingErrorException.java +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.client.lib; - -import org.springframework.http.HttpStatus; - - -@SuppressWarnings("serial") -public class StagingErrorException extends CloudFoundryException { - - public static final int ERROR_CODE = 170001; - - public StagingErrorException(HttpStatus statusCode, String statusText) { - super(statusCode, statusText, ERROR_CODE); - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StartingInfo.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StartingInfo.java deleted file mode 100644 index 2dc993cd780..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StartingInfo.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -/** - * Starting info contains values from response headers when an application is - * first started. One of the possible header values may be the location of the - * staging log when starting an application. - * - * @author Nieraj Singh. - * - */ -public class StartingInfo { - - private final String stagingFile; - - public StartingInfo(String stagingFile) { - this.stagingFile = stagingFile; - } - - /** - * - * @return URL value of the file location for the staging log, or null if not available. - */ - public String getStagingFile() { - return stagingFile; - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StreamingLogToken.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StreamingLogToken.java deleted file mode 100644 index 879fb69332d..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/StreamingLogToken.java +++ /dev/null @@ -1,5 +0,0 @@ -package org.cloudfoundry.client.lib; - -public interface StreamingLogToken { - void cancel(); -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/UploadStatusCallback.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/UploadStatusCallback.java deleted file mode 100644 index fcf03aaaeed..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/UploadStatusCallback.java +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import java.util.Set; - -/** - * Reports status information when uploading an application. - */ -public interface UploadStatusCallback { - - /** - * Empty implementation - */ - public static final UploadStatusCallback NONE = new UploadStatusCallback() { - public void onCheckResources() { - } - - public void onMatchedFileNames(Set matchedFileNames) { - } - - public void onProcessMatchedResources(int length) { - } - - public boolean onProgress(String status) { - return false; - } - }; - - /** - * Called after the /resources call is made. - */ - void onCheckResources(); - - /** - * Called after the files to be uploaded have been identified. - * @param matchedFileNames the files to be uploaded - */ - void onMatchedFileNames(Set matchedFileNames); - - /** - * Called after the data to be uploaded has been processed - * @param length the size of the upload data (before compression) - */ - void onProcessMatchedResources(int length); - - /** - * Called during asynchronous upload process. - * - * Implementation can return true to unsubscribe from progress update reports. - * This is useful if the caller want to unblock the thread that initiated the upload. - * Note, however, that the upload job that has been asynchronously started will - * continue to execute on the server. - * - * @param status string such as "queued", "finished" - * @return true to unsubscribe from update report - */ - boolean onProgress(String status); -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/AbstractApplicationArchiveEntry.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/AbstractApplicationArchiveEntry.java deleted file mode 100644 index 406fd0df500..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/AbstractApplicationArchiveEntry.java +++ /dev/null @@ -1,112 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import java.io.IOException; -import java.io.InputStream; -import java.security.MessageDigest; - -/** - * Base implementation of {@link ApplicationArchive.Entry} that is reads the input stream to deduce the size and SHA - * digest. - * - * @author Phillip Webb - */ -public abstract class AbstractApplicationArchiveEntry implements ApplicationArchive.Entry { - - protected static final int UNDEFINED_SIZE = -1; - - private static final int BUFFER_SIZE = 4096; - - private long size = UNDEFINED_SIZE; - - private byte[] sha1Digest; - - /** - * Sets the size that should be returned. If this method is not called the size will be deduced by reading the - * stream. - * - * @param size the size. - */ - protected void setSize(long size) { - this.size = size; - } - - public long getSize() { - if (isDirectory()) { - return 0; - } - if (size == UNDEFINED_SIZE) { - deduceMissingData(); - } - return size; - } - - /** - * Sets the SHA1 digest that should be returned. If this method is not called the digest will be deduced by reading - * the stream. - * - * @param sha1Digest - */ - protected void setSha1Digest(byte[] sha1Digest) { - this.sha1Digest = sha1Digest; - } - - public byte[] getSha1Digest() { - if (isDirectory()) { - return null; - } - if (sha1Digest == null) { - deduceMissingData(); - } - return sha1Digest; - } - - private void deduceMissingData() { - try { - InputStream inputStream = getInputStream(); - try { - try { - MessageDigest digest = (this.sha1Digest == null ? MessageDigest.getInstance("SHA") : null); - byte[] buffer = new byte[BUFFER_SIZE]; - int byteCount = 0; - int bytesRead = -1; - while ((bytesRead = inputStream.read(buffer)) != -1) { - byteCount += bytesRead; - if (digest != null) { - digest.update(buffer, 0, bytesRead); - } - } - if (this.size == UNDEFINED_SIZE) { - this.size = byteCount; - } - if (this.sha1Digest == null) { - this.sha1Digest = digest.digest(); - } - } catch (Exception e) { - throw new IllegalStateException(e); - } - - } finally { - inputStream.close(); - } - } catch (IOException e) { - throw new IllegalStateException(e); - } - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/ApplicationArchive.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/ApplicationArchive.java deleted file mode 100644 index bd9c7265079..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/ApplicationArchive.java +++ /dev/null @@ -1,89 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import java.io.IOException; -import java.io.InputStream; - -/** - * Interface that represents an application archive (for example a WAR file) that can be uploaded to Cloud Foundry. - * Archives consist of a {@link #getFilename() filename} and one or more {@link #getEntries() entries}. - * - * @author Phillip Webb - */ -public interface ApplicationArchive { - - /** - * Returns the filename of the archive (excluding any path). - * - * @return the filename (for example myproject.war) - */ - String getFilename(); - - /** - * Returns {@link Entry entries} that the archive contains. - * - * @return a collection of entries. - */ - Iterable getEntries(); - - /** - * A single entry contained within an {@link ApplicationArchive}. Entries are used to represent both files and - * directories. - */ - public static interface Entry { - - /** - * Returns true if the entry represents a directory. - * - * @return if the entry is a directory. - */ - boolean isDirectory(); - - /** - * Returns the name of entry including a path. The '/' character should be used as a path separator. - * The name should never start with '/'. - * - * @return the name - */ - String getName(); - - /** - * Returns the size of entry or 0 if the entry is a {@link #isDirectory() directory}. - * - * @return the size - */ - long getSize(); - - /** - * Returns a SHA1 digest over the {@link #getInputStream() contents} of the entry or null if the entry - * is a {@link #isDirectory() directory}. - * - * @return the SHA1 digest - */ - byte[] getSha1Digest(); - - /** - * Returns the content of the entry or null if the entry is a {@link #isDirectory() directory}. The - * caller is responsible for closing the stream. - * - * @return the file contents - * @throws IOException - */ - InputStream getInputStream() throws IOException; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/DirectoryApplicationArchive.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/DirectoryApplicationArchive.java deleted file mode 100644 index 0b6f443c5eb..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/DirectoryApplicationArchive.java +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.zip.ZipFile; - -import org.springframework.util.Assert; - -/** - * Implementation of {@link ApplicationArchive} backed by a {@link ZipFile}. - * - * @author A.B.Srinivasan - * @author Phillip Webb - */ -public class DirectoryApplicationArchive implements ApplicationArchive { - - private File directory; - - private List entries; - - public DirectoryApplicationArchive(File directory) { - Assert.notNull(directory, "Directory must not be null"); - Assert.isTrue(directory.isDirectory(), "File must reference a directory"); - this.directory = directory; - List entries = new ArrayList(); - collectEntries(entries, directory); - this.entries = Collections.unmodifiableList(entries); - } - - private void collectEntries(List entries, File directory) { - for (File child : directory.listFiles()) { - entries.add(new EntryAdapter(child)); - if (child.isDirectory()) { - collectEntries(entries, child); - } - } - } - - public String getFilename() { - return directory.getName(); - } - - public Iterable getEntries() { - return entries; - } - - private class EntryAdapter extends AbstractApplicationArchiveEntry { - - private File file; - private String name; - - public EntryAdapter(File file) { - this.file = file; - this.name = file.getAbsolutePath().substring(directory.getAbsolutePath().length()+1); - if (isDirectory()) { - this.name = this.name + File.separatorChar; - } - } - - public boolean isDirectory() { - return file.isDirectory(); - } - - public String getName() { - return name; - } - - public InputStream getInputStream() throws IOException { - if (isDirectory()) { - return null; - } - return new FileInputStream(file); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/ZipApplicationArchive.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/ZipApplicationArchive.java deleted file mode 100644 index f2725289489..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/archive/ZipApplicationArchive.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Enumeration; -import java.util.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.springframework.util.Assert; - -/** - * Implementation of {@link ApplicationArchive} backed by a {@link ZipFile}. - * - * @author Phillip Webb - */ -public class ZipApplicationArchive implements ApplicationArchive { - - private ZipFile zipFile; - - private List entries; - - private String fileName; - - /** - * Create a new {@link ZipApplicationArchive} instance for the given zipFile. - * @param zipFile The underling zip file - */ - public ZipApplicationArchive(ZipFile zipFile) { - Assert.notNull(zipFile, "ZipFile must not be null"); - this.zipFile = zipFile; - this.entries = adaptZipEntries(zipFile); - this.fileName = new File(zipFile.getName()).getName(); - } - - private List adaptZipEntries(ZipFile zipFile) { - List entries = new ArrayList(); - Enumeration zipEntries = zipFile.entries(); - while (zipEntries.hasMoreElements()) { - entries.add(new EntryAdapter(zipEntries.nextElement())); - } - return Collections.unmodifiableList(entries); - } - - public Iterable getEntries() { - return entries; - } - - public String getFilename() { - return fileName; - } - - private class EntryAdapter extends AbstractApplicationArchiveEntry { - - private ZipEntry entry; - - public EntryAdapter(ZipEntry entry) { - this.entry = entry; - } - - public boolean isDirectory() { - return entry.isDirectory(); - } - - public String getName() { - return entry.getName(); - } - - public long getSize() { - return entry.getSize(); - } - - public InputStream getInputStream() throws IOException { - if(isDirectory()) { - return null; - } - return zipFile.getInputStream(entry); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/ApplicationLog.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/ApplicationLog.java deleted file mode 100644 index b2e5f16a49d..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/ApplicationLog.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.cloudfoundry.client.lib.domain; - - -import java.util.Date; - -public class ApplicationLog implements Comparable { - public enum MessageType {STDOUT, STDERR} - - private String appId; - private String message; - private Date timestamp; - private MessageType messageType; - private String sourceName; - private String sourceId; - - public ApplicationLog(String appId, String message, Date timestamp, MessageType messageType, String sourceName, String sourceId) { - this.appId = appId; - this.message = message; - this.timestamp = timestamp; - this.messageType = messageType; - this.sourceName = sourceName; - this.sourceId = sourceId; - } - - public String getAppId() { - return appId; - } - - public String getMessage() { - return message; - } - - public Date getTimestamp() { - return timestamp; - } - - public MessageType getMessageType() { - return messageType; - } - - public String getSourceName() { - return sourceName; - } - - public String getSourceId() { - return sourceId; - } - - public int compareTo(ApplicationLog o) { - return timestamp.compareTo(o.timestamp); - } - - @Override - public String toString() { - return String.format("%s [%s] %s (%s, %s)", appId, timestamp, message, messageType, sourceName); - } -} \ No newline at end of file diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/ApplicationStats.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/ApplicationStats.java deleted file mode 100644 index 4e337fa9fe1..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/ApplicationStats.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class ApplicationStats { - - private final List records; - - public ApplicationStats(Map attributes) { - List records = new ArrayList(attributes.size()); - for (Map.Entry entry : attributes.entrySet()) { - @SuppressWarnings("unchecked") - InstanceStats record = new InstanceStats(entry.getKey(), (Map)entry.getValue()); - records.add(record); - } - this.records = Collections.unmodifiableList(records); - } - - public ApplicationStats(List instanceStats) { - this.records = Collections.unmodifiableList(instanceStats); - } - - public List getRecords() { - return records; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudApplication.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudApplication.java deleted file mode 100644 index c4b8187a11d..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudApplication.java +++ /dev/null @@ -1,235 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import static org.cloudfoundry.client.lib.util.CloudUtil.parse; - -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.codehaus.jackson.annotate.JsonAutoDetect; -import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility; - -@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, creatorVisibility = Visibility.NONE) -public class CloudApplication extends CloudEntity { - - private static final String COMMAND_KEY = "command"; - private static final String BUILDPACK_URL_KEY = "buildpack"; - private static final String MEMORY_KEY = "memory"; - private static final String DISK_KEY = "disk_quota"; - - private Staging staging; - private int instances; - private int memory; - private int diskQuota; - private List uris; - private List services; - private AppState state; - private DebugMode debug; - private int runningInstances; - private List env = new ArrayList(); - - public CloudApplication(Meta meta, String name) { - super(meta, name); - } - - public CloudApplication(String name, String command, String buildpackUrl, int memory, int instances, - List uris, List serviceNames, - AppState state) { - super(CloudEntity.Meta.defaultMeta(), name); - this.staging = new Staging(command, buildpackUrl); - this.memory = memory; - this.instances = instances; - this.uris = uris; - this.services = serviceNames; - this.state = state; - } - - @SuppressWarnings("unchecked") - public CloudApplication(Map attributes) { - super(CloudEntity.Meta.defaultMeta(), parse(attributes.get("name"))); - instances = (Integer)attributes.get("instances"); - Integer runningInstancesAttribute = (Integer) attributes.get("runningInstances"); - if (runningInstancesAttribute != null) { - runningInstances = runningInstancesAttribute; - } - uris = (List)attributes.get("uris"); - services = (List)attributes.get("services"); - state = AppState.valueOf((String) attributes.get("state")); - if (attributes.containsKey("memory")) { - memory = (Integer) attributes.get("memory"); - } - if (attributes.containsKey("disk_quota")) { - diskQuota = (Integer) attributes.get("disk_quota"); - } - env = (List) attributes.get("env"); - - Map metaValue = parse(Map.class, - attributes.get("meta")); - if (metaValue != null) { - String debugAttribute = (String) metaValue.get("debug"); - if (debugAttribute != null) { - debug = DebugMode.valueOf(debugAttribute); - } - long created = parse(Long.class, metaValue.get("created")); - Date createdDate = created != 0 ? new Date(created * 1000) : null; - setMeta(new Meta(null, createdDate, null)); - - String command = null; - if (metaValue.containsKey(COMMAND_KEY)) { - command = (String) metaValue.get(COMMAND_KEY); - } - String buildpackUrl = null; - if (metaValue.containsKey(BUILDPACK_URL_KEY)) { - buildpackUrl = (String) metaValue.get(BUILDPACK_URL_KEY); - } - - setStaging(new Staging(command, buildpackUrl)); - } - } - - public enum AppState { - UPDATING, STARTED, STOPPED - } - - public enum DebugMode { - run, - suspend - } - - public Staging getStaging() { - return staging; - } - - public void setStaging(Staging staging) { - this.staging = staging; - } - - // for backward compatibility - public Map getResources() { - Map resources = new HashMap(); - resources.put(MEMORY_KEY, memory); - resources.put(DISK_KEY, diskQuota); - return resources; - } - - public int getInstances() { - return instances; - } - - public void setInstances(int instances) { - this.instances = instances; - } - - public int getDiskQuota() { - return diskQuota; - } - - public void setDiskQuota(int diskQuota) { - this.diskQuota = diskQuota; - } - - public int getMemory() { - return memory; - } - - public void setMemory(int memory) { - this.memory = memory; - } - - public List getUris() { - return uris; - } - - public void setUris(List uris) { - this.uris = uris; - } - - public AppState getState() { - return state; - } - - public void setState(AppState state) { - this.state = state; - } - - public DebugMode getDebug() { - return debug; - } - - public void setDebug(DebugMode debug) { - this.debug = debug; - } - - public List getServices() { - return services; - } - - public void setServices(List services) { - this.services = services; - } - - public int getRunningInstances() { - return runningInstances; - } - - public void setRunningInstances(int runningInstances) { - this.runningInstances = runningInstances; - } - - public Map getEnvAsMap() { - Map envMap = new HashMap(); - for (String nameAndValue : env) { - String[] parts = nameAndValue.split("="); - envMap.put(parts[0], parts.length == 2 ? parts[1] : null); - } - return envMap; - } - - public List getEnv() { - return env; - } - - public void setEnv(Map env) { - List joined = new ArrayList(); - for (Map.Entry entry : env.entrySet()) { - joined.add(entry.getKey() + '=' + entry.getValue()); - } - this.env = joined; - } - - public void setEnv(List env) { - for (String s : env) { - if (!s.contains("=")) { - throw new IllegalArgumentException("Environment setting without '=' is invalid: " + s); - } - } - this.env = env; - } - - @Override - public String toString() { - return "CloudApplication [staging=" + staging + ", instances=" - + instances + ", name=" + getName() - + ", memory=" + memory + ", diskQuota=" + diskQuota - + ", state=" + state + ", debug=" + debug + ", uris=" + uris + ",services=" + services - + ", env=" + env + "]"; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudDomain.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudDomain.java deleted file mode 100644 index 98cb34c417a..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudDomain.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -/** - * @author Thomas Risberg - */ -public class CloudDomain extends CloudEntity { - - private CloudOrganization owner; - - public CloudDomain(Meta meta, String name, CloudOrganization owner) { - super(meta, name); - this.owner = owner; - } - - public CloudOrganization getOwner() { - return owner; - } - - @Override - public String toString() { - return getName() + " (" + (owner != null ? owner.getName() : "-") + ")"; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudEntity.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudEntity.java deleted file mode 100644 index 26004bbd35d..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudEntity.java +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import org.codehaus.jackson.annotate.JsonIgnore; - -import java.util.Date; -import java.util.UUID; - -/** - * @author Thomas Risberg - */ -public class CloudEntity { - - @JsonIgnore - private Meta meta; - - private String name; - - public CloudEntity() { - } - - public CloudEntity(Meta meta, String name) { - if (meta != null) { - this.meta = meta; - } - else { - this.meta = Meta.defaultMeta(); - } - this.name = name; - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - public Meta getMeta() { - return meta; - } - - public void setMeta(Meta meta) { - this.meta = meta; - } - - @Override - public String toString() { - return this.getClass().getSimpleName() + ": (" + - (meta == null || meta.getGuid() == null ? "-" : meta.getGuid()) + ") " + - getName(); - } - - public static class Meta { - - private UUID guid; - private Date created; - private Date updated; - - public Meta(UUID guid, Date created, Date updated) { - this.guid = guid; - this.created = created; - this.updated = updated; - } - - public UUID getGuid() { - return guid; - } - - public Date getCreated() { - return created; - } - - public Date getUpdated() { - return updated; - } - - public static Meta defaultMeta() { - return new Meta(null, null, null); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudInfo.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudInfo.java deleted file mode 100644 index d0f7229f743..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudInfo.java +++ /dev/null @@ -1,215 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import org.cloudfoundry.client.lib.util.CloudUtil; - -import java.util.Map; - -/** - * @author Ramnivas Laddad - * @author Dave Syer - * @author Thomas Risberg - */ -@SuppressWarnings("unused") -public class CloudInfo { - - private Limits limits; - private Usage usage; - private String name; - private String support; - private String build; - private String version; - private String user; - private String description; - private String authorizationEndpoint; - private boolean allowDebug; - private String loggregatorEndpoint; - - @SuppressWarnings("unchecked") - public CloudInfo(Map infoMap) { - name = CloudUtil.parse(String.class, infoMap.get("name")); - support = CloudUtil.parse(String.class, infoMap.get("support")); - build = CloudUtil.parse(String.class, infoMap.get("build")); - version = CloudUtil.parse(String.class, infoMap.get("version")); - if (version == null) { - Number iVersion = CloudUtil.parse(Number.class, infoMap.get("version")); - if (iVersion != null) { - version = iVersion.toString(); - } - } - user = CloudUtil.parse(String.class, infoMap.get("user")); - description = CloudUtil.parse(String.class, infoMap.get("description")); - authorizationEndpoint = CloudUtil.parse(String.class, infoMap.get("authorization_endpoint")); - loggregatorEndpoint = CloudUtil.parse(String.class, infoMap.get("logging_endpoint")); - - Object allowDebugValue = infoMap.get("allow_debug"); - if (allowDebugValue != null) { - allowDebug = CloudUtil.parse(Boolean.class, allowDebugValue); - } else { - allowDebug = false; // default to false - } - - Map limitsMap = CloudUtil.parse(Map.class, infoMap.get("limits")); - if (limitsMap != null) { - limits = new Limits(limitsMap); - } else { - limits = new Limits(); - } - - Map usageMap = CloudUtil.parse(Map.class, infoMap.get("usage")); - if (usageMap != null) { - usage = new Usage(usageMap); - } else { - usage = new Usage(); - } - } - - public CloudInfo(String name, String support, String authorizationEndpoint, String build, String version, - String user, String description, Limits limits, Usage usage, boolean allowDebug, String loggregatorEndpoint) { - this.name = name; - this.support = support; - this.authorizationEndpoint = authorizationEndpoint; - this.loggregatorEndpoint = loggregatorEndpoint; - this.build = build; - this.version = version; - this.user = user; - this.description = description; - this.limits = limits; - this.usage = usage; - this.allowDebug = allowDebug; - } - - public Limits getLimits() { - return limits; - } - - public Usage getUsage() { - return usage; - } - - public String getName() { - return name; - } - - public String getSupport() { - return support; - } - - public String getAuthorizationEndpoint() { - return authorizationEndpoint; - } - - public String getLoggregatorEndpoint() { - return loggregatorEndpoint; - } - - public String getBuild() { - return build; - } - - public String getDescription() { - return description; - } - - public String getUser() { - return user; - } - - public String getVersion() { - return version; - } - - public boolean getAllowDebug() { - return allowDebug; - } - public static class Limits { - private int maxApps; - private int maxTotalMemory; - private int maxUrisPerApp; - private int maxServices; - - public Limits(Map limitMap) { - maxApps = CloudUtil.parse(Integer.class, limitMap.get("apps")); - maxTotalMemory = CloudUtil.parse(Integer.class, limitMap.get("memory")); - maxUrisPerApp = CloudUtil.parse(Integer.class, limitMap.get("app_uris")); - maxServices = CloudUtil.parse(Integer.class, limitMap.get("services")); - } - - Limits() { - maxApps = Integer.MAX_VALUE; - maxTotalMemory = Integer.MAX_VALUE; - maxUrisPerApp = Integer.MAX_VALUE; - maxServices = Integer.MAX_VALUE; - } - - public int getMaxApps() { - return maxApps; - } - - public int getMaxTotalMemory() { - return maxTotalMemory; - } - - public int getMaxUrisPerApp() { - return maxUrisPerApp; - } - - public int getMaxServices() { - return maxServices; - } - } - - public static class Usage { - private int apps; - private int totalMemory; - private int urisPerApp; - private int services; - - public Usage(Map data) { - if (data != null && !data.isEmpty()) { - apps = CloudUtil.parse(Integer.class, data.get("apps")); - totalMemory = CloudUtil.parse(Integer.class, data.get("memory")); - urisPerApp = CloudUtil.parse(Integer.class, data.get("app_uris")); - services = CloudUtil.parse(Integer.class, data.get("services")); - } - } - - Usage() { - apps = Integer.MAX_VALUE; - totalMemory = Integer.MAX_VALUE; - urisPerApp = Integer.MAX_VALUE; - services = Integer.MAX_VALUE; - } - - public int getApps() { - return apps; - } - - public int getTotalMemory() { - return totalMemory; - } - - public int getUrisPerApp() { - return urisPerApp; - } - - public int getServices() { - return services; - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudOrganization.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudOrganization.java deleted file mode 100644 index da6f6a2538b..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudOrganization.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -/** - * @author Thomas Risberg - */ -public class CloudOrganization extends CloudEntity { - - private boolean billingEnabled = false; - private CloudQuota quota; - - public CloudOrganization(Meta meta, String name) { - this(meta, name, false); - } - - public CloudOrganization(Meta meta, String name, boolean billingEnabled) { - super(meta, name); - this.billingEnabled = billingEnabled; - } - - public CloudOrganization(Meta meta, String name, CloudQuota quota, boolean billingEnabled) { - super(meta, name); - this.quota=quota; - this.billingEnabled = billingEnabled; - } - - public boolean isBillingEnabled() { - return billingEnabled; - } - - public CloudQuota getQuota() { - return quota; - } - - public void setQuota(CloudQuota quota) { - this.quota = quota; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudQuota.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudQuota.java deleted file mode 100644 index ab7f6599643..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudQuota.java +++ /dev/null @@ -1,67 +0,0 @@ -package org.cloudfoundry.client.lib.domain; - -/** - * - * @author Harry Zhang - * - */ -public class CloudQuota extends CloudEntity { - - private boolean nonBasicServicesAllowed = false; - private int totalServices; - private int totalRoutes; - private long memoryLimit; - - public CloudQuota(Meta meta, String name, boolean nonBasicServicesAllowed, - int totalServices, int totalRoutes, long memoryLimit) { - super(meta, name); - this.totalServices=totalServices; - this.totalRoutes=totalRoutes; - this.memoryLimit=memoryLimit; - this.nonBasicServicesAllowed = nonBasicServicesAllowed; - - } - /** - * Default value :"memory_limit":0,"total_routes":0,"total_services":0,"non_basic_services_allowed":false - * - * @param meta - * @param name - */ - public CloudQuota(Meta meta, String name){ - super(meta, name); - } - - public int getTotalServices() { - return totalServices; - } - - public void setTotalServices(int totalServices) { - this.totalServices = totalServices; - } - - public int getTotalRoutes() { - return totalRoutes; - } - - public void setTotalRoutes(int totalRoutes) { - this.totalRoutes = totalRoutes; - } - - public long getMemoryLimit() { - return memoryLimit; - } - - public void setMemoryLimit(long memoryLimit) { - this.memoryLimit = memoryLimit; - } - - public void setNonBasicServicesAllowed(boolean nonBasicServicesAllowed) { - this.nonBasicServicesAllowed = nonBasicServicesAllowed; - } - - public boolean isNonBasicServicesAllowed() { - return nonBasicServicesAllowed; - } - - -} \ No newline at end of file diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudResource.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudResource.java deleted file mode 100644 index 0c1c5071c02..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudResource.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import org.codehaus.jackson.annotate.JsonAutoDetect; -import org.codehaus.jackson.annotate.JsonAutoDetect.Visibility; -import org.codehaus.jackson.annotate.JsonProperty; - -/** - * JSON object that contains details of a single Cloud Foundry resource. - * - * @author Phillip Webb - */ -@JsonAutoDetect(fieldVisibility = Visibility.ANY, getterVisibility = Visibility.NONE, creatorVisibility = Visibility.NONE) -public class CloudResource { - - @JsonProperty("fn") - private String filename; - - private long size; - - private String sha1; - - protected CloudResource() { - } - - public CloudResource(String filename, long size, String sha1) { - super(); - this.filename = filename; - this.size = size; - this.sha1 = sha1; - } - - public String getFilename() { - return filename; - } - - public long getSize() { - return size; - } - - public String getSha1() { - return sha1; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudResources.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudResources.java deleted file mode 100644 index 6bc393261ab..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudResources.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Collections; -import java.util.Iterator; -import java.util.LinkedHashSet; -import java.util.List; -import java.util.Set; - -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.codehaus.jackson.JsonGenerator; -import org.codehaus.jackson.JsonParser; -import org.codehaus.jackson.JsonProcessingException; -import org.codehaus.jackson.map.DeserializationContext; -import org.codehaus.jackson.map.JsonDeserializer; -import org.codehaus.jackson.map.JsonSerializer; -import org.codehaus.jackson.map.SerializerProvider; -import org.codehaus.jackson.map.annotate.JsonDeserialize; -import org.codehaus.jackson.map.annotate.JsonSerialize; -import org.codehaus.jackson.type.TypeReference; -import org.springframework.util.Assert; - -/** - * JSON Object that contains details of a list of {@link org.cloudfoundry.client.lib.domain.CloudResource}s. - * - * @author Phillip Webb - */ -@JsonSerialize(using = CloudResources.Serializer.class) -@JsonDeserialize(using = CloudResources.Deserializer.class) -public class CloudResources { - - private static final String HEX_CHARS = "0123456789ABCDEF"; - - private List resources; - - /** - * Create a new {@link CloudResources} instance for the specified resources. - * - * @param resources the resources - */ - public CloudResources(Collection resources) { - Assert.notNull(resources, "Resources must not be null"); - this.resources = new ArrayList(resources); - } - - /** - * Create a new {@link CloudResources} instance for the specified resources. - * - * @param resources the resources - */ - public CloudResources(Iterator resources) { - Assert.notNull(resources, "Resources must not be null"); - this.resources = new ArrayList(); - while (resources.hasNext()) { - this.resources.add(resources.next()); - } - } - - /** - * Create a new {@link CloudResources} instance for the specified {@link ApplicationArchive}. - * - * @param archive the application archive - */ - public CloudResources(ApplicationArchive archive) throws IOException { - Assert.notNull(archive, "Archive must not be null"); - this.resources = new ArrayList(); - for (ApplicationArchive.Entry entry : archive.getEntries()) { - if (!entry.isDirectory()) { - String name = entry.getName(); - long size = entry.getSize(); - String sha1 = bytesToHex(entry.getSha1Digest()); - CloudResource resource = new CloudResource(name, size, sha1); - resources.add(resource); - } - } - } - - /** - * Returns a set of all resource {@link CloudResource#getFilename() filenames}. - * - * @return the filenames. - */ - public Set getFilenames() { - Set filenames = new LinkedHashSet(); - for (CloudResource resource : resources) { - filenames.add(resource.getFilename()); - } - return filenames; - } - - /** - * Returns the list of {@link CloudResource}s. - * - * @return the resources as a list - */ - public List asList() { - return Collections.unmodifiableList(resources); - } - - private static String bytesToHex(byte[] bytes) { - if (bytes == null) { - return null; - } - final StringBuilder hex = new StringBuilder(2 * bytes.length); - for (final byte b : bytes) { - hex.append(HEX_CHARS.charAt((b & 0xF0) >> 4)).append(HEX_CHARS.charAt((b & 0x0F))); - } - return hex.toString(); - } - - /** - * Internal JSON Serializer. - */ - public static class Serializer extends JsonSerializer { - - @Override - public void serialize(CloudResources value, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { - jgen.writeObject(value.asList()); - } - } - - /** - * Internal JSON Deserializer. - */ - public static class Deserializer extends JsonDeserializer { - - @SuppressWarnings("unchecked") - @Override - public CloudResources deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { - TypeReference> ref = new TypeReference>() { - }; - return new CloudResources((Collection) jp.readValueAs(ref)); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudRoute.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudRoute.java deleted file mode 100644 index aab6d00d8b0..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudRoute.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -/** - * @author Thomas Risberg - */ -public class CloudRoute extends CloudEntity { - - private String host; - - private CloudDomain domain; - - private int appsUsingRoute; - - public CloudRoute(Meta meta, String host, CloudDomain domain, int appsUsingRoute) { - super(meta, host + "." + domain.getName()); - this.host = host; - this.domain = domain; - this.appsUsingRoute = appsUsingRoute; - } - - public String getHost() { - return host; - } - - public CloudDomain getDomain() { - return domain; - } - - public int getAppsUsingRoute() { - return appsUsingRoute; - } - - public boolean inUse() { - return appsUsingRoute > 0; - } - - @Override - public String toString() { - return getName(); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudService.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudService.java deleted file mode 100644 index 6540f35860f..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudService.java +++ /dev/null @@ -1,76 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - - -/** - * Class representing an instance of a service created for a space. - * - * @author Thomas Risberg - */ -public class CloudService extends CloudEntity { - - private String version; - private String provider; - - private String label; - private String plan; - - public CloudService() { - super(); - } - - public CloudService(Meta meta, String name) { - super(meta, name); - } - - public boolean isUserProvided() { - return plan == null && provider == null && version == null; - } - - public String getVersion() { - return version; - } - - public String getLabel() { - return label; - } - - public String getProvider() { - return provider; - } - - public String getPlan() { - return plan; - } - - public void setVersion(String version) { - this.version = version; - } - - public void setLabel(String label) { - this.label = label; - } - - public void setProvider(String provider) { - this.provider = provider; - } - - public void setPlan(String plan) { - this.plan = plan; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServiceBroker.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServiceBroker.java deleted file mode 100644 index d06042cd7bb..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServiceBroker.java +++ /dev/null @@ -1,25 +0,0 @@ -package org.cloudfoundry.client.lib.domain; - -public class CloudServiceBroker extends CloudEntity { - private String url; - private String username; - - public CloudServiceBroker(String url, String username) { - this.url = url; - this.username = username; - } - - public CloudServiceBroker(Meta meta, String name, String url, String username) { - super(meta, name); - this.url = url; - this.username = username; - } - - public String getUrl() { - return url; - } - - public String getUsername() { - return username; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServiceOffering.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServiceOffering.java deleted file mode 100644 index 4c905c2e937..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServiceOffering.java +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import java.util.ArrayList; -import java.util.List; - -public class CloudServiceOffering extends CloudEntity { - - //Note name is used for label - private String provider; - private String version; - private String description; - private boolean active; - private boolean bindable; - private String url; - private String infoUrl; - private String uniqueId; - private String extra; - private String docUrl; - - private List cloudServicePlans = new ArrayList(); - - public CloudServiceOffering(Meta meta, String name) { - super(meta, name); - } - - public CloudServiceOffering(Meta meta, String name, String provider, String version) { - super(meta, name); - this.provider = provider; - this.version = version; - } - - public CloudServiceOffering(Meta meta, String name, String provider, String version, - String description, boolean active, boolean bindable, - String url, String infoUrl, String uniqueId, String extra, - String docUrl) { - super(meta, name); - this.provider = provider; - this.version = version; - this.description = description; - this.active = active; - this.bindable = bindable; - this.url = url; - this.infoUrl = infoUrl; - this.uniqueId = uniqueId; - this.extra = extra; - this.docUrl = docUrl; - } - - public String getLabel() { - return getName(); - } - - public String getDescription() { - return description; - } - - public String getProvider() { - return provider; - } - - public String getVersion() { - return version; - } - - public boolean isActive() { - return active; - } - - public boolean isBindable() { - return bindable; - } - - public String getUrl() { - return url; - } - - public String getInfoUrl() { - return infoUrl; - } - - public String getUniqueId() { - return uniqueId; - } - - public String getExtra() { - return extra; - } - - public String getDocumentationUrl() { - return docUrl; - } - - public List getCloudServicePlans() { - return cloudServicePlans; - } - - public void addCloudServicePlan(CloudServicePlan cloudServicePlan) { - this.cloudServicePlans.add(cloudServicePlan); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServicePlan.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServicePlan.java deleted file mode 100644 index c15a1d56419..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudServicePlan.java +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - - -public class CloudServicePlan extends CloudEntity { - - private boolean free; - private boolean _public; - private String description; - private String extra; - private String uniqueId; - - private CloudServiceOffering serviceOffering; - - public CloudServicePlan() { - } - - public CloudServicePlan(Meta meta, String name, String description, boolean free, - boolean _public, String extra, String uniqueId, - CloudServiceOffering serviceOffering) { - super(meta, name); - this.description = description; - this.free = free; - this._public = _public; - this.extra = extra; - this.uniqueId = uniqueId; - this.serviceOffering = serviceOffering; - } - - public boolean isFree() { - return this.free; - } - - public boolean isPublic() { - return this._public; - } - - public String getDescription() { - return description; - } - - public String getExtra() { - return extra; - } - - public String getUniqueId() { - return uniqueId; - } - - public CloudServiceOffering getServiceOffering() { - return serviceOffering; - } - - public void setServiceOffering(CloudServiceOffering serviceOffering) { - this.serviceOffering = serviceOffering; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudSpace.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudSpace.java deleted file mode 100644 index 9c263221720..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudSpace.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - - -/** - * @author Thomas Risberg - */ -public class CloudSpace extends CloudEntity { - - private CloudOrganization organization; - - public CloudSpace(Meta meta, String name, CloudOrganization organization) { - super(meta, name); - this.organization = organization; - } - - public CloudOrganization getOrganization() { - return organization; - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudStack.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudStack.java deleted file mode 100644 index 093a62fcc1d..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CloudStack.java +++ /dev/null @@ -1,15 +0,0 @@ -package org.cloudfoundry.client.lib.domain; - -public class CloudStack extends CloudEntity { - private String description; - - public CloudStack(Meta meta, String name, String description) { - setMeta(meta); - setName(name); - this.description = description; - } - - public String getDescription() { - return description; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CrashInfo.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CrashInfo.java deleted file mode 100644 index e17c0fc0d93..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CrashInfo.java +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import org.cloudfoundry.client.lib.util.CloudUtil; - -import java.util.Date; -import java.util.Map; - -public class CrashInfo { - private final Date since; - private final String instance; - - public CrashInfo(Map infoMap) { - since = new Date(CloudUtil.parse(Long.class, infoMap.get("since")) * 1000); - instance = CloudUtil.parse(String.class, infoMap.get("instance")); - } - - public Date getSince() { - return since; - } - - public String getInstance() { - return instance; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CrashesInfo.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CrashesInfo.java deleted file mode 100644 index ccbd19e3f32..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/CrashesInfo.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class CrashesInfo { - - private final List crashes; - - public CrashesInfo(List> attributes) { - List crashes = new ArrayList(attributes.size()); - for (Map data : attributes) { - crashes.add(new CrashInfo(data)); - } - this.crashes = Collections.unmodifiableList(crashes); - } - - public List getCrashes() { - return crashes; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceInfo.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceInfo.java deleted file mode 100644 index 52c81ffb057..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceInfo.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import org.cloudfoundry.client.lib.util.CloudUtil; - -import java.util.Date; -import java.util.Map; - -public class InstanceInfo { - private final Date since; - private final int index; - private final InstanceState state; - private final String debugIp; - private final int debugPort; - - public InstanceInfo(Map infoMap) { - since = new Date(CloudUtil.parse(Long.class, infoMap.get("since")) * 1000); - index = CloudUtil.parse(Integer.class, infoMap.get("index")); - String instanceState = CloudUtil.parse(String.class, infoMap.get("state")); - state = InstanceState.valueOfWithDefault(instanceState); - debugIp = CloudUtil.parse(String.class, infoMap.get("debug_ip")); - debugPort = CloudUtil.parse(Integer.class, infoMap.get("debug_port")); - } - - public Date getSince() { - return since; - } - - public int getIndex() { - return index; - } - - public InstanceState getState() { - return state; - } - - public String getDebugIp() { - return debugIp; - } - - public int getDebugPort() { - return debugPort; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceState.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceState.java deleted file mode 100644 index fe3df66276e..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceState.java +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -/** - * Enum used for the state of an instance - * - * @author Thomas Risberg - */ -public enum InstanceState { - DOWN, STARTING, RUNNING, CRASHED, FLAPPING, UNKNOWN; - - public static InstanceState valueOfWithDefault(String s) { - try { - return InstanceState.valueOf(s); - } catch (IllegalArgumentException e) { - return InstanceState.UNKNOWN; - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceStats.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceStats.java deleted file mode 100644 index 8257005ddb4..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstanceStats.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import static org.cloudfoundry.client.lib.util.CloudUtil.parse; - -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Collections; -import java.util.Date; -import java.util.List; -import java.util.Map; - -public class InstanceStats { - - public static class Usage { - - private double cpu; - private int disk; - private int mem; - private Date time; - - public Usage(Map attributes) { - this.time = parseDate(parse(String.class, attributes.get("time"))); - this.cpu = parse(Double.class, attributes.get("cpu")); - this.disk = parse(Integer.class, attributes.get("disk")); - this.mem = parse(Integer.class, attributes.get("mem")); - } - - public double getCpu() { - return cpu; - } - - public int getDisk() { - return disk; - } - - public int getMem() { - return mem; - } - - public Date getTime() { - return time; - } - } - - private int cores; - private long diskQuota; - private int fdsQuota; - private String host; - private String id; - private long memQuota; - private String name; - private int port; - private InstanceState state; - private double uptime; - private List uris; - private Usage usage; - - @SuppressWarnings("unchecked") - public InstanceStats(String id, Map attributes) { - this.id = id; - String instanceState = parse(String.class, attributes.get("state")); - this.state = InstanceState.valueOfWithDefault(instanceState); - Map stats = parse(Map.class, attributes.get("stats")); - if (stats != null) { - this.cores = parse(Integer.class, stats.get("cores")); - this.name = parse(String.class, stats.get("name")); - Map usageValue = parse(Map.class, - stats.get("usage")); - if (usageValue != null) { - this.usage = new Usage(usageValue); - } - this.diskQuota = parse(Long.class, stats.get("disk_quota")); - this.port = parse(Integer.class, stats.get("port")); - this.memQuota = parse(Long.class, stats.get("mem_quota")); - List statsValue = parse(List.class, stats.get("uris")); - if (statsValue != null) { - this.uris = Collections.unmodifiableList(statsValue); - } - this.fdsQuota = parse(Integer.class, stats.get("fds_quota")); - this.host = parse(String.class, stats.get("host")); - this.uptime = parse(Double.class, stats.get("uptime")); - } - } - - private static Date parseDate(String date) { - // dates will be of the form 2011-04-07 09:11:50 +0000 - try { - return new SimpleDateFormat("yyyy-MM-dd hh:mm:ss ZZZZZ").parse(date); - } - catch (ParseException e) { - // TODO - not sure how best to handle this error - return null; - } - } - - public int getCores() { - return cores; - } - - public long getDiskQuota() { - return diskQuota; - } - - public int getFdsQuota() { - return fdsQuota; - } - - public String getHost() { - return host; - } - - public String getId() { - return id; - } - - public long getMemQuota() { - return memQuota; - } - - public String getName() { - return name; - } - - public int getPort() { - return port; - } - - public InstanceState getState() { - return state; - } - - public double getUptime() { - return uptime; - } - - public List getUris() { - return uris; - } - - public Usage getUsage() { - return usage; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstancesInfo.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstancesInfo.java deleted file mode 100644 index 2366c7722d5..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/InstancesInfo.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; -import java.util.Map; - -public class InstancesInfo { - - private final List instances; - - public InstancesInfo(List> attributes) { - List instances = new ArrayList(attributes.size()); - for (Map data : attributes) { - instances.add(new InstanceInfo(data)); - } - this.instances = Collections.unmodifiableList(instances); - } - - public List getInstances() { - return instances; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/Staging.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/Staging.java deleted file mode 100644 index 49394bcd653..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/Staging.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -/** - * The staging information related to an application. Used for creating the - * application - * - * @author Jennifer Hickey - * @author Ramnivas Laddad - * @author Scott Frederick - * - */ -public class Staging { - private String command; - private String buildpackUrl; - private String stack; - private Integer healthCheckTimeout; - - /** - * Default staging: No command, default buildpack - */ - public Staging() { - - } - - /** - * - * @param command the application command; may be null - * @param buildpackUrl a custom buildpack url (e.g. https://github.com/cloudfoundry/java-buildpack.git); may be null - */ - public Staging(String command, String buildpackUrl) { - this.command = command; - this.buildpackUrl = buildpackUrl; - } - - /** - * - * @param command the application command; may be null - * @param buildpackUrl a custom buildpack url (e.g. https://github.com/cloudfoundry/java-buildpack.git); may be null - * @param stack the stack to use when staging the application; may be null - * @param healthCheckTimeout the amount of time the platform should wait when verifying that an app started; may be null - */ - public Staging(String command, String buildpackUrl, String stack, Integer healthCheckTimeout) { - this(command, buildpackUrl); - this.stack = stack; - this.healthCheckTimeout = healthCheckTimeout; - } - - /** - * - * @return The start command to use - */ - public String getCommand() { - return command; - } - - /** - * - * @return The buildpack url, or null to use the default - * buildpack detected based on application content - */ - public String getBuildpackUrl() { - return buildpackUrl; - } - - /** - * - * @return the stack to use when staging the application, or null to use the default stack - */ - public String getStack() { - return stack; - } - - /** - * - * @return the health check timeout value - */ - public Integer getHealthCheckTimeout() { - return healthCheckTimeout; - } - - @Override - public String toString() { - return "Staging [command=" + getCommand() + - " buildpack=" + getBuildpackUrl() + - " stack=" + getStack() + - " healthCheckTimeout=" + getHealthCheckTimeout() + - "]"; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/UploadApplicationPayload.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/UploadApplicationPayload.java deleted file mode 100644 index 2c0cf587154..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/domain/UploadApplicationPayload.java +++ /dev/null @@ -1,113 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.domain; - -import java.io.IOException; -import java.io.InputStream; -import java.util.ArrayList; -import java.util.Set; - -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.io.DynamicZipInputStream; -import org.cloudfoundry.client.lib.io.DynamicZipInputStream.Entry; - -/** - * A payload used to upload application data. The payload data is built from a source {@link ApplicationArchive}, - * excluding any entries that are already known to the remote server. - * - * @author Phillip Webb - */ -public class UploadApplicationPayload { - - private ApplicationArchive archive; - - private ArrayList entriesToUpload; - - private int totalUncompressedSize; - - /** - * Create a new {@link UploadApplicationPayload}. - * - * @param archive the source archive - * @param knownRemoteResources resources that are already known on the remote server - * @throws IOException - */ - public UploadApplicationPayload(ApplicationArchive archive, CloudResources knownRemoteResources) throws IOException { - this.archive = archive; - this.totalUncompressedSize = 0; - Set matches = knownRemoteResources.getFilenames(); - this.entriesToUpload = new ArrayList(); - for (ApplicationArchive.Entry entry : archive.getEntries()) { - if (entry.isDirectory() || !matches.contains(entry.getName())) { - entriesToUpload.add(new DynamicZipInputStreamEntryAdapter(entry)); - totalUncompressedSize += entry.getSize(); - } - } - } - - /** - * Returns the source archive. - * @return the archive - */ - public ApplicationArchive getArchive() { - return archive; - } - - /** - * Returns the total size of the entries to be transfered (before compression). - * @return the uncompressed size of the entries. - */ - public int getTotalUncompressedSize() { - return totalUncompressedSize; - } - - /** - * - * @return The total number of entries to upload - */ - public int getNumEntries() { - return entriesToUpload.size(); - } - - /** - * Returns the payload data as an input stream. - * @return the payload data - */ - public InputStream getInputStream() { - return new DynamicZipInputStream(entriesToUpload); - } - - /** - * Internal adapter used to convert {@link ApplicationArchive.Entry} into {@link DynamicZipInputStream.Entry}. - */ - private static class DynamicZipInputStreamEntryAdapter implements DynamicZipInputStream.Entry { - - private ApplicationArchive.Entry entry; - - public DynamicZipInputStreamEntryAdapter(ApplicationArchive.Entry entry) { - this.entry = entry; - } - - public String getName() { - return entry.getName(); - } - - public InputStream getInputStream() throws IOException { - return entry.getInputStream(); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/io/DynamicInputStream.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/io/DynamicInputStream.java deleted file mode 100644 index 24d9ac89be8..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/io/DynamicInputStream.java +++ /dev/null @@ -1,122 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.io; - -import java.io.ByteArrayOutputStream; -import java.io.FilterInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; - -import org.springframework.util.Assert; - -/** - * InputStream that dynamically loads data on demand as the stream is read. Subclasses must implement the - * {@link #writeMoreData()} method. - * - * @author Phillip Webb - */ -public abstract class DynamicInputStream extends InputStream { - - private BufferedOutputStream outputStream = new BufferedOutputStream(); - - private byte[] singleByte = new byte[1]; - - @Override - public int read() throws IOException { - int s = read(singleByte); - if (s == 1) { - return (int) singleByte[0] & 0xFF; - } - return -1; - } - - @Override - public int read(byte[] b, int off, int len) throws IOException { - if (b == null) { - throw new NullPointerException(); - } - if (off < 0 || len < 0 || len > (b.length - off)) { - throw new IndexOutOfBoundsException(); - } - if (len == 0) { - return 0; - } - return doRead(b, off, len, true); - } - - private int doRead(byte[] b, int off, int len, boolean lastWriteWasSuccessful) throws IOException { - if (outputStream.getAvailable() > 0) { - return outputStream.read(b, off, len); - } - if (!lastWriteWasSuccessful) { - return -1; - } - outputStream.clear(); - boolean writeSuccess = writeMoreData(); - return doRead(b, off, len, writeSuccess); - } - - /** - * Returns the {@link OutputStream} that should be used when {@link #writeMoreData() writing} data. The output - * stream instance will not change during the life of the object and so can be used as the source to a a - * {@link FilterInputStream}. This is an in-memory stream so care should be taken to not write large amounts of - * data. - * - * @return the output stream - * @see #writeMoreData() - */ - protected final OutputStream getOutputStream() { - return outputStream; - } - - /** - * Called when more data should be written to the {@link #getOutputStream() output stream}. This method can be - * called many times, implementations should write zero or more bytes to {@link #getOutputStream() output stream} on - * each call. Generally it is recommended that not more that 4096 bytes are written in a single call. - * - * @return false when no more data is available to write. - * @throws IOException - */ - protected abstract boolean writeMoreData() throws IOException; - - /** - * Internal buffered {@link OutputStream} implementation. - */ - private static class BufferedOutputStream extends ByteArrayOutputStream { - - private int offset; - - public int getAvailable() { - return count - offset; - } - - public void clear() { - this.count = 0; - this.offset = 0; - } - - public int read(byte[] b, int off, int len) { - int length = Math.min(getAvailable(), len); - Assert.state(length > 0, "No data available in buffer"); - System.arraycopy(this.buf, this.offset, b, off, length); - offset += length; - return length; - } - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/io/DynamicZipInputStream.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/io/DynamicZipInputStream.java deleted file mode 100644 index 31403c73b83..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/io/DynamicZipInputStream.java +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.io; - -import java.io.IOException; -import java.io.InputStream; -import java.util.Iterator; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import org.springframework.util.Assert; - -/** - * InputStream that dynamically creates ZIP contents as the stream is read without consuming too much memory. Zip - * {@link Entry entries} should be provided on {@link #DynamicZipInputStream(Iterable) construction}. - * - * @author Phillip Webb - */ -public class DynamicZipInputStream extends DynamicInputStream { - - private static final int BUFFER_SIZE = 4096; - - private static InputStream EMPTY_STREAM = new InputStream() { - - @Override - public int read() throws IOException { - return -1; - } - }; - - /** - * The underlying ZIP stream. - */ - private ZipOutputStream zipStream; - - /** - * Entries to be written. - */ - private Iterator entries; - - /** - * The current entry {@link InputStream}. - */ - private InputStream entryStream = EMPTY_STREAM; - - /** - * Buffer for reading stream contents. - */ - private byte[] buffer = new byte[BUFFER_SIZE]; - - /** - * File counter used for detecting empty archives. - */ - private long fileCount = 0; - - /** - * Create a new {@link DynamicZipInputStream} instance. - * - * @param entries the zip entries that should be written to the stream - */ - public DynamicZipInputStream(Iterable entries) { - Assert.notNull(entries, "Entries must not be null"); - this.zipStream = new ZipOutputStream(getOutputStream()); - this.entries = entries.iterator(); - } - - @Override - protected boolean writeMoreData() throws IOException { - - // Write data from the current stream if possible - int count = entryStream.read(buffer); - if (count != -1) { - zipStream.write(buffer, 0, count); - return true; - } - - // Close any open entry - if (entryStream != EMPTY_STREAM) { - zipStream.closeEntry(); - entryStream.close(); - entryStream = EMPTY_STREAM; - } - - // Move to the next entry if there is one (no need to write data as returning true causes another call) - if (entries.hasNext()) { - fileCount++; - Entry entry = entries.next(); - zipStream.putNextEntry(new ZipEntry(entry.getName())); - entryStream = entry.getInputStream(); - if(entryStream == null) { - entryStream = EMPTY_STREAM; - } - return true; - } - - // If no files were added to the archive add an empty one - if (fileCount == 0) { - fileCount++; - zipStream.putNextEntry(new ZipEntry("__empty__")); - entryStream = EMPTY_STREAM; - return true; - } - - // No more entries, close and flush the stream - zipStream.flush(); - zipStream.close(); - return false; - } - - @Override - public void close() throws IOException { - super.close(); - zipStream.close(); - } - - /** - * Represents a single entry from a ZIP files. - */ - public static interface Entry { - - /** - * Returns the name of the entry complete with path, equivalent to {@link ZipEntry#getName()}. - * - * @return the name of the entry - */ - String getName(); - - /** - * Opens a new stream that can be used to read the contents of the entry. The steam will be closed by the - * caller. - * - * @return the entry input stream - * @throws IOException - */ - InputStream getInputStream() throws IOException; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/oauth2/OauthClient.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/oauth2/OauthClient.java deleted file mode 100644 index a853ee30781..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/oauth2/OauthClient.java +++ /dev/null @@ -1,171 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.oauth2; - -import java.net.URL; -import java.util.HashMap; -import java.util.LinkedHashMap; -import java.util.Map; - -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.util.JsonUtil; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; -import org.springframework.security.oauth2.client.resource.OAuth2AccessDeniedException; -import org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails; -import org.springframework.security.oauth2.client.token.AccessTokenRequest; -import org.springframework.security.oauth2.client.token.DefaultAccessTokenRequest; -import org.springframework.security.oauth2.client.token.grant.password.ResourceOwnerPasswordAccessTokenProvider; -import org.springframework.security.oauth2.client.token.grant.password.ResourceOwnerPasswordResourceDetails; -import org.springframework.security.oauth2.common.AuthenticationScheme; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.web.client.RestTemplate; - -/** - * Client that can handle authentication against a UAA instance - * - * @author Dave Syer - * @author Thomas Risberg - */ -public class OauthClient { - - private static final String AUTHORIZATION_HEADER_KEY = "Authorization"; - - private URL authorizationUrl; - - private RestTemplate restTemplate; - - private OAuth2AccessToken token; - private CloudCredentials credentials; - - public OauthClient(URL authorizationUrl, RestTemplate restTemplate) { - this.authorizationUrl = authorizationUrl; - this.restTemplate = restTemplate; - } - - public void init(CloudCredentials credentials) { - if (credentials != null) { - this.credentials = credentials; - - if (credentials.getToken() != null) { - this.token = credentials.getToken(); - } else { - this.token = createToken(credentials.getEmail(), credentials.getPassword(), - credentials.getClientId(), credentials.getClientSecret()); - } - } - } - - public void clear() { - this.token = null; - this.credentials = null; - } - - public OAuth2AccessToken getToken() { - if (token == null) { - return null; - } - - if (token.getExpiresIn() < 50) { // 50 seconds before expiration? Then refresh it. - token = refreshToken(token, credentials.getEmail(), credentials.getPassword(), - credentials.getClientId(), credentials.getClientSecret()); - } - - return token; - } - - public String getAuthorizationHeader() { - if (token != null) { - return token.getTokenType() + " " + token.getValue(); - } - return null; - } - - private OAuth2AccessToken createToken(String username, String password, String clientId, String clientSecret) { - OAuth2ProtectedResourceDetails resource = getResourceDetails(username, password, clientId, clientSecret); - AccessTokenRequest request = createAccessTokenRequest(username, password); - - ResourceOwnerPasswordAccessTokenProvider provider = createResourceOwnerPasswordAccessTokenProvider(); - try { - return provider.obtainAccessToken(resource, request); - } - catch (OAuth2AccessDeniedException oauthEx) { - HttpStatus status = HttpStatus.valueOf(oauthEx.getHttpErrorCode()); - CloudFoundryException cfEx = new CloudFoundryException(status, oauthEx.getMessage()); - cfEx.setDescription(oauthEx.getSummary()); - throw cfEx; - } - } - - private OAuth2AccessToken refreshToken(OAuth2AccessToken currentToken, String username, String password, String clientId, String clientSecret) { - OAuth2ProtectedResourceDetails resource = getResourceDetails(username, password, clientId, clientSecret); - AccessTokenRequest request = createAccessTokenRequest(username, password); - - ResourceOwnerPasswordAccessTokenProvider provider = createResourceOwnerPasswordAccessTokenProvider(); - - return provider.refreshAccessToken(resource, currentToken.getRefreshToken(), request); - } - - @SuppressWarnings({ "rawtypes", "unchecked" }) - public void changePassword(String oldPassword, String newPassword) { - HttpHeaders headers = new HttpHeaders(); - headers.add(AUTHORIZATION_HEADER_KEY, token.getTokenType() + " " + token.getValue()); - HttpEntity info = new HttpEntity(headers); - ResponseEntity response = restTemplate.exchange(authorizationUrl + "/userinfo", HttpMethod.GET, info, String.class); - Map responseMap = JsonUtil.convertJsonToMap(response.getBody()); - String userId = (String) responseMap.get("user_id"); - Map body = new HashMap(); - body.put("schemas", new String[] {"urn:scim:schemas:core:1.0"}); - body.put("password", newPassword); - body.put("oldPassword", oldPassword); - HttpEntity httpEntity = new HttpEntity(body, headers); - restTemplate.put(authorizationUrl + "/User/{id}/password", httpEntity, userId); - } - - protected ResourceOwnerPasswordAccessTokenProvider createResourceOwnerPasswordAccessTokenProvider() { - ResourceOwnerPasswordAccessTokenProvider resourceOwnerPasswordAccessTokenProvider = new ResourceOwnerPasswordAccessTokenProvider(); - resourceOwnerPasswordAccessTokenProvider.setRequestFactory(restTemplate.getRequestFactory()); //copy the http proxy along - return resourceOwnerPasswordAccessTokenProvider; - } - - private AccessTokenRequest createAccessTokenRequest(String username, String password) { - Map parameters = new LinkedHashMap(); - parameters.put("credentials", String.format("{\"username\":\"%s\",\"password\":\"%s\"}", username, password)); - AccessTokenRequest request = new DefaultAccessTokenRequest(); - request.setAll(parameters); - - return request; - } - - private OAuth2ProtectedResourceDetails getResourceDetails(String username, String password, String clientId, String clientSecret) { - ResourceOwnerPasswordResourceDetails resource = new ResourceOwnerPasswordResourceDetails(); - resource.setUsername(username); - resource.setPassword(password); - - resource.setClientId(clientId); - resource.setClientSecret(clientSecret); - resource.setId(clientId); - resource.setClientAuthenticationScheme(AuthenticationScheme.header); - resource.setAccessTokenUri(authorizationUrl + "/oauth/token"); - - return resource; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClient.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClient.java deleted file mode 100644 index 01a51ae387c..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClient.java +++ /dev/null @@ -1,225 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.rest; - -import java.io.File; -import java.io.IOException; -import java.net.URL; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -import org.cloudfoundry.client.lib.ApplicationLogListener; -import org.cloudfoundry.client.lib.ClientHttpResponseCallback; -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.RestLogCallback; -import org.cloudfoundry.client.lib.StartingInfo; -import org.cloudfoundry.client.lib.StreamingLogToken; -import org.cloudfoundry.client.lib.UploadStatusCallback; -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudQuota; -import org.cloudfoundry.client.lib.domain.CloudRoute; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceBroker; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.domain.CloudStack; -import org.cloudfoundry.client.lib.domain.CrashesInfo; -import org.cloudfoundry.client.lib.domain.InstancesInfo; -import org.cloudfoundry.client.lib.domain.Staging; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.web.client.ResponseErrorHandler; - -/** - * Interface defining operations available for the cloud controller REST client implementations - * - * @author Thomas Risberg - */ -public interface CloudControllerClient { - - // User and Info methods - - void setResponseErrorHandler(ResponseErrorHandler errorHandler); - - URL getCloudControllerUrl(); - - CloudInfo getInfo(); - - List getSpaces(); - - List getOrganizations(); - - OAuth2AccessToken login(); - - void logout(); - - void register(String email, String password); - - void updatePassword(String newPassword); - - void updatePassword(CloudCredentials credentials, String newPassword); - - void unregister(); - - // Service methods - - List getServices(); - - void createService(CloudService service); - - void createUserProvidedService(CloudService service, Map credentials); - - CloudService getService(String service); - - void deleteService(String service); - - void deleteAllServices(); - - List getServiceOfferings(); - - List getServiceBrokers(); - - // App methods - - List getApplications(); - - CloudApplication getApplication(String appName); - - CloudApplication getApplication(UUID appGuid); - - ApplicationStats getApplicationStats(String appName); - - void createApplication(String appName, Staging staging, Integer memory, List uris, - List serviceNames); - - void createApplication(String appName, Staging staging, Integer disk, Integer memory, - List uris, List serviceNames); - - void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException; - - void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) throws IOException; - - StartingInfo startApplication(String appName); - - void debugApplication(String appName, CloudApplication.DebugMode mode); - - void stopApplication(String appName); - - StartingInfo restartApplication(String appName); - - void deleteApplication(String appName); - - void deleteAllApplications(); - - void updateApplicationDiskQuota(String appName, int disk); - - void updateApplicationMemory(String appName, int memory); - - void updateApplicationInstances(String appName, int instances); - - void updateApplicationServices(String appName, List services); - - void updateApplicationStaging(String appName, Staging staging); - - void updateApplicationUris(String appName, List uris); - - void updateApplicationEnv(String appName, Map env); - - void updateApplicationEnv(String appName, List env); - - Map getLogs(String appName); - - StreamingLogToken streamLogs(String appName, ApplicationLogListener listener); - - List getRecentLogs(String appName); - - Map getCrashLogs(String appName); - - String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition); - - void openFile(String appName, int instanceIndex, String filePath, ClientHttpResponseCallback callback); - - void bindService(String appName, String serviceName); - - void unbindService(String appName, String serviceName); - - InstancesInfo getApplicationInstances(String appName); - - InstancesInfo getApplicationInstances(CloudApplication app); - - CrashesInfo getCrashes(String appName); - - void rename(String appName, String newName); - - String getStagingLogs(StartingInfo info, int offset); - - List getStacks(); - - CloudStack getStack(String name); - - // Domains and routes management - - - List getDomainsForOrg(); - - List getDomains(); - - List getPrivateDomains(); - - List getSharedDomains(); - - CloudDomain getDefaultDomain(); - - void addDomain(String domainName); - - void deleteDomain(String domainName); - - void removeDomain(String domainName); - - List getRoutes(String domainName); - - void addRoute(String host, String domainName); - - void deleteRoute(String host, String domainName); - - // Misc. utility methods - - void registerRestLogListener(RestLogCallback callBack); - - void unRegisterRestLogListener(RestLogCallback callBack); - - // Quota operations - CloudOrganization getOrgByName(String orgName, boolean required); - - List getQuotas(); - - CloudQuota getQuotaByName(String quotaName, boolean required); - - void createQuota(CloudQuota quota); - - void updateQuota(CloudQuota quota, String name); - - void deleteQuota(String quotaName); - - void setQuotaToOrg(String orgName, String quotaName); -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClientFactory.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClientFactory.java deleted file mode 100644 index 6726656f0e7..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClientFactory.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.rest; - -import java.io.IOException; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.HashMap; -import java.util.Map; - -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.HttpProxyConfiguration; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.oauth2.OauthClient; -import org.cloudfoundry.client.lib.util.RestUtil; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; -import org.springframework.web.client.RestTemplate; - -/** - * Factory used to create cloud controller client implementations. - * - * @author Thgomas Risberg - * @author Ramnivas Laddad - */ -public class CloudControllerClientFactory { - - private final RestUtil restUtil; - private final RestTemplate restTemplate; - - private OauthClient oauthClient; - - private final HttpProxyConfiguration httpProxyConfiguration; - private final boolean trustSelfSignedCerts; - - private ObjectMapper objectMapper; - - private final Map> infoCache = new HashMap>(); - - public CloudControllerClientFactory(HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - this.restUtil = new RestUtil(); - this.restTemplate = restUtil.createRestTemplate(httpProxyConfiguration, trustSelfSignedCerts); - - this.httpProxyConfiguration = httpProxyConfiguration; - this.trustSelfSignedCerts = trustSelfSignedCerts; - - this.objectMapper = new ObjectMapper(); - } - - public CloudControllerClient newCloudController(URL cloudControllerUrl, CloudCredentials cloudCredentials, - CloudSpace sessionSpace) { - createOauthClient(cloudControllerUrl); - LoggregatorClient loggregatorClient = new LoggregatorClient(trustSelfSignedCerts); - - return new CloudControllerClientImpl(cloudControllerUrl, restTemplate, oauthClient, loggregatorClient, - cloudCredentials, sessionSpace); - } - - public CloudControllerClient newCloudController(URL cloudControllerUrl, CloudCredentials cloudCredentials, - String orgName, String spaceName) { - createOauthClient(cloudControllerUrl); - LoggregatorClient loggregatorClient = new LoggregatorClient(trustSelfSignedCerts); - - return new CloudControllerClientImpl(cloudControllerUrl, restTemplate, oauthClient, loggregatorClient, - cloudCredentials, orgName, spaceName); - } - - public RestTemplate getRestTemplate() { - return restTemplate; - } - - public OauthClient getOauthClient() { - return oauthClient; - } - - private void createOauthClient(URL cloudControllerUrl) { - Map infoMap = getInfoMap(cloudControllerUrl); - URL authorizationEndpoint = getAuthorizationEndpoint(infoMap, cloudControllerUrl); - this.oauthClient = restUtil.createOauthClient(authorizationEndpoint, httpProxyConfiguration, trustSelfSignedCerts); - } - - private Map getInfoMap(URL cloudControllerUrl) { - if (infoCache.containsKey(cloudControllerUrl)) { - return infoCache.get(cloudControllerUrl); - } - - String s = restTemplate.getForObject(cloudControllerUrl + "/info", String.class); - - try { - return objectMapper.readValue(s, new TypeReference>() {}); - } catch (IOException e) { - throw new RuntimeException("Error getting /info from Cloud Controller", e); - } - } - - private URL getAuthorizationEndpoint(Map infoMap, URL cloudControllerUrl) { - String authEndPoint = (String) infoMap.get("authorization_endpoint"); - - try { - return new URL(authEndPoint); - } catch (MalformedURLException e) { - throw new IllegalArgumentException("Error creating auth endpoint URL for endpoint " + authEndPoint, e); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClientImpl.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClientImpl.java deleted file mode 100644 index e0fa224aeb9..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerClientImpl.java +++ /dev/null @@ -1,1923 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.rest; - -import java.io.File; -import java.io.IOException; -import java.io.UnsupportedEncodingException; -import java.net.Socket; -import java.net.SocketException; -import java.net.URI; -import java.net.URL; -import java.net.URLDecoder; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; -import java.util.UUID; -import java.util.zip.ZipFile; - -import javax.websocket.ClientEndpointConfig; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.client.lib.ApplicationLogListener; -import org.cloudfoundry.client.lib.ClientHttpResponseCallback; -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.RestLogCallback; -import org.cloudfoundry.client.lib.StartingInfo; -import org.cloudfoundry.client.lib.StreamingLogToken; -import org.cloudfoundry.client.lib.UploadStatusCallback; -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.archive.DirectoryApplicationArchive; -import org.cloudfoundry.client.lib.archive.ZipApplicationArchive; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudQuota; -import org.cloudfoundry.client.lib.domain.CloudResource; -import org.cloudfoundry.client.lib.domain.CloudResources; -import org.cloudfoundry.client.lib.domain.CloudRoute; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceBroker; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudServicePlan; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.domain.CloudStack; -import org.cloudfoundry.client.lib.domain.CrashInfo; -import org.cloudfoundry.client.lib.domain.CrashesInfo; -import org.cloudfoundry.client.lib.domain.InstanceState; -import org.cloudfoundry.client.lib.domain.InstanceStats; -import org.cloudfoundry.client.lib.domain.InstancesInfo; -import org.cloudfoundry.client.lib.domain.Staging; -import org.cloudfoundry.client.lib.domain.UploadApplicationPayload; -import org.cloudfoundry.client.lib.oauth2.OauthClient; -import org.cloudfoundry.client.lib.util.CloudEntityResourceMapper; -import org.cloudfoundry.client.lib.util.CloudUtil; -import org.cloudfoundry.client.lib.util.JsonUtil; -import org.codehaus.jackson.map.ObjectMapper; -import org.springframework.core.ParameterizedTypeReference; -import org.springframework.http.HttpEntity; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; -import org.springframework.http.ResponseEntity; -import org.springframework.http.client.ClientHttpRequest; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.converter.FormHttpMessageConverter; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.util.Assert; -import org.springframework.util.LinkedMultiValueMap; -import org.springframework.util.MultiValueMap; -import org.springframework.web.client.RequestCallback; -import org.springframework.web.client.ResourceAccessException; -import org.springframework.web.client.ResponseErrorHandler; -import org.springframework.web.client.ResponseExtractor; -import org.springframework.web.client.RestTemplate; - -/** - * Abstract implementation of the CloudControllerClient intended to serve as the base. - * - * @author Ramnivas Laddad - * @author A.B.Srinivasan - * @author Jennifer Hickey - * @author Dave Syer - * @author Thomas Risberg - */ -public class CloudControllerClientImpl implements CloudControllerClient { - - private static final String AUTHORIZATION_HEADER_KEY = "Authorization"; - private static final String PROXY_USER_HEADER_KEY = "Proxy-User"; - - private static final String LOGS_LOCATION = "logs"; - private static final int JOB_POLLING_PERIOD = 5000; // matches that of gcf - - private OauthClient oauthClient; - - private CloudSpace sessionSpace; - - private CloudEntityResourceMapper resourceMapper = new CloudEntityResourceMapper(); - - private RestTemplate restTemplate; - - private URL cloudControllerUrl; - - private LoggregatorClient loggregatorClient; - - protected CloudCredentials cloudCredentials; - - private final Log logger; - - /** - * Only for unit tests. This works around the fact that the initialize method is called within the constructor and - * hence can not be overloaded, making it impossible to write unit tests that don't trigger network calls. - */ - protected CloudControllerClientImpl() { - logger = LogFactory.getLog(getClass().getName()); - } - - public CloudControllerClientImpl(URL cloudControllerUrl, RestTemplate restTemplate, - OauthClient oauthClient, LoggregatorClient loggregatorClient, - CloudCredentials cloudCredentials, CloudSpace sessionSpace) { - logger = LogFactory.getLog(getClass().getName()); - - initialize(cloudControllerUrl, restTemplate, oauthClient, loggregatorClient, cloudCredentials); - - this.sessionSpace = sessionSpace; - } - - public CloudControllerClientImpl(URL cloudControllerUrl, RestTemplate restTemplate, - OauthClient oauthClient, LoggregatorClient loggregatorClient, - CloudCredentials cloudCredentials, String orgName, String spaceName) { - logger = LogFactory.getLog(getClass().getName()); - CloudControllerClientImpl tempClient = - new CloudControllerClientImpl(cloudControllerUrl, restTemplate, - oauthClient, loggregatorClient, cloudCredentials, null); - - initialize(cloudControllerUrl, restTemplate, oauthClient, loggregatorClient, cloudCredentials); - - this.sessionSpace = validateSpaceAndOrg(spaceName, orgName, tempClient); - } - - private void initialize(URL cloudControllerUrl, RestTemplate restTemplate, OauthClient oauthClient, - LoggregatorClient loggregatorClient, CloudCredentials cloudCredentials) { - Assert.notNull(cloudControllerUrl, "CloudControllerUrl cannot be null"); - Assert.notNull(restTemplate, "RestTemplate cannot be null"); - Assert.notNull(oauthClient, "OauthClient cannot be null"); - - oauthClient.init(cloudCredentials); - - this.cloudCredentials = cloudCredentials; - - this.cloudControllerUrl = cloudControllerUrl; - - this.restTemplate = restTemplate; - configureCloudFoundryRequestFactory(restTemplate); - - this.oauthClient = oauthClient; - - this.loggregatorClient = loggregatorClient; - } - - private CloudSpace validateSpaceAndOrg(String spaceName, String orgName, CloudControllerClientImpl client) { - List spaces = client.getSpaces(); - - for (CloudSpace space : spaces) { - if (space.getName().equals(spaceName)) { - CloudOrganization org = space.getOrganization(); - if (orgName == null || org.getName().equals(orgName)) { - return space; - } - } - } - - throw new IllegalArgumentException("No matching organization and space found for org: " + orgName + " space: " + spaceName); - } - - public void setResponseErrorHandler(ResponseErrorHandler errorHandler) { - this.restTemplate.setErrorHandler(errorHandler); - } - - public URL getCloudControllerUrl() { - return this.cloudControllerUrl; - } - - public void updatePassword(String newPassword) { - updatePassword(cloudCredentials, newPassword); - } - - public Map getLogs(String appName) { - String urlPath = getFileUrlPath(); - String instance = String.valueOf(0); - return doGetLogs(urlPath, appName, instance); - } - - public List getRecentLogs(String appName) { - AccumulatingApplicationLogListener listener = new AccumulatingApplicationLogListener(); - streamLoggregatorLogs(appName, listener, true); - synchronized (listener) { - try { - listener.wait(); - } catch (InterruptedException e) { - // return any captured logs - } - } - return listener.getLogs(); - } - - public StreamingLogToken streamLogs(String appName, ApplicationLogListener listener) { - return streamLoggregatorLogs(appName, listener, false); - } - - public Map getCrashLogs(String appName) { - String urlPath = getFileUrlPath(); - CrashesInfo crashes = getCrashes(appName); - if (crashes.getCrashes().isEmpty()) { - return Collections.emptyMap(); - } - TreeMap crashInstances = new TreeMap(); - for (CrashInfo crash : crashes.getCrashes()) { - crashInstances.put(crash.getSince(), crash.getInstance()); - } - String instance = crashInstances.get(crashInstances.lastKey()); - return doGetLogs(urlPath, appName, instance); - } - - public String getFile(String appName, int instanceIndex, String filePath, int startPosition, int endPosition) { - String urlPath = getFileUrlPath(); - Object appId = getFileAppId(appName); - return doGetFile(urlPath, appId, instanceIndex, filePath, startPosition, endPosition); - } - - - public void openFile(String appName, int instanceIndex, String filePath, ClientHttpResponseCallback callback) { - String urlPath = getFileUrlPath(); - Object appId = getFileAppId(appName); - doOpenFile(urlPath, appId, instanceIndex, filePath, callback); - } - - public void registerRestLogListener(RestLogCallback callBack) { - if (getRestTemplate() instanceof LoggingRestTemplate) { - ((LoggingRestTemplate)getRestTemplate()).registerRestLogListener(callBack); - } - } - - public void unRegisterRestLogListener(RestLogCallback callBack) { - if (getRestTemplate() instanceof LoggingRestTemplate) { - ((LoggingRestTemplate)getRestTemplate()).unRegisterRestLogListener(callBack); - } - } - - /** - * Returns null if no further content is available. Two errors that will - * lead to a null value are 404 Bad Request errors, which are handled in the - * implementation, meaning that no further log file contents are available, - * or ResourceAccessException, also handled in the implementation, - * indicating a possible timeout in the server serving the content. Note - * that any other CloudFoundryException or RestClientException exception not - * related to the two errors mentioned above may still be thrown (e.g. 500 - * level errors, Unauthorized or Forbidden exceptions, etc..) - * - * @return content if available, which may contain multiple lines, or null - * if no further content is available. - * - */ - public String getStagingLogs(StartingInfo info, int offset) { - String stagingFile = info.getStagingFile(); - if (stagingFile != null) { - CloudFoundryClientHttpRequestFactory cfRequestFactory = null; - try { - HashMap logsRequest = new HashMap(); - logsRequest.put("offset", offset); - - cfRequestFactory = getRestTemplate().getRequestFactory() instanceof CloudFoundryClientHttpRequestFactory ? (CloudFoundryClientHttpRequestFactory) getRestTemplate() - .getRequestFactory() : null; - if (cfRequestFactory != null) { - cfRequestFactory - .increaseReadTimeoutForStreamedTailedLogs(5 * 60 * 1000); - } - return getRestTemplate().getForObject( - stagingFile + "&tail&tail_offset={offset}", - String.class, logsRequest); - } catch (CloudFoundryException e) { - if (e.getStatusCode().equals(HttpStatus.NOT_FOUND)) { - // Content is no longer available - return null; - } else { - throw e; - } - } catch (ResourceAccessException e) { - // Likely read timeout, the directory server won't serve - // the content again - logger.debug("Caught exception while fetching staging logs. Aborting. Caught:" + e, - e); - } finally { - if (cfRequestFactory != null) { - cfRequestFactory - .increaseReadTimeoutForStreamedTailedLogs(-1); - } - } - } - return null; - } - - protected RestTemplate getRestTemplate() { - return this.restTemplate; - } - - protected String getUrl(String path) { - return cloudControllerUrl + (path.startsWith("/") ? path : "/" + path); - } - - protected void configureCloudFoundryRequestFactory(RestTemplate restTemplate) { - ClientHttpRequestFactory requestFactory = restTemplate.getRequestFactory(); - if (!(requestFactory instanceof CloudFoundryClientHttpRequestFactory)) { - restTemplate.setRequestFactory( - new CloudFoundryClientHttpRequestFactory(requestFactory)); - } - } - - private class CloudFoundryClientHttpRequestFactory implements ClientHttpRequestFactory { - - private ClientHttpRequestFactory delegate; - private Integer defaultSocketTimeout = 0; - - public CloudFoundryClientHttpRequestFactory(ClientHttpRequestFactory delegate) { - this.delegate = delegate; - captureDefaultReadTimeout(); - } - - public ClientHttpRequest createRequest(URI uri, HttpMethod httpMethod) throws IOException { - ClientHttpRequest request = delegate.createRequest(uri, httpMethod); - - String authorizationHeader = oauthClient.getAuthorizationHeader(); - if (authorizationHeader != null) { - request.getHeaders().add(AUTHORIZATION_HEADER_KEY, authorizationHeader); - } - - if (cloudCredentials != null && cloudCredentials.getProxyUser() != null) { - request.getHeaders().add(PROXY_USER_HEADER_KEY, cloudCredentials.getProxyUser()); - } - - return request; - } - - private void captureDefaultReadTimeout() { - if (delegate instanceof HttpComponentsClientHttpRequestFactory) { - HttpComponentsClientHttpRequestFactory httpRequestFactory = - (HttpComponentsClientHttpRequestFactory) delegate; - defaultSocketTimeout = (Integer) httpRequestFactory - .getHttpClient().getParams() - .getParameter("http.socket.timeout"); - if (defaultSocketTimeout == null) { - try { - defaultSocketTimeout = new Socket().getSoTimeout(); - } catch (SocketException e) { - defaultSocketTimeout = 0; - } - } - } - } - - public void increaseReadTimeoutForStreamedTailedLogs(int timeout) { - // May temporary increase read timeout on other unrelated concurrent - // threads, but per-request read timeout don't seem easily - // accessible - if (delegate instanceof HttpComponentsClientHttpRequestFactory) { - HttpComponentsClientHttpRequestFactory httpRequestFactory = - (HttpComponentsClientHttpRequestFactory) delegate; - - if (timeout > 0) { - httpRequestFactory.setReadTimeout(timeout); - } else { - httpRequestFactory - .setReadTimeout(defaultSocketTimeout); - } - } - } - } - - public static class CloudFoundryFormHttpMessageConverter extends FormHttpMessageConverter { - @Override - protected String getFilename(Object part) { - if (part instanceof UploadApplicationPayload) { - return ((UploadApplicationPayload) part).getArchive().getFilename(); - } - return super.getFilename(part); - } - } - - protected Map doGetLogs(String urlPath, String appName, String instance) { - Object appId = getFileAppId(appName); - String logFiles = doGetFile(urlPath, appId, instance, LOGS_LOCATION, -1, -1); - String[] lines = logFiles.split("\n"); - List fileNames = new ArrayList(); - for (String line : lines) { - String[] parts = line.split("\\s"); - if (parts.length > 0 && parts[0] != null) { - fileNames.add(parts[0]); - } - } - Map logs = new HashMap(fileNames.size()); - for(String fileName : fileNames) { - String logFile = LOGS_LOCATION + "/" + fileName; - logs.put(logFile, doGetFile(urlPath, appId, instance, logFile, -1, -1)); - } - return logs; - } - - @SuppressWarnings("unchecked") - protected void doOpenFile(String urlPath, Object app, int instanceIndex, String filePath, - ClientHttpResponseCallback callback) { - getRestTemplate().execute(getUrl(urlPath), HttpMethod.GET, null, new ResponseExtractorWrapper(callback), app, - String.valueOf(instanceIndex), filePath); - } - - protected String doGetFile(String urlPath, Object app, int instanceIndex, String filePath, int startPosition, int endPosition) { - return doGetFile(urlPath, app, String.valueOf(instanceIndex), filePath, startPosition, endPosition); - } - - protected String doGetFile(String urlPath, Object app, String instance, String filePath, int startPosition, int endPosition) { - Assert.isTrue(startPosition >= -1, "Invalid start position value: " + startPosition); - Assert.isTrue(endPosition >= -1, "Invalid end position value: " + endPosition); - Assert.isTrue(startPosition < 0 || endPosition < 0 || endPosition >= startPosition, - "The end position (" + endPosition + ") can't be less than the start position (" + startPosition + ")"); - - int start, end; - if (startPosition == -1 && endPosition == -1) { - start = 0; - end = -1; - } else { - start = startPosition; - end = endPosition; - } - - final String range = - "bytes=" + (start == -1 ? "" : start) + "-" + (end == -1 ? "" : end); - - return doGetFileByRange(urlPath, app, instance, filePath, start, end, range); - } - - private String doGetFileByRange(String urlPath, Object app, String instance, String filePath, int start, int end, - String range) { - - boolean supportsRanges; - try { - supportsRanges = getRestTemplate().execute(getUrl(urlPath), - HttpMethod.HEAD, - new RequestCallback() { - public void doWithRequest(ClientHttpRequest request) throws IOException { - request.getHeaders().set("Range", "bytes=0-"); - } - }, - new ResponseExtractor() { - public Boolean extractData(ClientHttpResponse response) throws IOException { - return response.getStatusCode().equals(HttpStatus.PARTIAL_CONTENT); - } - }, - app, instance, filePath); - } catch (CloudFoundryException e) { - if (e.getStatusCode().equals(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE)) { - // must be a 0 byte file - return ""; - } else { - throw e; - } - } - HttpHeaders headers = new HttpHeaders(); - if (supportsRanges) { - headers.set("Range", range); - } - HttpEntity requestEntity = new HttpEntity(headers); - ResponseEntity responseEntity = getRestTemplate().exchange(getUrl(urlPath), - HttpMethod.GET, requestEntity, String.class, app, instance, filePath); - String response = responseEntity.getBody(); - boolean partialFile = false; - if (responseEntity.getStatusCode().equals(HttpStatus.PARTIAL_CONTENT)) { - partialFile = true; - } - if (!partialFile && response != null) { - if (start == -1) { - return response.substring(response.length() - end); - } else { - if (start >= response.length()) { - if (response.length() == 0) { - return ""; - } - throw new CloudFoundryException(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE, - "The starting position " + start + " is past the end of the file content."); - } - if (end != -1) { - if (end >= response.length()) { - end = response.length() - 1; - } - return response.substring(start, end + 1); - } else { - return response.substring(start); - } - } - } - return response; - } - - @SuppressWarnings("unchecked") - public CloudInfo getInfo() { - // info comes from two end points: /info and /v2/info - - String infoV2Json = getRestTemplate().getForObject(getUrl("/v2/info"), String.class); - Map infoV2Map = JsonUtil.convertJsonToMap(infoV2Json); - - Map userMap = getUserInfo((String) infoV2Map.get("user")); - - String infoJson = getRestTemplate().getForObject(getUrl("/info"), String.class); - Map infoMap = JsonUtil.convertJsonToMap(infoJson); - Map limitMap = (Map) infoMap.get("limits"); - Map usageMap = (Map) infoMap.get("usage"); - - String name = CloudUtil.parse(String.class, infoV2Map.get("name")); - String support = CloudUtil.parse(String.class, infoV2Map.get("support")); - String authorizationEndpoint = CloudUtil.parse(String.class, infoV2Map.get("authorization_endpoint")); - String build = CloudUtil.parse(String.class, infoV2Map.get("build")); - String version = "" + CloudUtil.parse(Number.class, infoV2Map.get("version")); - String description = CloudUtil.parse(String.class, infoV2Map.get("description")); - - CloudInfo.Limits limits = null; - CloudInfo.Usage usage = null; - boolean debug = false; - if (oauthClient.getToken() != null) { - limits = new CloudInfo.Limits(limitMap); - usage = new CloudInfo.Usage(usageMap); - debug = CloudUtil.parse(Boolean.class, infoMap.get("allow_debug")); - } - - String loggregatorEndpoint = CloudUtil.parse(String.class, infoV2Map.get("logging_endpoint")); - - return new CloudInfo(name, support, authorizationEndpoint, build, version, (String)userMap.get("user_name"), - description, limits, usage, debug, loggregatorEndpoint); - } - - public List getSpaces() { - String urlPath = "/v2/spaces?inline-relations-depth=1"; - List> resourceList = getAllResources(urlPath, null); - List spaces = new ArrayList(); - for (Map resource : resourceList) { - spaces.add(resourceMapper.mapResource(resource, CloudSpace.class)); - } - return spaces; - } - - public List getOrganizations() { - String urlPath = "/v2/organizations?inline-relations-depth=0"; - List> resourceList = getAllResources(urlPath, null); - List orgs = new ArrayList(); - for (Map resource : resourceList) { - orgs.add(resourceMapper.mapResource(resource, CloudOrganization.class)); - } - return orgs; - } - - public OAuth2AccessToken login() { - oauthClient.init(cloudCredentials); - return oauthClient.getToken(); - } - - public void logout() { - oauthClient.clear(); - } - - public void register(String email, String password) { - throw new UnsupportedOperationException("Feature is not yet implemented."); - } - - public void updatePassword(CloudCredentials credentials, String newPassword) { - oauthClient.changePassword(credentials.getPassword(), newPassword); - CloudCredentials newCloudCredentials = new CloudCredentials(credentials.getEmail(), newPassword); - if (cloudCredentials.getProxyUser() != null) { - cloudCredentials = newCloudCredentials.proxyForUser(cloudCredentials.getProxyUser()); - } else { - cloudCredentials = newCloudCredentials; - } - } - - public void unregister() { - throw new UnsupportedOperationException("Feature is not yet implemented."); - } - - public List getServices() { - Map urlVars = new HashMap(); - String urlPath = "/v2"; - if (sessionSpace != null) { - urlVars.put("space", sessionSpace.getMeta().getGuid()); - urlPath = urlPath + "/spaces/{space}"; - } - urlPath = urlPath + "/service_instances?inline-relations-depth=1&return_user_provided_service_instances=true"; - List> resourceList = getAllResources(urlPath, urlVars); - List services = new ArrayList(); - for (Map resource : resourceList) { - if (hasEmbeddedResource(resource, "service_plan")) { - fillInEmbeddedResource(resource, "service_plan", "service"); - } - services.add(resourceMapper.mapResource(resource, CloudService.class)); - } - return services; - } - - public void createService(CloudService service) { - assertSpaceProvided("create service"); - Assert.notNull(service, "Service must not be null"); - Assert.notNull(service.getName(), "Service name must not be null"); - Assert.notNull(service.getLabel(), "Service label must not be null"); - Assert.notNull(service.getPlan(), "Service plan must not be null"); - - CloudServicePlan cloudServicePlan = findPlanForService(service); - - HashMap serviceRequest = new HashMap(); - serviceRequest.put("space_guid", sessionSpace.getMeta().getGuid()); - serviceRequest.put("name", service.getName()); - serviceRequest.put("service_plan_guid", cloudServicePlan.getMeta().getGuid()); - getRestTemplate().postForObject(getUrl("/v2/service_instances"), serviceRequest, String.class); - } - - private CloudServicePlan findPlanForService(CloudService service) { - List offerings = getServiceOfferings(service.getLabel()); - for (CloudServiceOffering offering : offerings) { - if (service.getVersion() == null || service.getVersion().equals(offering.getVersion())) { - for (CloudServicePlan plan : offering.getCloudServicePlans()) { - if (service.getPlan() != null && service.getPlan().equals(plan.getName())) { - return plan; - } - } - } - } - throw new IllegalArgumentException("Service plan " + service.getPlan() + " not found"); - } - - public void createUserProvidedService(CloudService service, Map credentials) { - assertSpaceProvided("create service"); - Assert.notNull(credentials, "Service credentials must not be null"); - Assert.notNull(service, "Service must not be null"); - Assert.notNull(service.getName(), "Service name must not be null"); - Assert.isNull(service.getLabel(), "Service label is not valid for user-provided services"); - Assert.isNull(service.getProvider(), "Service provider is not valid for user-provided services"); - Assert.isNull(service.getVersion(), "Service version is not valid for user-provided services"); - Assert.isNull(service.getPlan(), "Service plan is not valid for user-provided services"); - - HashMap serviceRequest = new HashMap(); - serviceRequest.put("space_guid", sessionSpace.getMeta().getGuid()); - serviceRequest.put("name", service.getName()); - serviceRequest.put("credentials", credentials); - getRestTemplate().postForObject(getUrl("/v2/user_provided_service_instances"), serviceRequest, String.class); - } - - public CloudService getService(String serviceName) { - String urlPath = "/v2"; - Map urlVars = new HashMap(); - if (sessionSpace != null) { - urlVars.put("space", sessionSpace.getMeta().getGuid()); - urlPath = urlPath + "/spaces/{space}"; - } - urlVars.put("q", "name:" + serviceName); - urlPath = urlPath + "/service_instances?q={q}&return_user_provided_service_instances=true"; - List> resourceList = getAllResources(urlPath, urlVars); - CloudService cloudService = null; - if (resourceList.size() > 0) { - final Map resource = resourceList.get(0); - if (hasEmbeddedResource(resource, "service_plan")) { - fillInEmbeddedResource(resource, "service_plan", "service"); - } - cloudService = resourceMapper.mapResource(resource, CloudService.class); - } - return cloudService; - } - - public void deleteService(String serviceName) { - CloudService cloudService = getService(serviceName); - doDeleteService(cloudService); - } - - public void deleteAllServices() { - List cloudServices = getServices(); - for (CloudService cloudService : cloudServices) { - doDeleteService(cloudService); - } - } - - public List getServiceOfferings() { - String urlPath = "/v2/services?inline-relations-depth=1"; - List> resourceList = getAllResources(urlPath, null); - List serviceOfferings = new ArrayList(); - for (Map resource : resourceList) { - CloudServiceOffering serviceOffering = resourceMapper.mapResource(resource, CloudServiceOffering.class); - serviceOfferings.add(serviceOffering); - } - return serviceOfferings; - } - - public List getServiceBrokers() { - String urlPath = "/v2/service_brokers?inline-relations-depth=1"; - List> resourceList = getAllResources(urlPath, null); - List serviceBrokers = new ArrayList(); - for (Map resource : resourceList) { - CloudServiceBroker broker = resourceMapper.mapResource(resource, CloudServiceBroker.class); - serviceBrokers.add(broker); - } - return serviceBrokers; - } - - public List getApplications() { - Map urlVars = new HashMap(); - String urlPath = "/v2"; - if (sessionSpace != null) { - urlVars.put("space", sessionSpace.getMeta().getGuid()); - urlPath = urlPath + "/spaces/{space}"; - } - urlPath = urlPath + "/apps?inline-relations-depth=1"; - List> resourceList = getAllResources(urlPath, urlVars); - List apps = new ArrayList(); - for (Map resource : resourceList) { - processApplicationResource(resource, true); - apps.add(mapCloudApplication(resource)); - } - return apps; - } - - public CloudApplication getApplication(String appName) { - Map resource = findApplicationResource(appName, true); - if (resource == null) { - throw new CloudFoundryException(HttpStatus.NOT_FOUND, "Not Found", "Application not found"); - } - return mapCloudApplication(resource); - } - - public CloudApplication getApplication(UUID appGuid) { - Map resource = findApplicationResource(appGuid, true); - if (resource == null) { - throw new CloudFoundryException(HttpStatus.NOT_FOUND, "Not Found", "Application not found"); - } - return mapCloudApplication(resource); - } - - @SuppressWarnings("unchecked") - private CloudApplication mapCloudApplication(Map resource) { - UUID appId = resourceMapper.getGuidOfResource(resource); - CloudApplication cloudApp = null; - if (resource != null) { - int running = getRunningInstances(appId, - CloudApplication.AppState.valueOf( - CloudEntityResourceMapper.getEntityAttribute(resource, "state", String.class))); - ((Map)resource.get("entity")).put("running_instances", running); - cloudApp = resourceMapper.mapResource(resource, CloudApplication.class); - cloudApp.setUris(findApplicationUris(cloudApp.getMeta().getGuid())); - } - return cloudApp; - } - - private int getRunningInstances(UUID appId, CloudApplication.AppState appState) { - int running = 0; - ApplicationStats appStats = doGetApplicationStats(appId, appState); - if (appStats != null && appStats.getRecords() != null) { - for (InstanceStats inst : appStats.getRecords()) { - if (InstanceState.RUNNING == inst.getState()){ - running++; - } - } - } - return running; - } - - public ApplicationStats getApplicationStats(String appName) { - CloudApplication app = getApplication(appName); - return doGetApplicationStats(app.getMeta().getGuid(), app.getState()); - } - - @SuppressWarnings("unchecked") - private ApplicationStats doGetApplicationStats(UUID appId, CloudApplication.AppState appState) { - List instanceList = new ArrayList(); - if (appState.equals(CloudApplication.AppState.STARTED)) { - Map respMap = getInstanceInfoForApp(appId, "stats"); - for (String instanceId : respMap.keySet()) { - InstanceStats instanceStats = - new InstanceStats(instanceId, (Map) respMap.get(instanceId)); - instanceList.add(instanceStats); - } - } - return new ApplicationStats(instanceList); - } - - private Map getInstanceInfoForApp(UUID appId, String path) { - String url = getUrl("/v2/apps/{guid}/" + path); - Map urlVars = new HashMap(); - urlVars.put("guid", appId); - String resp = getRestTemplate().getForObject(url, String.class, urlVars); - return JsonUtil.convertJsonToMap(resp); - } - - public void createApplication(String appName, Staging staging, Integer memory, List uris, - List serviceNames) { - createApplication(appName, staging, null, memory, uris, serviceNames); - } - - public void createApplication(String appName, Staging staging, Integer disk, Integer memory, - List uris, List serviceNames) { - HashMap appRequest = new HashMap(); - appRequest.put("space_guid", sessionSpace.getMeta().getGuid()); - appRequest.put("name", appName); - appRequest.put("memory", memory); - if (disk != null) { - appRequest.put("disk_quota", disk); - } - appRequest.put("instances", 1); - addStagingToRequest(staging, appRequest); - appRequest.put("state", CloudApplication.AppState.STOPPED); - - String appResp = getRestTemplate().postForObject(getUrl("/v2/apps"), appRequest, String.class); - Map appEntity = JsonUtil.convertJsonToMap(appResp); - UUID newAppGuid = CloudEntityResourceMapper.getMeta(appEntity).getGuid(); - - if (serviceNames != null && serviceNames.size() > 0) { - updateApplicationServices(appName, serviceNames); - } - - if (uris != null && uris.size() > 0) { - addUris(uris, newAppGuid); - } - } - - private void addStagingToRequest(Staging staging, HashMap appRequest) { - if (staging.getBuildpackUrl() != null) { - appRequest.put("buildpack", staging.getBuildpackUrl()); - } - if (staging.getCommand() != null) { - appRequest.put("command", staging.getCommand()); - } - if (staging.getStack() != null) { - appRequest.put("stack_guid", getStack(staging.getStack()).getMeta().getGuid()); - } - if (staging.getHealthCheckTimeout() != null) { - appRequest.put("health_check_timeout", staging.getHealthCheckTimeout()); - } - } - - @SuppressWarnings("unchecked") - private List> getAllResources(String urlPath, Map urlVars) { - List> allResources = new ArrayList>(); - String resp; - if (urlVars != null) { - resp = getRestTemplate().getForObject(getUrl(urlPath), String.class, urlVars); - } else { - resp = getRestTemplate().getForObject(getUrl(urlPath), String.class); - } - Map respMap = JsonUtil.convertJsonToMap(resp); - List> newResources = (List>) respMap.get("resources"); - if (newResources != null && newResources.size() > 0) { - allResources.addAll(newResources); - } - String nextUrl = (String) respMap.get("next_url"); - while (nextUrl != null && nextUrl.length() > 0) { - nextUrl = addPageOfResources(nextUrl, allResources); - } - return allResources; - } - - @SuppressWarnings("unchecked") - private String addPageOfResources(String nextUrl, List> allResources) { - String resp = getRestTemplate().getForObject(getUrl(nextUrl), String.class); - Map respMap = JsonUtil.convertJsonToMap(resp); - List> newResources = (List>) respMap.get("resources"); - if (newResources != null && newResources.size() > 0) { - allResources.addAll(newResources); - } - return (String) respMap.get("next_url"); - } - - private void addUris(List uris, UUID appGuid) { - Map domains = getDomainGuids(); - for (String uri : uris) { - Map uriInfo = new HashMap(2); - extractUriInfo(domains, uri, uriInfo); - UUID domainGuid = domains.get(uriInfo.get("domainName")); - bindRoute(uriInfo.get("host"), domainGuid, appGuid); - } - } - - private void removeUris(List uris, UUID appGuid) { - Map domains = getDomainGuids(); - for (String uri : uris) { - Map uriInfo = new HashMap(2); - extractUriInfo(domains, uri, uriInfo); - UUID domainGuid = domains.get(uriInfo.get("domainName")); - unbindRoute(uriInfo.get("host"), domainGuid, appGuid); - } - } - - protected void extractUriInfo(Map domains, String uri, Map uriInfo) { - URI newUri = URI.create(uri); - String authority = newUri.getScheme() != null ? newUri.getAuthority(): newUri.getPath(); - for (String domain : domains.keySet()) { - if (authority != null && authority.endsWith(domain)) { - String previousDomain = uriInfo.get("domainName"); - if (previousDomain == null || domain.length() > previousDomain.length()) { - //Favor most specific subdomains - uriInfo.put("domainName", domain); - if (domain.length() < authority.length()) { - uriInfo.put("host", authority.substring(0, authority.indexOf(domain) - 1)); - } else if (domain.length() == authority.length()) { - uriInfo.put("host", ""); - } - } - } - } - if (uriInfo.get("domainName") == null) { - throw new IllegalArgumentException("Domain not found for URI " + uri); - } - if (uriInfo.get("host") == null) { - throw new IllegalArgumentException("Invalid URI " + uri + - " -- host not specified for domain " + uriInfo.get("domainName")); - } - } - - private Map getDomainGuids() { - Map urlVars = new HashMap(); - String urlPath = "/v2"; - if (sessionSpace != null) { - urlVars.put("space", sessionSpace.getMeta().getGuid()); - urlPath = urlPath + "/spaces/{space}"; - } - String domainPath = urlPath + "/domains?inline-relations-depth=1"; - List> resourceList = getAllResources(domainPath, urlVars); - Map domains = new HashMap(resourceList.size()); - for (Map d : resourceList) { - domains.put( - CloudEntityResourceMapper.getEntityAttribute(d, "name", String.class), - CloudEntityResourceMapper.getMeta(d).getGuid()); - } - return domains; - } - - private UUID getDomainGuid(String domainName, boolean required) { - Map urlVars = new HashMap(); - String urlPath = "/v2/domains?inline-relations-depth=1&q=name:{name}"; - urlVars.put("name", domainName); - List> resourceList = getAllResources(urlPath, urlVars); - UUID domainGuid = null; - if (resourceList.size() > 0) { - Map resource = resourceList.get(0); - domainGuid = resourceMapper.getGuidOfResource(resource); - } - if (domainGuid == null && required) { - throw new IllegalArgumentException("Domain '" + domainName + "' not found."); - } - return domainGuid; - } - - private void bindRoute(String host, UUID domainGuid, UUID appGuid) { - UUID routeGuid = getRouteGuid(host, domainGuid); - if (routeGuid == null) { - routeGuid = doAddRoute(host, domainGuid); - } - String bindPath = "/v2/apps/{app}/routes/{route}"; - Map bindVars = new HashMap(); - bindVars.put("app", appGuid); - bindVars.put("route", routeGuid); - HashMap bindRequest = new HashMap(); - getRestTemplate().put(getUrl(bindPath), bindRequest, bindVars); - } - - private void unbindRoute(String host, UUID domainGuid, UUID appGuid) { - UUID routeGuid = getRouteGuid(host, domainGuid); - if (routeGuid != null) { - String bindPath = "/v2/apps/{app}/routes/{route}"; - Map bindVars = new HashMap(); - bindVars.put("app", appGuid); - bindVars.put("route", routeGuid); - getRestTemplate().delete(getUrl(bindPath), bindVars); - } - } - - private UUID getRouteGuid(String host, UUID domainGuid) { - Map urlVars = new HashMap(); - String urlPath = "/v2"; - urlPath = urlPath + "/routes?inline-relations-depth=0&q=host:{host}"; - urlVars.put("host", host); - List> allRoutes = getAllResources(urlPath, urlVars); - UUID routeGuid = null; - for (Map route : allRoutes) { - UUID routeSpace = CloudEntityResourceMapper.getEntityAttribute(route, "space_guid", UUID.class); - UUID routeDomain = CloudEntityResourceMapper.getEntityAttribute(route, "domain_guid", UUID.class); - if (sessionSpace.getMeta().getGuid().equals(routeSpace) && - domainGuid.equals(routeDomain)) { - routeGuid = CloudEntityResourceMapper.getMeta(route).getGuid(); - } - } - return routeGuid; - } - - private UUID doAddRoute(String host, UUID domainGuid) { - assertSpaceProvided("add route"); - - HashMap routeRequest = new HashMap(); - routeRequest.put("host", host); - routeRequest.put("domain_guid", domainGuid); - routeRequest.put("space_guid", sessionSpace.getMeta().getGuid()); - String routeResp = getRestTemplate().postForObject(getUrl("/v2/routes"), routeRequest, String.class); - Map routeEntity = JsonUtil.convertJsonToMap(routeResp); - return CloudEntityResourceMapper.getMeta(routeEntity).getGuid(); - } - - public void uploadApplication(String appName, File file, UploadStatusCallback callback) throws IOException { - Assert.notNull(file, "File must not be null"); - if (file.isDirectory()) { - ApplicationArchive archive = new DirectoryApplicationArchive(file); - uploadApplication(appName, archive, callback); - } else { - ZipFile zipFile = new ZipFile(file); - try { - ApplicationArchive archive = new ZipApplicationArchive(zipFile); - uploadApplication(appName, archive, callback); - } finally { - zipFile.close(); - } - } - } - - public void uploadApplication(String appName, ApplicationArchive archive, UploadStatusCallback callback) - throws IOException { - Assert.notNull(appName, "AppName must not be null"); - Assert.notNull(archive, "Archive must not be null"); - UUID appId = getAppId(appName); - - if (callback == null) { - callback = UploadStatusCallback.NONE; - } - CloudResources knownRemoteResources = getKnownRemoteResources(archive); - callback.onCheckResources(); - callback.onMatchedFileNames(knownRemoteResources.getFilenames()); - UploadApplicationPayload payload = new UploadApplicationPayload(archive, knownRemoteResources); - callback.onProcessMatchedResources(payload.getTotalUncompressedSize()); - HttpEntity entity = generatePartialResourceRequest(payload, knownRemoteResources); - ResponseEntity>> responseEntity = - getRestTemplate().exchange(getUrl("/v2/apps/{guid}/bits?async=true"), HttpMethod.PUT, entity, - new ParameterizedTypeReference>>() {}, appId); - processAsyncJob(responseEntity, callback); - } - - private void processAsyncJob(ResponseEntity>> jobCreationEntity, UploadStatusCallback callback) { - Map jobEntity = jobCreationEntity.getBody().get("entity"); - String jobStatus; - do { - jobStatus = jobEntity.get("status"); - boolean unsubscribe = callback.onProgress(jobStatus); - if (unsubscribe) { - return; - } else { - try { - Thread.sleep(JOB_POLLING_PERIOD); - } catch (InterruptedException ex) { - return; - } - } - String jobId = jobEntity.get("guid"); - ResponseEntity>> jobProgressEntity = - getRestTemplate().exchange(getUrl("/v2/jobs/{guid}"), HttpMethod.GET, HttpEntity.EMPTY, - new ParameterizedTypeReference>>() { - }, jobId); - jobEntity = jobProgressEntity.getBody().get("entity"); - } while (!jobStatus.equals("finished")); - } - - private CloudResources getKnownRemoteResources(ApplicationArchive archive) throws IOException { - CloudResources archiveResources = new CloudResources(archive); - String json = JsonUtil.convertToJson(archiveResources); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(JsonUtil.JSON_MEDIA_TYPE); - HttpEntity requestEntity = new HttpEntity(json, headers); - ResponseEntity responseEntity = - getRestTemplate().exchange(getUrl("/v2/resource_match"), HttpMethod.PUT, requestEntity, String.class); - List cloudResources = JsonUtil.convertJsonToCloudResourceList(responseEntity.getBody()); - return new CloudResources(cloudResources); - } - - private HttpEntity> generatePartialResourceRequest(UploadApplicationPayload application, - CloudResources knownRemoteResources) throws IOException { - MultiValueMap body = new LinkedMultiValueMap(2); - body.add("application", application); - ObjectMapper mapper = new ObjectMapper(); - String knownRemoteResourcesPayload = mapper.writeValueAsString(knownRemoteResources); - body.add("resources", knownRemoteResourcesPayload); - HttpHeaders headers = new HttpHeaders(); - headers.setContentType(MediaType.MULTIPART_FORM_DATA); - return new HttpEntity>(body, headers); - } - - public StartingInfo startApplication(String appName) { - CloudApplication app = getApplication(appName); - if (app.getState() != CloudApplication.AppState.STARTED) { - HashMap appRequest = new HashMap(); - appRequest.put("state", CloudApplication.AppState.STARTED); - - HttpEntity requestEntity = new HttpEntity( - appRequest); - ResponseEntity entity = getRestTemplate().exchange( - getUrl("/v2/apps/{guid}?stage_async=true"), HttpMethod.PUT, requestEntity, - String.class, app.getMeta().getGuid()); - - HttpHeaders headers = entity.getHeaders(); - - // Return a starting info, even with a null staging log value, as a non-null starting info - // indicates that the response entity did have headers. The API contract is to return starting info - // if there are headers in the response, null otherwise. - if (headers != null && !headers.isEmpty()) { - String stagingFile = headers.getFirst("x-app-staging-log"); - - if (stagingFile != null) { - try { - stagingFile = URLDecoder.decode(stagingFile, "UTF-8"); - } catch (UnsupportedEncodingException e) { - logger.error("unexpected inability to UTF-8 decode", e); - } - } - // Return the starting info even if decoding failed or staging file is null - return new StartingInfo(stagingFile); - } - } - return null; - } - - public void debugApplication(String appName, CloudApplication.DebugMode mode) { - throw new UnsupportedOperationException("Feature is not yet implemented."); - } - - public void stopApplication(String appName) { - CloudApplication app = getApplication(appName); - if (app.getState() != CloudApplication.AppState.STOPPED) { - HashMap appRequest = new HashMap(); - appRequest.put("state", CloudApplication.AppState.STOPPED); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, app.getMeta().getGuid()); - } - } - - public StartingInfo restartApplication(String appName) { - stopApplication(appName); - return startApplication(appName); - } - - public void deleteApplication(String appName) { - UUID appId = getAppId(appName); - doDeleteApplication(appId); - } - - public void deleteAllApplications() { - List cloudApps = getApplications(); - for (CloudApplication cloudApp : cloudApps) { - deleteApplication(cloudApp.getName()); - } - } - - public void updateApplicationDiskQuota(String appName, int disk) { - UUID appId = getAppId(appName); - HashMap appRequest = new HashMap(); - appRequest.put("disk_quota", disk); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, appId); - } - - public void updateApplicationMemory(String appName, int memory) { - UUID appId = getAppId(appName); - HashMap appRequest = new HashMap(); - appRequest.put("memory", memory); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, appId); - } - - public void updateApplicationInstances(String appName, int instances) { - UUID appId = getAppId(appName); - HashMap appRequest = new HashMap(); - appRequest.put("instances", instances); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, appId); - } - - public void updateApplicationServices(String appName, List services) { - CloudApplication app = getApplication(appName); - List addServices = new ArrayList(); - List deleteServices = new ArrayList(); - // services to add - for (String serviceName : services) { - if (!app.getServices().contains(serviceName)) { - CloudService cloudService = getService(serviceName); - if (cloudService != null) { - addServices.add(cloudService.getMeta().getGuid()); - } - else { - throw new CloudFoundryException(HttpStatus.NOT_FOUND, "Service with name " + serviceName + - " not found in current space " + sessionSpace.getName()); - } - } - } - // services to delete - for (String serviceName : app.getServices()) { - if (!services.contains(serviceName)) { - CloudService cloudService = getService(serviceName); - if (cloudService != null) { - deleteServices.add(cloudService.getMeta().getGuid()); - } - } - } - for (UUID serviceId : addServices) { - doBindService(app.getMeta().getGuid(), serviceId); - } - for (UUID serviceId : deleteServices) { - doUnbindService(app.getMeta().getGuid(), serviceId); - } - } - - public List getQuotas() { - String urlPath = "/v2/quota_definitions"; - List> resourceList = getAllResources(urlPath, null); - List quotas = new ArrayList(); - for (Map resource : resourceList) { - quotas.add(resourceMapper.mapResource(resource, CloudQuota.class)); - } - return quotas; - } - - /** - * Create quota from a CloudQuota instance (Quota Plan) - * - * @param quota - */ - public void createQuota(CloudQuota quota){ - String setPath = "/v2/quota_definitions"; - HashMap setRequest = new HashMap(); - setRequest.put("name", quota.getName()); - setRequest.put("memory_limit", quota.getMemoryLimit()); - setRequest.put("total_routes", quota.getTotalRoutes()); - setRequest.put("total_services", quota.getTotalServices()); - setRequest.put("non_basic_services_allowed", quota.isNonBasicServicesAllowed()); - getRestTemplate().postForObject(getUrl(setPath), setRequest, String.class); - } - - public void updateQuota(CloudQuota quota, String name) { - CloudQuota oldQuota = this.getQuotaByName(name, true); - - String setPath = "/v2/quota_definitions/{quotaGuid}"; - - Map setVars = new HashMap(); - setVars.put("quotaGuid", oldQuota.getMeta().getGuid()); - - HashMap setRequest = new HashMap(); - setRequest.put("name", quota.getName()); - setRequest.put("memory_limit", quota.getMemoryLimit()); - setRequest.put("total_routes", quota.getTotalRoutes()); - setRequest.put("total_services", quota.getTotalServices()); - setRequest.put("non_basic_services_allowed", quota.isNonBasicServicesAllowed()); - - getRestTemplate().put(getUrl(setPath), setRequest, setVars); - } - - public void deleteQuota(String quotaName){ - CloudQuota quota = this.getQuotaByName(quotaName, true); - String setPath = "/v2/quota_definitions/{quotaGuid}"; - Map setVars = new HashMap(); - setVars.put("quotaGuid", quota.getMeta().getGuid()); - getRestTemplate().delete(getUrl(setPath), setVars); - } - - /** - * Set quota to organization - * - * @param orgName - * @param quotaName - */ - public void setQuotaToOrg(String orgName, String quotaName){ - CloudQuota quota = this.getQuotaByName(quotaName, true); - CloudOrganization org = this.getOrgByName(orgName, true); - - doSetQuotaToOrg(org.getMeta().getGuid(), quota.getMeta().getGuid()); - } - - /** - * Get organization by given name. - * - * @param orgName - * @param required - * @return CloudOrganization instance - */ - public CloudOrganization getOrgByName(String orgName, boolean required){ - Map urlVars = new HashMap(); - String urlPath = "/v2/organizations?inline-relations-depth=1&q=name:{name}"; - urlVars.put("name", orgName); - CloudOrganization org = null; - List> resourceList = getAllResources(urlPath, - urlVars); - if (resourceList.size() > 0) { - Map resource = resourceList.get(0); - org = resourceMapper.mapResource(resource, CloudOrganization.class); - } - - if (org == null && required) { - throw new IllegalArgumentException("Organization '" + orgName - + "' not found."); - } - - return org; - } - - /** - * Get quota by given name. - * - * @param quotaName - * @param required - * @return CloudQuota instance - */ - public CloudQuota getQuotaByName(String quotaName, boolean required){ - Map urlVars = new HashMap(); - String urlPath = "/v2/quota_definitions?q=name:{name}"; - urlVars.put("name", quotaName); - CloudQuota quota = null; - List> resourceList = getAllResources(urlPath, urlVars); - if (resourceList.size() > 0) { - Map resource = resourceList.get(0); - quota = resourceMapper.mapResource(resource, CloudQuota.class); - } - - if (quota == null && required) { - throw new IllegalArgumentException("Quota '" + quotaName - + "' not found."); - } - - return quota; - } - - private void doSetQuotaToOrg(UUID orgGuid, UUID quotaGuid) { - String setPath = "/v2/organizations/{org}"; - Map setVars = new HashMap(); - setVars.put("org", orgGuid); - HashMap setRequest = new HashMap(); - setRequest.put("quota_definition_guid", quotaGuid); - - getRestTemplate().put(getUrl(setPath), setRequest, setVars); - } - - private void doBindService(UUID appId, UUID serviceId) { - HashMap serviceRequest = new HashMap(); - serviceRequest.put("service_instance_guid", serviceId); - serviceRequest.put("app_guid", appId); - getRestTemplate().postForObject(getUrl("/v2/service_bindings"), serviceRequest, String.class); - } - - private void doUnbindService(UUID appId, UUID serviceId) { - UUID serviceBindingId = getServiceBindingId(appId, serviceId); - getRestTemplate().delete(getUrl("/v2/service_bindings/{guid}"), serviceBindingId); - } - - public void updateApplicationStaging(String appName, Staging staging) { - UUID appId = getAppId(appName); - HashMap appRequest = new HashMap(); - addStagingToRequest(staging, appRequest); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, appId); - } - - public void updateApplicationUris(String appName, List uris) { - CloudApplication app = getApplication(appName); - List newUris = new ArrayList(uris); - newUris.removeAll(app.getUris()); - List removeUris = app.getUris(); - removeUris.removeAll(uris); - removeUris(removeUris, app.getMeta().getGuid()); - addUris(newUris, app.getMeta().getGuid()); - } - - public void updateApplicationEnv(String appName, Map env) { - UUID appId = getAppId(appName); - HashMap appRequest = new HashMap(); - appRequest.put("environment_json", env); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, appId); - } - - public void updateApplicationEnv(String appName, List env) { - Map envHash = new HashMap(); - for (String s : env) { - if (!s.contains("=")) { - throw new IllegalArgumentException("Environment setting without '=' is invalid: " + s); - } - String key = s.substring(0, s.indexOf('=')).trim(); - String value = s.substring(s.indexOf('=') + 1).trim(); - envHash.put(key, value); - } - updateApplicationEnv(appName, envHash); - } - - public void bindService(String appName, String serviceName) { - CloudService cloudService = getService(serviceName); - UUID appId = getAppId(appName); - doBindService(appId, cloudService.getMeta().getGuid()); - } - - public void unbindService(String appName, String serviceName) { - CloudService cloudService = getService(serviceName); - UUID appId = getAppId(appName); - doUnbindService(appId, cloudService.getMeta().getGuid()); - } - - public InstancesInfo getApplicationInstances(String appName) { - CloudApplication app = getApplication(appName); - return getApplicationInstances(app); - } - - public InstancesInfo getApplicationInstances(CloudApplication app) { - if (app.getState().equals(CloudApplication.AppState.STARTED)) { - return doGetApplicationInstances(app.getMeta().getGuid()); - } - return null; - } - - @SuppressWarnings("unchecked") - private InstancesInfo doGetApplicationInstances(UUID appId) { - try { - List> instanceList = new ArrayList>(); - Map respMap = getInstanceInfoForApp(appId, "instances"); - List keys = new ArrayList(respMap.keySet()); - Collections.sort(keys); - for (String instanceId : keys) { - Integer index; - try { - index = Integer.valueOf(instanceId); - } catch (NumberFormatException e) { - index = -1; - } - Map instanceMap = (Map) respMap.get(instanceId); - instanceMap.put("index", index); - instanceList.add(instanceMap); - } - return new InstancesInfo(instanceList); - } catch (CloudFoundryException e) { - if (e.getStatusCode().equals(HttpStatus.BAD_REQUEST)) { - return null; - } else { - throw e; - } - - } - } - - @SuppressWarnings("unchecked") - public CrashesInfo getCrashes(String appName) { - UUID appId = getAppId(appName); - if (appId == null) { - throw new IllegalArgumentException("Application '" + appName + "' not found."); - } - Map urlVars = new HashMap(); - urlVars.put("guid", appId); - String resp = getRestTemplate().getForObject(getUrl("/v2/apps/{guid}/crashes"), String.class, urlVars); - Map respMap = JsonUtil.convertJsonToMap("{ \"crashes\" : " + resp + " }"); - List> attributes = (List>) respMap.get("crashes"); - return new CrashesInfo(attributes); - } - - public void rename(String appName, String newName) { - UUID appId = getAppId(appName); - HashMap appRequest = new HashMap(); - appRequest.put("name", newName); - getRestTemplate().put(getUrl("/v2/apps/{guid}"), appRequest, appId); - } - - public List getStacks() { - String urlPath = "/v2/stacks"; - List> resources = getAllResources(urlPath, null); - List stacks = new ArrayList(); - for (Map resource : resources) { - stacks.add(resourceMapper.mapResource(resource, CloudStack.class)); - } - return stacks; - } - - public CloudStack getStack(String name) { - String urlPath = "/v2/stacks?q={q}"; - Map urlVars = new HashMap(); - urlVars.put("q", "name:" + name); - List> resources = getAllResources(urlPath, urlVars); - if (resources.size() > 0) { - Map resource = resources.get(0); - return resourceMapper.mapResource(resource, CloudStack.class); - } - return null; - } - - public List getDomainsForOrg() { - assertSpaceProvided("access organization domains"); - return doGetDomains(sessionSpace.getOrganization()); - } - - public List getDomains() { - return doGetDomains((CloudOrganization) null); - } - - public List getPrivateDomains() { - return doGetDomains("/v2/private_domains"); - } - - public List getSharedDomains() { - return doGetDomains("/v2/shared_domains"); - } - - public CloudDomain getDefaultDomain() { - List sharedDomains = getSharedDomains(); - if (sharedDomains.isEmpty()) { - return null; - } else { - return sharedDomains.get(0); - } - } - - public void addDomain(String domainName) { - assertSpaceProvided("add domain"); - UUID domainGuid = getDomainGuid(domainName, false); - if (domainGuid == null) { - doCreateDomain(domainName); - } - } - - public void deleteDomain(String domainName) { - assertSpaceProvided("delete domain"); - UUID domainGuid = getDomainGuid(domainName, true); - List routes = getRoutes(domainName); - if (routes.size() > 0) { - throw new IllegalStateException("Unable to remove domain that is in use --" + - " it has " + routes.size() + " routes."); - } - doDeleteDomain(domainGuid); - } - - public void removeDomain(String domainName) { - deleteDomain(domainName); - } - - public List getRoutes(String domainName) { - assertSpaceProvided("get routes for domain"); - UUID domainGuid = getDomainGuid(domainName, true); - return doGetRoutes(domainGuid); - } - - public void addRoute(String host, String domainName) { - assertSpaceProvided("add route for domain"); - UUID domainGuid = getDomainGuid(domainName, true); - doAddRoute(host, domainGuid); - } - - public void deleteRoute(String host, String domainName) { - assertSpaceProvided("delete route for domain"); - UUID domainGuid = getDomainGuid(domainName, true); - UUID routeGuid = getRouteGuid(host, domainGuid); - if (routeGuid == null) { - throw new IllegalArgumentException("Host '" + host + "' not found for domain '" + domainName + "'."); - } - doDeleteRoute(routeGuid); - } - - protected String getFileUrlPath() { - return "/v2/apps/{appId}/instances/{instance}/files/{filePath}"; - } - - protected Object getFileAppId(String appName) { - return getAppId(appName); - } - - private void assertSpaceProvided(String operation) { - Assert.notNull(sessionSpace, "Unable to " + operation + " without specifying organization and space to use."); - } - - private void doDeleteRoute(UUID routeGuid) { - Map urlVars = new HashMap(); - String urlPath = "/v2/routes/{route}"; - urlVars.put("route", routeGuid); - getRestTemplate().delete(getUrl(urlPath), urlVars); - } - - private List doGetDomains(CloudOrganization org) { - Map urlVars = new HashMap(); - String urlPath = "/v2"; - if (org != null) { - urlVars.put("org", org.getMeta().getGuid()); - urlPath = urlPath + "/organizations/{org}"; - } - urlPath = urlPath + "/domains"; - return doGetDomains(urlPath, urlVars); - } - - private List doGetDomains(String urlPath) { - return doGetDomains(urlPath, null); - } - - private List doGetDomains(String urlPath, Map urlVars) { - List> domainResources = getAllResources(urlPath, urlVars); - List domains = new ArrayList(); - for (Map resource : domainResources) { - domains.add(resourceMapper.mapResource(resource, CloudDomain.class)); - } - return domains; - } - - private UUID doCreateDomain(String domainName) { - String urlPath = "/v2/private_domains"; - HashMap domainRequest = new HashMap(); - domainRequest.put("owning_organization_guid", sessionSpace.getOrganization().getMeta().getGuid()); - domainRequest.put("name", domainName); - domainRequest.put("wildcard", true); - String resp = getRestTemplate().postForObject(getUrl(urlPath), domainRequest, String.class); - Map respMap = JsonUtil.convertJsonToMap(resp); - return resourceMapper.getGuidOfResource(respMap); - } - - private void doDeleteDomain(UUID domainGuid) { - Map urlVars = new HashMap(); - String urlPath = "/v2/private_domains/{domain}"; - urlVars.put("domain", domainGuid); - getRestTemplate().delete(getUrl(urlPath), urlVars); - } - - private List doGetRoutes(UUID domainGuid) { - Map urlVars = new HashMap(); - String urlPath = "/v2"; -// TODO: NOT implemented ATM: -// if (sessionSpace != null) { -// urlVars.put("space", sessionSpace.getMeta().getGuid()); -// urlPath = urlPath + "/spaces/{space}"; -// } - urlPath = urlPath + "/routes?inline-relations-depth=1"; - List> allRoutes = getAllResources(urlPath, urlVars); - List routes = new ArrayList(); - for (Map route : allRoutes) { -// TODO: move space_guid to path once implemented (see above): - UUID space = CloudEntityResourceMapper.getEntityAttribute(route, "space_guid", UUID.class); - UUID domain = CloudEntityResourceMapper.getEntityAttribute(route, "domain_guid", UUID.class); - if (sessionSpace.getMeta().getGuid().equals(space) && domainGuid.equals(domain)) { - //routes.add(CloudEntityResourceMapper.getEntityAttribute(route, "host", String.class)); - routes.add(resourceMapper.mapResource(route, CloudRoute.class)); - } - } - return routes; - } - - private void doDeleteService(CloudService cloudService) { - List appIds = getAppsBoundToService(cloudService); - if (appIds.size() > 0) { - for (UUID appId : appIds) { - doUnbindService(appId, cloudService.getMeta().getGuid()); - } - } - getRestTemplate().delete(getUrl("/v2/service_instances/{guid}"), cloudService.getMeta().getGuid()); - } - - @SuppressWarnings("unchecked") - private List getAppsBoundToService(CloudService cloudService) { - List appGuids = new ArrayList(); - String urlPath = "/v2"; - Map urlVars = new HashMap(); - if (sessionSpace != null) { - urlVars.put("space", sessionSpace.getMeta().getGuid()); - urlPath = urlPath + "/spaces/{space}"; - } - urlVars.put("q", "name:" + cloudService.getName()); - urlPath = urlPath + "/service_instances?q={q}"; - List> resourceList = getAllResources(urlPath, urlVars); - for (Map resource : resourceList) { - fillInEmbeddedResource(resource, "service_bindings"); - List> bindings = - CloudEntityResourceMapper.getEntityAttribute(resource, "service_bindings", List.class); - for (Map binding : bindings) { - String appId = CloudEntityResourceMapper.getEntityAttribute(binding, "app_guid", String.class); - if (appId != null) { - appGuids.add(UUID.fromString(appId)); - } - } - } - return appGuids; - } - - private void doDeleteApplication(UUID appId) { - getRestTemplate().delete(getUrl("/v2/apps/{guid}?recursive=true"), appId); - } - - private List getServiceOfferings(String label) { - Assert.notNull(label, "Service label must not be null"); - List> resourceList = getAllResources("/v2/services?inline-relations-depth=1", null); - List results = new ArrayList(); - for (Map resource : resourceList) { - CloudServiceOffering cloudServiceOffering = - resourceMapper.mapResource(resource, CloudServiceOffering.class); - if (cloudServiceOffering.getLabel() != null && label.equals(cloudServiceOffering.getLabel())) { - results.add(cloudServiceOffering); - } - } - return results; - } - - @SuppressWarnings("unchecked") - private UUID getServiceBindingId(UUID appId, UUID serviceId ) { - Map urlVars = new HashMap(); - urlVars.put("guid", appId); - List> resourceList = getAllResources("/v2/apps/{guid}/service_bindings", urlVars); - UUID serviceBindingId = null; - if (resourceList != null && resourceList.size() > 0) { - for (Map resource : resourceList) { - Map bindingMeta = (Map) resource.get("metadata"); - Map bindingEntity = (Map) resource.get("entity"); - String serviceInstanceGuid = (String) bindingEntity.get("service_instance_guid"); - if (serviceInstanceGuid != null && serviceInstanceGuid.equals(serviceId.toString())) { - String bindingGuid = (String) bindingMeta.get("guid"); - serviceBindingId = UUID.fromString(bindingGuid); - break; - } - } - } - return serviceBindingId; - } - - @SuppressWarnings("unchecked") - private UUID getAppId(String appName) { - Map resource = findApplicationResource(appName, false); - UUID guid = null; - if (resource != null) { - Map appMeta = (Map) resource.get("metadata"); - guid = UUID.fromString(String.valueOf(appMeta.get("guid"))); - } - return guid; - } - - private StreamingLogToken streamLoggregatorLogs(String appName, ApplicationLogListener listener, boolean recent) { - ClientEndpointConfig.Configurator configurator = new ClientEndpointConfig.Configurator() { - public void beforeRequest(Map> headers) { - String authorizationHeader = oauthClient.getAuthorizationHeader(); - if (authorizationHeader != null) { - headers.put(AUTHORIZATION_HEADER_KEY, Arrays.asList(authorizationHeader)); - } - } - }; - - String endpoint = getInfo().getLoggregatorEndpoint(); - String mode = recent ? "dump" : "tail"; - UUID appId = getAppId(appName); - return loggregatorClient.connectToLoggregator(endpoint, mode, appId, listener, configurator); - } - - private class AccumulatingApplicationLogListener implements ApplicationLogListener { - private List logs = new ArrayList(); - - public void onMessage(ApplicationLog log) { - logs.add(log); - } - - public void onError(Throwable exception) { - synchronized (this) { - this.notify(); - } - } - - public void onComplete() { - synchronized (this) { - this.notify(); - } - } - - public List getLogs() { - Collections.sort(logs); - return logs; - } - } - - private Map findApplicationResource(UUID appGuid, boolean fetchServiceInfo) { - Map urlVars = new HashMap(); - String urlPath = "/v2/apps/{app}?inline-relations-depth=1"; - urlVars.put("app", appGuid); - String resp = getRestTemplate().getForObject(getUrl(urlPath), String.class, urlVars); - - return processApplicationResource(JsonUtil.convertJsonToMap(resp), fetchServiceInfo); - } - - - private Map findApplicationResource(String appName, boolean fetchServiceInfo) { - Map urlVars = new HashMap(); - String urlPath = "/v2"; - if (sessionSpace != null) { - urlVars.put("space", sessionSpace.getMeta().getGuid()); - urlPath = urlPath + "/spaces/{space}"; - } - urlVars.put("q", "name:" + appName); - urlPath = urlPath + "/apps?inline-relations-depth=1&q={q}"; - - List> allResources = getAllResources(urlPath, urlVars); - if(!allResources.isEmpty()) { - return processApplicationResource(allResources.get(0), fetchServiceInfo); - } - return null; - } - - private Map processApplicationResource(Map resource, boolean fetchServiceInfo) { - if (fetchServiceInfo) { - fillInEmbeddedResource(resource, "service_bindings", "service_instance"); - } - fillInEmbeddedResource(resource, "stack"); - return resource; - } - - private List findApplicationUris(UUID appGuid) { - String urlPath = "/v2/apps/{app}/routes?inline-relations-depth=1"; - Map urlVars = new HashMap(); - urlVars.put("app", appGuid); - List> resourceList = getAllResources(urlPath, urlVars); - List uris = new ArrayList(); - for (Map resource : resourceList) { - Map domainResource = CloudEntityResourceMapper.getEmbeddedResource(resource, "domain"); - String host = CloudEntityResourceMapper.getEntityAttribute(resource, "host", String.class); - String domain = CloudEntityResourceMapper.getEntityAttribute(domainResource, "name", String.class); - if (host != null && host.length() > 0) - uris.add(host + "." + domain); - else - uris.add(domain); - } - return uris; - } - - @SuppressWarnings("restriction") - private Map getUserInfo(String user) { -// String userJson = getRestTemplate().getForObject(getUrl("/v2/users/{guid}"), String.class, user); -// Map userInfo = (Map) JsonUtil.convertJsonToMap(userJson); -// return userInfo(); - //TODO: remove this temporary hack once the /v2/users/ uri can be accessed by mere mortals - String userJson = "{}"; - OAuth2AccessToken accessToken = oauthClient.getToken(); - if (accessToken != null) { - String tokenString = accessToken.getValue(); - int x = tokenString.indexOf('.'); - int y = tokenString.indexOf('.', x + 1); - String encodedString = tokenString.substring(x + 1, y); - try { - byte[] decodedBytes = new sun.misc.BASE64Decoder().decodeBuffer(encodedString); - userJson = new String(decodedBytes, 0, decodedBytes.length, "UTF-8"); - } catch (IOException e) {} - } - return(JsonUtil.convertJsonToMap(userJson)); - } - - @SuppressWarnings("unchecked") - private void fillInEmbeddedResource(Map resource, String... resourcePath) { - if (resourcePath.length == 0) { - return; - } - Map entity = (Map) resource.get("entity"); - - String headKey = resourcePath[0]; - String[] tailPath = Arrays.copyOfRange(resourcePath, 1, resourcePath.length); - - if (!entity.containsKey(headKey)) { - String pathUrl = entity.get(headKey + "_url").toString(); - Object response = getRestTemplate().getForObject(getUrl(pathUrl), Object.class); - if (response instanceof Map) { - Map responseMap = (Map) response; - if (responseMap.containsKey("resources")) { - response = responseMap.get("resources"); - } - } - entity.put(headKey, response); - } - Object embeddedResource = entity.get(headKey); - - if (embeddedResource instanceof Map) { - Map embeddedResourceMap = (Map) embeddedResource; - //entity = (Map) embeddedResourceMap.get("entity"); - fillInEmbeddedResource(embeddedResourceMap, tailPath); - } else if (embeddedResource instanceof List) { - List embeddedResourcesList = (List) embeddedResource; - for (Object r: embeddedResourcesList) { - fillInEmbeddedResource((Map)r, tailPath); - } - } else { - // no way to proceed - return; - } - } - - @SuppressWarnings("unchecked") - private boolean hasEmbeddedResource(Map resource, String resourceKey) { - Map entity = (Map) resource.get("entity"); - return entity.containsKey(resourceKey) || entity.containsKey(resourceKey + "_url"); - } - - private static class ResponseExtractorWrapper implements ResponseExtractor { - - private ClientHttpResponseCallback callback; - - public ResponseExtractorWrapper(ClientHttpResponseCallback callback) { - this.callback = callback; - } - - public Object extractData(ClientHttpResponse clientHttpResponse) throws IOException { - callback.onClientHttpResponse(clientHttpResponse); - return null; - } - - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerResponseErrorHandler.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerResponseErrorHandler.java deleted file mode 100644 index 7d70e9469e9..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/CloudControllerResponseErrorHandler.java +++ /dev/null @@ -1,76 +0,0 @@ -package org.cloudfoundry.client.lib.rest; - -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.NotFinishedStagingException; -import org.cloudfoundry.client.lib.StagingErrorException; -import org.cloudfoundry.client.lib.util.CloudUtil; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.ObjectMapper; -import org.springframework.http.HttpStatus; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.web.client.DefaultResponseErrorHandler; -import org.springframework.web.client.HttpServerErrorException; -import org.springframework.web.client.RestClientException; - -import java.io.IOException; -import java.util.Map; - -public class CloudControllerResponseErrorHandler extends DefaultResponseErrorHandler { - @Override - public void handleError(ClientHttpResponse response) throws IOException { - HttpStatus statusCode = response.getStatusCode(); - switch (statusCode.series()) { - case CLIENT_ERROR: - throw getException(response); - case SERVER_ERROR: - throw new HttpServerErrorException(statusCode, response.getStatusText()); - default: - throw new RestClientException("Unknown status code [" + statusCode + "]"); - } - } - - private static CloudFoundryException getException(ClientHttpResponse response) throws IOException { - HttpStatus statusCode = response.getStatusCode(); - CloudFoundryException cloudFoundryException = null; - - String description = "Client error"; - String statusText = response.getStatusText(); - - ObjectMapper mapper = new ObjectMapper(); // can reuse, share globally - - if (response.getBody() != null) { - try { - @SuppressWarnings("unchecked") - Map map = mapper.readValue(response.getBody(), Map.class); - description = CloudUtil.parse(String.class, map.get("description")); - - int cloudFoundryErrorCode = CloudUtil.parse(Integer.class, map.get("code")); - - if (cloudFoundryErrorCode >= 0) { - switch (cloudFoundryErrorCode) { - case StagingErrorException.ERROR_CODE: - cloudFoundryException = new StagingErrorException( - statusCode, statusText); - break; - case NotFinishedStagingException.ERROR_CODE: - cloudFoundryException = new NotFinishedStagingException( - statusCode, statusText); - break; - } - } - } catch (JsonParseException e) { - // Fall through. Handled below. - } catch (IOException e) { - // Fall through. Handled below. - } - } - - if (cloudFoundryException == null) { - cloudFoundryException = new CloudFoundryException(statusCode, - statusText); - } - cloudFoundryException.setDescription(description); - - return cloudFoundryException; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggingRestTemplate.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggingRestTemplate.java deleted file mode 100644 index 8f5b757a1b5..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggingRestTemplate.java +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Copyright 2009-2014 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.rest; - -import org.cloudfoundry.client.lib.RestLogCallback; -import org.cloudfoundry.client.lib.RestLogEntry; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.web.client.HttpStatusCodeException; -import org.springframework.web.client.RequestCallback; -import org.springframework.web.client.ResponseExtractor; -import org.springframework.web.client.RestClientException; -import org.springframework.web.client.RestTemplate; - -import java.io.IOException; -import java.net.URI; -import java.util.LinkedHashSet; -import java.util.Map; -import java.util.Set; - -/** - * RestTemplate that provides for logging of any REST calls made - * - * @author: Thomas Risberg - */ -public class LoggingRestTemplate extends RestTemplate { - - private Set listeners = new LinkedHashSet(); - - @Override - protected T doExecute(URI url, HttpMethod method, RequestCallback requestCallback, final ResponseExtractor responseExtractor) throws RestClientException { - final String[] status = new String[1]; - final HttpStatus[] httpStatus = new HttpStatus[1]; - final Object[] headers = new Object[1]; - final String[] message = new String[1]; - T results = null; - RestClientException exception = null; - try { - results = super.doExecute(url, method, requestCallback, - new ResponseExtractor() { - @SuppressWarnings("rawtypes") - public T extractData(ClientHttpResponse response) throws IOException { - httpStatus[0] = response.getStatusCode(); - headers[0] = response.getHeaders(); - T data = null; - if (responseExtractor != null && (data = responseExtractor.extractData(response)) != null) { - if (data instanceof String) { - message[0] = ((String)data).length() + " bytes"; - } else if (data instanceof Map) { - message[0] = ((Map)data).keySet().toString(); - } else { - message[0] = data.getClass().getName(); - } - return data; - } - else { - message[0] = ""; - return null; - } - } - }); - status[0] = "OK"; - } catch (RestClientException e) { - status[0] = "ERROR"; - message[0] = e.getMessage(); - exception = e; - if (e instanceof HttpStatusCodeException) { - httpStatus[0] = ((HttpStatusCodeException)e).getStatusCode(); - } - } - addLogMessage(method, url, status[0], httpStatus[0], message[0]); - if (exception != null) { - throw exception; - } - return results; - } - - public void addLogMessage(HttpMethod method, URI url, String status, HttpStatus httpStatus, String message) { - RestLogEntry logEntry = new RestLogEntry(method, url, status, httpStatus, message); - for (RestLogCallback callback : listeners) { - callback.onNewLogEntry(logEntry); - } - } - - void registerRestLogListener(RestLogCallback callBack) { - if (callBack != null) { - listeners.add(callBack); - } - } - - void unRegisterRestLogListener(RestLogCallback callBack) { - listeners.remove(callBack); - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorClient.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorClient.java deleted file mode 100644 index a8bc08518a8..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorClient.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.cloudfoundry.client.lib.rest; - -import org.apache.tomcat.websocket.WsWebSocketContainer; -import org.cloudfoundry.client.lib.ApplicationLogListener; -import org.cloudfoundry.client.lib.CloudOperationException; -import org.springframework.web.util.UriTemplate; - -import javax.net.ssl.SSLContext; -import javax.net.ssl.TrustManager; -import javax.net.ssl.X509TrustManager; -import javax.websocket.ClientEndpointConfig; -import javax.websocket.ContainerProvider; -import javax.websocket.DeploymentException; -import javax.websocket.Session; -import javax.websocket.WebSocketContainer; -import java.io.IOException; -import java.net.URI; -import java.security.KeyManagementException; -import java.security.NoSuchAlgorithmException; -import java.security.cert.CertificateException; -import java.security.cert.X509Certificate; -import java.util.Map; -import java.util.UUID; - -public class LoggregatorClient { - private static final UriTemplate loggregatorUriTemplate = new UriTemplate("{endpoint}/{kind}/?app={appId}"); - - private boolean trustSelfSignedCerts; - - public LoggregatorClient(boolean trustSelfSignedCerts) { - this.trustSelfSignedCerts = trustSelfSignedCerts; - } - - public StreamingLogTokenImpl connectToLoggregator(String endpoint, String mode, UUID appId, - ApplicationLogListener listener, - ClientEndpointConfig.Configurator configurator) { - URI loggregatorUri = loggregatorUriTemplate.expand(endpoint, mode, appId); - - try { - WebSocketContainer container = ContainerProvider.getWebSocketContainer(); - ClientEndpointConfig config = buildClientConfig(configurator); - Session session = container.connectToServer(new LoggregatorEndpoint(listener), config, loggregatorUri); - return new StreamingLogTokenImpl(session); - } catch (DeploymentException e) { - throw new CloudOperationException(e); - } catch (IOException e) { - throw new CloudOperationException(e); - } - } - - private ClientEndpointConfig buildClientConfig(ClientEndpointConfig.Configurator configurator) { - ClientEndpointConfig config = ClientEndpointConfig.Builder.create().configurator(configurator).build(); - - if (trustSelfSignedCerts) { - SSLContext sslContext = createSslContext(); - Map userProperties = config.getUserProperties(); - userProperties.put(WsWebSocketContainer.SSL_CONTEXT_PROPERTY, sslContext); - } - - return config; - } - - private SSLContext createSslContext() { - try { - TrustManager[] trustManagers = new TrustManager[] { new X509TrustManager() { - public void checkClientTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { - } - public void checkServerTrusted(X509Certificate[] x509Certificates, String s) throws CertificateException { - } - public X509Certificate[] getAcceptedIssuers() { - return null; - } - }}; - - SSLContext sslContext = SSLContext.getInstance("TLS"); - sslContext.init(null, trustManagers, null); - - return sslContext; - } catch (NoSuchAlgorithmException e) { - throw new CloudOperationException(e); - } catch (KeyManagementException e) { - throw new CloudOperationException(e); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorEndpoint.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorEndpoint.java deleted file mode 100644 index db8cc10bd87..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorEndpoint.java +++ /dev/null @@ -1,36 +0,0 @@ -package org.cloudfoundry.client.lib.rest; - -import javax.websocket.CloseReason; -import javax.websocket.Endpoint; -import javax.websocket.EndpointConfig; -import javax.websocket.Session; - -import org.cloudfoundry.client.lib.ApplicationLogListener; -import org.cloudfoundry.client.lib.CloudOperationException; - -public class LoggregatorEndpoint extends Endpoint { - private ApplicationLogListener listener; - - public LoggregatorEndpoint(ApplicationLogListener listener) { - this.listener = listener; - } - - @Override - public void onOpen(Session session, EndpointConfig config) { - session.addMessageHandler(new LoggregatorMessageHandler(listener)); - } - - @Override - public void onClose(Session session, CloseReason closeReason) { - if (closeReason.getCloseCode() == CloseReason.CloseCodes.NORMAL_CLOSURE - || closeReason.getCloseCode() == CloseReason.CloseCodes.GOING_AWAY) { - listener.onComplete(); - } else { - listener.onError(new CloudOperationException("Loggregrator connection closed unexpectedly " + closeReason)); - } - } - - public void onError(Session session, Throwable throwable) { - listener.onError(throwable); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorMessageHandler.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorMessageHandler.java deleted file mode 100644 index f195230d9ce..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/LoggregatorMessageHandler.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.cloudfoundry.client.lib.rest; - -import java.util.Date; - -import javax.websocket.MessageHandler; - -import loggregator.LogMessages; - -import org.cloudfoundry.client.lib.ApplicationLogListener; - -import com.google.protobuf.InvalidProtocolBufferException; -import org.cloudfoundry.client.lib.domain.ApplicationLog; - -public class LoggregatorMessageHandler implements MessageHandler.Whole { - private static final long NANOSECONDS_IN_MILLISECOND = 1000000; - - private ApplicationLogListener listener; - - public LoggregatorMessageHandler(ApplicationLogListener listener) { - this.listener = listener; - } - - public void onMessage(byte[] rawMessage) { - try { - LogMessages.Message message = LogMessages.Message.parseFrom(rawMessage); - ApplicationLog.MessageType messageType = - message.getMessageType() == LogMessages.Message.MessageType.OUT ? - ApplicationLog.MessageType.STDOUT : - ApplicationLog.MessageType.STDERR; - listener.onMessage(new ApplicationLog(message.getAppId(), - message.getMessage().toStringUtf8(), - new Date(message.getTimestamp() / NANOSECONDS_IN_MILLISECOND), - messageType, - message.getSourceName(), message.getSourceId())); - } catch (InvalidProtocolBufferException e) { - listener.onError(e); - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/StreamingLogTokenImpl.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/StreamingLogTokenImpl.java deleted file mode 100644 index 8a447fb7951..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/rest/StreamingLogTokenImpl.java +++ /dev/null @@ -1,37 +0,0 @@ -package org.cloudfoundry.client.lib.rest; - -import java.util.Timer; -import java.util.TimerTask; - -import javax.websocket.Session; - -import org.cloudfoundry.client.lib.StreamingLogToken; - -public class StreamingLogTokenImpl implements StreamingLogToken { - private static long keepAliveTime = 25000; // 25 seconds to match the go client - - private Timer keepAliveTimer = new Timer(true); - - private Session session; - - public StreamingLogTokenImpl(Session session) { - this.session = session; - - keepAliveTimer.scheduleAtFixedRate(new KeepAliveTimerTask(), keepAliveTime, keepAliveTime); - } - - public void cancel() { - keepAliveTimer.cancel(); - } - - private class KeepAliveTimerTask extends TimerTask { - @Override - public void run() { - if (session.isOpen()) { - session.getAsyncRemote().sendText("keep alive"); - } else { - keepAliveTimer.cancel(); - } - } - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/tokens/TargetInfos.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/tokens/TargetInfos.java deleted file mode 100644 index 6c74fda3aa8..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/tokens/TargetInfos.java +++ /dev/null @@ -1,72 +0,0 @@ -package org.cloudfoundry.client.lib.tokens; - -import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; -import org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.security.oauth2.common.OAuth2RefreshToken; - -import java.net.URI; -import java.util.HashMap; - -public class TargetInfos extends HashMap> { - private static final String ACCESS_TOKEN_KEY = ":token"; - private static final String REFRESH_TOKEN_KEY = ":refresh_token"; - private static final String SPACE_KEY = ":space"; - private static final String ORG_KEY = ":organization"; - private static final String VERSION_KEY = ":version"; - - public HashMap get(URI target) { - return get(target.toString()); - } - - public void put(URI target, HashMap targetInfo) { - put(target.toString(), targetInfo); - } - - public HashMap remove(URI target) { - return remove(target.toString()); - } - - public DefaultOAuth2AccessToken getToken(HashMap target) { - final String token = target.get(ACCESS_TOKEN_KEY); - final String[] tokens = token.split(" "); - return new DefaultOAuth2AccessToken(tokens[1]); - } - - public void putToken(HashMap target, OAuth2AccessToken token) { - target.put(ACCESS_TOKEN_KEY, String.format("%s %s", token.getTokenType().toLowerCase(), token.getValue())); - } - - public DefaultOAuth2RefreshToken getRefreshToken(HashMap target) { - final String token = target.get(REFRESH_TOKEN_KEY); - return new DefaultOAuth2RefreshToken(token); - } - - public void putRefreshToken(HashMap target, OAuth2RefreshToken token) { - target.put(REFRESH_TOKEN_KEY, token.getValue()); - } - - public String getSpace(HashMap target) { - return target.get(SPACE_KEY); - } - - public void putSpace(HashMap target, String space) { - target.put(SPACE_KEY, space); - } - - public String getOrganization(HashMap target) { - return target.get(ORG_KEY); - } - - public void putOrganization(HashMap target, String org) { - target.put(ORG_KEY, org); - } - - public String getVersion(HashMap target) { - return target.get(VERSION_KEY); - } - - public void putVersion(HashMap target, String version) { - target.put(VERSION_KEY, version); - } -} \ No newline at end of file diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/tokens/TokensFile.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/tokens/TokensFile.java deleted file mode 100644 index 90804b2544e..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/tokens/TokensFile.java +++ /dev/null @@ -1,116 +0,0 @@ -package org.cloudfoundry.client.lib.tokens; - -import com.esotericsoftware.yamlbeans.YamlConfig; -import com.esotericsoftware.yamlbeans.YamlReader; -import com.esotericsoftware.yamlbeans.YamlWriter; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; -import org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken; -import org.springframework.security.oauth2.common.OAuth2AccessToken; - -import java.io.File; -import java.io.FileNotFoundException; -import java.io.FileReader; -import java.io.FileWriter; -import java.io.IOException; -import java.net.URI; -import java.util.HashMap; -import java.util.LinkedHashMap; - -public class TokensFile { - public OAuth2AccessToken retrieveToken(URI target) { - TargetInfos targetInfos = getTokensFromFile(); - - if (targetInfos == null) { - return null; - } - - HashMap targetInfo = targetInfos.get(target); - - if (targetInfo == null) { - return null; - } - - DefaultOAuth2RefreshToken refreshToken = targetInfos.getRefreshToken(targetInfo); - DefaultOAuth2AccessToken token = targetInfos.getToken(targetInfo); - token.setRefreshToken(refreshToken); - - return token; - } - - public void saveToken(URI target, OAuth2AccessToken token, CloudInfo cloudInfo, CloudSpace space) { - TargetInfos targetInfos = getTokensFromFile(); - - if (targetInfos == null) { - targetInfos = new TargetInfos(); - } - - HashMap targetInfo = targetInfos.get(target); - - if (targetInfo == null) { - targetInfo = new LinkedHashMap(); - } - - targetInfos.putToken(targetInfo, token); - targetInfos.putRefreshToken(targetInfo, token.getRefreshToken()); - targetInfos.putVersion(targetInfo, cloudInfo.getVersion()); - targetInfos.putSpace(targetInfo, space.getMeta().getGuid().toString()); - targetInfos.putOrganization(targetInfo, space.getOrganization().getMeta().getGuid().toString()); - - targetInfos.put(target, targetInfo); - - saveTokensToFile(targetInfos); - } - - public void removeToken(URI target) { - TargetInfos targetInfos = getTokensFromFile(); - targetInfos.remove(target); - saveTokensToFile(targetInfos); - } - - public String getTokensFilePath() { - return System.getProperty("user.home") + "/.cf/tokens.yml"; - } - - protected TargetInfos getTokensFromFile() { - final File tokensFile = getTokensFile(); - try { - YamlReader reader = new YamlReader(new FileReader(tokensFile)); - return reader.read(TargetInfos.class); - } catch (FileNotFoundException fnfe) { - return new TargetInfos(); - } catch (IOException e) { - throw new RuntimeException("An error occurred reading the tokens file at " + - tokensFile.getPath() + ":" + e.getMessage(), e); - } - - } - - protected void saveTokensToFile(TargetInfos targetInfos) { - final File tokensFile = getTokensFile(); - tokensFile.getParentFile().mkdirs(); - try { - FileWriter fileWriter = new FileWriter(tokensFile); - - YamlConfig config = new YamlConfig(); - config.writeConfig.setAlwaysWriteClassname(false); - config.writeConfig.setWriteRootElementTags(false); - config.writeConfig.setWriteRootTags(false); - config.writeConfig.setExplicitFirstDocument(true); - YamlWriter yamlWriter = new YamlWriter(fileWriter, config); - - yamlWriter.write(targetInfos); - - yamlWriter.close(); - fileWriter.close(); - } catch (IOException e) { - throw new RuntimeException("An error occurred writing the tokens file at " + - tokensFile.getPath() + ":" + e.getMessage(), e); - } - } - - protected File getTokensFile() { - return new File(getTokensFilePath()); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/CloudEntityResourceMapper.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/CloudEntityResourceMapper.java deleted file mode 100644 index b52b880f539..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/CloudEntityResourceMapper.java +++ /dev/null @@ -1,322 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.util; - -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudEntity; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudQuota; -import org.cloudfoundry.client.lib.domain.CloudRoute; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudServicePlan; -import org.cloudfoundry.client.lib.domain.CloudServiceBroker; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.domain.CloudStack; -import org.cloudfoundry.client.lib.domain.Staging; - -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.UUID; - -/** - * Class handling the mapping of the cloud domain objects - * - * @author Thomas Risberg - */ -//TODO: use some more advanced JSON mapping framework? -public class CloudEntityResourceMapper { - - private static SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssZ"); - - public String getNameOfResource(Map resource) { - return getEntityAttribute(resource, "name", String.class); - } - - public UUID getGuidOfResource(Map resource) { - return getMeta(resource).getGuid(); - } - - @SuppressWarnings("unchecked") - public T mapResource(Map resource, Class targetClass) { - if (targetClass == CloudSpace.class) { - return (T) mapSpaceResource(resource); - } - if (targetClass == CloudOrganization.class) { - return (T) mapOrganizationResource(resource); - } - if (targetClass == CloudDomain.class) { - return (T) mapDomainResource(resource); - } - if (targetClass == CloudRoute.class) { - return (T) mapRouteResource(resource); - } - if (targetClass == CloudApplication.class) { - return (T) mapApplicationResource(resource); - } - if (targetClass == CloudService.class) { - return (T) mapServiceInstanceResource(resource); - } - if (targetClass == CloudServiceOffering.class) { - return (T) mapServiceResource(resource); - } - if (targetClass == CloudServiceBroker.class) { - return (T) mapServiceBrokerResource(resource); - } - if (targetClass == CloudStack.class) { - return (T) mapStackResource(resource); - } - if (targetClass == CloudQuota.class) { - return (T) mapQuotaResource(resource); - } - throw new IllegalArgumentException( - "Error during mapping - unsupported class for entity mapping " + targetClass.getName()); - } - - private CloudSpace mapSpaceResource(Map resource) { - Map organizationMap = getEmbeddedResource(resource, "organization"); - CloudOrganization organization = null; - if (organizationMap != null) { - organization = mapOrganizationResource(organizationMap); - } - return new CloudSpace(getMeta(resource), getNameOfResource(resource), organization); - } - - private CloudOrganization mapOrganizationResource( - Map resource) { - Boolean billingEnabled = getEntityAttribute(resource, - "billing_enabled", Boolean.class); - Map quotaDefinition = getEmbeddedResource(resource, - "quota_definition"); - CloudQuota quota = null; - if (quotaDefinition != null) { - quota = mapQuotaResource(quotaDefinition); - } - return new CloudOrganization(getMeta(resource), - getNameOfResource(resource), quota,billingEnabled); - } - - private CloudQuota mapQuotaResource(Map resource) { - Boolean nonBasicServicesAllowed = getEntityAttribute(resource, - "non_basic_services_allowed", Boolean.class); - int totalServices = getEntityAttribute(resource, "total_services", - Integer.class); - int totalRoutes = getEntityAttribute(resource, "total_routes", - Integer.class); - long memoryLimit = getEntityAttribute(resource, "memory_limit", - Long.class); - - return new CloudQuota(getMeta(resource), getNameOfResource(resource), - nonBasicServicesAllowed, totalServices, totalRoutes, - memoryLimit); - } - - private CloudDomain mapDomainResource(Map resource) { - @SuppressWarnings("unchecked") - Map ownerResource = getEntityAttribute(resource, "owning_organization", Map.class); - CloudOrganization owner; - if (ownerResource == null) { - owner = new CloudOrganization(CloudEntity.Meta.defaultMeta(), "none"); - } else { - owner = mapOrganizationResource(ownerResource); - } - return new CloudDomain(getMeta(resource), getNameOfResource(resource), owner); - } - - private CloudRoute mapRouteResource(Map resource) { - @SuppressWarnings("unchecked") - List apps = getEntityAttribute(resource, "apps", List.class); - String host = getEntityAttribute(resource, "host", String.class); - CloudDomain domain = mapDomainResource(getEmbeddedResource(resource, "domain")); - return new CloudRoute(getMeta(resource), host, domain, apps.size()); - } - - @SuppressWarnings({ "unchecked", "rawtypes" }) - private CloudApplication mapApplicationResource(Map resource) { - CloudApplication app = new CloudApplication( - getMeta(resource), - getNameOfResource(resource)); - app.setInstances(getEntityAttribute(resource, "instances", Integer.class)); - app.setServices(new ArrayList()); - app.setState(CloudApplication.AppState.valueOf(getEntityAttribute(resource, "state", String.class))); - //TODO: debug - app.setDebug(null); - - Integer runningInstancesAttribute = getEntityAttribute(resource, "running_instances", Integer.class); - if (runningInstancesAttribute != null) { - app.setRunningInstances(runningInstancesAttribute); - } - String command = getEntityAttribute(resource, "command", String.class); - String buildpack = getEntityAttribute(resource, "buildpack", String.class); - Map stackResource = getEmbeddedResource(resource, "stack"); - CloudStack stack = mapStackResource(stackResource); - Integer healthCheckTimeout = getEntityAttribute(resource, "health_check_timeout", Integer.class); - Staging staging = new Staging(command, buildpack, stack.getName(), healthCheckTimeout); - app.setStaging(staging); - - Map envMap = getEntityAttribute(resource, "environment_json", Map.class); - if (envMap.size() > 0) { - app.setEnv(envMap); - } - app.setMemory(getEntityAttribute(resource, "memory", Integer.class)); - app.setDiskQuota(getEntityAttribute(resource, "disk_quota", Integer.class)); - List> serviceBindings = getEntityAttribute(resource, "service_bindings", List.class); - List serviceList = new ArrayList(); - for (Map binding : serviceBindings) { - Map service = getEntityAttribute(binding, "service_instance", Map.class); - String serviceName = getNameOfResource(service); - if (serviceName != null) { - serviceList.add(serviceName); - } - } - app.setServices(serviceList); - return app; - } - - private CloudService mapServiceInstanceResource(Map resource) { - CloudService cloudService = new CloudService( - getMeta(resource), - getNameOfResource(resource)); - Map servicePlanResource = getEmbeddedResource(resource, "service_plan"); - if (servicePlanResource != null) { - cloudService.setPlan(getEntityAttribute(servicePlanResource, "name", String.class)); - - Map serviceResource = getEmbeddedResource(servicePlanResource, "service"); - if (serviceResource != null) { - //TODO: assuming vendor corresponds to the service.provider and not service_instance.vendor_data - cloudService.setLabel(getEntityAttribute(serviceResource, "label", String.class)); - cloudService.setProvider(getEntityAttribute(serviceResource, "provider", String.class)); - cloudService.setVersion(getEntityAttribute(serviceResource, "version", String.class)); - } - } - return cloudService; - } - - private CloudServiceOffering mapServiceResource(Map resource) { - CloudServiceOffering cloudServiceOffering = new CloudServiceOffering( - getMeta(resource), - getEntityAttribute(resource, "label", String.class), - getEntityAttribute(resource, "provider", String.class), - getEntityAttribute(resource, "version", String.class), - getEntityAttribute(resource, "description", String.class), - getEntityAttribute(resource, "active", Boolean.class), - getEntityAttribute(resource, "bindable", Boolean.class), - getEntityAttribute(resource, "url", String.class), - getEntityAttribute(resource, "info_url", String.class), - getEntityAttribute(resource, "unique_id", String.class), - getEntityAttribute(resource, "extra", String.class), - getEntityAttribute(resource, "documentation_url", String.class)); - List> servicePlanList = getEmbeddedResourceList(getEntity(resource), "service_plans"); - if (servicePlanList != null) { - for (Map servicePlanResource : servicePlanList) { - Boolean publicPlan = getEntityAttribute(servicePlanResource, "public", Boolean.class); - CloudServicePlan servicePlan = - new CloudServicePlan( - getMeta(servicePlanResource), - getEntityAttribute(servicePlanResource, "name", String.class), - getEntityAttribute(servicePlanResource, "description", String.class), - getEntityAttribute(servicePlanResource, "free", Boolean.class), - publicPlan == null ? true : publicPlan, - getEntityAttribute(servicePlanResource, "extra", String.class), - getEntityAttribute(servicePlanResource, "unique_id", String.class), - cloudServiceOffering); - cloudServiceOffering.addCloudServicePlan(servicePlan); - } - } - return cloudServiceOffering; - } - - private CloudServiceBroker mapServiceBrokerResource(Map resource) { - return new CloudServiceBroker(getMeta(resource), - getEntityAttribute(resource, "name", String.class), - getEntityAttribute(resource, "broker_url", String.class), - getEntityAttribute(resource, "auth_username", String.class)); - } - - private CloudStack mapStackResource(Map resource) { - return new CloudStack(getMeta(resource), - getNameOfResource(resource), - getEntityAttribute(resource, "description", String.class)); - } - - @SuppressWarnings("unchecked") - public static CloudEntity.Meta getMeta(Map resource) { - Map metadata = (Map) resource.get("metadata"); - UUID guid = UUID.fromString(String.valueOf(metadata.get("guid"))); - Date createdDate = parseDate(String.valueOf(metadata.get("created_at"))); - Date updatedDate = parseDate(String.valueOf(metadata.get("updated_at"))); - return new CloudEntity.Meta(guid, createdDate, updatedDate); - } - - private static Date parseDate(String dateString) { - if (dateString != null) { - try { - // if the time zone part of the dateString contains a colon (e.g. 2013-09-19T21:56:36+00:00) - // then remove it before parsing - String isoDateString = dateString.replaceFirst(":(?=[0-9]{2}$)", ""); - return dateFormatter.parse(isoDateString); - } catch (Exception ignore) {} - } - return null; - } - - @SuppressWarnings("unchecked") - public static Map getEntity(Map resource) { - return (Map) resource.get("entity"); - } - - @SuppressWarnings("unchecked") - public static T getEntityAttribute(Map resource, String attributeName, Class targetClass) { - if (resource == null) { - return null; - } - Map entity = (Map) resource.get("entity"); - Object attributeValue = entity.get(attributeName); - if (attributeValue == null) { - return null; - } - if (targetClass == String.class) { - return (T) String.valueOf(attributeValue); - } - if (targetClass == Long.class) { - return (T) Long.valueOf(String.valueOf(attributeValue)); - } - if (targetClass == Integer.class || targetClass == Boolean.class || targetClass == Map.class || targetClass == List.class) { - return (T) attributeValue; - } - if (targetClass == UUID.class && attributeValue instanceof String) { - return (T) UUID.fromString((String)attributeValue); - } - throw new IllegalArgumentException( - "Error during mapping - unsupported class for attribute mapping " + targetClass.getName()); - } - - @SuppressWarnings("unchecked") - public static Map getEmbeddedResource(Map resource, String embeddedResourceName) { - Map entity = (Map) resource.get("entity"); - return (Map) entity.get(embeddedResourceName); - } - - @SuppressWarnings("unchecked") - public static List> getEmbeddedResourceList(Map resource, String embeddedResourceName) { - return (List>) resource.get(embeddedResourceName); - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/CloudUtil.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/CloudUtil.java deleted file mode 100644 index 120bd120083..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/CloudUtil.java +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.util; - - -import java.io.IOException; -import java.io.InputStream; -import java.security.MessageDigest; -import java.security.NoSuchAlgorithmException; -import java.text.ParseException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Locale; - -/** - * Some helper utilities used by the Cloud Foundry Java client. - * - * @author Ramnivas Laddad - * @author A.B.Srinivasan - * - */ -public class CloudUtil { - - public static final int BUFFER_SIZE = 16 * 1024; - - private static Double DEFAULT_DOUBLE = new Double(0.0); - - private static Integer DEFAULT_INTEGER = new Integer(0); - - private static Long DEFAULT_LONG = new Long(0); - - private static final String HEX_CHARS = "0123456789ABCDEF"; - - private static final char EXTENSION_SEPARATOR = '.'; - - public static String parse(Object object) { - return parse(String.class, object); - } - - private CloudUtil() { - throw new AssertionError("Helper class should not be instantiated."); - } - - @SuppressWarnings("unchecked") - public static T parse(Class clazz, Object object) { - T defaultValue = null; - try { - if (clazz == Date.class) { - String stringValue = parse(String.class, object); - return clazz.cast(new SimpleDateFormat("EEE MMM d HH:mm:ss Z yyyy", - Locale.US).parse(stringValue)); - } - - if (clazz == Integer.class) { - defaultValue = (T) DEFAULT_INTEGER; - } else if (clazz == Long.class) { - defaultValue = (T) DEFAULT_LONG; - } else if (clazz == Double.class) { - defaultValue = (T) DEFAULT_DOUBLE; - } - - if (object == null) { - return defaultValue; - } - - // special handling for int and long since smaller numbers become ints - // but may be requested as long and vice versa - if (clazz == Integer.class) { - if (object instanceof Number) { - return clazz.cast(((Number) object).intValue()); - } else if (object instanceof String) { - return clazz.cast(Integer.valueOf(((String) object))); - } - } - if (clazz == Long.class) { - if (object instanceof Number) { - return clazz.cast(((Number) object).longValue()); - } else if (object instanceof String) { - return clazz.cast(Long.valueOf(((String) object))); - } - } - if (clazz == Double.class) { - if (object instanceof Number) { - return clazz.cast(((Number) object).doubleValue()); - } else if (object instanceof String) { - return clazz.cast(Double.valueOf(((String) object))); - } - } - - return clazz.cast(object); - } catch (ClassCastException e) { - // ignore - } catch (ParseException e) { - // ignore - } - return defaultValue; - } - - public static boolean isWar(String filePath) { - return "war".equalsIgnoreCase(extension(filePath)); - } - - public static String computeSha1Digest(InputStream in) throws IOException { - MessageDigest digest; - try { - digest = MessageDigest.getInstance("SHA-1"); - } catch (NoSuchAlgorithmException e) { - throw new RuntimeException(e); - } - - byte[] buffer = new byte[CloudUtil.BUFFER_SIZE]; - while(true) { - int read = in.read(buffer); - if (read == -1) { - break; - } - digest.update(buffer, 0, read); - } - in.close(); - return bytesToHex(digest.digest()); - } - - private static String bytesToHex(byte[] bytes) { - if (bytes == null) { - return null; - } - final StringBuilder hex = new StringBuilder(2 * bytes.length); - for (final byte b : bytes) { - hex.append(HEX_CHARS.charAt((b & 0xF0) >> 4)).append(HEX_CHARS.charAt((b & 0x0F))); - } - return hex.toString(); - } - - private static String extension(String filePath) { - int dot = filePath.lastIndexOf(EXTENSION_SEPARATOR); - return filePath.substring(dot + 1); - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/JsonUtil.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/JsonUtil.java deleted file mode 100644 index bb1b74d0813..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/JsonUtil.java +++ /dev/null @@ -1,102 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.util; - - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.cloudfoundry.client.lib.domain.CloudResource; -import org.codehaus.jackson.map.ObjectMapper; -import org.codehaus.jackson.type.TypeReference; -import org.springframework.http.MediaType; - -import java.io.IOException; -import java.nio.charset.Charset; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -/** - * Some JSON helper utilities used by the Cloud Foundry Java client. - * - * @author Thomas Risberg - * - */ -public class JsonUtil { - - protected static final Log logger = LogFactory.getLog(JsonUtil.class); - - private final static ObjectMapper mapper = new ObjectMapper(); - - public static final MediaType JSON_MEDIA_TYPE = new MediaType( - MediaType.APPLICATION_JSON.getType(), - MediaType.APPLICATION_JSON.getSubtype(), - Charset.forName("UTF-8")); - - public static Map convertJsonToMap(String json) { - Map retMap = new HashMap(); - if (json != null) { - try { - retMap = mapper.readValue(json, new TypeReference>() {}); - } catch (IOException e) { - logger.warn("Error while reading Java Map from JSON response: " + json, e); - } - } - return retMap; - } - - public static List convertJsonToList(String json) { - List retList = new ArrayList(); - if (json != null) { - try { - retList = mapper.readValue(json, new TypeReference>() {}); - } catch (IOException e) { - logger.warn("Error while reading Java List from JSON response: " + json, e); - } - } - return retList; - } - - public static List convertJsonToCloudResourceList(String json) { - List retList = new ArrayList(); - if (json != null) { - try { - retList = mapper.readValue(json, new TypeReference>() {}); - } catch (IOException e) { - logger.warn("Error while reading Java List from JSON response: " + json, e); - } - } - return retList; - } - - public static String convertToJson(Object value) { - if (mapper.canSerialize(value.getClass())) { - try { - return mapper.writeValueAsString(value); - } catch (IOException e) { - logger.warn("Error while serializing " + value + " to JSON", e); - return null; - } - } - else { - throw new IllegalArgumentException("Value of type " + value.getClass().getName() + - " can not be serialized to JSON."); - } - } - -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/RestUtil.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/RestUtil.java deleted file mode 100644 index 1b2c6d7c01e..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/RestUtil.java +++ /dev/null @@ -1,104 +0,0 @@ -package org.cloudfoundry.client.lib.util; - -import static org.apache.http.conn.ssl.SSLSocketFactory.STRICT_HOSTNAME_VERIFIER; - -import org.apache.http.HttpHost; -import org.apache.http.client.HttpClient; -import org.apache.http.conn.params.ConnRoutePNames; -import org.apache.http.conn.scheme.Scheme; -import org.apache.http.conn.ssl.SSLSocketFactory; -import org.apache.http.conn.ssl.TrustSelfSignedStrategy; -import org.cloudfoundry.client.lib.HttpProxyConfiguration; -import org.cloudfoundry.client.lib.oauth2.OauthClient; -import org.cloudfoundry.client.lib.rest.CloudControllerClientImpl; -import org.cloudfoundry.client.lib.rest.CloudControllerResponseErrorHandler; -import org.cloudfoundry.client.lib.rest.LoggingRestTemplate; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.converter.ByteArrayHttpMessageConverter; -import org.springframework.http.converter.FormHttpMessageConverter; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.ResourceHttpMessageConverter; -import org.springframework.http.converter.StringHttpMessageConverter; -import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; -import org.springframework.web.client.RestTemplate; - -import java.net.URL; -import java.security.GeneralSecurityException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -/** - * Some helper utilities for creating classes used for the REST support. - * - * @author Thomas Risberg - */ -public class RestUtil { - - public RestTemplate createRestTemplate(HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - RestTemplate restTemplate = new LoggingRestTemplate(); - restTemplate.setRequestFactory(createRequestFactory(httpProxyConfiguration, trustSelfSignedCerts)); - restTemplate.setErrorHandler(new CloudControllerResponseErrorHandler()); - restTemplate.setMessageConverters(getHttpMessageConverters()); - - return restTemplate; - } - - public ClientHttpRequestFactory createRequestFactory(HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - HttpComponentsClientHttpRequestFactory requestFactory = new HttpComponentsClientHttpRequestFactory(); - HttpClient httpClient = requestFactory.getHttpClient(); - - if (trustSelfSignedCerts) { - registerSslSocketFactory(httpClient); - } - - if (httpProxyConfiguration != null) { - HttpHost proxy = new HttpHost(httpProxyConfiguration.getProxyHost(), httpProxyConfiguration.getProxyPort()); - httpClient.getParams().setParameter(ConnRoutePNames.DEFAULT_PROXY, proxy); - } - - return requestFactory; - } - - public OauthClient createOauthClient(URL authorizationUrl, HttpProxyConfiguration httpProxyConfiguration, boolean trustSelfSignedCerts) { - return new OauthClient(authorizationUrl, createRestTemplate(httpProxyConfiguration, trustSelfSignedCerts)); - } - - private void registerSslSocketFactory(HttpClient httpClient) { - try { - SSLSocketFactory socketFactory = new SSLSocketFactory(new TrustSelfSignedStrategy(), STRICT_HOSTNAME_VERIFIER); - httpClient.getConnectionManager().getSchemeRegistry().register(new Scheme("https", 443, socketFactory)); - } catch (GeneralSecurityException gse) { - throw new RuntimeException("An error occurred setting up the SSLSocketFactory", gse); - } - } - - private List> getHttpMessageConverters() { - List> messageConverters = new ArrayList>(); - messageConverters.add(new ByteArrayHttpMessageConverter()); - messageConverters.add(new StringHttpMessageConverter()); - messageConverters.add(new ResourceHttpMessageConverter()); - messageConverters.add(new UploadApplicationPayloadHttpMessageConverter()); - messageConverters.add(getFormHttpMessageConverter()); - messageConverters.add(new MappingJacksonHttpMessageConverter()); - return messageConverters; - } - - private FormHttpMessageConverter getFormHttpMessageConverter() { - FormHttpMessageConverter formPartsMessageConverter = new CloudControllerClientImpl.CloudFoundryFormHttpMessageConverter(); - formPartsMessageConverter.setPartConverters(getFormPartsMessageConverters()); - return formPartsMessageConverter; - } - - private List> getFormPartsMessageConverters() { - List> partConverters = new ArrayList>(); - StringHttpMessageConverter stringConverter = new StringHttpMessageConverter(); - stringConverter.setSupportedMediaTypes(Collections.singletonList(JsonUtil.JSON_MEDIA_TYPE)); - stringConverter.setWriteAcceptCharset(false); - partConverters.add(stringConverter); - partConverters.add(new ResourceHttpMessageConverter()); - partConverters.add(new UploadApplicationPayloadHttpMessageConverter()); - return partConverters; - } -} diff --git a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/UploadApplicationPayloadHttpMessageConverter.java b/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/UploadApplicationPayloadHttpMessageConverter.java deleted file mode 100644 index 49c1541b214..00000000000 --- a/cloudfoundry-client-lib/src/main/java/org/cloudfoundry/client/lib/util/UploadApplicationPayloadHttpMessageConverter.java +++ /dev/null @@ -1,71 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.util; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; - -import org.cloudfoundry.client.lib.domain.UploadApplicationPayload; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpInputMessage; -import org.springframework.http.HttpOutputMessage; -import org.springframework.http.MediaType; -import org.springframework.http.converter.HttpMessageConverter; -import org.springframework.http.converter.HttpMessageNotReadableException; -import org.springframework.http.converter.HttpMessageNotWritableException; -import org.springframework.util.FileCopyUtils; - -/** - * Implementation of {@link HttpMessageConverter} that can write {@link org.cloudfoundry.client.lib.domain.UploadApplicationPayload}s. The {@code Content-Type} - * of written resources is {@code application/octet-stream}. - * - * @author Phillip Webb - */ -public class UploadApplicationPayloadHttpMessageConverter implements HttpMessageConverter { - - public boolean canRead(Class clazz, MediaType mediaType) { - return false; - } - - public boolean canWrite(Class clazz, MediaType mediaType) { - return UploadApplicationPayload.class.isAssignableFrom(clazz); - } - - public List getSupportedMediaTypes() { - return Collections.singletonList(MediaType.ALL); - } - - public UploadApplicationPayload read(Class clazz, HttpInputMessage inputMessage) throws IOException, - HttpMessageNotReadableException { - throw new UnsupportedOperationException(); - } - - public void write(UploadApplicationPayload t, MediaType contentType, HttpOutputMessage outputMessage) throws IOException, - HttpMessageNotWritableException { - HttpHeaders headers = outputMessage.getHeaders(); - if (contentType == null || contentType.isWildcardType() || contentType.isWildcardSubtype()) { - contentType = MediaType.APPLICATION_OCTET_STREAM; - } - if (contentType != null) { - headers.setContentType(contentType); - } - FileCopyUtils.copy(t.getInputStream(), outputMessage.getBody()); - outputMessage.getBody().flush(); - } - -} diff --git a/cloudfoundry-client-lib/src/main/protobuf/log_message.proto b/cloudfoundry-client-lib/src/main/protobuf/log_message.proto deleted file mode 100644 index 3463e40f973..00000000000 --- a/cloudfoundry-client-lib/src/main/protobuf/log_message.proto +++ /dev/null @@ -1,25 +0,0 @@ -package logmessage; - -option java_package = "loggregator"; -option java_outer_classname = "LogMessages"; - -message Message { - enum MessageType { - OUT = 1; - ERR = 2; - } - - required bytes message = 1; - required MessageType message_type = 2; - required sint64 timestamp = 3; - required string app_id = 4; - optional string source_id = 6; - repeated string drain_urls = 7; - optional string source_name = 8; -} - -message Envelope { - required string routing_key = 1; - required bytes signature = 2; - required Message log_message = 3; -} \ No newline at end of file diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/ChainedProxyConnectHandler.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/ChainedProxyConnectHandler.java deleted file mode 100644 index 4af770a9558..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/ChainedProxyConnectHandler.java +++ /dev/null @@ -1,126 +0,0 @@ -package org.cloudfoundry.client.lib; - -import org.eclipse.jetty.server.handler.ConnectHandler; -import org.eclipse.jetty.util.log.Log; -import org.eclipse.jetty.util.log.Logger; - -import javax.servlet.http.HttpServletRequest; -import java.io.IOException; -import java.io.InputStream; -import java.io.OutputStream; -import java.net.Socket; -import java.nio.channels.SocketChannel; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * Hacky connect handler which is able to open a chained proxy. Useful when starting an InJvm proxy chained to another - * corporate proxy. - */ -class ChainedProxyConnectHandler extends ConnectHandler { - private static final Logger logger = Log.getLogger(ChainedProxyConnectHandler.class); - - private HttpProxyConfiguration httpProxyConfiguration; - private AtomicInteger nbReceivedRequests; - - public ChainedProxyConnectHandler(HttpProxyConfiguration httpProxyConfiguration, AtomicInteger nbReceivedRequests) { - this.httpProxyConfiguration = httpProxyConfiguration; - this.nbReceivedRequests = nbReceivedRequests; - } - - protected SocketChannel connect(HttpServletRequest request, String host, int port) throws IOException { - nbReceivedRequests.incrementAndGet(); - - if (httpProxyConfiguration == null) { - return super.connect(request, host, port); - } else { - SocketChannel channel = super.connect(request, httpProxyConfiguration.getProxyHost(), httpProxyConfiguration.getProxyPort()); - - Socket socket = channel.socket(); - establishConnectHandshake(host, port, socket.getOutputStream(), socket.getInputStream()); - return channel; - } - } - - private void establishConnectHandshake(String host, int port, OutputStream out, InputStream in) throws IOException { - String connectMessage = "CONNECT " + host + ":" + port + " HTTP/1.0\r\n" - + "Proxy-Connection: Keep-Alive\r\n" - + "User-Agent: Mozilla/4.0\r\n"; - - logger.debug(">>> {}", connectMessage); - - out.write(str2byte(connectMessage)); - out.write(str2byte("\r\n")); - out.flush(); - - int foo = 0; - - StringBuilder sb = new StringBuilder(); - while (foo >= 0) { - foo = in.read(); - if (foo != 13) { - sb.append((char) foo); - continue; - } - foo = in.read(); - if (foo != 10) { - continue; - } - break; - } - if (foo < 0) { - throw new IOException(); - } - - String response = sb.toString(); - logger.debug("<<< {}", response); - - String reason = "Unknown reason"; - int code = -1; - try { - foo = response.indexOf(' '); - int bar = response.indexOf(' ', foo + 1); - code = Integer.parseInt(response.substring(foo + 1, bar)); - reason = response.substring(bar + 1); - } catch (Exception e) { - } - if (code != 200) { - logger.warn("Unable to handshake with upstream proxy to CONNECT to host=" + host + " port=" + port + " reason:" + reason); - throw new IOException("proxy error: " + reason); - } - - int count = 0; - while (true) { - count = 0; - while (foo >= 0) { - foo = in.read(); - if (foo != 13) { - count++; - continue; - } - foo = in.read(); - if (foo != 10) { - continue; - } - break; - } - if (foo < 0) { - throw new IOException(); - } - if (count == 0) break; - } - } - - byte[] str2byte(String str, String encoding) { - if (str == null) - return null; - try { - return str.getBytes(encoding); - } catch (java.io.UnsupportedEncodingException e) { - return str.getBytes(); - } - } - - byte[] str2byte(String str) { - return str2byte(str, "UTF-8"); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/ChainedProxyServlet.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/ChainedProxyServlet.java deleted file mode 100644 index 559b69f4362..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/ChainedProxyServlet.java +++ /dev/null @@ -1,57 +0,0 @@ -package org.cloudfoundry.client.lib; - -import org.eclipse.jetty.client.Address; -import org.eclipse.jetty.client.HttpClient; -import org.eclipse.jetty.servlets.ProxyServlet; - -import javax.servlet.ServletException; -import javax.servlet.ServletRequest; -import javax.servlet.ServletResponse; -import java.io.IOException; -import java.util.concurrent.atomic.AtomicInteger; - -/** - * An http proxy implementation that is able to chain request to another proxy. Usefull when starting an InJvm proxy chained to another - * corporate proxy. - */ -public class ChainedProxyServlet extends ProxyServlet { - private AtomicInteger nbReceivedRequests; - /** - * If ever this junit test needs a proxy to reach the Cf instance, we direct to it. - */ - private HttpProxyConfiguration httpProxyConfiguration; - - public ChainedProxyServlet(HttpProxyConfiguration httpProxyConfiguration, AtomicInteger nbReceivedRequests) { - this.httpProxyConfiguration = httpProxyConfiguration; - this.nbReceivedRequests = nbReceivedRequests; - } - - @Override - public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException { - nbReceivedRequests.incrementAndGet(); - super.service(req, res); - } - - @Override - protected HttpClient createHttpClientInstance() { - HttpClient httpClient = super.createHttpClientInstance(); - if (httpProxyConfiguration != null) { - httpClient.setProxy(new Address(httpProxyConfiguration.getProxyHost(), httpProxyConfiguration.getProxyPort())); - } - return httpClient; - } - - /** jetty 9 impl variant which imposes upgrade to java 7 - - - @Override - protected HttpClient createHttpClient() throws ServletException { - HttpClient httpClient = super.createHttpClient(); - if (httpProxyConfiguration != null) { - ProxyConfiguration proxyConfiguration = new ProxyConfiguration(httpProxyConfiguration.getProxyHost(), httpProxyConfiguration.getProxyPort()); - httpClient.setProxyConfiguration(proxyConfiguration); - } - return httpClient; - } - */ -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudFoundryClientTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudFoundryClientTest.java deleted file mode 100644 index fb02afd289e..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudFoundryClientTest.java +++ /dev/null @@ -1,2037 +0,0 @@ -package org.cloudfoundry.client.lib; - -import static java.util.Arrays.asList; -import static org.hamcrest.Matchers.containsString; -import static org.hamcrest.Matchers.hasProperty; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertSame; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; -import static org.junit.Assume.assumeTrue; - -import java.io.File; -import java.io.IOException; -import java.io.InputStream; -import java.net.InetSocketAddress; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Collections; -import java.util.Date; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; -import java.util.UUID; -import java.util.concurrent.atomic.AtomicInteger; - -import org.apache.commons.io.IOUtils; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudEntity; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudRoute; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceBroker; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudServicePlan; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.domain.CloudStack; -import org.cloudfoundry.client.lib.domain.CrashInfo; -import org.cloudfoundry.client.lib.domain.CrashesInfo; -import org.cloudfoundry.client.lib.domain.InstanceInfo; -import org.cloudfoundry.client.lib.domain.InstanceState; -import org.cloudfoundry.client.lib.domain.InstanceStats; -import org.cloudfoundry.client.lib.domain.InstancesInfo; -import org.cloudfoundry.client.lib.domain.Staging; -import org.cloudfoundry.client.lib.util.RestUtil; -import org.eclipse.jetty.server.Server; -import org.eclipse.jetty.server.handler.ConnectHandler; -import org.eclipse.jetty.server.handler.HandlerCollection; -import org.eclipse.jetty.servlet.ServletHandler; -import org.eclipse.jetty.servlet.ServletHolder; -import org.eclipse.jetty.util.thread.QueuedThreadPool; -import org.jboss.byteman.contrib.bmunit.BMScript; -import org.jboss.byteman.contrib.bmunit.BMUnitRunner; -import org.junit.After; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.Before; -import org.junit.BeforeClass; -import org.junit.Ignore; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.rules.TemporaryFolder; -import org.junit.rules.TestRule; -import org.junit.rules.TestWatcher; -import org.junit.runner.Description; -import org.junit.runner.RunWith; -import org.springframework.core.io.ClassPathResource; -import org.springframework.http.HttpMethod; -import org.springframework.http.HttpStatus; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.http.client.ClientHttpResponse; -import org.springframework.http.client.HttpComponentsClientHttpRequestFactory; -import org.springframework.http.client.SimpleClientHttpRequestFactory; -import org.springframework.web.client.HttpClientErrorException; -import org.springframework.web.client.HttpServerErrorException; -import org.springframework.web.client.ResponseExtractor; -import org.springframework.web.client.RestTemplate; -import org.cloudfoundry.client.lib.domain.CloudQuota; - -/** - * Note that this integration tests rely on other methods working correctly, so these tests aren't - * independent unit tests for all methods, they are intended to test the completeness of the functionality of - * each API version implementation. - * - * @author Ramnivas Laddad - * @author A.B.Srinivasan - * @author Jennifer Hickey - * @author Thomas Risberg - */ -@RunWith(BMUnitRunner.class) -@BMScript(value="trace", dir="target/test-classes") -public class CloudFoundryClientTest { - private CloudFoundryClient connectedClient; - - // Pass -Dccng.target=http://api.cloudfoundry.com, vcap.me, or your own cloud -- must point to a v2 cloud controller - private static final String CCNG_API_URL = System.getProperty("ccng.target", "http://api.run.pivotal.io"); - - private static final String CCNG_API_PROXY_HOST = System.getProperty("http.proxyHost", null); - - private static final int CCNG_API_PROXY_PORT = Integer.getInteger("http.proxyPort", 80); - - private static final boolean CCNG_API_SSL = Boolean.getBoolean("ccng.ssl"); - - private static final String CCNG_USER_EMAIL = System.getProperty("ccng.email", "java-authenticatedClient-test-user@vmware.com"); - - private static final String CCNG_USER_PASS = System.getProperty("ccng.passwd"); - - private static final boolean CCNG_USER_IS_ADMIN = Boolean.getBoolean("ccng.admin"); - - private static final String CCNG_USER_ORG = System.getProperty("ccng.org", "gopivotal.com"); - - private static final String CCNG_USER_SPACE = System.getProperty("ccng.space", "test"); - - private static final String TEST_NAMESPACE = System.getProperty("vcap.test.namespace", defaultNamespace(CCNG_USER_EMAIL)); - - private static final String TEST_DOMAIN = System.getProperty("vcap.test.domain", defaultNamespace(CCNG_USER_EMAIL) + ".com"); - - private static final String MYSQL_SERVICE_LABEL = System.getProperty("vcap.mysql.label", "p-mysql"); - private static final String MYSQL_SERVICE_PLAN = System.getProperty("vcap.mysql.plan", "100mb-dev"); - - private static final String DEFAULT_STACK_NAME = "lucid64"; - - private static final boolean SILENT_TEST_TIMINGS = Boolean.getBoolean("silent.testTimings"); - - private static final boolean SKIP_INJVM_PROXY = Boolean.getBoolean("http.skipInJvmProxy"); - - public static final int STARTUP_TIMEOUT = Integer.getInteger("ccng.startup.timeout", 60000); - - private static String defaultDomainName = null; - - private static HttpProxyConfiguration httpProxyConfiguration; - private static Server inJvmProxyServer; - private static int inJvmProxyPort; - private static AtomicInteger nbInJvmProxyRcvReqs; - - private static final int DEFAULT_MEMORY = 512; // MB - private static final int DEFAULT_DISK = 1024; // MB - - private static final int FIVE_MINUTES = 300 * 1000; - - private static final String CCNG_QUOTA_NAME_TEST = System.getProperty("ccng.quota", "test_quota"); - - private static boolean tearDownComplete = false; - - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Rule - public TestRule watcher = new TestWatcher() { - private long startTime; - - @Override - protected void starting(Description description) { - if (!SILENT_TEST_TIMINGS) { - System.out.println("Starting test " + description.getMethodName()); - } - startTime = System.currentTimeMillis(); - } - - @Override - protected void finished(Description description) { - if (!SILENT_TEST_TIMINGS) { - System.out.println("Test " + description.getMethodName() + " took " + (System.currentTimeMillis() - startTime) + " ms"); - } - } - }; - - @BeforeClass - public static void beforeClass() throws Exception { - System.out.println("Running tests on " + CCNG_API_URL + " on behalf of " + CCNG_USER_EMAIL); - System.out.println("Using space " + CCNG_USER_SPACE + " of organization " + CCNG_USER_ORG ); - if (CCNG_USER_PASS == null) { - fail("System property ccng.passwd must be specified, supply -Dccng.passwd="); - } - - if (CCNG_API_PROXY_HOST != null) { - httpProxyConfiguration = new HttpProxyConfiguration(CCNG_API_PROXY_HOST, CCNG_API_PROXY_PORT); - } - if (!SKIP_INJVM_PROXY) { - startInJvmProxy(); - httpProxyConfiguration = new HttpProxyConfiguration("127.0.0.1", inJvmProxyPort); - } - } - - @AfterClass - public static void afterClass() throws Exception { - if (inJvmProxyServer != null) { - inJvmProxyServer.stop(); - nbInJvmProxyRcvReqs.set(0); - } - } - - @Before - public void setUp() throws Exception { - URL cloudControllerUrl; - - cloudControllerUrl = new URL(CCNG_API_URL); - connectedClient = new CloudFoundryClient(new CloudCredentials(CCNG_USER_EMAIL, CCNG_USER_PASS), - cloudControllerUrl, CCNG_USER_ORG, CCNG_USER_SPACE, httpProxyConfiguration, CCNG_API_SSL); - connectedClient.login(); - defaultDomainName = connectedClient.getDefaultDomain().getName(); - - // Optimization to avoid redoing the work already done is tearDown() - if (!tearDownComplete) { - tearDown(); - } - tearDownComplete = false; - connectedClient.addDomain(TEST_DOMAIN); - - // connectedClient.registerRestLogListener(new RestLogger("CF_REST")); - if (nbInJvmProxyRcvReqs != null) { - nbInJvmProxyRcvReqs.set(0); //reset calls made in setup to leave a clean state for tests to assert - } - - if (!SKIP_INJVM_PROXY) { - new SocketDestHelper().setForbiddenOnCurrentThread(); - } - } - - @After - public void tearDown() throws Exception { - // Clean after ourselves so that there are no leftover apps, services, domains, and routes - if (connectedClient != null) { //may happen if setUp() fails - connectedClient.deleteAllApplications(); - connectedClient.deleteAllServices(); - clearTestDomainAndRoutes(); - } - tearDownComplete = true; - } - - - @Test - public void infoAvailable() throws Exception { - CloudInfo info = connectedClient.getCloudInfo(); - assertNotNull(info.getName()); - assertNotNull(info.getSupport()); - assertNotNull(info.getBuild()); - } - - /** - * Self tests that the assert mechanisms with jetty and byteman are properly working. If debugging is needed - * consider enabling one or more of the following system properties - * -Dorg.jboss.byteman.verbose=true - * -Dorg.jboss.byteman.debug=true - * -Dorg.jboss.byteman.rule.debug=true - * -Dorg.eclipse.jetty.util.log.class=org.eclipse.jetty.util.log.StdErrLog - * -Dorg.eclipse.jetty.LEVEL=INFO - * -Dorg.eclipse.jetty.server.LEVEL=INFO - * -Dorg.eclipse.jetty.server.handler.ConnectHandler=DEBUG - * Documentation on byteman at http://downloads.jboss.org/byteman/2.1.3/ProgrammersGuideSinglePage.2.1.3.1.html - */ - @Test - public void checkByteManrulesAndInJvmProxyAssertMechanisms() { - if (SKIP_INJVM_PROXY) { - return; //inJvm Proxy test skipped. - } - assertTrue(SocketDestHelper.isSocketRestrictionFlagActive()); - - RestTemplate restTemplate = new RestTemplate(); - - // When called directly without a proxy, expect an exception to be thrown due to byteman rules - assertNetworkCallFails(restTemplate, new HttpComponentsClientHttpRequestFactory()); - // Repeat that with different request factory used in the code as this exercises different byteman rules - assertNetworkCallFails(restTemplate, new SimpleClientHttpRequestFactory()); - // And with the actual one used by RestUtil, without a proxy configured - assertNetworkCallFails(restTemplate, new RestUtil().createRequestFactory(null, false)); - - // Test with the in-JVM proxy configured - HttpProxyConfiguration localProxy = new HttpProxyConfiguration("127.0.0.1", inJvmProxyPort); - ClientHttpRequestFactory requestFactory = new RestUtil().createRequestFactory(localProxy, CCNG_API_SSL); - - restTemplate.setRequestFactory(requestFactory); - restTemplate.execute(CCNG_API_URL + "/info", HttpMethod.GET, null, null); - - // then executes fine, and the jetty proxy indeed received one request - assertEquals("expected network calls to make it through the inJvmProxy.", 1, nbInJvmProxyRcvReqs.get()); - nbInJvmProxyRcvReqs.set(0); //reset for next test - - assertTrue(SocketDestHelper.isActivated()); - assertFalse("expected some installed rules, got:" + SocketDestHelper.getInstalledRules(), SocketDestHelper.getInstalledRules().isEmpty()); - } - - private void assertNetworkCallFails(RestTemplate restTemplate, ClientHttpRequestFactory requestFactory) { - restTemplate.setRequestFactory(requestFactory); - try { - HttpStatus status = restTemplate.execute(CCNG_API_URL + "/info", HttpMethod.GET, null, new ResponseExtractor() { - public HttpStatus extractData(ClientHttpResponse response) throws IOException { - return response.getStatusCode(); - } - }); - Assert.fail("Expected byteman rules to detect direct socket connections, status is:" + status); - } catch (Exception e) { - //good, byteman rejected it as expected - //e.printStackTrace(); - } - assertEquals("Not expecting Jetty to receive requests since we asked direct connections", 0, nbInJvmProxyRcvReqs.get()); - } - - - private static int getNextAvailablePort(int initial) { - int current = initial; - while (! PortAvailability.available(current)) { - current ++; - if (current - initial > 100) { - throw new RuntimeException("did not find an available port from " + initial + " up to:" + current); - } - } - return current; - } - - /** - * To test that the CF client is able to go through a proxy, we point the CC client to a broken url - * that can only be resolved by going through an inJVM proxy which rewrites the URI. - * This method starts this inJvm proxy. - * @throws Exception - */ - private static void startInJvmProxy() throws Exception { - inJvmProxyPort = getNextAvailablePort(8080); - inJvmProxyServer = new Server(new InetSocketAddress("127.0.0.1", inJvmProxyPort)); //forcing use of loopback that will be used both for Httpclient proxy and SocketDestHelper - QueuedThreadPool threadPool = new QueuedThreadPool(); - threadPool.setMinThreads(1); - inJvmProxyServer.setThreadPool(threadPool); - - HandlerCollection handlers = new HandlerCollection(); - inJvmProxyServer.setHandler(handlers); - - ServletHandler servletHandler = new ServletHandler(); - handlers.addHandler(servletHandler); - nbInJvmProxyRcvReqs = new AtomicInteger(); - ChainedProxyServlet chainedProxyServlet = new ChainedProxyServlet(httpProxyConfiguration, nbInJvmProxyRcvReqs); - servletHandler.addServletWithMapping(new ServletHolder(chainedProxyServlet), "/*"); - - // Setup proxy handler to handle CONNECT methods - ConnectHandler proxyHandler; - proxyHandler = new ChainedProxyConnectHandler(httpProxyConfiguration, nbInJvmProxyRcvReqs); - handlers.addHandler(proxyHandler); - - inJvmProxyServer.start(); - } - - - @Test - public void spacesAvailable() throws Exception { - List spaces = connectedClient.getSpaces(); - assertNotNull(spaces); - assertTrue(spaces.size() > 0); - } - - @Test - public void orgsAvailable() throws Exception { - List orgs = connectedClient.getOrganizations(); - assertNotNull(orgs); - assertTrue(orgs.size() > 0); - } - - // - // Basic Application tests - // - - @Test - public void createApplication() { - String appName = namespacedAppName("travel_test-0"); - List uris = Arrays.asList(computeAppUrl(appName)); - Staging staging = new Staging(); - connectedClient.createApplication(appName, staging, DEFAULT_MEMORY, uris, null); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(appName, app.getName()); - - assertNotNull(app.getMeta().getGuid()); - - final Calendar now = Calendar.getInstance(); - now.setTime(new Date()); - final Calendar createdDate = Calendar.getInstance(); - createdDate.setTime(app.getMeta().getCreated()); - - assertEquals(now.get(Calendar.DATE), createdDate.get(Calendar.DATE)); - } - - @Test - public void createApplicationWithBuildPack() throws IOException { - String buildpackUrl = "https://github.com/cloudfoundry/java-buildpack.git"; - String appName = namespacedAppName("buildpack"); - createSpringApplication(appName, buildpackUrl); - - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STOPPED, app.getState()); - - assertEquals(buildpackUrl, app.getStaging().getBuildpackUrl()); - } - - @Test - public void createApplicationWithStack() throws IOException { - String appName = namespacedAppName("stack"); - createSpringApplication(appName, DEFAULT_STACK_NAME, null); - - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STOPPED, app.getState()); - - assertEquals(DEFAULT_STACK_NAME, app.getStaging().getStack()); - } - - @Test - public void createApplicationWithHealthCheckTimeout() throws IOException { - String appName = namespacedAppName("health_check"); - createSpringApplication(appName, null, 2); - - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STOPPED, app.getState()); - - assertEquals(2, app.getStaging().getHealthCheckTimeout().intValue()); - } - - @Test - public void createApplicationWithDomainOnly() { - String appName = namespacedAppName("travel_test-tld"); - - connectedClient.addDomain(TEST_DOMAIN); - List uris = Arrays.asList(TEST_DOMAIN); - - Staging staging = new Staging(); - connectedClient.createApplication(appName, staging, DEFAULT_MEMORY, uris, null); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(appName, app.getName()); - - List actualUris = app.getUris(); - assertTrue(actualUris.size() == 1); - assertEquals(TEST_DOMAIN, actualUris.get(0)); - } - - @Test - public void getApplicationByName() { - final String serviceName = "test_database"; - String appName = createSpringTravelApp("1", Collections.singletonList(serviceName)); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(appName, app.getName()); - - assertEquals(1, app.getServices().size()); - assertEquals(serviceName, app.getServices().get(0)); - - assertEquals(1, app.getInstances()); - assertEquals(DEFAULT_MEMORY, app.getMemory()); - assertEquals(DEFAULT_DISK, app.getDiskQuota()); - - assertNull(app.getStaging().getCommand()); - assertNull(app.getStaging().getBuildpackUrl()); - assertNull(app.getStaging().getHealthCheckTimeout()); - } - - @Test - public void getApplicationByGuid() { - String appName = createSpringTravelApp("3"); - CloudApplication app = connectedClient.getApplication(appName); - CloudApplication guidApp = connectedClient.getApplication(app.getMeta().getGuid()); - assertEquals(app.getName(), guidApp.getName()); - } - - @Test - public void getApplicationNonExistent() { - thrown.expect(CloudFoundryException.class); - thrown.expect(hasProperty("statusCode", is(HttpStatus.NOT_FOUND))); - thrown.expectMessage(containsString("Not Found")); - String appName = namespacedAppName("non_existent"); - connectedClient.getApplication(appName); - } - - @Test - public void getApplications() { - final String serviceName = "test_database"; - String appName = createSpringTravelApp("2", Collections.singletonList(serviceName)); - List apps = connectedClient.getApplications(); - assertEquals(1, apps.size()); - - CloudApplication app = apps.get(0); - assertEquals(appName, app.getName()); - assertNotNull(app.getMeta()); - assertNotNull(app.getMeta().getGuid()); - - assertEquals(1, app.getServices().size()); - assertEquals(serviceName, app.getServices().get(0)); - - createSpringTravelApp("3"); - apps = connectedClient.getApplications(); - assertEquals(2, apps.size()); - } - - @Test - public void deleteApplication() { - String appName = createSpringTravelApp("4"); - assertEquals(1, connectedClient.getApplications().size()); - connectedClient.deleteApplication(appName); - assertEquals(0, connectedClient.getApplications().size()); - } - - @Test - public void startStopApplication() throws IOException { - String appName = createSpringTravelApp("upload-start-stop"); - CloudApplication app = uploadSpringTravelApp(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STOPPED, app.getState()); - - String url = computeAppUrlNoProtocol(appName); - assertEquals(url, app.getUris().get(0)); - - StartingInfo info = connectedClient.startApplication(appName); - app = connectedClient.getApplication(appName); - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - assertNotNull(info); - assertNotNull(info.getStagingFile()); - - connectedClient.stopApplication(appName); - app = connectedClient.getApplication(appName); - assertEquals(CloudApplication.AppState.STOPPED, app.getState()); - } - - @Test - public void paginationWorksForUris() throws IOException { - String appName = namespacedAppName("page-url1"); - CloudApplication app = createAndUploadSimpleTestApp(appName); - - List originalUris = app.getUris(); - assertEquals(Collections.singletonList(computeAppUrl(appName)), originalUris); - - List uris = new ArrayList(app.getUris()); - for (int i = 2; i < 55; i++) { - uris.add(computeAppUrl(namespacedAppName("page-url" + i))); - } - connectedClient.updateApplicationUris(appName, uris); - - app = connectedClient.getApplication(appName); - List appUris = app.getUris(); - assertNotNull(appUris); - assertEquals(uris.size(), appUris.size()); - for (String uri : uris) { - assertTrue("Missing URI: " + uri, appUris.contains(uri)); - } - } - - // - // App configuration tests - // - - @Test - public void setEnvironmentThroughList() throws IOException { - String appName = createSpringTravelApp("env1"); - CloudApplication app = connectedClient.getApplication(appName); - assertTrue(app.getEnv().isEmpty()); - - connectedClient.updateApplicationEnv(appName, asList("foo=bar", "bar=baz")); - app = connectedClient.getApplication(app.getName()); - assertEquals(new HashSet(asList("foo=bar", "bar=baz")), new HashSet(app.getEnv())); - - connectedClient.updateApplicationEnv(appName, asList("foo=baz", "baz=bong")); - app = connectedClient.getApplication(app.getName()); - assertEquals(new HashSet(asList("foo=baz", "baz=bong")), new HashSet(app.getEnv())); - - connectedClient.updateApplicationEnv(appName, new ArrayList()); - app = connectedClient.getApplication(app.getName()); - assertTrue(app.getEnv().isEmpty()); - } - - @Test - public void setEnvironmentWithoutEquals() throws IOException { - thrown.expect(IllegalArgumentException.class); - String appName = createSpringTravelApp("env2"); - CloudApplication app = connectedClient.getApplication(appName); - assertTrue(app.getEnv().isEmpty()); - connectedClient.updateApplicationEnv(appName, asList("foo:bar", "bar=baz")); - } - - @Test - public void setEnvironmentThroughMap() throws IOException { - String appName = createSpringTravelApp("env3"); - CloudApplication app = connectedClient.getApplication(appName); - assertTrue(app.getEnv().isEmpty()); - - Map env1 = new HashMap(); - env1.put("foo", "bar"); - env1.put("bar", "baz"); - connectedClient.updateApplicationEnv(appName, env1); - app = connectedClient.getApplication(app.getName()); - assertEquals(env1, app.getEnvAsMap()); - assertEquals(new HashSet(asList("foo=bar", "bar=baz")), new HashSet(app.getEnv())); - - Map env2 = new HashMap(); - env2.put("foo", "baz"); - env2.put("baz", "bong"); - connectedClient.updateApplicationEnv(appName, env2); - app = connectedClient.getApplication(app.getName()); - assertEquals(env2, app.getEnvAsMap()); - assertEquals(new HashSet(asList("foo=baz", "baz=bong")), new HashSet(app.getEnv())); - - connectedClient.updateApplicationEnv(appName, new HashMap()); - app = connectedClient.getApplication(app.getName()); - assertTrue(app.getEnv().isEmpty()); - assertTrue(app.getEnvAsMap().isEmpty()); - } - - @Test - public void updateApplicationDisk() throws IOException { - String appName = createSpringTravelApp("updateDisk"); - connectedClient.updateApplicationDiskQuota(appName, 2048); - CloudApplication app = connectedClient.getApplication(appName); - assertEquals(2048, app.getDiskQuota()); - } - - @Test - public void updateApplicationMemory() throws IOException { - String appName = createSpringTravelApp("updateMemory"); - connectedClient.updateApplicationMemory(appName, 256); - CloudApplication app = connectedClient.getApplication(appName); - assertEquals(256, app.getMemory()); - } - - @Test - public void updateApplicationInstances() throws Exception { - String appName = createSpringTravelApp("updateInstances"); - CloudApplication app = connectedClient.getApplication(appName); - - assertEquals(1, app.getInstances()); - - connectedClient.updateApplicationInstances(appName, 3); - app = connectedClient.getApplication(appName); - assertEquals(3, app.getInstances()); - - connectedClient.updateApplicationInstances(appName, 1); - app = connectedClient.getApplication(appName); - assertEquals(1, app.getInstances()); - } - - @Test - public void updateApplicationUris() throws IOException { - String appName = namespacedAppName("updateUris"); - CloudApplication app = createAndUploadAndStartSimpleSpringApp(appName); - - List originalUris = app.getUris(); - assertEquals(Collections.singletonList(computeAppUrlNoProtocol(appName)), originalUris); - - List uris = new ArrayList(app.getUris()); - uris.add(computeAppUrlNoProtocol(namespacedAppName("url2"))); - connectedClient.updateApplicationUris(appName, uris); - app = connectedClient.getApplication(appName); - List newUris = app.getUris(); - assertNotNull(newUris); - assertEquals(uris.size(), newUris.size()); - for (String uri : uris) { - assertTrue(newUris.contains(uri)); - } - connectedClient.updateApplicationUris(appName, originalUris); - app = connectedClient.getApplication(appName); - assertEquals(originalUris, app.getUris()); - } - - - // - // Advanced Application tests - // - - @Test - public void uploadStandaloneApplication() throws IOException { - String appName = namespacedAppName("standalone-ruby"); - List uris = new ArrayList(); - List services = new ArrayList(); - createStandaloneRubyTestApp(appName, uris, services); - connectedClient.startApplication(appName); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - assertEquals(uris, app.getUris()); - } - - @Test - public void uploadStandaloneApplicationWithURLs() throws IOException { - String appName = namespacedAppName("standalone-node"); - List uris = new ArrayList(); - uris.add(computeAppUrl(appName)); - List services = new ArrayList(); - Staging staging = new Staging("node app.js", null); - File file = SampleProjects.standaloneNode(); - connectedClient.createApplication(appName, staging, 64, uris, services); - connectedClient.uploadApplication(appName, file.getCanonicalPath()); - connectedClient.startApplication(appName); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - assertEquals(Collections.singletonList(computeAppUrlNoProtocol(appName)), app.getUris()); - } - - @Test - public void updateStandaloneApplicationCommand() throws IOException { - String appName = namespacedAppName("standalone-ruby"); - List uris = new ArrayList(); - List services = new ArrayList(); - createStandaloneRubyTestApp(appName, uris, services); - connectedClient.startApplication(appName); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - assertEquals(uris, app.getUris()); - assertEquals("ruby simple.rb", app.getStaging().getCommand()); - connectedClient.stopApplication(appName); - - Staging newStaging = new Staging("ruby simple.rb test", "https://github.com/cloudfoundry/heroku-buildpack-ruby"); - connectedClient.updateApplicationStaging(appName, newStaging); - app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(uris, app.getUris()); - assertEquals("ruby simple.rb test", app.getStaging().getCommand()); - assertEquals("https://github.com/cloudfoundry/heroku-buildpack-ruby", app.getStaging().getBuildpackUrl()); - } - - @Test - public void renameApplication() { - String appName = createSpringTravelApp("5"); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(appName, app.getName()); - String newName = namespacedAppName("travel_test-6"); - connectedClient.rename(appName, newName); - CloudApplication newApp = connectedClient.getApplication(newName); - assertNotNull(newApp); - assertEquals(newName, newApp.getName()); - } - - @Test - public void createAndReCreateApplication() { - String appName = createSpringTravelApp("A"); - assertEquals(1, connectedClient.getApplications().size()); - connectedClient.deleteApplication(appName); - appName = createSpringTravelApp("A"); - assertEquals(1, connectedClient.getApplications().size()); - connectedClient.deleteApplication(appName); - } - - @Test - public void getApplicationsMatchGetApplication() { - String appName = createSpringTravelApp("1"); - List apps = connectedClient.getApplications(); - assertEquals(1, apps.size()); - CloudApplication app = connectedClient.getApplication(appName); - assertEquals(app.getName(), apps.get(0).getName()); - assertEquals(app.getState(), apps.get(0).getState()); - assertEquals(app.getInstances(), apps.get(0).getInstances()); - assertEquals(app.getMemory(), apps.get(0).getMemory()); - assertEquals(app.getMeta().getGuid(), apps.get(0).getMeta().getGuid()); - assertEquals(app.getMeta().getCreated(), apps.get(0).getMeta().getCreated()); - assertEquals(app.getMeta().getUpdated(), apps.get(0).getMeta().getUpdated()); - assertEquals(app.getUris(), apps.get(0).getUris()); - } - - @Test - public void getApplicationInstances() throws Exception { - String appName = namespacedAppName("instance1"); - CloudApplication app = createAndUploadAndStartSimpleSpringApp(appName); - assertEquals(1, app.getInstances()); - - boolean passSingleInstance = getInstanceInfosWithTimeout(appName, 1, true); - assertTrue("Couldn't get the right application state in 50 tries", passSingleInstance); - - boolean passSingleMultipleInstances = getInstanceInfosWithTimeout(appName, 3, true); - assertTrue("Couldn't get the right application state in 50 tries", passSingleMultipleInstances); - - connectedClient.stopApplication(appName); - InstancesInfo instInfo = connectedClient.getApplicationInstances(appName); - assertNull(instInfo); - } - - @Test - @Ignore("Ignore until the Java buildpack detects app crashes upon OOM correctly") - public void getCrashes() throws IOException, InterruptedException { - String appName = namespacedAppName("crashes1"); - createAndUploadSimpleSpringApp(appName); - connectedClient.updateApplicationEnv(appName, Collections.singletonMap("crash", "true")); - connectedClient.startApplication(appName); - - boolean pass = getInstanceInfosWithTimeout(appName, 1, false); - assertTrue("Couldn't get the right application state in 50 tries", pass); - - CrashesInfo crashes = connectedClient.getCrashes(appName); - assertNotNull(crashes); - assertTrue(!crashes.getCrashes().isEmpty()); - for (CrashInfo info : crashes.getCrashes()) { - assertNotNull(info.getInstance()); - assertNotNull(info.getSince()); - } - } - - @Test - public void accessRandomApplicationUrl() throws Exception { - String appName = UUID.randomUUID().toString(); - CloudApplication app = createAndUploadAndStartSimpleSpringApp(appName); - connectedClient.startApplication(appName); - assertEquals(1, app.getInstances()); - for (int i = 0; i < 100 && app.getRunningInstances() < 1; i++) { - Thread.sleep(1000); - app = connectedClient.getApplication(appName); - } - assertEquals(1, app.getRunningInstances()); - RestUtil restUtil = new RestUtil(); - RestTemplate rest = restUtil.createRestTemplate(httpProxyConfiguration, false); - String results = rest.getForObject("http://" + app.getUris().get(0), String.class); - assertTrue(results.contains("Hello world!")); - } - - @Test - public void getApplicationStats() throws Exception { - final int instanceCount = 3; - String appName = namespacedAppName("stats2"); - createAndUploadSimpleSpringApp(appName); - connectedClient.updateApplicationInstances(appName, instanceCount); - connectedClient.startApplication(appName); - CloudApplication app = connectedClient.getApplication(appName); - - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - - waitForStatsAvailable(appName, instanceCount); - - ApplicationStats stats = connectedClient.getApplicationStats(appName); - assertNotNull(stats); - assertNotNull(stats.getRecords()); - assertEquals(instanceCount, stats.getRecords().size()); - - for (InstanceStats instanceStats : stats.getRecords()) { - assertNotNull(instanceStats.getUris()); - assertNotNull(instanceStats.getHost()); - assertTrue(instanceStats.getPort() > 0); - assertTrue(instanceStats.getDiskQuota() > 0); - assertTrue(instanceStats.getMemQuota() > 0); - assertTrue(instanceStats.getFdsQuota() > 0); - assertTrue(instanceStats.getUptime() > 0); - - InstanceStats.Usage usage = instanceStats.getUsage(); - assertNotNull(usage); - assertTrue(usage.getDisk() > 0); - assertTrue(usage.getMem() > 0); - - assertTimeWithinRange("Usage time should be very recent", usage.getTime().getTime(), FIVE_MINUTES); - } - } - - private void waitForStatsAvailable(String appName, int instanceCount) throws InterruptedException { - // TODO: Make this pattern reusable - ApplicationStats stats = connectedClient.getApplicationStats(appName); - for (int retries = 0; retries < 10 && stats.getRecords().size() < instanceCount; retries++) { - Thread.sleep(1000); - stats = connectedClient.getApplicationStats(appName); - } - - InstanceStats firstInstance = stats.getRecords().get(0); - assertEquals("0", firstInstance.getId()); - for (int retries = 0; retries < 50 && firstInstance.getUsage() == null; retries++) { - Thread.sleep(1000); - stats = connectedClient.getApplicationStats(appName); - firstInstance = stats.getRecords().get(0); - } - } - - @Test - public void getApplicationStatsStoppedApp() throws IOException { - String appName = namespacedAppName("stats2"); - createAndUploadAndStartSimpleSpringApp(appName); - connectedClient.stopApplication(appName); - - ApplicationStats stats = connectedClient.getApplicationStats(appName); - assertTrue(stats.getRecords().isEmpty()); - } - - @Test - public void uploadAppWithNonUnsubscribingCallback() throws IOException { - String appName = namespacedAppName("upload-non-unsubscribing-callback"); - createSpringApplication(appName); - File file = SampleProjects.springTravel(); - NonUnsubscribingUploadStatusCallback callback = new NonUnsubscribingUploadStatusCallback(); - connectedClient.uploadApplication(appName, file, callback); - CloudApplication env = connectedClient.getApplication(appName); - assertEquals(CloudApplication.AppState.STOPPED, env.getState()); - assertTrue(callback.progressCount > 1); // must have taken at least 10 seconds - } - - @Test - public void uploadAppWithUnsubscribingCallback() throws IOException { - String appName = namespacedAppName("upload-unsubscribing-callback"); - createSpringApplication(appName); - File file = SampleProjects.springTravel(); - UnsubscribingUploadStatusCallback callback = new UnsubscribingUploadStatusCallback(); - connectedClient.uploadApplication(appName, file, callback); - CloudApplication env = connectedClient.getApplication(appName); - assertEquals(CloudApplication.AppState.STOPPED, env.getState()); - assertTrue(callback.progressCount == 1); - } - - @Test - public void uploadSinatraApp() throws IOException { - String appName = namespacedAppName("env"); - ClassPathResource cpr = new ClassPathResource("apps/env/"); - File explodedDir = cpr.getFile(); - Staging staging = new Staging(); - createAndUploadExplodedTestApp(appName, explodedDir, staging); - connectedClient.startApplication(appName); - CloudApplication env = connectedClient.getApplication(appName); - assertEquals(CloudApplication.AppState.STARTED, env.getState()); - } - - @Test - public void uploadAppWithNonAsciiFileName() throws IOException { - String appName = namespacedAppName("non-ascii"); - List uris = new ArrayList(); - uris.add(computeAppUrl(appName)); - - File war = SampleProjects.nonAsciFileName(); - List serviceNames = new ArrayList(); - - connectedClient.createApplication(appName, new Staging(), - DEFAULT_MEMORY, uris, serviceNames); - connectedClient.uploadApplication(appName, war.getCanonicalPath()); - - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STOPPED, app.getState()); - - connectedClient.startApplication(appName); - - app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - - connectedClient.deleteApplication(appName); - } - - @Test - public void startExplodedApplication() throws IOException { - String appName = namespacedAppName("exploded_app"); - createAndUploadExplodedSpringTestApp(appName); - connectedClient.startApplication(appName); - CloudApplication app = connectedClient.getApplication(appName); - assertEquals(CloudApplication.AppState.STARTED, app.getState()); - } - - @Test - public void getStacks() throws Exception { - List stacks = connectedClient.getStacks(); - assert(stacks.size() >= 1); - - CloudStack stack = null; - for (CloudStack s : stacks) { - if (DEFAULT_STACK_NAME.equals(s.getName())) { - stack = s; - } - } - assertNotNull(stack); - assertNotNull(stack.getMeta().getGuid()); - assertEquals(DEFAULT_STACK_NAME, stack.getName()); - assertNotNull(stack.getDescription()); - } - - @Test - public void getStack() throws Exception { - CloudStack stack = connectedClient.getStack(DEFAULT_STACK_NAME); - assertNotNull(stack); - assertNotNull(stack.getMeta().getGuid()); - assertEquals(DEFAULT_STACK_NAME, stack.getName()); - assertNotNull(stack.getDescription()); - } - - // - // Files and Log tests - // - - @Test - public void getLogs() throws Exception { - String appName = namespacedAppName("simple_logs"); - createAndUploadAndStartSimpleSpringApp(appName); - boolean pass = getInstanceInfosWithTimeout(appName, 1, true); - assertTrue("Couldn't get the right application state", pass); - - Thread.sleep(10000); // let's have some time to get some logs generated - Map logs = connectedClient.getLogs(appName); - assertNotNull(logs); - assertTrue(logs.size() > 2); - assertNotNull(logs.get("logs/stdout.log")); - assertNotNull(logs.get("logs/env.log")); - } - - @Test - public void streamLogs() throws Exception { - // disable proxy validation for this test, since Loggregator websockets - // connectivity does not currently support proxies - new SocketDestHelper().setAllowedOnCurrentThread(); - - String appName = namespacedAppName("simple_logs"); - CloudApplication app = createAndUploadAndStartSimpleSpringApp(appName); - boolean pass = getInstanceInfosWithTimeout(appName, 1, true); - assertTrue("Couldn't get the right application state", pass); - - List logs = doGetRecentLogs(appName); - - for (int index = 0; index < logs.size() - 1; index++) { - int comparison = logs.get(index).getTimestamp().compareTo(logs.get(index + 1).getTimestamp()); - assertTrue("Logs are not properly sorted", comparison <= 0); - } - - AccumulatingApplicationLogListener testListener = new AccumulatingApplicationLogListener(); - connectedClient.streamLogs(appName, testListener); - String appUri = "http://" + app.getUris().get(0); - RestTemplate appTemplate = new RestTemplate(); - int attempt = 0; - do { - // no need to sleep, visiting the app uri should be sufficient - try { - appTemplate.getForObject(appUri, String.class); - } catch (HttpClientErrorException ex) { - // ignore - } - if (testListener.logs.size() > 0) { - break; - } - Thread.sleep(1000); - } while (attempt++ < 30); - assertTrue("Failed to stream normal log", testListener.logs.size() > 0); - } - - private List doGetRecentLogs(String appName) throws InterruptedException { - int attempt = 0; - do { - List logs = connectedClient.getRecentLogs(appName); - - if (logs.size() > 0) { - return logs; - } - Thread.sleep(1000); - } while (attempt++ < 20); - fail("Failed to see recent logs"); - return null; - } - - @Test - @Ignore("Ignore until the Java buildpack detects app crashes upon OOM correctly") - public void getCrashLogs() throws Exception { - String appName = namespacedAppName("simple_crashlogs"); - createAndUploadSimpleSpringApp(appName); - connectedClient.updateApplicationEnv(appName, Collections.singletonMap("crash", "true")); - connectedClient.startApplication(appName); - - boolean pass = getInstanceInfosWithTimeout(appName, 1, false); - assertTrue("Couldn't get the right application state in 50 tries", pass); - - Map logs = connectedClient.getCrashLogs(appName); - assertNotNull(logs); - assertTrue(logs.size() > 0); - for (String log : logs.keySet()) { - assertNotNull(logs.get(log)); - } - } - - @Test - public void getFile() throws Exception { - String appName = namespacedAppName("simple_getFile"); - createAndUploadAndStartSimpleSpringApp(appName); - boolean running = getInstanceInfosWithTimeout(appName, 1, true); - assertTrue("App failed to start", running); - doGetFile(connectedClient, appName); - } - - @Test - public void openFile() throws Exception { - String appName = namespacedAppName("simple_openFile"); - createAndUploadAndStartSimpleSpringApp(appName); - boolean running = getInstanceInfosWithTimeout(appName, 1, true); - assertTrue("App failed to start", running); - doOpenFile(connectedClient, appName); - } - - // - // Basic Services tests - // - - @Test - public void getServiceOfferings() { - List offerings = connectedClient.getServiceOfferings(); - - assertNotNull(offerings); - assertTrue(offerings.size() >= 2); - - CloudServiceOffering offering = null; - for (CloudServiceOffering so : offerings) { - if (so.getLabel().equals(MYSQL_SERVICE_LABEL)) { - offering = so; - break; - } - } - assertNotNull(offering); - assertEquals(MYSQL_SERVICE_LABEL, offering.getLabel()); - assertNotNull(offering.getCloudServicePlans()); - assertTrue(offering.getCloudServicePlans().size() > 0); - assertNotNull(offering.getName()); - assertNotNull(offering.getDescription()); - assertNotNull(offering.getLabel()); - assertNotNull(offering.getUniqueId()); - assertNotNull(offering.getExtra()); - - CloudServicePlan plan = offering.getCloudServicePlans().get(0); - assertNotNull(plan.getName()); - assertNotNull(plan.getUniqueId()); - assertNotNull(plan.getDescription()); - assertSame(offering, plan.getServiceOffering()); - } - - @Test - public void getCreateDeleteService() throws MalformedURLException { - String serviceName = "mysql-test"; - createMySqlService(serviceName); - - CloudService service = connectedClient.getService(serviceName); - assertNotNull(service); - assertEquals(serviceName, service.getName()); - assertTimeWithinRange("Creation time should be very recent", - service.getMeta().getCreated().getTime(), FIVE_MINUTES); - - connectedClient.deleteService(serviceName); - List services = connectedClient.getServices(); - assertNotNull(services); - assertEquals(0, services.size()); - } - - @Test - public void getServices() { - List expectedServices = Arrays.asList( - createMySqlService("mysql-test"), - createUserProvidedService("user-provided-test"), - createMySqlService("mysql-test2") - ); - - List services = connectedClient.getServices(); - assertNotNull(services); - assertEquals(3, services.size()); - for (CloudService expectedService : expectedServices) { - assertServiceMatching(expectedService, services); - } - } - - @Test - public void getServiceBrokers() { - assumeTrue(CCNG_USER_IS_ADMIN); - - List brokers = connectedClient.getServiceBrokers(); - assertNotNull(brokers); - assertTrue(brokers.size() >= 1); - CloudServiceBroker broker0 = brokers.get(0); - assertNotNull(broker0.getMeta()); - assertNotNull(broker0.getName()); - assertNotNull(broker0.getUrl()); - assertNotNull(broker0.getUsername()); - } - - private void assertServiceMatching(CloudService expectedService, List services) { - for (CloudService service : services) { - if (service.getName().equals(expectedService.getName())) { - assertServicesEqual(expectedService, service); - return; - } - } - fail("No service found matching " + expectedService.getName()); - } - - @Test - public void getService() { - String serviceName = "mysql-test"; - - CloudService expectedService = createMySqlService(serviceName); - CloudService service = connectedClient.getService(serviceName); - - assertNotNull(service); - assertServicesEqual(expectedService, service); - } - - @Test - public void getServiceWithVersionAndProvider() { - String serviceName = "mysql-test-version-provider"; - - CloudService expectedService = createMySqlServiceWithVersionAndProvider(serviceName); - CloudService service = connectedClient.getService(serviceName); - - assertNotNull(service); - assertServicesEqual(expectedService, service); - assertEquals(expectedService.getProvider(), service.getProvider()); - assertEquals(expectedService.getVersion(), service.getVersion()); - } - - @Test - public void getUserProvidedService() { - String serviceName = "user-provided-test-service"; - - CloudService expectedService = createUserProvidedService(serviceName); - CloudService service = connectedClient.getService(serviceName); - - assertNotNull(service); - assertServicesEqual(expectedService, service); - } - - private void assertServicesEqual(CloudService expectedService, CloudService service) { - assertEquals(expectedService.getName(), service.getName()); - assertEquals(expectedService.getLabel(), service.getLabel()); - assertEquals(expectedService.getPlan(), service.getPlan()); - assertEquals(expectedService.isUserProvided(), service.isUserProvided()); - } - - // - // Application and Services tests - // - - @Test - public void createApplicationWithService() throws IOException { - String serviceName = "test_database"; - String appName = createSpringTravelApp("application-with-services", Collections.singletonList(serviceName)); - uploadSpringTravelApp(appName); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app); - assertEquals(appName, app.getName()); - assertNotNull(app.getServices()); - assertEquals(1, app.getServices().size()); - assertEquals(serviceName, app.getServices().get(0)); - } - - @Test - public void deleteServiceThatIsBoundToApp() throws MalformedURLException { - String serviceName = "mysql-del-svc"; - String appName = createSpringTravelApp("del-svc", Collections.singletonList(serviceName)); - - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app.getServices()); - assertEquals(1, app.getServices().size()); - assertEquals(serviceName, app.getServices().get(0)); - - connectedClient.deleteService(serviceName); - } - - @Test - public void updateApplicationService() throws IOException { - String serviceName = "test_database"; - createMySqlService(serviceName); - String appName = createSpringTravelApp("7"); - - connectedClient.updateApplicationServices(appName, Collections.singletonList(serviceName)); - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app.getServices()); - assertTrue(app.getServices().size() > 0); - assertEquals(serviceName, app.getServices().get(0)); - - List emptyList = Collections.emptyList(); - connectedClient.updateApplicationServices(appName, emptyList); - app = connectedClient.getApplication(appName); - assertNotNull(app.getServices()); - assertEquals(emptyList, app.getServices()); - } - - @Test - public void bindAndUnbindService() throws IOException { - String serviceName = "test_database"; - createMySqlService(serviceName); - - String appName = createSpringTravelApp("bind1"); - - CloudApplication app = connectedClient.getApplication(appName); - assertNotNull(app.getServices()); - assertTrue(app.getServices().isEmpty()); - - connectedClient.bindService(appName, serviceName); - - app = connectedClient.getApplication(appName); - assertNotNull(app.getServices()); - assertEquals(1, app.getServices().size()); - assertEquals(serviceName, app.getServices().get(0)); - - connectedClient.unbindService(appName, serviceName); - - app = connectedClient.getApplication(appName); - assertNotNull(app.getServices()); - assertTrue(app.getServices().isEmpty()); - } - - @Test - public void defaultDomainFound() throws Exception { - assertNotNull(connectedClient.getDefaultDomain()); - } - - @Test - public void getDomains() { - connectedClient.addDomain(TEST_DOMAIN); - - List allDomains = connectedClient.getDomains(); - - assertNotNull(getDomainNamed(defaultDomainName, allDomains)); - assertNotNull(getDomainNamed(TEST_DOMAIN, allDomains)); - } - - @Test - public void addAndDeleteDomain() { - connectedClient.addDomain(TEST_DOMAIN); - - assertDomainInList(connectedClient.getPrivateDomains()); - assertDomainInList(connectedClient.getDomainsForOrg()); - - assertDomainNotInList(connectedClient.getSharedDomains()); - - connectedClient.deleteDomain(TEST_DOMAIN); - - assertDomainNotInList(connectedClient.getPrivateDomains()); - assertDomainNotInList(connectedClient.getDomainsForOrg()); - } - - private void assertDomainInList(List domains) { - assertTrue(domains.size() >= 1); - assertNotNull(getDomainNamed(TEST_DOMAIN, domains)); - } - - private void assertDomainNotInList(List domains) { - assertNull(getDomainNamed(TEST_DOMAIN, domains)); - } - - @Test - public void addAndDeleteRoute() { - connectedClient.addDomain(TEST_DOMAIN); - connectedClient.addRoute("my_route1", TEST_DOMAIN); - connectedClient.addRoute("my_route2", TEST_DOMAIN); - - List routes = connectedClient.getRoutes(TEST_DOMAIN); - assertNotNull(getRouteWithHost("my_route1", routes)); - assertNotNull(getRouteWithHost("my_route2", routes)); - - connectedClient.deleteRoute("my_route2", TEST_DOMAIN); - routes = connectedClient.getRoutes(TEST_DOMAIN); - assertNotNull(getRouteWithHost("my_route1", routes)); - assertNull(getRouteWithHost("my_route2", routes)); - - // test that removing domain that has routes throws exception - try { - connectedClient.deleteDomain(TEST_DOMAIN); - fail("should have thrown exception"); - } - catch (IllegalStateException ex) { - assertTrue(ex.getMessage().contains("in use")); - } - } - - @Test - public void appsWithRoutesAreCounted() throws IOException { - String appName = namespacedAppName("my_route3"); - CloudApplication app = createAndUploadSimpleTestApp(appName); - List uris = app.getUris(); - uris.add("my_route3." + TEST_DOMAIN); - connectedClient.addDomain(TEST_DOMAIN); - connectedClient.updateApplicationUris(appName, uris); - - List routes = connectedClient.getRoutes(TEST_DOMAIN); - assertNotNull(getRouteWithHost("my_route3", routes)); - assertEquals(1, getRouteWithHost("my_route3", routes).getAppsUsingRoute()); - assertTrue(getRouteWithHost("my_route3", routes).inUse()); - - List defaultDomainRoutes = connectedClient.getRoutes(defaultDomainName); - assertNotNull(getRouteWithHost(appName, defaultDomainRoutes)); - assertEquals(1, getRouteWithHost(appName, defaultDomainRoutes).getAppsUsingRoute()); - assertTrue(getRouteWithHost(appName, defaultDomainRoutes).inUse()); - } - - - // - // Configuration/Metadata tests - // - - @Test - public void infoAvailableWithoutLoggingIn() throws Exception { - CloudFoundryClient infoClient = new CloudFoundryClient(new URL(CCNG_API_URL), httpProxyConfiguration, CCNG_API_SSL); - CloudInfo info = infoClient.getCloudInfo(); - assertNotNull(info.getName()); - assertNotNull(info.getSupport()); - assertNotNull(info.getBuild()); - assertTrue(info.getUser() == null); - } - - @Test - public void infoForUserAvailable() throws Exception { - CloudInfo info = connectedClient.getCloudInfo(); - - assertNotNull(info.getName()); - assertNotNull(info.getSupport()); - assertNotNull(info.getBuild()); - assertNotNull(info.getSupport()); - assertNotNull(info.getSupport()); - - assertEquals(CCNG_USER_EMAIL, info.getUser()); - assertNotNull(info.getLimits()); - // Just ensure that we got back some sensible values - assertTrue(info.getLimits().getMaxApps() > 0 && info.getLimits().getMaxApps() < 1000); - assertTrue(info.getLimits().getMaxServices() > 0 && info.getLimits().getMaxServices() < 1000); - assertTrue(info.getLimits().getMaxTotalMemory() > 0 && info.getLimits().getMaxTotalMemory() < 100000); - assertTrue(info.getLimits().getMaxUrisPerApp() > 0 && info.getLimits().getMaxUrisPerApp() < 100); - } - - @Test - public void updatePassword() throws MalformedURLException { - // Not working currently - assumeTrue(false); - - String newPassword = "newPass123"; - connectedClient.updatePassword(newPassword); - CloudFoundryClient clientWithChangedPassword = - new CloudFoundryClient(new CloudCredentials(CCNG_USER_EMAIL, newPassword), new URL(CCNG_API_URL), httpProxyConfiguration); - clientWithChangedPassword.login(); - - // Revert - connectedClient.updatePassword(CCNG_USER_PASS); - connectedClient.login(); - } - - @Test - @Ignore("This test takes, by design, at least 10 minutes. Enable this only when dealing with authentication issues " - + "or a change in the client side OAuth implementation") - public void dealingWithExpiredToken() throws Exception { - // The current token expiration time is 10 minutes. If we can still make authenticated calls past that, - // then the transparent token refresh scheme working as expected. - for (int i = 0; i < 30; i++) { - System.out.println("Elapsed time since the last login (at least) " + i/2 + " minutes"); - getServiceOfferings(); - Thread.sleep(30 * 1000); - } - } - - @Test - public void getRestLog() throws IOException { - final List log1 = new ArrayList(); - final List log2 = new ArrayList(); - connectedClient.registerRestLogListener(new RestLogCallback() { - public void onNewLogEntry(RestLogEntry logEntry) { - log1.add(logEntry); - } - }); - RestLogCallback callback2 = new RestLogCallback() { - public void onNewLogEntry(RestLogEntry logEntry) { - log2.add(logEntry); - } - }; - connectedClient.registerRestLogListener(callback2); - getApplications(); - connectedClient.deleteAllApplications(); - connectedClient.deleteAllServices(); - assertTrue(log1.size() > 0); - assertEquals(log1, log2); - connectedClient.unRegisterRestLogListener(callback2); - getApplications(); - connectedClient.deleteAllApplications(); - assertTrue(log1.size() > log2.size()); - } - - @Test - public void getStagingLogs() throws Exception { - String appName = createSpringTravelApp("stagingLogs"); - - File file = SampleProjects.springTravel(); - connectedClient.uploadApplication(appName, file.getCanonicalPath()); - - StartingInfo startingInfo; - String firstLine = null; - int i = 0; - do { - startingInfo = connectedClient.startApplication(appName); - - if (startingInfo != null && startingInfo.getStagingFile() != null) { - int offset = 0; - firstLine = connectedClient - .getStagingLogs(startingInfo, offset); - } - - if (startingInfo != null && startingInfo.getStagingFile() != null - && firstLine != null) { - break; - } else { - connectedClient.stopApplication(appName); - Thread.sleep(10000); - } - } while (++i < 5); - - assertNotNull(startingInfo); - assertNotNull(startingInfo.getStagingFile()); - assertNotNull(firstLine); - assertTrue(firstLine.length() > 0); - } - - @Test - public void quotasAvailable() throws Exception { - List quotas = connectedClient.getQuotas(); - assertNotNull(quotas); - assertTrue(quotas.size() > 0); - } - - @Test - public void CURDQuota() throws Exception{ - boolean flag = true; - - try { - // create quota - CloudQuota cloudQuota = new CloudQuota(null, CCNG_QUOTA_NAME_TEST); - connectedClient.createQuota(cloudQuota); - } catch (CloudFoundryException e) { - if (HttpStatus.FORBIDDEN == e.getStatusCode()) { - flag = false; - } - } - // check if we have right permission - assumeTrue(flag); - CloudQuota afterCreate = connectedClient.getQuotaByName(CCNG_QUOTA_NAME_TEST, true); - assertNotNull(afterCreate); - - - // change quota mem to 10240 - afterCreate.setMemoryLimit(10240); - connectedClient.updateQuota(afterCreate, CCNG_QUOTA_NAME_TEST); - CloudQuota afterUpdate = connectedClient.getQuotaByName(CCNG_QUOTA_NAME_TEST, true); - assertEquals(10240,afterUpdate.getMemoryLimit()); - - // delete the quota - connectedClient.deleteQuota(CCNG_QUOTA_NAME_TEST); - CloudQuota afterDelete = connectedClient.getQuotaByName(CCNG_QUOTA_NAME_TEST, false); - assertNull(afterDelete); - - } - - @Test - public void setQuotaToOrg() throws Exception { - - // get old quota to restore after test - CloudOrganization oldOrg = connectedClient.getOrgByName(CCNG_USER_ORG, - true); - CloudQuota oldQuota = oldOrg.getQuota(); - - - // create and set test_quota to org - CloudQuota cloudQuota = new CloudQuota(null,CCNG_QUOTA_NAME_TEST); - - boolean flag = true; - - try { - // create quota - connectedClient.createQuota(cloudQuota); - } catch (CloudFoundryException e) { - if (HttpStatus.FORBIDDEN == e.getStatusCode()) { - flag = false; - } - } - // check if we have right permission - assumeTrue(flag); - connectedClient.setQuotaToOrg(CCNG_USER_ORG, CCNG_QUOTA_NAME_TEST); - - - // get the binded quota of org - CloudOrganization newOrg = connectedClient.getOrgByName(CCNG_USER_ORG, - true); - CloudQuota newQuota = newOrg.getQuota(); - - // binded quota should be equals to test_quota - assertEquals(CCNG_QUOTA_NAME_TEST, newQuota.getName()); - - // restore org to default quota - connectedClient.setQuotaToOrg(CCNG_USER_ORG, oldQuota.getName()); - connectedClient.deleteQuota(CCNG_QUOTA_NAME_TEST); - - } - - // - // Shared test methods - // - - private boolean getInstanceInfosWithTimeout(String appName, int count, boolean shouldBeRunning) { - if (count > 1) { - connectedClient.updateApplicationInstances(appName, count); - CloudApplication app = connectedClient.getApplication(appName); - assertEquals(count, app.getInstances()); - } - - InstancesInfo instances; - boolean pass = false; - for (int i = 0; i < 50; i++) { - try { - instances = getInstancesWithTimeout(connectedClient, appName); - assertNotNull(instances); - - List infos = instances.getInstances(); - assertEquals(count, infos.size()); - - int passCount = 0; - for (InstanceInfo info : infos) { - if (shouldBeRunning) { - if (InstanceState.RUNNING.equals(info.getState()) || - InstanceState.STARTING.equals(info.getState())) { - passCount++; - } - } else { - if (InstanceState.CRASHED.equals(info.getState()) || - InstanceState.FLAPPING.equals(info.getState())) { - passCount++; - } - } - } - if (passCount == infos.size()) { - pass = true; - break; - } - } catch (CloudFoundryException ex) { - // ignore (we may get this when staging is still ongoing) - } - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - // ignore - } - } - return pass; - } - - private void doOpenFile(CloudFoundryClient client, String appName) throws Exception { - String appDir = "app"; - String fileName = appDir + "/WEB-INF/web.xml"; - String emptyPropertiesFileName = appDir + "/WEB-INF/classes/empty.properties"; - - // File is often not available immediately after starting an app... so - // allow up to 60 seconds wait - for (int i = 0; i < 60; i++) { - try { - client.getFile(appName, 0, fileName); - break; - } catch (HttpServerErrorException ex) { - Thread.sleep(1000); - } - } - // Test open file - - client.openFile(appName, 0, fileName, new ClientHttpResponseCallback() { - - public void onClientHttpResponse(ClientHttpResponse clientHttpResponse) throws IOException { - InputStream in = clientHttpResponse.getBody(); - assertNotNull(in); - byte[] fileContents = IOUtils.toByteArray(in); - assertTrue(fileContents.length > 5); - } - }); - - client.openFile(appName, 0, emptyPropertiesFileName, new ClientHttpResponseCallback() { - - public void onClientHttpResponse(ClientHttpResponse clientHttpResponse) throws IOException { - InputStream in = clientHttpResponse.getBody(); - assertNotNull(in); - byte[] fileContents = IOUtils.toByteArray(in); - assertTrue(fileContents.length == 0); - } - }); - - } - - private void doGetFile(CloudFoundryClient client, String appName) throws Exception { - String appDir = "app"; - String fileName = appDir + "/WEB-INF/web.xml"; - String emptyPropertiesFileName = appDir + "/WEB-INF/classes/empty.properties"; - - // File is often not available immediately after starting an app... so allow up to 60 seconds wait - for (int i = 0; i < 60; i++) { - try { - client.getFile(appName, 0, fileName); - break; - } catch (HttpServerErrorException ex) { - Thread.sleep(1000); - } - } - - // Test downloading full file - String fileContent = client.getFile(appName, 0, fileName); - assertNotNull(fileContent); - assertTrue(fileContent.length() > 5); - - // Test downloading range of file with start and end position - int end = fileContent.length() - 3; - int start = end/2; - String fileContent2 = client.getFile(appName, 0, fileName, start, end); - assertEquals(fileContent.substring(start, end), fileContent2); - - // Test downloading range of file with just start position - String fileContent3 = client.getFile(appName, 0, fileName, start); - assertEquals(fileContent.substring(start), fileContent3); - - // Test downloading range of file with start position and end position exceeding the length - int positionPastEndPosition = fileContent.length() + 999; - String fileContent4 = client.getFile(appName, 0, fileName, start, positionPastEndPosition); - assertEquals(fileContent.substring(start), fileContent4); - - // Test downloading end portion of file with length - int length = fileContent.length() / 2; - String fileContent5 = client.getFileTail(appName, 0, fileName, length); - assertEquals(fileContent.substring(fileContent.length() - length), fileContent5); - - // Test downloading one byte of file with start and end position - String fileContent6 = client.getFile(appName, 0, fileName, start, start + 1); - assertEquals(fileContent.substring(start, start + 1), fileContent6); - assertEquals(1, fileContent6.length()); - - // Test downloading range of file with invalid start position - int invalidStartPosition = fileContent.length() + 999; - try { - client.getFile(appName, 0, fileName, invalidStartPosition); - fail("should have thrown exception"); - } catch (CloudFoundryException e) { - assertTrue(e.getStatusCode().equals(HttpStatus.REQUESTED_RANGE_NOT_SATISFIABLE)); - } - - // Test downloading empty file - String fileContent7 = client.getFile(appName, 0, emptyPropertiesFileName); - assertNull(fileContent7); - - // Test downloading with invalid parameters - should all throw exceptions - try { - client.getFile(appName, 0, fileName, -2); - fail("should have thrown exception"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("start position")); - } - try { - client.getFile(appName, 0, fileName, 10, -2); - fail("should have thrown exception"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("end position")); - } - try { - client.getFile(appName, 0, fileName, 29, 28); - fail("should have thrown exception"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("end position")); - } - try { - client.getFile(appName, 0, fileName, 29, 28); - fail("should have thrown exception"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("29")); - } - try { - client.getFileTail(appName, 0, fileName, 0); - fail("should have thrown exception"); - } catch (IllegalArgumentException e) { - assertTrue(e.getMessage().contains("length")); - } - } - - // - // Helper methods - // - - private CloudApplication createAndUploadSimpleTestApp(String name) throws IOException { - createAndUploadSimpleSpringApp(name); - return connectedClient.getApplication(name); - } - - private String namespacedAppName(String basename) { - return TEST_NAMESPACE + "-" + basename; - } - - private static String defaultNamespace(String email) { - String s; - if(email.contains("@")) { - s = email.substring(0, email.indexOf('@')); - } else { - s = email; - } - return s.replaceAll("\\.", "-").replaceAll("\\+", "-"); - } - - // - // helper methods - // - - private String createSpringTravelApp(String suffix) { - return createSpringTravelApp(suffix, null); - } - - private String createSpringTravelApp(String suffix, List serviceNames) { - String appName = namespacedAppName("travel_test-" + suffix); - createSpringApplication(appName, serviceNames); - return appName; - } - - private CloudApplication uploadSpringTravelApp(String appName) throws IOException { - File file = SampleProjects.springTravel(); - connectedClient.uploadApplication(appName, file.getCanonicalPath()); - return connectedClient.getApplication(appName); - } - - private CloudApplication createAndUploadExplodedSpringTestApp(String appName) - throws IOException { - File explodedDir = SampleProjects.springTravelUnpacked(temporaryFolder); - assertTrue("Expected exploded test app at " + explodedDir.getCanonicalPath(), explodedDir.exists()); - createTestApp(appName, null, new Staging()); - connectedClient.uploadApplication(appName, explodedDir.getCanonicalPath()); - return connectedClient.getApplication(appName); - } - - private CloudApplication createAndUploadAndStartSimpleSpringApp(String appName) throws IOException { - createAndUploadSimpleSpringApp(appName); - connectedClient.startApplication(appName); - return connectedClient.getApplication(appName); - } - - private CloudApplication createAndUploadSimpleSpringApp(String appName) throws IOException { - createSpringApplication(appName); - File war = SampleProjects.simpleSpringApp(); - connectedClient.uploadApplication(appName, war.getCanonicalPath()); - return connectedClient.getApplication(appName); - } - - private CloudApplication createAndUploadExplodedTestApp(String appName, File explodedDir, Staging staging) - throws IOException { - assertTrue("Expected exploded test app at " + explodedDir.getCanonicalPath(), explodedDir.exists()); - createTestApp(appName, null, staging); - connectedClient.uploadApplication(appName, explodedDir.getCanonicalPath()); - return connectedClient.getApplication(appName); - } - - private void createStandaloneRubyTestApp(String appName, List uris, List services) throws IOException { - Staging staging = new Staging("ruby simple.rb", null); - File file = SampleProjects.standaloneRuby(); - connectedClient.createApplication(appName, staging, 128, uris, services); - connectedClient.uploadApplication(appName, file.getCanonicalPath()); - } - - private void createSpringApplication(String appName) { - createTestApp(appName, null, new Staging()); - } - - private void createSpringApplication(String appName, List serviceNames) { - createTestApp(appName, serviceNames, new Staging()); - } - - private void createSpringApplication(String appName, String buildpackUrl) { - createTestApp(appName, null, new Staging(null, buildpackUrl)); - } - - private void createSpringApplication(String appName, String stack, Integer healthCheckTimeout) { - createTestApp(appName, null, new Staging(null, null, stack, healthCheckTimeout)); - } - - private void createTestApp(String appName, List serviceNames, Staging staging) { - List uris = new ArrayList(); - uris.add(computeAppUrl(appName)); - if (serviceNames != null) { - for (String serviceName : serviceNames) { - createMySqlService(serviceName); - } - } - connectedClient.createApplication(appName, staging, - DEFAULT_MEMORY, - uris, serviceNames); - } - - private CloudService createMySqlServiceWithVersionAndProvider(String serviceName) { - CloudServiceOffering databaseServiceOffering = getCloudServiceOffering(MYSQL_SERVICE_LABEL); - - CloudService service = new CloudService(CloudEntity.Meta.defaultMeta(), serviceName); - service.setProvider(databaseServiceOffering.getProvider()); - service.setLabel(databaseServiceOffering.getLabel()); - service.setVersion(databaseServiceOffering.getVersion()); - service.setPlan(MYSQL_SERVICE_PLAN); - - connectedClient.createService(service); - - return service; - } - - private CloudService createMySqlService(String serviceName) { - CloudService service = new CloudService(CloudEntity.Meta.defaultMeta(), serviceName); - service.setLabel(MYSQL_SERVICE_LABEL); - service.setPlan(MYSQL_SERVICE_PLAN); - - connectedClient.createService(service); - - return service; - } - - private CloudService createUserProvidedService(String serviceName) { - CloudService service = new CloudService(CloudEntity.Meta.defaultMeta(), serviceName); - - Map credentials = new HashMap(); - credentials.put("host", "example.com"); - credentials.put("port", 1234); - credentials.put("user", "me"); - - connectedClient.createUserProvidedService(service, credentials); - - return service; - } - - private CloudServiceOffering getCloudServiceOffering(String label) { - List serviceOfferings = connectedClient.getServiceOfferings(); - for (CloudServiceOffering so : serviceOfferings) { - if (so.getLabel().equals(label)) { - return so; - } - } - throw new IllegalStateException("No CloudServiceOffering found with label " + label + "."); - } - - private InstancesInfo getInstancesWithTimeout(CloudFoundryClient client, String appName) { - long start = System.currentTimeMillis(); - while (true) { - try { - Thread.sleep(2000); - } catch (InterruptedException e1) { - // ignore - } - - final InstancesInfo applicationInstances = client.getApplicationInstances(appName); - if (applicationInstances != null) { - return applicationInstances; - } - - if (System.currentTimeMillis() - start > STARTUP_TIMEOUT) { - fail("Timed out waiting for startup"); - break; // for the compiler - } - } - - return null; // for the compiler - } - - private void clearTestDomainAndRoutes() { - CloudDomain domain = getDomainNamed(TEST_DOMAIN, connectedClient.getDomains()); - if (domain != null) { - List routes = connectedClient.getRoutes(domain.getName()); - for (CloudRoute route : routes) { - connectedClient.deleteRoute(route.getHost(), route.getDomain().getName()); - } - connectedClient.deleteDomain(domain.getName()); - } - } - - private CloudRoute getRouteWithHost(String hostName, List routes) { - for (CloudRoute route : routes) { - if (route.getHost().equals(hostName)) { - return route; - } - } - return null; - } - - private CloudDomain getDomainNamed(String domainName, List domains) { - for (CloudDomain domain : domains) { - if (domain.getName().equals(domainName)) { - return domain; - } - } - return null; - } - - private String computeAppUrl(String appName) { - return appName + "." + defaultDomainName; - } - - private String computeAppUrlNoProtocol(String appName) { - return computeAppUrl(appName); - } - - private void assertTimeWithinRange(String message, long actual, int timeTolerance) { - // Allow more time deviations due to local clock being out of sync with cloud - assertTrue(message, - Math.abs(System.currentTimeMillis() - actual) < timeTolerance); - } - - private static abstract class NoOpUploadStatusCallback implements UploadStatusCallback { - public void onCheckResources() { - } - - public void onMatchedFileNames(Set matchedFileNames) { - } - - public void onProcessMatchedResources(int length) { - } - } - - private static class NonUnsubscribingUploadStatusCallback extends NoOpUploadStatusCallback { - public int progressCount = 0; - - public boolean onProgress(String status) { - progressCount++; - return false; - } - } - - private static class UnsubscribingUploadStatusCallback extends NoOpUploadStatusCallback { - public int progressCount = 0; - - public boolean onProgress(String status) { - progressCount++; - // unsubscribe after the first report - return progressCount == 1; - } - } - - private class AccumulatingApplicationLogListener implements ApplicationLogListener { - private List logs = new ArrayList(); - - public void onMessage(ApplicationLog log) { - logs.add(log); - } - - public void onError(Throwable exception) { - fail(exception.getMessage()); - } - - public void onComplete() { - } - - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudResourcesTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudResourcesTest.java deleted file mode 100644 index f799a4a998a..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudResourcesTest.java +++ /dev/null @@ -1,109 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Collections; -import java.util.HashSet; -import java.util.Iterator; -import java.util.List; -import java.util.Set; -import java.util.zip.ZipFile; - -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.archive.ZipApplicationArchive; -import org.cloudfoundry.client.lib.domain.CloudResource; -import org.cloudfoundry.client.lib.domain.CloudResources; -import org.codehaus.jackson.JsonParseException; -import org.codehaus.jackson.map.JsonMappingException; -import org.codehaus.jackson.map.ObjectMapper; -import org.junit.Test; - -/** - * Tests for {@link org.cloudfoundry.client.lib.domain.CloudResources}. - * - * @author Phillip Webb - */ -public class CloudResourcesTest { - - private static final String SHA = "677E1B9BCA206D6534054348511BF41129744839"; - - private static final String JSON = "[{\"size\":93,\"sha1\":\"" + SHA + "\",\"fn\":\"index.html\"}]"; - - private ObjectMapper mapper = new ObjectMapper(); - - @Test - public void shouldSerialize() throws Exception { - CloudResource r = new CloudResource("index.html", 93L, SHA); - CloudResources o = new CloudResources(Collections.singleton(r)); - String s = mapper.writeValueAsString(o); - assertThat(s, is(equalTo(JSON))); - } - - @Test - public void shouldDeserialize() throws JsonParseException, JsonMappingException, IOException { - CloudResources o = mapper.readValue(JSON, CloudResources.class); - List l = o.asList(); - assertThat(l.size(), is(1)); - CloudResource r = l.get(0); - assertThat(r.getFilename(), is("index.html")); - assertThat(r.getSha1(), is(SHA)); - assertThat(r.getSize(), is(93L)); - } - - @Test - public void shouldCreateFromIterator() throws Exception { - Iterator i = Collections.singleton(new CloudResource("index.html", 93L, SHA)).iterator(); - CloudResources o = new CloudResources(i); - List l = o.asList(); - assertThat(l.size(), is(1)); - CloudResource r = l.get(0); - assertThat(r.getFilename(), is("index.html")); - assertThat(r.getSha1(), is(SHA)); - assertThat(r.getSize(), is(93L)); - } - - @Test - public void shouldGetFromArchive() throws Exception { - ZipFile zipFile = new ZipFile(SampleProjects.springTravel()); - try { - ApplicationArchive archive = new ZipApplicationArchive(zipFile); - CloudResources o = new CloudResources(archive); - List l = o.asList(); - assertThat(l.size(), is(96)); - assertThat(l.get(0).getFilename(), is("index.html")); - } finally { - zipFile.close(); - } - } - - @Test - public void shouldGetFilenames() throws Exception { - List resources = new ArrayList(); - resources.add(new CloudResource("1", 93L, SHA)); - resources.add(new CloudResource("2", 93L, SHA)); - CloudResources o = new CloudResources(resources); - Set expected = new HashSet(Arrays.asList("1", "2")); - assertThat(o.getFilenames(), is(expected)); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudVersions.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudVersions.java deleted file mode 100644 index 4b52777249f..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/CloudVersions.java +++ /dev/null @@ -1,17 +0,0 @@ -package org.cloudfoundry.client.lib; - -import java.lang.annotation.ElementType; -import java.lang.annotation.Retention; -import java.lang.annotation.RetentionPolicy; -import java.lang.annotation.Target; - -/** - * Annotation used for disabling tests for versions not specified - * - * @author: trisberg - */ -@Retention(RetentionPolicy.RUNTIME) -@Target(ElementType.TYPE) -public @interface CloudVersions { - String[] value(); -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/PortAvailability.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/PortAvailability.java deleted file mode 100644 index ca2ad93a8e3..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/PortAvailability.java +++ /dev/null @@ -1,63 +0,0 @@ -package org.cloudfoundry.client.lib; - - -import java.io.IOException; -import java.net.DatagramSocket; -import java.net.ServerSocket; -import java.util.logging.Level; -import java.util.logging.Logger; - - -/** - * Utility class used within the InJvm http proxy tests - * copied from https://github.com/TheLadders/embedded-test-jetty - */ -public final class PortAvailability { - private static final Logger LOGGER = Logger.getLogger(PortAvailability.class.getName()); - - - /** - * Checks to see if a specific port is available. - * - * @param port the port to check for availability - */ - /* - * Slightly adapted from Apache MINA (took out min/max port check) - */ - public static boolean available(int port) { - ServerSocket ss = null; - DatagramSocket ds = null; - try { - ss = new ServerSocket(port); - ds = new DatagramSocket(port); - ss.setReuseAddress(true); - ds.setReuseAddress(true); - return true; - } catch (IOException e) { - LOGGER.log(Level.FINE, "Error checking port availability", e); - } finally { - close(ss); - close(ds); - } - - return false; - } - - - private static void close(DatagramSocket ds) { - if (ds != null) { - ds.close(); - } - } - - - private static void close(ServerSocket ss) { - if (ss != null) { - try { - ss.close(); - } catch (IOException e) { - LOGGER.log(Level.WARNING, "Error closing socket", e); - } - } - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/SampleProjects.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/SampleProjects.java deleted file mode 100644 index fe43520138c..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/SampleProjects.java +++ /dev/null @@ -1,161 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import static org.junit.Assert.assertTrue; - -import java.io.File; -import java.io.FileOutputStream; -import java.io.IOException; -import java.util.Enumeration; -import java.util.zip.ZipEntry; -import java.util.zip.ZipFile; - -import org.apache.commons.io.FileUtils; -import org.junit.Rule; -import org.junit.rules.TemporaryFolder; -import org.springframework.core.io.ClassPathResource; -import org.springframework.util.FileCopyUtils; - -/** - * Provides access to sample projects. - * - * @author Ramnivas Laddad - * @author A.B.Srinivasan - * @author Phillip Webb - * @author Jennifer Hickey - */ -public class SampleProjects { - - private static final String TEST_APP_DIR = "src/test/resources/apps"; - - /** - * Returns the spring travel MVC reference application. - * - * @return the spring travel reference WAR file - * @throws IOException - */ - public static File springTravel() throws IOException { - File file = new File(TEST_APP_DIR + "/travelapp/swf-booking-mvc.war"); - assertTrue("Expected test app at " + file.getCanonicalPath(), file.exists()); - return file; - } - - /** - * Returns a simple spring application. - * - * @return the simple-spring-app WAR file - * @throws IOException - */ - public static File simpleSpringApp() throws IOException { - ClassPathResource cpr = new ClassPathResource("simple-spring-app.war"); - File file = cpr.getFile(); - assertTrue("Expected test app at " + file.getCanonicalPath(), file.exists()); - return file; - } - - /** - * Returns a bad spring application that will cause crashes. - * - * @return the bad-spring-app WAR file - * @throws IOException - */ - public static File badSpringApp() throws IOException { - ClassPathResource cpr = new ClassPathResource("bad-spring-app.war"); - File file = cpr.getFile(); - assertTrue("Expected test app at " + file.getCanonicalPath(), file.exists()); - return file; - } - - /** - * Returns a spring application using a file with a non-ascii name. - * - * @return the non-ascii-file-name WAR file - * @throws IOException - */ - public static File nonAsciFileName() throws IOException { - ClassPathResource cpr = new ClassPathResource("non-ascii-file-name.war"); - File file = cpr.getFile(); - assertTrue("Expected test app at " + file.getCanonicalPath(), file.exists()); - return file; - } - - /** - * - * @return The directory containing a simple standalone Ruby script - * @throws IOException - */ - public static File standaloneRuby() throws IOException { - File file = new File(TEST_APP_DIR + "/standalone-ruby-app"); - assertTrue("Expected test app at " + file.getCanonicalPath(), file.exists()); - return file; - } - - /** - * - * @return The directory containign a simple standalone Node app - * @throws IOException - */ - public static File standaloneNode() throws IOException { - File file = new File(TEST_APP_DIR + "/standalone-node-app"); - assertTrue("Expected test app at " + file.getCanonicalPath(), file.exists()); - return file; - } - - /** - * Returns the spring travel MVC reference application in an exploded directory. - * - * @param temporaryFolder a {@link TemporaryFolder} {@link Rule} used to create folders - * @return the spring travel reference exploded files - * @throws IOException - */ - public static File springTravelUnpacked(TemporaryFolder temporaryFolder) throws IOException { - return explodeTestApp(springTravel(), temporaryFolder); - } - - private static File explodeTestApp(File file, TemporaryFolder temporaryFolder) throws IOException { - File unpackDir = temporaryFolder.newFolder(file.getName()); - if (unpackDir.exists()) { - FileUtils.forceDelete(unpackDir); - } - unpackDir.mkdir(); - ZipFile zipFile = new ZipFile(file); - try { - unpackZip(zipFile, unpackDir); - } finally { - zipFile.close(); - } - return unpackDir; - } - - private static void unpackZip(ZipFile zipFile, File unpackDir) throws IOException { - Enumeration entries = zipFile.entries(); - while (entries.hasMoreElements()) { - ZipEntry entry = entries.nextElement(); - File destination = new File(unpackDir.getAbsolutePath() + "/" + entry.getName()); - if (entry.isDirectory()) { - destination.mkdirs(); - } else { - destination.getParentFile().mkdirs(); - FileCopyUtils.copy(zipFile.getInputStream(entry), new FileOutputStream(destination)); - } - if (entry.getTime() != -1) { - destination.setLastModified(entry.getTime()); - } - } - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/SocketDestHelper.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/SocketDestHelper.java deleted file mode 100644 index fd20acf3728..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/SocketDestHelper.java +++ /dev/null @@ -1,131 +0,0 @@ -package org.cloudfoundry.client.lib; - -import java.io.IOException; -import java.net.InetAddress; -import java.net.InetSocketAddress; -import java.net.SocketAddress; -import java.net.UnknownHostException; -import java.util.Collections; -import java.util.HashSet; -import java.util.Set; -import java.util.concurrent.atomic.AtomicBoolean; - - -/** - * Byteman helper which rejects Sockets on non jetty threads that do not target the local http proxy. - * Calls to this class are dynamically injected into JDK java.net.Socket bytecode by byteman. - */ -public class SocketDestHelper { - - private static final ThreadLocal isSocketRestrictingOnlyLocalHost = new ThreadLocal(); - - private static final Set installedRules = Collections.synchronizedSet(new HashSet()); - private static final AtomicBoolean isActivated = new AtomicBoolean(false); - - - //Byteman API - - public static void activated() { - logDebugTrace("SocketDestHelper activated"); - isActivated.set(true); - } - public static void installed(String ruleName) { - logDebugTrace("SocketDestHelper installed:" + ruleName); - installedRules.add(ruleName); - - } - public static void uninstalled(String ruleName) { - logDebugTrace("SocketDestHelper uninstalled:" + ruleName); - installedRules.remove(ruleName); - } - - public static void deactivated() { - logDebugTrace("SocketDestHelper deactivated"); - isActivated.set(false); - } - - // accessors the checking rules are activates - - public static Set getInstalledRules() { - return installedRules; - } - - public static boolean isActivated() { - return isActivated.get(); - } - - public static boolean isSocketRestrictionFlagActive() { - return isSocketRestrictingOnlyLocalHost.get(); - } - - public void setForbiddenOnCurrentThread() { - isSocketRestrictingOnlyLocalHost.set(true); - } - - public void setAllowedOnCurrentThread() { - isSocketRestrictingOnlyLocalHost.set(false); - } - - //helper methods for byteman rules - - public void alwaysThrowException() throws IOException { - IOException ioe = new IOException("always throws IOE"); - printStackTrace(ioe); - throw ioe; - } - - public void throwExceptionIfForbidden(String host, int port) throws IOException { - logDebugTrace("throwExceptionIfForbidden(host=" + host + " port=" + port + ") with isSocketRestrictingOnlyLocalHost=" + isSocketRestrictingOnlyLocalHost.get()); - Boolean flag = isSocketRestrictingOnlyLocalHost.get(); - if (flag != null && flag.booleanValue()) { - InetAddress inetAddress; - //Trying to resolve host to check if this resolves to loopback where is started - InetAddress loopBack = InetAddress.getByAddress(new byte[]{127, 0, 0, 1}); - try { - inetAddress = InetAddress.getByName(host); - } catch (UnknownHostException e) { - //Unable to resolve host, unlikely to be loopback - inetAddress = null; - } - if (inetAddress == null || ! inetAddress.equals(loopBack)) { - IOException ioe = new IOException("detected direct socket connect while tests expect them to go through proxy instead: Only jetty proxy threads should go through external hosts, got:host=" + host + " port=" + port); - printStackTrace(ioe); - throw ioe; - } - } - } - - - public void throwExceptionIfForbidden(SocketAddress address) throws IOException { - if (address instanceof InetSocketAddress) { - InetSocketAddress inetAddress = (InetSocketAddress) address; - throwExceptionIfForbidden(inetAddress); - } - } - - public void throwExceptionIfForbidden(InetAddress inetAddress, int port) throws IOException { - throwExceptionIfForbidden(inetAddress.getHostName(), port); - } - - public void throwExceptionIfForbidden(InetSocketAddress inetAddress) throws IOException { - throwExceptionIfForbidden(inetAddress.getHostName(), inetAddress.getPort()); - } - public void throwExceptionIfForbidden(InetSocketAddress inetAddress, int port) throws IOException { - throwExceptionIfForbidden(inetAddress.getHostName(), port); - } - private static void logDebugTrace(String msg) { - //until cloud-foundry-client-lib embed a logging library (slf4j ?), for debugging tests just change this flag - if (false) { - System.out.println(msg); - System.out.flush(); - } - } - - private static void printStackTrace(IOException ioe) { - if (false) { - ioe.printStackTrace(); - } - } - - -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/UploadApplicationPayloadHttpMessageConverterTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/UploadApplicationPayloadHttpMessageConverterTest.java deleted file mode 100644 index f6b4377358e..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/UploadApplicationPayloadHttpMessageConverterTest.java +++ /dev/null @@ -1,93 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; -import static org.mockito.BDDMockito.given; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.verify; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.util.List; - -import org.cloudfoundry.client.lib.domain.UploadApplicationPayload; -import org.cloudfoundry.client.lib.util.UploadApplicationPayloadHttpMessageConverter; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.springframework.core.io.Resource; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpInputMessage; -import org.springframework.http.HttpOutputMessage; -import org.springframework.http.MediaType; - -/** - * Tests for {@link org.cloudfoundry.client.lib.util.UploadApplicationPayloadHttpMessageConverter}. - * - * @author Phillip Webb - */ -public class UploadApplicationPayloadHttpMessageConverterTest { - - private static final byte[] CONTENT = new byte[] { 0x00, 0x01 }; - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - private UploadApplicationPayloadHttpMessageConverter converter = new UploadApplicationPayloadHttpMessageConverter(); - - @Test - public void cannotRead() throws Exception { - assertThat(converter.canRead(UploadApplicationPayload.class, MediaType.APPLICATION_OCTET_STREAM), is(false)); - } - - @Test - public void canWrite() throws Exception { - assertThat(converter.canWrite(Resource.class, MediaType.APPLICATION_OCTET_STREAM), is(false)); - assertThat(converter.canWrite(UploadApplicationPayload.class, MediaType.APPLICATION_OCTET_STREAM), is(true)); - } - - @Test - public void shouldSupportAllMediaTypes() throws Exception { - List supportedMediaTypes = converter.getSupportedMediaTypes(); - assertThat(supportedMediaTypes.size(), is(1)); - assertThat(supportedMediaTypes.get(0), is(MediaType.ALL)); - } - - @Test - public void shouldNotRead() throws Exception { - thrown.expect(UnsupportedOperationException.class); - converter.read(UploadApplicationPayload.class, mock(HttpInputMessage.class)); - } - - @Test - public void shouldWrite() throws Exception { - UploadApplicationPayload payload = mock(UploadApplicationPayload.class); - given(payload.getInputStream()).willReturn(new ByteArrayInputStream(CONTENT)); - HttpOutputMessage outputMessage = mock(HttpOutputMessage.class); - HttpHeaders headers = mock(HttpHeaders.class); - given(outputMessage.getHeaders()).willReturn(headers); - ByteArrayOutputStream out = new ByteArrayOutputStream(); - given(outputMessage.getBody()).willReturn(out); - converter.write(payload, null, outputMessage); - verify(headers).setContentType(MediaType.APPLICATION_OCTET_STREAM); - assertThat(out.toByteArray(), is(equalTo(CONTENT))); - } - -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/UploadApplicationPayloadTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/UploadApplicationPayloadTest.java deleted file mode 100644 index bc7dee777e4..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/UploadApplicationPayloadTest.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib; - -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.util.ArrayList; -import java.util.List; -import java.util.zip.ZipFile; - -import org.cloudfoundry.client.lib.archive.ApplicationArchive; -import org.cloudfoundry.client.lib.archive.ZipApplicationArchive; -import org.cloudfoundry.client.lib.domain.CloudResource; -import org.cloudfoundry.client.lib.domain.CloudResources; -import org.cloudfoundry.client.lib.domain.UploadApplicationPayload; -import org.junit.Test; -import org.springframework.util.FileCopyUtils; - -/** - * Tests for {@link org.cloudfoundry.client.lib.domain.UploadApplicationPayload}. - * - * @author Phillip Webb - */ -public class UploadApplicationPayloadTest { - - @Test - public void shouldPackOnlyMissingResources() throws Exception { - ZipFile zipFile = new ZipFile(SampleProjects.springTravel()); - try { - ApplicationArchive archive = new ZipApplicationArchive(zipFile); - CloudResources allResources = new CloudResources(archive); - List resources = new ArrayList(allResources.asList()); - resources.remove(0); - CloudResources knownRemoteResources = new CloudResources(resources); - UploadApplicationPayload payload = new UploadApplicationPayload(archive, knownRemoteResources); - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - FileCopyUtils.copy(payload.getInputStream(), bos); - assertThat(payload.getArchive(), is(archive)); - assertThat(payload.getTotalUncompressedSize(), is(93)); - assertThat(bos.toByteArray().length, is(2451)); - } finally { - zipFile.close(); - } - } - -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/AbstractApplicationArchiveTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/AbstractApplicationArchiveTest.java deleted file mode 100644 index 102f30cab6e..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/AbstractApplicationArchiveTest.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.hamcrest.Matchers.notNullValue; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.math.BigInteger; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.zip.ZipEntry; -import java.util.zip.ZipException; -import java.util.zip.ZipFile; - -import org.cloudfoundry.client.lib.SampleProjects; -import org.cloudfoundry.client.lib.archive.ApplicationArchive.Entry; -import org.junit.After; -import org.junit.Before; -import org.junit.Ignore; -import org.junit.Test; -import org.springframework.util.FileCopyUtils; - -/** - * Abstract base class for {@link ApplicationArchive} tests. All tests are based against - * {@link SampleProjects#springTravel()}. - * - * @see ZipApplicationArchiveTest - * @see DirectoryApplicationArchiveTest - * - * @author Phillip Webb - */ -public abstract class AbstractApplicationArchiveTest { - - private ZipFile zipFile; - - private ApplicationArchive archive; - - private HashMap archiveEntries; - - @Before - public void setup() throws ZipException, IOException { - this.zipFile = new ZipFile(SampleProjects.springTravel()); - this.archive = newApplicationArchive(zipFile); - this.archiveEntries = new HashMap(); - for (ApplicationArchive.Entry entry : archive.getEntries()) { - archiveEntries.put(entry.getName(), entry); - } - } - - /** - * Factory method used to create a new {@link ApplicationArchive}. - * - * @param fileFile the zip file used for comparisons - * @return the archive - * @throws IOException - */ - protected abstract ApplicationArchive newApplicationArchive(ZipFile fileFile) throws IOException; - - @After - public void tearDown() throws IOException { - zipFile.close(); - } - - @Test - @Ignore - public void shouldAdaptEntries() throws Exception { - Enumeration zipEntries = zipFile.entries(); - while (zipEntries.hasMoreElements()) { - ZipEntry zipEntry = zipEntries.nextElement(); - ApplicationArchive.Entry archiveEntry = archiveEntries.remove(zipEntry.getName()); - assertThat(archiveEntry, is(notNullValue())); - assertThat(archiveEntry.getSize(), is(zipEntry.getSize())); - assertThat(archiveEntry.isDirectory(), is(zipEntry.isDirectory())); - } - assertThat(archiveEntries.size(), is(0)); - } - - @Test - public void shouldGetNameFromZipFileNameWithoutPath() throws Exception { - assertThat(archive.getFilename(), is("swf-booking-mvc.war")); - } - - @Test - public void shouldCalculateSha1() throws Exception { - byte[] digest = archiveEntries.get("index.html").getSha1Digest(); - String digestString = String.format("%x", new BigInteger(digest)); - assertThat(digestString, is("677e1b9bca206d6534054348511bf41129744839")); - } - - @Test - public void shouldBeAbleToGetInputStreamTwice() throws Exception { - Entry entry = archiveEntries.get("index.html"); - ByteArrayOutputStream s1 = new ByteArrayOutputStream(); - FileCopyUtils.copy(entry.getInputStream(), s1); - ByteArrayOutputStream s2 = new ByteArrayOutputStream(); - FileCopyUtils.copy(entry.getInputStream(), s2); - assertThat(s1.toByteArray().length, is(93)); - assertThat(s2.toByteArray().length, is(93)); - assertThat(s1.toByteArray(), is(equalTo(s2.toByteArray()))); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/DirectoryApplicationArchiveTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/DirectoryApplicationArchiveTest.java deleted file mode 100644 index 151d6eebcb1..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/DirectoryApplicationArchiveTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import java.io.IOException; -import java.util.zip.ZipFile; - -import org.cloudfoundry.client.lib.SampleProjects; -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.junit.rules.TemporaryFolder; - -/** - * Tests for {@link DirectoryApplicationArchive}. - * - * @author Phillip Webb - */ -public class DirectoryApplicationArchiveTest extends AbstractApplicationArchiveTest { - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Rule - public TemporaryFolder temporaryFolder = new TemporaryFolder(); - - @Override - protected ApplicationArchive newApplicationArchive(ZipFile fileFile) throws IOException { - return new DirectoryApplicationArchive(SampleProjects.springTravelUnpacked(temporaryFolder)); - } - - @Test - public void shouldNeedNonNullFolder() throws Exception { - thrown.expect(IllegalArgumentException.class); - thrown.expectMessage("Directory must not be null"); - new DirectoryApplicationArchive(null); - } - - @Test - public void shouldNeedFileThatIsADirectory() throws Exception { - thrown.expect(IllegalArgumentException.class); - thrown.expectMessage("File must reference a directory"); - new DirectoryApplicationArchive(temporaryFolder.newFile("noadirectory")); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/ZipApplicationArchiveTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/ZipApplicationArchiveTest.java deleted file mode 100644 index b97f633a084..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/archive/ZipApplicationArchiveTest.java +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.archive; - -import java.util.zip.ZipFile; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; - -/** - * Tests for {@link ZipApplicationArchive}. - * - * @author Phillip Webb - */ -public class ZipApplicationArchiveTest extends AbstractApplicationArchiveTest { - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - @Test - public void shouldNeedFile() throws Exception { - thrown.expect(IllegalArgumentException.class); - thrown.expectMessage("ZipFile must not be null"); - new ZipApplicationArchive(null); - } - - @Override - protected ApplicationArchive newApplicationArchive(ZipFile zipFile) { - return new ZipApplicationArchive(zipFile); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/domain/CloudApplicationTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/domain/CloudApplicationTest.java deleted file mode 100644 index 749853b37fb..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/domain/CloudApplicationTest.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.cloudfoundry.client.lib.domain; - -import static org.hamcrest.MatcherAssert.assertThat; -import static org.hamcrest.core.Is.is; -import static org.hamcrest.core.IsNull.nullValue; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.Map; - -import org.junit.Test; - -public class CloudApplicationTest { - @Test - public void testGetEnvAsMap() { - Map attributes = new HashMap(); - attributes.put("env", Arrays.asList("ENV1=VAL1", "ENV2=", "ENV3")); - attributes.put("instances", 1); - attributes.put("name", "Test1"); - attributes.put("state", CloudApplication.AppState.STOPPED.name()); - - CloudApplication cloudApplication = new CloudApplication(attributes); - - Map envMap = cloudApplication.getEnvAsMap(); - assertThat(envMap.size(), is(3)); - assertThat(envMap.get("ENV1"), is("VAL1")); - assertThat(envMap.get("ENV2"), is(nullValue())); - assertThat(envMap.get("ENV3"), is(nullValue())); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/domain/CloudServiceOfferingTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/domain/CloudServiceOfferingTest.java deleted file mode 100644 index 9ef1ab1cf39..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/domain/CloudServiceOfferingTest.java +++ /dev/null @@ -1,98 +0,0 @@ -package org.cloudfoundry.client.lib.domain; - -import org.junit.Assert; -import org.junit.Test; - -public class CloudServiceOfferingTest { - @Test - public void testConstructorNameOnly() { - CloudServiceOffering offering = new CloudServiceOffering( - CloudEntity.Meta.defaultMeta(), ""); - - Assert.assertEquals("", offering.getName()); - Assert.assertEquals("", offering.getLabel()); - Assert.assertNull(offering.getDescription()); - Assert.assertNull(offering.getProvider()); - Assert.assertNull(offering.getVersion()); - Assert.assertFalse(offering.isActive()); - Assert.assertFalse(offering.isBindable()); - Assert.assertNull(offering.getUrl()); - Assert.assertNull(offering.getInfoUrl()); - Assert.assertNull(offering.getUniqueId()); - Assert.assertNull(offering.getExtra()); - Assert.assertNull(offering.getDocumentationUrl()); - Assert.assertTrue(offering.getCloudServicePlans().isEmpty()); - } - - @Test - public void testConstructorMinimal() { - CloudServiceOffering offering = new CloudServiceOffering( - CloudEntity.Meta.defaultMeta(), "", "", ""); - - Assert.assertEquals("", offering.getName()); - Assert.assertEquals("", offering.getLabel()); - Assert.assertNull(offering.getDescription()); - Assert.assertEquals("", offering.getProvider()); - Assert.assertEquals("", offering.getVersion()); - Assert.assertFalse(offering.isActive()); - Assert.assertFalse(offering.isBindable()); - Assert.assertNull(offering.getUrl()); - Assert.assertNull(offering.getInfoUrl()); - Assert.assertNull(offering.getUniqueId()); - Assert.assertNull(offering.getExtra()); - Assert.assertNull(offering.getDocumentationUrl()); - Assert.assertTrue(offering.getCloudServicePlans().isEmpty()); - } - - @Test - public void testConstructorFull() { - CloudServiceOffering offering = new CloudServiceOffering( - CloudEntity.Meta.defaultMeta(), - "", - "", - "", - "", - true, - true, - "", - "", - "", - "", - "" - ); - - Assert.assertEquals("", offering.getName()); - Assert.assertEquals("", offering.getLabel()); - Assert.assertEquals("", offering.getDescription()); - Assert.assertEquals("", offering.getProvider()); - Assert.assertEquals("", offering.getVersion()); - Assert.assertTrue(offering.isActive()); - Assert.assertTrue(offering.isBindable()); - Assert.assertEquals("", offering.getUrl()); - Assert.assertEquals("", offering.getInfoUrl()); - Assert.assertEquals("", offering.getUniqueId()); - Assert.assertEquals("", offering.getExtra()); - Assert.assertEquals("", offering.getDocumentationUrl()); - Assert.assertTrue(offering.getCloudServicePlans().isEmpty()); - } - - @Test - public void testAddCloudServicePlan() { - CloudServiceOffering offering = new CloudServiceOffering( - CloudEntity.Meta.defaultMeta(), ""); - - Assert.assertTrue(offering.getCloudServicePlans().isEmpty()); - - CloudServicePlan plan0 = new CloudServicePlan(); - CloudServicePlan plan1 = new CloudServicePlan(); - CloudServicePlan plan2 = new CloudServicePlan(); - offering.addCloudServicePlan(plan0); - offering.addCloudServicePlan(plan1); - offering.addCloudServicePlan(plan2); - - Assert.assertEquals(3, offering.getCloudServicePlans().size()); - Assert.assertEquals(plan0, offering.getCloudServicePlans().get(0)); - Assert.assertEquals(plan1, offering.getCloudServicePlans().get(1)); - Assert.assertEquals(plan2, offering.getCloudServicePlans().get(2)); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/io/DynamicInputStreamTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/io/DynamicInputStreamTest.java deleted file mode 100644 index 6bfc9e808e4..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/io/DynamicInputStreamTest.java +++ /dev/null @@ -1,144 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.io; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayOutputStream; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; - -import org.junit.Rule; -import org.junit.Test; -import org.junit.rules.ExpectedException; -import org.springframework.util.FileCopyUtils; - -/** - * Tests for {@link DynamicInputStream}. - * - * @author Phillip Webb - */ -public class DynamicInputStreamTest { - - @Rule - public ExpectedException thrown = ExpectedException.none(); - - private List writes = new ArrayList(); - - private int index = 0; - - private int numberOfWriteMoreDataCalls; - - private DynamicInputStream inputStream = new DynamicInputStream() { - - @Override - protected boolean writeMoreData() throws IOException { - numberOfWriteMoreDataCalls++; - if (index >= writes.size()) { - return false; - } - getOutputStream().write(writes.get(index)); - index++; - return (index < writes.size()); - } - }; - - private void mockWrite(byte[] data) { - this.writes.add(data); - } - - @Test - public void shouldReadSingleByteWhenAvailable() throws Exception { - mockWrite(new byte[] { -1 }); - assertThat(inputStream.read(), is(0x00FF)); - assertThat(inputStream.read(), is(-1)); - } - - @Test - public void shouldNotReadSingleByteWhenNotAvailable() throws Exception { - assertThat(inputStream.read(), is(-1)); - } - - @Test - public void shouldNeedByteArray() throws Exception { - thrown.expect(NullPointerException.class); - inputStream.read(null, 0, 0); - } - - @Test - public void shouldNeedOffsetMoreThanZero() throws Exception { - thrown.expect(IndexOutOfBoundsException.class); - inputStream.read(new byte[] { 0x00 }, -1, 1); - } - - @Test - public void shouldNeedLengthMoreThanZero() throws Exception { - thrown.expect(IndexOutOfBoundsException.class); - inputStream.read(new byte[] { 0x00 }, 0, -1); - } - - @Test - public void shouldNeedLengthLessThanOrEqualToAvailableBuffer() throws Exception { - thrown.expect(IndexOutOfBoundsException.class); - inputStream.read(new byte[] { 0x00 }, 0, 2); - } - - @Test - public void shouldSupportSingleWriteMoreDataCall() throws Exception { - mockWrite(new byte[] {0x00,0x01}); - byte[] b = readBytes(); - assertThat(b,is(equalTo(new byte[] {0x00,0x01}))); - assertThat(numberOfWriteMoreDataCalls, is(2)); - } - - @Test - public void shouldSupportMultipleWriteMoreDataCalls() throws Exception { - mockWrite(new byte[] {0x00,0x01}); - mockWrite(new byte[] {0x02,0x03}); - byte[] b = readBytes(); - assertThat(b,is(equalTo(new byte[] {0x00,0x01,0x02,0x03}))); - assertThat(numberOfWriteMoreDataCalls, is(3)); - - } - - @Test - public void shouldSupportCallThatWritesNoData() throws Exception { - mockWrite(new byte[] {0x00,0x01}); - mockWrite(new byte[] {}); - mockWrite(new byte[] {0x02,0x03}); - mockWrite(new byte[] {}); - byte[] b = readBytes(); - assertThat(b,is(equalTo(new byte[] {0x00,0x01,0x02,0x03}))); - assertThat(numberOfWriteMoreDataCalls, is(4)); - } - - @Test - public void shouldSupportZeroByteRead() throws Exception { - byte[] b = new byte[1]; - int l = inputStream.read(b, 0, 0); - assertThat(l, is(0)); - } - - private byte[] readBytes() throws IOException { - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - FileCopyUtils.copy(inputStream, bos); - return bos.toByteArray(); - } -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/io/DynamicZipInputStreamTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/io/DynamicZipInputStreamTest.java deleted file mode 100644 index a6814973c5e..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/io/DynamicZipInputStreamTest.java +++ /dev/null @@ -1,99 +0,0 @@ -/* - * Copyright 2009-2011 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.client.lib.io; - -import static org.hamcrest.Matchers.equalTo; -import static org.hamcrest.Matchers.is; -import static org.junit.Assert.assertThat; - -import java.io.ByteArrayInputStream; -import java.io.ByteArrayOutputStream; -import java.io.InputStream; -import java.security.SecureRandom; -import java.util.ArrayList; -import java.util.List; -import java.util.zip.ZipEntry; -import java.util.zip.ZipOutputStream; - -import org.cloudfoundry.client.lib.io.DynamicZipInputStream.Entry; -import org.junit.Test; -import org.springframework.util.FileCopyUtils; - -/** - * Tests for {@link DynamicZipInputStream}. - * - * @author Phillip Webb - */ -public class DynamicZipInputStreamTest { - - private static final SecureRandom RANDOM = new SecureRandom(); - - @Test - public void shouldCreateValidZipContent() throws Exception { - - byte[] f1 = newRandomBytes(10000); - byte[] f2 = newRandomBytes(10000); - - ByteArrayOutputStream bos = new ByteArrayOutputStream(); - ZipOutputStream zipOutputStream = new ZipOutputStream(bos); - zipOutputStream.putNextEntry(new ZipEntry("a/b/c")); - zipOutputStream.write(f1); - zipOutputStream.closeEntry(); - zipOutputStream.putNextEntry(new ZipEntry("a/b/c/d/")); - zipOutputStream.closeEntry(); - zipOutputStream.putNextEntry(new ZipEntry("d/e/f")); - zipOutputStream.write(f2); - zipOutputStream.closeEntry(); - zipOutputStream.flush(); - zipOutputStream.close(); - byte[] expected = bos.toByteArray(); - - List entries = new ArrayList(); - entries.add(newEntry("a/b/c", f1)); - entries.add(newEntry("a/b/c/d/", null)); - entries.add(newEntry("d/e/f", f2)); - DynamicZipInputStream inputStream = new DynamicZipInputStream(entries); - bos.reset(); - FileCopyUtils.copy(inputStream, bos); - byte[] actual = bos.toByteArray(); - - assertThat(actual, is(equalTo(expected))); - } - - private Entry newEntry(final String name, final byte[] content) { - return new Entry() { - - public String getName() { - return name; - } - - public InputStream getInputStream() { - if (content == null) { - return null; - } - return new ByteArrayInputStream(content); - } - }; - } - - private byte[] newRandomBytes(int len) { - byte[] bytes = new byte[len]; - RANDOM.nextBytes(bytes); - return bytes; - } - -} diff --git a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/rest/CloudControllerClientImplTest.java b/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/rest/CloudControllerClientImplTest.java deleted file mode 100644 index 43622ae5e67..00000000000 --- a/cloudfoundry-client-lib/src/test/java/org/cloudfoundry/client/lib/rest/CloudControllerClientImplTest.java +++ /dev/null @@ -1,85 +0,0 @@ -package org.cloudfoundry.client.lib.rest; - -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.HttpProxyConfiguration; -import org.cloudfoundry.client.lib.oauth2.OauthClient; -import org.cloudfoundry.client.lib.util.RestUtil; -import org.junit.Assert; -import org.junit.Before; -import org.junit.Test; -import org.junit.runner.RunWith; -import org.mockito.Mock; -import org.springframework.http.client.ClientHttpRequestFactory; -import org.springframework.web.client.RestTemplate; - -import java.net.URL; -import java.util.*; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.when; - -@RunWith(org.mockito.runners.MockitoJUnitRunner.class) -public class CloudControllerClientImplTest { - - private static final String CCNG_API_URL = System.getProperty("ccng.target", "http://api.run.pivotal.io"); - private static final String CCNG_USER_EMAIL = System.getProperty("ccng.email", "java-authenticatedClient-test-user@vmware.com"); - private static final String CCNG_USER_PASS = System.getProperty("ccng.passwd"); - private static final String CCNG_USER_ORG = System.getProperty("ccng.org", "gopivotal.com"); - private static final String CCNG_USER_SPACE = System.getProperty("ccng.space", "test"); - - @Mock - private RestUtil restUtil; - @Mock - private RestTemplate restTemplate; - @Mock - private ClientHttpRequestFactory clientHttpRequestFactory; - @Mock - private OauthClient oauthClient; - @Mock - private LoggregatorClient loggregatorClient; - - private CloudControllerClientImpl controllerClient; - - /** - * Failed attempt to instantiate CloudControllerClientImpl with existing constructors. Just here to illustrate the - * need to move the initialize() method out of the constructor. - */ - public void setUpWithNonEmptyConstructorWithoutLuck() throws Exception { - restUtil = mock(RestUtil.class); - when(restUtil.createRestTemplate(any(HttpProxyConfiguration.class), false)).thenReturn(restTemplate); - when(restUtil.createOauthClient(any(URL.class), any(HttpProxyConfiguration.class), false)).thenReturn(oauthClient); - when(restTemplate.getRequestFactory()).thenReturn(clientHttpRequestFactory); - - restUtil.createRestTemplate(null, false); - restUtil.createOauthClient(new URL(CCNG_API_URL), null, false); - - controllerClient = new CloudControllerClientImpl(new URL("http://api.dummyendpoint.com/login"), - restTemplate, oauthClient, loggregatorClient, - new CloudCredentials(CCNG_USER_EMAIL, CCNG_USER_PASS), - CCNG_USER_ORG, CCNG_USER_SPACE); - } - - @Before - public void setUpWithEmptyConstructor() throws Exception { - controllerClient = new CloudControllerClientImpl(); - } - - @Test - public void extractUriInfo_selects_most_specific_subdomain() throws Exception { - //given - String uri = "myhost.sub1.sub2.domain.com"; - Map domains = new LinkedHashMap(); //Since impl iterates key, need to control iteration order with a LinkedHashMap - domains.put("domain.com", UUID.randomUUID()); - domains.put("sub1.sub2.domain.com", UUID.randomUUID()); - Map uriInfo = new HashMap(2); - - //when - controllerClient.extractUriInfo(domains, uri, uriInfo); - - //then - Assert.assertEquals(domains.get("sub1.sub2.domain.com"), domains.get(uriInfo.get("domainName"))); - Assert.assertEquals("myhost", uriInfo.get("host")); - } - -} diff --git a/cloudfoundry-client-lib/src/test/resources/apps/env/Gemfile b/cloudfoundry-client-lib/src/test/resources/apps/env/Gemfile deleted file mode 100644 index 81a2138682e..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/env/Gemfile +++ /dev/null @@ -1,4 +0,0 @@ -source "http://rubygems.org" - -gem "thin" -gem "sinatra" diff --git a/cloudfoundry-client-lib/src/test/resources/apps/env/Gemfile.lock b/cloudfoundry-client-lib/src/test/resources/apps/env/Gemfile.lock deleted file mode 100644 index 2465a887a47..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/env/Gemfile.lock +++ /dev/null @@ -1,24 +0,0 @@ -GEM - remote: http://rubygems.org/ - specs: - daemons (1.1.4) - eventmachine (0.12.10) - rack (1.3.5) - rack-protection (1.1.4) - rack - sinatra (1.3.1) - rack (~> 1.3, >= 1.3.4) - rack-protection (~> 1.1, >= 1.1.2) - tilt (~> 1.3, >= 1.3.3) - thin (1.3.1) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) - tilt (1.3.3) - -PLATFORMS - ruby - -DEPENDENCIES - sinatra - thin diff --git a/cloudfoundry-client-lib/src/test/resources/apps/env/env.rb b/cloudfoundry-client-lib/src/test/resources/apps/env/env.rb deleted file mode 100644 index 4849e27362d..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/env/env.rb +++ /dev/null @@ -1,16 +0,0 @@ -require 'rubygems' -require 'sinatra' - -get '/' do - host = ENV['VCAP_APP_HOST'] - port = ENV['VCAP_APP_PORT'] - "

Hello from the Cloud! via: #{host}:#{port}

" -end - -get '/env' do - res = '' - ENV.each do |k, v| - res << "#{k}: #{v}
" - end - res -end diff --git a/cloudfoundry-client-lib/src/test/resources/apps/standalone-node-app/app.js b/cloudfoundry-client-lib/src/test/resources/apps/standalone-node-app/app.js deleted file mode 100644 index 56eba825bdd..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/standalone-node-app/app.js +++ /dev/null @@ -1,14 +0,0 @@ -var http = require('http'); -var url = require('url'); - -HOST = null; - -var host = process.env.VCAP_APP_HOST || 'localhost'; -var port = process.env.VCAP_APP_PORT || 3000 - -http.createServer(function (req, res) { - res.writeHead(200, {'Content-Type': 'text/html'}); - res.end('running version ' + process.version); -}).listen(port, null); - -console.log('Server running at http://' + host + ':' + port + '/'); diff --git a/cloudfoundry-client-lib/src/test/resources/apps/standalone-node-app/package.json b/cloudfoundry-client-lib/src/test/resources/apps/standalone-node-app/package.json deleted file mode 100644 index 19151125df4..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/standalone-node-app/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "standalone-node-app", - "version": "0.0.1", - "dependencies": { - "cf-autoconfig": "*" - }, - "engines": { - "node": "0.8.x" - } -} diff --git a/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/Gemfile b/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/Gemfile deleted file mode 100644 index 20b4d4aebec..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/Gemfile +++ /dev/null @@ -1 +0,0 @@ -source 'https://rubygems.org' diff --git a/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/Gemfile.lock b/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/Gemfile.lock deleted file mode 100644 index fe80d204c65..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/Gemfile.lock +++ /dev/null @@ -1,8 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - -PLATFORMS - ruby - -DEPENDENCIES diff --git a/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/simple.rb b/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/simple.rb deleted file mode 100644 index 8c3ef438b29..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/apps/standalone-ruby-app/simple.rb +++ /dev/null @@ -1,10 +0,0 @@ -if RUBY_VERSION =~ /\A1.8/ - print "running version 1.8" -elsif RUBY_VERSION =~ /\A1.9/ - print "running version 1.9" -else - print "unexpected ruby version #{RUBY_VERSION}" -end -loop { - sleep 100 -} diff --git a/cloudfoundry-client-lib/src/test/resources/apps/travelapp/swf-booking-mvc.war b/cloudfoundry-client-lib/src/test/resources/apps/travelapp/swf-booking-mvc.war deleted file mode 100644 index f7f59423e19..00000000000 Binary files a/cloudfoundry-client-lib/src/test/resources/apps/travelapp/swf-booking-mvc.war and /dev/null differ diff --git a/cloudfoundry-client-lib/src/test/resources/log4j.properties b/cloudfoundry-client-lib/src/test/resources/log4j.properties deleted file mode 100644 index 2a7906c5e4d..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/log4j.properties +++ /dev/null @@ -1,12 +0,0 @@ -log4j.rootCategory=INFO, stdout - -log4j.appender.stdout=org.apache.log4j.ConsoleAppender -log4j.appender.stdout.layout=org.apache.log4j.PatternLayout -log4j.appender.stdout.layout.ConversionPattern=%d %p [%C %M] - <%m>%n - -log4j.category.org.springframework.web.client.RestTemplate=ERROR -log4j.category.org.cloudfoundry.client.lib.rest.LoggingRestTemplate=ERROR -log4j.logger.httpclient.wire=ERROR -log4j.logger.httpclient.wire.content=ERROR - -log4j.logger.CF_REST=TRACE diff --git a/cloudfoundry-client-lib/src/test/resources/trace.btm b/cloudfoundry-client-lib/src/test/resources/trace.btm deleted file mode 100644 index 4d23f42ad5f..00000000000 --- a/cloudfoundry-client-lib/src/test/resources/trace.btm +++ /dev/null @@ -1,81 +0,0 @@ -# See detailed doc at http://downloads.jboss.org/byteman/2.1.3/ProgrammersGuideSinglePage.2.1.3.1.html -# The ^ prefix attached to the class name tells the agent that the rule should apply to implementations of finalize defined either by class Object or by any class which extends Object. This prefix can also be used with interface rules, requiring the agent to inject the rule code into methods of classes which implement the interface and also into overriding methods on subclasses of the implementing classes. - -RULE 1- Socket. (String , int , InetAddress, int) -CLASS ^java.net.Socket -METHOD (String , int , InetAddress, int) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1, $2) -ENDRULE - -RULE 2- Socket. (SocketAddress , SocketAddress, boolean ) -CLASS ^java.net.Socket -METHOD (SocketAddress , SocketAddress, boolean ) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1) -ENDRULE - -RULE 3- java.net.Socket.connect(SocketAddress) -CLASS ^java.net.Socket -METHOD connect(SocketAddress) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1) -ENDRULE - - - -# Broken because of byteman bug https://issues.jboss.org/browse/BYTEMAN-216 -# RULE 2c- throw IOException socket opening -# CLASS ^java.net.Socket -# METHOD connect(SocketAddress, int ) -# HELPER org.cloudfoundry.client.lib.SocketDestHelper -# IF TRUE -# DO alwaysThrowException()"), //throwExceptionIfForbidden($1) -# ENDRULE - -RULE 4- java.net.SocketFactory.createSocket(InetAddress , int ) -CLASS ^javax.net.SocketFactory -METHOD createSocket(InetAddress, int ) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1, $2) -ENDRULE - -RULE 5- javax.net.SocketFactory.createSocket(InetAddress , int , InetAddress , int ) -CLASS ^javax.net.SocketFactory -METHOD createSocket(InetAddress , int , InetAddress , int ) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1, $2) -ENDRULE - -RULE 6- javax.net.SocketFactory.createSocket(InetAddress , int ) -CLASS ^javax.net.SocketFactory -METHOD createSocket(String, int ) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1, $2) -ENDRULE - -RULE 7- java.net.SocketFactory.createSocket(InetAddress , int ) -CLASS ^javax.net.SocketFactory -METHOD createSocket(String ,int , InetAddress, int ) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($1, $2) -ENDRULE - -#org.apache.http.conn.ssl.SSLSocketFactory makes use of Socket.connect(string, int) which can't be instrumented, see rule 2c -RULE 8- org.apache.http.conn.scheme.connectSocket( final Socket socket, final InetSocketAddress remoteAddress, final InetSocketAddress localAddress, final HttpParams params) -INTERFACE ^org.apache.http.conn.scheme.SocketFactory -METHOD connectSocket( Socket , InetSocketAddress , InetSocketAddress , HttpParams ) -HELPER org.cloudfoundry.client.lib.SocketDestHelper -IF TRUE -DO throwExceptionIfForbidden($2) -ENDRULE - - -# connectSocket( final Socket socket, final InetSocketAddress remoteAddress, final InetSocketAddress localAddress, final HttpParams params) diff --git a/cloudfoundry-client-reactor/pom.xml b/cloudfoundry-client-reactor/pom.xml new file mode 100644 index 00000000000..2d0931852c4 --- /dev/null +++ b/cloudfoundry-client-reactor/pom.xml @@ -0,0 +1,194 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + cloudfoundry-client-reactor + Cloud Foundry Java Client - Reactor Implementation + jar + + + + ch.qos.logback + logback-classic + test + + + com.fasterxml.jackson.core + jackson-databind + + + com.fasterxml.jackson.datatype + jackson-datatype-jdk8 + + + com.github.zafarkhaja + java-semver + + + com.squareup.okhttp3 + mockwebserver3-junit5 + test + 5.0.0-alpha.11 + + + io.jsonwebtoken + jjwt-api + + + io.jsonwebtoken + jjwt-impl + runtime + + + io.jsonwebtoken + jjwt-jackson + runtime + + + io.projectreactor + reactor-test + test + + + io.projectreactor.netty + reactor-netty + + + jakarta.annotation + jakarta.annotation-api + 2.1.1 + + + org.springframework.boot + spring-boot-starter-test + test + + + org.assertj + assertj-core + test + + + org.cloudfoundry + cloudfoundry-client + ${project.version} + + + org.cloudfoundry + cloudfoundry-util + ${project.version} + + + org.immutables + value + provided + + + org.mockito + mockito-core + test + + + org.slf4j + jcl-over-slf4j + + + org.slf4j + slf4j-api + + + org.springframework + spring-core + + + org.springframework + spring-web + + + org.springframework + spring-aop + + + org.springframework + spring-beans + + + org.springframework + spring-context + + + + + org.springframework.boot + spring-boot-starter-logging + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.cloudfoundry.client.reactor + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + -missing + org.cloudfoundry.reactor.client.*,org.cloudfoundry.reactor.doppler.*,org.cloudfoundry.reactor.uaa.*,org.cloudfoundry.reactor.util + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/AbstractPayloadCachingRootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/AbstractPayloadCachingRootProvider.java new file mode 100644 index 00000000000..e185a80ab71 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/AbstractPayloadCachingRootProvider.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +abstract class AbstractPayloadCachingRootProvider extends AbstractRootProvider { + + private final ConcurrentMap>> payloads = + new ConcurrentHashMap<>(1); + + protected abstract Mono> doGetPayload(ConnectionContext connectionContext); + + @Override + protected final Mono doGetRoot(String key, ConnectionContext connectionContext) { + return this.payloads + .computeIfAbsent(connectionContext, this::getPayload) + .map( + payload -> { + if (!payload.containsKey(key)) { + throw new IllegalArgumentException( + String.format("Payload does not contain key '%s;", key)); + } + + return normalize(UriComponentsBuilder.fromUriString(payload.get(key))); + }); + } + + abstract ObjectMapper getObjectMapper(); + + private Mono> getPayload(ConnectionContext connectionContext) { + Mono> cached = doGetPayload(connectionContext); + + return connectionContext.getCacheDuration().map(cached::cache).orElseGet(cached::cache); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/AbstractRootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/AbstractRootProvider.java new file mode 100644 index 00000000000..d718cd3f05a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/AbstractRootProvider.java @@ -0,0 +1,141 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import io.netty.handler.codec.http.HttpHeaders; +import java.util.Optional; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.cloudfoundry.reactor.util.JsonCodec; +import org.cloudfoundry.reactor.util.Operator; +import org.cloudfoundry.reactor.util.OperatorContext; +import org.cloudfoundry.reactor.util.UserAgent; +import org.immutables.value.Value; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; + +/** + * An abstract implementation of {@link RootProvider} that ensures that returned values are trusted (if configured) and cached. + */ +abstract class AbstractRootProvider implements RootProvider { + + private static final int DEFAULT_PORT = 443; + + private static final Pattern HOSTNAME_PATTERN = Pattern.compile("^[a-zA-Z0-9-.]+$"); + + private static final int UNDEFINED_PORT = -1; + + @Value.Check + public final void checkForValidApiHost() { + Matcher matcher = HOSTNAME_PATTERN.matcher(getApiHost()); + + if (!matcher.matches()) { + throw new IllegalArgumentException( + String.format( + "API hostname %s is not correctly formatted (e.g." + + " 'api.local.pcfdev.io')", + getApiHost())); + } + } + + public Mono createOperator(ConnectionContext connectionContext) { + HttpClient httpClient = connectionContext.getHttpClient(); + return getRoot(connectionContext) + .map(root -> OperatorContext.of(connectionContext, root)) + .map(operatorContext -> new Operator(operatorContext, httpClient)) + .map(operator -> operator.headers(this::addHeaders)); + } + + /** + * The hostname of the API root. Typically something like {@code api.run.pivotal.io}. + */ + public abstract String getApiHost(); + + @Override + public final Mono getRoot(String key, ConnectionContext connectionContext) { + Mono cached = + doGetRoot(key, connectionContext) + .delayUntil(uri -> trust(uri.getHost(), uri.getPort(), connectionContext)) + .map(UriComponents::toUriString); + + return connectionContext.getCacheDuration().map(cached::cache).orElseGet(cached::cache); + } + + @Override + public final Mono getRoot(ConnectionContext connectionContext) { + Mono cached = + doGetRoot(connectionContext) + .delayUntil(uri -> trust(uri.getHost(), uri.getPort(), connectionContext)) + .map(UriComponents::toUriString); + + return connectionContext.getCacheDuration().map(cached::cache).orElseGet(cached::cache); + } + + protected abstract Mono doGetRoot(ConnectionContext connectionContext); + + protected abstract Mono doGetRoot( + String key, ConnectionContext connectionContext); + + protected final UriComponents getRoot() { + UriComponentsBuilder builder = + UriComponentsBuilder.newInstance().scheme("https").host(getApiHost()); + getPort().ifPresent(builder::port); + + return normalize(builder); + } + + protected final UriComponents normalize(UriComponentsBuilder builder) { + UriComponents components = builder.build(); + + builder.scheme(getScheme()); + + if (UNDEFINED_PORT == components.getPort()) { + builder.port(getPort().orElse(DEFAULT_PORT)); + } + + return builder.build().encode(); + } + + /** + * The port for the Cloud Foundry instance. Defaults to {@code 443}. + */ + abstract Optional getPort(); + + /** + * Whether the connection to the root API should be secure (i.e. using HTTPS). Defaults to {@code true}. + */ + abstract Optional getSecure(); + + private void addHeaders(HttpHeaders httpHeaders) { + UserAgent.setUserAgent(httpHeaders); + JsonCodec.setDecodeHeaders(httpHeaders); + } + + private String getScheme() { + if (getSecure().orElse(true)) { + return "https"; + } else { + return "http"; + } + } + + private Mono trust(String host, int port, ConnectionContext connectionContext) { + return connectionContext.trust(host, port); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/ConnectionContext.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/ConnectionContext.java new file mode 100644 index 00000000000..4c90f669f77 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/ConnectionContext.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.Optional; +import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; + +/** + * Common, reusable, connection context + */ +public interface ConnectionContext { + + /** + * The duration that stable responses like the payload of the API root should be cached + */ + Optional getCacheDuration(); + + /** + * The {@link HttpClient} to use + */ + HttpClient getHttpClient(); + + /** + * The number of retries after an unsuccessful request + */ + Long getInvalidTokenRetries(); + + /** + * The {@link ObjectMapper} to use + */ + ObjectMapper getObjectMapper(); + + /** + * The {@link RootProvider} to use + */ + RootProvider getRootProvider(); + + /** + * Attempt to explicitly trust the TLS certificate of an endpoint. Implementations can choose whether any actual trusting will happen. + * + * @param host the host of the endpoint to trust + * @param port the port of the endpoint to trust + */ + Mono trust(String host, int port); +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/RootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/RootProvider.java new file mode 100644 index 00000000000..05ce06ad3c6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/RootProvider.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import reactor.core.publisher.Mono; + +/** + * Common, reusable, provider of root URIs + */ +public interface RootProvider { + + /** + * The normalized API root + * + * @param connectionContext a {@link ConnectionContext} to be used if the root needs to be retrieved via a network request + * @return the normalized API root + */ + Mono getRoot(ConnectionContext connectionContext); + + /** + * The normalized root for a given key + * + * @param key the key to look up root from + * @param connectionContext a {@link ConnectionContext} to be used if the roo needs to be retrieved via a network request + * @return the normalized API root + */ + Mono getRoot(String key, ConnectionContext connectionContext); +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/TokenProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/TokenProvider.java new file mode 100644 index 00000000000..33611cd5730 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/TokenProvider.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import reactor.core.publisher.Mono; + +/** + * A provider that adds the {@code Authorization} header to requests + */ +public interface TokenProvider { + + /** + * Provides an OAuth token to be used by requests + * + * @param connectionContext A {@link ConnectionContext} to be used if a token needs to be retrieved via a network request + * @return an OAuth token + */ + Mono getToken(ConnectionContext connectionContext); + + /** + * Called when a {@code 401 UNAUTHORIZED} is received as part of a request. Since not all {@link TokenProvider}s care about this possibility, the default implementation does nothing. + * Implementations are free to manage internal state with this call if they choose to. + * + * @param connectionContext A {@link ConnectionContext} to be used to identity which connection the tokens should be invalidated for + */ + default void invalidate(ConnectionContext connectionContext) {} +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java new file mode 100644 index 00000000000..0aea075c6f2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DefaultConnectionContext.java @@ -0,0 +1,322 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.DeserializationFeature; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler; +import com.fasterxml.jackson.datatype.jdk8.Jdk8Module; +import io.netty.buffer.PooledByteBufAllocator; +import io.netty.handler.logging.LogLevel; +import io.netty.handler.ssl.SslContextBuilder; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.reactor.util.ByteBufAllocatorMetricProviderWrapper; +import org.cloudfoundry.reactor.util.DefaultSslCertificateTruster; +import org.cloudfoundry.reactor.util.SslCertificateTruster; +import org.cloudfoundry.reactor.util.StaticTrustManagerFactory; +import org.immutables.value.Value; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; +import reactor.netty.resources.ConnectionProvider; +import reactor.netty.resources.LoopResources; +import reactor.netty.tcp.SslProvider; + +import jakarta.annotation.PostConstruct; +import jakarta.annotation.PreDestroy; +import javax.management.JMException; +import javax.management.MalformedObjectNameException; +import javax.management.ObjectName; +import javax.net.ssl.SSLException; +import javax.net.ssl.TrustManagerFactory; +import java.lang.management.ManagementFactory; +import java.time.Duration; +import java.util.List; +import java.util.Optional; +import java.util.function.UnaryOperator; + +import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; +import static io.netty.channel.ChannelOption.CONNECT_TIMEOUT_MILLIS; +import static io.netty.channel.ChannelOption.SO_KEEPALIVE; +import static io.netty.channel.ChannelOption.SO_RCVBUF; +import static io.netty.channel.ChannelOption.SO_SNDBUF; + +/** + * The default implementation of the {@link ConnectionContext} interface. This is the implementation that should be used for most non-testing cases. + */ +@Value.Immutable +abstract class _DefaultConnectionContext implements ConnectionContext { + + private static final int DEFAULT_PORT = 443; + + private static final int SEND_RECEIVE_BUFFER_SIZE = 10 * 1024 * 1024; + + private final Logger logger = LoggerFactory.getLogger("cloudfoundry-client"); + + /** + * Disposes resources created to service this connection context + */ + @PreDestroy + public final void dispose() { + getConnectionProvider().ifPresent(ConnectionProvider::dispose); + getThreadPool().dispose(); + + try { + ObjectName name = getByteBufAllocatorObjectName(); + + if (ManagementFactory.getPlatformMBeanServer().isRegistered(name)) { + ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); + } + } catch (JMException e) { + this.logger.error("Unable to register ByteBufAllocator MBean", e); + } + } + + @Override + public abstract Optional getCacheDuration(); + + /** + * The number of connections to use when processing requests and responses. Setting this to {@code null} disables connection pooling. + */ + @Nullable + @Value.Default + public Integer getConnectionPoolSize() { + return ConnectionProvider.DEFAULT_POOL_MAX_CONNECTIONS; + } + + @Override + @Value.Default + public HttpClient getHttpClient() { + HttpClient client = configureHttpClient(createHttpClient().compress(true) + .secure(this::configureSsl)); + + return getAdditionalHttpClientConfiguration().map(configuration -> configuration.apply(client)) + .orElse(client); + } + + @Override + @Value.Default + public Long getInvalidTokenRetries() { + return 5L; + } + + @Override + @Value.Default + public ObjectMapper getObjectMapper() { + ObjectMapper objectMapper = new ObjectMapper().disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) + .enable(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + .registerModule(new Jdk8Module()) + .setSerializationInclusion(NON_NULL); + + getProblemHandlers().forEach(objectMapper::addHandler); + + return objectMapper; + } + + @Override + @Value.Default + public RootProvider getRootProvider() { + return DelegatingRootProvider.builder() + .apiHost(getApiHost()) + .objectMapper(getObjectMapper()) + .port(getPort()) + .secure(getSecure()) + .build(); + } + + /** + * The number of worker threads to use when processing requests and responses + */ + @Value.Default + public Integer getThreadPoolSize() { + return LoopResources.DEFAULT_IO_WORKER_COUNT; + } + + @Override + public Mono trust(String host, int port) { + return getSslCertificateTruster() + .map(t -> t.trust(host, port, Duration.ofSeconds(30))) + .orElse(Mono.empty()); + } + + /** + * Additional configuration for the underlying HttpClient + */ + abstract Optional> getAdditionalHttpClientConfiguration(); + + /** + * The hostname of the API root. Typically something like {@code api.run.pivotal.io}. + */ + abstract String getApiHost(); + + /** + * The {@code CONNECT_TIMEOUT_MILLIS} value + */ + abstract Optional getConnectTimeout(); + + @Value.Derived + Optional getConnectionProvider() { + ConnectionProvider.Builder builder = ConnectionProvider.builder("cloudfoundry-client"); + + return Optional.ofNullable(getConnectionPoolSize()) + .map(connectionPoolSize -> builder.maxConnections(connectionPoolSize) + .pendingAcquireMaxCount(-1) + .build()); + } + + /** + * The {@code SO_KEEPALIVE} value + */ + abstract Optional getKeepAlive(); + + /** + * The port for the Cloud Foundry instance. Defaults to {@code 443}. + */ + abstract Optional getPort(); + + /** + * Jackson deserialization problem handlers. Typically only used for testing. + */ + abstract List getProblemHandlers(); + + /** + * The (optional) proxy configuration + */ + abstract Optional getProxyConfiguration(); + + /** + * Whether the connection to the root API should be secure (i.e. using HTTPS). Defaults to {@code true}. + */ + abstract Optional getSecure(); + + /** + * Whether to skip SSL certificate validation for all hosts reachable from the API host. Defaults to {@code false}. + */ + abstract Optional getSkipSslValidation(); + + @Value.Derived + Optional getSslCertificateTruster() { + if (getSkipSslValidation().orElse(false)) { + return Optional.of(new DefaultSslCertificateTruster(getProxyConfiguration(), getThreadPool())); + } else { + return Optional.empty(); + } + } + + /** + * The timeout for the SSL close notify flush + */ + abstract Optional getSslCloseNotifyFlushTimeout(); + + /** + * THe timeout for the SSL close notify read + */ + abstract Optional getSslCloseNotifyReadTimeout(); + + /** + * The timeout for the SSL handshake negotiation + */ + abstract Optional getSslHandshakeTimeout(); + + @Value.Derived + LoopResources getThreadPool() { + return LoopResources.create("cloudfoundry-client", getThreadPoolSize(), true); + } + + @PostConstruct + void monitorByteBufAllocator() { + try { + ObjectName name = getByteBufAllocatorObjectName(); + + if (ManagementFactory.getPlatformMBeanServer().isRegistered(name)) { + this.logger.warn("MBean '{}' is already registered and will be removed. You should only have a single DefaultConnectionContext per endpoint.", name); + ManagementFactory.getPlatformMBeanServer().unregisterMBean(name); + } + + ManagementFactory.getPlatformMBeanServer().registerMBean(new ByteBufAllocatorMetricProviderWrapper(PooledByteBufAllocator.DEFAULT), name); + } catch (JMException e) { + this.logger.error("Unable to register ByteBufAllocator MBean", e); + } + } + + private HttpClient configureConnectTimeout(HttpClient client) { + return getConnectTimeout() + .map(connectTimeout -> client.option(CONNECT_TIMEOUT_MILLIS, (int) connectTimeout.toMillis())) + .orElse(client); + } + + private HttpClient configureHttpClient(HttpClient client) { + client = configureProxy(client); + client = client.runOn(getThreadPool()) + .option(SO_SNDBUF, SEND_RECEIVE_BUFFER_SIZE) + .option(SO_RCVBUF, SEND_RECEIVE_BUFFER_SIZE); + client = configureKeepAlive(client); + client = client.wiretap("cloudfoundry-client.wire", LogLevel.TRACE); + + return configureConnectTimeout(client); + } + + private HttpClient configureKeepAlive(HttpClient client) { + return getKeepAlive() + .map(keepAlive -> client.option(SO_KEEPALIVE, keepAlive)) + .orElse(client); + } + + private HttpClient configureProxy(HttpClient client) { + return getProxyConfiguration() + .map(proxyConfiguration -> proxyConfiguration.configure(client)) + .orElse(client); + } + + private void configureSsl(SslProvider.SslContextSpec ssl){ + try{ + SslProvider.Builder builder = ssl.sslContext(createSslContextBuilder().build()); + + getSslCloseNotifyReadTimeout().ifPresent(builder::closeNotifyReadTimeout); + getSslHandshakeTimeout().ifPresent(builder::handshakeTimeout); + getSslCloseNotifyFlushTimeout().ifPresent(builder::closeNotifyFlushTimeout); + } catch (SSLException e) { + this.logger.error("Unable to configure SSL", e); + } + } + + private HttpClient createHttpClient() { + return getConnectionProvider() + .map(HttpClient::create) + .orElse(HttpClient.create()); + } + + private SslContextBuilder createSslContextBuilder() { + SslContextBuilder sslContextBuilder = SslContextBuilder.forClient(); + + getSslCertificateTruster() + .map(this::createTrustManagerFactory) + .ifPresent(sslContextBuilder::trustManager); + + return sslContextBuilder; + } + + private TrustManagerFactory createTrustManagerFactory(SslCertificateTruster sslCertificateTruster) { + return new StaticTrustManagerFactory(sslCertificateTruster); + } + + private ObjectName getByteBufAllocatorObjectName() throws MalformedObjectNameException { + return ObjectName.getInstance(String.format("org.cloudfoundry.reactor:type=ByteBufAllocator,endpoint=%s/%d", getApiHost(), getPort().orElse(DEFAULT_PORT))); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DelegatingRootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DelegatingRootProvider.java new file mode 100644 index 00000000000..554eecfa1ec --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_DelegatingRootProvider.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.immutables.value.Value; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +/** + * A {@link RootProvider} that returns endpoints by delegating to an {@link RootPayloadRootProvider} and then an {@link InfoPayloadRootProvider}. + */ +@Value.Immutable +abstract class _DelegatingRootProvider extends AbstractRootProvider { + + @Override + protected Mono doGetRoot(ConnectionContext connectionContext) { + return getRootPayloadRootProvider().doGetRoot(connectionContext) + .onErrorResume(t -> getInfoPayloadRootProvider().doGetRoot(connectionContext)); + } + + @Override + protected Mono doGetRoot(String key, ConnectionContext connectionContext) { + return getRootPayloadRootProvider().doGetRoot(key, connectionContext) + .onErrorResume(t -> { + if ("cloud_controller_v2".equals(key)) { + return getInfoPayloadRootProvider().doGetRoot(connectionContext) + .map(uri -> UriComponentsBuilder.newInstance().uriComponents(uri).pathSegment("v2").build()); + } else if ("cloud_controller_v3".equals(key)) { + return getInfoPayloadRootProvider().doGetRoot(connectionContext) + .map(uri -> UriComponentsBuilder.newInstance().uriComponents(uri).pathSegment("v3").build()); + } else if ("logging".equals(key)) { + return getInfoPayloadRootProvider().doGetRoot("doppler_logging_endpoint", connectionContext); + } else if ("routing".equals(key)) { + return getInfoPayloadRootProvider().doGetRoot("routing_endpoint", connectionContext); + } else if ("uaa".equals(key)) { + return getInfoPayloadRootProvider().doGetRoot("token_endpoint", connectionContext); + } else { + return getInfoPayloadRootProvider().doGetRoot(key, connectionContext); + } + }); + } + + @Value.Derived + InfoPayloadRootProvider getInfoPayloadRootProvider() { + return InfoPayloadRootProvider.builder() + .apiHost(getApiHost()) + .objectMapper(getObjectMapper()) + .port(getPort()) + .secure(getSecure()) + .build(); + } + + abstract ObjectMapper getObjectMapper(); + + @Value.Derived + RootPayloadRootProvider getRootPayloadRootProvider() { + return RootPayloadRootProvider.builder() + .apiHost(getApiHost()) + .objectMapper(getObjectMapper()) + .port(getPort()) + .secure(getSecure()) + .build(); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithBody.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithBody.java new file mode 100644 index 00000000000..579052543af --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithBody.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import org.immutables.value.Value; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientResponse; + +@Value.Immutable +public interface _HttpClientResponseWithBody { + + @Value.Parameter + ByteBufFlux getBody(); + + @Value.Parameter + HttpClientResponse getResponse(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithConnection.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithConnection.java new file mode 100644 index 00000000000..0ff6b96d5b3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithConnection.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import org.immutables.value.Value; +import reactor.netty.Connection; +import reactor.netty.http.client.HttpClientResponse; + +@Value.Immutable +public interface _HttpClientResponseWithConnection { + + @Value.Parameter + Connection getConnection(); + + @Value.Parameter + HttpClientResponse getResponse(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithParsedBody.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithParsedBody.java new file mode 100644 index 00000000000..99e0821b752 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_HttpClientResponseWithParsedBody.java @@ -0,0 +1,18 @@ +package org.cloudfoundry.reactor; + +import java.util.Optional; + +import org.immutables.value.Value; + +import reactor.netty.http.client.HttpClientResponse; + +@Value.Immutable +public interface _HttpClientResponseWithParsedBody { + + @Value.Parameter + Optional getBody(); + + @Value.Parameter + HttpClientResponse getResponse(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_InfoPayloadRootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_InfoPayloadRootProvider.java new file mode 100644 index 00000000000..27847909d4d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_InfoPayloadRootProvider.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.immutables.value.Value; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +import java.util.Map; + +/** + * A {@link RootProvider} that returns endpoints extracted from the `/v2/info` API for the configured endpoint. + */ +@Value.Immutable +abstract class _InfoPayloadRootProvider extends AbstractRootProvider { + + protected Mono doGetRoot(ConnectionContext connectionContext) { + return Mono.just(getRoot()); + } + + protected Mono doGetRoot(String key, ConnectionContext connectionContext) { + return getInfo(connectionContext) + .map(info -> { + if (!info.containsKey(key)) { + throw new IllegalArgumentException(String.format("Info payload does not contain key '%s'", key)); + } + + return normalize(UriComponentsBuilder.fromUriString(info.get(key))); + }); + } + + abstract ObjectMapper getObjectMapper(); + + private UriComponentsBuilder buildInfoUri(UriComponentsBuilder root) { + return root.pathSegment("v2", "info"); + } + + @SuppressWarnings("unchecked") + @Value.Derived + private Mono> getInfo(ConnectionContext connectionContext) { + return createOperator(connectionContext) + .flatMap(operator -> operator.get() + .uri(this::buildInfoUri) + .response() + .parseBody(Map.class)) + .map(payload -> (Map) payload) + .switchIfEmpty(Mono.error(new IllegalArgumentException("Info endpoint does not contain a payload"))) + .checkpoint(); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_ProxyConfiguration.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_ProxyConfiguration.java new file mode 100644 index 00000000000..33fd69eb20e --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_ProxyConfiguration.java @@ -0,0 +1,72 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import org.immutables.value.Value; +import reactor.netty.http.client.HttpClient; +import reactor.netty.tcp.TcpClient; +import reactor.netty.transport.ProxyProvider.Builder; +import reactor.netty.transport.ProxyProvider.Proxy; + +import java.util.Optional; +import java.util.function.Function; + +/** + * Proxy configuration + */ +@Value.Immutable +abstract class _ProxyConfiguration { + + public TcpClient configure(TcpClient tcpClient) { + return tcpClient.proxy(proxyOptions -> { + Builder builder = proxyOptions.type(Proxy.HTTP).host(getHost()); + getPort().ifPresent(builder::port); + getUsername().ifPresent(builder::username); + getPassword().map(password -> (Function) s -> password).ifPresent(builder::password); + }); + } + + public HttpClient configure(HttpClient client) { + return client.proxy(proxyOptions -> { + Builder builder = proxyOptions.type(Proxy.HTTP).host(getHost()); + getPort().ifPresent(builder::port); + getUsername().ifPresent(builder::username); + getPassword().map(password -> (Function) s -> password).ifPresent(builder::password); + }); + } + + /** + * The proxy host + */ + abstract String getHost(); + + /** + * The proxy password + */ + abstract Optional getPassword(); + + /** + * The proxy port + */ + abstract Optional getPort(); + + /** + * The proxy username + */ + abstract Optional getUsername(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_RootPayloadRootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_RootPayloadRootProvider.java new file mode 100644 index 00000000000..12f394c4573 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_RootPayloadRootProvider.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.immutables.value.Value; +import org.springframework.web.util.UriComponents; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Collectors; + +/** + * A {@link RootProvider} that returns endpoints extracted from the `/` API for the configured endpoint. + */ +@Value.Immutable +abstract class _RootPayloadRootProvider extends AbstractRootProvider { + + @Override + protected Mono doGetRoot(ConnectionContext connectionContext) { + return Mono.just(getRoot()); + } + + @Override + protected Mono doGetRoot(String key, ConnectionContext connectionContext) { + return getPayload(connectionContext) + .map(payload -> { + if (!payload.containsKey(key)) { + throw new IllegalArgumentException(String.format("Root payload does not contain key '%s'", key)); + } + + return normalize(UriComponentsBuilder.fromUriString(payload.get(key))); + }); + } + + abstract ObjectMapper getObjectMapper(); + + @SuppressWarnings("unchecked") + @Value.Derived + private Mono> getPayload(ConnectionContext connectionContext) { + return createOperator(connectionContext) + .flatMap(operator -> operator.get() + .uri(Function.identity()) + .response() + .parseBody(Map.class)) + .map(payload -> (Map>>) payload) + .map(this::processPayload) + .switchIfEmpty(Mono.error(new IllegalArgumentException("Root endpoint does not contain a payload"))) + .checkpoint(); + } + + private Map processPayload(Map>> payload) { + return payload.get("links").entrySet().stream() + .filter(item -> null != item.getValue()) + .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().get("href"))); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_SingleEndpointRootProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_SingleEndpointRootProvider.java new file mode 100644 index 00000000000..018a45c6bec --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/_SingleEndpointRootProvider.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import org.immutables.value.Value; +import org.springframework.web.util.UriComponents; +import reactor.core.publisher.Mono; + +/** + * A {@link RootProvider} that returns a single endpoint regardless of what key is requested. Often used with standalone Cloud Foundry components such as the UAA. + */ +@Value.Immutable +abstract class _SingleEndpointRootProvider extends AbstractRootProvider { + + @Override + protected Mono doGetRoot(ConnectionContext connectionContext) { + return Mono.just(getRoot()); + } + + @Override + protected Mono doGetRoot(String key, ConnectionContext connectionContext) { + return Mono.just(getRoot()); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/CloudFoundryClientCompatibilityChecker.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/CloudFoundryClientCompatibilityChecker.java new file mode 100644 index 00000000000..e2aa39459bd --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/CloudFoundryClientCompatibilityChecker.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import com.github.zafarkhaja.semver.Version; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.info.GetInfoRequest; +import org.cloudfoundry.client.v2.info.Info; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Mono; + +final class CloudFoundryClientCompatibilityChecker { + + private final Logger logger = LoggerFactory.getLogger("cloudfoundry-client.compatibility"); + + private final Info info; + + CloudFoundryClientCompatibilityChecker(Info info) { + this.info = info; + } + + void check() { + this.info + .get(GetInfoRequest.builder().build()) + .map(response -> Version.valueOf(response.getApiVersion())) + .zipWith(Mono.just(Version.valueOf(CloudFoundryClient.SUPPORTED_API_VERSION))) + .subscribe( + consumer( + (server, supported) -> + logCompatibility(server, supported, this.logger)), + t -> + this.logger.error( + "An error occurred while checking version compatibility:", + t)); + } + + private static void logCompatibility(Version server, Version supported, Logger logger) { + String message = + "Client supports API version {} and is connected to server with API version {}." + + " Things may not work as expected."; + + if (server.greaterThan(supported)) { + logger.info(message, supported, server); + } else if (server.lessThan(supported)) { + logger.warn(message, supported, server); + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/MethodNameComparator.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/MethodNameComparator.java new file mode 100644 index 00000000000..61b41807ae6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/MethodNameComparator.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import java.lang.reflect.Method; +import java.util.Comparator; + +public final class MethodNameComparator implements Comparator { + + public static final MethodNameComparator INSTANCE = new MethodNameComparator(); + + private MethodNameComparator() {} + + @Override + public int compare(Method a, Method b) { + return a.getName().compareTo(b.getName()); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/QueryBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/QueryBuilder.java new file mode 100644 index 00000000000..334184fe0fc --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/QueryBuilder.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import java.util.Collection; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.reactor.util.AnnotationUtils; +import org.cloudfoundry.reactor.util.AnnotationUtils.AnnotatedValue; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameterBuilder; + +/** + * A builder for Cloud Foundry queries + */ +public final class QueryBuilder implements UriQueryParameterBuilder { + + public Stream build(Object instance) { + return AnnotationUtils.streamAnnotatedValues(instance, QueryParameter.class) + .map(QueryBuilder::processValue) + .filter(Objects::nonNull); + } + + private static UriQueryParameter processCollection( + QueryParameter queryParameter, Object value) { + return processValue( + queryParameter.value(), + ((Collection) value) + .stream() + .map(Object::toString) + .map(String::trim) + .collect(Collectors.joining(queryParameter.delimiter()))); + } + + private static UriQueryParameter processValue(AnnotatedValue annotatedValue) { + QueryParameter queryParameter = annotatedValue.getAnnotation(); + Object value = annotatedValue.getValue(); + if (value instanceof Collection) { + return processCollection(queryParameter, value); + } else { + return processValue(queryParameter.value(), value.toString()); + } + } + + private static UriQueryParameter processValue(String name, String value) { + return UriQueryParameter.of(name, value); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java new file mode 100644 index 00000000000..80e5ef26148 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/_ReactorCloudFoundryClient.java @@ -0,0 +1,549 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import jakarta.annotation.PostConstruct; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.ApplicationsV2; +import org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEvents; +import org.cloudfoundry.client.v2.blobstores.Blobstores; +import org.cloudfoundry.client.v2.buildpacks.Buildpacks; +import org.cloudfoundry.client.v2.domains.Domains; +import org.cloudfoundry.client.v2.environmentvariablegroups.EnvironmentVariableGroups; +import org.cloudfoundry.client.v2.events.Events; +import org.cloudfoundry.client.v2.featureflags.FeatureFlags; +import org.cloudfoundry.client.v2.info.Info; +import org.cloudfoundry.client.v2.jobs.Jobs; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitions; +import org.cloudfoundry.client.v2.organizations.Organizations; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomains; +import org.cloudfoundry.client.v2.resourcematch.ResourceMatch; +import org.cloudfoundry.client.v2.routemappings.RouteMappings; +import org.cloudfoundry.client.v2.routes.Routes; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroups; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingsV2; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokers; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstances; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeys; +import org.cloudfoundry.client.v2.serviceplans.ServicePlans; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilities; +import org.cloudfoundry.client.v2.services.Services; +import org.cloudfoundry.client.v2.serviceusageevents.ServiceUsageEvents; +import org.cloudfoundry.client.v2.shareddomains.SharedDomains; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitions; +import org.cloudfoundry.client.v2.spaces.Spaces; +import org.cloudfoundry.client.v2.stacks.Stacks; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstances; +import org.cloudfoundry.client.v2.users.Users; +import org.cloudfoundry.client.v3.admin.AdminV3; +import org.cloudfoundry.client.v3.applications.ApplicationsV3; +import org.cloudfoundry.client.v3.auditevents.AuditEventsV3; +import org.cloudfoundry.client.v3.buildpacks.BuildpacksV3; +import org.cloudfoundry.client.v3.builds.Builds; +import org.cloudfoundry.client.v3.deployments.DeploymentsV3; +import org.cloudfoundry.client.v3.domains.DomainsV3; +import org.cloudfoundry.client.v3.droplets.Droplets; +import org.cloudfoundry.client.v3.isolationsegments.IsolationSegments; +import org.cloudfoundry.client.v3.jobs.JobsV3; +import org.cloudfoundry.client.v3.quotas.organizations.OrganizationQuotasV3; +import org.cloudfoundry.client.v3.organizations.OrganizationsV3; +import org.cloudfoundry.client.v3.packages.Packages; +import org.cloudfoundry.client.v3.processes.Processes; +import org.cloudfoundry.client.v3.resourcematch.ResourceMatchV3; +import org.cloudfoundry.client.v3.roles.RolesV3; +import org.cloudfoundry.client.v3.routes.RoutesV3; +import org.cloudfoundry.client.v3.securitygroups.SecurityGroupsV3; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingsV3; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokersV3; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstancesV3; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingsV3; +import org.cloudfoundry.client.v3.serviceplans.ServicePlansV3; +import org.cloudfoundry.client.v3.quotas.spaces.SpaceQuotasV3; +import org.cloudfoundry.client.v3.spaces.SpacesV3; +import org.cloudfoundry.client.v3.stacks.StacksV3; +import org.cloudfoundry.client.v3.tasks.Tasks; +import org.cloudfoundry.client.v3.users.UsersV3; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.applications.ReactorApplicationsV2; +import org.cloudfoundry.reactor.client.v2.applicationusageevents.ReactorApplicationUsageEvents; +import org.cloudfoundry.reactor.client.v2.blobstores.ReactorBlobstores; +import org.cloudfoundry.reactor.client.v2.buildpacks.ReactorBuildpacks; +import org.cloudfoundry.reactor.client.v2.domains.ReactorDomains; +import org.cloudfoundry.reactor.client.v2.environmentvariablegroups.ReactorEnvironmentVariableGroups; +import org.cloudfoundry.reactor.client.v2.events.ReactorEvents; +import org.cloudfoundry.reactor.client.v2.featureflags.ReactorFeatureFlags; +import org.cloudfoundry.reactor.client.v2.info.ReactorInfo; +import org.cloudfoundry.reactor.client.v2.jobs.ReactorJobs; +import org.cloudfoundry.reactor.client.v2.organizationquotadefinitions.ReactorOrganizationQuotaDefinitions; +import org.cloudfoundry.reactor.client.v2.organizations.ReactorOrganizations; +import org.cloudfoundry.reactor.client.v2.privatedomains.ReactorPrivateDomains; +import org.cloudfoundry.reactor.client.v2.resourcematch.ReactorResourceMatch; +import org.cloudfoundry.reactor.client.v2.routemappings.ReactorRouteMappings; +import org.cloudfoundry.reactor.client.v2.routes.ReactorRoutes; +import org.cloudfoundry.reactor.client.v2.securitygroups.ReactorSecurityGroups; +import org.cloudfoundry.reactor.client.v2.servicebindings.ReactorServiceBindingsV2; +import org.cloudfoundry.reactor.client.v2.servicebrokers.ReactorServiceBrokers; +import org.cloudfoundry.reactor.client.v2.serviceinstances.ReactorServiceInstances; +import org.cloudfoundry.reactor.client.v2.servicekeys.ReactorServiceKeys; +import org.cloudfoundry.reactor.client.v2.serviceplans.ReactorServicePlans; +import org.cloudfoundry.reactor.client.v2.serviceplanvisibilities.ReactorServicePlanVisibilities; +import org.cloudfoundry.reactor.client.v2.services.ReactorServices; +import org.cloudfoundry.reactor.client.v2.serviceusageevents.ReactorServiceUsageEvents; +import org.cloudfoundry.reactor.client.v2.shareddomains.ReactorSharedDomains; +import org.cloudfoundry.reactor.client.v2.spacequotadefinitions.ReactorSpaceQuotaDefinitions; +import org.cloudfoundry.reactor.client.v2.spaces.ReactorSpaces; +import org.cloudfoundry.reactor.client.v2.stacks.ReactorStacks; +import org.cloudfoundry.reactor.client.v2.userprovidedserviceinstances.ReactorUserProvidedServiceInstances; +import org.cloudfoundry.reactor.client.v2.users.ReactorUsers; +import org.cloudfoundry.reactor.client.v3.admin.ReactorAdminV3; +import org.cloudfoundry.reactor.client.v3.applications.ReactorApplicationsV3; +import org.cloudfoundry.reactor.client.v3.auditevents.ReactorAuditEventsV3; +import org.cloudfoundry.reactor.client.v3.builds.ReactorBuilds; +import org.cloudfoundry.reactor.client.v3.builpacks.ReactorBuildpacksV3; +import org.cloudfoundry.reactor.client.v3.deployments.ReactorDeploymentsV3; +import org.cloudfoundry.reactor.client.v3.domains.ReactorDomainsV3; +import org.cloudfoundry.reactor.client.v3.droplets.ReactorDroplets; +import org.cloudfoundry.reactor.client.v3.isolationsegments.ReactorIsolationSegments; +import org.cloudfoundry.reactor.client.v3.jobs.ReactorJobsV3; +import org.cloudfoundry.reactor.client.v3.quotas.organizations.ReactorOrganizationQuotasV3; +import org.cloudfoundry.reactor.client.v3.organizations.ReactorOrganizationsV3; +import org.cloudfoundry.reactor.client.v3.packages.ReactorPackages; +import org.cloudfoundry.reactor.client.v3.processes.ReactorProcesses; +import org.cloudfoundry.reactor.client.v3.resourcematch.ReactorResourceMatchV3; +import org.cloudfoundry.reactor.client.v3.roles.ReactorRolesV3; +import org.cloudfoundry.reactor.client.v3.routes.ReactorRoutesV3; +import org.cloudfoundry.reactor.client.v3.securitygroups.ReactorSecurityGroupsV3; +import org.cloudfoundry.reactor.client.v3.servicebindings.ReactorServiceBindingsV3; +import org.cloudfoundry.reactor.client.v3.servicebrokers.ReactorServiceBrokersV3; +import org.cloudfoundry.reactor.client.v3.serviceinstances.ReactorServiceInstancesV3; +import org.cloudfoundry.reactor.client.v3.serviceofferings.ReactorServiceOfferingsV3; +import org.cloudfoundry.reactor.client.v3.serviceplans.ReactorServicePlansV3; +import org.cloudfoundry.reactor.client.v3.quotas.spaces.ReactorSpaceQuotasV3; +import org.cloudfoundry.reactor.client.v3.spaces.ReactorSpacesV3; +import org.cloudfoundry.reactor.client.v3.stacks.ReactorStacksV3; +import org.cloudfoundry.reactor.client.v3.tasks.ReactorTasks; +import org.cloudfoundry.reactor.client.v3.users.ReactorUsersV3; +import org.immutables.value.Value; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.Map; + +/** + * The Reactor-based implementation of {@link CloudFoundryClient} + */ +@Value.Immutable +abstract class _ReactorCloudFoundryClient implements CloudFoundryClient { + + @Override + @Value.Derived + public AdminV3 adminV3() { + return new ReactorAdminV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ApplicationUsageEvents applicationUsageEvents() { + return new ReactorApplicationUsageEvents(getConnectionContext(), getRootV2(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public ApplicationsV2 applicationsV2() { + return new ReactorApplicationsV2(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ApplicationsV3 applicationsV3() { + return new ReactorApplicationsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public AuditEventsV3 auditEventsV3() { + return new ReactorAuditEventsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Blobstores blobstores() { + return new ReactorBlobstores(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Buildpacks buildpacks() { + return new ReactorBuildpacks(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public BuildpacksV3 buildpacksV3() { + return new ReactorBuildpacksV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Builds builds() { + return new ReactorBuilds(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @PostConstruct + public void checkCompatibility() { + new CloudFoundryClientCompatibilityChecker(info()).check(); + } + + @Override + @Value.Derived + public DeploymentsV3 deploymentsV3() { + return new ReactorDeploymentsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Domains domains() { + return new ReactorDomains(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public DomainsV3 domainsV3() { + return new ReactorDomainsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Droplets droplets() { + return new ReactorDroplets(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public EnvironmentVariableGroups environmentVariableGroups() { + return new ReactorEnvironmentVariableGroups(getConnectionContext(), getRootV2(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public Events events() { + return new ReactorEvents(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public FeatureFlags featureFlags() { + return new ReactorFeatureFlags(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Info info() { + return new ReactorInfo(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public IsolationSegments isolationSegments() { + return new ReactorIsolationSegments(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Jobs jobs() { + return new ReactorJobs(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public JobsV3 jobsV3() { + return new ReactorJobsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public OrganizationQuotaDefinitions organizationQuotaDefinitions() { + return new ReactorOrganizationQuotaDefinitions(getConnectionContext(), getRootV2(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public OrganizationQuotasV3 organizationQuotasV3() { + return new ReactorOrganizationQuotasV3(getConnectionContext(), getRootV3(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public Organizations organizations() { + return new ReactorOrganizations(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public OrganizationsV3 organizationsV3() { + return new ReactorOrganizationsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Packages packages() { + return new ReactorPackages(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public PrivateDomains privateDomains() { + return new ReactorPrivateDomains(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Processes processes() { + return new ReactorProcesses(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ResourceMatch resourceMatch() { + return new ReactorResourceMatch(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ResourceMatchV3 resourceMatchV3() { + return new ReactorResourceMatchV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public RolesV3 rolesV3() { + return new ReactorRolesV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public RouteMappings routeMappings() { + return new ReactorRouteMappings(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Routes routes() { + return new ReactorRoutes(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public RoutesV3 routesV3() { + return new ReactorRoutesV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public SecurityGroups securityGroups() { + return new ReactorSecurityGroups(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public SecurityGroupsV3 securityGroupsV3() { + return new ReactorSecurityGroupsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceBindingsV2 serviceBindingsV2() { + return new ReactorServiceBindingsV2(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceBindingsV3 serviceBindingsV3() { + return new ReactorServiceBindingsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceBrokers serviceBrokers() { + return new ReactorServiceBrokers(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceBrokersV3 serviceBrokersV3() { + return new ReactorServiceBrokersV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceInstances serviceInstances() { + return new ReactorServiceInstances(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceInstancesV3 serviceInstancesV3() { + return new ReactorServiceInstancesV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceKeys serviceKeys() { + return new ReactorServiceKeys(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceOfferingsV3 serviceOfferingsV3() { + return new ReactorServiceOfferingsV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServicePlanVisibilities servicePlanVisibilities() { + return new ReactorServicePlanVisibilities(getConnectionContext(), getRootV2(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public ServicePlans servicePlans() { + return new ReactorServicePlans(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServicePlansV3 servicePlansV3() { + return new ReactorServicePlansV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServiceUsageEvents serviceUsageEvents() { + return new ReactorServiceUsageEvents(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Services services() { + return new ReactorServices(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public SharedDomains sharedDomains() { + return new ReactorSharedDomains(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public SpaceQuotaDefinitions spaceQuotaDefinitions() { + return new ReactorSpaceQuotaDefinitions(getConnectionContext(), getRootV2(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public SpaceQuotasV3 spaceQuotasV3() { + return new ReactorSpaceQuotasV3(getConnectionContext(), getRootV3(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public Spaces spaces() { + return new ReactorSpaces(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public SpacesV3 spacesV3() { + return new ReactorSpacesV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Stacks stacks() { + return new ReactorStacks(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public StacksV3 stacksV3() { + return new ReactorStacksV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Tasks tasks() { + return new ReactorTasks(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public UserProvidedServiceInstances userProvidedServiceInstances() { + return new ReactorUserProvidedServiceInstances(getConnectionContext(), getRootV2(), getTokenProvider(), + getRequestTags()); + } + + @Override + @Value.Derived + public Users users() { + return new ReactorUsers(getConnectionContext(), getRootV2(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public UsersV3 usersV3() { + return new ReactorUsersV3(getConnectionContext(), getRootV3(), getTokenProvider(), getRequestTags()); + } + + /** + * The connection context + */ + abstract ConnectionContext getConnectionContext(); + + /** + * Map of http header name and value which will be added to every request to the + * controller + */ + @Value.Default + Map getRequestTags() { + return Collections.emptyMap(); + } + + @Value.Default + Mono getRootV2() { + return getConnectionContext().getRootProvider().getRoot("cloud_controller_v2", getConnectionContext()); + } + + @Value.Default + Mono getRootV3() { + return getConnectionContext().getRootProvider().getRoot("cloud_controller_v3", getConnectionContext()); + } + + /** + * The token provider + */ + abstract TokenProvider getTokenProvider(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/AbstractClientV2Operations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/AbstractClientV2Operations.java new file mode 100644 index 00000000000..709e059ea3c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/AbstractClientV2Operations.java @@ -0,0 +1,192 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2; + +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.QueryBuilder; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.DelegatingUriQueryParameterBuilder; +import org.cloudfoundry.reactor.util.ErrorPayloadMappers; +import org.cloudfoundry.reactor.util.MultipartHttpClientRequest; +import org.cloudfoundry.reactor.util.Operator; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameterBuilder; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +public abstract class AbstractClientV2Operations extends AbstractReactorOperations { + + protected AbstractClientV2Operations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + protected Mono createOperator() { + return super.createOperator().map(this::attachErrorPayloadMapper); + } + + protected final Mono delete( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.delete() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Flux get( + Object requestPayload, + Function uriTransformer, + Function> bodyTransformer) { + return createOperator() + .flatMapMany( + operator -> + operator.followRedirects() + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBodyToFlux( + responseWithBody -> + bodyTransformer.apply( + responseWithBody.getBody()))); + } + + protected final Mono get( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBody(responseType)); + } + + protected final Mono post( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono put( + Object requestPayload, + Class responseType, + Function uriTransformer, + Consumer requestTransformer, + Runnable onTerminate) { + return createOperator() + .flatMap( + operator -> + operator.put() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .sendForm(multipartRequest(requestTransformer)) + .response() + .parseBody(responseType)) + .doFinally(signalType -> onTerminate.run()); + } + + protected final Mono put( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.put() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + private Operator attachErrorPayloadMapper(Operator operator) { + return operator.withErrorPayloadMapper( + ErrorPayloadMappers.clientV2(this.connectionContext.getObjectMapper())); + } + + private MultipartHttpClientRequest createMultipartRequest( + HttpClientRequest request, HttpClientForm form) { + return new MultipartHttpClientRequest( + this.connectionContext.getObjectMapper(), request, form); + } + + private UriQueryParameterBuilder getUriQueryParameterBuilder() { + return DelegatingUriQueryParameterBuilder.builder() + .builders(new FilterBuilder(), new QueryBuilder()) + .build(); + } + + private BiConsumer multipartRequest( + Consumer requestTransformer) { + return (request, form) -> { + MultipartHttpClientRequest multipartRequest = createMultipartRequest(request, form); + requestTransformer.accept(multipartRequest); + }; + } + + private Function queryTransformer( + Object requestPayload) { + return builder -> { + Stream parameters = + getUriQueryParameterBuilder().build(requestPayload); + UriQueryParameters.set(builder, parameters); + return builder; + }; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/FilterBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/FilterBuilder.java new file mode 100644 index 00000000000..bf6b3c4723d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/FilterBuilder.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2; + +import java.util.Collection; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.reactor.util.AnnotationUtils; +import org.cloudfoundry.reactor.util.AnnotationUtils.AnnotatedValue; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameterBuilder; + +/** + * A builder for Cloud Foundry V2 filters + */ +final class FilterBuilder implements UriQueryParameterBuilder { + + public Stream build(Object instance) { + return AnnotationUtils.streamAnnotatedValues(instance, FilterParameter.class) + .map(FilterBuilder::processValue) + .filter(Objects::nonNull); + } + + private static UriQueryParameter processCollection( + FilterParameter filterParameter, Object value) { + List collection = + ((Collection) value) + .stream() + .map(Object::toString) + .map(String::trim) + .collect(Collectors.toList()); + + if (collection.size() == 1) { + return processValue( + filterParameter.value(), filterParameter.operation(), collection.get(0)); + } else if (collection.size() > 1) { + return processValue( + filterParameter.value(), filterParameter.collectionOperation(), collection); + } else { + return null; + } + } + + private static UriQueryParameter processValue(AnnotatedValue annotatedValue) { + FilterParameter filterParameter = annotatedValue.getAnnotation(); + Object value = annotatedValue.getValue(); + if (value instanceof Collection) { + return processCollection(filterParameter, value); + } else { + return processValue( + filterParameter.value(), filterParameter.operation(), value.toString().trim()); + } + } + + private static UriQueryParameter processValue( + String name, FilterParameter.Operation operation, Collection collection) { + String value = String.join(",", collection); + if (!value.isEmpty()) { + return processValue(name, operation, value); + } + return null; + } + + private static UriQueryParameter processValue( + String name, FilterParameter.Operation operation, String value) { + return UriQueryParameter.of("q", String.format("%s%s%s", name, operation, value)); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/applications/ReactorApplicationsV2.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/applications/ReactorApplicationsV2.java new file mode 100644 index 00000000000..0e87bba1743 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/applications/ReactorApplicationsV2.java @@ -0,0 +1,390 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.applications; + +import static io.netty.handler.codec.http.HttpHeaderValues.APPLICATION_JSON; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Map; +import org.cloudfoundry.client.v2.applications.ApplicationEnvironmentRequest; +import org.cloudfoundry.client.v2.applications.ApplicationEnvironmentResponse; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesResponse; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsRequest; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsResponse; +import org.cloudfoundry.client.v2.applications.ApplicationsV2; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.CopyApplicationRequest; +import org.cloudfoundry.client.v2.applications.CopyApplicationResponse; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v2.applications.DownloadApplicationDropletRequest; +import org.cloudfoundry.client.v2.applications.DownloadApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationPermissionsRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationPermissionsResponse; +import org.cloudfoundry.client.v2.applications.GetApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationsResponse; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationServiceBindingRequest; +import org.cloudfoundry.client.v2.applications.RestageApplicationRequest; +import org.cloudfoundry.client.v2.applications.RestageApplicationResponse; +import org.cloudfoundry.client.v2.applications.SummaryApplicationRequest; +import org.cloudfoundry.client.v2.applications.SummaryApplicationResponse; +import org.cloudfoundry.client.v2.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationDropletRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationDropletResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import org.cloudfoundry.reactor.util.MultipartHttpClientRequest; +import org.cloudfoundry.util.FileUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; + +/** + * The Reactor-based implementation of {@link ApplicationsV2} + */ +public final class ReactorApplicationsV2 extends AbstractClientV2Operations + implements ApplicationsV2 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorApplicationsV2( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateRoute( + AssociateApplicationRouteRequest request) { + return put( + request, + AssociateApplicationRouteResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "routes", + request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono copy(CopyApplicationRequest request) { + return post( + request, + CopyApplicationResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "copy_bits")) + .checkpoint(); + } + + @Override + public Mono create(CreateApplicationRequest request) { + return post( + request, + CreateApplicationResponse.class, + builder -> builder.pathSegment("apps")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteApplicationRequest request) { + return delete( + request, + Void.class, + builder -> builder.pathSegment("apps", request.getApplicationId())) + .checkpoint(); + } + + @Override + public Flux download(DownloadApplicationRequest request) { + return get( + request, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "download"), + ByteBufFlux::asByteArray) + .checkpoint(); + } + + @Override + public Flux downloadDroplet(DownloadApplicationDropletRequest request) { + return get( + request, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "droplet", "download"), + ByteBufFlux::asByteArray) + .checkpoint(); + } + + @Override + public Mono environment(ApplicationEnvironmentRequest request) { + return get( + request, + ApplicationEnvironmentResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId(), "env")) + .checkpoint(); + } + + @Override + public Mono get(GetApplicationRequest request) { + return get( + request, + GetApplicationResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono getPermissions( + GetApplicationPermissionsRequest request) { + return get( + request, + GetApplicationPermissionsResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "permissions")) + .checkpoint(); + } + + @Override + public Mono instances(ApplicationInstancesRequest request) { + return get( + request, + ApplicationInstancesResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "instances")) + .checkpoint(); + } + + @Override + public Mono list(ListApplicationsRequest request) { + return get(request, ListApplicationsResponse.class, builder -> builder.pathSegment("apps")) + .checkpoint(); + } + + @Override + public Mono listRoutes(ListApplicationRoutesRequest request) { + return get( + request, + ListApplicationRoutesResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "routes")) + .checkpoint(); + } + + @Override + public Mono listServiceBindings( + ListApplicationServiceBindingsRequest request) { + return get( + request, + ListApplicationServiceBindingsResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "service_bindings")) + .checkpoint(); + } + + @Override + public Mono removeRoute(RemoveApplicationRouteRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "routes", + request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono removeServiceBinding(RemoveApplicationServiceBindingRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "service_bindings", + request.getServiceBindingId())) + .checkpoint(); + } + + @Override + public Mono restage(RestageApplicationRequest request) { + return post( + request, + RestageApplicationResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "restage")) + .checkpoint(); + } + + @Override + public Mono statistics(ApplicationStatisticsRequest request) { + return get( + request, + ApplicationStatisticsResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId(), "stats")) + .checkpoint(); + } + + @Override + public Mono summary(SummaryApplicationRequest request) { + return get( + request, + SummaryApplicationResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "summary")) + .checkpoint(); + } + + @Override + public Mono terminateInstance(TerminateApplicationInstanceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "instances", + request.getIndex())) + .checkpoint(); + } + + @Override + public Mono update(UpdateApplicationRequest request) { + return put( + request, + UpdateApplicationResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono upload(UploadApplicationRequest request) { + Path application = request.getApplication(); + + if (application.toFile().isDirectory()) { + return FileUtils.compress(application) + .map( + temporaryFile -> + UploadApplicationRequest.builder() + .from(request) + .application(temporaryFile) + .build()) + .flatMap( + requestWithTemporaryFile -> + upload( + requestWithTemporaryFile, + () -> { + try { + Files.delete( + requestWithTemporaryFile + .getApplication()); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + })); + } else { + return upload(request, () -> {}); + } + } + + @Override + public Mono uploadDroplet( + UploadApplicationDropletRequest request) { + return put( + request, + UploadApplicationDropletResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "droplet", "upload"), + multipartRequest -> upload(multipartRequest, request), + () -> {}) + .checkpoint(); + } + + private Mono upload( + UploadApplicationRequest request, Runnable onTerminate) { + return put( + request, + UploadApplicationResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId(), "bits"), + multipartRequest -> + upload(request.getApplication(), multipartRequest, request), + onTerminate) + .checkpoint(); + } + + private void upload( + Path application, + MultipartHttpClientRequest multipartRequest, + UploadApplicationRequest request) { + multipartRequest + .addPart( + part -> + part.setName("resources") + .setContentType(APPLICATION_JSON.toString()) + .send(request.getResources())) + .addPart( + part -> + part.setName("application") + .setContentType(APPLICATION_ZIP) + .sendFile(application)) + .done(); + } + + private void upload( + MultipartHttpClientRequest multipartRequest, UploadApplicationDropletRequest request) { + multipartRequest + .addPart(part -> part.setName("droplet").sendFile(request.getDroplet())) + .done(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/applicationusageevents/ReactorApplicationUsageEvents.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/applicationusageevents/ReactorApplicationUsageEvents.java new file mode 100644 index 00000000000..f038648ad7d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/applicationusageevents/ReactorApplicationUsageEvents.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.applicationusageevents; + +import java.util.Map; +import org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEvents; +import org.cloudfoundry.client.v2.applicationusageevents.GetApplicationUsageEventRequest; +import org.cloudfoundry.client.v2.applicationusageevents.GetApplicationUsageEventResponse; +import org.cloudfoundry.client.v2.applicationusageevents.ListApplicationUsageEventsRequest; +import org.cloudfoundry.client.v2.applicationusageevents.ListApplicationUsageEventsResponse; +import org.cloudfoundry.client.v2.applicationusageevents.PurgeAndReseedApplicationUsageEventsRequest; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ApplicationUsageEvents} + */ +public final class ReactorApplicationUsageEvents extends AbstractClientV2Operations + implements ApplicationUsageEvents { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorApplicationUsageEvents( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetApplicationUsageEventRequest request) { + return get( + request, + GetApplicationUsageEventResponse.class, + builder -> + builder.pathSegment( + "app_usage_events", request.getApplicationUsageEventId())) + .checkpoint(); + } + + @Override + public Mono list( + ListApplicationUsageEventsRequest request) { + return get( + request, + ListApplicationUsageEventsResponse.class, + builder -> builder.pathSegment("app_usage_events")) + .checkpoint(); + } + + @Override + public Mono purgeAndReseed(PurgeAndReseedApplicationUsageEventsRequest request) { + return post( + request, + Void.class, + builder -> + builder.pathSegment( + "app_usage_events", + "destructively_purge_all_and_reseed_started_apps")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/blobstores/ReactorBlobstores.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/blobstores/ReactorBlobstores.java new file mode 100644 index 00000000000..7432b10483c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/blobstores/ReactorBlobstores.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.blobstores; + +import java.util.Map; +import org.cloudfoundry.client.v2.blobstores.Blobstores; +import org.cloudfoundry.client.v2.blobstores.DeleteBlobstoreBuildpackCachesRequest; +import org.cloudfoundry.client.v2.blobstores.DeleteBlobstoreBuildpackCachesResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Blobstores} + */ +public final class ReactorBlobstores extends AbstractClientV2Operations implements Blobstores { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorBlobstores( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono deleteBuildpackCaches( + DeleteBlobstoreBuildpackCachesRequest request) { + return delete( + request, + DeleteBlobstoreBuildpackCachesResponse.class, + builder -> builder.pathSegment("blobstores", "buildpack_cache")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/buildpacks/ReactorBuildpacks.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/buildpacks/ReactorBuildpacks.java new file mode 100644 index 00000000000..9fdfef27b3c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/buildpacks/ReactorBuildpacks.java @@ -0,0 +1,165 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.buildpacks; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Map; +import org.cloudfoundry.client.v2.buildpacks.Buildpacks; +import org.cloudfoundry.client.v2.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.DeleteBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v2.buildpacks.ListBuildpacksResponse; +import org.cloudfoundry.client.v2.buildpacks.UpdateBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.UpdateBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.UploadBuildpackResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import org.cloudfoundry.reactor.util.MultipartHttpClientRequest; +import org.cloudfoundry.util.FileUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Buildpacks} + */ +public final class ReactorBuildpacks extends AbstractClientV2Operations implements Buildpacks { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorBuildpacks( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateBuildpackRequest request) { + return post( + request, + CreateBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteBuildpackRequest request) { + return delete( + request, + DeleteBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks", request.getBuildpackId())) + .checkpoint(); + } + + @Override + public Mono get(GetBuildpackRequest request) { + return get( + request, + GetBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks", request.getBuildpackId())) + .checkpoint(); + } + + @Override + public Mono list(ListBuildpacksRequest request) { + return get( + request, + ListBuildpacksResponse.class, + builder -> builder.pathSegment("buildpacks")) + .checkpoint(); + } + + @Override + public Mono update(UpdateBuildpackRequest request) { + return put( + request, + UpdateBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks", request.getBuildpackId())) + .checkpoint(); + } + + @Override + public Mono upload(UploadBuildpackRequest request) { + Path buildpack = request.getBuildpack(); + + if (buildpack.toFile().isDirectory()) { + return FileUtils.compress(buildpack) + .map( + temporaryFile -> + UploadBuildpackRequest.builder() + .from(request) + .buildpack(temporaryFile) + .build()) + .flatMap( + requestWithTemporaryFile -> + upload( + requestWithTemporaryFile, + request.getFilename() + ".zip", + () -> { + try { + Files.delete( + requestWithTemporaryFile + .getBuildpack()); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + })); + } else { + return upload(request, request.getFilename(), () -> {}); + } + } + + private Mono upload( + UploadBuildpackRequest request, String filename, Runnable onTerminate) { + return put( + request, + UploadBuildpackResponse.class, + builder -> + builder.pathSegment("buildpacks", request.getBuildpackId(), "bits"), + multipartRequest -> + upload(request.getBuildpack(), multipartRequest, filename), + onTerminate) + .checkpoint(); + } + + private void upload( + Path buildpack, MultipartHttpClientRequest multipartRequest, String filename) { + multipartRequest + .addPart( + part -> + part.setName("buildpack") + .setFilename(filename) + .setContentType(APPLICATION_ZIP) + .sendFile(buildpack)) + .done(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/domains/ReactorDomains.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/domains/ReactorDomains.java new file mode 100644 index 00000000000..dbb5ef7fe77 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/domains/ReactorDomains.java @@ -0,0 +1,100 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.domains; + +import java.util.Map; +import org.cloudfoundry.client.v2.domains.CreateDomainRequest; +import org.cloudfoundry.client.v2.domains.CreateDomainResponse; +import org.cloudfoundry.client.v2.domains.DeleteDomainRequest; +import org.cloudfoundry.client.v2.domains.DeleteDomainResponse; +import org.cloudfoundry.client.v2.domains.Domains; +import org.cloudfoundry.client.v2.domains.GetDomainRequest; +import org.cloudfoundry.client.v2.domains.GetDomainResponse; +import org.cloudfoundry.client.v2.domains.ListDomainSpacesRequest; +import org.cloudfoundry.client.v2.domains.ListDomainSpacesResponse; +import org.cloudfoundry.client.v2.domains.ListDomainsRequest; +import org.cloudfoundry.client.v2.domains.ListDomainsResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Domains} + */ +public final class ReactorDomains extends AbstractClientV2Operations implements Domains { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorDomains( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + @SuppressWarnings("deprecation") + public Mono create(CreateDomainRequest request) { + return post(request, CreateDomainResponse.class, builder -> builder.pathSegment("domains")) + .checkpoint(); + } + + @Override + @SuppressWarnings("deprecation") + public Mono delete(DeleteDomainRequest request) { + return delete( + request, + DeleteDomainResponse.class, + builder -> builder.pathSegment("domains", request.getDomainId())) + .checkpoint(); + } + + @Override + @SuppressWarnings("deprecation") + public Mono get(GetDomainRequest request) { + return get( + request, + GetDomainResponse.class, + builder -> builder.pathSegment("domains", request.getDomainId())) + .checkpoint(); + } + + @Override + @SuppressWarnings("deprecation") + public Mono list(ListDomainsRequest request) { + return get(request, ListDomainsResponse.class, builder -> builder.pathSegment("domains")) + .checkpoint(); + } + + @Override + @SuppressWarnings("deprecation") + public Mono listSpaces(ListDomainSpacesRequest request) { + return get( + request, + ListDomainSpacesResponse.class, + builder -> builder.pathSegment("domains", request.getDomainId(), "spaces")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/environmentvariablegroups/ReactorEnvironmentVariableGroups.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/environmentvariablegroups/ReactorEnvironmentVariableGroups.java new file mode 100644 index 00000000000..72adb12f051 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/environmentvariablegroups/ReactorEnvironmentVariableGroups.java @@ -0,0 +1,103 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.environmentvariablegroups; + +import java.util.Map; +import org.cloudfoundry.client.v2.environmentvariablegroups.EnvironmentVariableGroups; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetRunningEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetRunningEnvironmentVariablesResponse; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetStagingEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetStagingEnvironmentVariablesResponse; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateRunningEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateRunningEnvironmentVariablesResponse; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateStagingEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateStagingEnvironmentVariablesResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link EnvironmentVariableGroups} + */ +public final class ReactorEnvironmentVariableGroups extends AbstractClientV2Operations + implements EnvironmentVariableGroups { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorEnvironmentVariableGroups( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono getRunningEnvironmentVariables( + GetRunningEnvironmentVariablesRequest request) { + return get( + request, + GetRunningEnvironmentVariablesResponse.class, + builder -> + builder.pathSegment( + "config", "environment_variable_groups", "running")) + .checkpoint(); + } + + @Override + public Mono getStagingEnvironmentVariables( + GetStagingEnvironmentVariablesRequest request) { + return get( + request, + GetStagingEnvironmentVariablesResponse.class, + builder -> + builder.pathSegment( + "config", "environment_variable_groups", "staging")) + .checkpoint(); + } + + @Override + public Mono updateRunningEnvironmentVariables( + UpdateRunningEnvironmentVariablesRequest request) { + return put( + request, + UpdateRunningEnvironmentVariablesResponse.class, + builder -> + builder.pathSegment( + "config", "environment_variable_groups", "running")) + .checkpoint(); + } + + @Override + public Mono updateStagingEnvironmentVariables( + UpdateStagingEnvironmentVariablesRequest request) { + return put( + request, + UpdateStagingEnvironmentVariablesResponse.class, + builder -> + builder.pathSegment( + "config", "environment_variable_groups", "staging")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/events/ReactorEvents.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/events/ReactorEvents.java new file mode 100644 index 00000000000..4a83743d1f4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/events/ReactorEvents.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.events; + +import java.util.Map; +import org.cloudfoundry.client.v2.events.Events; +import org.cloudfoundry.client.v2.events.GetEventRequest; +import org.cloudfoundry.client.v2.events.GetEventResponse; +import org.cloudfoundry.client.v2.events.ListEventsRequest; +import org.cloudfoundry.client.v2.events.ListEventsResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Events} + */ +public final class ReactorEvents extends AbstractClientV2Operations implements Events { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorEvents( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetEventRequest request) { + return get( + request, + GetEventResponse.class, + builder -> builder.pathSegment("events", request.getEventId())) + .checkpoint(); + } + + @Override + public Mono list(ListEventsRequest request) { + return get(request, ListEventsResponse.class, builder -> builder.pathSegment("events")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/featureflags/ReactorFeatureFlags.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/featureflags/ReactorFeatureFlags.java new file mode 100644 index 00000000000..47be1635b26 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/featureflags/ReactorFeatureFlags.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.featureflags; + +import java.util.Map; +import org.cloudfoundry.client.v2.featureflags.FeatureFlags; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagResponse; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsRequest; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsResponse; +import org.cloudfoundry.client.v2.featureflags.SetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.SetFeatureFlagResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link FeatureFlags} + */ +public final class ReactorFeatureFlags extends AbstractClientV2Operations implements FeatureFlags { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorFeatureFlags( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetFeatureFlagRequest request) { + return get( + request, + GetFeatureFlagResponse.class, + builder -> + builder.pathSegment("config", "feature_flags", request.getName())) + .checkpoint(); + } + + @Override + public Mono list(ListFeatureFlagsRequest request) { + return get( + request, + ListFeatureFlagsResponse.class, + builder -> builder.pathSegment("config", "feature_flags")) + .checkpoint(); + } + + @Override + public Mono set(SetFeatureFlagRequest request) { + return put( + request, + SetFeatureFlagResponse.class, + builder -> + builder.pathSegment("config", "feature_flags", request.getName())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/info/ReactorInfo.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/info/ReactorInfo.java new file mode 100644 index 00000000000..36cc4ab5674 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/info/ReactorInfo.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.info; + +import java.util.Map; +import org.cloudfoundry.client.v2.info.GetInfoRequest; +import org.cloudfoundry.client.v2.info.GetInfoResponse; +import org.cloudfoundry.client.v2.info.Info; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Info} + */ +public final class ReactorInfo extends AbstractClientV2Operations implements Info { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorInfo( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetInfoRequest request) { + return get(request, GetInfoResponse.class, builder -> builder.pathSegment("info")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/jobs/ReactorJobs.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/jobs/ReactorJobs.java new file mode 100644 index 00000000000..71af3a33d3d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/jobs/ReactorJobs.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.jobs; + +import java.util.Map; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.Jobs; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Jobs} + */ +public final class ReactorJobs extends AbstractClientV2Operations implements Jobs { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorJobs( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetJobRequest request) { + return get( + request, + GetJobResponse.class, + builder -> builder.pathSegment("jobs", request.getJobId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/organizationquotadefinitions/ReactorOrganizationQuotaDefinitions.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/organizationquotadefinitions/ReactorOrganizationQuotaDefinitions.java new file mode 100644 index 00000000000..ff403ba090f --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/organizationquotadefinitions/ReactorOrganizationQuotaDefinitions.java @@ -0,0 +1,116 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.organizationquotadefinitions; + +import java.util.Map; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitions; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link OrganizationQuotaDefinitions} + */ +public final class ReactorOrganizationQuotaDefinitions extends AbstractClientV2Operations + implements OrganizationQuotaDefinitions { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorOrganizationQuotaDefinitions( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create( + CreateOrganizationQuotaDefinitionRequest request) { + return post( + request, + CreateOrganizationQuotaDefinitionResponse.class, + builder -> builder.pathSegment("quota_definitions")) + .checkpoint(); + } + + @Override + public Mono delete( + DeleteOrganizationQuotaDefinitionRequest request) { + return delete( + request, + DeleteOrganizationQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "quota_definitions", + request.getOrganizationQuotaDefinitionId())) + .checkpoint(); + } + + @Override + public Mono get( + GetOrganizationQuotaDefinitionRequest request) { + return get( + request, + GetOrganizationQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "quota_definitions", + request.getOrganizationQuotaDefinitionId())) + .checkpoint(); + } + + @Override + public Mono list( + ListOrganizationQuotaDefinitionsRequest request) { + return get( + request, + ListOrganizationQuotaDefinitionsResponse.class, + builder -> builder.pathSegment("quota_definitions")) + .checkpoint(); + } + + @Override + public Mono update( + UpdateOrganizationQuotaDefinitionRequest request) { + return put( + request, + UpdateOrganizationQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "quota_definitions", + request.getOrganizationQuotaDefinitionId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/organizations/ReactorOrganizations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/organizations/ReactorOrganizations.java new file mode 100644 index 00000000000..4cfd525a597 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/organizations/ReactorOrganizations.java @@ -0,0 +1,565 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.organizations; + +import java.util.Map; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationInstanceUsageRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationInstanceUsageResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationMemoryUsageRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationMemoryUsageResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationUserRolesRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationUserRolesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationServicesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationServicesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationUsersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationUsersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.Organizations; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.SummaryOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.SummaryOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Organizations} + */ +public final class ReactorOrganizations extends AbstractClientV2Operations + implements Organizations { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorOrganizations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateAuditor( + AssociateOrganizationAuditorRequest request) { + return put( + request, + AssociateOrganizationAuditorResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "auditors", + request.getAuditorId())) + .checkpoint(); + } + + @Override + public Mono associateAuditorByUsername( + AssociateOrganizationAuditorByUsernameRequest request) { + return put( + request, + AssociateOrganizationAuditorByUsernameResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "auditors")) + .checkpoint(); + } + + @Override + public Mono associateBillingManager( + AssociateOrganizationBillingManagerRequest request) { + return put( + request, + AssociateOrganizationBillingManagerResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "billing_managers", + request.getBillingManagerId())) + .checkpoint(); + } + + @Override + public Mono + associateBillingManagerByUsername( + AssociateOrganizationBillingManagerByUsernameRequest request) { + return put( + request, + AssociateOrganizationBillingManagerByUsernameResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "billing_managers")) + .checkpoint(); + } + + @Override + public Mono associateManager( + AssociateOrganizationManagerRequest request) { + return put( + request, + AssociateOrganizationManagerResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "managers", + request.getManagerId())) + .checkpoint(); + } + + @Override + public Mono associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest request) { + return put( + request, + AssociateOrganizationManagerByUsernameResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "managers")) + .checkpoint(); + } + + @Override + public Mono associatePrivateDomain( + AssociateOrganizationPrivateDomainRequest request) { + return put( + request, + AssociateOrganizationPrivateDomainResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "private_domains", + request.getPrivateDomainId())) + .checkpoint(); + } + + @Override + public Mono associateUser( + AssociateOrganizationUserRequest request) { + return put( + request, + AssociateOrganizationUserResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "users", + request.getUserId())) + .checkpoint(); + } + + @Override + public Mono associateUserByUsername( + AssociateOrganizationUserByUsernameRequest request) { + return put( + request, + AssociateOrganizationUserByUsernameResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "users")) + .checkpoint(); + } + + @Override + public Mono create(CreateOrganizationRequest request) { + return post( + request, + CreateOrganizationResponse.class, + builder -> builder.pathSegment("organizations")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteOrganizationRequest request) { + return delete( + request, + DeleteOrganizationResponse.class, + builder -> + builder.pathSegment("organizations", request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono get(GetOrganizationRequest request) { + return get( + request, + GetOrganizationResponse.class, + builder -> + builder.pathSegment("organizations", request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono getInstanceUsage( + GetOrganizationInstanceUsageRequest request) { + return get( + request, + GetOrganizationInstanceUsageResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "instance_usage")) + .checkpoint(); + } + + @Override + public Mono getMemoryUsage( + GetOrganizationMemoryUsageRequest request) { + return get( + request, + GetOrganizationMemoryUsageResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "memory_usage")) + .checkpoint(); + } + + @Override + public Mono getUserRoles( + GetOrganizationUserRolesRequest request) { + return get( + request, + GetOrganizationUserRolesResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "user_roles")) + .checkpoint(); + } + + @Override + public Mono list(ListOrganizationsRequest request) { + return get( + request, + ListOrganizationsResponse.class, + builder -> builder.pathSegment("organizations")) + .checkpoint(); + } + + @Override + public Mono listAuditors( + ListOrganizationAuditorsRequest request) { + return get( + request, + ListOrganizationAuditorsResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "auditors")) + .checkpoint(); + } + + @Override + public Mono listBillingManagers( + ListOrganizationBillingManagersRequest request) { + return get( + request, + ListOrganizationBillingManagersResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "billing_managers")) + .checkpoint(); + } + + @Override + @SuppressWarnings("deprecation") + public Mono listDomains( + ListOrganizationDomainsRequest request) { + return get( + request, + ListOrganizationDomainsResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "domains")) + .checkpoint(); + } + + @Override + public Mono listManagers( + ListOrganizationManagersRequest request) { + return get( + request, + ListOrganizationManagersResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "managers")) + .checkpoint(); + } + + @Override + public Mono listPrivateDomains( + ListOrganizationPrivateDomainsRequest request) { + return get( + request, + ListOrganizationPrivateDomainsResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "private_domains")) + .checkpoint(); + } + + @Override + public Mono listServices( + ListOrganizationServicesRequest request) { + return get( + request, + ListOrganizationServicesResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "services")) + .checkpoint(); + } + + @Override + public Mono listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest request) { + return get( + request, + ListOrganizationSpaceQuotaDefinitionsResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "space_quota_definitions")) + .checkpoint(); + } + + @Override + public Mono listSpaces(ListOrganizationSpacesRequest request) { + return get( + request, + ListOrganizationSpacesResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "spaces")) + .checkpoint(); + } + + @Override + public Mono listUsers(ListOrganizationUsersRequest request) { + return get( + request, + ListOrganizationUsersResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "users")) + .checkpoint(); + } + + @Override + public Mono removeAuditor(RemoveOrganizationAuditorRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "auditors", + request.getAuditorId())) + .checkpoint(); + } + + @Override + public Mono removeAuditorByUsername(RemoveOrganizationAuditorByUsernameRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "auditors")) + .checkpoint(); + } + + @Override + public Mono removeBillingManager(RemoveOrganizationBillingManagerRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "billing_managers", + request.getBillingManagerId())) + .checkpoint(); + } + + @Override + public Mono removeBillingManagerByUsername( + RemoveOrganizationBillingManagerByUsernameRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "billing_managers")) + .checkpoint(); + } + + @Override + public Mono removeManager(RemoveOrganizationManagerRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "managers", + request.getManagerId())) + .checkpoint(); + } + + @Override + public Mono removeManagerByUsername(RemoveOrganizationManagerByUsernameRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "managers")) + .checkpoint(); + } + + @Override + public Mono removePrivateDomain(RemoveOrganizationPrivateDomainRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "private_domains", + request.getPrivateDomainId())) + .checkpoint(); + } + + @Override + public Mono removeUser(RemoveOrganizationUserRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "users", + request.getUserId())) + .checkpoint(); + } + + @Override + public Mono removeUserByUsername(RemoveOrganizationUserByUsernameRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "users")) + .checkpoint(); + } + + @Override + public Mono summary(SummaryOrganizationRequest request) { + return get( + request, + SummaryOrganizationResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "summary")) + .checkpoint(); + } + + @Override + public Mono update(UpdateOrganizationRequest request) { + return put( + request, + UpdateOrganizationResponse.class, + builder -> + builder.pathSegment("organizations", request.getOrganizationId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/privatedomains/ReactorPrivateDomains.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/privatedomains/ReactorPrivateDomains.java new file mode 100644 index 00000000000..3b24c578c3d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/privatedomains/ReactorPrivateDomains.java @@ -0,0 +1,111 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.privatedomains; + +import java.util.Map; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.GetPrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.GetPrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainSharedOrganizationsRequest; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainSharedOrganizationsResponse; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsRequest; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomains; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link PrivateDomains} + */ +public final class ReactorPrivateDomains extends AbstractClientV2Operations + implements PrivateDomains { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorPrivateDomains( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreatePrivateDomainRequest request) { + return post( + request, + CreatePrivateDomainResponse.class, + builder -> builder.pathSegment("private_domains")) + .checkpoint(); + } + + @Override + public Mono delete(DeletePrivateDomainRequest request) { + return delete( + request, + DeletePrivateDomainResponse.class, + builder -> + builder.pathSegment( + "private_domains", request.getPrivateDomainId())) + .checkpoint(); + } + + @Override + public Mono get(GetPrivateDomainRequest request) { + return get( + request, + GetPrivateDomainResponse.class, + builder -> + builder.pathSegment( + "private_domains", request.getPrivateDomainId())) + .checkpoint(); + } + + @Override + public Mono list(ListPrivateDomainsRequest request) { + return get( + request, + ListPrivateDomainsResponse.class, + builder -> builder.pathSegment("private_domains")) + .checkpoint(); + } + + @Override + public Mono listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest request) { + return get( + request, + ListPrivateDomainSharedOrganizationsResponse.class, + builder -> + builder.pathSegment( + "private_domains", + request.getPrivateDomainId(), + "shared_organizations")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/resourcematch/ReactorResourceMatch.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/resourcematch/ReactorResourceMatch.java new file mode 100644 index 00000000000..48582d1cfee --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/resourcematch/ReactorResourceMatch.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.resourcematch; + +import java.util.Map; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesRequest; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v2.resourcematch.ResourceMatch; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ResourceMatch} + */ +public final class ReactorResourceMatch extends AbstractClientV2Operations + implements ResourceMatch { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorResourceMatch( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono list(ListMatchingResourcesRequest request) { + return put( + request, + ListMatchingResourcesResponse.class, + builder -> builder.pathSegment("resource_match")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/routemappings/ReactorRouteMappings.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/routemappings/ReactorRouteMappings.java new file mode 100644 index 00000000000..60a767aca32 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/routemappings/ReactorRouteMappings.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.routemappings; + +import java.util.Map; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.DeleteRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.DeleteRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.GetRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.GetRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.ListRouteMappingsRequest; +import org.cloudfoundry.client.v2.routemappings.ListRouteMappingsResponse; +import org.cloudfoundry.client.v2.routemappings.RouteMappings; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link RouteMappings} + */ +public final class ReactorRouteMappings extends AbstractClientV2Operations + implements RouteMappings { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorRouteMappings( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateRouteMappingRequest request) { + return post( + request, + CreateRouteMappingResponse.class, + builder -> builder.pathSegment("route_mappings")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteRouteMappingRequest request) { + return delete( + request, + DeleteRouteMappingResponse.class, + builder -> + builder.pathSegment("route_mappings", request.getRouteMappingId())) + .checkpoint(); + } + + @Override + public Mono get(GetRouteMappingRequest request) { + return get( + request, + GetRouteMappingResponse.class, + builder -> + builder.pathSegment("route_mappings", request.getRouteMappingId())) + .checkpoint(); + } + + @Override + public Mono list(ListRouteMappingsRequest request) { + return get( + request, + ListRouteMappingsResponse.class, + builder -> builder.pathSegment("route_mappings")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/routes/ReactorRoutes.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/routes/ReactorRoutes.java new file mode 100644 index 00000000000..dff421bbd0a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/routes/ReactorRoutes.java @@ -0,0 +1,174 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.routes; + +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v2.routes.DeleteRouteResponse; +import org.cloudfoundry.client.v2.routes.GetRouteRequest; +import org.cloudfoundry.client.v2.routes.GetRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsRequest; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsResponse; +import org.cloudfoundry.client.v2.routes.ListRouteMappingsRequest; +import org.cloudfoundry.client.v2.routes.ListRouteMappingsResponse; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.ListRoutesResponse; +import org.cloudfoundry.client.v2.routes.RemoveRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.RouteExistsRequest; +import org.cloudfoundry.client.v2.routes.Routes; +import org.cloudfoundry.client.v2.routes.UpdateRouteRequest; +import org.cloudfoundry.client.v2.routes.UpdateRouteResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import org.cloudfoundry.util.ExceptionUtils; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Routes} + */ +public final class ReactorRoutes extends AbstractClientV2Operations implements Routes { + + private static final int CF_NOT_FOUND = 10000; + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorRoutes( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateApplication( + AssociateRouteApplicationRequest request) { + return put( + request, + AssociateRouteApplicationResponse.class, + builder -> + builder.pathSegment( + "routes", + request.getRouteId(), + "apps", + request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono create(CreateRouteRequest request) { + return post(request, CreateRouteResponse.class, builder -> builder.pathSegment("routes")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteRouteRequest request) { + return delete( + request, + DeleteRouteResponse.class, + builder -> builder.pathSegment("routes", request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono exists(RouteExistsRequest request) { + return get( + request, + Boolean.class, + builder -> { + builder.pathSegment( + "routes", "reserved", "domain", request.getDomainId()); + Optional.ofNullable(request.getHost()) + .ifPresent(host -> builder.pathSegment("host", host)); + return builder; + }) + .defaultIfEmpty(true) + .onErrorResume(ExceptionUtils.statusCode(CF_NOT_FOUND), t -> Mono.just(false)) + .checkpoint(); + } + + @Override + public Mono get(GetRouteRequest request) { + return get( + request, + GetRouteResponse.class, + builder -> builder.pathSegment("routes", request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono list(ListRoutesRequest request) { + return get(request, ListRoutesResponse.class, builder -> builder.pathSegment("routes")) + .checkpoint(); + } + + @Override + public Mono listApplications( + ListRouteApplicationsRequest request) { + return get( + request, + ListRouteApplicationsResponse.class, + builder -> builder.pathSegment("routes", request.getRouteId(), "apps")) + .checkpoint(); + } + + @Override + public Mono listMappings(ListRouteMappingsRequest request) { + return get( + request, + ListRouteMappingsResponse.class, + builder -> + builder.pathSegment( + "routes", request.getRouteId(), "route_mappings")) + .checkpoint(); + } + + @Override + public Mono removeApplication(RemoveRouteApplicationRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "routes", + request.getRouteId(), + "apps", + request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateRouteRequest request) { + return put( + request, + UpdateRouteResponse.class, + builder -> builder.pathSegment("routes", request.getRouteId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/securitygroups/ReactorSecurityGroups.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/securitygroups/ReactorSecurityGroups.java new file mode 100644 index 00000000000..ff763ec7c01 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/securitygroups/ReactorSecurityGroups.java @@ -0,0 +1,237 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.securitygroups; + +import java.util.Map; +import org.cloudfoundry.client.v2.securitygroups.AssociateSecurityGroupSpaceRequest; +import org.cloudfoundry.client.v2.securitygroups.AssociateSecurityGroupSpaceResponse; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.DeleteSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.GetSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.GetSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupRunningDefaultsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupRunningDefaultsResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupSpacesRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupSpacesResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupStagingDefaultsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupStagingDefaultsResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsResponse; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupRunningDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupSpaceRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupStagingDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroups; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupRunningDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupRunningDefaultResponse; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupStagingDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupStagingDefaultResponse; +import org.cloudfoundry.client.v2.securitygroups.UpdateSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.UpdateSecurityGroupResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link SecurityGroups} + */ +public class ReactorSecurityGroups extends AbstractClientV2Operations implements SecurityGroups { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSecurityGroups( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateSpace( + AssociateSecurityGroupSpaceRequest request) { + return put( + request, + AssociateSecurityGroupSpaceResponse.class, + builder -> + builder.pathSegment( + "security_groups", + request.getSecurityGroupId(), + "spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono create(CreateSecurityGroupRequest request) { + return post( + request, + CreateSecurityGroupResponse.class, + builder -> builder.pathSegment("security_groups")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSecurityGroupRequest request) { + return delete( + request, + DeleteSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono get(GetSecurityGroupRequest request) { + return get( + request, + GetSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono list(ListSecurityGroupsRequest request) { + return get( + request, + ListSecurityGroupsResponse.class, + builder -> builder.pathSegment("security_groups")) + .checkpoint(); + } + + @Override + public Mono listRunningDefaults( + ListSecurityGroupRunningDefaultsRequest request) { + return get( + request, + ListSecurityGroupRunningDefaultsResponse.class, + builder -> builder.pathSegment("config", "running_security_groups")) + .checkpoint(); + } + + @Override + public Mono listSpaces( + ListSecurityGroupSpacesRequest request) { + return get( + request, + ListSecurityGroupSpacesResponse.class, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId(), "spaces")) + .checkpoint(); + } + + @Override + public Mono listStagingDefaults( + ListSecurityGroupStagingDefaultsRequest request) { + return get( + request, + ListSecurityGroupStagingDefaultsResponse.class, + builder -> builder.pathSegment("config", "staging_security_groups")) + .checkpoint(); + } + + @Override + public Mono removeRunningDefault(RemoveSecurityGroupRunningDefaultRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "config", + "running_security_groups", + request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono removeSpace(RemoveSecurityGroupSpaceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "security_groups", + request.getSecurityGroupId(), + "spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono removeStagingDefault(RemoveSecurityGroupStagingDefaultRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "config", + "staging_security_groups", + request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono setRunningDefault( + SetSecurityGroupRunningDefaultRequest request) { + return put( + request, + SetSecurityGroupRunningDefaultResponse.class, + builder -> + builder.pathSegment( + "config", + "running_security_groups", + request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono setStagingDefault( + SetSecurityGroupStagingDefaultRequest request) { + return put( + request, + SetSecurityGroupStagingDefaultResponse.class, + builder -> + builder.pathSegment( + "config", + "staging_security_groups", + request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateSecurityGroupRequest request) { + return put( + request, + UpdateSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicebindings/ReactorServiceBindingsV2.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicebindings/ReactorServiceBindingsV2.java new file mode 100644 index 00000000000..0cff4cb464a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicebindings/ReactorServiceBindingsV2.java @@ -0,0 +1,111 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.servicebindings; + +import java.util.Map; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingParametersRequest; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingParametersResponse; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingsV2; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceBindingsV2} + */ +public final class ReactorServiceBindingsV2 extends AbstractClientV2Operations + implements ServiceBindingsV2 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceBindingsV2( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateServiceBindingRequest request) { + return post( + request, + CreateServiceBindingResponse.class, + builder -> builder.pathSegment("service_bindings")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteServiceBindingRequest request) { + return delete( + request, + DeleteServiceBindingResponse.class, + builder -> + builder.pathSegment( + "service_bindings", request.getServiceBindingId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceBindingRequest request) { + return get( + request, + GetServiceBindingResponse.class, + builder -> + builder.pathSegment( + "service_bindings", request.getServiceBindingId())) + .checkpoint(); + } + + @Override + public Mono getParameters( + GetServiceBindingParametersRequest request) { + return get( + request, + GetServiceBindingParametersResponse.class, + builder -> + builder.pathSegment( + "service_bindings", + request.getServiceBindingId(), + "parameters")) + .checkpoint(); + } + + @Override + public Mono list(ListServiceBindingsRequest request) { + return get( + request, + ListServiceBindingsResponse.class, + builder -> builder.pathSegment("service_bindings")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicebrokers/ReactorServiceBrokers.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicebrokers/ReactorServiceBrokers.java new file mode 100644 index 00000000000..f8fb8b9754b --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicebrokers/ReactorServiceBrokers.java @@ -0,0 +1,107 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.servicebrokers; + +import java.util.Map; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerResponse; +import org.cloudfoundry.client.v2.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.GetServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.GetServiceBrokerResponse; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersResponse; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokers; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceBrokers} + */ +public final class ReactorServiceBrokers extends AbstractClientV2Operations + implements ServiceBrokers { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceBrokers( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateServiceBrokerRequest request) { + return post( + request, + CreateServiceBrokerResponse.class, + builder -> builder.pathSegment("service_brokers")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteServiceBrokerRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "service_brokers", request.getServiceBrokerId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceBrokerRequest request) { + return get( + request, + GetServiceBrokerResponse.class, + builder -> + builder.pathSegment( + "service_brokers", request.getServiceBrokerId())) + .checkpoint(); + } + + @Override + public Mono list(ListServiceBrokersRequest request) { + return get( + request, + ListServiceBrokersResponse.class, + builder -> builder.pathSegment("service_brokers")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceBrokerRequest request) { + return put( + request, + UpdateServiceBrokerResponse.class, + builder -> + builder.pathSegment( + "service_brokers", request.getServiceBrokerId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceinstances/ReactorServiceInstances.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceinstances/ReactorServiceInstances.java new file mode 100644 index 00000000000..7a48582cf42 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceinstances/ReactorServiceInstances.java @@ -0,0 +1,220 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceinstances; + +import java.util.Map; +import org.cloudfoundry.client.v2.serviceinstances.BindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.serviceinstances.BindServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceParametersRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceParametersResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstancePermissionsRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstancePermissionsResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceRoutesResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceBindingsResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesResponse; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstances; +import org.cloudfoundry.client.v2.serviceinstances.UnbindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceInstances} + */ +public final class ReactorServiceInstances extends AbstractClientV2Operations + implements ServiceInstances { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceInstances( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono bindRoute( + BindServiceInstanceRouteRequest request) { + return put( + request, + BindServiceInstanceRouteResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "routes", + request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono create(CreateServiceInstanceRequest request) { + return post( + request, + CreateServiceInstanceResponse.class, + builder -> builder.pathSegment("service_instances")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteServiceInstanceRequest request) { + return delete( + request, + DeleteServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "service_instances", request.getServiceInstanceId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceInstanceRequest request) { + return get( + request, + GetServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "service_instances", request.getServiceInstanceId())) + .checkpoint(); + } + + @Override + public Mono getParameters( + GetServiceInstanceParametersRequest request) { + return get( + request, + GetServiceInstanceParametersResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "parameters")) + .checkpoint(); + } + + @Override + public Mono getPermissions( + GetServiceInstancePermissionsRequest request) { + return get( + request, + GetServiceInstancePermissionsResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "permissions")) + .checkpoint(); + } + + @Override + public Mono list(ListServiceInstancesRequest request) { + return get( + request, + ListServiceInstancesResponse.class, + builder -> builder.pathSegment("service_instances")) + .checkpoint(); + } + + @Override + public Mono listRoutes( + ListServiceInstanceRoutesRequest request) { + return get( + request, + ListServiceInstanceRoutesResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "routes")) + .checkpoint(); + } + + @Override + public Mono listServiceBindings( + ListServiceInstanceServiceBindingsRequest request) { + return get( + request, + ListServiceInstanceServiceBindingsResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "service_bindings")) + .checkpoint(); + } + + @Override + public Mono listServiceKeys( + ListServiceInstanceServiceKeysRequest request) { + return get( + request, + ListServiceInstanceServiceKeysResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "service_keys")) + .checkpoint(); + } + + @Override + public Mono unbindRoute(UnbindServiceInstanceRouteRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "routes", + request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceInstanceRequest request) { + return put( + request, + UpdateServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "service_instances", request.getServiceInstanceId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicekeys/ReactorServiceKeys.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicekeys/ReactorServiceKeys.java new file mode 100644 index 00000000000..372b4634311 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/servicekeys/ReactorServiceKeys.java @@ -0,0 +1,90 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.servicekeys; + +import java.util.Map; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstances; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.DeleteServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.GetServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.GetServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.ListServiceKeysRequest; +import org.cloudfoundry.client.v2.servicekeys.ListServiceKeysResponse; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeys; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceInstances} + */ +public final class ReactorServiceKeys extends AbstractClientV2Operations implements ServiceKeys { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceKeys( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateServiceKeyRequest request) { + return post( + request, + CreateServiceKeyResponse.class, + builder -> builder.pathSegment("service_keys")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteServiceKeyRequest request) { + return delete( + request, + Void.class, + builder -> builder.pathSegment("service_keys", request.getServiceKeyId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceKeyRequest request) { + return get( + request, + GetServiceKeyResponse.class, + builder -> builder.pathSegment("service_keys", request.getServiceKeyId())) + .checkpoint(); + } + + @Override + public Mono list(ListServiceKeysRequest request) { + return get( + request, + ListServiceKeysResponse.class, + builder -> builder.pathSegment("service_keys")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceplans/ReactorServicePlans.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceplans/ReactorServicePlans.java new file mode 100644 index 00000000000..adf914550f2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceplans/ReactorServicePlans.java @@ -0,0 +1,106 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceplans; + +import java.util.Map; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlanServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlanServiceInstancesResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansResponse; +import org.cloudfoundry.client.v2.serviceplans.ServicePlans; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServicePlans} + */ +public final class ReactorServicePlans extends AbstractClientV2Operations implements ServicePlans { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServicePlans( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono delete(DeleteServicePlanRequest request) { + return delete( + request, + DeleteServicePlanResponse.class, + builder -> builder.pathSegment("service_plans", request.getServicePlanId())) + .checkpoint(); + } + + @Override + public Mono get(GetServicePlanRequest request) { + return get( + request, + GetServicePlanResponse.class, + builder -> builder.pathSegment("service_plans", request.getServicePlanId())) + .checkpoint(); + } + + @Override + public Mono list(ListServicePlansRequest request) { + return get( + request, + ListServicePlansResponse.class, + builder -> builder.pathSegment("service_plans")) + .checkpoint(); + } + + @Override + public Mono listServiceInstances( + ListServicePlanServiceInstancesRequest request) { + return get( + request, + ListServicePlanServiceInstancesResponse.class, + builder -> + builder.pathSegment( + "service_plans", + request.getServicePlanId(), + "service_instances")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServicePlanRequest request) { + return put( + request, + UpdateServicePlanResponse.class, + builder -> builder.pathSegment("service_plans", request.getServicePlanId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceplanvisibilities/ReactorServicePlanVisibilities.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceplanvisibilities/ReactorServicePlanVisibilities.java new file mode 100644 index 00000000000..97412c0488b --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceplanvisibilities/ReactorServicePlanVisibilities.java @@ -0,0 +1,115 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceplanvisibilities; + +import java.util.Map; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.GetServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.GetServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilities; +import org.cloudfoundry.client.v2.serviceplanvisibilities.UpdateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.UpdateServicePlanVisibilityResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServicePlanVisibilities} + */ +public final class ReactorServicePlanVisibilities extends AbstractClientV2Operations + implements ServicePlanVisibilities { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServicePlanVisibilities( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create( + CreateServicePlanVisibilityRequest request) { + return post( + request, + CreateServicePlanVisibilityResponse.class, + builder -> builder.pathSegment("service_plan_visibilities")) + .checkpoint(); + } + + @Override + public Mono delete( + DeleteServicePlanVisibilityRequest request) { + return delete( + request, + DeleteServicePlanVisibilityResponse.class, + builder -> + builder.pathSegment( + "service_plan_visibilities", + request.getServicePlanVisibilityId())) + .checkpoint(); + } + + @Override + public Mono get(GetServicePlanVisibilityRequest request) { + return get( + request, + GetServicePlanVisibilityResponse.class, + builder -> + builder.pathSegment( + "service_plan_visibilities", + request.getServicePlanVisibilityId())) + .checkpoint(); + } + + @Override + public Mono list( + ListServicePlanVisibilitiesRequest request) { + return get( + request, + ListServicePlanVisibilitiesResponse.class, + builder -> builder.pathSegment("service_plan_visibilities")) + .checkpoint(); + } + + @Override + public Mono update( + UpdateServicePlanVisibilityRequest request) { + return put( + request, + UpdateServicePlanVisibilityResponse.class, + builder -> + builder.pathSegment( + "service_plan_visibilities", + request.getServicePlanVisibilityId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/services/ReactorServices.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/services/ReactorServices.java new file mode 100644 index 00000000000..4a569a80d5a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/services/ReactorServices.java @@ -0,0 +1,90 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.services; + +import java.util.Map; +import org.cloudfoundry.client.v2.services.DeleteServiceRequest; +import org.cloudfoundry.client.v2.services.DeleteServiceResponse; +import org.cloudfoundry.client.v2.services.GetServiceRequest; +import org.cloudfoundry.client.v2.services.GetServiceResponse; +import org.cloudfoundry.client.v2.services.ListServiceServicePlansRequest; +import org.cloudfoundry.client.v2.services.ListServiceServicePlansResponse; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ListServicesResponse; +import org.cloudfoundry.client.v2.services.Services; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Services} + */ +public final class ReactorServices extends AbstractClientV2Operations implements Services { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServices( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono delete(DeleteServiceRequest request) { + return delete( + request, + DeleteServiceResponse.class, + builder -> builder.pathSegment("services", request.getServiceId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceRequest request) { + return get( + request, + GetServiceResponse.class, + builder -> builder.pathSegment("services", request.getServiceId())) + .checkpoint(); + } + + @Override + public Mono list(ListServicesRequest request) { + return get(request, ListServicesResponse.class, builder -> builder.pathSegment("services")) + .checkpoint(); + } + + @Override + public Mono listServicePlans( + ListServiceServicePlansRequest request) { + return get( + request, + ListServiceServicePlansResponse.class, + builder -> + builder.pathSegment( + "services", request.getServiceId(), "service_plans")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceusageevents/ReactorServiceUsageEvents.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceusageevents/ReactorServiceUsageEvents.java new file mode 100644 index 00000000000..810d9c0bb4d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/serviceusageevents/ReactorServiceUsageEvents.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceusageevents; + +import java.util.Map; +import org.cloudfoundry.client.v2.serviceusageevents.GetServiceUsageEventRequest; +import org.cloudfoundry.client.v2.serviceusageevents.GetServiceUsageEventResponse; +import org.cloudfoundry.client.v2.serviceusageevents.ListServiceUsageEventsRequest; +import org.cloudfoundry.client.v2.serviceusageevents.ListServiceUsageEventsResponse; +import org.cloudfoundry.client.v2.serviceusageevents.PurgeAndReseedServiceUsageEventsRequest; +import org.cloudfoundry.client.v2.serviceusageevents.ServiceUsageEvents; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceUsageEvents} + */ +public final class ReactorServiceUsageEvents extends AbstractClientV2Operations + implements ServiceUsageEvents { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceUsageEvents( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetServiceUsageEventRequest request) { + return get( + request, + GetServiceUsageEventResponse.class, + builder -> + builder.pathSegment( + "service_usage_events", request.getServiceUsageEventId())) + .checkpoint(); + } + + @Override + public Mono list(ListServiceUsageEventsRequest request) { + return get( + request, + ListServiceUsageEventsResponse.class, + builder -> builder.pathSegment("service_usage_events")) + .checkpoint(); + } + + @Override + public Mono purgeAndReseed(PurgeAndReseedServiceUsageEventsRequest request) { + return post( + request, + Void.class, + builder -> + builder.pathSegment( + "service_usage_events", + "destructively_purge_all_and_reseed_existing_instances")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/shareddomains/ReactorSharedDomains.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/shareddomains/ReactorSharedDomains.java new file mode 100644 index 00000000000..21e53059914 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/shareddomains/ReactorSharedDomains.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.shareddomains; + +import java.util.Map; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.DeleteSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.DeleteSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomains; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link SharedDomains} + */ +public final class ReactorSharedDomains extends AbstractClientV2Operations + implements SharedDomains { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSharedDomains( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateSharedDomainRequest request) { + return post( + request, + CreateSharedDomainResponse.class, + builder -> builder.pathSegment("shared_domains")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSharedDomainRequest request) { + return delete( + request, + DeleteSharedDomainResponse.class, + builder -> + builder.pathSegment("shared_domains", request.getSharedDomainId())) + .checkpoint(); + } + + @Override + public Mono get(GetSharedDomainRequest request) { + return get( + request, + GetSharedDomainResponse.class, + builder -> + builder.pathSegment("shared_domains", request.getSharedDomainId())) + .checkpoint(); + } + + @Override + public Mono list(ListSharedDomainsRequest request) { + return get( + request, + ListSharedDomainsResponse.class, + builder -> builder.pathSegment("shared_domains")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/spacequotadefinitions/ReactorSpaceQuotaDefinitions.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/spacequotadefinitions/ReactorSpaceQuotaDefinitions.java new file mode 100644 index 00000000000..9a83379990c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/spacequotadefinitions/ReactorSpaceQuotaDefinitions.java @@ -0,0 +1,162 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.spacequotadefinitions; + +import java.util.Map; +import org.cloudfoundry.client.v2.spacequotadefinitions.AssociateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.AssociateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.CreateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.CreateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.DeleteSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.DeleteSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionSpacesRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionSpacesResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.RemoveSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitions; +import org.cloudfoundry.client.v2.spacequotadefinitions.UpdateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.UpdateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link SpaceQuotaDefinitions} + */ +public final class ReactorSpaceQuotaDefinitions extends AbstractClientV2Operations + implements SpaceQuotaDefinitions { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSpaceQuotaDefinitions( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateSpace( + AssociateSpaceQuotaDefinitionRequest request) { + return put( + request, + AssociateSpaceQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "space_quota_definitions", + request.getSpaceQuotaDefinitionId(), + "spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono create( + CreateSpaceQuotaDefinitionRequest request) { + return post( + request, + CreateSpaceQuotaDefinitionResponse.class, + builder -> builder.pathSegment("space_quota_definitions")) + .checkpoint(); + } + + @Override + public Mono delete( + DeleteSpaceQuotaDefinitionRequest request) { + return delete( + request, + DeleteSpaceQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "space_quota_definitions", + request.getSpaceQuotaDefinitionId())) + .checkpoint(); + } + + @Override + public Mono get(GetSpaceQuotaDefinitionRequest request) { + return get( + request, + GetSpaceQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "space_quota_definitions", + request.getSpaceQuotaDefinitionId())) + .checkpoint(); + } + + @Override + public Mono list(ListSpaceQuotaDefinitionsRequest request) { + return get( + request, + ListSpaceQuotaDefinitionsResponse.class, + builder -> builder.pathSegment("space_quota_definitions")) + .checkpoint(); + } + + @Override + public Mono listSpaces( + ListSpaceQuotaDefinitionSpacesRequest request) { + return get( + request, + ListSpaceQuotaDefinitionSpacesResponse.class, + builder -> + builder.pathSegment( + "space_quota_definitions", + request.getSpaceQuotaDefinitionId(), + "spaces")) + .checkpoint(); + } + + @Override + public Mono removeSpace(RemoveSpaceQuotaDefinitionRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "space_quota_definitions", + request.getSpaceQuotaDefinitionId(), + "spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono update( + UpdateSpaceQuotaDefinitionRequest request) { + return put( + request, + UpdateSpaceQuotaDefinitionResponse.class, + builder -> + builder.pathSegment( + "space_quota_definitions", + request.getSpaceQuotaDefinitionId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/spaces/ReactorSpaces.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/spaces/ReactorSpaces.java new file mode 100644 index 00000000000..0dbc69fa688 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/spaces/ReactorSpaces.java @@ -0,0 +1,439 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.spaces; + +import java.util.Map; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceSecurityGroupResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceDomainsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDomainsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceEventsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceEventsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceUserRolesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceUserRolesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.Spaces; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Spaces} + */ +public final class ReactorSpaces extends AbstractClientV2Operations implements Spaces { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSpaces( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateAuditor( + AssociateSpaceAuditorRequest request) { + return put( + request, + AssociateSpaceAuditorResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "auditors", + request.getAuditorId())) + .checkpoint(); + } + + @Override + public Mono associateAuditorByUsername( + AssociateSpaceAuditorByUsernameRequest request) { + return put( + request, + AssociateSpaceAuditorByUsernameResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "auditors")) + .checkpoint(); + } + + @Override + public Mono associateDeveloper( + AssociateSpaceDeveloperRequest request) { + return put( + request, + AssociateSpaceDeveloperResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "developers", + request.getDeveloperId())) + .checkpoint(); + } + + @Override + public Mono associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest request) { + return put( + request, + AssociateSpaceDeveloperByUsernameResponse.class, + builder -> + builder.pathSegment("spaces", request.getSpaceId(), "developers")) + .checkpoint(); + } + + @Override + public Mono associateManager( + AssociateSpaceManagerRequest request) { + return put( + request, + AssociateSpaceManagerResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "managers", + request.getManagerId())) + .checkpoint(); + } + + @Override + public Mono associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest request) { + return put( + request, + AssociateSpaceManagerByUsernameResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "managers")) + .checkpoint(); + } + + @Override + public Mono associateSecurityGroup( + AssociateSpaceSecurityGroupRequest request) { + return put( + request, + AssociateSpaceSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "security_groups", + request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono create(CreateSpaceRequest request) { + return post(request, CreateSpaceResponse.class, builder -> builder.pathSegment("spaces")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSpaceRequest request) { + return delete( + request, + DeleteSpaceResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono get(GetSpaceRequest request) { + return get( + request, + GetSpaceResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono getSummary(GetSpaceSummaryRequest request) { + return get( + request, + GetSpaceSummaryResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "summary")) + .checkpoint(); + } + + @Override + public Mono list(ListSpacesRequest request) { + return get(request, ListSpacesResponse.class, builder -> builder.pathSegment("spaces")) + .checkpoint(); + } + + @Override + public Mono listApplications( + ListSpaceApplicationsRequest request) { + return get( + request, + ListSpaceApplicationsResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "apps")) + .checkpoint(); + } + + @Override + public Mono listAuditors(ListSpaceAuditorsRequest request) { + return get( + request, + ListSpaceAuditorsResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "auditors")) + .checkpoint(); + } + + @Override + public Mono listDevelopers(ListSpaceDevelopersRequest request) { + return get( + request, + ListSpaceDevelopersResponse.class, + builder -> + builder.pathSegment("spaces", request.getSpaceId(), "developers")) + .checkpoint(); + } + + @Override + @SuppressWarnings("deprecation") + public Mono listDomains(ListSpaceDomainsRequest request) { + return get( + request, + ListSpaceDomainsResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "domains")) + .checkpoint(); + } + + @Override + public Mono listEvents(ListSpaceEventsRequest request) { + return get( + request, + ListSpaceEventsResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "events")) + .checkpoint(); + } + + @Override + public Mono listManagers(ListSpaceManagersRequest request) { + return get( + request, + ListSpaceManagersResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "managers")) + .checkpoint(); + } + + @Override + public Mono listRoutes(ListSpaceRoutesRequest request) { + return get( + request, + ListSpaceRoutesResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "routes")) + .checkpoint(); + } + + @Override + public Mono listSecurityGroups( + ListSpaceSecurityGroupsRequest request) { + return get( + request, + ListSpaceSecurityGroupsResponse.class, + builder -> + builder.pathSegment( + "spaces", request.getSpaceId(), "security_groups")) + .checkpoint(); + } + + @Override + public Mono listServiceInstances( + ListSpaceServiceInstancesRequest request) { + return get( + request, + ListSpaceServiceInstancesResponse.class, + builder -> + builder.pathSegment( + "spaces", request.getSpaceId(), "service_instances")) + .checkpoint(); + } + + @Override + public Mono listServices(ListSpaceServicesRequest request) { + return get( + request, + ListSpaceServicesResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "services")) + .checkpoint(); + } + + @Override + public Mono listUserRoles(ListSpaceUserRolesRequest request) { + return get( + request, + ListSpaceUserRolesResponse.class, + builder -> + builder.pathSegment("spaces", request.getSpaceId(), "user_roles")) + .checkpoint(); + } + + @Override + public Mono removeAuditor(RemoveSpaceAuditorRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "auditors", + request.getAuditorId())) + .checkpoint(); + } + + @Override + public Mono removeAuditorByUsername( + RemoveSpaceAuditorByUsernameRequest request) { + return delete( + request, + RemoveSpaceAuditorByUsernameResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "auditors")) + .checkpoint(); + } + + @Override + public Mono removeDeveloper(RemoveSpaceDeveloperRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "developers", + request.getDeveloperId())) + .checkpoint(); + } + + @Override + public Mono removeDeveloperByUsername( + RemoveSpaceDeveloperByUsernameRequest request) { + return delete( + request, + RemoveSpaceDeveloperByUsernameResponse.class, + builder -> + builder.pathSegment("spaces", request.getSpaceId(), "developers")) + .checkpoint(); + } + + @Override + public Mono removeManager(RemoveSpaceManagerRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "managers", + request.getManagerId())) + .checkpoint(); + } + + @Override + public Mono removeManagerByUsername( + RemoveSpaceManagerByUsernameRequest request) { + return delete( + request, + RemoveSpaceManagerByUsernameResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId(), "managers")) + .checkpoint(); + } + + @Override + public Mono removeSecurityGroup(RemoveSpaceSecurityGroupRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "security_groups", + request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateSpaceRequest request) { + return put( + request, + UpdateSpaceResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/stacks/ReactorStacks.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/stacks/ReactorStacks.java new file mode 100644 index 00000000000..8e478948a16 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/stacks/ReactorStacks.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.stacks; + +import java.util.Map; +import org.cloudfoundry.client.v2.stacks.CreateStackRequest; +import org.cloudfoundry.client.v2.stacks.CreateStackResponse; +import org.cloudfoundry.client.v2.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v2.stacks.DeleteStackResponse; +import org.cloudfoundry.client.v2.stacks.GetStackRequest; +import org.cloudfoundry.client.v2.stacks.GetStackResponse; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.stacks.ListStacksResponse; +import org.cloudfoundry.client.v2.stacks.Stacks; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Stacks} + */ +public final class ReactorStacks extends AbstractClientV2Operations implements Stacks { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorStacks( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateStackRequest request) { + return post(request, CreateStackResponse.class, builder -> builder.pathSegment("stacks")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteStackRequest request) { + return delete( + request, + DeleteStackResponse.class, + builder -> builder.pathSegment("stacks", request.getStackId())) + .checkpoint(); + } + + @Override + public Mono get(GetStackRequest request) { + return get( + request, + GetStackResponse.class, + builder -> builder.pathSegment("stacks", request.getStackId())) + .checkpoint(); + } + + @Override + public Mono list(ListStacksRequest request) { + return get(request, ListStacksResponse.class, builder -> builder.pathSegment("stacks")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/userprovidedserviceinstances/ReactorUserProvidedServiceInstances.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/userprovidedserviceinstances/ReactorUserProvidedServiceInstances.java new file mode 100644 index 00000000000..203f6b090a0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/userprovidedserviceinstances/ReactorUserProvidedServiceInstances.java @@ -0,0 +1,178 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.userprovidedserviceinstances; + +import java.util.Map; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.DeleteUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.GetUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.GetUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceRoutesResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceServiceBindingsResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.RemoveUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstances; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link UserProvidedServiceInstances} + */ +public final class ReactorUserProvidedServiceInstances extends AbstractClientV2Operations + implements UserProvidedServiceInstances { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorUserProvidedServiceInstances( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest request) { + return put( + request, + AssociateUserProvidedServiceInstanceRouteResponse.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId(), + "routes", + request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono create( + CreateUserProvidedServiceInstanceRequest request) { + return post( + request, + CreateUserProvidedServiceInstanceResponse.class, + builder -> builder.pathSegment("user_provided_service_instances")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteUserProvidedServiceInstanceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId())) + .checkpoint(); + } + + @Override + public Mono get( + GetUserProvidedServiceInstanceRequest request) { + return get( + request, + GetUserProvidedServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId())) + .checkpoint(); + } + + @Override + public Mono list( + ListUserProvidedServiceInstancesRequest request) { + return get( + request, + ListUserProvidedServiceInstancesResponse.class, + builder -> builder.pathSegment("user_provided_service_instances")) + .checkpoint(); + } + + @Override + public Mono listRoutes( + ListUserProvidedServiceInstanceRoutesRequest request) { + return get( + request, + ListUserProvidedServiceInstanceRoutesResponse.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId(), + "routes")) + .checkpoint(); + } + + @Override + public Mono listServiceBindings( + ListUserProvidedServiceInstanceServiceBindingsRequest request) { + return get( + request, + ListUserProvidedServiceInstanceServiceBindingsResponse.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId(), + "service_bindings")) + .checkpoint(); + } + + @Override + public Mono removeRoute(RemoveUserProvidedServiceInstanceRouteRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId(), + "routes", + request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono update( + UpdateUserProvidedServiceInstanceRequest request) { + return put( + request, + UpdateUserProvidedServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "user_provided_service_instances", + request.getUserProvidedServiceInstanceId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsers.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsers.java new file mode 100644 index 00000000000..ab7e37be8ad --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsers.java @@ -0,0 +1,425 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.users; + +import java.util.Map; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserBillingManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserBillingManagedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserManagedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserManagedSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserManagedSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserSpaceResponse; +import org.cloudfoundry.client.v2.users.CreateUserRequest; +import org.cloudfoundry.client.v2.users.CreateUserResponse; +import org.cloudfoundry.client.v2.users.DeleteUserRequest; +import org.cloudfoundry.client.v2.users.DeleteUserResponse; +import org.cloudfoundry.client.v2.users.GetUserRequest; +import org.cloudfoundry.client.v2.users.GetUserResponse; +import org.cloudfoundry.client.v2.users.ListUserAuditedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserAuditedOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserAuditedSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserAuditedSpacesResponse; +import org.cloudfoundry.client.v2.users.ListUserBillingManagedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserBillingManagedOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserManagedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserManagedOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserManagedSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserManagedSpacesResponse; +import org.cloudfoundry.client.v2.users.ListUserOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserSpacesResponse; +import org.cloudfoundry.client.v2.users.ListUsersRequest; +import org.cloudfoundry.client.v2.users.ListUsersResponse; +import org.cloudfoundry.client.v2.users.RemoveUserAuditedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserAuditedSpaceRequest; +import org.cloudfoundry.client.v2.users.RemoveUserBillingManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserManagedSpaceRequest; +import org.cloudfoundry.client.v2.users.RemoveUserOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserSpaceRequest; +import org.cloudfoundry.client.v2.users.SummaryUserRequest; +import org.cloudfoundry.client.v2.users.SummaryUserResponse; +import org.cloudfoundry.client.v2.users.UpdateUserRequest; +import org.cloudfoundry.client.v2.users.UpdateUserResponse; +import org.cloudfoundry.client.v2.users.Users; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v2.AbstractClientV2Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Users} + */ +public final class ReactorUsers extends AbstractClientV2Operations implements Users { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorUsers( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono associateAuditedOrganization( + AssociateUserAuditedOrganizationRequest request) { + return put( + request, + AssociateUserAuditedOrganizationResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "audited_organizations", + request.getAuditedOrganizationId())) + .checkpoint(); + } + + @Override + public Mono associateAuditedSpace( + AssociateUserAuditedSpaceRequest request) { + return put( + request, + AssociateUserAuditedSpaceResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "audited_spaces", + request.getAuditedSpaceId())) + .checkpoint(); + } + + @Override + public Mono + associateBillingManagedOrganization( + AssociateUserBillingManagedOrganizationRequest request) { + return put( + request, + AssociateUserBillingManagedOrganizationResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "billing_managed_organizations", + request.getBillingManagedOrganizationId())) + .checkpoint(); + } + + @Override + public Mono associateManagedOrganization( + AssociateUserManagedOrganizationRequest request) { + return put( + request, + AssociateUserManagedOrganizationResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "managed_organizations", + request.getManagedOrganizationId())) + .checkpoint(); + } + + @Override + public Mono associateManagedSpace( + AssociateUserManagedSpaceRequest request) { + return put( + request, + AssociateUserManagedSpaceResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "managed_spaces", + request.getManagedSpaceId())) + .checkpoint(); + } + + @Override + public Mono associateOrganization( + AssociateUserOrganizationRequest request) { + return put( + request, + AssociateUserOrganizationResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "organizations", + request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono associateSpace(AssociateUserSpaceRequest request) { + return put( + request, + AssociateUserSpaceResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono create(CreateUserRequest request) { + return post(request, CreateUserResponse.class, builder -> builder.pathSegment("users")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteUserRequest request) { + return delete( + request, + DeleteUserResponse.class, + builder -> builder.pathSegment("users", request.getUserId())) + .checkpoint(); + } + + @Override + public Mono get(GetUserRequest request) { + return get( + request, + GetUserResponse.class, + builder -> builder.pathSegment("users", request.getUserId())) + .checkpoint(); + } + + @Override + public Mono list(ListUsersRequest request) { + return get(request, ListUsersResponse.class, builder -> builder.pathSegment("users")) + .checkpoint(); + } + + @Override + public Mono listAuditedOrganizations( + ListUserAuditedOrganizationsRequest request) { + return get( + request, + ListUserAuditedOrganizationsResponse.class, + builder -> + builder.pathSegment( + "users", request.getUserId(), "audited_organizations")) + .checkpoint(); + } + + @Override + public Mono listAuditedSpaces( + ListUserAuditedSpacesRequest request) { + return get( + request, + ListUserAuditedSpacesResponse.class, + builder -> + builder.pathSegment("users", request.getUserId(), "audited_spaces")) + .checkpoint(); + } + + @Override + public Mono listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest request) { + return get( + request, + ListUserBillingManagedOrganizationsResponse.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "billing_managed_organizations")) + .checkpoint(); + } + + @Override + public Mono listManagedOrganizations( + ListUserManagedOrganizationsRequest request) { + return get( + request, + ListUserManagedOrganizationsResponse.class, + builder -> + builder.pathSegment( + "users", request.getUserId(), "managed_organizations")) + .checkpoint(); + } + + @Override + public Mono listManagedSpaces( + ListUserManagedSpacesRequest request) { + return get( + request, + ListUserManagedSpacesResponse.class, + builder -> + builder.pathSegment("users", request.getUserId(), "managed_spaces")) + .checkpoint(); + } + + @Override + public Mono listOrganizations( + ListUserOrganizationsRequest request) { + return get( + request, + ListUserOrganizationsResponse.class, + builder -> + builder.pathSegment("users", request.getUserId(), "organizations")) + .checkpoint(); + } + + @Override + public Mono listSpaces(ListUserSpacesRequest request) { + return get( + request, + ListUserSpacesResponse.class, + builder -> builder.pathSegment("users", request.getUserId(), "spaces")) + .checkpoint(); + } + + @Override + public Mono removeAuditedOrganization(RemoveUserAuditedOrganizationRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "audited_organizations", + request.getAuditedOrganizationId())) + .checkpoint(); + } + + @Override + public Mono removeAuditedSpace(RemoveUserAuditedSpaceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "audited_spaces", + request.getAuditedSpaceId())) + .checkpoint(); + } + + @Override + public Mono removeBillingManagedOrganization( + RemoveUserBillingManagedOrganizationRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "billing_managed_organizations", + request.getBillingManagedOrganizationId())) + .checkpoint(); + } + + @Override + public Mono removeManagedOrganization(RemoveUserManagedOrganizationRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "managed_organizations", + request.getManagedOrganizationId())) + .checkpoint(); + } + + @Override + public Mono removeManagedSpace(RemoveUserManagedSpaceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "managed_spaces", + request.getManagedSpaceId())) + .checkpoint(); + } + + @Override + public Mono removeOrganization(RemoveUserOrganizationRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "organizations", + request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono removeSpace(RemoveUserSpaceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "users", + request.getUserId(), + "spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono summary(SummaryUserRequest request) { + return get( + request, + SummaryUserResponse.class, + builder -> builder.pathSegment("users", request.getUserId(), "summary")) + .checkpoint(); + } + + @Override + public Mono update(UpdateUserRequest request) { + return put( + request, + UpdateUserResponse.class, + builder -> builder.pathSegment("users", request.getUserId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/AbstractClientV3Operations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/AbstractClientV3Operations.java new file mode 100644 index 00000000000..cc27ab843c3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/AbstractClientV3Operations.java @@ -0,0 +1,333 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3; + +import io.netty.handler.codec.http.HttpHeaderNames; +import java.util.List; +import java.util.Map; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.HttpClientResponseWithParsedBody; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.QueryBuilder; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.DelegatingUriQueryParameterBuilder; +import org.cloudfoundry.reactor.util.ErrorPayloadMappers; +import org.cloudfoundry.reactor.util.MultipartHttpClientRequest; +import org.cloudfoundry.reactor.util.Operator; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameterBuilder; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; +import reactor.netty.http.client.HttpClientResponse; + +public abstract class AbstractClientV3Operations extends AbstractReactorOperations { + + protected AbstractClientV3Operations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + protected static String extractJobId(HttpClientResponse response) { + String locationHeader = response.responseHeaders().get(HttpHeaderNames.LOCATION); + if (locationHeader == null) { + return null; + } + + List pathSegments = + UriComponentsBuilder.fromUriString(locationHeader).build().getPathSegments(); + return pathSegments.get(pathSegments.size() - 1); + } + + @Override + protected Mono createOperator() { + return super.createOperator().map(this::attachErrorPayloadMapper); + } + + protected final Mono delete( + Object requestPayload, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.delete() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .get()) + .flatMap(response -> Mono.justOrEmpty(extractJobId(response))); + } + + protected final Mono delete( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.delete() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono> deleteWithResponse( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.delete() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBodyWithResponse(responseType)); + } + + protected final Flux get( + Object requestPayload, + Function uriTransformer, + Function> bodyTransformer) { + return createOperator() + .flatMapMany( + operator -> + operator.followRedirects() + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBodyToFlux( + responseWithBody -> + bodyTransformer.apply( + responseWithBody.getBody()))); + } + + protected final Mono get( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBody(responseType)); + } + + protected final Mono patch( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.patch() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono> patchWithResponse( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.patch() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBodyWithResponse(responseType)); + } + + protected final Mono post( + Object requestPayload, + Class responseType, + Function uriTransformer, + Consumer requestTransformer, + Runnable onTerminate) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .sendForm(multipartRequest(requestTransformer)) + .response() + .parseBody(responseType)) + .doFinally(signalType -> onTerminate.run()); + } + + protected Mono post( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono post( + Object requestPayload, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .get()) + .flatMap(response -> Mono.justOrEmpty(extractJobId(response))); + } + + protected Mono> postRawWithResponse( + byte[] requestPayload, + String contentType, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send( + (request, outbound) -> { + String contentLength = + String.valueOf(requestPayload.length); + Mono body = Mono.just(requestPayload); + + request.header( + HttpHeaderNames.CONTENT_LENGTH, + contentLength); + request.header( + HttpHeaderNames.CONTENT_TYPE, + contentType); + return outbound.sendByteArray(body); + }) + .response() + .parseBodyWithResponse(responseType)); + } + + protected final Mono> postWithResponse( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBodyWithResponse(responseType)); + } + + protected final Mono put( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.put() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + private Operator attachErrorPayloadMapper(Operator operator) { + return operator.withErrorPayloadMapper( + ErrorPayloadMappers.clientV3(this.connectionContext.getObjectMapper())); + } + + private MultipartHttpClientRequest createMultipartRequest( + HttpClientRequest request, HttpClientForm form) { + return new MultipartHttpClientRequest( + this.connectionContext.getObjectMapper(), request, form); + } + + private UriQueryParameterBuilder getUriQueryParameterBuilder() { + return DelegatingUriQueryParameterBuilder.builder() + .builders(new FilterBuilder(), new QueryBuilder()) + .build(); + } + + private BiConsumer multipartRequest( + Consumer requestTransformer) { + return (request, outbound) -> { + MultipartHttpClientRequest multipartRequest = createMultipartRequest(request, outbound); + requestTransformer.accept(multipartRequest); + }; + } + + private Function queryTransformer( + Object requestPayload) { + return builder -> { + Stream parameters = + getUriQueryParameterBuilder().build(requestPayload); + UriQueryParameters.set(builder, parameters); + return builder; + }; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/FilterBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/FilterBuilder.java new file mode 100644 index 00000000000..1586fae8ec7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/FilterBuilder.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3; + +import java.util.Collection; +import java.util.Objects; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.reactor.util.AnnotationUtils; +import org.cloudfoundry.reactor.util.AnnotationUtils.AnnotatedValue; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameterBuilder; + +final class FilterBuilder implements UriQueryParameterBuilder { + + public Stream build(Object instance) { + return AnnotationUtils.streamAnnotatedValues(instance, FilterParameter.class) + .map(FilterBuilder::processValue) + .filter(Objects::nonNull); + } + + private static UriQueryParameter processCollection(String name, Collection collection) { + if (collection.isEmpty()) { + return null; + } + return processValue( + name, + collection.stream() + .map(Object::toString) + .map(String::trim) + .collect(Collectors.joining(","))); + } + + private static UriQueryParameter processValue(AnnotatedValue annotatedValue) { + FilterParameter filterParameter = annotatedValue.getAnnotation(); + Object value = annotatedValue.getValue(); + if (value instanceof Collection) { + return processCollection(filterParameter.value(), (Collection) value); + } else { + return processValue(filterParameter.value(), value.toString()); + } + } + + private static UriQueryParameter processValue(String name, String value) { + return UriQueryParameter.of(name, value); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/admin/ReactorAdminV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/admin/ReactorAdminV3.java new file mode 100644 index 00000000000..686b8a081d2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/admin/ReactorAdminV3.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.admin; + +import java.util.Map; +import org.cloudfoundry.client.v3.admin.AdminV3; +import org.cloudfoundry.client.v3.admin.ClearBuildpackCacheRequest; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link AdminV3} + */ +public final class ReactorAdminV3 extends AbstractClientV3Operations implements AdminV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorAdminV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono clearBuildpackCache(ClearBuildpackCacheRequest request) { + return post( + request, + builder -> builder.pathSegment("admin", "actions", "clear_buildpack_cache")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3.java new file mode 100644 index 00000000000..4ecfd17ded3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3.java @@ -0,0 +1,444 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.applications; + +import java.util.Map; +import org.cloudfoundry.client.v3.applications.ApplicationsV3; +import org.cloudfoundry.client.v3.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v3.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v3.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRelationshipRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRelationshipResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentVariablesRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentVariablesResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationFeatureResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationPermissionsRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationPermissionsResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessStatisticsRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessStatisticsResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationBuildsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationBuildsResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationDropletsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationDropletsResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationFeaturesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationFeaturesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationPackagesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationPackagesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationProcessesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationProcessesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationRoutesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationTasksRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationTasksResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationsResponse; +import org.cloudfoundry.client.v3.applications.RestartApplicationRequest; +import org.cloudfoundry.client.v3.applications.RestartApplicationResponse; +import org.cloudfoundry.client.v3.applications.ScaleApplicationRequest; +import org.cloudfoundry.client.v3.applications.ScaleApplicationResponse; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.StartApplicationRequest; +import org.cloudfoundry.client.v3.applications.StartApplicationResponse; +import org.cloudfoundry.client.v3.applications.StopApplicationRequest; +import org.cloudfoundry.client.v3.applications.StopApplicationResponse; +import org.cloudfoundry.client.v3.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationEnvironmentVariablesRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationEnvironmentVariablesResponse; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureResponse; +import org.cloudfoundry.client.v3.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ApplicationsV3} + */ +public final class ReactorApplicationsV3 extends AbstractClientV3Operations + implements ApplicationsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorApplicationsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateApplicationRequest request) { + return post( + request, + CreateApplicationResponse.class, + builder -> builder.pathSegment("apps")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteApplicationRequest request) { + return delete(request, builder -> builder.pathSegment("apps", request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono get(GetApplicationRequest request) { + return get( + request, + GetApplicationResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono getCurrentDroplet( + GetApplicationCurrentDropletRequest request) { + return get( + request, + GetApplicationCurrentDropletResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "droplets", "current")) + .checkpoint(); + } + + @Override + public Mono getCurrentDropletRelationship( + GetApplicationCurrentDropletRelationshipRequest request) { + return get( + request, + GetApplicationCurrentDropletRelationshipResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "relationships", + "current_droplet")) + .checkpoint(); + } + + @Override + public Mono getEnvironment( + GetApplicationEnvironmentRequest request) { + return get( + request, + GetApplicationEnvironmentResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId(), "env")) + .checkpoint(); + } + + @Override + public Mono getEnvironmentVariables( + GetApplicationEnvironmentVariablesRequest request) { + return get( + request, + GetApplicationEnvironmentVariablesResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "environment_variables")) + .checkpoint(); + } + + @Override + public Mono getFeature(GetApplicationFeatureRequest request) { + return get( + request, + GetApplicationFeatureResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "features", + request.getFeatureName())) + .checkpoint(); + } + + @Override + public Mono getPermissions( + GetApplicationPermissionsRequest request) { + return get( + request, + GetApplicationPermissionsResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "permissions")) + .checkpoint(); + } + + @Override + public Mono getProcess(GetApplicationProcessRequest request) { + return get( + request, + GetApplicationProcessResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "processes", + request.getType())) + .checkpoint(); + } + + @Override + public Mono getProcessStatistics( + GetApplicationProcessStatisticsRequest request) { + return get( + request, + GetApplicationProcessStatisticsResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "processes", + request.getType(), + "stats")) + .checkpoint(); + } + + @Override + public Mono getSshEnabled( + GetApplicationSshEnabledRequest request) { + return get( + request, + GetApplicationSshEnabledResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "ssh_enabled")) + .checkpoint(); + } + + @Override + public Mono list(ListApplicationsRequest request) { + return get(request, ListApplicationsResponse.class, builder -> builder.pathSegment("apps")) + .checkpoint(); + } + + @Override + public Mono listBuilds(ListApplicationBuildsRequest request) { + return get( + request, + ListApplicationBuildsResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "builds")) + .checkpoint(); + } + + @Override + public Mono listDroplets( + ListApplicationDropletsRequest request) { + return get( + request, + ListApplicationDropletsResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "droplets")) + .checkpoint(); + } + + @Override + public Mono listFeatures( + ListApplicationFeaturesRequest request) { + return get( + request, + ListApplicationFeaturesResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "features")) + .checkpoint(); + } + + @Override + public Mono listPackages( + ListApplicationPackagesRequest request) { + return get( + request, + ListApplicationPackagesResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "packages")) + .checkpoint(); + } + + @Override + public Mono listProcesses( + ListApplicationProcessesRequest request) { + return get( + request, + ListApplicationProcessesResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "processes")) + .checkpoint(); + } + + @Override + public Mono listRoutes(ListApplicationRoutesRequest request) { + return get( + request, + ListApplicationRoutesResponse.class, + builder -> + builder.pathSegment("apps", request.getApplicationId(), "routes")) + .checkpoint(); + } + + @Override + public Mono listTasks(ListApplicationTasksRequest request) { + return get( + request, + ListApplicationTasksResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId(), "tasks")) + .checkpoint(); + } + + @Override + public Mono scale(ScaleApplicationRequest request) { + return post( + request, + ScaleApplicationResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "processes", + request.getType(), + "actions", + "scale")) + .checkpoint(); + } + + @Override + public Mono setCurrentDroplet( + SetApplicationCurrentDropletRequest request) { + return patch( + request, + SetApplicationCurrentDropletResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "relationships", + "current_droplet")) + .checkpoint(); + } + + @Override + public Mono start(StartApplicationRequest request) { + return post( + request, + StartApplicationResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "actions", "start")) + .checkpoint(); + } + + @Override + public Mono restart(RestartApplicationRequest request) { + return post( + request, + RestartApplicationResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "actions", "restart")) + .checkpoint(); + } + + @Override + public Mono stop(StopApplicationRequest request) { + return post( + request, + StopApplicationResponse.class, + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "actions", "stop")) + .checkpoint(); + } + + @Override + public Mono terminateInstance(TerminateApplicationInstanceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "processes", + request.getType(), + "instances", + request.getIndex())) + .checkpoint(); + } + + @Override + public Mono update(UpdateApplicationRequest request) { + return patch( + request, + UpdateApplicationResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId())) + .checkpoint(); + } + + @Override + public Mono updateEnvironmentVariables( + UpdateApplicationEnvironmentVariablesRequest request) { + return patch( + request, + UpdateApplicationEnvironmentVariablesResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "environment_variables")) + .checkpoint(); + } + + @Override + public Mono updateFeature( + UpdateApplicationFeatureRequest request) { + return patch( + request, + UpdateApplicationFeatureResponse.class, + builder -> + builder.pathSegment( + "apps", + request.getApplicationId(), + "features", + request.getFeatureName())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/auditevents/ReactorAuditEventsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/auditevents/ReactorAuditEventsV3.java new file mode 100644 index 00000000000..2eb1089d5c7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/auditevents/ReactorAuditEventsV3.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.auditevents; + +import java.util.Map; +import org.cloudfoundry.client.v3.auditevents.AuditEventsV3; +import org.cloudfoundry.client.v3.auditevents.GetAuditEventRequest; +import org.cloudfoundry.client.v3.auditevents.GetAuditEventResponse; +import org.cloudfoundry.client.v3.auditevents.ListAuditEventsRequest; +import org.cloudfoundry.client.v3.auditevents.ListAuditEventsResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +public class ReactorAuditEventsV3 extends AbstractClientV3Operations implements AuditEventsV3 { + + public ReactorAuditEventsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetAuditEventRequest request) { + return get( + request, + GetAuditEventResponse.class, + builder -> builder.pathSegment("audit_events", request.getEventId())) + .checkpoint(); + } + + @Override + public Mono list(ListAuditEventsRequest request) { + return get( + request, + ListAuditEventsResponse.class, + builder -> builder.pathSegment("audit_events")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/builds/ReactorBuilds.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/builds/ReactorBuilds.java new file mode 100644 index 00000000000..271bb38bc35 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/builds/ReactorBuilds.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.builds; + +import java.util.Map; +import org.cloudfoundry.client.v3.builds.Builds; +import org.cloudfoundry.client.v3.builds.CreateBuildRequest; +import org.cloudfoundry.client.v3.builds.CreateBuildResponse; +import org.cloudfoundry.client.v3.builds.GetBuildRequest; +import org.cloudfoundry.client.v3.builds.GetBuildResponse; +import org.cloudfoundry.client.v3.builds.ListBuildsRequest; +import org.cloudfoundry.client.v3.builds.ListBuildsResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Builds} + */ +public final class ReactorBuilds extends AbstractClientV3Operations implements Builds { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorBuilds( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateBuildRequest request) { + return post(request, CreateBuildResponse.class, builder -> builder.pathSegment("builds")) + .checkpoint(); + } + + @Override + public Mono get(GetBuildRequest request) { + return get( + request, + GetBuildResponse.class, + builder -> builder.pathSegment("builds", request.getBuildId())) + .checkpoint(); + } + + @Override + public Mono list(ListBuildsRequest request) { + return get(request, ListBuildsResponse.class, builder -> builder.pathSegment("builds")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/builpacks/ReactorBuildpacksV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/builpacks/ReactorBuildpacksV3.java new file mode 100644 index 00000000000..984b5ce4948 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/builpacks/ReactorBuildpacksV3.java @@ -0,0 +1,154 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.builpacks; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.Map; +import org.cloudfoundry.client.v3.buildpacks.BuildpacksV3; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksResponse; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import org.cloudfoundry.reactor.util.MultipartHttpClientRequest; +import org.cloudfoundry.util.FileUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link BuildpacksV3} + */ +public final class ReactorBuildpacksV3 extends AbstractClientV3Operations implements BuildpacksV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorBuildpacksV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateBuildpackRequest request) { + return post( + request, + CreateBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteBuildpackRequest request) { + return delete( + request, + builder -> builder.pathSegment("buildpacks", request.getBuildpackId())) + .checkpoint(); + } + + @Override + public Mono get(GetBuildpackRequest request) { + return get( + request, + GetBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks", request.getBuildpackId())) + .checkpoint(); + } + + @Override + public Mono list(ListBuildpacksRequest request) { + return get( + request, + ListBuildpacksResponse.class, + builder -> builder.pathSegment("buildpacks")) + .checkpoint(); + } + + @Override + public Mono update(UpdateBuildpackRequest request) { + return patch( + request, + UpdateBuildpackResponse.class, + builder -> builder.pathSegment("buildpacks", request.getBuildpackId())) + .checkpoint(); + } + + @Override + public Mono upload(UploadBuildpackRequest request) { + Path bits = request.getBits(); + + if (bits.toFile().isDirectory()) { + return FileUtils.compress(bits) + .map( + temporaryFile -> + UploadBuildpackRequest.builder() + .from(request) + .bits(temporaryFile) + .build()) + .flatMap( + requestWithTemporaryFile -> + upload( + requestWithTemporaryFile, + () -> { + try { + Files.delete( + requestWithTemporaryFile.getBits()); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + })); + } else { + return upload(request, () -> {}); + } + } + + private Mono upload( + UploadBuildpackRequest request, Runnable onTerminate) { + return post( + request, + UploadBuildpackResponse.class, + builder -> + builder.pathSegment( + "buildpacks", request.getBuildpackId(), "upload"), + outbound -> upload(request.getBits(), outbound), + onTerminate) + .checkpoint(); + } + + private void upload(Path bits, MultipartHttpClientRequest r) { + r.addPart(part -> part.setName("bits").setContentType(APPLICATION_ZIP).sendFile(bits)) + .done(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/deployments/ReactorDeploymentsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/deployments/ReactorDeploymentsV3.java new file mode 100644 index 00000000000..171d0b485a8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/deployments/ReactorDeploymentsV3.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.deployments; + +import java.util.Map; +import org.cloudfoundry.client.v3.deployments.CancelDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.CancelDeploymentResponse; +import org.cloudfoundry.client.v3.deployments.CreateDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.CreateDeploymentResponse; +import org.cloudfoundry.client.v3.deployments.DeploymentsV3; +import org.cloudfoundry.client.v3.deployments.GetDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.GetDeploymentResponse; +import org.cloudfoundry.client.v3.deployments.ListDeploymentsRequest; +import org.cloudfoundry.client.v3.deployments.ListDeploymentsResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link DeploymentsV3} + */ +public final class ReactorDeploymentsV3 extends AbstractClientV3Operations + implements DeploymentsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorDeploymentsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono cancel(CancelDeploymentRequest request) { + return post( + request, + CancelDeploymentResponse.class, + builder -> + builder.pathSegment( + "deployments", + request.getDeploymentId(), + "actions", + "cancel")) + .checkpoint(); + } + + @Override + public Mono create(CreateDeploymentRequest request) { + return post( + request, + CreateDeploymentResponse.class, + builder -> builder.pathSegment("deployments")) + .checkpoint(); + } + + @Override + public Mono get(GetDeploymentRequest request) { + return get( + request, + GetDeploymentResponse.class, + builder -> builder.pathSegment("deployments", request.getDeploymentId())) + .checkpoint(); + } + + @Override + public Mono list(ListDeploymentsRequest request) { + return get( + request, + ListDeploymentsResponse.class, + builder -> builder.pathSegment("deployments")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/domains/ReactorDomainsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/domains/ReactorDomainsV3.java new file mode 100644 index 00000000000..c858e14c9ec --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/domains/ReactorDomainsV3.java @@ -0,0 +1,137 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.domains; + +import java.util.Map; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesRequest; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesResponse; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DeleteDomainRequest; +import org.cloudfoundry.client.v3.domains.DomainsV3; +import org.cloudfoundry.client.v3.domains.GetDomainRequest; +import org.cloudfoundry.client.v3.domains.GetDomainResponse; +import org.cloudfoundry.client.v3.domains.ListDomainsRequest; +import org.cloudfoundry.client.v3.domains.ListDomainsResponse; +import org.cloudfoundry.client.v3.domains.ShareDomainRequest; +import org.cloudfoundry.client.v3.domains.ShareDomainResponse; +import org.cloudfoundry.client.v3.domains.UnshareDomainRequest; +import org.cloudfoundry.client.v3.domains.UpdateDomainRequest; +import org.cloudfoundry.client.v3.domains.UpdateDomainResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link DomainsV3} + */ +public final class ReactorDomainsV3 extends AbstractClientV3Operations implements DomainsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorDomainsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono checkReservedRoutes( + CheckReservedRoutesRequest request) { + return get( + request, + CheckReservedRoutesResponse.class, + builder -> + builder.pathSegment( + "domains", request.getDomainId(), "route_reservations")) + .checkpoint(); + } + + @Override + public Mono create(CreateDomainRequest request) { + return post(request, CreateDomainResponse.class, builder -> builder.pathSegment("domains")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteDomainRequest request) { + return delete(request, builder -> builder.pathSegment("domains", request.getDomainId())) + .checkpoint(); + } + + @Override + public Mono get(GetDomainRequest request) { + return get( + request, + GetDomainResponse.class, + builder -> builder.pathSegment("domains", request.getDomainId())) + .checkpoint(); + } + + @Override + public Mono list(ListDomainsRequest request) { + return get(request, ListDomainsResponse.class, builder -> builder.pathSegment("domains")) + .checkpoint(); + } + + @Override + public Mono share(ShareDomainRequest request) { + return post( + request, + ShareDomainResponse.class, + builder -> + builder.pathSegment( + "domains", + request.getDomainId(), + "relationships", + "shared_organizations")) + .checkpoint(); + } + + @Override + public Mono unshare(UnshareDomainRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "domains", + request.getDomainId(), + "relationships", + "shared_organizations", + request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateDomainRequest request) { + return patch( + request, + UpdateDomainResponse.class, + builder -> builder.pathSegment("domains", request.getDomainId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/droplets/ReactorDroplets.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/droplets/ReactorDroplets.java new file mode 100644 index 00000000000..c8d189922d7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/droplets/ReactorDroplets.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.droplets; + +import java.util.Map; +import org.cloudfoundry.client.v3.droplets.CopyDropletRequest; +import org.cloudfoundry.client.v3.droplets.CopyDropletResponse; +import org.cloudfoundry.client.v3.droplets.DeleteDropletRequest; +import org.cloudfoundry.client.v3.droplets.Droplets; +import org.cloudfoundry.client.v3.droplets.GetDropletRequest; +import org.cloudfoundry.client.v3.droplets.GetDropletResponse; +import org.cloudfoundry.client.v3.droplets.ListDropletsRequest; +import org.cloudfoundry.client.v3.droplets.ListDropletsResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Droplets} + */ +public final class ReactorDroplets extends AbstractClientV3Operations implements Droplets { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorDroplets( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono copy(CopyDropletRequest request) { + return post(request, CopyDropletResponse.class, builder -> builder.pathSegment("droplets")); + } + + @Override + public Mono delete(DeleteDropletRequest request) { + return delete(request, builder -> builder.pathSegment("droplets", request.getDropletId())) + .checkpoint(); + } + + @Override + public Mono get(GetDropletRequest request) { + return get( + request, + GetDropletResponse.class, + builder -> builder.pathSegment("droplets", request.getDropletId())) + .checkpoint(); + } + + @Override + public Mono list(ListDropletsRequest request) { + return get(request, ListDropletsResponse.class, builder -> builder.pathSegment("droplets")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/isolationsegments/ReactorIsolationSegments.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/isolationsegments/ReactorIsolationSegments.java new file mode 100644 index 00000000000..7f7536fb685 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/isolationsegments/ReactorIsolationSegments.java @@ -0,0 +1,192 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.isolationsegments; + +import java.util.Map; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementResponse; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentResponse; +import org.cloudfoundry.client.v3.isolationsegments.DeleteIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.GetIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.GetIsolationSegmentResponse; +import org.cloudfoundry.client.v3.isolationsegments.IsolationSegments; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentEntitledOrganizationsRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentEntitledOrganizationsResponse; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentOrganizationsRelationshipRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentOrganizationsRelationshipResponse; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentSpacesRelationshipResponse; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentsRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentsResponse; +import org.cloudfoundry.client.v3.isolationsegments.RemoveIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.UpdateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.UpdateIsolationSegmentResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link IsolationSegments} + */ +public final class ReactorIsolationSegments extends AbstractClientV3Operations + implements IsolationSegments { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorIsolationSegments( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest request) { + return post( + request, + AddIsolationSegmentOrganizationEntitlementResponse.class, + builder -> + builder.pathSegment( + "isolation_segments", + request.getIsolationSegmentId(), + "relationships", + "organizations")) + .checkpoint(); + } + + @Override + public Mono create(CreateIsolationSegmentRequest request) { + return post( + request, + CreateIsolationSegmentResponse.class, + builder -> builder.pathSegment("isolation_segments")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteIsolationSegmentRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "isolation_segments", request.getIsolationSegmentId())) + .checkpoint(); + } + + @Override + public Mono get(GetIsolationSegmentRequest request) { + return get( + request, + GetIsolationSegmentResponse.class, + builder -> + builder.pathSegment( + "isolation_segments", request.getIsolationSegmentId())) + .checkpoint(); + } + + @Override + public Mono list(ListIsolationSegmentsRequest request) { + return get( + request, + ListIsolationSegmentsResponse.class, + builder -> builder.pathSegment("isolation_segments")) + .checkpoint(); + } + + @Override + public Mono listEntitledOrganizations( + ListIsolationSegmentEntitledOrganizationsRequest request) { + return get( + request, + ListIsolationSegmentEntitledOrganizationsResponse.class, + builder -> + builder.pathSegment( + "isolation_segments", + request.getIsolationSegmentId(), + "organizations")) + .checkpoint(); + } + + @Override + public Mono + listOrganizationsRelationship( + ListIsolationSegmentOrganizationsRelationshipRequest request) { + return get( + request, + ListIsolationSegmentOrganizationsRelationshipResponse.class, + builder -> + builder.pathSegment( + "isolation_segments", + request.getIsolationSegmentId(), + "relationships", + "organizations")) + .checkpoint(); + } + + @Override + public Mono listSpacesRelationship( + ListIsolationSegmentSpacesRelationshipRequest request) { + return get( + request, + ListIsolationSegmentSpacesRelationshipResponse.class, + builder -> + builder.pathSegment( + "isolation_segments", + request.getIsolationSegmentId(), + "relationships", + "spaces")) + .checkpoint(); + } + + @Override + public Mono removeOrganizationEntitlement( + RemoveIsolationSegmentOrganizationEntitlementRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "isolation_segments", + request.getIsolationSegmentId(), + "relationships", + "organizations", + request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateIsolationSegmentRequest request) { + return patch( + request, + UpdateIsolationSegmentResponse.class, + builder -> + builder.pathSegment( + "isolation_segments", request.getIsolationSegmentId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/jobs/ReactorJobsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/jobs/ReactorJobsV3.java new file mode 100644 index 00000000000..ba693e98f40 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/jobs/ReactorJobsV3.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.jobs; + +import java.util.Map; +import org.cloudfoundry.client.v3.jobs.GetJobRequest; +import org.cloudfoundry.client.v3.jobs.GetJobResponse; +import org.cloudfoundry.client.v3.jobs.JobsV3; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link JobsV3} + */ +public final class ReactorJobsV3 extends AbstractClientV3Operations implements JobsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorJobsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetJobRequest request) { + return get( + request, + GetJobResponse.class, + builder -> builder.pathSegment("jobs", request.getJobId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3.java new file mode 100644 index 00000000000..27da41e05d5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3.java @@ -0,0 +1,184 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.organizations; + +import java.util.Map; +import org.cloudfoundry.client.v3.organizations.AssignOrganizationDefaultIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.AssignOrganizationDefaultIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultDomainRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultDomainResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationUsageSummaryRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationUsageSummaryResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v3.organizations.OrganizationsV3; +import org.cloudfoundry.client.v3.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link OrganizationsV3} + */ +public final class ReactorOrganizationsV3 extends AbstractClientV3Operations + implements OrganizationsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorOrganizationsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono assignDefaultIsolationSegment( + AssignOrganizationDefaultIsolationSegmentRequest request) { + return patch( + request, + AssignOrganizationDefaultIsolationSegmentResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "relationships", + "default_isolation_segment")) + .checkpoint(); + } + + @Override + public Mono create(CreateOrganizationRequest request) { + return post( + request, + CreateOrganizationResponse.class, + builder -> builder.pathSegment("organizations")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteOrganizationRequest request) { + return delete( + request, + builder -> + builder.pathSegment("organizations", request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono get(GetOrganizationRequest request) { + return get( + request, + GetOrganizationResponse.class, + builder -> + builder.pathSegment("organizations", request.getOrganizationId())) + .checkpoint(); + } + + @Override + public Mono getDefaultDomain( + GetOrganizationDefaultDomainRequest request) { + return get( + request, + GetOrganizationDefaultDomainResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "domains", + "default")) + .checkpoint(); + } + + @Override + public Mono getDefaultIsolationSegment( + GetOrganizationDefaultIsolationSegmentRequest request) { + return get( + request, + GetOrganizationDefaultIsolationSegmentResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "relationships", + "default_isolation_segment")) + .checkpoint(); + } + + @Override + public Mono getUsageSummary( + GetOrganizationUsageSummaryRequest request) { + return get( + request, + GetOrganizationUsageSummaryResponse.class, + builder -> + builder.pathSegment( + "organizations", + request.getOrganizationId(), + "usage_summary")) + .checkpoint(); + } + + @Override + public Mono list(ListOrganizationsRequest request) { + return get( + request, + ListOrganizationsResponse.class, + builder -> builder.pathSegment("organizations")) + .checkpoint(); + } + + @Override + public Mono listDomains( + ListOrganizationDomainsRequest request) { + return get( + request, + ListOrganizationDomainsResponse.class, + builder -> + builder.pathSegment( + "organizations", request.getOrganizationId(), "domains")) + .checkpoint(); + } + + @Override + public Mono update(UpdateOrganizationRequest request) { + return patch( + request, + UpdateOrganizationResponse.class, + builder -> + builder.pathSegment("organizations", request.getOrganizationId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/packages/ReactorPackages.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/packages/ReactorPackages.java new file mode 100644 index 00000000000..c28ea0d1a46 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/packages/ReactorPackages.java @@ -0,0 +1,178 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.packages; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.List; +import java.util.Map; +import org.cloudfoundry.client.v3.packages.CopyPackageRequest; +import org.cloudfoundry.client.v3.packages.CopyPackageResponse; +import org.cloudfoundry.client.v3.packages.CreatePackageRequest; +import org.cloudfoundry.client.v3.packages.CreatePackageResponse; +import org.cloudfoundry.client.v3.packages.DeletePackageRequest; +import org.cloudfoundry.client.v3.packages.DownloadPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageResponse; +import org.cloudfoundry.client.v3.packages.ListPackageDropletsRequest; +import org.cloudfoundry.client.v3.packages.ListPackageDropletsResponse; +import org.cloudfoundry.client.v3.packages.ListPackagesRequest; +import org.cloudfoundry.client.v3.packages.ListPackagesResponse; +import org.cloudfoundry.client.v3.packages.Packages; +import org.cloudfoundry.client.v3.packages.UploadPackageRequest; +import org.cloudfoundry.client.v3.packages.UploadPackageResponse; +import org.cloudfoundry.client.v3.resourcematch.MatchedResource; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import org.cloudfoundry.reactor.util.MultipartHttpClientRequest; +import org.cloudfoundry.util.FileUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; + +/** + * The Reactor-based implementation of {@link Packages} + */ +public final class ReactorPackages extends AbstractClientV3Operations implements Packages { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorPackages( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono copy(CopyPackageRequest request) { + return post(request, CopyPackageResponse.class, builder -> builder.pathSegment("packages")) + .checkpoint(); + } + + @Override + public Mono create(CreatePackageRequest request) { + return post( + request, + CreatePackageResponse.class, + builder -> builder.pathSegment("packages")) + .checkpoint(); + } + + @Override + public Mono delete(DeletePackageRequest request) { + return delete(request, builder -> builder.pathSegment("packages", request.getPackageId())) + .checkpoint(); + } + + @Override + public Flux download(DownloadPackageRequest request) { + return get( + request, + builder -> + builder.pathSegment("packages", request.getPackageId(), "download"), + ByteBufFlux::asByteArray) + .checkpoint(); + } + + @Override + public Mono get(GetPackageRequest request) { + return get( + request, + GetPackageResponse.class, + builder -> builder.pathSegment("packages", request.getPackageId())) + .checkpoint(); + } + + @Override + public Mono list(ListPackagesRequest request) { + return get(request, ListPackagesResponse.class, builder -> builder.pathSegment("packages")) + .checkpoint(); + } + + @Override + public Mono listDroplets(ListPackageDropletsRequest request) { + return get( + request, + ListPackageDropletsResponse.class, + builder -> + builder.pathSegment("packages", request.getPackageId(), "droplets")) + .checkpoint(); + } + + @Override + public Mono upload(UploadPackageRequest request) { + Path bits = request.getBits(); + + if (bits.toFile().isDirectory()) { + return FileUtils.compress(bits) + .map( + temporaryFile -> + UploadPackageRequest.builder() + .from(request) + .bits(temporaryFile) + .build()) + .flatMap( + requestWithTemporaryFile -> + upload( + requestWithTemporaryFile, + () -> { + try { + Files.delete( + requestWithTemporaryFile.getBits()); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + })); + } else { + return upload(request, () -> {}); + } + } + + private Mono upload(UploadPackageRequest request, Runnable onTerminate) { + return post( + request, + UploadPackageResponse.class, + builder -> + builder.pathSegment("packages", request.getPackageId(), "upload"), + outbound -> upload(request.getBits(), request.getResources(), outbound), + onTerminate) + .checkpoint(); + } + + private void upload(Path bits, List resources, MultipartHttpClientRequest r) { + if (bits != null) { + r.addPart(part -> part.setName("bits").setContentType(APPLICATION_ZIP).sendFile(bits)); + } + + if (resources != null && !resources.isEmpty()) { + r.addPart(part -> part.setName("resources").send(resources)); + } + + r.done(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcesses.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcesses.java new file mode 100644 index 00000000000..a1860292f25 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcesses.java @@ -0,0 +1,119 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.processes; + +import java.util.Map; +import org.cloudfoundry.client.v3.processes.GetProcessRequest; +import org.cloudfoundry.client.v3.processes.GetProcessResponse; +import org.cloudfoundry.client.v3.processes.GetProcessStatisticsRequest; +import org.cloudfoundry.client.v3.processes.GetProcessStatisticsResponse; +import org.cloudfoundry.client.v3.processes.ListProcessesRequest; +import org.cloudfoundry.client.v3.processes.ListProcessesResponse; +import org.cloudfoundry.client.v3.processes.Processes; +import org.cloudfoundry.client.v3.processes.ScaleProcessRequest; +import org.cloudfoundry.client.v3.processes.ScaleProcessResponse; +import org.cloudfoundry.client.v3.processes.TerminateProcessInstanceRequest; +import org.cloudfoundry.client.v3.processes.UpdateProcessRequest; +import org.cloudfoundry.client.v3.processes.UpdateProcessResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Processes} + */ +public final class ReactorProcesses extends AbstractClientV3Operations implements Processes { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorProcesses( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono get(GetProcessRequest request) { + return get( + request, + GetProcessResponse.class, + builder -> builder.pathSegment("processes", request.getProcessId())) + .checkpoint(); + } + + @Override + public Mono getStatistics(GetProcessStatisticsRequest request) { + return get( + request, + GetProcessStatisticsResponse.class, + builder -> + builder.pathSegment("processes", request.getProcessId(), "stats")) + .checkpoint(); + } + + @Override + public Mono list(ListProcessesRequest request) { + return get( + request, + ListProcessesResponse.class, + builder -> builder.pathSegment("processes")) + .checkpoint(); + } + + @Override + public Mono scale(ScaleProcessRequest request) { + return post( + request, + ScaleProcessResponse.class, + builder -> + builder.pathSegment( + "processes", request.getProcessId(), "actions", "scale")) + .checkpoint(); + } + + @Override + public Mono terminateInstance(TerminateProcessInstanceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "processes", + request.getProcessId(), + "instances", + request.getIndex())) + .checkpoint(); + } + + @Override + public Mono update(UpdateProcessRequest request) { + return patch( + request, + UpdateProcessResponse.class, + builder -> builder.pathSegment("processes", request.getProcessId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3.java new file mode 100644 index 00000000000..3f6c49d8eca --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3.java @@ -0,0 +1,111 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.quotas.organizations; + +import java.util.Map; +import org.cloudfoundry.client.v3.quotas.organizations.*; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ReactorOrganizationQuotasV3} + */ +public class ReactorOrganizationQuotasV3 extends AbstractClientV3Operations + implements OrganizationQuotasV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically, something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorOrganizationQuotasV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateOrganizationQuotaRequest request) { + return post( + request, + CreateOrganizationQuotaResponse.class, + builder -> builder.pathSegment("organization_quotas")) + .checkpoint(); + } + + @Override + public Mono get(GetOrganizationQuotaRequest request) { + return get( + request, + GetOrganizationQuotaResponse.class, + builder -> + builder.pathSegment( + "organization_quotas", request.getOrganizationQuotaId())) + .checkpoint(); + } + + @Override + public Mono list(ListOrganizationQuotasRequest request) { + return get( + request, + ListOrganizationQuotasResponse.class, + builder -> builder.pathSegment("organization_quotas")) + .checkpoint(); + } + + @Override + public Mono update(UpdateOrganizationQuotaRequest request) { + return patch( + request, + UpdateOrganizationQuotaResponse.class, + builder -> + builder.pathSegment( + "organization_quotas", request.getOrganizationQuotaId())) + .checkpoint(); + } + + @Override + public Mono delete(DeleteOrganizationQuotaRequest request) { + return delete( + request, + builder -> + builder.pathSegment( + "organization_quotas", request.getOrganizationQuotaId())) + .checkpoint(); + } + + @Override + public Mono apply(ApplyOrganizationQuotaRequest request) { + return post( + request, + ApplyOrganizationQuotaResponse.class, + builder -> + builder.pathSegment( + "organization_quotas", + request.getOrganizationQuotaId(), + "relationships", + "organizations")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3.java new file mode 100644 index 00000000000..1a6b5125204 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3.java @@ -0,0 +1,119 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.quotas.spaces; + +import java.util.Map; +import org.cloudfoundry.client.v3.quotas.spaces.*; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ReactorSpaceQuotasV3} + */ +public class ReactorSpaceQuotasV3 extends AbstractClientV3Operations implements SpaceQuotasV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically, something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSpaceQuotasV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateSpaceQuotaRequest request) { + return post( + request, + CreateSpaceQuotaResponse.class, + builder -> builder.pathSegment("space_quotas")) + .checkpoint(); + } + + @Override + public Mono get(GetSpaceQuotaRequest request) { + return get( + request, + GetSpaceQuotaResponse.class, + builder -> builder.pathSegment("space_quotas", request.getSpaceQuotaId())) + .checkpoint(); + } + + @Override + public Mono list(ListSpaceQuotasRequest request) { + return get( + request, + ListSpaceQuotasResponse.class, + builder -> builder.pathSegment("space_quotas")) + .checkpoint(); + } + + @Override + public Mono update(UpdateSpaceQuotaRequest request) { + return patch( + request, + UpdateSpaceQuotaResponse.class, + builder -> builder.pathSegment("space_quotas", request.getSpaceQuotaId())) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSpaceQuotaRequest request) { + return delete( + request, + builder -> builder.pathSegment("space_quotas", request.getSpaceQuotaId())) + .checkpoint(); + } + + @Override + public Mono apply(ApplySpaceQuotaRequest request) { + return post( + request, + ApplySpaceQuotaResponse.class, + builder -> + builder.pathSegment( + "space_quotas", + request.getSpaceQuotaId(), + "relationships", + "spaces")) + .checkpoint(); + } + + @Override + public Mono remove(RemoveSpaceQuotaRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "space_quotas", + request.getSpaceQuotaId(), + "relationships", + "spaces", + request.getSpaceId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/resourcematch/ReactorResourceMatchV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/resourcematch/ReactorResourceMatchV3.java new file mode 100644 index 00000000000..eebfeaee2c6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/resourcematch/ReactorResourceMatchV3.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.resourcematch; + +import java.util.Map; +import org.cloudfoundry.client.v3.resourcematch.ListMatchingResourcesRequest; +import org.cloudfoundry.client.v3.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v3.resourcematch.ResourceMatchV3; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ResourceMatchV3} + */ +public final class ReactorResourceMatchV3 extends AbstractClientV3Operations + implements ResourceMatchV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorResourceMatchV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono list(ListMatchingResourcesRequest request) { + return post( + request, + ListMatchingResourcesResponse.class, + builder -> builder.pathSegment("resource_matches")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/roles/ReactorRolesV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/roles/ReactorRolesV3.java new file mode 100644 index 00000000000..ee8b7de7e43 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/roles/ReactorRolesV3.java @@ -0,0 +1,90 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.roles; + +import java.util.Map; +import org.cloudfoundry.client.v3.roles.CreateRoleRequest; +import org.cloudfoundry.client.v3.roles.CreateRoleResponse; +import org.cloudfoundry.client.v3.roles.DeleteRoleRequest; +import org.cloudfoundry.client.v3.roles.GetRoleRequest; +import org.cloudfoundry.client.v3.roles.GetRoleResponse; +import org.cloudfoundry.client.v3.roles.ListRolesRequest; +import org.cloudfoundry.client.v3.roles.ListRolesResponse; +import org.cloudfoundry.client.v3.roles.RolesV3; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link RolesV3} + */ +public final class ReactorRolesV3 extends AbstractClientV3Operations implements RolesV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorRolesV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateRoleRequest request) { + return post( + request, + CreateRoleResponse.class, + uriComponentsBuilder -> uriComponentsBuilder.pathSegment("roles")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteRoleRequest request) { + return delete( + request, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("roles", request.getRoleId())) + .checkpoint(); + } + + @Override + public Mono get(GetRoleRequest request) { + return get( + request, + GetRoleResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("roles", request.getRoleId())) + .checkpoint(); + } + + @Override + public Mono list(ListRolesRequest request) { + return get( + request, + ListRolesResponse.class, + uriComponentsBuilder -> uriComponentsBuilder.pathSegment("roles")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/routes/ReactorRoutesV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/routes/ReactorRoutesV3.java new file mode 100644 index 00000000000..54088822c7a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/routes/ReactorRoutesV3.java @@ -0,0 +1,143 @@ +package org.cloudfoundry.reactor.client.v3.routes; + +import java.util.Map; +import org.cloudfoundry.client.v3.routes.CreateRouteRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteResponse; +import org.cloudfoundry.client.v3.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v3.routes.GetRouteRequest; +import org.cloudfoundry.client.v3.routes.GetRouteResponse; +import org.cloudfoundry.client.v3.routes.InsertRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.InsertRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.ListRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ListRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.ListRoutesRequest; +import org.cloudfoundry.client.v3.routes.ListRoutesResponse; +import org.cloudfoundry.client.v3.routes.RemoveRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.RoutesV3; +import org.cloudfoundry.client.v3.routes.UpdateRouteRequest; +import org.cloudfoundry.client.v3.routes.UpdateRouteResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link RoutesV3} + */ +public class ReactorRoutesV3 extends AbstractClientV3Operations implements RoutesV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorRoutesV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateRouteRequest request) { + return post( + request, + CreateRouteResponse.class, + uriComponentsBuilder -> uriComponentsBuilder.pathSegment("routes")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteRouteRequest request) { + return delete( + request, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("routes", request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono get(GetRouteRequest request) { + return get( + request, + GetRouteResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("routes", request.getRouteId())) + .checkpoint(); + } + + @Override + public Mono insertDestinations( + InsertRouteDestinationsRequest request) { + return post( + request, + InsertRouteDestinationsResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment( + "routes", request.getRouteId(), "destinations")) + .checkpoint(); + } + + @Override + public Mono list(ListRoutesRequest request) { + return get( + request, + ListRoutesResponse.class, + uriComponentsBuilder -> uriComponentsBuilder.pathSegment("routes")) + .checkpoint(); + } + + @Override + public Mono listDestinations( + ListRouteDestinationsRequest request) { + return get( + request, + ListRouteDestinationsResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment( + "routes", request.getRouteId(), "destinations")) + .checkpoint(); + } + + @Override + public Mono removeDestinations(RemoveRouteDestinationsRequest request) { + return delete( + request, + Void.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment( + "routes", + request.getRouteId(), + "destinations", + request.getDestinationId())) + .checkpoint(); + } + + @Override + public Mono replaceDestinations( + ReplaceRouteDestinationsRequest request) { + return patch( + request, + ReplaceRouteDestinationsResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment( + "routes", request.getRouteId(), "destinations")) + .checkpoint(); + } + + @Override + public Mono update(UpdateRouteRequest request) { + return patch( + request, + UpdateRouteResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("routes", request.getRouteId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/securitygroups/ReactorSecurityGroupsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/securitygroups/ReactorSecurityGroupsV3.java new file mode 100644 index 00000000000..adea2b5f86a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/securitygroups/ReactorSecurityGroupsV3.java @@ -0,0 +1,201 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.reactor.client.v3.securitygroups; + +import java.util.Map; +import org.cloudfoundry.client.v3.securitygroups.BindRunningSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.BindRunningSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.BindStagingSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.BindStagingSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.GetSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.GetSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.ListRunningSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListRunningSecurityGroupsResponse; +import org.cloudfoundry.client.v3.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListSecurityGroupsResponse; +import org.cloudfoundry.client.v3.securitygroups.ListStagingSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListStagingSecurityGroupsResponse; +import org.cloudfoundry.client.v3.securitygroups.SecurityGroupsV3; +import org.cloudfoundry.client.v3.securitygroups.UnbindRunningSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UnbindStagingSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UpdateSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UpdateSecurityGroupResponse; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingsV3; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceBindingsV3} + */ +public final class ReactorSecurityGroupsV3 extends AbstractClientV3Operations + implements SecurityGroupsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the + * server + * @param root the root URI of the server. Typically something like + * {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSecurityGroupsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateSecurityGroupRequest request) { + return post( + request, + CreateSecurityGroupResponse.class, + builder -> builder.pathSegment("security_groups")) + .checkpoint(); + } + + @Override + public Mono get(GetSecurityGroupRequest request) { + return get( + request, + GetSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono list(ListSecurityGroupsRequest request) { + return get( + request, + ListSecurityGroupsResponse.class, + builder -> builder.pathSegment("security_groups")) + .checkpoint(); + } + + @Override + public Mono update(UpdateSecurityGroupRequest request) { + return patch( + request, + UpdateSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSecurityGroupRequest request) { + return delete( + request, + builder -> + builder.pathSegment( + "security_groups", request.getSecurityGroupId())) + .checkpoint(); + } + + @Override + public Mono bindRunningSecurityGroup( + BindRunningSecurityGroupRequest request) { + return post( + request, + BindRunningSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", + request.getSecurityGroupId(), + "relationships", + "running_spaces")) + .checkpoint(); + } + + @Override + public Mono bindStagingSecurityGroup( + BindStagingSecurityGroupRequest request) { + return post( + request, + BindStagingSecurityGroupResponse.class, + builder -> + builder.pathSegment( + "security_groups", + request.getSecurityGroupId(), + "relationships", + "staging_spaces")) + .checkpoint(); + } + + @Override + public Mono unbindStagingSecurityGroup(UnbindStagingSecurityGroupRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "security_groups", + request.getSecurityGroupId(), + "relationships", + "staging_spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono unbindRunningSecurityGroup(UnbindRunningSecurityGroupRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "security_groups", + request.getSecurityGroupId(), + "relationships", + "running_spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono listRunning( + ListRunningSecurityGroupsRequest request) { + return get( + request, + ListRunningSecurityGroupsResponse.class, + builder -> + builder.pathSegment( + "spaces", request.getSpaceId(), "running_security_groups")) + .checkpoint(); + } + + @Override + public Mono listStaging( + ListStagingSecurityGroupsRequest request) { + return get( + request, + ListStagingSecurityGroupsResponse.class, + builder -> + builder.pathSegment( + "spaces", request.getSpaceId(), "staging_security_groups")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/servicebindings/ReactorServiceBindingsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/servicebindings/ReactorServiceBindingsV3.java new file mode 100644 index 00000000000..093ac8052af --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/servicebindings/ReactorServiceBindingsV3.java @@ -0,0 +1,151 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.servicebindings; + +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.v3.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v3.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingDetailsRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingDetailsResponse; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingParametersRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingParametersResponse; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingResponse; +import org.cloudfoundry.client.v3.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v3.servicebindings.ListServiceBindingsResponse; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingsV3; +import org.cloudfoundry.client.v3.servicebindings.UpdateServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.UpdateServiceBindingResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceBindingsV3} + */ +public final class ReactorServiceBindingsV3 extends AbstractClientV3Operations + implements ServiceBindingsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceBindingsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateServiceBindingRequest request) { + return postWithResponse( + request, + ServiceBindingResource.class, + builder -> builder.pathSegment("service_credential_bindings")) + .map( + responseTuple -> + CreateServiceBindingResponse.builder() + .serviceBinding(responseTuple.getBody()) + .jobId( + Optional.ofNullable( + extractJobId(responseTuple.getResponse()))) + .build()) + .checkpoint(); + } + + @Override + public Mono delete(DeleteServiceBindingRequest request) { + return delete( + request, + builder -> + builder.pathSegment( + "service_credential_bindings", + request.getServiceBindingId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceBindingRequest request) { + return get( + request, + GetServiceBindingResponse.class, + builder -> + builder.pathSegment( + "service_credential_bindings", + request.getServiceBindingId())) + .checkpoint(); + } + + @Override + public Mono getDetails( + GetServiceBindingDetailsRequest request) { + return get( + request, + GetServiceBindingDetailsResponse.class, + builder -> + builder.pathSegment( + "service_credential_bindings", + request.getServiceBindingId(), + "details")) + .checkpoint(); + } + + @Override + public Mono getParameters( + GetServiceBindingParametersRequest request) { + return get( + request, + GetServiceBindingParametersResponse.class, + builder -> + builder.pathSegment( + "service_credential_bindings", + request.getServiceBindingId(), + "parameters")) + .checkpoint(); + } + + @Override + public Mono list(ListServiceBindingsRequest request) { + return get( + request, + ListServiceBindingsResponse.class, + builder -> builder.pathSegment("service_credential_bindings")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceBindingRequest request) { + return patch( + request, + UpdateServiceBindingResponse.class, + builder -> + builder.pathSegment( + "service_credential_bindings", + request.getServiceBindingId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/servicebrokers/ReactorServiceBrokersV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/servicebrokers/ReactorServiceBrokersV3.java new file mode 100644 index 00000000000..2367d61cd3e --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/servicebrokers/ReactorServiceBrokersV3.java @@ -0,0 +1,84 @@ +package org.cloudfoundry.reactor.client.v3.servicebrokers; + +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.v3.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.GetServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.GetServiceBrokerResponse; +import org.cloudfoundry.client.v3.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v3.servicebrokers.ListServiceBrokersResponse; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokerResource; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokersV3; +import org.cloudfoundry.client.v3.servicebrokers.UpdateServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.UpdateServiceBrokerResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +public final class ReactorServiceBrokersV3 extends AbstractClientV3Operations + implements ServiceBrokersV3 { + + public ReactorServiceBrokersV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateServiceBrokerRequest request) { + return post(request, builder -> builder.pathSegment("service_brokers")).checkpoint(); + } + + @Override + public Mono delete(DeleteServiceBrokerRequest request) { + return delete( + request, + builder -> + builder.pathSegment( + "service_brokers", request.getServiceBrokerId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceBrokerRequest request) { + return get( + request, + GetServiceBrokerResponse.class, + builder -> + builder.pathSegment( + "service_brokers", request.getServiceBrokerId())) + .checkpoint(); + } + + @Override + public Mono list(ListServiceBrokersRequest request) { + return get( + request, + ListServiceBrokersResponse.class, + builder -> builder.pathSegment("service_brokers")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceBrokerRequest request) { + return patchWithResponse( + request, + ServiceBrokerResource.class, + builder -> + builder.pathSegment( + "service_brokers", request.getServiceBrokerId())) + .map( + responseTuple -> + UpdateServiceBrokerResponse.builder() + .serviceBroker(responseTuple.getBody()) + .jobId( + Optional.ofNullable( + extractJobId(responseTuple.getResponse()))) + .build()) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3.java new file mode 100644 index 00000000000..05fdefec19c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3.java @@ -0,0 +1,208 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.serviceinstances; + +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetManagedServiceParametersRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetManagedServiceParametersResponse; +import org.cloudfoundry.client.v3.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.GetUserProvidedCredentialsRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetUserProvidedCredentialsResponse; +import org.cloudfoundry.client.v3.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListServiceInstancesResponse; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipResponse; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstancesV3; +import org.cloudfoundry.client.v3.serviceinstances.ShareServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.ShareServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.UnshareServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.UpdateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.HttpClientResponseWithParsedBody; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceInstancesV3} + */ +public final class ReactorServiceInstancesV3 extends AbstractClientV3Operations + implements ServiceInstancesV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceInstancesV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateServiceInstanceRequest request) { + return postWithResponse( + request, + ServiceInstanceResource.class, + builder -> builder.pathSegment("service_instances")) + .map( + responseTuple -> + CreateServiceInstanceResponse.builder() + .jobId(getJobId(responseTuple)) + .serviceInstance(responseTuple.getBody()) + .build()) + .checkpoint(); + } + + private Optional getJobId(HttpClientResponseWithParsedBody responseTuple) { + return Optional.ofNullable(extractJobId(responseTuple.getResponse())); + } + + @Override + public Mono get(GetServiceInstanceRequest request) { + return get( + request, + GetServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "service_instances", request.getServiceInstanceId())) + .checkpoint(); + } + + @Override + public Mono> delete(DeleteServiceInstanceRequest request) { + return deleteWithResponse( + request, + String.class, + builder -> + builder.pathSegment( + "service_instances", request.getServiceInstanceId())) + .map(this::getJobId) + .checkpoint(); + } + + @Override + public Mono getManagedServiceParameters( + GetManagedServiceParametersRequest request) { + return get( + request, + GetManagedServiceParametersResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "parameters")) + .checkpoint(); + } + + @Override + public Mono getUserProvidedCredentials( + GetUserProvidedCredentialsRequest request) { + return get( + request, + GetUserProvidedCredentialsResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "credentials")) + .checkpoint(); + } + + @Override + public Mono list(ListServiceInstancesRequest request) { + return get( + request, + ListServiceInstancesResponse.class, + builder -> builder.pathSegment("service_instances")) + .checkpoint(); + } + + @Override + public Mono listSharedSpacesRelationship( + ListSharedSpacesRelationshipRequest request) { + return get( + request, + ListSharedSpacesRelationshipResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "relationships", + "shared_spaces")) + .checkpoint(); + } + + @Override + public Mono share(ShareServiceInstanceRequest request) { + return post( + request, + ShareServiceInstanceResponse.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "relationships", + "shared_spaces")) + .checkpoint(); + } + + @Override + public Mono unshare(UnshareServiceInstanceRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "service_instances", + request.getServiceInstanceId(), + "relationships", + "shared_spaces", + request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceInstanceRequest request) { + return patchWithResponse( + request, + ServiceInstanceResource.class, + builder -> + builder.pathSegment( + "service_instances", request.getServiceInstanceId())) + .map( + responseTuple -> + UpdateServiceInstanceResponse.builder() + .jobId(getJobId(responseTuple)) + .serviceInstance(responseTuple.getBody()) + .build()) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceofferings/ReactorServiceOfferingsV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceofferings/ReactorServiceOfferingsV3.java new file mode 100644 index 00000000000..7721c036ce4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceofferings/ReactorServiceOfferingsV3.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.serviceofferings; + +import java.util.Map; +import org.cloudfoundry.client.v3.serviceofferings.DeleteServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.GetServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.GetServiceOfferingResponse; +import org.cloudfoundry.client.v3.serviceofferings.ListServiceOfferingsRequest; +import org.cloudfoundry.client.v3.serviceofferings.ListServiceOfferingsResponse; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingsV3; +import org.cloudfoundry.client.v3.serviceofferings.UpdateServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.UpdateServiceOfferingResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServiceOfferingsV3} + */ +public final class ReactorServiceOfferingsV3 extends AbstractClientV3Operations + implements ServiceOfferingsV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServiceOfferingsV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono delete(DeleteServiceOfferingRequest request) { + return delete( + request, + Void.class, + builder -> + builder.pathSegment( + "service_offerings", request.getServiceOfferingId())) + .checkpoint(); + } + + @Override + public Mono get(GetServiceOfferingRequest request) { + return get( + request, + GetServiceOfferingResponse.class, + builder -> + builder.pathSegment( + "service_offerings", request.getServiceOfferingId())) + .checkpoint(); + } + + @Override + public Mono list(ListServiceOfferingsRequest request) { + return get( + request, + ListServiceOfferingsResponse.class, + builder -> builder.pathSegment("service_offerings")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceOfferingRequest request) { + return patch( + request, + UpdateServiceOfferingResponse.class, + builder -> + builder.pathSegment( + "service_offerings", request.getServiceOfferingId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceplans/ReactorServicePlansV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceplans/ReactorServicePlansV3.java new file mode 100644 index 00000000000..1fc859cd82f --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/serviceplans/ReactorServicePlansV3.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.serviceplans; + +import java.util.Map; +import org.cloudfoundry.client.v3.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansResponse; +import org.cloudfoundry.client.v3.serviceplans.ServicePlansV3; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanVisibilityResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link ServicePlansV3} + */ +public final class ReactorServicePlansV3 extends AbstractClientV3Operations + implements ServicePlansV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServicePlansV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono delete(DeleteServicePlanRequest request) { + return delete( + request, + Void.class, + builder -> builder.pathSegment("service_plans", request.getServicePlanId())) + .checkpoint(); + } + + @Override + public Mono get(GetServicePlanRequest request) { + return get( + request, + GetServicePlanResponse.class, + builder -> builder.pathSegment("service_plans", request.getServicePlanId())) + .checkpoint(); + } + + @Override + public Mono list(ListServicePlansRequest request) { + return get( + request, + ListServicePlansResponse.class, + builder -> builder.pathSegment("service_plans")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServicePlanRequest request) { + return patch( + request, + UpdateServicePlanResponse.class, + builder -> builder.pathSegment("service_plans", request.getServicePlanId())) + .checkpoint(); + } + + @Override + public Mono updateVisibility( + UpdateServicePlanVisibilityRequest request) { + return post( + request, + UpdateServicePlanVisibilityResponse.class, + builder -> + builder.pathSegment( + "service_plans", request.getServicePlanId(), "visibility")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spaces/ReactorSpacesV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spaces/ReactorSpacesV3.java new file mode 100644 index 00000000000..b62a3c53cd0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/spaces/ReactorSpacesV3.java @@ -0,0 +1,160 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.spaces; + +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.v3.spaces.ApplyManifestRequest; +import org.cloudfoundry.client.v3.spaces.ApplyManifestResponse; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentResponse; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v3.spaces.DeleteUnmappedRoutesRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceIsolationSegmentResponse; +import org.cloudfoundry.client.v3.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v3.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v3.spaces.ListSpacesResponse; +import org.cloudfoundry.client.v3.spaces.SpacesV3; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link SpacesV3} + */ +public final class ReactorSpacesV3 extends AbstractClientV3Operations implements SpacesV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorSpacesV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono applyManifest(ApplyManifestRequest request) { + return postRawWithResponse( + request.getManifest(), + "application/x-yaml", + ApplyManifestResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "actions", + "apply_manifest")) + .map( + responseTuple -> + ApplyManifestResponse.builder() + .jobId( + Optional.ofNullable( + extractJobId(responseTuple.getResponse()))) + .build()); + } + + @Override + public Mono assignIsolationSegment( + AssignSpaceIsolationSegmentRequest request) { + return patch( + request, + AssignSpaceIsolationSegmentResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "relationships", + "isolation_segment")) + .checkpoint(); + } + + @Override + public Mono create(CreateSpaceRequest request) { + return post(request, CreateSpaceResponse.class, builder -> builder.pathSegment("spaces")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSpaceRequest request) { + return delete(request, builder -> builder.pathSegment("spaces", request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono deleteUnmappedRoutes(DeleteUnmappedRoutesRequest request) { + return delete( + request, + builder -> + builder.pathSegment("spaces", request.getSpaceId(), "routes") + .query("unmapped=true")) + .checkpoint(); + } + + @Override + public Mono get(GetSpaceRequest request) { + return get( + request, + GetSpaceResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId())) + .checkpoint(); + } + + @Override + public Mono getIsolationSegment( + GetSpaceIsolationSegmentRequest request) { + return get( + request, + GetSpaceIsolationSegmentResponse.class, + builder -> + builder.pathSegment( + "spaces", + request.getSpaceId(), + "relationships", + "isolation_segment")) + .checkpoint(); + } + + @Override + public Mono list(ListSpacesRequest request) { + return get(request, ListSpacesResponse.class, builder -> builder.pathSegment("spaces")) + .checkpoint(); + } + + @Override + public Mono update(UpdateSpaceRequest request) { + return patch( + request, + UpdateSpaceResponse.class, + builder -> builder.pathSegment("spaces", request.getSpaceId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/stacks/ReactorStacksV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/stacks/ReactorStacksV3.java new file mode 100644 index 00000000000..6de8cd71bdd --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/stacks/ReactorStacksV3.java @@ -0,0 +1,103 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.stacks; + +import java.util.Map; +import org.cloudfoundry.client.v3.stacks.CreateStackRequest; +import org.cloudfoundry.client.v3.stacks.CreateStackResponse; +import org.cloudfoundry.client.v3.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v3.stacks.GetStackRequest; +import org.cloudfoundry.client.v3.stacks.GetStackResponse; +import org.cloudfoundry.client.v3.stacks.ListStacksRequest; +import org.cloudfoundry.client.v3.stacks.ListStacksResponse; +import org.cloudfoundry.client.v3.stacks.StacksV3; +import org.cloudfoundry.client.v3.stacks.UpdateStackRequest; +import org.cloudfoundry.client.v3.stacks.UpdateStackResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link StacksV3} + */ +public class ReactorStacksV3 extends AbstractClientV3Operations implements StacksV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorStacksV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateStackRequest request) { + return post( + request, + CreateStackResponse.class, + uriComponentsBuilder -> uriComponentsBuilder.pathSegment("stacks")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteStackRequest request) { + return delete( + request, + Void.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("stacks", request.getStackId())) + .checkpoint(); + } + + @Override + public Mono get(GetStackRequest request) { + return get( + request, + GetStackResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("stacks", request.getStackId())) + .checkpoint(); + } + + @Override + public Mono list(ListStacksRequest request) { + return get( + request, + ListStacksResponse.class, + uriComponentsBuilder -> uriComponentsBuilder.pathSegment("stacks")) + .checkpoint(); + } + + @Override + public Mono update(UpdateStackRequest request) { + return patch( + request, + UpdateStackResponse.class, + uriComponentsBuilder -> + uriComponentsBuilder.pathSegment("stacks", request.getStackId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/tasks/ReactorTasks.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/tasks/ReactorTasks.java new file mode 100644 index 00000000000..52984911287 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/tasks/ReactorTasks.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.tasks; + +import java.util.Map; +import org.cloudfoundry.client.v3.tasks.CancelTaskRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskResponse; +import org.cloudfoundry.client.v3.tasks.CreateTaskRequest; +import org.cloudfoundry.client.v3.tasks.CreateTaskResponse; +import org.cloudfoundry.client.v3.tasks.GetTaskRequest; +import org.cloudfoundry.client.v3.tasks.GetTaskResponse; +import org.cloudfoundry.client.v3.tasks.ListTasksRequest; +import org.cloudfoundry.client.v3.tasks.ListTasksResponse; +import org.cloudfoundry.client.v3.tasks.Tasks; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Tasks} + */ +public final class ReactorTasks extends AbstractClientV3Operations implements Tasks { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorTasks( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono cancel( + CancelTaskRequest request) { // TODO: Modify once support has aged out + // https://v3-apidocs.cloudfoundry.org/version/3.27.0/#cancel-a-task + return put( + request, + CancelTaskResponse.class, + builder -> builder.pathSegment("tasks", request.getTaskId(), "cancel")) + .checkpoint(); + } + + @Override + public Mono create(CreateTaskRequest request) { + return post( + request, + CreateTaskResponse.class, + builder -> builder.pathSegment("apps", request.getApplicationId(), "tasks")) + .checkpoint(); + } + + @Override + public Mono get(GetTaskRequest request) { + return get( + request, + GetTaskResponse.class, + builder -> builder.pathSegment("tasks", request.getTaskId())) + .checkpoint(); + } + + @Override + public Mono list(ListTasksRequest request) { + return get(request, ListTasksResponse.class, builder -> builder.pathSegment("tasks")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/users/ReactorUsersV3.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/users/ReactorUsersV3.java new file mode 100644 index 00000000000..69d48d9baee --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/client/v3/users/ReactorUsersV3.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.users; + +import java.util.Map; +import org.cloudfoundry.client.v3.users.*; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.v3.AbstractClientV3Operations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link UsersV3} + */ +public class ReactorUsersV3 extends AbstractClientV3Operations implements UsersV3 { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically, something like {@code https://api.cloudfoundry.your.company.com}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorUsersV3( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateUserRequest request) { + return post(request, CreateUserResponse.class, builder -> builder.pathSegment("users")) + .checkpoint(); + } + + @Override + public Mono get(GetUserRequest request) { + return get( + request, + GetUserResponse.class, + builder -> builder.pathSegment("users", request.getUserId())) + .checkpoint(); + } + + @Override + public Mono list(ListUsersRequest request) { + return get(request, ListUsersResponse.class, builder -> builder.pathSegment("users")) + .checkpoint(); + } + + @Override + public Mono update(UpdateUserRequest request) { + return patch( + request, + UpdateUserResponse.class, + builder -> builder.pathSegment("users", request.getUserId())) + .checkpoint(); + } + + @Override + public Mono delete(DeleteUserRequest request) { + return delete( + request, + Void.class, + builder -> builder.pathSegment("users", request.getUserId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/AbstractDopplerOperations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/AbstractDopplerOperations.java new file mode 100644 index 00000000000..608054e0ac3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/AbstractDopplerOperations.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.doppler; + +import io.netty.channel.ChannelHandler; +import java.io.InputStream; +import java.util.Map; +import java.util.function.Function; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientResponse; + +abstract class AbstractDopplerOperations extends AbstractReactorOperations { + + AbstractDopplerOperations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + final Flux get( + Function uriTransformer, + Function channelHandlerBuilder, + Function> bodyTransformer) { + return createOperator() + .flatMapMany( + operator -> + operator.get() + .uri(uriTransformer) + .response() + .addChannelHandler(channelHandlerBuilder) + .parseBodyToFlux( + responseWithBody -> + bodyTransformer.apply( + responseWithBody.getBody()))); + } + + final Flux ws( + Function uriTransformer) { + return createOperator() + .flatMapMany(operator -> operator.websocket().uri(uriTransformer).get()); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/MultipartCodec.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/MultipartCodec.java new file mode 100644 index 00000000000..1c63558cb40 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/MultipartCodec.java @@ -0,0 +1,83 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.doppler; + +import io.netty.buffer.Unpooled; +import io.netty.handler.codec.DelimiterBasedFrameDecoder; +import io.netty.handler.codec.http.HttpHeaderNames; +import java.io.IOException; +import java.io.InputStream; +import java.nio.charset.Charset; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Flux; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientResponse; + +final class MultipartCodec { + + private static final Logger LOGGER = LoggerFactory.getLogger(MultipartCodec.class); + + private static final Pattern BOUNDARY_PATTERN = Pattern.compile("multipart/.+; boundary=(.*)"); + + private static final int MAX_PAYLOAD_SIZE = 1024 * 1024; + + private MultipartCodec() {} + + static DelimiterBasedFrameDecoder createDecoder(HttpClientResponse response) { + String boundary = extractMultipartBoundary(response); + + return new DelimiterBasedFrameDecoder( + MAX_PAYLOAD_SIZE, + Unpooled.copiedBuffer( + String.format("--%s\r\n\r\n", boundary), Charset.defaultCharset()), + Unpooled.copiedBuffer( + String.format("\r\n--%s\r\n\r\n", boundary), Charset.defaultCharset()), + Unpooled.copiedBuffer( + String.format("\r\n--%s--", boundary), Charset.defaultCharset()), + Unpooled.copiedBuffer( + String.format("\r\n--%s--\r\n", boundary), Charset.defaultCharset())); + } + + static Flux decode(ByteBufFlux body) { + return body.asInputStream().skip(1).doOnDiscard(InputStream.class, MultipartCodec::close); + } + + private static void close(InputStream in) { + try { + in.close(); + } catch (IOException e) { + LOGGER.warn("Could not close input stream. This will cause a direct memory leak.", e); + } + } + + private static String extractMultipartBoundary(HttpClientResponse response) { + String contentType = response.responseHeaders().get(HttpHeaderNames.CONTENT_TYPE); + Matcher matcher = BOUNDARY_PATTERN.matcher(contentType); + + if (matcher.matches()) { + return matcher.group(1); + } else { + throw new IllegalStateException( + String.format( + "Content-Type %s does not contain a valid multipart boundary", + contentType)); + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/ReactorDopplerEndpoints.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/ReactorDopplerEndpoints.java new file mode 100644 index 00000000000..07f7f410eee --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/ReactorDopplerEndpoints.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.doppler; + +import java.io.IOException; +import java.io.InputStream; +import java.util.Map; +import org.cloudfoundry.doppler.ContainerMetricsRequest; +import org.cloudfoundry.doppler.Envelope; +import org.cloudfoundry.doppler.FirehoseRequest; +import org.cloudfoundry.doppler.RecentLogsRequest; +import org.cloudfoundry.doppler.StreamRequest; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +final class ReactorDopplerEndpoints extends AbstractDopplerOperations { + + ReactorDopplerEndpoints( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + Flux containerMetrics(ContainerMetricsRequest request) { + return get( + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "containermetrics"), + MultipartCodec::createDecoder, + MultipartCodec::decode) + .map(ReactorDopplerEndpoints::toEnvelope) + .checkpoint(); + } + + Flux firehose(FirehoseRequest request) { + return ws(builder -> builder.pathSegment("firehose", request.getSubscriptionId())) + .map(ReactorDopplerEndpoints::toEnvelope) + .checkpoint(); + } + + Flux recentLogs(RecentLogsRequest request) { + return get( + builder -> + builder.pathSegment( + "apps", request.getApplicationId(), "recentlogs"), + MultipartCodec::createDecoder, + MultipartCodec::decode) + .map(ReactorDopplerEndpoints::toEnvelope) + .checkpoint(); + } + + Flux stream(StreamRequest request) { + return ws(builder -> builder.pathSegment("apps", request.getApplicationId(), "stream")) + .map(ReactorDopplerEndpoints::toEnvelope) + .checkpoint(); + } + + private static Envelope toEnvelope(InputStream content) { + try (InputStream in = content) { + return Envelope.from(org.cloudfoundry.dropsonde.events.Envelope.ADAPTER.decode(in)); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/_ReactorDopplerClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/_ReactorDopplerClient.java new file mode 100644 index 00000000000..6db85938e73 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/doppler/_ReactorDopplerClient.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.doppler; + +import org.cloudfoundry.doppler.ContainerMetricsRequest; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.doppler.Envelope; +import org.cloudfoundry.doppler.FirehoseRequest; +import org.cloudfoundry.doppler.RecentLogsRequest; +import org.cloudfoundry.doppler.StreamRequest; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.Map; + +/** + * The Reactor-based implementation of {@link DopplerClient} + */ +@Value.Immutable +abstract class _ReactorDopplerClient implements DopplerClient { + + @Override + public Flux containerMetrics(ContainerMetricsRequest request) { + return getDopplerEndpoints().containerMetrics(request); + } + + @Override + public Flux firehose(FirehoseRequest request) { + return getDopplerEndpoints().firehose(request); + } + + @Override + public Flux recentLogs(RecentLogsRequest request) { + return getDopplerEndpoints().recentLogs(request); + } + + @Override + public Flux stream(StreamRequest request) { + return getDopplerEndpoints().stream(request); + } + + /** + * The connection context + */ + abstract ConnectionContext getConnectionContext(); + + @Value.Derived + ReactorDopplerEndpoints getDopplerEndpoints() { + return new ReactorDopplerEndpoints(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Value.Default + Map getRequestTags() { + return Collections.emptyMap(); + } + + @Value.Default + Mono getRoot() { + return getConnectionContext().getRootProvider().getRoot("logging", getConnectionContext()); + } + + /** + * The token provider + */ + abstract TokenProvider getTokenProvider(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/AbstractLogCacheOperations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/AbstractLogCacheOperations.java new file mode 100644 index 00000000000..3145c1c721e --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/AbstractLogCacheOperations.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.logcache.v1; + +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.QueryBuilder; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +public class AbstractLogCacheOperations extends AbstractReactorOperations { + + protected AbstractLogCacheOperations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + protected final Mono get( + Object requestPayload, Class responseType, String... pathSegments) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri( + buildPathSegments(pathSegments) + .andThen(queryTransformer(requestPayload))) + .response() + .parseBody(responseType)); + } + + private Function buildPathSegments( + String[] pathSegments) { + return builder -> builder.pathSegment("api", "v1").pathSegment(pathSegments); + } + + private Function queryTransformer( + Object requestPayload) { + return builder -> { + Stream parameters = new QueryBuilder().build(requestPayload); + UriQueryParameters.set(builder, parameters); + return builder; + }; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/ReactorLogCacheEndpoints.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/ReactorLogCacheEndpoints.java new file mode 100644 index 00000000000..2e68c52538b --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/ReactorLogCacheEndpoints.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.logcache.v1; + +import java.util.Map; +import org.cloudfoundry.logcache.v1.InfoRequest; +import org.cloudfoundry.logcache.v1.InfoResponse; +import org.cloudfoundry.logcache.v1.MetaRequest; +import org.cloudfoundry.logcache.v1.MetaResponse; +import org.cloudfoundry.logcache.v1.ReadRequest; +import org.cloudfoundry.logcache.v1.ReadResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import reactor.core.publisher.Mono; + +final class ReactorLogCacheEndpoints extends AbstractLogCacheOperations { + + ReactorLogCacheEndpoints( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + Mono info(InfoRequest request) { + return get(request, InfoResponse.class, "info").checkpoint(); + } + + Mono meta(MetaRequest request) { + return get(request, MetaResponse.class, "meta").checkpoint(); + } + + Mono read(ReadRequest request) { + return get(request, ReadResponse.class, "read", request.getSourceId()).checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/_ReactorLogCacheClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/_ReactorLogCacheClient.java new file mode 100644 index 00000000000..d9460476ea4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/logcache/v1/_ReactorLogCacheClient.java @@ -0,0 +1,94 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.logcache.v1; + +import org.cloudfoundry.logcache.v1.InfoRequest; +import org.cloudfoundry.logcache.v1.InfoResponse; +import org.cloudfoundry.logcache.v1.LogCacheClient; +import org.cloudfoundry.logcache.v1.MetaRequest; +import org.cloudfoundry.logcache.v1.MetaResponse; +import org.cloudfoundry.logcache.v1.ReadRequest; +import org.cloudfoundry.logcache.v1.ReadResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; +import reactor.core.publisher.Mono; + +import java.net.URI; +import java.util.Collections; +import java.util.Map; + +/** + * The Reactor-based implementation of {@link LogCacheClient} + */ +@Value.Immutable +abstract class _ReactorLogCacheClient implements LogCacheClient { + + @Override + public Mono info(InfoRequest request) { + return getReactorLogCacheEndpoints().info(request); + } + + @Override + public Mono meta(MetaRequest request) { + return getReactorLogCacheEndpoints().meta(request); + } + + @Override + public Mono read(ReadRequest request) { + return getReactorLogCacheEndpoints().read(request); + } + + /** + * The connection context + */ + abstract ConnectionContext getConnectionContext(); + + @Value.Derived + ReactorLogCacheEndpoints getReactorLogCacheEndpoints() { + return new ReactorLogCacheEndpoints(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Value.Default + Map getRequestTags() { + return Collections.emptyMap(); + } + + @Value.Default + Mono getRoot() { + final Mono cached = getConnectionContext().getRootProvider().getRoot("log_cache", getConnectionContext()) + .onErrorResume(IllegalArgumentException.class, e -> deriveLogCacheUrl()); + + return getConnectionContext().getCacheDuration() + .map(cached::cache) + .orElseGet(cached::cache); + } + + /** + * The token provider + */ + abstract TokenProvider getTokenProvider(); + + private Mono deriveLogCacheUrl() { + return getConnectionContext().getRootProvider().getRoot(getConnectionContext()) + .map(root -> root.replaceFirst("://api", "://log-cache")) + .map(URI::create) + .delayUntil(uri -> getConnectionContext().trust(uri.getHost(), uri.getPort())) + .map(URI::toString); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/AbstractNetworkingOperations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/AbstractNetworkingOperations.java new file mode 100644 index 00000000000..bc3572c2b2e --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/AbstractNetworkingOperations.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking; + +import java.util.Map; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.QueryBuilder; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +public abstract class AbstractNetworkingOperations extends AbstractReactorOperations { + + protected AbstractNetworkingOperations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + protected final Mono get( + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri(uriTransformer) + .response() + .parseBody(responseType)); + } + + protected final Mono get( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBody(responseType)); + } + + protected final Mono post( + Object request, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri(uriTransformer) + .send(request) + .response() + .parseBody(responseType)); + } + + protected final Mono put( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.put() + .uri(uriTransformer) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + private Function queryTransformer( + Object requestPayload) { + return builder -> { + Stream parameters = new QueryBuilder().build(requestPayload); + UriQueryParameters.set(builder, parameters); + return builder; + }; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/_ReactorNetworkingClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/_ReactorNetworkingClient.java new file mode 100644 index 00000000000..e59e89e2d51 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/_ReactorNetworkingClient.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking; + +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.networking.v1.policies.Policies; +import org.cloudfoundry.networking.v1.tags.Tags; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.networking.v1.policies.ReactorPolicies; +import org.cloudfoundry.reactor.networking.v1.tags.ReactorTags; +import org.immutables.value.Value; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.Map; + +/** + * The Reactor-based implementation of {@link NetworkingClient} + */ +@Value.Immutable +abstract class _ReactorNetworkingClient implements NetworkingClient { + + @Override + @Value.Derived + public Policies policies() { + return new ReactorPolicies(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Tags tags() { + return new ReactorTags(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + /** + * The connection context + */ + abstract ConnectionContext getConnectionContext(); + + @Value.Default + Map getRequestTags() { + return Collections.emptyMap(); + } + + @Value.Default + Mono getRoot() { + return getConnectionContext().getRootProvider().getRoot("network_policy_v1", getConnectionContext()); + } + + /** + * The token provider + */ + abstract TokenProvider getTokenProvider(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/v1/policies/ReactorPolicies.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/v1/policies/ReactorPolicies.java new file mode 100644 index 00000000000..166efa431b1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/v1/policies/ReactorPolicies.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking.v1.policies; + +import java.util.Map; +import org.cloudfoundry.networking.v1.policies.CreatePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.DeletePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.ListPoliciesRequest; +import org.cloudfoundry.networking.v1.policies.ListPoliciesResponse; +import org.cloudfoundry.networking.v1.policies.Policies; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.networking.AbstractNetworkingOperations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Policies} + */ +public class ReactorPolicies extends AbstractNetworkingOperations implements Policies { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorPolicies( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreatePoliciesRequest request) { + return post(request, Object.class, builder -> builder.pathSegment("policies")) + .then() + .checkpoint(); + } + + @Override + public Mono delete(DeletePoliciesRequest request) { + return post(request, Object.class, builder -> builder.pathSegment("policies", "delete")) + .then() + .checkpoint(); + } + + @Override + public Mono list(ListPoliciesRequest request) { + return get(request, ListPoliciesResponse.class, builder -> builder.pathSegment("policies")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/v1/tags/ReactorTags.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/v1/tags/ReactorTags.java new file mode 100644 index 00000000000..84ada764ec7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/networking/v1/tags/ReactorTags.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking.v1.tags; + +import java.util.Map; +import org.cloudfoundry.networking.v1.tags.ListTagsRequest; +import org.cloudfoundry.networking.v1.tags.ListTagsResponse; +import org.cloudfoundry.networking.v1.tags.Tags; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.networking.AbstractNetworkingOperations; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Tags} + */ +public class ReactorTags extends AbstractNetworkingOperations implements Tags { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorTags( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono list(ListTagsRequest request) { + return get(ListTagsResponse.class, builder -> builder.pathSegment("tags")).checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/_ReactorRoutingClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/_ReactorRoutingClient.java new file mode 100644 index 00000000000..959da40e3f0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/_ReactorRoutingClient.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing; + +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.routing.v1.routergroups.ReactorRouterGroups; +import org.cloudfoundry.reactor.routing.v1.tcproutes.ReactorTcpRoutes; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.routing.v1.routergroups.RouterGroups; +import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes; +import org.immutables.value.Value; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.Map; + +/** + * The Reactor-based implementation of {@link RoutingClient} + */ +@Value.Immutable +abstract class _ReactorRoutingClient implements RoutingClient { + + @Override + @Value.Derived + public RouterGroups routerGroups() { + return new ReactorRouterGroups(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public TcpRoutes tcpRoutes() { + return new ReactorTcpRoutes(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + /** + * The connection context + */ + abstract ConnectionContext getConnectionContext(); + + @Value.Default + Map getRequestTags() { + return Collections.emptyMap(); + } + + @Value.Default + Mono getRoot() { + return getConnectionContext().getRootProvider().getRoot("routing", getConnectionContext()); + } + + /** + * The token provider + */ + abstract TokenProvider getTokenProvider(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/AbstractRoutingV1Operations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/AbstractRoutingV1Operations.java new file mode 100644 index 00000000000..7d26a1d0f89 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/AbstractRoutingV1Operations.java @@ -0,0 +1,97 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1; + +import io.netty.channel.ChannelHandler; +import java.util.Map; +import java.util.function.Function; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientResponse; + +public abstract class AbstractRoutingV1Operations extends AbstractReactorOperations { + + protected AbstractRoutingV1Operations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + protected final Mono get( + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri(uriTransformer) + .response() + .parseBody(responseType)); + } + + protected final Flux get( + Function handlerBuilder, + Function uriTransformer, + Function> bodyTransformer) { + return createOperator() + .flatMapMany( + operator -> + operator.get() + .uri(uriTransformer) + .response() + .addChannelHandler(handlerBuilder) + .parseBodyToFlux( + responseWithBody -> + bodyTransformer.apply( + responseWithBody.getBody()))); + } + + protected final Mono post( + Object request, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.post() + .uri(uriTransformer) + .send(request) + .response() + .parseBody(responseType)); + } + + protected final Mono put( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.put() + .uri(uriTransformer) + .send(requestPayload) + .response() + .parseBody(responseType)); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/routergroups/ReactorRouterGroups.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/routergroups/ReactorRouterGroups.java new file mode 100644 index 00000000000..a7aae99bb99 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/routergroups/ReactorRouterGroups.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.routergroups; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.routing.v1.AbstractRoutingV1Operations; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsRequest; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsResponse; +import org.cloudfoundry.routing.v1.routergroups.RouterGroups; +import org.cloudfoundry.routing.v1.routergroups.UpdateRouterGroupRequest; +import org.cloudfoundry.routing.v1.routergroups.UpdateRouterGroupResponse; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link RouterGroups} + */ +public class ReactorRouterGroups extends AbstractRoutingV1Operations implements RouterGroups { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorRouterGroups( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono list(ListRouterGroupsRequest request) { + return get( + ListRouterGroupsResponse.class, + builder -> builder.pathSegment("v1", "router_groups")) + .checkpoint(); + } + + @Override + public Mono update(UpdateRouterGroupRequest request) { + return put( + request, + UpdateRouterGroupResponse.class, + builder -> + builder.pathSegment( + "v1", "router_groups", request.getRouterGroupId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/EventStreamCodec.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/EventStreamCodec.java new file mode 100644 index 00000000000..787178e78bc --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/EventStreamCodec.java @@ -0,0 +1,94 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.tcproutes; + +import io.netty.handler.codec.LineBasedFrameDecoder; +import reactor.core.publisher.Flux; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientResponse; + +final class EventStreamCodec { + + private static final int MAX_PAYLOAD_SIZE = 1024 * 1024; + + private EventStreamCodec() {} + + static LineBasedFrameDecoder createDecoder(HttpClientResponse response) { + return new LineBasedFrameDecoder(MAX_PAYLOAD_SIZE); + } + + static Flux decode(ByteBufFlux body) { + return body.asString() + .windowWhile(s -> !s.isEmpty()) + .concatMap( + window -> + window.reduce( + ServerSentEvent.builder(), EventStreamCodec::parseLine)) + .map(ServerSentEvent.Builder::build) + .filter( + sse -> + sse.getData() != null + || sse.getEventType() != null + || sse.getId() != null + || sse.getRetry() != null); + } + + private static Field parseField(String line) { + String[] split = line.split("[ ]?:[ ]?", 2); + + String key = split.length > 0 ? split[0] : ""; + String value = split.length > 1 ? split[1] : ""; + + return new Field(key, value); + } + + private static ServerSentEvent.Builder parseLine(ServerSentEvent.Builder builder, String line) { + Field field = parseField(line); + + if ("data".equals(field.getKey())) { + builder.data(field.getValue()); + } else if ("event".equals(field.getKey())) { + builder.eventType(field.getValue()); + } else if ("id".equals(field.getKey())) { + builder.id(field.getValue()); + } else if ("retry".equals(field.getKey())) { + builder.retry(Integer.parseInt(field.getValue())); + } + + return builder; + } + + private static final class Field { + + private final String key; + + private final String value; + + private Field(String key, String value) { + this.key = key; + this.value = value; + } + + private String getKey() { + return this.key; + } + + private String getValue() { + return this.value; + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/ReactorTcpRoutes.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/ReactorTcpRoutes.java new file mode 100644 index 00000000000..9651614c770 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/ReactorTcpRoutes.java @@ -0,0 +1,102 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.tcproutes; + +import java.io.IOException; +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.routing.v1.AbstractRoutingV1Operations; +import org.cloudfoundry.routing.v1.tcproutes.CreateTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.CreateTcpRoutesResponse; +import org.cloudfoundry.routing.v1.tcproutes.DeleteTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.EventType; +import org.cloudfoundry.routing.v1.tcproutes.EventsRequest; +import org.cloudfoundry.routing.v1.tcproutes.ListTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.ListTcpRoutesResponse; +import org.cloudfoundry.routing.v1.tcproutes.TcpRouteEvent; +import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link TcpRoutes} + */ +public class ReactorTcpRoutes extends AbstractRoutingV1Operations implements TcpRoutes { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://api.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorTcpRoutes( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateTcpRoutesRequest request) { + return post( + request, + CreateTcpRoutesResponse.class, + builder -> builder.pathSegment("v1", "tcp_routes", "create")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteTcpRoutesRequest request) { + return post( + request, + Void.class, + builder -> builder.pathSegment("v1", "tcp_routes", "delete")) + .checkpoint(); + } + + @Override + public Flux events(EventsRequest request) { + return get( + EventStreamCodec::createDecoder, + builder -> builder.pathSegment("v1", "tcp_routes", "events"), + EventStreamCodec::decode) + .map( + event -> { + try { + return this.connectionContext + .getObjectMapper() + .readValue(event.getData(), TcpRouteEvent.Builder.class) + .eventType(EventType.from(event.getEventType())) + .build(); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }) + .checkpoint(); + } + + @Override + public Mono list(ListTcpRoutesRequest request) { + return get(ListTcpRoutesResponse.class, builder -> builder.pathSegment("v1", "tcp_routes")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/_ServerSentEvent.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/_ServerSentEvent.java new file mode 100644 index 00000000000..d0dd4f5ca24 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/routing/v1/tcproutes/_ServerSentEvent.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.tcproutes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Optional; +import java.util.stream.Collectors; + +@Value.Immutable +abstract class _ServerSentEvent { + + @Value.Derived + @Nullable + String getData() { + return Optional.ofNullable(getDatas()) + .map(datas -> datas.stream() + .collect(Collectors.joining("\n"))) + .orElse(null); + } + + @Nullable + abstract List getDatas(); + + @Nullable + abstract String getEventType(); + + @Nullable + abstract String getId(); + + @Nullable + abstract Integer getRetry(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/AbstractUaaTokenProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/AbstractUaaTokenProvider.java new file mode 100644 index 00000000000..10e34a4b0b2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/AbstractUaaTokenProvider.java @@ -0,0 +1,353 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.tokenprovider; + +import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; +import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_TYPE; +import static io.netty.handler.codec.http.HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED; +import static reactor.core.publisher.Sinks.EmitFailureHandler.FAIL_FAST; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.JwtParser; +import io.jsonwebtoken.Jwts; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.util.AsciiString; +import java.time.LocalDateTime; +import java.time.ZoneId; +import java.util.Base64; +import java.util.Date; +import java.util.Map; +import java.util.Optional; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.function.BiConsumer; +import java.util.function.Consumer; +import java.util.function.Function; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.util.ErrorPayloadMappers; +import org.cloudfoundry.reactor.util.JsonCodec; +import org.cloudfoundry.reactor.util.Operator; +import org.cloudfoundry.reactor.util.OperatorContext; +import org.cloudfoundry.reactor.util.UserAgent; +import org.immutables.value.Value; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.publisher.Sinks; +import reactor.netty.ByteBufFlux; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +/** + * An abstract base class for all token providers that interact with the UAA. It encapsulates the logic to refresh the token before + * expiration. + */ +public abstract class AbstractUaaTokenProvider implements TokenProvider { + + private static final Logger LOGGER = LoggerFactory.getLogger("cloudfoundry-client.token"); + + private static final String ACCESS_TOKEN = "access_token"; + + private static final String AUTHORIZATION_ENDPOINT = "authorization_endpoint"; + + private static final String REFRESH_TOKEN = "refresh_token"; + + private static final String TOKEN_TYPE = "token_type"; + + private static final ZoneId UTC = ZoneId.of("UTC"); + + protected final ConcurrentMap> accessTokens = + new ConcurrentHashMap<>(1); + + private final ConcurrentMap refreshTokenStreams = + new ConcurrentHashMap<>(1); + + private final ConcurrentMap refreshTokens = + new ConcurrentHashMap<>(1); + + /** + * The client id. Defaults to {@code cf}. + */ + @Value.Default + public String getClientId() { + return "cf"; + } + + /** + * The client secret. Defaults to {@code ""}. + */ + @Value.Default + public String getClientSecret() { + return ""; + } + + /** + * Returns a {@link Flux} of refresh tokens for a connection + * + * @param connectionContext A {@link ConnectionContext} to be used to identity which connection the refresh tokens be retrieved for + * @return a {@link Flux} that emits the last token on subscribe and new refresh tokens as they are negotiated + */ + public Flux getRefreshTokens(ConnectionContext connectionContext) { + return getRefreshTokenStream(connectionContext).sink.asFlux(); + } + + @Override + public final Mono getToken(ConnectionContext connectionContext) { + return this.accessTokens.computeIfAbsent(connectionContext, this::token); + } + + @Override + public void invalidate(ConnectionContext connectionContext) { + String refreshToken = this.refreshTokens.remove(connectionContext); + if (refreshToken != null) { + this.accessTokens.put(connectionContext, token(connectionContext, refreshToken)); + } + } + + /** + * The identity zone subdomain + */ + @Nullable + abstract String getIdentityZoneSubdomain(); + + /** + * Transforms an {@code HttpClientRequest} and an {@code HttpClientForm} in order to make a request that negotiates an access token. + * + * @param request the {@link HttpClientRequest} to transform to perform the token request + * @param form the {@link HttpClientForm} to transform to perform the token request + */ + abstract void tokenRequestTransformer(HttpClientRequest request, HttpClientForm form); + + private Mono token(ConnectionContext connectionContext) { + Mono token = + primaryToken(connectionContext) + .doOnSubscribe(s -> LOGGER.debug("Negotiating using token provider")); + + return cacheResult(connectionContext, token); + } + + private Mono token(ConnectionContext connectionContext, String refreshToken) { + Mono token = + refreshToken(connectionContext, refreshToken) + .doOnSubscribe(s -> LOGGER.debug("Negotiating using refresh token")) + // fall back to primary token in case the refresh_token grant fails + // (expired, revoked, ...) + .switchIfEmpty( + primaryToken(connectionContext) + .doOnSubscribe( + s -> + LOGGER.debug( + "Falling back to token provider"))); + + return cacheResult(connectionContext, token); + } + + private static String extractAccessToken(Map payload) { + String accessToken = payload.get(ACCESS_TOKEN); + + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("Access Token: {}", accessToken); + + parseToken(accessToken) + .ifPresent( + claims -> { + LOGGER.debug( + "Access Token Issued At: {} UTC", + toLocalDateTime(claims.getIssuedAt())); + LOGGER.debug( + "Access Token Expires At: {} UTC", + toLocalDateTime(claims.getExpiration())); + }); + } + + return String.format("%s %s", payload.get(TOKEN_TYPE), accessToken); + } + + private static Optional parseToken(String token) { + if (!token.contains(".")) { + return Optional.empty(); + } + + try { + String jws = token.substring(0, token.lastIndexOf('.') + 1); + JwtParser parser = Jwts.parser().build(); + + return Optional.of(parser.parseClaimsJwt(jws).getBody()); + } catch (Exception e) { + return Optional.empty(); + } + } + + private static void setContentType(HttpHeaders httpHeaders) { + httpHeaders.set(CONTENT_TYPE, APPLICATION_X_WWW_FORM_URLENCODED); + } + + private static LocalDateTime toLocalDateTime(Date date) { + return LocalDateTime.from(date.toInstant().atZone(UTC)); + } + + private static Function tokenUriTransformer( + String identityZoneId) { + return root -> { + if (identityZoneId != null) { + root.host(String.format("%s.%s", identityZoneId, root.build().getHost())); + } + + return root.pathSegment("oauth", "token"); + }; + } + + private void addHeaders(HttpHeaders httpHeaders) { + setContentType(httpHeaders); + setAuthorization(httpHeaders); + UserAgent.setUserAgent(httpHeaders); + JsonCodec.setDecodeHeaders(httpHeaders); + } + + private Operator createOperator(ConnectionContext connectionContext, String root) { + OperatorContext context = OperatorContext.of(connectionContext, root); + return new Operator(context, connectionContext.getHttpClient()) + .withErrorPayloadMapper( + ErrorPayloadMappers.uaa(connectionContext.getObjectMapper())); + } + + private Consumer> extractRefreshToken(ConnectionContext connectionContext) { + return payload -> + Optional.ofNullable(payload.get(REFRESH_TOKEN)) + .ifPresent( + refreshToken -> { + if (LOGGER.isDebugEnabled()) { + LOGGER.debug("Refresh Token: {}", refreshToken); + + parseToken(refreshToken) + .ifPresent( + claims -> { + LOGGER.debug( + "Refresh Token Issued At: {}" + + " UTC", + toLocalDateTime( + claims.getIssuedAt())); + LOGGER.debug( + "Refresh Token Expires At: {}" + + " UTC", + toLocalDateTime( + claims + .getExpiration())); + }); + } + + this.refreshTokens.put(connectionContext, refreshToken); + getRefreshTokenStream(connectionContext) + .sink + .emitNext(refreshToken, FAIL_FAST); + }); + } + + private RefreshToken getRefreshTokenStream(ConnectionContext connectionContext) { + return this.refreshTokenStreams.computeIfAbsent(connectionContext, c -> new RefreshToken()); + } + + private Mono primaryToken(ConnectionContext connectionContext) { + return requestToken( + connectionContext, + this::tokenRequestTransformer, + tokensExtractor(connectionContext)); + } + + private Mono refreshToken(ConnectionContext connectionContext, String refreshToken) { + return requestToken( + connectionContext, + refreshTokenGrantTokenRequestTransformer(refreshToken), + tokensExtractor(connectionContext)) + .doOnError(t -> LOGGER.error("Refresh token grant error.", t)) + .onErrorResume(t -> Mono.empty()); + } + + private BiConsumer refreshTokenGrantTokenRequestTransformer( + String refreshToken) { + return (request, form) -> + form.multipart(false) + .attr("client_id", getClientId()) + .attr("client_secret", getClientSecret()) + .attr("grant_type", "refresh_token") + .attr("refresh_token", refreshToken); + } + + private Mono requestToken( + ConnectionContext connectionContext, + BiConsumer tokenRequestTransformer, + Function> tokenExtractor) { + return connectionContext + .getRootProvider() + .getRoot(AUTHORIZATION_ENDPOINT, connectionContext) + .map(root -> createOperator(connectionContext, root)) + .flatMap( + operator -> + operator.headers(this::addHeaders) + .post() + .uri(tokenUriTransformer(getIdentityZoneSubdomain())) + .sendForm(tokenRequestTransformer) + .response() + .parseBodyToToken( + responseWithBody -> + tokenExtractor.apply( + responseWithBody.getBody()))); + } + + private void setAuthorization(HttpHeaders headers) { + String encoded = + Base64.getEncoder() + .encodeToString( + new AsciiString(getClientId()) + .concat(":") + .concat(getClientSecret()) + .toByteArray()); + headers.set(AUTHORIZATION, String.format("Basic %s", encoded)); + } + + /** + * Cache the given mono. If {@link ConnectionContext#getCacheDuration()} is not null, use that + * as the cache TTL. Otherwise, cache indefinitely. + */ + private static Mono cacheResult( + ConnectionContext connectionContext, Mono token) { + return connectionContext + .getCacheDuration() + .map(token::cache) + .orElseGet(token::cache) + .checkpoint(); + } + + @SuppressWarnings("unchecked") + private Function> tokensExtractor( + ConnectionContext connectionContext) { + return body -> + JsonCodec.decode(connectionContext.getObjectMapper(), body, Map.class) + .map(payload -> (Map) payload) + .doOnNext(extractRefreshToken(connectionContext)) + .map(AbstractUaaTokenProvider::extractAccessToken); + } + + private static final class RefreshToken { + + private Sinks.Many sink = Sinks.many().replay().latest(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_ClientCredentialsGrantTokenProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_ClientCredentialsGrantTokenProvider.java new file mode 100644 index 00000000000..2bbbbaa101c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_ClientCredentialsGrantTokenProvider.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.tokenprovider; + +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +/** + * The Client Credentials Grant implementation of {@link TokenProvider} + */ +@Value.Immutable +abstract class _ClientCredentialsGrantTokenProvider extends AbstractUaaTokenProvider { + + @Override + void tokenRequestTransformer(HttpClientRequest request, HttpClientForm form) { + form.multipart(false) + .attr("client_id", getClientId()) + .attr("client_secret", getClientSecret()) + .attr("grant_type", "client_credentials") + .attr("response_type", "token"); + } + + @Override + public void invalidate(ConnectionContext connectionContext) { + this.accessTokens.remove(connectionContext); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_OneTimePasscodeTokenProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_OneTimePasscodeTokenProvider.java new file mode 100644 index 00000000000..3fd88f09d8a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_OneTimePasscodeTokenProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.tokenprovider; + +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +/** + * The One-time Passcode Password Grant implementation of {@link TokenProvider} + */ +@Value.Immutable +abstract class _OneTimePasscodeTokenProvider extends AbstractUaaTokenProvider { + + /** + * The passcode + */ + abstract String getPasscode(); + + @Override + void tokenRequestTransformer(HttpClientRequest request, HttpClientForm form) { + form.multipart(false) + .attr("client_id", getClientId()) + .attr("client_secret", getClientSecret()) + .attr("grant_type", "password") + .attr("passcode", getPasscode()); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_PasswordGrantTokenProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_PasswordGrantTokenProvider.java new file mode 100644 index 00000000000..37dcca334ec --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_PasswordGrantTokenProvider.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.tokenprovider; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +/** + * The OAuth Password Grant implementation of {@link TokenProvider} + */ +@Value.Immutable +abstract class _PasswordGrantTokenProvider extends AbstractUaaTokenProvider { + + /** + * The login hint + */ + @Nullable + abstract String getLoginHint(); + + /** + * The password + */ + abstract String getPassword(); + + /** + * The username + */ + abstract String getUsername(); + + @Override + void tokenRequestTransformer(HttpClientRequest request, HttpClientForm form) { + form.multipart(false) + .attr("client_id", getClientId()) + .attr("client_secret", getClientSecret()) + .attr("grant_type", "password") + .attr("password", getPassword()) + .attr("username", getUsername()) + .attr("login_hint", getLoginHint()); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_RefreshTokenGrantTokenProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_RefreshTokenGrantTokenProvider.java new file mode 100644 index 00000000000..0313feefa75 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/tokenprovider/_RefreshTokenGrantTokenProvider.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.tokenprovider; + +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +/** + * The OAuth Refresh Token Grant implementation of {@link TokenProvider} + */ +@Value.Immutable +abstract class _RefreshTokenGrantTokenProvider extends AbstractUaaTokenProvider { + + /** + * The refresh token + */ + abstract String getToken(); + + @Override + void tokenRequestTransformer(HttpClientRequest request, HttpClientForm form) { + form.multipart(false) + .attr("grant_type", "refresh_token") + .attr("client_id", getClientId()) + .attr("client_secret", getClientSecret()) + .attr("refresh_token", getToken()); + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/AbstractUaaOperations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/AbstractUaaOperations.java new file mode 100644 index 00000000000..d4ab1ab9d2d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/AbstractUaaOperations.java @@ -0,0 +1,290 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import io.netty.handler.codec.http.HttpHeaders; +import java.util.Map; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.QueryBuilder; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.ErrorPayloadMappers; +import org.cloudfoundry.reactor.util.Operator; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClientResponse; + +public abstract class AbstractUaaOperations extends AbstractReactorOperations { + + protected AbstractUaaOperations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + protected Mono createOperator() { + return super.createOperator().map(this::attachErrorPayloadMapper); + } + + protected final Mono delete( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers(headers -> addHeaders(headers, requestPayload)) + .delete() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono get( + Object requestPayload, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers(headers -> addHeaders(headers, requestPayload)) + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .get()); + } + + protected final Mono get( + Object requestPayload, + Function uriTransformer, + Consumer headersTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers( + headers -> + addHeaders( + headers, + requestPayload, + headersTransformer)) + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .get()); + } + + protected final Mono get( + Object requestPayload, + Function uriTransformer, + Consumer headersTransformer, + Function> headersWhenTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers( + headers -> + addHeaders( + headers, + requestPayload, + headersTransformer)) + .headersWhen(headersWhenTransformer) + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .get()); + } + + protected final Mono get( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers(headers -> addHeaders(headers, requestPayload)) + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBody(responseType)); + } + + protected final Mono get( + Object requestPayload, + Class responseType, + Function uriTransformer, + Consumer headersTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers( + headers -> + addHeaders( + headers, + requestPayload, + headersTransformer)) + .get() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .response() + .parseBody(responseType)); + } + + protected final Mono patch( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers(headers -> addHeaders(headers, requestPayload)) + .patch() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono post( + Object requestPayload, + Class responseType, + Function uriTransformer, + Consumer headersTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers( + headers -> + addHeaders( + headers, + requestPayload, + headersTransformer)) + .post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono post( + Object requestPayload, + Class responseType, + Function uriTransformer, + Consumer headersTransformer, + Function> headersWhenTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers( + headers -> + addHeaders( + headers, + requestPayload, + headersTransformer)) + .headersWhen(headersWhenTransformer) + .post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono post( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers(headers -> addHeaders(headers, requestPayload)) + .post() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + protected final Mono put( + Object requestPayload, + Class responseType, + Function uriTransformer) { + return createOperator() + .flatMap( + operator -> + operator.headers(headers -> addHeaders(headers, requestPayload)) + .put() + .uri( + queryTransformer(requestPayload) + .andThen(uriTransformer)) + .send(requestPayload) + .response() + .parseBody(responseType)); + } + + private static void addHeaders( + HttpHeaders httpHeaders, + Object requestPayload, + Consumer headersTransformer) { + addHeaders(httpHeaders, requestPayload); + headersTransformer.accept(httpHeaders); + } + + private static void addHeaders(HttpHeaders httpHeaders, Object requestPayload) { + IdentityZoneBuilder.augment(httpHeaders, requestPayload); + VersionBuilder.augment(httpHeaders, requestPayload); + } + + private Operator attachErrorPayloadMapper(Operator operator) { + return operator.withErrorPayloadMapper( + ErrorPayloadMappers.uaa(this.connectionContext.getObjectMapper())); + } + + private Function queryTransformer( + Object requestPayload) { + return builder -> { + Stream parameters = new QueryBuilder().build(requestPayload); + UriQueryParameters.set(builder, parameters); + return builder; + }; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/IdentityZoneBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/IdentityZoneBuilder.java new file mode 100644 index 00000000000..cfec4512f02 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/IdentityZoneBuilder.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import io.netty.handler.codec.http.HttpHeaders; +import java.util.Optional; +import org.cloudfoundry.uaa.IdentityZoned; + +final class IdentityZoneBuilder { + + private IdentityZoneBuilder() {} + + static void augment(HttpHeaders httpHeaders, Object request) { + if (request instanceof IdentityZoned) { + IdentityZoned identityZoned = (IdentityZoned) request; + Optional.ofNullable(identityZoned.getIdentityZoneId()) + .ifPresent( + identityZoneId -> + httpHeaders.set("X-Identity-Zone-Id", identityZoneId)); + Optional.ofNullable(identityZoned.getIdentityZoneSubdomain()) + .ifPresent( + identityZoneSubdomain -> + httpHeaders.set( + "X-Identity-Zone-Subdomain", identityZoneSubdomain)); + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/ReactorRatelimit.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/ReactorRatelimit.java new file mode 100644 index 00000000000..c350367d611 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/ReactorRatelimit.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.uaa.ratelimit.Ratelimit; +import org.cloudfoundry.uaa.ratelimit.RatelimitRequest; +import org.cloudfoundry.uaa.ratelimit.RatelimitResponse; +import reactor.core.publisher.Mono; + +public final class ReactorRatelimit extends AbstractUaaOperations implements Ratelimit { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorRatelimit( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono getRatelimit(RatelimitRequest request) { + return get( + request, + RatelimitResponse.class, + builder -> builder.pathSegment("RateLimitingStatus")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/UaaSigningKeyResolver.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/UaaSigningKeyResolver.java new file mode 100644 index 00000000000..3f2aaa8066b --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/UaaSigningKeyResolver.java @@ -0,0 +1,107 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.JwsHeader; +import io.jsonwebtoken.SigningKeyResolver; +import java.security.Key; +import java.security.KeyFactory; +import java.security.NoSuchAlgorithmException; +import java.security.spec.InvalidKeySpecException; +import java.security.spec.X509EncodedKeySpec; +import java.time.Duration; +import java.util.Base64; +import java.util.HashMap; +import java.util.Map; +import org.cloudfoundry.uaa.tokens.ListTokenKeysRequest; +import org.cloudfoundry.uaa.tokens.ListTokenKeysResponse; +import org.cloudfoundry.uaa.tokens.TokenKey; +import org.cloudfoundry.uaa.tokens.Tokens; +import reactor.core.Exceptions; + +final class UaaSigningKeyResolver implements SigningKeyResolver { + + private static final String BEGIN = "-----BEGIN PUBLIC KEY-----"; + + private static final String END = "-----END PUBLIC KEY-----"; + + private final Object monitor = new Object(); + + private final Map signingKeys = new HashMap<>(); + + private final Tokens tokens; + + UaaSigningKeyResolver(Tokens tokens) { + this.tokens = tokens; + } + + @Override + @SuppressWarnings("rawtypes") + public Key resolveSigningKey(JwsHeader header, Claims claims) { + return getKey(header.getKeyId()); + } + + @Override + @SuppressWarnings("rawtypes") + public Key resolveSigningKey(JwsHeader jwsHeader, byte[] bytes) { + return getKey(jwsHeader.getKeyId()); + } + + private static byte[] decode(TokenKey tokenKey) { + return Base64.getMimeDecoder() + .decode(tokenKey.getValue().replace(BEGIN, "").replace(END, "").trim()); + } + + private static Key generateKey(TokenKey tokenKey) { + try { + return KeyFactory.getInstance(tokenKey.getKeyType().toString()) + .generatePublic(new X509EncodedKeySpec(decode(tokenKey))); + } catch (InvalidKeySpecException | NoSuchAlgorithmException e) { + throw Exceptions.propagate(e); + } + } + + private Key getKey(String keyId) { + synchronized (this.monitor) { + Key key = this.signingKeys.get(keyId); + if (key != null) { + return key; + } + + refreshKeys(); + + key = this.signingKeys.get(keyId); + if (key != null) { + return key; + } + + throw new IllegalStateException( + String.format("Unable to retrieve signing key %s", keyId)); + } + } + + private void refreshKeys() { + this.signingKeys.clear(); + this.signingKeys.putAll( + this.tokens + .listKeys(ListTokenKeysRequest.builder().build()) + .flatMapIterable(ListTokenKeysResponse::getKeys) + .collectMap(TokenKey::getId, UaaSigningKeyResolver::generateKey) + .block(Duration.ofMinutes(5))); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/UsernameProvider.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/UsernameProvider.java new file mode 100644 index 00000000000..39b9e4e0594 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/UsernameProvider.java @@ -0,0 +1,83 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.ExpiredJwtException; +import io.jsonwebtoken.Jws; +import io.jsonwebtoken.JwtParser; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SigningKeyResolver; +import java.util.Optional; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.uaa.tokens.Tokens; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; +import reactor.util.retry.Retry; + +final class UsernameProvider { + + private final ConnectionContext connectionContext; + + private final SigningKeyResolver signingKeyResolver; + + private final TokenProvider tokenProvider; + + UsernameProvider( + ConnectionContext connectionContext, TokenProvider tokenProvider, Tokens tokens) { + this(connectionContext, new UaaSigningKeyResolver(tokens), tokenProvider); + } + + UsernameProvider( + ConnectionContext connectionContext, + SigningKeyResolver signingKeyResolver, + TokenProvider tokenProvider) { + this.connectionContext = connectionContext; + this.tokenProvider = tokenProvider; + this.signingKeyResolver = signingKeyResolver; + } + + Mono get() { + return getToken(this.connectionContext, this.tokenProvider) + .publishOn(Schedulers.boundedElastic()) + .map(this::getUsername) + .retryWhen( + Retry.max(1) + .filter(ExpiredJwtException.class::isInstance) + .doAfterRetry( + r -> + this.tokenProvider.invalidate( + this.connectionContext))); + } + + private static Mono getToken( + ConnectionContext connectionContext, TokenProvider tokenProvider) { + return Mono.defer(() -> tokenProvider.getToken(connectionContext)) + .map(s -> s.split(" ")[1]); + } + + private String getUsername(String token) { + JwtParser parser = Jwts.parser().setSigningKeyResolver(this.signingKeyResolver).build(); + + Jws jws = parser.parseClaimsJws(token); + + return Optional.ofNullable(jws.getBody().get("user_name", String.class)) + .orElseThrow( + () -> new IllegalStateException("Unable to retrieve username from token")); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/VersionBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/VersionBuilder.java new file mode 100644 index 00000000000..4e697a3726b --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/VersionBuilder.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import io.netty.handler.codec.http.HttpHeaders; +import java.util.Optional; +import org.cloudfoundry.uaa.Versioned; + +final class VersionBuilder { + + private VersionBuilder() {} + + static void augment(HttpHeaders httpHeaders, Object request) { + if (request instanceof Versioned) { + Versioned versioned = (Versioned) request; + Optional.ofNullable(versioned.getVersion()) + .ifPresent(version -> httpHeaders.set("If-Match", version)); + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/_ReactorUaaClient.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/_ReactorUaaClient.java new file mode 100644 index 00000000000..a1b28ca8489 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/_ReactorUaaClient.java @@ -0,0 +1,162 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.authorizations.ReactorAuthorizations; +import org.cloudfoundry.reactor.uaa.clients.ReactorClients; +import org.cloudfoundry.reactor.uaa.groups.ReactorGroups; +import org.cloudfoundry.reactor.uaa.identityproviders.ReactorIdentityProviders; +import org.cloudfoundry.reactor.uaa.identityzones.ReactorIdentityZones; +import org.cloudfoundry.reactor.uaa.serverinformation.ReactorServerInformation; +import org.cloudfoundry.reactor.uaa.tokens.ReactorTokens; +import org.cloudfoundry.reactor.uaa.users.ReactorUsers; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.authorizations.Authorizations; +import org.cloudfoundry.uaa.clients.Clients; +import org.cloudfoundry.uaa.groups.Groups; +import org.cloudfoundry.uaa.identityproviders.IdentityProviders; +import org.cloudfoundry.uaa.identityzones.IdentityZones; +import org.cloudfoundry.uaa.ratelimit.Ratelimit; +import org.cloudfoundry.uaa.serverinformation.ServerInformation; +import org.cloudfoundry.uaa.tokens.Tokens; +import org.cloudfoundry.uaa.users.Users; +import org.immutables.value.Value; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +import java.util.Collections; +import java.util.Map; +import java.util.function.Function; + +/** + * The Reactor-based implementation of {@link UaaClient} + */ +@Value.Immutable +abstract class _ReactorUaaClient implements UaaClient { + + @Override + @Value.Derived + public Authorizations authorizations() { + return new ReactorAuthorizations(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Clients clients() { + return new ReactorClients(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Mono getUsername() { + return getUsernameProvider().get(); + } + + @Override + @Value.Derived + public Groups groups() { + return new ReactorGroups(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public IdentityProviders identityProviders() { + return new ReactorIdentityProviders(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public IdentityZones identityZones() { + return new ReactorIdentityZones(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public ServerInformation serverInformation() { + return new ReactorServerInformation(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Tokens tokens() { + return new ReactorTokens(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Users users() { + return new ReactorUsers(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + @Override + @Value.Derived + public Ratelimit rateLimit() { + return new ReactorRatelimit(getConnectionContext(), getRoot(), getTokenProvider(), getRequestTags()); + } + + /** + * The connection context + */ + abstract ConnectionContext getConnectionContext(); + + /** + * The identity zone subdomain + */ + @Nullable + abstract String getIdentityZoneSubdomain(); + + @Value.Default + Map getRequestTags() { + return Collections.emptyMap(); + } + + @Value.Default + Mono getRoot() { + Mono cached = getConnectionContext().getRootProvider().getRoot("uaa", getConnectionContext()) + .map(getIdentityZoneEndpoint(getIdentityZoneSubdomain())); + + return getConnectionContext().getCacheDuration() + .map(cached::cache) + .orElseGet(cached::cache); + } + + /** + * The token provider + */ + abstract TokenProvider getTokenProvider(); + + @Value.Default + UsernameProvider getUsernameProvider() { + return new UsernameProvider(getConnectionContext(), getTokenProvider(), tokens()); + } + + private static Function getIdentityZoneEndpoint(String identityZoneId) { + return raw -> { + if (identityZoneId == null) { + return raw; + } + + UriComponentsBuilder builder = UriComponentsBuilder.fromUriString(raw); + builder.host(String.format("%s.%s", identityZoneId, builder.build().getHost())); + return builder.build().encode().toUriString(); + }; + } + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizations.java new file mode 100644 index 00000000000..f929b35dda2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizations.java @@ -0,0 +1,188 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.authorizations; + +import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; + +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.util.AsciiString; +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.ResponseType; +import org.cloudfoundry.uaa.authorizations.Authorizations; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantApiRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantBrowserRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantHybridRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByImplicitGrantBrowserRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithAuthorizationCodeGrantRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithIdTokenRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithImplicitGrantRequest; +import org.cloudfoundry.uaa.authorizations.GetOpenIdProviderConfigurationRequest; +import org.cloudfoundry.uaa.authorizations.GetOpenIdProviderConfigurationResponse; +import org.cloudfoundry.util.ExceptionUtils; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Authorizations} + */ +public final class ReactorAuthorizations extends AbstractUaaOperations implements Authorizations { + + private static final AsciiString LOCATION = new AsciiString("Location"); + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorAuthorizations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono authorizationCodeGrantApi( + AuthorizeByAuthorizationCodeGrantApiRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam("response_type", ResponseType.CODE)) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .flatMap( + location -> { + String candidate = + UriComponentsBuilder.fromUriString(location) + .build() + .getQueryParams() + .getFirst("code"); + + return Optional.ofNullable(candidate) + .map(Mono::just) + .orElse( + ExceptionUtils.illegalState( + String.format( + "Parameter %s not in URI %s", + "code", location))); + }) + .checkpoint(); + } + + @Override + public Mono authorizationCodeGrantBrowser( + AuthorizeByAuthorizationCodeGrantBrowserRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam("response_type", ResponseType.CODE), + outbound -> {}, + ReactorAuthorizations::removeAuthorization) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .checkpoint(); + } + + @Override + public Mono authorizationCodeGrantHybrid( + AuthorizeByAuthorizationCodeGrantHybridRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam( + "response_type", ResponseType.CODE_AND_ID_TOKEN), + outbound -> {}, + ReactorAuthorizations::removeAuthorization) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .checkpoint(); + } + + @Override + public Mono getOpenIdProviderConfiguration( + GetOpenIdProviderConfigurationRequest request) { + return get( + request, + GetOpenIdProviderConfigurationResponse.class, + builder -> builder.pathSegment(".well-known", "openid-configuration")) + .checkpoint(); + } + + @Override + public Mono implicitGrantBrowser(AuthorizeByImplicitGrantBrowserRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam("response_type", ResponseType.TOKEN), + outbound -> {}, + ReactorAuthorizations::removeAuthorization) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .checkpoint(); + } + + @Override + public Mono openIdWithAuthorizationCodeAndIdToken( + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam( + "response_type", ResponseType.CODE_AND_ID_TOKEN), + outbound -> {}, + ReactorAuthorizations::removeAuthorization) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .checkpoint(); + } + + @Override + public Mono openIdWithIdToken(AuthorizeByOpenIdWithIdTokenRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam("response_type", ResponseType.ID_TOKEN)) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .checkpoint(); + } + + @Override + public Mono openIdWithTokenAndIdToken( + AuthorizeByOpenIdWithImplicitGrantRequest request) { + return get( + request, + builder -> + builder.pathSegment("oauth", "authorize") + .queryParam( + "response_type", ResponseType.TOKEN_AND_ID_TOKEN)) + .map(inbound -> inbound.responseHeaders().get(LOCATION)) + .checkpoint(); + } + + private static Mono removeAuthorization(HttpHeaders request) { + return Mono.just(request.remove(AUTHORIZATION)); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/clients/ReactorClients.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/clients/ReactorClients.java new file mode 100644 index 00000000000..75f8f664cd2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/clients/ReactorClients.java @@ -0,0 +1,206 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.clients; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.clients.BatchChangeSecretRequest; +import org.cloudfoundry.uaa.clients.BatchChangeSecretResponse; +import org.cloudfoundry.uaa.clients.BatchCreateClientsRequest; +import org.cloudfoundry.uaa.clients.BatchCreateClientsResponse; +import org.cloudfoundry.uaa.clients.BatchDeleteClientsRequest; +import org.cloudfoundry.uaa.clients.BatchDeleteClientsResponse; +import org.cloudfoundry.uaa.clients.BatchUpdateClientsRequest; +import org.cloudfoundry.uaa.clients.BatchUpdateClientsResponse; +import org.cloudfoundry.uaa.clients.ChangeSecretRequest; +import org.cloudfoundry.uaa.clients.ChangeSecretResponse; +import org.cloudfoundry.uaa.clients.Clients; +import org.cloudfoundry.uaa.clients.CreateClientRequest; +import org.cloudfoundry.uaa.clients.CreateClientResponse; +import org.cloudfoundry.uaa.clients.DeleteClientRequest; +import org.cloudfoundry.uaa.clients.DeleteClientResponse; +import org.cloudfoundry.uaa.clients.GetClientRequest; +import org.cloudfoundry.uaa.clients.GetClientResponse; +import org.cloudfoundry.uaa.clients.GetMetadataRequest; +import org.cloudfoundry.uaa.clients.GetMetadataResponse; +import org.cloudfoundry.uaa.clients.ListClientsRequest; +import org.cloudfoundry.uaa.clients.ListClientsResponse; +import org.cloudfoundry.uaa.clients.ListMetadatasRequest; +import org.cloudfoundry.uaa.clients.ListMetadatasResponse; +import org.cloudfoundry.uaa.clients.MixedActionsRequest; +import org.cloudfoundry.uaa.clients.MixedActionsResponse; +import org.cloudfoundry.uaa.clients.UpdateClientRequest; +import org.cloudfoundry.uaa.clients.UpdateClientResponse; +import org.cloudfoundry.uaa.clients.UpdateMetadataRequest; +import org.cloudfoundry.uaa.clients.UpdateMetadataResponse; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Clients} + */ +public final class ReactorClients extends AbstractUaaOperations implements Clients { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorClients( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono batchChangeSecret(BatchChangeSecretRequest request) { + return post( + request, + BatchChangeSecretResponse.class, + builder -> builder.pathSegment("oauth", "clients", "tx", "secret")) + .checkpoint(); + } + + @Override + public Mono batchCreate(BatchCreateClientsRequest request) { + return post( + request, + BatchCreateClientsResponse.class, + builder -> builder.pathSegment("oauth", "clients", "tx")) + .checkpoint(); + } + + @Override + public Mono batchDelete(BatchDeleteClientsRequest request) { + return post( + request, + BatchDeleteClientsResponse.class, + builder -> builder.pathSegment("oauth", "clients", "tx", "delete")) + .checkpoint(); + } + + @Override + public Mono batchUpdate(BatchUpdateClientsRequest request) { + return put( + request, + BatchUpdateClientsResponse.class, + builder -> builder.pathSegment("oauth", "clients", "tx")) + .checkpoint(); + } + + @Override + public Mono changeSecret(ChangeSecretRequest request) { + return put( + request, + ChangeSecretResponse.class, + builder -> + builder.pathSegment( + "oauth", "clients", request.getClientId(), "secret")) + .checkpoint(); + } + + @Override + public Mono create(CreateClientRequest request) { + return post( + request, + CreateClientResponse.class, + builder -> builder.pathSegment("oauth", "clients")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteClientRequest request) { + return delete( + request, + DeleteClientResponse.class, + builder -> builder.pathSegment("oauth", "clients", request.getClientId())) + .checkpoint(); + } + + @Override + public Mono get(GetClientRequest request) { + return get( + request, + GetClientResponse.class, + builder -> builder.pathSegment("oauth", "clients", request.getClientId())) + .checkpoint(); + } + + @Override + public Mono getMetadata(GetMetadataRequest request) { + return get( + request, + GetMetadataResponse.class, + builder -> + builder.pathSegment( + "oauth", "clients", request.getClientId(), "meta")) + .checkpoint(); + } + + @Override + public Mono list(ListClientsRequest request) { + return get( + request, + ListClientsResponse.class, + builder -> builder.pathSegment("oauth", "clients")) + .checkpoint(); + } + + @Override + public Mono listMetadatas(ListMetadatasRequest request) { + return get( + request, + ListMetadatasResponse.class, + builder -> builder.pathSegment("oauth", "clients", "meta")) + .checkpoint(); + } + + @Override + public Mono mixedActions(MixedActionsRequest request) { + return post( + request, + MixedActionsResponse.class, + builder -> builder.pathSegment("oauth", "clients", "tx", "modify")) + .checkpoint(); + } + + @Override + public Mono update(UpdateClientRequest request) { + return put( + request, + UpdateClientResponse.class, + builder -> builder.pathSegment("oauth", "clients", request.getClientId())) + .checkpoint(); + } + + @Override + public Mono updateMetadata(UpdateMetadataRequest request) { + return put( + request, + UpdateMetadataResponse.class, + builder -> + builder.pathSegment( + "oauth", "clients", request.getClientId(), "meta")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/groups/ReactorGroups.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/groups/ReactorGroups.java new file mode 100644 index 00000000000..7885f1d3cd7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/groups/ReactorGroups.java @@ -0,0 +1,214 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.groups; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.groups.AddMemberRequest; +import org.cloudfoundry.uaa.groups.AddMemberResponse; +import org.cloudfoundry.uaa.groups.CheckMembershipRequest; +import org.cloudfoundry.uaa.groups.CheckMembershipResponse; +import org.cloudfoundry.uaa.groups.CreateGroupRequest; +import org.cloudfoundry.uaa.groups.CreateGroupResponse; +import org.cloudfoundry.uaa.groups.DeleteGroupRequest; +import org.cloudfoundry.uaa.groups.DeleteGroupResponse; +import org.cloudfoundry.uaa.groups.GetGroupRequest; +import org.cloudfoundry.uaa.groups.GetGroupResponse; +import org.cloudfoundry.uaa.groups.Groups; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsRequest; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsResponse; +import org.cloudfoundry.uaa.groups.ListGroupsRequest; +import org.cloudfoundry.uaa.groups.ListGroupsResponse; +import org.cloudfoundry.uaa.groups.ListMembersRequest; +import org.cloudfoundry.uaa.groups.ListMembersResponse; +import org.cloudfoundry.uaa.groups.MapExternalGroupRequest; +import org.cloudfoundry.uaa.groups.MapExternalGroupResponse; +import org.cloudfoundry.uaa.groups.RemoveMemberRequest; +import org.cloudfoundry.uaa.groups.RemoveMemberResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdResponse; +import org.cloudfoundry.uaa.groups.UpdateGroupRequest; +import org.cloudfoundry.uaa.groups.UpdateGroupResponse; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Groups} + */ +public final class ReactorGroups extends AbstractUaaOperations implements Groups { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorGroups( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono addMember(AddMemberRequest request) { + return post( + request, + AddMemberResponse.class, + builder -> builder.pathSegment("Groups", request.getGroupId(), "members")) + .checkpoint(); + } + + @Override + public Mono checkMembership(CheckMembershipRequest request) { + return get( + request, + CheckMembershipResponse.class, + builder -> + builder.pathSegment( + "Groups", + request.getGroupId(), + "members", + request.getMemberId())) + .checkpoint(); + } + + @Override + public Mono create(CreateGroupRequest request) { + return post(request, CreateGroupResponse.class, builder -> builder.pathSegment("Groups")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteGroupRequest request) { + return delete( + request, + DeleteGroupResponse.class, + builder -> builder.pathSegment("Groups", request.getGroupId())) + .checkpoint(); + } + + @Override + public Mono get(GetGroupRequest request) { + return get( + request, + GetGroupResponse.class, + builder -> builder.pathSegment("Groups", request.getGroupId())) + .checkpoint(); + } + + @Override + public Mono list(ListGroupsRequest request) { + return get(request, ListGroupsResponse.class, builder -> builder.pathSegment("Groups")) + .checkpoint(); + } + + @Override + public Mono listExternalGroupMappings( + ListExternalGroupMappingsRequest request) { + return get( + request, + ListExternalGroupMappingsResponse.class, + builder -> builder.pathSegment("Groups", "External")) + .checkpoint(); + } + + @Override + public Mono listMembers(ListMembersRequest request) { + return get( + request, + ListMembersResponse.class, + builder -> builder.pathSegment("Groups", request.getGroupId(), "members")) + .checkpoint(); + } + + @Override + public Mono mapExternalGroup(MapExternalGroupRequest request) { + return post( + request, + MapExternalGroupResponse.class, + builder -> builder.pathSegment("Groups", "External")) + .checkpoint(); + } + + @Override + public Mono removeMember(RemoveMemberRequest request) { + return delete( + request, + RemoveMemberResponse.class, + builder -> + builder.pathSegment( + "Groups", + request.getGroupId(), + "members", + request.getMemberId())) + .checkpoint(); + } + + @Override + public Mono unmapExternalGroupByGroupDisplayName( + UnmapExternalGroupByGroupDisplayNameRequest request) { + return delete( + request, + UnmapExternalGroupByGroupDisplayNameResponse.class, + builder -> + builder.pathSegment( + "Groups", + "External", + "displayName", + request.getGroupDisplayName(), + "externalGroup", + request.getExternalGroup(), + "origin", + request.getOrigin())) + .checkpoint(); + } + + @Override + public Mono unmapExternalGroupByGroupId( + UnmapExternalGroupByGroupIdRequest request) { + return delete( + request, + UnmapExternalGroupByGroupIdResponse.class, + builder -> + builder.pathSegment( + "Groups", + "External", + "groupId", + request.getGroupId(), + "externalGroup", + request.getExternalGroup(), + "origin", + request.getOrigin())) + .checkpoint(); + } + + @Override + public Mono update(UpdateGroupRequest request) { + return put( + request, + UpdateGroupResponse.class, + builder -> builder.pathSegment("Groups", request.getGroupId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/identityproviders/ReactorIdentityProviders.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/identityproviders/ReactorIdentityProviders.java new file mode 100644 index 00000000000..fff1c326a57 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/identityproviders/ReactorIdentityProviders.java @@ -0,0 +1,118 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.identityproviders; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.identityproviders.CreateIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.CreateIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.DeleteIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.DeleteIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.GetIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.GetIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.IdentityProviders; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersRequest; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersResponse; +import org.cloudfoundry.uaa.identityproviders.UpdateIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.UpdateIdentityProviderResponse; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link IdentityProviders} + */ +public final class ReactorIdentityProviders extends AbstractUaaOperations + implements IdentityProviders { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorIdentityProviders( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateIdentityProviderRequest request) { + return post( + request, + CreateIdentityProviderResponse.class, + builder -> + builder.pathSegment("identity-providers") + .queryParam("rawConfig", true)) + .checkpoint(); + } + + @Override + public Mono delete(DeleteIdentityProviderRequest request) { + return delete( + request, + DeleteIdentityProviderResponse.class, + builder -> + builder.pathSegment( + "identity-providers", + request.getIdentityProviderId()) + .queryParam("rawConfig", true)) + .checkpoint(); + } + + @Override + public Mono get(GetIdentityProviderRequest request) { + return get( + request, + GetIdentityProviderResponse.class, + builder -> + builder.pathSegment( + "identity-providers", + request.getIdentityProviderId()) + .queryParam("rawConfig", true)) + .checkpoint(); + } + + @Override + public Mono list(ListIdentityProvidersRequest request) { + return get( + request, + ListIdentityProvidersResponse.class, + builder -> + builder.pathSegment("identity-providers") + .queryParam("rawConfig", true)) + .checkpoint(); + } + + @Override + public Mono update(UpdateIdentityProviderRequest request) { + return put( + request, + UpdateIdentityProviderResponse.class, + builder -> + builder.pathSegment( + "identity-providers", + request.getIdentityProviderId()) + .queryParam("rawConfig", true)) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/identityzones/ReactorIdentityZones.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/identityzones/ReactorIdentityZones.java new file mode 100644 index 00000000000..b09a9c1fc38 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/identityzones/ReactorIdentityZones.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.identityzones; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.DeleteIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.DeleteIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.GetIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.GetIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.IdentityZones; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesRequest; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesResponse; +import org.cloudfoundry.uaa.identityzones.UpdateIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.UpdateIdentityZoneResponse; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link IdentityZones} + */ +public final class ReactorIdentityZones extends AbstractUaaOperations implements IdentityZones { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorIdentityZones( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono create(CreateIdentityZoneRequest request) { + return post( + request, + CreateIdentityZoneResponse.class, + builder -> builder.pathSegment("identity-zones")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteIdentityZoneRequest request) { + return delete( + request, + DeleteIdentityZoneResponse.class, + builder -> + builder.pathSegment("identity-zones", request.getIdentityZoneId())) + .checkpoint(); + } + + @Override + public Mono get(GetIdentityZoneRequest request) { + return get( + request, + GetIdentityZoneResponse.class, + builder -> + builder.pathSegment("identity-zones", request.getIdentityZoneId())) + .checkpoint(); + } + + @Override + public Mono list(ListIdentityZonesRequest request) { + return get( + request, + ListIdentityZonesResponse.class, + builder -> builder.pathSegment("identity-zones")) + .checkpoint(); + } + + @Override + public Mono update(UpdateIdentityZoneRequest request) { + return put( + request, + UpdateIdentityZoneResponse.class, + builder -> + builder.pathSegment("identity-zones", request.getIdentityZoneId())) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/serverinformation/ReactorServerInformation.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/serverinformation/ReactorServerInformation.java new file mode 100644 index 00000000000..595adb2ffe4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/serverinformation/ReactorServerInformation.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.serverinformation; + +import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; + +import io.netty.util.AsciiString; +import java.util.Base64; +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.identityzones.IdentityZones; +import org.cloudfoundry.uaa.serverinformation.AutoLoginRequest; +import org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeRequest; +import org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeResponse; +import org.cloudfoundry.uaa.serverinformation.GetInfoRequest; +import org.cloudfoundry.uaa.serverinformation.GetInfoResponse; +import org.cloudfoundry.uaa.serverinformation.ServerInformation; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link IdentityZones} + */ +public final class ReactorServerInformation extends AbstractUaaOperations + implements ServerInformation { + + private static final AsciiString BASIC_PREAMBLE = new AsciiString("Basic "); + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorServerInformation( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono autoLogin(AutoLoginRequest request) { + return get(request, Void.class, builder -> builder.pathSegment("autologin")).checkpoint(); + } + + @Override + public Mono getAuthenticationCode( + GetAutoLoginAuthenticationCodeRequest request) { + return post( + request, + GetAutoLoginAuthenticationCodeResponse.class, + builder -> builder.pathSegment("autologin"), + outbound -> {}, + outbound -> { + String encoded = + Base64.getEncoder() + .encodeToString( + new AsciiString(request.getClientId()) + .concat(":") + .concat(request.getClientSecret()) + .toByteArray()); + outbound.set(AUTHORIZATION, BASIC_PREAMBLE + encoded); + + return Mono.just(outbound); + }) + .checkpoint(); + } + + @Override + public Mono getInfo(GetInfoRequest request) { + return get(request, GetInfoResponse.class, builder -> builder.pathSegment("info")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/tokens/ReactorTokens.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/tokens/ReactorTokens.java new file mode 100644 index 00000000000..6d600b1b228 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/tokens/ReactorTokens.java @@ -0,0 +1,204 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.tokens; + +import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; +import static io.netty.handler.codec.http.HttpHeaderNames.CONTENT_TYPE; +import static io.netty.handler.codec.http.HttpHeaderValues.APPLICATION_X_WWW_FORM_URLENCODED; +import static org.cloudfoundry.uaa.tokens.GrantType.AUTHORIZATION_CODE; +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.cloudfoundry.uaa.tokens.GrantType.PASSWORD; +import static org.cloudfoundry.uaa.tokens.GrantType.REFRESH_TOKEN; + +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.util.AsciiString; +import java.util.Base64; +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.ResponseType; +import org.cloudfoundry.uaa.tokens.CheckTokenRequest; +import org.cloudfoundry.uaa.tokens.CheckTokenResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByAuthorizationCodeRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByAuthorizationCodeResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByClientCredentialsRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByClientCredentialsResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByOneTimePasscodeRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByOneTimePasscodeResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByOpenIdRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByOpenIdResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByPasswordRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByPasswordResponse; +import org.cloudfoundry.uaa.tokens.GetTokenKeyRequest; +import org.cloudfoundry.uaa.tokens.GetTokenKeyResponse; +import org.cloudfoundry.uaa.tokens.ListTokenKeysRequest; +import org.cloudfoundry.uaa.tokens.ListTokenKeysResponse; +import org.cloudfoundry.uaa.tokens.RefreshTokenRequest; +import org.cloudfoundry.uaa.tokens.RefreshTokenResponse; +import org.cloudfoundry.uaa.tokens.Tokens; +import reactor.core.publisher.Mono; + +public final class ReactorTokens extends AbstractUaaOperations implements Tokens { + + private static final AsciiString BASIC_PREAMBLE = new AsciiString("Basic "); + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorTokens( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono check(CheckTokenRequest request) { + return post( + request, + CheckTokenResponse.class, + builder -> builder.pathSegment("check_token"), + outbound -> {}, + outbound -> { + String encoded = + Base64.getEncoder() + .encodeToString( + new AsciiString(request.getClientId()) + .concat(":") + .concat(request.getClientSecret()) + .toByteArray()); + return Mono.just(outbound.set(AUTHORIZATION, BASIC_PREAMBLE + encoded)); + }) + .checkpoint(); + } + + @Override + public Mono getByAuthorizationCode( + GetTokenByAuthorizationCodeRequest request) { + return post( + request, + GetTokenByAuthorizationCodeResponse.class, + builder -> + builder.pathSegment("oauth", "token") + .queryParam("grant_type", AUTHORIZATION_CODE) + .queryParam("response_type", ResponseType.TOKEN), + ReactorTokens::setUrlEncoded, + ReactorTokens::removeAuthorization) + .checkpoint(); + } + + @Override + public Mono getByClientCredentials( + GetTokenByClientCredentialsRequest request) { + return post( + request, + GetTokenByClientCredentialsResponse.class, + builder -> + builder.pathSegment("oauth", "token") + .queryParam("grant_type", CLIENT_CREDENTIALS) + .queryParam("response_type", ResponseType.TOKEN), + ReactorTokens::setUrlEncoded, + ReactorTokens::removeAuthorization) + .checkpoint(); + } + + @Override + public Mono getByOneTimePasscode( + GetTokenByOneTimePasscodeRequest request) { + return post( + request, + GetTokenByOneTimePasscodeResponse.class, + builder -> + builder.pathSegment("oauth", "token") + .queryParam("grant_type", PASSWORD) + .queryParam("response_type", ResponseType.TOKEN), + ReactorTokens::setUrlEncoded, + ReactorTokens::removeAuthorization) + .checkpoint(); + } + + @Override + public Mono getByOpenId(GetTokenByOpenIdRequest request) { + return post( + request, + GetTokenByOpenIdResponse.class, + builder -> + builder.pathSegment("oauth", "token") + .queryParam("grant_type", AUTHORIZATION_CODE) + .queryParam("response_type", ResponseType.ID_TOKEN), + ReactorTokens::setUrlEncoded, + ReactorTokens::removeAuthorization) + .checkpoint(); + } + + @Override + public Mono getByPassword(GetTokenByPasswordRequest request) { + return post( + request, + GetTokenByPasswordResponse.class, + builder -> + builder.pathSegment("oauth", "token") + .queryParam("grant_type", PASSWORD) + .queryParam("response_type", ResponseType.TOKEN), + ReactorTokens::setUrlEncoded, + ReactorTokens::removeAuthorization) + .checkpoint(); + } + + @Override + public Mono getKey(GetTokenKeyRequest request) { + return get(request, GetTokenKeyResponse.class, builder -> builder.pathSegment("token_key")) + .checkpoint(); + } + + @Override + public Mono listKeys(ListTokenKeysRequest request) { + return get( + request, + ListTokenKeysResponse.class, + builder -> builder.pathSegment("token_keys")) + .checkpoint(); + } + + @Override + public Mono refresh(RefreshTokenRequest request) { + return post( + request, + RefreshTokenResponse.class, + builder -> + builder.pathSegment("oauth", "token") + .queryParam("grant_type", REFRESH_TOKEN), + ReactorTokens::setUrlEncoded, + ReactorTokens::removeAuthorization) + .checkpoint(); + } + + private static Mono removeAuthorization(HttpHeaders request) { + return Mono.just(request.remove(AUTHORIZATION)); + } + + private static void setUrlEncoded(HttpHeaders request) { + request.set(CONTENT_TYPE, APPLICATION_X_WWW_FORM_URLENCODED); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/users/ReactorUsers.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/users/ReactorUsers.java new file mode 100644 index 00000000000..8a5580fe6cc --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/uaa/users/ReactorUsers.java @@ -0,0 +1,159 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.users; + +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.uaa.AbstractUaaOperations; +import org.cloudfoundry.uaa.users.ChangeUserPasswordRequest; +import org.cloudfoundry.uaa.users.ChangeUserPasswordResponse; +import org.cloudfoundry.uaa.users.CreateUserRequest; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.DeleteUserRequest; +import org.cloudfoundry.uaa.users.DeleteUserResponse; +import org.cloudfoundry.uaa.users.ExpirePasswordRequest; +import org.cloudfoundry.uaa.users.ExpirePasswordResponse; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkRequest; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkResponse; +import org.cloudfoundry.uaa.users.InviteUsersRequest; +import org.cloudfoundry.uaa.users.InviteUsersResponse; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.uaa.users.ListUsersResponse; +import org.cloudfoundry.uaa.users.LookupUserIdsRequest; +import org.cloudfoundry.uaa.users.LookupUserIdsResponse; +import org.cloudfoundry.uaa.users.UpdateUserRequest; +import org.cloudfoundry.uaa.users.UpdateUserResponse; +import org.cloudfoundry.uaa.users.UserInfoRequest; +import org.cloudfoundry.uaa.users.UserInfoResponse; +import org.cloudfoundry.uaa.users.Users; +import org.cloudfoundry.uaa.users.VerifyUserRequest; +import org.cloudfoundry.uaa.users.VerifyUserResponse; +import reactor.core.publisher.Mono; + +/** + * The Reactor-based implementation of {@link Users} + */ +public final class ReactorUsers extends AbstractUaaOperations implements Users { + + /** + * Creates an instance + * + * @param connectionContext the {@link ConnectionContext} to use when communicating with the server + * @param root the root URI of the server. Typically something like {@code https://uaa.run.pivotal.io}. + * @param tokenProvider the {@link TokenProvider} to use when communicating with the server + * @param requestTags map with custom http headers which will be added to web request + */ + public ReactorUsers( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + super(connectionContext, root, tokenProvider, requestTags); + } + + @Override + public Mono changePassword(ChangeUserPasswordRequest request) { + return put( + request, + ChangeUserPasswordResponse.class, + builder -> builder.pathSegment("Users", request.getUserId(), "password")) + .checkpoint(); + } + + @Override + public Mono create(CreateUserRequest request) { + return post(request, CreateUserResponse.class, builder -> builder.pathSegment("Users")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteUserRequest request) { + return delete( + request, + DeleteUserResponse.class, + builder -> builder.pathSegment("Users", request.getUserId())) + .checkpoint(); + } + + @Override + public Mono expirePassword(ExpirePasswordRequest request) { + return patch( + request, + ExpirePasswordResponse.class, + builder -> builder.pathSegment("Users", request.getUserId(), "status")) + .checkpoint(); + } + + @Override + public Mono getVerificationLink( + GetUserVerificationLinkRequest request) { + return get( + request, + GetUserVerificationLinkResponse.class, + builder -> builder.pathSegment("Users", request.getUserId(), "verify-link")) + .checkpoint(); + } + + @Override + public Mono invite(InviteUsersRequest request) { + return post( + request, + InviteUsersResponse.class, + builder -> builder.pathSegment("invite_users")) + .checkpoint(); + } + + @Override + public Mono list(ListUsersRequest request) { + return get(request, ListUsersResponse.class, builder -> builder.pathSegment("Users")) + .checkpoint(); + } + + @Override + public Mono lookup(LookupUserIdsRequest request) { + return get( + request, + LookupUserIdsResponse.class, + builder -> builder.pathSegment("ids", "Users")) + .checkpoint(); + } + + @Override + public Mono update(UpdateUserRequest request) { + return put( + request, + UpdateUserResponse.class, + builder -> builder.pathSegment("Users", request.getId())) + .checkpoint(); + } + + @Override + public Mono userInfo(UserInfoRequest request) { + return get(request, UserInfoResponse.class, builder -> builder.pathSegment("userinfo")) + .checkpoint(); + } + + @Override + public Mono verify(VerifyUserRequest request) { + return get( + request, + VerifyUserResponse.class, + builder -> builder.pathSegment("Users", request.getUserId(), "verify")) + .checkpoint(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/AbstractReactorOperations.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/AbstractReactorOperations.java new file mode 100644 index 00000000000..ec97861f60c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/AbstractReactorOperations.java @@ -0,0 +1,80 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import static io.netty.handler.codec.http.HttpHeaderNames.AUTHORIZATION; + +import io.netty.handler.codec.http.HttpHeaders; +import java.util.Map; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import reactor.core.publisher.Mono; +import reactor.netty.http.client.HttpClient; + +public abstract class AbstractReactorOperations { + + protected static final String APPLICATION_ZIP = "application/zip"; + + protected final ConnectionContext connectionContext; + + protected final Map requestTags; + + protected final Mono root; + + protected final TokenProvider tokenProvider; + + protected AbstractReactorOperations( + ConnectionContext connectionContext, + Mono root, + TokenProvider tokenProvider, + Map requestTags) { + this.connectionContext = connectionContext; + this.root = root; + this.tokenProvider = tokenProvider; + this.requestTags = requestTags; + } + + protected Mono createOperator() { + HttpClient httpClient = this.connectionContext.getHttpClient(); + + return this.root + .map(this::buildOperatorContext) + .map(context -> new Operator(context, httpClient)) + .map(operator -> operator.headers(this::addHeaders)) + .map(operator -> operator.headersWhen(this::addHeadersWhen)); + } + + private void addHeaders(HttpHeaders httpHeaders) { + UserAgent.setUserAgent(httpHeaders); + JsonCodec.setDecodeHeaders(httpHeaders); + this.requestTags.forEach(httpHeaders::set); + } + + private Mono addHeadersWhen(HttpHeaders httpHeaders) { + return this.tokenProvider + .getToken(this.connectionContext) + .map(token -> httpHeaders.set(AUTHORIZATION, token)); + } + + private OperatorContext buildOperatorContext(String root) { + return OperatorContext.builder() + .connectionContext(this.connectionContext) + .root(root) + .tokenProvider(this.tokenProvider) + .build(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/AnnotationUtils.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/AnnotationUtils.java new file mode 100644 index 00000000000..75eb0eca2cf --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/AnnotationUtils.java @@ -0,0 +1,127 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.lang.annotation.Annotation; +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.Arrays; +import java.util.Objects; +import java.util.Optional; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.client.MethodNameComparator; +import reactor.core.Exceptions; + +public final class AnnotationUtils { + + private AnnotationUtils() {} + + public static class AnnotatedValue { + + private final T annotation; + + private final Object value; + + public AnnotatedValue(T annotation, Object value) { + this.annotation = annotation; + this.value = value; + } + + public T getAnnotation() { + return this.annotation; + } + + public Object getValue() { + return this.value; + } + } + + public static Optional findAnnotation( + Class type, Class annotationType) { + Class clazz = type; + T annotation = clazz.getAnnotation(annotationType); + + while (annotation == null) { + clazz = clazz.getSuperclass(); + + if (clazz == null || Object.class == clazz) { + break; + } + + annotation = clazz.getAnnotation(annotationType); + } + + return Optional.ofNullable(annotation); + } + + public static Stream> streamAnnotatedValues( + Object instance, Class annotationClass) { + Class instanceClass = instance.getClass(); + return Arrays.stream(instanceClass.getMethods()) + .sorted(MethodNameComparator.INSTANCE) + .map(processMethod(instance, annotationClass)) + .filter(Objects::nonNull); + } + + private static Optional findAnnotation( + Method method, Class annotationType) { + Class clazz = method.getDeclaringClass(); + T annotation = method.getAnnotation(annotationType); + + while (annotation == null) { + clazz = clazz.getSuperclass(); + + if (clazz == null || Object.class == clazz) { + break; + } + + try { + annotation = + clazz.getDeclaredMethod(method.getName(), method.getParameterTypes()) + .getAnnotation(annotationType); + } catch (NoSuchMethodException e) { + // No equivalent method found + } + } + + return Optional.ofNullable(annotation); + } + + private static Optional getValue(Method method, Object instance) { + try { + return Optional.ofNullable(method.invoke(instance)); + } catch (IllegalAccessException | InvocationTargetException e) { + throw Exceptions.propagate(e); + } + } + + private static + Function>> processAnnotation( + Method method, Object instance) { + return annotation -> + getValue(method, instance).map(value -> new AnnotatedValue(annotation, value)); + } + + private static Function> processMethod( + Object instance, Class annotationClass) { + return method -> + findAnnotation(method, annotationClass) + .flatMap(processAnnotation(method, instance)) + .orElse(null); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ByteBufAllocatorMetricProviderMXBean.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ByteBufAllocatorMetricProviderMXBean.java new file mode 100644 index 00000000000..cf14ca6161d --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ByteBufAllocatorMetricProviderMXBean.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import io.netty.buffer.ByteBufAllocator; + +public interface ByteBufAllocatorMetricProviderMXBean { + + /** + * Returns the number of bytes of direct memory used by a {@link ByteBufAllocator} or {@code -1} if unknown. + */ + long getUsedDirectMemory(); + + /** + * Returns the number of bytes of heap memory used by a {@link ByteBufAllocator} or {@code -1} if unknown. + */ + long getUsedHeapMemory(); +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ByteBufAllocatorMetricProviderWrapper.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ByteBufAllocatorMetricProviderWrapper.java new file mode 100644 index 00000000000..bb6bb31e6db --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ByteBufAllocatorMetricProviderWrapper.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import io.netty.buffer.ByteBufAllocatorMetricProvider; + +public final class ByteBufAllocatorMetricProviderWrapper + implements ByteBufAllocatorMetricProviderMXBean { + + private final ByteBufAllocatorMetricProvider delegate; + + public ByteBufAllocatorMetricProviderWrapper(ByteBufAllocatorMetricProvider delegate) { + this.delegate = delegate; + } + + @Override + public long getUsedDirectMemory() { + return this.delegate.metric().usedDirectMemory(); + } + + @Override + public long getUsedHeapMemory() { + return this.delegate.metric().usedHeapMemory(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/CertificateCollectingTrustManager.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/CertificateCollectingTrustManager.java new file mode 100644 index 00000000000..d8fdce82d8c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/CertificateCollectingTrustManager.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.util.Arrays; +import javax.net.ssl.X509TrustManager; + +final class CertificateCollectingTrustManager implements X509TrustManager { + + private final X509TrustManager delegate; + + private final Object monitor = new Object(); + + private X509Certificate[] collected; + + private Boolean trusted = Boolean.FALSE; + + CertificateCollectingTrustManager(X509TrustManager delegate) { + this.delegate = delegate; + } + + @Override + public void checkClientTrusted(X509Certificate[] chain, String authType) { + synchronized (this.monitor) { + if (this.collected != null) { + throw new IllegalStateException("A certificate chain has already been collected."); + } + + this.collected = chain; + + try { + this.delegate.checkClientTrusted(chain, authType); + this.trusted = Boolean.TRUE; + } catch (CertificateException e) { + this.trusted = Boolean.FALSE; + } + } + } + + @Override + public void checkServerTrusted(X509Certificate[] chain, String authType) { + synchronized (this.monitor) { + if (this.collected != null) { + throw new IllegalStateException("A certificate chain has already been collected."); + } + + this.collected = chain; + + try { + this.delegate.checkServerTrusted(chain, authType); + this.trusted = Boolean.TRUE; + } catch (CertificateException e) { + this.trusted = Boolean.FALSE; + } + } + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return this.delegate.getAcceptedIssuers(); + } + + X509Certificate[] getCollectedCertificateChain() { + synchronized (this.monitor) { + if (this.collected == null) { + return null; + } + return Arrays.copyOf(this.collected, this.collected.length); + } + } + + Boolean isTrusted() { + synchronized (this.monitor) { + return this.trusted; + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/DefaultSslCertificateTruster.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/DefaultSslCertificateTruster.java new file mode 100644 index 00000000000..32bc235f6f3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/DefaultSslCertificateTruster.java @@ -0,0 +1,225 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import io.netty.handler.ssl.SslContextBuilder; +import java.io.IOException; +import java.security.KeyStore; +import java.security.KeyStoreException; +import java.security.NoSuchAlgorithmException; +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import java.time.Duration; +import java.util.Collections; +import java.util.Optional; +import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.atomic.AtomicReference; +import javax.net.ssl.SSLException; +import javax.net.ssl.TrustManager; +import javax.net.ssl.TrustManagerFactory; +import javax.net.ssl.X509TrustManager; +import org.cloudfoundry.reactor.ProxyConfiguration; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.netty.resources.LoopResources; +import reactor.netty.tcp.SslProvider.SslContextSpec; +import reactor.netty.tcp.TcpClient; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuples; + +public final class DefaultSslCertificateTruster implements SslCertificateTruster { + + private final Logger logger = LoggerFactory.getLogger("cloudfoundry-client.trust"); + + private final AtomicReference delegate; + + private final Optional proxyConfiguration; + + private final LoopResources threadPool; + + private final Set> trustedHostsAndPorts; + + public DefaultSslCertificateTruster( + Optional proxyConfiguration, LoopResources threadPool) { + this.proxyConfiguration = proxyConfiguration; + this.threadPool = threadPool; + this.delegate = new AtomicReference<>(getTrustManager(getTrustManagerFactory(null))); + this.trustedHostsAndPorts = Collections.newSetFromMap(new ConcurrentHashMap<>()); + } + + @Override + public void checkClientTrusted(X509Certificate[] x509Certificates, String authType) + throws CertificateException { + this.delegate.get().checkClientTrusted(x509Certificates, authType); + } + + @Override + public void checkServerTrusted(X509Certificate[] x509Certificates, String authType) + throws CertificateException { + this.delegate.get().checkServerTrusted(x509Certificates, authType); + } + + @Override + public X509Certificate[] getAcceptedIssuers() { + return this.delegate.get().getAcceptedIssuers(); + } + + @Override + public Mono trust(String host, int port, Duration duration) { + Tuple2 hostAndPort = Tuples.of(host, port); + if (this.trustedHostsAndPorts.contains(hostAndPort)) { + return Mono.empty(); + } + + this.logger.warn("Trusting SSL Certificate for {}:{}", host, port); + + X509TrustManager trustManager = this.delegate.get(); + + return getUntrustedCertificates( + duration, + host, + port, + this.proxyConfiguration, + this.threadPool, + trustManager) + .doOnNext( + untrustedCertificates -> { + KeyStore trustStore = + addToTrustStore(untrustedCertificates, trustManager); + this.delegate.set(getTrustManager(getTrustManagerFactory(trustStore))); + }) + .doOnSuccess( + untrustedCertificates -> { + this.trustedHostsAndPorts.add(hostAndPort); + this.logger.debug("Trusted SSL Certificate for {}:{}", host, port); + }) + .then(); + } + + private static KeyStore addToTrustStore( + X509Certificate[] untrustedCertificates, X509TrustManager trustManager) { + try { + KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType()); + trustStore.load(null); + + int count = 0; + for (X509Certificate certificate : untrustedCertificates) { + trustStore.setCertificateEntry(String.valueOf(count++), certificate); + } + for (X509Certificate certificate : trustManager.getAcceptedIssuers()) { + trustStore.setCertificateEntry(String.valueOf(count++), certificate); + } + + return trustStore; + } catch (CertificateException + | NoSuchAlgorithmException + | IOException + | KeyStoreException e) { + throw new RuntimeException(e); + } + } + + private static void configureSsl( + SslContextSpec sslContextSpec, CertificateCollectingTrustManager collector) { + try { + sslContextSpec.sslContext( + SslContextBuilder.forClient() + .trustManager(new StaticTrustManagerFactory(collector)) + .build()); + } catch (SSLException e) { + throw Exceptions.propagate(e); + } + } + + private static TcpClient getTcpClient( + Optional proxyConfiguration, + LoopResources threadPool, + CertificateCollectingTrustManager collector, + String host, + int port) { + TcpClient tcpClient = + TcpClient.create() + .runOn(threadPool) + .host(host) + .port(port) + .secure(spec -> configureSsl(spec, collector)); + + return proxyConfiguration + .map(configuration -> configuration.configure(tcpClient)) + .orElse(tcpClient); + } + + private static X509TrustManager getTrustManager(TrustManagerFactory trustManagerFactory) { + for (TrustManager trustManager : trustManagerFactory.getTrustManagers()) { + if (trustManager instanceof X509TrustManager) { + return (X509TrustManager) trustManager; + } + } + + throw new IllegalStateException("No X509TrustManager in TrustManagerFactory"); + } + + private static TrustManagerFactory getTrustManagerFactory(KeyStore trustStore) { + try { + TrustManagerFactory trustManagerFactory = + TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); + trustManagerFactory.init(trustStore); + + return trustManagerFactory; + } catch (KeyStoreException | NoSuchAlgorithmException e) { + throw new RuntimeException(e); + } + } + + private static Mono getUntrustedCertificates( + Duration duration, + String host, + int port, + Optional proxyConfiguration, + LoopResources threadPool, + X509TrustManager delegate) { + + CertificateCollectingTrustManager collector = + new CertificateCollectingTrustManager(delegate); + TcpClient tcpClient = getTcpClient(proxyConfiguration, threadPool, collector, host, port); + return tcpClient + .handle((inbound, outbound) -> inbound.receive().then()) + .connect() + .timeout(duration) + .handle( + (connection, sink) -> { + X509Certificate[] chain = collector.getCollectedCertificateChain(); + + if (chain == null) { + sink.error( + new IllegalStateException( + "Could not obtain server certificate chain")); + } + + if (collector.isTrusted()) { + sink.complete(); + } else { + sink.next(chain); + } + + connection.dispose(); + }); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ErrorPayloadMapper.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ErrorPayloadMapper.java new file mode 100644 index 00000000000..e3ccf281404 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ErrorPayloadMapper.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.util.function.Function; +import org.cloudfoundry.reactor.HttpClientResponseWithConnection; +import reactor.core.publisher.Flux; + +public interface ErrorPayloadMapper + extends Function< + Flux, Flux> {} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ErrorPayloadMappers.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ErrorPayloadMappers.java new file mode 100644 index 00000000000..282b5ec2e61 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/ErrorPayloadMappers.java @@ -0,0 +1,158 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import static io.netty.handler.codec.http.HttpStatusClass.CLIENT_ERROR; +import static io.netty.handler.codec.http.HttpStatusClass.SERVER_ERROR; + +import com.fasterxml.jackson.databind.ObjectMapper; +import io.netty.handler.codec.http.HttpStatusClass; +import java.util.Map; +import java.util.function.Function; +import org.cloudfoundry.UnknownCloudFoundryException; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v3.ClientV3Exception; +import org.cloudfoundry.client.v3.Errors; +import org.cloudfoundry.reactor.HttpClientResponseWithConnection; +import org.cloudfoundry.uaa.UaaException; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.Connection; +import reactor.netty.http.client.HttpClientResponse; + +public final class ErrorPayloadMappers { + + @SuppressWarnings("unchecked") + public static ErrorPayloadMapper clientV2(ObjectMapper objectMapper) { + return inbound -> + inbound.flatMap( + mapToError( + (statusCode, payload) -> { + Map map = + objectMapper.readValue(payload, Map.class); + Integer code = (Integer) map.get("code"); + String description = (String) map.get("description"); + String errorCode = (String) map.get("error_code"); + + return new ClientV2Exception( + statusCode, code, description, errorCode); + })); + } + + public static ErrorPayloadMapper clientV3(ObjectMapper objectMapper) { + return inbound -> + inbound.flatMap( + mapToError( + (statusCode, payload) -> { + Errors errors = objectMapper.readValue(payload, Errors.class); + return new ClientV3Exception(statusCode, errors.getErrors()); + })); + } + + public static ErrorPayloadMapper fallback() { + return inbound -> + inbound.flatMap( + responseWithConnection -> { + HttpClientResponse response = responseWithConnection.getResponse(); + + if (isError(response)) { + Connection connection = responseWithConnection.getConnection(); + ByteBufFlux body = + ByteBufFlux.fromInbound(connection.inbound().receive()); + + return body.aggregate() + .asString() + .doFinally(signalType -> connection.channel().close()) + .flatMap( + payload -> { + return Mono.error( + new UnknownCloudFoundryException( + response.status().code(), + payload)); + }); + } + + return Mono.just(responseWithConnection); + }); + } + + @SuppressWarnings("unchecked") + public static ErrorPayloadMapper uaa(ObjectMapper objectMapper) { + return inbound -> + inbound.flatMap( + mapToError( + (statusCode, payload) -> { + Map map = + objectMapper.readValue(payload, Map.class); + String error = (String) map.get("error"); + String errorDescription = (String) map.get("error_description"); + + return new UaaException( + statusCode, error, errorDescription, payload); + })); + } + + private static boolean isError(HttpClientResponse response) { + HttpStatusClass statusClass = response.status().codeClass(); + return statusClass == CLIENT_ERROR || statusClass == SERVER_ERROR; + } + + private static Function< + HttpClientResponseWithConnection, Mono> + mapToError(ExceptionGenerator exceptionGenerator) { + return response -> { + if (!isError(response.getResponse())) { + return Mono.just(response); + } + + Connection connection = response.getConnection(); + ByteBufFlux body = + ByteBufFlux.fromInbound( + connection + .inbound() + .receive() + .doFinally(signalType -> connection.dispose())); + + return body.aggregate() + .asString() + .switchIfEmpty( + Mono.error( + new UnknownCloudFoundryException( + response.getResponse().status().code()))) + .flatMap( + payload -> { + try { + return Mono.error( + exceptionGenerator.apply( + response.getResponse().status().code(), + payload)); + } catch (Exception e) { + return Mono.error( + new UnknownCloudFoundryException( + response.getResponse().status().code(), + payload)); + } + }); + }; + } + + @FunctionalInterface + private interface ExceptionGenerator { + + RuntimeException apply(Integer statusCode, String payload) throws Exception; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/JsonCodec.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/JsonCodec.java new file mode 100644 index 00000000000..6cf55dce8ef --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/JsonCodec.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpHeaderValues; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.json.JsonObjectDecoder; +import java.nio.charset.Charset; +import java.util.function.BiFunction; +import org.reactivestreams.Publisher; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.NettyOutbound; +import reactor.netty.http.client.HttpClientRequest; + +public final class JsonCodec { + + private static final int MAX_PAYLOAD_SIZE = 100 * 1024 * 1024; + + public static Mono decode( + ObjectMapper objectMapper, ByteBufFlux responseBody, Class responseType) { + return responseBody + .aggregate() + .asByteArray() + .map( + payload -> { + try { + return objectMapper.readValue(payload, responseType); + } catch (Throwable t) { + throw new JsonParsingException( + t.getMessage(), + t, + new String(payload, Charset.defaultCharset())); + } + }); + } + + public static void setDecodeHeaders(HttpHeaders httpHeaders) { + httpHeaders.set(HttpHeaderNames.ACCEPT, HttpHeaderValues.APPLICATION_JSON); + } + + static JsonObjectDecoder createDecoder() { + return new JsonObjectDecoder(MAX_PAYLOAD_SIZE); + } + + static BiFunction> encode( + ObjectMapper objectMapper, Object requestPayload) { + if (!AnnotationUtils.findAnnotation(requestPayload.getClass(), JsonSerialize.class) + .isPresent()) { + return (request, outbound) -> Mono.empty(); + } + + return (request, outbound) -> { + try { + byte[] bytes = objectMapper.writeValueAsBytes(requestPayload); + String contentLength = String.valueOf(bytes.length); + Mono body = Mono.just(bytes); + + request.header(HttpHeaderNames.CONTENT_LENGTH, contentLength); + request.header(HttpHeaderNames.CONTENT_TYPE, HttpHeaderValues.APPLICATION_JSON); + return outbound.sendByteArray(body); + } catch (JsonProcessingException e) { + throw Exceptions.propagate(e); + } + }; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/JsonParsingException.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/JsonParsingException.java new file mode 100644 index 00000000000..0cd77b91fbf --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/JsonParsingException.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +final class JsonParsingException extends RuntimeException { + + private static final long serialVersionUID = 689280281752742553L; + + private final String payload; + + JsonParsingException(String message, Throwable cause, String payload) { + super(message, cause); + this.payload = payload; + } + + public String getPayload() { + return this.payload; + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/MultipartHttpClientRequest.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/MultipartHttpClientRequest.java new file mode 100644 index 00000000000..b1c25de5e73 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/MultipartHttpClientRequest.java @@ -0,0 +1,136 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.netty.handler.codec.http.HttpHeaderNames; +import java.io.ByteArrayInputStream; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.List; +import java.util.function.Consumer; +import java.util.stream.Collectors; +import reactor.core.Exceptions; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; + +public final class MultipartHttpClientRequest { + + private final HttpClientForm form; + + private final ObjectMapper objectMapper; + + private final List> partConsumers = new ArrayList<>(); + + private final HttpClientRequest request; + + public MultipartHttpClientRequest( + ObjectMapper objectMapper, HttpClientRequest request, HttpClientForm form) { + this.objectMapper = objectMapper; + this.request = request; + this.form = form; + } + + public MultipartHttpClientRequest addPart(Consumer partConsumer) { + this.partConsumers.add(partConsumer); + return this; + } + + public void done() { + List parts = + this.partConsumers.stream() + .map( + partConsumer -> { + PartHttpClientRequest part = + new PartHttpClientRequest(this.objectMapper); + partConsumer.accept(part); + return part; + }) + .collect(Collectors.toList()); + + this.request.requestHeaders().remove(HttpHeaderNames.TRANSFER_ENCODING); + + this.form.multipart(true); + + HttpClientForm intermediateForm = this.form; + for (PartHttpClientRequest part : parts) { + intermediateForm = part.send(intermediateForm); + } + } + + public static final class PartHttpClientRequest { + + private final ObjectMapper objectMapper; + + private String contentType; + + private Path file; + + private String filename; + + private String name; + + private ByteArrayInputStream payload; + + private PartHttpClientRequest(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + } + + public void send(Object source) { + try { + byte[] bytes = this.objectMapper.writeValueAsBytes(source); + this.payload = new ByteArrayInputStream(bytes); + } catch (JsonProcessingException e) { + throw Exceptions.propagate(e); + } + } + + public void sendFile(Path file) { + this.file = file; + } + + public PartHttpClientRequest setContentType(String contentType) { + this.contentType = contentType; + return this; + } + + public PartHttpClientRequest setFilename(String filename) { + this.filename = filename; + return this; + } + + public PartHttpClientRequest setName(String name) { + this.name = name; + return this; + } + + private String getFilenameOrDefault() { + return this.filename != null ? this.filename : this.file.getFileName().toString(); + } + + private HttpClientForm send(HttpClientForm form) { + if (this.file != null) { + return form.file( + this.name, getFilenameOrDefault(), this.file.toFile(), this.contentType); + } else if (this.payload != null) { + return form.file(this.name, this.payload, this.contentType); + } + return form; + } + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/Operator.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/Operator.java new file mode 100644 index 00000000000..bc069123269 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/Operator.java @@ -0,0 +1,470 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import io.netty.channel.ChannelHandler; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpHeaderValues; +import io.netty.handler.codec.http.HttpHeaders; +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpResponseStatus; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.List; +import java.util.Optional; +import java.util.function.BiConsumer; +import java.util.function.BiFunction; +import java.util.function.Consumer; +import java.util.function.Function; +import org.cloudfoundry.reactor.HttpClientResponseWithBody; +import org.cloudfoundry.reactor.HttpClientResponseWithConnection; +import org.cloudfoundry.reactor.HttpClientResponseWithParsedBody; +import org.reactivestreams.Publisher; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.netty.ByteBufFlux; +import reactor.netty.Connection; +import reactor.netty.NettyOutbound; +import reactor.netty.http.client.HttpClient; +import reactor.netty.http.client.HttpClientForm; +import reactor.netty.http.client.HttpClientRequest; +import reactor.netty.http.client.HttpClientResponse; +import reactor.netty.http.websocket.WebsocketInbound; +import reactor.netty.http.websocket.WebsocketOutbound; +import reactor.util.retry.Retry; + +public class Operator extends OperatorContextAware { + + private final HttpClient httpClient; + + public Operator(OperatorContext context, HttpClient httpClient) { + super(context); + this.httpClient = httpClient; + } + + public UriConfiguration delete() { + return request(HttpMethod.DELETE); + } + + public Operator followRedirects() { + return new Operator(this.context, this.httpClient.followRedirect(true)); + } + + public UriConfiguration get() { + return request(HttpMethod.GET); + } + + public Operator headers(Consumer headersTransformer) { + return new Operator(this.context, this.httpClient.headers(headersTransformer)); + } + + public Operator headersWhen( + Function> headersWhenTransformer) { + return new Operator(this.context, this.httpClient.headersWhen(headersWhenTransformer)); + } + + public UriConfiguration patch() { + return request(HttpMethod.PATCH); + } + + public UriConfiguration post() { + return request(HttpMethod.POST); + } + + public UriConfiguration put() { + return request(HttpMethod.PUT); + } + + public UriConfiguration request(HttpMethod method) { + return new UriConfiguration( + this.context, attachRequestLogger(this.httpClient).request(method)); + } + + public WebsocketUriConfiguration websocket() { + return new WebsocketUriConfiguration(this.context, this.httpClient.websocket()); + } + + public Operator withErrorPayloadMapper(ErrorPayloadMapper errorPayloadMapper) { + return new Operator( + this.context.withErrorPayloadMapper(errorPayloadMapper), this.httpClient); + } + + private static HttpClient attachRequestLogger(HttpClient httpClient) { + RequestLogger requestLogger = new RequestLogger(); + return httpClient + .doAfterRequest((request, connection) -> requestLogger.request(request)) + .doAfterResponseSuccess((response, connection) -> requestLogger.response(response)) + .doOnResponseError((response, connection) -> requestLogger.response(response)); + } + + public static class PayloadConfiguration extends OperatorContextAware { + + private final HttpClient.RequestSender requestSender; + + PayloadConfiguration(OperatorContext context, HttpClient.RequestSender requestSender) { + super(context); + this.requestSender = requestSender; + } + + public ResponseReceiver response() { + return new ResponseReceiver(this.context, this.requestSender); + } + + public ResponseReceiverConstructor send(Object payload) { + return send(serialized(payload)); + } + + public ResponseReceiverConstructor send( + BiFunction> requestTransformer) { + HttpClient.ResponseReceiver responseReceiver = + this.requestSender.send(requestTransformer); + return new ResponseReceiverConstructor(this.context, responseReceiver); + } + + public ResponseReceiverConstructor sendForm( + BiConsumer requestTransformer) { + HttpClient.ResponseReceiver responseReceiver = + this.requestSender.sendForm(requestTransformer); + return new ResponseReceiverConstructor(this.context, responseReceiver); + } + + private BiFunction> serialized( + Object payload) { + return JsonCodec.encode(this.context.getConnectionContext().getObjectMapper(), payload); + } + } + + public static class ResponseReceiver extends OperatorContextAware { + + private final List> channelHandlerBuilders = + new ArrayList<>(); + + private final HttpClient.ResponseReceiver responseReceiver; + + ResponseReceiver(OperatorContext context, HttpClient.ResponseReceiver responseReceiver) { + super(context); + this.responseReceiver = responseReceiver; + } + + public ResponseReceiver addChannelHandler( + Function channelHandlerBuilder) { + this.channelHandlerBuilders.add(channelHandlerBuilder); + return this; + } + + public Mono get() { + return this.responseReceiver + .responseConnection( + (response, connection) -> + Mono.just( + HttpClientResponseWithConnection.of( + connection, response))) + .transform(this::processResponse) + .flatMap( + httpClientResponseWithConnection -> { + Connection connection = + httpClientResponseWithConnection.getConnection(); + return ByteBufFlux.fromInbound( + connection + .inbound() + .receive() + .doFinally( + signalType -> connection.dispose())) + .then() + .thenReturn(httpClientResponseWithConnection); + }) + .map(HttpClientResponseWithConnection::getResponse) + .singleOrEmpty(); + } + + public Mono parseBody(Class bodyType) { + addJsonDecoderToChannelHandlers(); + return parseBodyToMono( + responseWithBody -> deserialized(responseWithBody.getBody(), bodyType)); + } + + public Mono> parseBodyWithResponse( + Class bodyType) { + addJsonDecoderToChannelHandlers(); + return this.responseReceiver + .responseConnection( + (response, connection) -> + Mono.just( + HttpClientResponseWithConnection.of( + connection, response))) + .transform(this::processResponse) + .flatMap( + httpClientResponseWithConnection -> + transformResponse( + httpClientResponseWithConnection, + (body, response) -> + deserialized(body, bodyType) + .map( + parsedBody -> + HttpClientResponseWithParsedBody + .of( + Optional + .of( + parsedBody), + response)) + .defaultIfEmpty( + HttpClientResponseWithParsedBody + .of( + Optional + .empty(), + response)))) + .singleOrEmpty(); + } + + public Flux parseBodyToFlux( + Function> responseTransformer) { + return this.responseReceiver + .responseConnection( + (response, connection) -> + Mono.just( + HttpClientResponseWithConnection.of( + connection, response))) + .transform(this::processResponse) + .flatMap( + httpClientResponseWithConnection -> + transformResponse( + httpClientResponseWithConnection, + (body, response) -> + Mono.just( + HttpClientResponseWithBody.of( + body, response)))) + .flatMap(responseTransformer); + } + + public Mono parseBodyToMono( + Function> responseTransformer) { + return parseBodyToFlux(responseTransformer).singleOrEmpty(); + } + + public Mono parseBodyToToken( + Function> responseTransformer) { + return this.responseReceiver + .responseConnection( + (response, connection) -> + Mono.just( + HttpClientResponseWithConnection.of( + connection, response))) + .transform( + this.context + .getErrorPayloadMapper() + .orElse(ErrorPayloadMappers.fallback())) + .flatMap( + httpClientResponseWithConnection -> + transformResponse( + httpClientResponseWithConnection, + (body, response) -> + Mono.just( + HttpClientResponseWithBody.of( + body, response)))) + .flatMap(responseTransformer) + .singleOrEmpty(); + } + + private static boolean isUnauthorized(HttpClientResponseWithConnection response) { + return HttpResponseStatus.UNAUTHORIZED.equals(response.getResponse().status()); + } + + private void addJsonDecoderToChannelHandlers() { + addChannelHandler( + response -> { + if (HttpHeaderValues.APPLICATION_JSON.contentEquals( + response.responseHeaders().get(HttpHeaderNames.CONTENT_TYPE))) { + return JsonCodec.createDecoder(); + } + + return null; + }); + } + + private void attachChannelHandlers(HttpClientResponse response, Connection connection) { + for (Function handlerBuilder : + this.channelHandlerBuilders) { + ChannelHandler handler = handlerBuilder.apply(response); + if (handler != null) { + connection.addHandler(handler); + } + } + } + + private Mono deserialized(ByteBufFlux body, Class bodyType) { + return JsonCodec.decode( + this.context.getConnectionContext().getObjectMapper(), body, bodyType); + } + + private Flux invalidateToken( + Flux inbound) { + return inbound.doOnNext( + response -> { + if (isUnauthorized(response)) { + this.context + .getTokenProvider() + .ifPresent( + tokenProvider -> + tokenProvider.invalidate( + this.context.getConnectionContext())); + // we don't need the body, but we need to consume the body so + // reactor-netty can reuse the connection + // if not, this will result in connections that don't close & the pool + // will fill up + response.getConnection() + .inbound() + .receive() + .doOnNext(byteBuf -> {}) + .subscribe(byteBuf -> {}, ex -> {}); + throw new InvalidTokenException(); + } + }); + } + + private Flux processResponse( + Flux inbound) { + return inbound.transform(this::invalidateToken) + .retryWhen( + Retry.max(this.context.getConnectionContext().getInvalidTokenRetries()) + .filter(InvalidTokenException.class::isInstance)) + .transform( + this.context + .getErrorPayloadMapper() + .orElse(ErrorPayloadMappers.fallback())); + } + + private Mono transformResponse( + HttpClientResponseWithConnection httpClientResponseWithConnection, + BiFunction> transformResult) { + Connection connection = httpClientResponseWithConnection.getConnection(); + HttpClientResponse response = httpClientResponseWithConnection.getResponse(); + + attachChannelHandlers(response, connection); + ByteBufFlux body = + ByteBufFlux.fromInbound( + connection + .inbound() + .receive() + .doFinally(signalType -> connection.dispose())); + return transformResult.apply(body, response); + } + + private static final class InvalidTokenException extends RuntimeException { + + private static final long serialVersionUID = -3114034909507471614L; + + private InvalidTokenException() {} + + @Override + public synchronized Throwable fillInStackTrace() { + return null; + } + } + } + + public static class ResponseReceiverConstructor extends OperatorContextAware { + + private final HttpClient.ResponseReceiver responseReceiver; + + ResponseReceiverConstructor( + OperatorContext context, HttpClient.ResponseReceiver responseReceiver) { + super(context); + this.responseReceiver = responseReceiver; + } + + public ResponseReceiver response() { + return new ResponseReceiver(this.context, this.responseReceiver); + } + } + + public static class UriConfiguration extends OperatorContextAware { + + private final HttpClient.RequestSender requestSender; + + private UriConfiguration(OperatorContext context, HttpClient.RequestSender requestSender) { + super(context); + this.requestSender = requestSender; + } + + public PayloadConfiguration uri( + Function uriTransformer) { + String uri = transformRoot(uriTransformer); + return new PayloadConfiguration(this.context, this.requestSender.uri(uri)); + } + } + + public static class WebsocketResponseReceiver { + + private final HttpClient.WebsocketSender sender; + + WebsocketResponseReceiver(HttpClient.WebsocketSender sender) { + this.sender = sender; + } + + public Flux get() { + return this.sender.handle(this::handleWebsocketCommunication); + } + + private Publisher handleWebsocketCommunication( + WebsocketInbound inbound, WebsocketOutbound outbound) { + return inbound.aggregateFrames() + .receive() + .asInputStream() + .doFinally(signalType -> outbound.sendClose()); + } + } + + public static class WebsocketUriConfiguration extends OperatorContextAware { + + private final HttpClient.WebsocketSender sender; + + private WebsocketUriConfiguration( + OperatorContext context, HttpClient.WebsocketSender sender) { + super(context); + this.sender = sender; + } + + public WebsocketResponseReceiver uri( + Function uriTransformer) { + String uri = transformRoot(uriTransformer); + logWebsocketRequest(uri); + + return new WebsocketResponseReceiver(this.sender.uri(uri)); + } + + private static void logWebsocketRequest(String uri) { + new RequestLogger().websocketRequest(uri); + } + } +} + +class OperatorContextAware { + + protected final OperatorContext context; + + OperatorContextAware(OperatorContext context) { + this.context = context; + } + + protected String transformRoot( + Function uriTransformer) { + UriComponentsBuilder uriComponentsBuilder = + UriComponentsBuilder.fromUriString(this.context.getRoot()); + return uriTransformer.apply(uriComponentsBuilder).encode().build().toUriString(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/RequestLogger.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/RequestLogger.java new file mode 100644 index 00000000000..4c94223c572 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/RequestLogger.java @@ -0,0 +1,88 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.util.List; +import org.cloudfoundry.util.TimeUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.netty.http.client.HttpClientRequest; +import reactor.netty.http.client.HttpClientResponse; + +public class RequestLogger { + + static final Logger REQUEST_LOGGER = LoggerFactory.getLogger("cloudfoundry-client.request"); + + static final Logger RESPONSE_LOGGER = LoggerFactory.getLogger("cloudfoundry-client.response"); + + private static final String CF_WARNINGS = "X-Cf-Warnings"; + + private long requestSentTime; + + public void request(HttpClientRequest request) { + request(String.format("%-6s {}", request.method()), request.resourceUrl()); + } + + public void response(HttpClientResponse response) { + if (!RESPONSE_LOGGER.isDebugEnabled()) { + return; + } + + String elapsed = TimeUtils.asTime(System.currentTimeMillis() - this.requestSentTime); + List warnings = response.responseHeaders().getAll(CF_WARNINGS); + + if (warnings.isEmpty()) { + if (RESPONSE_LOGGER.isTraceEnabled()) { + RESPONSE_LOGGER.debug( + "{} {} ({}, {})", + response.status().code(), + response.uri(), + elapsed, + response.responseHeaders().get("X-Vcap-Request-Id")); + } else { + RESPONSE_LOGGER.debug( + "{} {} ({})", response.status().code(), response.uri(), elapsed); + } + } else { + if (RESPONSE_LOGGER.isTraceEnabled()) { + RESPONSE_LOGGER.warn( + "{} {} ({}, {}) [{}]", + response.status().code(), + response.uri(), + elapsed, + response.responseHeaders().get("X-Vcap-Request-Id"), + String.join(", ", warnings)); + } else { + RESPONSE_LOGGER.warn( + "{} {} ({}) [{}]", + response.status().code(), + response.uri(), + elapsed, + String.join(", ", warnings)); + } + } + } + + public void websocketRequest(String uri) { + request("WS {}", uri); + } + + private void request(String message, String uri) { + REQUEST_LOGGER.debug(message, uri); + this.requestSentTime = System.currentTimeMillis(); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/SslCertificateTruster.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/SslCertificateTruster.java new file mode 100644 index 00000000000..0647af97ff5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/SslCertificateTruster.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.time.Duration; +import javax.net.ssl.X509TrustManager; +import reactor.core.publisher.Mono; + +/** + * A utility that trusts certificates provided by connections + */ +public interface SslCertificateTruster extends X509TrustManager { + + /** + * Trust the certificate provided by a connection + * + * @param host the host + * @param port the port + * @param duration the duration to wait + */ + Mono trust(String host, int port, Duration duration); +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/StaticTrustManagerFactory.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/StaticTrustManagerFactory.java new file mode 100644 index 00000000000..f9e66a038d9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/StaticTrustManagerFactory.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import io.netty.handler.ssl.util.SimpleTrustManagerFactory; +import java.security.KeyStore; +import javax.net.ssl.ManagerFactoryParameters; +import javax.net.ssl.TrustManager; + +public final class StaticTrustManagerFactory extends SimpleTrustManagerFactory { + + private final TrustManager[] trustManagers; + + public StaticTrustManagerFactory(TrustManager... trustManager) { + this.trustManagers = trustManager; + } + + @Override + protected TrustManager[] engineGetTrustManagers() { + return this.trustManagers; + } + + @Override + protected void engineInit(ManagerFactoryParameters managerFactoryParameters) { + // Do nothing + } + + @Override + protected void engineInit(KeyStore keyStore) { + // Do nothing + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriQueryParameterBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriQueryParameterBuilder.java new file mode 100644 index 00000000000..5b846610a4f --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriQueryParameterBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.util.stream.Stream; + +public interface UriQueryParameterBuilder { + + Stream build(Object request); +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriQueryParameters.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriQueryParameters.java new file mode 100644 index 00000000000..e16b358dd1b --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriQueryParameters.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.util.stream.Stream; +import org.springframework.web.util.UriComponentsBuilder; + +public class UriQueryParameters { + + public static void set( + UriComponentsBuilder builder, Stream uriQueryParameters) { + // Replace all literal values with URI variables to apply more strict encoding: + UriVariablesRegistry uriVariablesRegistry = new UriVariablesRegistry(); + uriQueryParameters.forEach( + uriQueryParameter -> { + UriVariable uriVariable = + uriVariablesRegistry.register(uriQueryParameter.getValue()); + builder.queryParam(uriQueryParameter.getKey(), uriVariable.getPlaceholder()); + }); + builder.uriVariables(uriVariablesRegistry.getUriVariablesMap()); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriVariablesRegistry.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriVariablesRegistry.java new file mode 100644 index 00000000000..8ae895dd144 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UriVariablesRegistry.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +class UriVariablesRegistry { + + private final List uriVariables = new ArrayList<>(); + + Map getUriVariablesMap() { + return this.uriVariables.stream() + .collect(Collectors.toMap(UriVariable::getKey, UriVariable::getValue)); + } + + UriVariable register(Object value) { + UriVariable uriVariable = UriVariable.of(getNextUriVariableKey(), value); + this.uriVariables.add(uriVariable); + + return uriVariable; + } + + private String getNextUriVariableKey() { + return Integer.toString(this.uriVariables.size()); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UserAgent.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UserAgent.java new file mode 100644 index 00000000000..eebe1e77fb6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/UserAgent.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import io.netty.bootstrap.Bootstrap; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpHeaders; +import java.util.Optional; +import reactor.netty.http.client.HttpClient; + +/** + * Utilities for working with the {@Code User-Agent} + */ +public final class UserAgent { + + /** + * The {@code User-Agent} + */ + public static final String USER_AGENT = + String.format( + "CloudFoundryJavaClient/%s (Java; %s/%s) ReactorNetty/%s (Netty/%s)", + javaClientVersion(), + javaVendor(), + javaVersion(), + reactorNettyVersion(), + nettyVersion()); + + private UserAgent() {} + + /** + * Add the {@code User-Agent} to a request. Typically used with `.map` + * + * @param httpHeaders The headers to transform + */ + public static void setUserAgent(HttpHeaders httpHeaders) { + httpHeaders.set(HttpHeaderNames.USER_AGENT, USER_AGENT); + } + + private static String javaClientVersion() { + return Optional.ofNullable(UserAgent.class.getPackage().getImplementationVersion()) + .orElse("unknown"); + } + + private static String javaVendor() { + return Optional.ofNullable(System.getProperty("java.vendor")).orElse("unknown"); + } + + private static String javaVersion() { + return Optional.ofNullable(System.getProperty("java.version")).orElse("unknown"); + } + + private static String nettyVersion() { + return Optional.ofNullable(Bootstrap.class.getPackage().getImplementationVersion()) + .orElse("unknown"); + } + + private static String reactorNettyVersion() { + return Optional.ofNullable(HttpClient.class.getPackage().getImplementationVersion()) + .orElse("unknown"); + } +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_DelegatingUriQueryParameterBuilder.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_DelegatingUriQueryParameterBuilder.java new file mode 100644 index 00000000000..66c56bb003c --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_DelegatingUriQueryParameterBuilder.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import org.immutables.value.Value; + +import java.util.List; +import java.util.stream.Stream; + +@Value.Immutable +public abstract class _DelegatingUriQueryParameterBuilder implements UriQueryParameterBuilder { + + @Override + public Stream build(Object request) { + return getBuilders().stream().flatMap(extractor -> extractor.build(request)); + } + + public abstract List getBuilders(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_OperatorContext.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_OperatorContext.java new file mode 100644 index 00000000000..daacc55c3ca --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_OperatorContext.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.immutables.value.Value; + +import java.util.Optional; + +@Value.Immutable(copy = true) +public interface _OperatorContext { + + @Value.Parameter + ConnectionContext getConnectionContext(); + + Optional getErrorPayloadMapper(); + + @Value.Parameter + String getRoot(); + + Optional getTokenProvider(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_UriQueryParameter.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_UriQueryParameter.java new file mode 100644 index 00000000000..2ecf3e4116a --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_UriQueryParameter.java @@ -0,0 +1,14 @@ +package org.cloudfoundry.reactor.util; + +import org.immutables.value.Value; + +@Value.Immutable +public interface _UriQueryParameter { + + @Value.Parameter + String getKey(); + + @Value.Parameter + Object getValue(); + +} diff --git a/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_UriVariable.java b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_UriVariable.java new file mode 100644 index 00000000000..1df9f29ebb5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/main/java/org/cloudfoundry/reactor/util/_UriVariable.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import org.immutables.value.Value; + +@Value.Immutable +public interface _UriVariable { + + String PLACEHOLDER_PATTERN = "{%s}"; + + @Value.Parameter + String getKey(); + + @Value.Derived + default String getPlaceholder() { + return String.format(PLACEHOLDER_PATTERN, getKey()); + } + + @Value.Parameter + Object getValue(); + +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/AbstractRestTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/AbstractRestTest.java new file mode 100644 index 00000000000..f3f3ad3e1af --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/AbstractRestTest.java @@ -0,0 +1,144 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.fail; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler; +import java.io.IOException; +import java.util.*; +import mockwebserver3.Dispatcher; +import mockwebserver3.MockResponse; +import mockwebserver3.MockWebServer; +import mockwebserver3.RecordedRequest; +import org.junit.jupiter.api.AfterEach; +import org.slf4j.bridge.SLF4JBridgeHandler; +import reactor.core.publisher.Mono; + +public abstract class AbstractRestTest { + + protected static final ConnectionContext CONNECTION_CONTEXT = + DefaultConnectionContext.builder() + .apiHost("localhost") + .secure(false) + .problemHandler( + new FailingDeserializationProblemHandler()) // Test-only problem handler + .build(); + + protected static final TokenProvider TOKEN_PROVIDER = + connectionContext -> Mono.just("test-authorization"); + + static { + SLF4JBridgeHandler.removeHandlersForRootLogger(); + SLF4JBridgeHandler.install(); + } + + protected final Mono root; + + final MockWebServer mockWebServer; + + private MultipleRequestDispatcher multipleRequestDispatcher = new MultipleRequestDispatcher(); + + protected AbstractRestTest() { + this.mockWebServer = new MockWebServer(); + this.mockWebServer.setDispatcher(this.multipleRequestDispatcher); + + this.root = Mono.just(this.mockWebServer.url("/").uri().toString()); + } + + @AfterEach + public final void shutdown() throws IOException { + this.mockWebServer.shutdown(); + } + + @AfterEach + public final void verify() { + this.multipleRequestDispatcher.verify(); + } + + protected final void mockRequest(InteractionContext interactionContext) { + this.multipleRequestDispatcher.add(interactionContext); + } + + private static final class FailingDeserializationProblemHandler + extends DeserializationProblemHandler { + + @Override + public boolean handleUnknownProperty( + DeserializationContext ctxt, + JsonParser jp, + JsonDeserializer deserializer, + Object beanOrClass, + String propertyName) { + fail( + String.format( + "Found unexpected property %s in payload for %s", + propertyName, beanOrClass.getClass().getName())); + return false; + } + } + + private static final class MultipleRequestDispatcher extends Dispatcher { + + private Queue responses = new LinkedList<>(); + + private List verifications = new ArrayList<>(); + + @Override + public MockResponse dispatch(RecordedRequest request) { + InteractionContext interactionContext = this.responses.poll(); + + if (interactionContext == null) { + throw new IllegalStateException( + String.format( + "Unexpected request for %s %s received", + request.getMethod(), request.getPath())); + } + + interactionContext.setDone(true); + + try { + interactionContext.getRequest().assertEquals(request); + return interactionContext.getResponse().getMockResponse(); + } catch (AssertionError e) { + e.printStackTrace(); + return new MockResponse().setResponseCode(400); + } + } + + private void add(InteractionContext interactionContext) { + this.responses.add(interactionContext); + this.verifications.add(interactionContext); + } + + private void verify() { + for (InteractionContext interactionContext : this.verifications) { + TestRequest request = interactionContext.getRequest(); + + assertThat(interactionContext.isDone()) + .as( + "Expected request to %s %s not received", + request.getMethod(), request.getPath()) + .isTrue(); + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/CustomRequestTagTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/CustomRequestTagTest.java new file mode 100644 index 00000000000..91a8c16f679 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/CustomRequestTagTest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.Operator; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class CustomRequestTagTest extends AbstractRestTest { + + private static final String CUSTOM_REQUEST_TAG_NAME = "test-header"; + + private static final String CUSTOM_REQUEST_TAG_VALUE = "test-header-value"; + + private final DefaultConnectionContext connectionContext = + DefaultConnectionContext.builder() + .apiHost(this.mockWebServer.getHostName()) + .port(this.mockWebServer.getPort()) + .secure(false) + .build(); + + @Test + void addCustomHttpHeader() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/") + .header(CUSTOM_REQUEST_TAG_NAME, CUSTOM_REQUEST_TAG_VALUE) + .build()) + .response(TestResponse.builder().status(OK).build()) + .build()); + + createOperator() + .flatMap(operator -> operator.get().uri(uri -> uri.path("/")).response().get()) + .as(StepVerifier::create) + .expectNextMatches(httpClientResponse -> httpClientResponse.status().equals(OK)) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private Mono createOperator() { + return new AbstractReactorOperations( + this.connectionContext, + this.root, + TOKEN_PROVIDER, + Collections.singletonMap(CUSTOM_REQUEST_TAG_NAME, CUSTOM_REQUEST_TAG_VALUE)) { + + private Mono getOperator() { + return createOperator(); + } + }.getOperator(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/DefaultConnectionContextTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/DefaultConnectionContextTest.java new file mode 100644 index 00000000000..4aba4f36d31 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/DefaultConnectionContextTest.java @@ -0,0 +1,128 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; + +import io.netty.handler.logging.ByteBufFormat; +import io.netty.handler.logging.LogLevel; +import java.net.InetSocketAddress; +import java.time.Duration; +import java.util.Optional; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.Test; +import reactor.netty.http.client.HttpClient; +import reactor.netty.transport.ProxyProvider; +import reactor.test.StepVerifier; + +final class DefaultConnectionContextTest extends AbstractRestTest { + + private final DefaultConnectionContext connectionContext = + DefaultConnectionContext.builder() + .apiHost(this.mockWebServer.getHostName()) + .port(this.mockWebServer.getPort()) + .secure(false) + .build(); + + @AfterEach + void dispose() { + this.connectionContext.dispose(); + } + + @Test + void getInfo() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.connectionContext + .getRootProvider() + .getRoot("token_endpoint", this.connectionContext) + .as(StepVerifier::create) + .expectNext("http://localhost:8080/uaa") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void multipleInstances() { + DefaultConnectionContext first = + DefaultConnectionContext.builder().apiHost("test-host").build(); + + DefaultConnectionContext second = + DefaultConnectionContext.builder().apiHost("test-host").build(); + + first.monitorByteBufAllocator(); + second.monitorByteBufAllocator(); + + first.dispose(); + second.dispose(); + } + + @Test + void configurationAlwaysApplied() { + DefaultConnectionContext ctx = + DefaultConnectionContext.builder() + .connectionPoolSize(24) + .apiHost("api.example.com") + .keepAlive(true) + .proxyConfiguration( + ProxyConfiguration.builder() + .host("proxy.example.com") + .port(8080) + .username("foo") + .password("bar") + .build()) + .skipSslValidation(true) + .build(); + + assertThat(ctx.getConnectionPoolSize()).isEqualTo(24); + assertThat(ctx.getApiHost()).isEqualTo("api.example.com"); + assertThat(ctx.getSkipSslValidation()).isEqualTo(Optional.of(true)); + + HttpClient client = ctx.getHttpClient(); + assertThat(client.configuration().isSecure()).isEqualTo(true); + + InetSocketAddress addr = client.configuration().proxyProvider().getAddress().get(); + assertThat(addr.getHostName()).isEqualTo("proxy.example.com"); + assertThat(addr.getPort()).isEqualTo(8080); + assertThat(client.configuration().proxyProvider().getType()) + .isEqualTo(ProxyProvider.Proxy.HTTP); + + assertThat(client.configuration().loggingHandler().level()).isEqualTo(LogLevel.TRACE); + assertThat(client.configuration().loggingHandler().byteBufFormat()) + .isEqualTo(ByteBufFormat.HEX_DUMP); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/DelegatingRootProviderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/DelegatingRootProviderTest.java new file mode 100644 index 00000000000..380b557b0b7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/DelegatingRootProviderTest.java @@ -0,0 +1,399 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.NOT_FOUND; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import io.netty.handler.codec.http.HttpResponseStatus; +import java.time.Duration; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class DelegatingRootProviderTest extends AbstractRestTest { + + private final DelegatingRootProvider rootProvider = + DelegatingRootProvider.builder() + .apiHost("localhost") + .port(this.mockWebServer.getPort()) + .secure(false) + .objectMapper(CONNECTION_CONTEXT.getObjectMapper()) + .build(); + + @Test + void getRoot() { + this.rootProvider + .getRoot(CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext(String.format("http://localhost:%d", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootCloudFoundryClientV2() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("cloud_controller_v2", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext( + String.format( + "http://api.run.pivotal.io:%d/v2", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootCloudFoundryClientV2Fallback() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("cloud_controller_v2", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext(String.format("http://localhost:%d/v2", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootCloudFoundryClientV3() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("cloud_controller_v3", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext( + String.format( + "http://api.run.pivotal.io:%d/v3", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootCloudFoundryClientV3Fallback() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("cloud_controller_v3", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext(String.format("http://localhost:%d/v3", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootDopplerClient() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("logging", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://doppler.run.pivotal.io:443") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootDopplerClientFallback() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("logging", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://doppler.vcap.me:80") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKeyNoKey() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("invalid-key", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectError(IllegalArgumentException.class) + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKeyNoValue() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("empty_value", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectError(IllegalArgumentException.class) + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootNetworkingClient() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("network_policy_v1", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext( + String.format( + "http://api.run.pivotal.io:%d/networking/v1/external", + this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootRoutingClientFallback() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("routing", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://localhost:3000") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootTokenProviderFallback() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("authorization_endpoint", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://localhost:8080/uaa") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootUaaClient() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("uaa", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext( + String.format("http://uaa.run.pivotal.io:%d", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootUaaClientFallback() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(NOT_FOUND) + .payload("fixtures/client/v2/error_response.json") + .build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("uaa", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://localhost:8080/uaa") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getWithInvalidRoot() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response(TestResponse.builder().status(HttpResponseStatus.FOUND).build()) + .build()); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("uaa", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://localhost:8080/uaa") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/InfoPayloadRootProviderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/InfoPayloadRootProviderTest.java new file mode 100644 index 00000000000..8f5da92655d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/InfoPayloadRootProviderTest.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class InfoPayloadRootProviderTest extends AbstractRestTest { + + private final InfoPayloadRootProvider rootProvider = + InfoPayloadRootProvider.builder() + .apiHost("localhost") + .port(this.mockWebServer.getPort()) + .secure(false) + .objectMapper(CONNECTION_CONTEXT.getObjectMapper()) + .build(); + + @Test + void getRoot() { + this.rootProvider + .getRoot(CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext(String.format("http://localhost:%d", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKey() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("authorization_endpoint", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("http://localhost:8080/uaa") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKeyNoKey() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v2/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("invalid-key", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectError(IllegalArgumentException.class) + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/RootPayloadRootProviderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/RootPayloadRootProviderTest.java new file mode 100644 index 00000000000..d9fbc35887d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/RootPayloadRootProviderTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class RootPayloadRootProviderTest extends AbstractRestTest { + + private final RootPayloadRootProvider rootProvider = + RootPayloadRootProvider.builder() + .apiHost("localhost") + .port(this.mockWebServer.getPort()) + .secure(false) + .objectMapper(CONNECTION_CONTEXT.getObjectMapper()) + .build(); + + @Test + void getRoot() { + this.rootProvider + .getRoot(CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext(String.format("http://localhost:%d", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKey() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("cloud_controller_v2", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext( + String.format( + "http://api.run.pivotal.io:%d/v2", this.mockWebServer.getPort())) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKeyNoKey() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + + this.rootProvider + .getRoot("invalid-key", CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectError(IllegalArgumentException.class) + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/SingleEndpointRootProviderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/SingleEndpointRootProviderTest.java new file mode 100644 index 00000000000..90c2f9a3064 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/SingleEndpointRootProviderTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import java.time.Duration; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class SingleEndpointRootProviderTest extends AbstractRestTest { + + private final SingleEndpointRootProvider rootProvider = + SingleEndpointRootProvider.builder().apiHost("localhost").build(); + + @Test + void getRoot() { + this.rootProvider + .getRoot(CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("https://localhost:443") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getRootKey() { + this.rootProvider + .getRoot(null, CONNECTION_CONTEXT) + .as(StepVerifier::create) + .expectNext("https://localhost:443") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_InteractionContext.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_InteractionContext.java new file mode 100644 index 00000000000..ecbb45d739f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_InteractionContext.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _InteractionContext { + + @SuppressWarnings("immutables") + private volatile boolean done = false; + + abstract TestRequest getRequest(); + + abstract TestResponse getResponse(); + + final boolean isDone() { + return this.done; + } + + final void setDone(boolean done) { + this.done = done; + } + +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_TestRequest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_TestRequest.java new file mode 100644 index 00000000000..9126aed7a23 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_TestRequest.java @@ -0,0 +1,119 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.ObjectMapper; +import io.netty.handler.codec.http.HttpHeaderNames; +import io.netty.handler.codec.http.HttpMethod; +import okhttp3.Headers; +import mockwebserver3.RecordedRequest; +import okio.Buffer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; +import org.springframework.core.io.ClassPathResource; +import reactor.core.Exceptions; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuples; + +import java.io.IOException; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.function.Consumer; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +import static org.assertj.core.api.Assertions.assertThat; + +@Value.Immutable +abstract class _TestRequest { + + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + private static final Pattern PATH_PATTERN = Pattern.compile("[A-Z]+ (.*) [A-Z0-9\\./]+"); + + public static Buffer getBuffer(String path) { + try { + return new Buffer().readFrom(new ClassPathResource(path).getInputStream()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + public void assertEquals(RecordedRequest request) { + assertThat(getMethod()).hasToString(request.getMethod()); + assertThat(extractPath(request)).isEqualTo(getPath()); + + assertThat(request.getHeader(HttpHeaderNames.TRANSFER_ENCODING.toString())).as("Does not have Transfer-Encoding header").isNull(); + + if (!HttpMethod.GET.toString().equals(request.getMethod())) { + assertThat(request.getHeader(HttpHeaderNames.CONTENT_LENGTH.toString())).as("Has Content-Length header").isNotNull(); + } + + getHeaders().forEach((key, value) -> { + if (value == null) { + assertThat(request.getHeader(key)).as("Does not have %s header", key).isNull(); + } else { + assertThat(request.getHeader(key)).as("Header %s value", key).isEqualTo(value); + } + }); + + if (getPayload().isPresent()) { + assertBodyEquals(request.getBody(), getPayload().map(_TestRequest::getBuffer).get()); + } else if (getContents().isPresent()) { + getContents().get().accept(Tuples.of(request.getHeaders(), request.getBody())); + } else { + assertThat(request.getBodySize()).as("Invalid request body: %s", request.getBody().readUtf8()).isEqualTo(0); + } + } + + abstract Optional>> getContents(); + + @AllowNulls + abstract Map getHeaders(); + + abstract HttpMethod getMethod(); + + abstract String getPath(); + + abstract Optional getPayload(); + + private static void assertBodyEquals(Buffer actualBuffer, Buffer expectedBuffer) { + assertThat(getValue(actualBuffer)).isEqualTo(getValue(expectedBuffer)); + } + + private static Object getValue(Buffer buffer) { + try { + JsonNode root = OBJECT_MAPPER.readTree(buffer.readByteArray()); + return root.isArray() ? OBJECT_MAPPER.treeToValue(root, List.class) : OBJECT_MAPPER.treeToValue(root, Map.class); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + private String extractPath(RecordedRequest request) { + Matcher matcher = PATH_PATTERN.matcher(request.getRequestLine()); + + if (matcher.find()) { + return matcher.group(1); + } else { + throw new IllegalArgumentException(String.format("Request Line %s does not contain a valid path", request.getRequestLine())); + } + } + +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_TestResponse.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_TestResponse.java new file mode 100644 index 00000000000..efe791dc6c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/_TestResponse.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor; + +import io.netty.handler.codec.http.HttpResponseStatus; +import mockwebserver3.MockResponse; +import okio.Buffer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; +import org.springframework.core.io.ClassPathResource; + +import java.io.IOException; +import java.util.Map; +import java.util.Optional; + +@Value.Immutable +abstract class _TestResponse { + + private static final int MAX_CHUNK_SIZE = 16 * 1024; + + abstract Optional getContentType(); + + @AllowNulls + abstract Map getHeaders(); + + MockResponse getMockResponse() { + MockResponse response = new MockResponse().setResponseCode(getStatus().code()); + + getHeaders().forEach(response::addHeader); + + getPayload() + .map(_TestResponse::getBuffer) + .ifPresent(buffer -> response + .setHeader("Content-Type", getContentType().orElse("application/json")) + .setChunkedBody(buffer, MAX_CHUNK_SIZE)); + + return response; + } + + abstract Optional getPayload(); + + abstract HttpResponseStatus getStatus(); + + private static Buffer getBuffer(String path) { + try { + return new Buffer().readFrom(new ClassPathResource(path).getInputStream()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/AbstractClientApiTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/AbstractClientApiTest.java new file mode 100644 index 00000000000..844a4caca43 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/AbstractClientApiTest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import okhttp3.Headers; +import org.cloudfoundry.reactor.AbstractRestTest; + +public abstract class AbstractClientApiTest extends AbstractRestTest { + + private static final Pattern BOUNDARY = Pattern.compile("multipart/form-data; boundary=(.+)"); + + protected static String extractBoundary(Headers headers) { + String contentType = headers.get("Content-Type"); + assertThat(contentType).as("Has Content-Type header").isNotNull(); + + Matcher matcher = BOUNDARY.matcher(contentType); + assertThat(matcher.find()).as("Has Content-Type with boundary").isTrue(); + return matcher.group(1); + } + + protected static byte[] getBytes(String path) { + try (InputStream in = new FileInputStream(new File("src/test/resources", path)); + ByteArrayOutputStream out = new ByteArrayOutputStream()) { + byte[] buffer = new byte[8192]; + int len; + + while ((len = in.read(buffer)) != -1) { + out.write(buffer, 0, len); + } + + return out.toByteArray(); + } catch (IOException e) { + throw new RuntimeException(e); + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/MethodNameComparatorTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/MethodNameComparatorTest.java new file mode 100644 index 00000000000..0d727af49dc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/MethodNameComparatorTest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.lang.reflect.Method; +import org.junit.jupiter.api.Test; + +final class MethodNameComparatorTest { + + private final MethodNameComparator comparator = MethodNameComparator.INSTANCE; + + @Test + void test() throws NoSuchMethodException { + Method alpha = this.getClass().getDeclaredMethod("alpha"); + Method bravo = this.getClass().getDeclaredMethod("bravo"); + + assertThat(this.comparator.compare(alpha, bravo)).isLessThan(0); + assertThat(this.comparator.compare(bravo, alpha)).isGreaterThan(0); + assertThat(this.comparator.compare(alpha, alpha)).isZero(); + } + + private void alpha() { + // test fixture + } + + private void bravo() { + // text fixture + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/QueryBuilderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/QueryBuilderTest.java new file mode 100644 index 00000000000..e3b65984562 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/QueryBuilderTest.java @@ -0,0 +1,109 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Stream; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.junit.jupiter.api.Test; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; + +final class QueryBuilderTest { + + @Test + void test() { + UriComponentsBuilder builder = UriComponentsBuilder.newInstance(); + + Stream parameters = + new QueryBuilder().build(new StubQueryParamsSubClass()); + UriQueryParameters.set(builder, parameters); + + MultiValueMap queryParams = builder.encode().build().getQueryParams(); + + assertThat(queryParams).hasSize(8); + assertThat(queryParams.getFirst("test-single")).isEqualTo("test-value-1"); + assertThat(queryParams.getFirst("test-collection")) + .isEqualTo("test-value-2%2Ctest-value-3"); + assertThat(queryParams.getFirst("test-collection-custom-delimiter")) + .isEqualTo("test-value-4%20test-value-5"); + assertThat(queryParams.getFirst("test-subclass")).isEqualTo("test-value-6"); + assertThat(queryParams.getFirst("test-override")).isEqualTo("test-value-7"); + assertThat(queryParams.getFirst("test-reserved-characters")) + .isEqualTo("%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D"); + } + + public abstract static class StubQueryParams { + + @QueryParameter("test-collection") + public final List getCollection() { + return Arrays.asList("test-value-2", "test-value-3"); + } + + @QueryParameter(value = "test-collection-custom-delimiter", delimiter = " ") + public final List getCollectionCustomDelimiter() { + return Arrays.asList("test-value-4", "test-value-5"); + } + + @QueryParameter("test-empty") + public final List getEmpty() { + return Collections.emptyList(); + } + + @QueryParameter("test-empty-value") + public final String getEmptyValue() { + return ""; + } + + @QueryParameter("test-null") + public final String getNull() { + return null; + } + + @QueryParameter("test-reserved-characters") + public final String getReservedCharacters() { + return ":/?#[]@!$&'()*+,;="; + } + + @QueryParameter("test-single") + public final String getSingle() { + return "test-value-1"; + } + + @QueryParameter("test-override") + abstract String getOverride(); + } + + public static final class StubQueryParamsSubClass extends StubQueryParams { + + @Override + public String getOverride() { + return "test-value-7"; + } + + @QueryParameter("test-subclass") + public String getSubclass() { + return "test-value-6"; + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/ReactorCloudFoundryClientTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/ReactorCloudFoundryClientTest.java new file mode 100644 index 00000000000..297cf56748f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/ReactorCloudFoundryClientTest.java @@ -0,0 +1,248 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.cloudfoundry.reactor.AbstractRestTest; +import org.junit.jupiter.api.Test; + +final class ReactorCloudFoundryClientTest extends AbstractRestTest { + + private final ReactorCloudFoundryClient client = + ReactorCloudFoundryClient.builder() + .connectionContext(CONNECTION_CONTEXT) + .rootV2(this.root) + .rootV3(this.root) + .tokenProvider(TOKEN_PROVIDER) + .build(); + + @Test + void applicationUsageEvents() { + assertThat(this.client.applicationUsageEvents()).isNotNull(); + } + + @Test + void applicationsV2() { + assertThat(this.client.applicationsV2()).isNotNull(); + } + + @Test + void applicationsV3() { + assertThat(this.client.applicationsV3()).isNotNull(); + } + + @Test + void buildpacks() { + assertThat(this.client.buildpacks()).isNotNull(); + } + + @Test + void builds() { + assertThat(this.client.builds()).isNotNull(); + } + + @Test + void domains() { + assertThat(this.client.domains()).isNotNull(); + } + + @Test + void domainsV3() { + assertThat(this.client.domainsV3()).isNotNull(); + } + + @Test + void droplets() { + assertThat(this.client.droplets()).isNotNull(); + } + + @Test + void environmentVariableGroups() { + assertThat(this.client.environmentVariableGroups()).isNotNull(); + } + + @Test + void events() { + assertThat(this.client.events()).isNotNull(); + } + + @Test + void featureFlags() { + assertThat(this.client.featureFlags()).isNotNull(); + } + + @Test + void info() { + assertThat(this.client.info()).isNotNull(); + } + + @Test + void isolationSegments() { + assertThat(this.client.isolationSegments()).isNotNull(); + } + + @Test + void jobs() { + assertThat(this.client.jobs()).isNotNull(); + } + + @Test + void jobsV3() { + assertThat(this.client.jobsV3()).isNotNull(); + } + + @Test + void organizationQuotaDefinitions() { + assertThat(this.client.organizationQuotaDefinitions()).isNotNull(); + } + + @Test + void organizations() { + assertThat(this.client.organizations()).isNotNull(); + } + + @Test + void organizationsV3() { + assertThat(this.client.organizationsV3()).isNotNull(); + } + + @Test + void packages() { + assertThat(this.client.packages()).isNotNull(); + } + + @Test + void privateDomains() { + assertThat(this.client.privateDomains()).isNotNull(); + } + + @Test + void processes() { + assertThat(this.client.processes()).isNotNull(); + } + + @Test + void resourceMatch() { + assertThat(this.client.resourceMatch()).isNotNull(); + } + + @Test + void rolesV3() { + assertThat(this.client.rolesV3()).isNotNull(); + } + + @Test + void routeMappings() { + assertThat(this.client.routeMappings()).isNotNull(); + } + + @Test + void routes() { + assertThat(this.client.routes()).isNotNull(); + } + + @Test + void runningSecurityGroups() { + assertThat(this.client.securityGroups()).isNotNull(); + } + + @Test + void serviceBindingsV2() { + assertThat(this.client.serviceBindingsV2()).isNotNull(); + } + + @Test + void serviceBindingsV3() { + assertThat(this.client.serviceBindingsV3()).isNotNull(); + } + + @Test + void serviceBrokers() { + assertThat(this.client.serviceBrokers()).isNotNull(); + } + + @Test + void serviceInstances() { + assertThat(this.client.serviceInstances()).isNotNull(); + } + + @Test + void serviceKeys() { + assertThat(this.client.serviceKeys()).isNotNull(); + } + + @Test + void servicePlanVisibilities() { + assertThat(this.client.servicePlanVisibilities()).isNotNull(); + } + + @Test + void servicePlans() { + assertThat(this.client.servicePlans()).isNotNull(); + } + + @Test + void serviceUsageEvents() { + assertThat(this.client.serviceUsageEvents()).isNotNull(); + } + + @Test + void services() { + assertThat(this.client.services()).isNotNull(); + } + + @Test + void sharedDomains() { + assertThat(this.client.sharedDomains()).isNotNull(); + } + + @Test + void spaceQuotaDefinitions() { + assertThat(this.client.spaceQuotaDefinitions()).isNotNull(); + } + + @Test + void spaces() { + assertThat(this.client.spaces()).isNotNull(); + } + + @Test + void spacesV3() { + assertThat(this.client.spacesV3()).isNotNull(); + } + + @Test + void stacks() { + assertThat(this.client.stacks()).isNotNull(); + } + + @Test + void tasks() { + assertThat(this.client.tasks()).isNotNull(); + } + + @Test + void userProvidedServiceInstances() { + assertThat(this.client.userProvidedServiceInstances()).isNotNull(); + } + + @Test + void users() { + assertThat(this.client.users()).isNotNull(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/FilterBuilderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/FilterBuilderTest.java new file mode 100644 index 00000000000..1f2f293e5d2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/FilterBuilderTest.java @@ -0,0 +1,134 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.v2.FilterParameter.Operation.GREATER_THAN; +import static org.cloudfoundry.client.v2.FilterParameter.Operation.GREATER_THAN_OR_EQUAL_TO; +import static org.cloudfoundry.client.v2.FilterParameter.Operation.LESS_THAN; +import static org.cloudfoundry.client.v2.FilterParameter.Operation.LESS_THAN_OR_EQUAL_TO; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Stream; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.junit.jupiter.api.Test; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; + +final class FilterBuilderTest { + + @Test + void test() { + UriComponentsBuilder builder = UriComponentsBuilder.newInstance(); + + Stream parameters = + new FilterBuilder().build(new StubFilterParamsSubClass()); + UriQueryParameters.set(builder, parameters); + + MultiValueMap queryParams = builder.encode().build().getQueryParams(); + List q = queryParams.get("q"); + + assertThat(q) + .hasSize(10) + .containsOnly( + "test-empty-value%3A", + "test-greater-than%3Etest-value-1", + "test-greater-than-or-equal-to%3E%3Dtest-value-2", + "test-in%20IN%20test-value-3%2Ctest-value-4", + "test-is%3Atest-value-5", + "test-less-than%3Ctest-value-6", + "test-less-than-or-equal-to%3C%3Dtest-value-7", + "test-default%20IN%20test-value-8%2Ctest-value-9", + "test-override%3Atest-value-10", + "test-reserved-characters%3A%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D"); + } + + public abstract static class StubFilterParams { + + @FilterParameter("test-empty") + public final List getEmpty() { + return Collections.emptyList(); + } + + @FilterParameter("test-empty-value") + public final String getEmptyValue() { + return ""; + } + + @FilterParameter(value = "test-greater-than", operation = GREATER_THAN) + public final String getGreaterThan() { + return "test-value-1"; + } + + @FilterParameter( + value = "test-greater-than-or-equal-to", + operation = GREATER_THAN_OR_EQUAL_TO) + public final String getGreaterThanOrEqualTo() { + return "test-value-2"; + } + + @FilterParameter("test-in") + public final List getIn() { + return Arrays.asList("test-value-3", "test-value-4"); + } + + @FilterParameter("test-is") + public final String getIs() { + return "test-value-5"; + } + + @FilterParameter(value = "test-less-than", operation = LESS_THAN) + public final String getLessThan() { + return "test-value-6"; + } + + @FilterParameter(value = "test-less-than-or-equal-to", operation = LESS_THAN_OR_EQUAL_TO) + public final String getLessThanOrEqualTo() { + return "test-value-7"; + } + + @FilterParameter("test-null") + public final String getNull() { + return null; + } + + @FilterParameter("test-reserved-characters") + public final String getReservedCharacters() { + return ":/?#[]@!$&'()*+,;="; + } + + @FilterParameter("test-override") + abstract String getOverride(); + } + + public static final class StubFilterParamsSubClass extends StubFilterParams { + + @FilterParameter("test-default") + public List getDefault() { + return Arrays.asList("test-value-8", "test-value-9"); + } + + @Override + public String getOverride() { + return "test-value-10"; + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/applications/ReactorApplicationsV2Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/applications/ReactorApplicationsV2Test.java new file mode 100644 index 00000000000..c7730693f24 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/applications/ReactorApplicationsV2Test.java @@ -0,0 +1,1441 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.applications; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.v2.serviceinstances.Plan.builder; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationEnvironmentRequest; +import org.cloudfoundry.client.v2.applications.ApplicationEnvironmentResponse; +import org.cloudfoundry.client.v2.applications.ApplicationInstanceInfo; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesResponse; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsRequest; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsResponse; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.CopyApplicationRequest; +import org.cloudfoundry.client.v2.applications.CopyApplicationResponse; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v2.applications.DockerCredentials; +import org.cloudfoundry.client.v2.applications.DownloadApplicationDropletRequest; +import org.cloudfoundry.client.v2.applications.DownloadApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationPermissionsRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationPermissionsResponse; +import org.cloudfoundry.client.v2.applications.GetApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationResponse; +import org.cloudfoundry.client.v2.applications.InstanceStatistics; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationsResponse; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationServiceBindingRequest; +import org.cloudfoundry.client.v2.applications.Resource; +import org.cloudfoundry.client.v2.applications.RestageApplicationEntity; +import org.cloudfoundry.client.v2.applications.RestageApplicationRequest; +import org.cloudfoundry.client.v2.applications.RestageApplicationResponse; +import org.cloudfoundry.client.v2.applications.SummaryApplicationRequest; +import org.cloudfoundry.client.v2.applications.SummaryApplicationResponse; +import org.cloudfoundry.client.v2.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationDropletRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationDropletResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationResponse; +import org.cloudfoundry.client.v2.applications.Usage; +import org.cloudfoundry.client.v2.domains.Domain; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.routes.Route; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.serviceinstances.Service; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstance; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.cloudfoundry.util.FluentMap; +import org.cloudfoundry.util.OperationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.test.StepVerifier; + +final class ReactorApplicationsV2Test extends AbstractClientApiTest { + + private final ReactorApplicationsV2 applications = + new ReactorApplicationsV2( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @SuppressWarnings("deprecation") + @Test + void associateRoute() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/apps/test-application-id/routes/test-route-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/PUT_{id}_routes_{route-id}_response.json") + .build()) + .build()); + + this.applications + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId("test-application-id") + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateApplicationRouteResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:19Z") + .id("638e90b6-502f-47a8-a3bf-b18fdf3fb70a") + .url( + "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a") + .updatedAt("2015-07-27T22:43:19Z") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(false) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder().build()) + .enableSsh(true) + .environmentJsons(Collections.emptyMap()) + .eventsUrl( + "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/events") + .healthCheckType("port") + .instances(1) + .memory(1024) + .name("name-657") + .packageState("PENDING") + .packageUpdatedAt("2015-07-27T22:43:19Z") + .ports(Collections.emptyList()) + .production(false) + .routesUrl( + "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/routes") + .routeMappingsUrl( + "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/route_mappings") + .serviceBindingsUrl( + "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/service_bindings") + .spaceId("bc900bc3-df1f-4842-9621-e69b90207ad1") + .spaceUrl( + "/v2/spaces/bc900bc3-df1f-4842-9621-e69b90207ad1") + .stackId("46576b60-3d3e-42a6-bdb3-171bc2dedfc4") + .stackUrl( + "/v2/stacks/46576b60-3d3e-42a6-bdb3-171bc2dedfc4") + .state("STOPPED") + .version("eee05ab9-9d6c-490c-932a-996d061b5fe4") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void copy() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps/test-application-id/copy_bits") + .payload( + "fixtures/client/v2/apps/POST_{id}_copy_bits_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/POST_{id}_copy_bits_response.json") + .build()) + .build()); + + this.applications + .copy( + CopyApplicationRequest.builder() + .applicationId("test-application-id") + .sourceApplicationId("af6ab819-3fb7-42e3-a0f6-947022881b7b") + .build()) + .as(StepVerifier::create) + .expectNext( + CopyApplicationResponse.builder() + .entity( + JobEntity.builder() + .id("c900719e-c70a-4c75-9e6a-9535f118acc3") + .status("queued") + .build()) + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:34Z") + .id("c900719e-c70a-4c75-9e6a-9535f118acc3") + .url( + "/v2/jobs/c900719e-c70a-4c75-9e6a-9535f118acc3") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps") + .payload("fixtures/client/v2/apps/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v2/apps/POST_response.json") + .build()) + .build()); + + this.applications + .create( + CreateApplicationRequest.builder() + .diego(true) + .dockerImage("cloudfoundry/hello") + .name("docker_app") + .spaceId("6ef4e580-c189-49c8-959e-4a3d021b3307") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateApplicationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:20Z") + .id("78d1a119-2ded-405f-8675-421d8dade602") + .url( + "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(true) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder().build()) + .dockerImage("cloudfoundry/hello:latest") + .enableSsh(true) + .environmentJsons(Collections.emptyMap()) + .eventsUrl( + "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/events") + .healthCheckType("port") + .instances(1) + .memory(1024) + .name("docker_app") + .packageState("PENDING") + .packageUpdatedAt("2015-07-27T22:43:20Z") + .ports(Collections.emptyList()) + .production(false) + .routesUrl( + "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/routes") + .routeMappingsUrl( + "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/route_mappings") + .serviceBindingsUrl( + "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/service_bindings") + .spaceId("6ef4e580-c189-49c8-959e-4a3d021b3307") + .spaceUrl( + "/v2/spaces/6ef4e580-c189-49c8-959e-4a3d021b3307") + .stackId("d449ecea-669f-448a-a9e7-ec84d51e2fdb") + .stackUrl( + "/v2/stacks/d449ecea-669f-448a-a9e7-ec84d51e2fdb") + .state("STOPPED") + .version("69ebcffe-d79b-482a-91b6-39dfc86e7692") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/apps/test-application-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.applications + .delete( + DeleteApplicationRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void download() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/download") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_download_response.bin") + .build()) + .build()); + + this.applications + .download( + DownloadApplicationRequest.builder() + .applicationId("test-application-id") + .build()) + .as(OperationUtils::collectByteArray) + .as(StepVerifier::create) + .consumeNextWith( + actual -> + assertThat(actual) + .isEqualTo( + getBytes( + "fixtures/client/v2/apps/GET_{id}_download_response.bin"))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void downloadDroplet() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/droplet/download") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_download_response.bin") + .build()) + .build()); + + this.applications + .downloadDroplet( + DownloadApplicationDropletRequest.builder() + .applicationId("test-application-id") + .build()) + .as(OperationUtils::collectByteArray) + .as(StepVerifier::create) + .consumeNextWith( + actual -> + assertThat(actual) + .isEqualTo( + getBytes( + "fixtures/client/v2/apps/GET_{id}_download_response.bin"))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void environment() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/env") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_env_response.json") + .build()) + .build()); + + this.applications + .environment( + ApplicationEnvironmentRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ApplicationEnvironmentResponse.builder() + .stagingEnvironmentJson("STAGING_ENV", "staging_value") + .runningEnvironmentJson("RUNNING_ENV", "running_value") + .environmentJson("env_var", "env_val") + .systemEnvironmentJson("VCAP_SERVICES", Collections.emptyMap()) + .applicationEnvironmentJson( + "VCAP_APPLICATION", + FluentMap.builder() + .entry( + "limits", + FluentMap.builder() + .entry("mem", 1024) + .entry("disk", 1024) + .entry("fds", 16384) + .build()) + .entry( + "application_id", + "96e63272-5da0-44b8-90a9-63d12b2692bb") + .entry( + "application_version", + "86cef6fd-fb03-4f02-97ff-cc6b9d80bbf4") + .entry("application_name", "name-897") + .entry("application_uris", Collections.emptyList()) + .entry( + "version", + "86cef6fd-fb03-4f02-97ff-cc6b9d80bbf4") + .entry("name", "name-897") + .entry("space_name", "name-898") + .entry( + "space_id", + "147eef57-aadb-43b0-9518-b355ab4db678") + .entry("uris", Collections.emptyList()) + .entry("users", null) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/apps/GET_{id}_response.json") + .build()) + .build()); + + this.applications + .get(GetApplicationRequest.builder().applicationId("test-application-id").build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:20Z") + .id("03f286bb-f17c-42b4-8dcd-b818b0b798af") + .updatedAt("2015-07-27T22:43:20Z") + .url( + "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(false) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder().build()) + .enableSsh(true) + .eventsUrl( + "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/events") + .healthCheckType("port") + .instances(1) + .memory(1024) + .name("name-751") + .packageState("PENDING") + .packageUpdatedAt("2015-07-27T22:43:20Z") + .production(false) + .routesUrl( + "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/routes") + .routeMappingsUrl( + "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/route_mappings") + .serviceBindingsUrl( + "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/service_bindings") + .spaceId("b10ca4ed-fa71-4597-8567-e7dd1719c0c7") + .spaceUrl( + "/v2/spaces/b10ca4ed-fa71-4597-8567-e7dd1719c0c7") + .stackId("160fb300-c60e-4682-8527-8500e0318839") + .stackUrl( + "/v2/stacks/160fb300-c60e-4682-8527-8500e0318839") + .state("STOPPED") + .version("2b0d7e20-ce57-44b4-b0ec-7ca6d1d50e20") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getPermissions() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/apps/6fd65993-fbd8-447c-8c04-6e4fe3ac561c/permissions") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_permissions_response.json") + .build()) + .build()); + + this.applications + .getPermissions( + GetApplicationPermissionsRequest.builder() + .applicationId("6fd65993-fbd8-447c-8c04-6e4fe3ac561c") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationPermissionsResponse.builder() + .readBasicData(true) + .readSensitiveData(true) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void instances() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/instances") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_instances_response.json") + .build()) + .build()); + + this.applications + .instances( + ApplicationInstancesRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ApplicationInstancesResponse.builder() + .instance( + "0", + ApplicationInstanceInfo.builder() + .since(1403140717.984577d) + .state("RUNNING") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/apps/GET_apps_response.json") + .build()) + .build()); + + this.applications + .list(ListApplicationsRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationsResponse.builder() + .totalResults(3) + .totalPages(1) + .resource( + ApplicationResource.builder() + .metadata( + Metadata.builder() + .id( + "3d294ed0-105c-4ccd-8f79-5605d6b7198c") + .url( + "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c") + .createdAt("2015-07-27T22:43:20Z") + .updatedAt("2015-07-27T22:43:20Z") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(false) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder() + .build()) + .enableSsh(true) + .eventsUrl( + "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/events") + .healthCheckType("port") + .instances(1) + .memory(1024) + .name("name-761") + .packageState("PENDING") + .packageUpdatedAt( + "2015-07-27T22:43:20Z") + .production(false) + .routesUrl( + "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/routes") + .routeMappingsUrl( + "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/route_mappings") + .serviceBindingsUrl( + "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/service_bindings") + .spaceId( + "30d5165d-0bef-4103-97cd-72269b9d7a4c") + .spaceUrl( + "/v2/spaces/30d5165d-0bef-4103-97cd-72269b9d7a4c") + .stackId( + "d3476df6-534d-4140-b85b-401fa4923234") + .stackUrl( + "/v2/stacks/d3476df6-534d-4140-b85b-401fa4923234") + .state("STOPPED") + .version( + "3ca77d11-93e0-4a60-bab5-30f38b8a8649") + .build()) + .build()) + .resource( + ApplicationResource.builder() + .metadata( + Metadata.builder() + .id( + "522c5382-29e9-48aa-9db0-9f6cfa643ec1") + .url( + "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1") + .createdAt("2015-07-27T22:43:20Z") + .updatedAt("2015-07-27T22:43:20Z") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(false) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder() + .build()) + .enableSsh(true) + .eventsUrl( + "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/events") + .healthCheckType("port") + .instances(1) + .memory(1024) + .name("name-766") + .packageState("PENDING") + .packageUpdatedAt( + "2015-07-27T22:43:20Z") + .production(false) + .routesUrl( + "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/routes") + .routeMappingsUrl( + "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/route_mappings") + .serviceBindingsUrl( + "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/service_bindings") + .spaceId( + "cf929611-97ab-4c42-93e5-9ec26e26f456") + .spaceUrl( + "/v2/spaces/cf929611-97ab-4c42-93e5-9ec26e26f456") + .stackId( + "14b4a0b7-7c7b-4cf2-99f0-cc3ed1473f09") + .stackUrl( + "/v2/stacks/14b4a0b7-7c7b-4cf2-99f0-cc3ed1473f09") + .state("STOPPED") + .version( + "cddf0ec1-acf6-48e7-831b-884972cb7ac3") + .build()) + .build()) + .resource( + ApplicationResource.builder() + .metadata( + Metadata.builder() + .id( + "ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf") + .url( + "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf") + .createdAt("2015-07-27T22:43:20Z") + .updatedAt("2015-07-27T22:43:20Z") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(false) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder() + .build()) + .enableSsh(true) + .eventsUrl( + "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/events") + .healthCheckType("port") + .instances(1) + .memory(1024) + .name("name-771") + .packageState("PENDING") + .packageUpdatedAt( + "2015-07-27T22:43:20Z") + .production(false) + .routesUrl( + "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/routes") + .routeMappingsUrl( + "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/route_mappings") + .serviceBindingsUrl( + "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/service_bindings") + .spaceId( + "e438b2bf-17d6-4265-8813-18e0ab95c029") + .spaceUrl( + "/v2/spaces/e438b2bf-17d6-4265-8813-18e0ab95c029") + .stackId( + "8d42ba27-60df-420e-9208-535e753b706a") + .stackUrl( + "/v2/stacks/8d42ba27-60df-420e-9208-535e753b706a") + .state("STOPPED") + .version( + "8e74d312-1bc9-4953-b4fe-d2613ea4972a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRoutes() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/routes?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_routes_response.json") + .build()) + .build()); + + this.applications + .listRoutes( + ListApplicationRoutesRequest.builder() + .applicationId("test-application-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationRoutesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + RouteResource.builder() + .metadata( + Metadata.builder() + .id( + "893e7d4e-2038-4253-8dd6-1e056d5b24b3") + .url( + "/v2/routes/893e7d4e-2038-4253-8dd6-1e056d5b24b3") + .createdAt("2016-03-17T21:41:11Z") + .build()) + .entity( + RouteEntity.builder() + .host("host-1") + .path("") + .domainId( + "b7174cc3-c108-40a6-bc21-87da4475b759") + .spaceId( + "ccba126a-e222-4845-82fd-5b84a805158a") + .port(0) + .domainUrl( + "/v2/domains/b7174cc3-c108-40a6-bc21-87da4475b759") + .spaceUrl( + "/v2/spaces/ccba126a-e222-4845-82fd-5b84a805158a") + .applicationsUrl( + "/v2/routes/893e7d4e-2038-4253-8dd6-1e056d5b24b3/apps") + .routeMappingsUrl( + "/v2/routes/893e7d4e-2038-4253-8dd6-1e056d5b24b3/route_mappings") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceBindings() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/apps/test-application-id/service_bindings?q=service_instance_guid%3Atest-instance-id&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_service_bindings_response.json") + .build()) + .build()); + + this.applications + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .applicationId("test-application-id") + .serviceInstanceId("test-instance-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationServiceBindingsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceBindingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:20Z") + .id( + "42eda707-fe4d-4eed-9b39-7cb5e665c226") + .url( + "/v2/service_bindings/42eda707-fe4d-4eed-9b39-7cb5e665c226") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "26ddc1de-3eeb-424b-82f3-f7f30a38b610") + .bindingOptions( + Collections.emptyMap()) + .serviceInstanceId( + "650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .credential( + "creds-key-356", + "creds-val-356") + .gatewayName("") + .applicationUrl( + "/v2/apps/26ddc1de-3eeb-424b-82f3-f7f30a38b610") + .serviceInstanceUrl( + "/v2/service_instances/650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeRoute() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/apps/test-application-id/routes/test-route-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.applications + .removeRoute( + RemoveApplicationRouteRequest.builder() + .applicationId("test-application-id") + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeServiceBinding() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/apps/test-application-id/service_bindings/test-service-binding-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.applications + .removeServiceBinding( + RemoveApplicationServiceBindingRequest.builder() + .applicationId("test-application-id") + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void restage() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps/test-application-id/restage") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/POST_{id}_restage_response.json") + .build()) + .build()); + + this.applications + .restage( + RestageApplicationRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + RestageApplicationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:33Z") + .id("2c6b3d3c-47bb-4060-be49-a56496ab57d4") + .url( + "/v2/apps/2c6b3d3c-47bb-4060-be49-a56496ab57d4") + .updatedAt("2015-07-27T22:43:33Z") + .build()) + .entity( + RestageApplicationEntity.builder() + .name("name-2307") + .production(false) + .spaceId("1b59d670-770e-48b7-9056-b2eb64c8445d") + .stackId("ae6c816a-887f-44a4-af1a-a611902ba09c") + .environmentJsons(Collections.emptyMap()) + .memory(1024) + .instances(1) + .diskQuota(1024) + .state("STARTED") + .version("102573ce-4e28-4271-b042-3539098c7b30") + .console(false) + .packageState("PENDING") + .healthCheckType("port") + .diego(false) + .ports(Collections.emptyList()) + .packageUpdatedAt("2015-07-27T22:43:33Z") + .detectedStartCommand("") + .enableSsh(true) + .dockerCredentials( + DockerCredentials.builder().build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void statistics() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/stats") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_stats_response.json") + .build()) + .build()); + + this.applications + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ApplicationStatisticsResponse.builder() + .instance( + "0", + InstanceStatistics.builder() + .state("RUNNING") + .isolationSegment("iso-seg-name") + .statistics( + org.cloudfoundry.client.v2.applications + .Statistics.builder() + .usage( + Usage.builder() + .disk(66392064L) + .memory(29880320L) + .cpu( + 0.13511219703079957d) + .time( + "2014-06-19" + + " 22:37:58" + + " +0000") + .build()) + .name("app_name") + .uri("app_name.example.com") + .host("10.0.0.1") + .port(61035) + .uptime(65007L) + .memoryQuota(536870912L) + .diskQuota(1073741824L) + .fdsQuota(16384) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void summary() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/summary") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/apps/GET_{id}_summary_response.json") + .build()) + .build()); + + this.applications + .summary( + SummaryApplicationRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + SummaryApplicationResponse.builder() + .id("2ee5ef3f-3884-4240-ab99-c747ea21663b") + .name("name-1136") + .route( + Route.builder() + .id("704e6015-9785-42a3-b23c-06598154594d") + .host("host-23") + .path("") + .domain( + Domain.builder() + .id( + "ebddac49-b094-4ce7-8c9b-0e00b4bc7525") + .name("domain-72.example.com") + .build()) + .build()) + .runningInstances(0) + .service( + ServiceInstance.builder() + .id("01826f41-9d8b-4458-88c6-9b8ddb04d0e8") + .name("name-1138") + .boundApplicationCount(1) + .servicePlan( + builder() + .id( + "6dce1c90-929b-466c-98d1-1b856dc6e221") + .name("name-1139") + .service( + Service.builder() + .id( + "994dae37-1a53-4959-aaa6-ba85e77d35e6") + .label("label-46") + .build()) + .build()) + .build()) + .availableDomain( + Domain.builder() + .id("ebddac49-b094-4ce7-8c9b-0e00b4bc7525") + .name("domain-72.example.com") + .owningOrganizationId( + "48e781a9-3ccd-469c-a5cc-91bc86722924") + .build()) + .availableDomain( + Domain.builder() + .id("4f6e6f6e-695a-44df-816b-3d48ec05702b") + .name("customer-app-domain1.com") + .build()) + .availableDomain( + Domain.builder() + .id("43c8f83f-95b4-46fe-94cc-7748565d9a2b") + .name("customer-app-domain2.com") + .build()) + .production(false) + .spaceId("1fa31e11-a974-45b6-873c-ef690ce93e2b") + .stackId("4a447da1-c518-4acb-b691-8d370df83b48") + .memory(1_024) + .instances(1) + .diskQuota(1_024) + .state("STOPPED") + .version("0a5fecd5-d790-43cc-a9bf-640db1b00b1b") + .console(false) + .packageState("PENDING") + .healthCheckType("port") + .diego(false) + .packageUpdatedAt("2016-04-22T19:33:29Z") + .ports(Collections.emptyList()) + .detectedStartCommand("") + .enableSsh(true) + .dockerCredentials(DockerCredentials.builder().build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void terminateInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/apps/test-application-id/instances/0") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.applications + .terminateInstance( + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .index("0") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/apps/test-application-id") + .payload("fixtures/client/v2/apps/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v2/apps/PUT_{id}_response.json") + .build()) + .build()); + + this.applications + .update( + UpdateApplicationRequest.builder() + .applicationId("test-application-id") + .name("new_name") + .environmentJsons(Collections.emptyMap()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateApplicationResponse.builder() + .entity( + ApplicationEntity.builder() + .name("new_name") + .production(false) + .spaceId("701aebe5-92fd-44cf-a7e6-bc54685c32ea") + .stackId("2cdc06a4-cb6e-4191-9ce8-b6bca4a16aaf") + .environmentJsons(Collections.emptyMap()) + .memory(1024) + .instances(1) + .diskQuota(1024) + .state("STOPPED") + .version("89c2beaa-5f16-49f2-bf8c-cbe49edf555b") + .console(false) + .packageState("PENDING") + .healthCheckType("port") + .diego(false) + .packageUpdatedAt("2015-07-27T22:43:21Z") + .detectedStartCommand("") + .ports(Collections.emptyList()) + .enableSsh(true) + .dockerCredentials( + DockerCredentials.builder().build()) + .spaceUrl( + "/v2/spaces/701aebe5-92fd-44cf-a7e6-bc54685c32ea") + .stackUrl( + "/v2/stacks/2cdc06a4-cb6e-4191-9ce8-b6bca4a16aaf") + .eventsUrl( + "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/events") + .serviceBindingsUrl( + "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/service_bindings") + .routesUrl( + "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/routes") + .routeMappingsUrl( + "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/route_mappings") + .build()) + .metadata( + Metadata.builder() + .updatedAt("2015-07-27T22:43:21Z") + .createdAt("2015-07-27T22:43:21Z") + .id("0c71909b-3d44-49c3-b65d-13894d70972c") + .url( + "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void upload() throws IOException { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/apps/test-application-id/bits") + .contents( + consumer( + (headers, body) -> { + String boundary = + extractBoundary(headers); + + assertThat( + body.readString( + Charset + .defaultCharset())) + .isEqualTo( + "--" + + boundary + + "\r\n" + + "content-disposition:" + + " form-data;" + + " name=\"resources\"\r\n" + + "content-length:" + + " 178\r\n" + + "content-type:" + + " application/json\r\n" + + "content-transfer-encoding:" + + " binary\r\n" + + "\r\n" + + "[{\"sha1\":\"b907173290db6a155949ab4dc9b2d019dea0c901\",\"fn\":\"path/to/content.txt\",\"size\":123},{\"sha1\":\"ff84f89760317996b9dd180ab996b079f418396f\",\"fn\":\"path/to/code.jar\",\"size\":123}]\r\n" + + "--" + + boundary + + "\r\n" + + "content-disposition:" + + " form-data;" + + " name=\"application\";" + + " filename=\"test-application.zip\"\r\n" + + "content-length:" + + " 12\r\n" + + "content-type:" + + " application/zip\r\n" + + "content-transfer-encoding:" + + " binary\r\n" + + "\r\n" + + "test-content\r\n" + + "--" + + boundary + + "--\r\n"); + })) + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/apps/PUT_{id}_bits_response.json") + .build()) + .build()); + + this.applications + .upload( + UploadApplicationRequest.builder() + .application( + new ClassPathResource( + "fixtures/client/v2/apps/test-application.zip") + .getFile() + .toPath()) + .applicationId("test-application-id") + .resource( + Resource.builder() + .hash("b907173290db6a155949ab4dc9b2d019dea0c901") + .path("path/to/content.txt") + .size(123) + .build()) + .resource( + Resource.builder() + .hash("ff84f89760317996b9dd180ab996b079f418396f") + .path("path/to/code.jar") + .size(123) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UploadApplicationResponse.builder() + .entity( + JobEntity.builder() + .id("eff6a47e-67a1-4e3b-99a5-4f9bcab7620a") + .status("queued") + .build()) + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:33Z") + .id("eff6a47e-67a1-4e3b-99a5-4f9bcab7620a") + .url( + "/v2/jobs/eff6a47e-67a1-4e3b-99a5-4f9bcab7620a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void uploadDroplet() throws IOException { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/apps/test-application-id/droplet/upload") + .contents( + consumer( + (headers, body) -> { + String boundary = + extractBoundary(headers); + + assertThat( + body.readString( + Charset + .defaultCharset())) + .isEqualTo( + "--" + + boundary + + "\r\n" + + "content-disposition:" + + " form-data;" + + " name=\"droplet\";" + + " filename=\"test-droplet.tgz\"\r\n" + + "content-length:" + + " 12\r\n" + + "content-type:" + + " application/octet-stream\r\n" + + "content-transfer-encoding:" + + " binary\r\n" + + "\r\n" + + "test-content\r\n" + + "--" + + boundary + + "--\r\n"); + })) + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/apps/PUT_{id}_droplet_upload_response.json") + .build()) + .build()); + + this.applications + .uploadDroplet( + UploadApplicationDropletRequest.builder() + .droplet( + new ClassPathResource( + "fixtures/client/v2/apps/test-droplet.tgz") + .getFile() + .toPath()) + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UploadApplicationDropletResponse.builder() + .entity( + JobEntity.builder() + .id("8d321cee-8633-42e9-a021-78876d0d389c") + .status("queued") + .build()) + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:21Z") + .id("8d321cee-8633-42e9-a021-78876d0d389c") + .url( + "/v2/jobs/8d321cee-8633-42e9-a021-78876d0d389c") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/applicationusageevents/ReactorApplicationUsageEventsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/applicationusageevents/ReactorApplicationUsageEventsTest.java new file mode 100644 index 00000000000..43079f76237 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/applicationusageevents/ReactorApplicationUsageEventsTest.java @@ -0,0 +1,190 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.applicationusageevents; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEventEntity; +import org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEventResource; +import org.cloudfoundry.client.v2.applicationusageevents.GetApplicationUsageEventRequest; +import org.cloudfoundry.client.v2.applicationusageevents.GetApplicationUsageEventResponse; +import org.cloudfoundry.client.v2.applicationusageevents.ListApplicationUsageEventsRequest; +import org.cloudfoundry.client.v2.applicationusageevents.ListApplicationUsageEventsResponse; +import org.cloudfoundry.client.v2.applicationusageevents.PurgeAndReseedApplicationUsageEventsRequest; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorApplicationUsageEventsTest extends AbstractClientApiTest { + + private final ReactorApplicationUsageEvents applicationUsageEvents = + new ReactorApplicationUsageEvents( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/app_usage_events/caac0ed4-febf-48a4-951f-c0a7fadf6a68") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/app_usage_events/GET_{id}_response.json") + .build()) + .build()); + + this.applicationUsageEvents + .get( + GetApplicationUsageEventRequest.builder() + .applicationUsageEventId("caac0ed4-febf-48a4-951f-c0a7fadf6a68") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationUsageEventResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-03-17T21:41:21Z") + .id("caac0ed4-febf-48a4-951f-c0a7fadf6a68") + .url( + "/v2/app_usage_events/caac0ed4-febf-48a4-951f-c0a7fadf6a68") + .build()) + .entity( + ApplicationUsageEventEntity.builder() + .applicationId( + "guid-8cdd38d1-2c13-46a5-8f5e-e91a6cc4b060") + .applicationName("name-1103") + .buildpackId( + "guid-1ffac859-4635-41fd-91bb-3ba07768a5ec") + .buildpackName("name-1105") + .instanceCount(1) + .memoryInMbPerInstance(564) + .organizationId( + "guid-1ed968f6-a9f7-469b-a04f-ed1ebc2df1e7") + .packageState("STAGED") + .processType("web") + .spaceId( + "guid-9c4485f6-7579-45da-8c07-f62e1bc8c499") + .spaceName("name-1104") + .state("STARTED") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/app_usage_events?after_guid=f1d8ddec-d36a-4670-acb8-6082a1f1a95f&results-per-page=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/app_usage_events/GET_response.json") + .build()) + .build()); + + this.applicationUsageEvents + .list( + ListApplicationUsageEventsRequest.builder() + .afterApplicationUsageEventId( + "f1d8ddec-d36a-4670-acb8-6082a1f1a95f") + .resultsPerPage(1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationUsageEventsResponse.builder() + .nextUrl( + "/v2/app_usage_events?after_guid=f1d8ddec-d36a-4670-acb8-6082a1f1a95f&order-direction=asc&page=2&results-per-page=1") + .totalPages(2) + .totalResults(2) + .resource( + ApplicationUsageEventResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-03-14T22:30:38Z") + .id( + "12dc4396-b7d1-444e-a3b4-9497c4ca0d14") + .url( + "/v2/app_usage_events/12dc4396-b7d1-444e-a3b4-9497c4ca0d14") + .build()) + .entity( + ApplicationUsageEventEntity.builder() + .applicationId( + "guid-1460025b-eb6a-4459-8f43-0d7db43dc71f") + .applicationName("name-1783") + .buildpackId( + "guid-c17e9ffa-a1f8-4140-9718-f627be3a3459") + .buildpackName("name-1785") + .instanceCount(1) + .memoryInMbPerInstance(564) + .organizationId( + "guid-7f111ae5-9017-49f6-afe7-3a175b9f7a79") + .packageState("STAGED") + .processType("web") + .spaceId( + "guid-766a0db1-6391-4d9e-9ce9-f2f7cdf93190") + .spaceName("name-1784") + .state("STARTED") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void purgeAndReseed() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/app_usage_events/destructively_purge_all_and_reseed_started_apps") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.applicationUsageEvents + .purgeAndReseed(PurgeAndReseedApplicationUsageEventsRequest.builder().build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/blobstores/ReactorBlobstoresTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/blobstores/ReactorBlobstoresTest.java new file mode 100644 index 00000000000..9c54293a4e4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/blobstores/ReactorBlobstoresTest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.blobstores; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.blobstores.DeleteBlobstoreBuildpackCachesRequest; +import org.cloudfoundry.client.v2.blobstores.DeleteBlobstoreBuildpackCachesResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorBlobstoresTest extends AbstractClientApiTest { + + private ReactorBlobstores blobstores = + new ReactorBlobstores( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/blobstores/buildpack_cache") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/blobstores/DELETE_buildpack_cache_response.json") + .build()) + .build()); + + this.blobstores + .deleteBuildpackCaches(DeleteBlobstoreBuildpackCachesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + DeleteBlobstoreBuildpackCachesResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:31Z") + .id("919a6964-ea88-43cc-9ac1-0dbc3769f743") + .url( + "/v2/jobs/919a6964-ea88-43cc-9ac1-0dbc3769f743") + .build()) + .entity( + JobEntity.builder() + .id("919a6964-ea88-43cc-9ac1-0dbc3769f743") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/buildpacks/ReactorBuildpacksTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/buildpacks/ReactorBuildpacksTest.java new file mode 100644 index 00000000000..41e576c0a0d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/buildpacks/ReactorBuildpacksTest.java @@ -0,0 +1,405 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.buildpacks; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.buildpacks.BuildpackEntity; +import org.cloudfoundry.client.v2.buildpacks.BuildpackResource; +import org.cloudfoundry.client.v2.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.DeleteBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v2.buildpacks.ListBuildpacksResponse; +import org.cloudfoundry.client.v2.buildpacks.UpdateBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.UpdateBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.UploadBuildpackResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.test.StepVerifier; + +final class ReactorBuildpacksTest extends AbstractClientApiTest { + + private final ReactorBuildpacks buildpacks = + new ReactorBuildpacks( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/buildpacks") + .payload("fixtures/client/v2/buildpacks/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v2/buildpacks/POST_response.json") + .build()) + .build()); + + this.buildpacks + .create(CreateBuildpackRequest.builder().name("Golang_buildpack").build()) + .as(StepVerifier::create) + .expectNext( + CreateBuildpackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:31Z") + .id("11bd4dd1-134e-4d15-b8fe-dd9f36bae66a") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/buildpacks/11bd4dd1-134e-4d15-b8fe-dd9f36bae66a") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(true) + .locked(false) + .name("Golang_buildpack") + .position(1) + .stack("cflinuxfs2") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/buildpacks/test-buildpack-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/buildpacks/DELETE_{id}_response.json") + .build()) + .build()); + + this.buildpacks + .delete( + DeleteBuildpackRequest.builder() + .async(true) + .buildpackId("test-buildpack-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteBuildpackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:34Z") + .id("c900719e-c70a-4c75-9e6a-9535f118acc3") + .url( + "/v2/jobs/c900719e-c70a-4c75-9e6a-9535f118acc3") + .build()) + .entity( + JobEntity.builder() + .id("c900719e-c70a-4c75-9e6a-9535f118acc3") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/buildpacks/test-buildpack-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/buildpacks/GET_{id}_response.json") + .build()) + .build()); + + this.buildpacks + .get(GetBuildpackRequest.builder().buildpackId("test-buildpack-id").build()) + .as(StepVerifier::create) + .expectNext( + GetBuildpackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-03-17T21:41:28Z") + .id("35d3fa06-08db-4b9e-b2a7-58724a179687") + .url( + "/v2/buildpacks/35d3fa06-08db-4b9e-b2a7-58724a179687") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(true) + .filename("name-2302") + .locked(false) + .name("name_1") + .position(1) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/buildpacks?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/buildpacks/GET_response.json") + .build()) + .build()); + + this.buildpacks + .list(ListBuildpacksRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListBuildpacksResponse.builder() + .totalResults(3) + .totalPages(1) + .resource( + BuildpackResource.builder() + .metadata( + Metadata.builder() + .id( + "45203d32-475b-4d55-9d34-3ffc935edd49") + .url( + "/v2/buildpacks/45203d32-475b-4d55-9d34-3ffc935edd49") + .createdAt("2016-03-17T21:41:28Z") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(true) + .filename("name-2308") + .locked(false) + .name("name_1") + .position(1) + .build()) + .build()) + .resource( + BuildpackResource.builder() + .metadata( + Metadata.builder() + .id( + "1aeb95ef-7058-495c-b260-dea2e8efb976") + .url( + "/v2/buildpacks/1aeb95ef-7058-495c-b260-dea2e8efb976") + .createdAt("2016-03-17T21:41:28Z") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(true) + .filename("name-2309") + .locked(false) + .name("name_2") + .position(2) + .build()) + .build()) + .resource( + BuildpackResource.builder() + .metadata( + Metadata.builder() + .id( + "4dd0046a-7a54-4f57-a31f-06d7e57eb463") + .url( + "/v2/buildpacks/4dd0046a-7a54-4f57-a31f-06d7e57eb463") + .createdAt("2016-03-17T21:41:28Z") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(true) + .filename("name-2310") + .locked(false) + .name("name_3") + .position(3) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/buildpacks/test-buildpack-id") + .payload( + "fixtures/client/v2/buildpacks/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/buildpacks/PUT_{id}_response.json") + .build()) + .build()); + + this.buildpacks + .update( + UpdateBuildpackRequest.builder() + .buildpackId("test-buildpack-id") + .enabled(false) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateBuildpackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-03-17T21:41:28Z") + .id("edd64481-e13c-4193-b6cc-2a727a62e817") + .updatedAt("2016-03-17T21:41:28Z") + .url( + "/v2/buildpacks/edd64481-e13c-4193-b6cc-2a727a62e817") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(false) + .filename("name-2314") + .locked(false) + .name("name_1") + .position(1) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void upload() throws IOException { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/buildpacks/test-buildpack-id/bits") + .contents( + consumer( + (headers, body) -> { + String boundary = + extractBoundary(headers); + + assertThat( + body.readString( + Charset + .defaultCharset())) + .isEqualTo( + "--" + + boundary + + "\r\n" + + "content-disposition:" + + " form-data;" + + " name=\"buildpack\";" + + " filename=\"test-filename\"\r\n" + + "content-length:" + + " 12\r\n" + + "content-type:" + + " application/zip\r\n" + + "content-transfer-encoding:" + + " binary\r\n" + + "\r\n" + + "test-content\r\n" + + "--" + + boundary + + "--\r\n"); + })) + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/buildpacks/PUT_{id}_bits_response.json") + .build()) + .build()); + + this.buildpacks + .upload( + UploadBuildpackRequest.builder() + .buildpack( + new ClassPathResource( + "fixtures/client/v2/buildpacks/test-buildpack.zip") + .getFile() + .toPath()) + .buildpackId("test-buildpack-id") + .filename("test-filename") + .build()) + .as(StepVerifier::create) + .expectNext( + UploadBuildpackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-04-21T08:51:39Z") + .id("353360ea-59bb-414b-a90e-100c37317a02") + .updatedAt("2016-04-21T09:38:16Z") + .url( + "/v2/buildpacks/353360ea-59bb-414b-a90e-100c37317a02") + .build()) + .entity( + BuildpackEntity.builder() + .enabled(true) + .filename("binary_buildpack-cached-v1.0.1.zip") + .locked(false) + .name("binary_buildpack") + .position(8) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/domains/ReactorDomainsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/domains/ReactorDomainsTest.java new file mode 100644 index 00000000000..9948c3c9fc2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/domains/ReactorDomainsTest.java @@ -0,0 +1,369 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.domains; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.domains.CreateDomainRequest; +import org.cloudfoundry.client.v2.domains.CreateDomainResponse; +import org.cloudfoundry.client.v2.domains.DeleteDomainRequest; +import org.cloudfoundry.client.v2.domains.DeleteDomainResponse; +import org.cloudfoundry.client.v2.domains.DomainEntity; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.cloudfoundry.client.v2.domains.GetDomainRequest; +import org.cloudfoundry.client.v2.domains.GetDomainResponse; +import org.cloudfoundry.client.v2.domains.ListDomainSpacesRequest; +import org.cloudfoundry.client.v2.domains.ListDomainSpacesResponse; +import org.cloudfoundry.client.v2.domains.ListDomainsRequest; +import org.cloudfoundry.client.v2.domains.ListDomainsResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorDomainsTest extends AbstractClientApiTest { + + private final ReactorDomains domains = + new ReactorDomains( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/domains") + .payload("fixtures/client/v2/domains/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/domains/POST_response.json") + .build()) + .build()); + + this.domains + .create( + CreateDomainRequest.builder() + .name("exmaple.com") + .owningOrganizationId("09e0d56f-4e50-4bff-af83-9bd87a7d7f00") + .wildcard(true) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateDomainResponse.builder() + .metadata( + Metadata.builder() + .id("abb8338f-eaea-4149-85c0-61888bac0737") + .url( + "/v2/domains/abb8338f-eaea-4149-85c0-61888bac0737") + .createdAt("2015-07-27T22:43:33Z") + .build()) + .entity( + DomainEntity.builder() + .name("exmaple.com") + .owningOrganizationId( + "09e0d56f-4e50-4bff-af83-9bd87a7d7f00") + .owningOrganizationUrl( + "/v2/organizations/09e0d56f-4e50-4bff-af83-9bd87a7d7f00") + .sharedOrganizations(Collections.emptyList()) + .spacesUrl( + "/v2/domains/abb8338f-eaea-4149-85c0-61888bac0737/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/domains/test-domain-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.domains + .delete(DeleteDomainRequest.builder().domainId("test-domain-id").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/domains/test-domain-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/domains/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.domains + .delete( + DeleteDomainRequest.builder() + .async(true) + .domainId("test-domain-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteDomainResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/domains/test-domain-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/domains/GET_{id}_response.json") + .build()) + .build()); + + this.domains + .get(GetDomainRequest.builder().domainId("test-domain-id").build()) + .as(StepVerifier::create) + .expectNext( + GetDomainResponse.builder() + .metadata( + Metadata.builder() + .id("7cd249aa-197c-425c-8831-57cbc24e8e26") + .url( + "/v2/domains/7cd249aa-197c-425c-8831-57cbc24e8e26") + .createdAt("2015-07-27T22:43:33Z") + .build()) + .entity( + DomainEntity.builder() + .name("domain-63.example.com") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDomains() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/domains?page=-1").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/domains/GET_response.json") + .build()) + .build()); + + this.domains + .list(ListDomainsRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListDomainsResponse.builder() + .totalResults(4) + .totalPages(1) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "c8e670ff-2473-4e21-8047-afc6e0c62ce7") + .url( + "/v2/domains/c8e670ff-2473-4e21-8047-afc6e0c62ce7") + .createdAt("2015-07-27T22:43:31Z") + .build()) + .entity( + DomainEntity.builder() + .name("customer-app-domain1.com") + .build()) + .build()) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "2b63d3fa-52e9-4f12-87d1-a96af5bd3cd4") + .url( + "/v2/domains/2b63d3fa-52e9-4f12-87d1-a96af5bd3cd4") + .createdAt("2015-07-27T22:43:31Z") + .build()) + .entity( + DomainEntity.builder() + .name("customer-app-domain2.com") + .build()) + .build()) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "2c60a78c-0f6e-4ef8-81db-f3a6cb5e31da") + .url( + "/v2/domains/2c60a78c-0f6e-4ef8-81db-f3a6cb5e31da") + .createdAt("2015-07-27T22:43:31Z") + .build()) + .entity( + DomainEntity.builder() + .name("vcap.me") + .owningOrganizationId( + "f93d5a41-5d35-4e21-ac32-421dfd545d3c") + .owningOrganizationUrl( + "/v2/organizations/f93d5a41-5d35-4e21-ac32-421dfd545d3c") + .spacesUrl( + "/v2/domains/2c60a78c-0f6e-4ef8-81db-f3a6cb5e31da/spaces") + .build()) + .build()) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "b37aab98-5882-420a-a91f-65539e36e860") + .url( + "/v2/domains/b37aab98-5882-420a-a91f-65539e36e860") + .createdAt("2015-07-27T22:43:33Z") + .build()) + .entity( + DomainEntity.builder() + .name("domain-62.example.com") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/domains/test-domain-id/spaces?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/domains/GET_{id}_spaces_response.json") + .build()) + .build()); + + this.domains + .listSpaces( + ListDomainSpacesRequest.builder() + .domainId("test-domain-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListDomainSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .id( + "d1686ef7-59dc-4ada-8900-85e89d749046") + .url( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046") + .createdAt("2015-07-27T22:43:33Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-2311") + .organizationId( + "836b112a-30bc-4d55-b8e4-7323849759d1") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/836b112a-30bc-4d55-b8e4-7323849759d1") + .developersUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/developers") + .managersUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/managers") + .auditorsUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/auditors") + .applicationsUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/apps") + .routesUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/routes") + .domainsUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/domains") + .serviceInstancesUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/service_instances") + .applicationEventsUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/app_events") + .eventsUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/events") + .securityGroupsUrl( + "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/environmentvariablegroups/ReactorEnvironmentVariableGroupsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/environmentvariablegroups/ReactorEnvironmentVariableGroupsTest.java new file mode 100644 index 00000000000..884af0f5b97 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/environmentvariablegroups/ReactorEnvironmentVariableGroupsTest.java @@ -0,0 +1,241 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.environmentvariablegroups; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetRunningEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetRunningEnvironmentVariablesResponse; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetStagingEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.GetStagingEnvironmentVariablesResponse; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateRunningEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateRunningEnvironmentVariablesResponse; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateStagingEnvironmentVariablesRequest; +import org.cloudfoundry.client.v2.environmentvariablegroups.UpdateStagingEnvironmentVariablesResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorEnvironmentVariableGroupsTest extends AbstractClientApiTest { + + private ReactorEnvironmentVariableGroups environmentVariableGroups = + new ReactorEnvironmentVariableGroups( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void getRunningEnvironmentVariables() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/environment_variable_groups/running") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/environment_variable_groups/GET_running_response.json") + .build()) + .build()); + + this.environmentVariableGroups + .getRunningEnvironmentVariables( + GetRunningEnvironmentVariablesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + GetRunningEnvironmentVariablesResponse.builder() + .environmentVariable("abc", 123) + .environmentVariable("do-re-me", "far-so-la-tee") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getStagingEnvironmentVariables() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/environment_variable_groups/staging") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/environment_variable_groups/GET_staging_response.json") + .build()) + .build()); + + this.environmentVariableGroups + .getStagingEnvironmentVariables( + GetStagingEnvironmentVariablesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + GetStagingEnvironmentVariablesResponse.builder() + .environmentVariable("abc", 123) + .environmentVariable("do-re-me", "far-so-la-tee") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateRunningEnvironmentVariables() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/config/environment_variable_groups/running") + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_running_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_running_response.json") + .build()) + .build()); + + this.environmentVariableGroups + .updateRunningEnvironmentVariables( + UpdateRunningEnvironmentVariablesRequest.builder() + .environmentVariable("abc", 123) + .environmentVariable("do-re-me", "fa-so-la-tee") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateRunningEnvironmentVariablesResponse.builder() + .environmentVariable("abc", 123) + .environmentVariable("do-re-me", "fa-so-la-tee") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateRunningEnvironmentVariablesEmpty() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/config/environment_variable_groups/running") + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_running_request_empty.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_running_response_empty.json") + .build()) + .build()); + + this.environmentVariableGroups + .updateRunningEnvironmentVariables( + UpdateRunningEnvironmentVariablesRequest.builder() + .environmentVariables(Collections.emptyMap()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateRunningEnvironmentVariablesResponse.builder() + .environmentVariables(Collections.emptyMap()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateStagingEnvironmentVariables() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/config/environment_variable_groups/staging") + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_staging_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_staging_response.json") + .build()) + .build()); + + this.environmentVariableGroups + .updateStagingEnvironmentVariables( + UpdateStagingEnvironmentVariablesRequest.builder() + .environmentVariable("abc", 123) + .environmentVariable("do-re-me", "far-so-la-tee") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateStagingEnvironmentVariablesResponse.builder() + .environmentVariable("abc", 123) + .environmentVariable("do-re-me", "far-so-la-tee") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateStagingEnvironmentVariablesEmpty() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/config/environment_variable_groups/staging") + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_staging_request_empty.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/environment_variable_groups/PUT_staging_response_empty.json") + .build()) + .build()); + + this.environmentVariableGroups + .updateStagingEnvironmentVariables( + UpdateStagingEnvironmentVariablesRequest.builder() + .environmentVariables(Collections.emptyMap()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateStagingEnvironmentVariablesResponse.builder() + .environmentVariables(Collections.emptyMap()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/events/ReactorEventsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/events/ReactorEventsTest.java new file mode 100644 index 00000000000..6d8fc5cb270 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/events/ReactorEventsTest.java @@ -0,0 +1,206 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.events; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.events.EventEntity; +import org.cloudfoundry.client.v2.events.EventResource; +import org.cloudfoundry.client.v2.events.GetEventRequest; +import org.cloudfoundry.client.v2.events.GetEventResponse; +import org.cloudfoundry.client.v2.events.ListEventsRequest; +import org.cloudfoundry.client.v2.events.ListEventsResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorEventsTest extends AbstractClientApiTest { + + private final ReactorEvents events = + new ReactorEvents( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/events/test-event-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/events/GET_{id}_response.json") + .build()) + .build()); + + this.events + .get(GetEventRequest.builder().eventId("test-event-id").build()) + .as(StepVerifier::create) + .expectNext( + GetEventResponse.builder() + .metadata( + Metadata.builder() + .id("8f1366e5-1fe2-418c-ae33-38bf29ad857a") + .url( + "/v2/events/8f1366e5-1fe2-418c-ae33-38bf29ad857a") + .createdAt("2015-07-27T22:43:23Z") + .build()) + .entity( + EventEntity.builder() + .type("name-1010") + .actor("guid-a01d98f8-ba9a-40b0-86ba-3deacc2978c2") + .actorType("name-1011") + .actorName("name-1012") + .actee("guid-ff2c9780-b8db-4276-ba5f-b06adb724873") + .acteeType("name-1013") + .acteeName("name-1014") + .timestamp("2015-07-27T22:43:23Z") + .metadatas(Collections.emptyMap()) + .spaceId("dcb0dcdd-5236-4af3-abc2-1ab0ff424794") + .organizationId( + "3317f885-4670-4249-9861-7c75d851d492") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/events?q=actee%3Atest-actee&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/events/GET_response.json") + .build()) + .build()); + + this.events + .list(ListEventsRequest.builder().actee("test-actee").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListEventsResponse.builder() + .totalResults(3) + .totalPages(1) + .resource( + EventResource.builder() + .metadata( + Metadata.builder() + .id( + "2cc565c7-18e7-4fff-8fb0-52525f09ee6b") + .url( + "/v2/events/2cc565c7-18e7-4fff-8fb0-52525f09ee6b") + .createdAt("2015-07-27T22:43:23Z") + .build()) + .entity( + EventEntity.builder() + .type("name-1034") + .actor( + "guid-ddc7f725-c67f-4e68-8118-1ae1687f9fff") + .actorType("name-1035") + .actorName("name-1036") + .actee( + "guid-16ac41e9-c30c-45e1-b51c-226fb37e4197") + .acteeType("name-1037") + .acteeName("name-1038") + .timestamp("2015-07-27T22:43:23Z") + .metadatas(Collections.emptyMap()) + .spaceId( + "1a769af6-8ddb-4508-a35a-cc61c51fdcdf") + .organizationId( + "49723c2a-a11e-43f8-971a-b34e9134ce00") + .build()) + .build()) + .resource( + EventResource.builder() + .metadata( + Metadata.builder() + .id( + "a82493b7-bd16-421b-aef0-d0b5c40869e8") + .url( + "/v2/events/a82493b7-bd16-421b-aef0-d0b5c40869e8") + .createdAt("2015-07-27T22:43:23Z") + .build()) + .entity( + EventEntity.builder() + .type("name-1042") + .actor( + "guid-e68c8d10-dc83-4466-8735-9c4201166af9") + .actorType("name-1043") + .actorName("name-1044") + .actee( + "guid-d3ecb6be-c8a0-4e3b-9838-b78c58a88b65") + .acteeType("name-1045") + .acteeName("name-1046") + .timestamp("2015-07-27T22:43:23Z") + .metadatas(Collections.emptyMap()) + .spaceId( + "dbe6bbdc-0d9c-495c-abbb-0b5eb93c8494") + .organizationId( + "52c7fb45-e31b-4271-9f16-8c94df30d8c7") + .build()) + .build()) + .resource( + EventResource.builder() + .metadata( + Metadata.builder() + .id( + "4a0e6a34-2807-44cd-a5cc-b61890662ade") + .url( + "/v2/events/4a0e6a34-2807-44cd-a5cc-b61890662ade") + .createdAt("2015-07-27T22:43:23Z") + .build()) + .entity( + EventEntity.builder() + .type("name-1050") + .actor( + "guid-69e5e7e7-7723-4af8-a7cb-255d9a90c8db") + .actorType("name-1051") + .actorName("name-1052") + .actee( + "guid-cc1f17ce-85ab-4cc2-988b-9fca0f3a1d03") + .acteeType("name-1053") + .acteeName("name-1054") + .timestamp("2015-07-27T22:43:23Z") + .metadatas(Collections.emptyMap()) + .spaceId( + "38a2f075-fe19-4edc-8787-5571f2af7051") + .organizationId( + "9160433e-860d-4251-bd6d-140187a2c5db") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/featureflags/ReactorFeatureFlagsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/featureflags/ReactorFeatureFlagsTest.java new file mode 100644 index 00000000000..3c5631e6b74 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/featureflags/ReactorFeatureFlagsTest.java @@ -0,0 +1,246 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.featureflags; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.featureflags.FeatureFlagEntity; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagResponse; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsRequest; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsResponse; +import org.cloudfoundry.client.v2.featureflags.SetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.SetFeatureFlagResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorFeatureFlagsTest extends AbstractClientApiTest { + + private final ReactorFeatureFlags featureFlags = + new ReactorFeatureFlags( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void getAppScaling() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/feature_flags/app_scaling") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/feature_flags/GET_app_scaling_flag_response.json") + .build()) + .build()); + + this.featureFlags + .get(GetFeatureFlagRequest.builder().name("app_scaling").build()) + .as(StepVerifier::create) + .expectNext( + GetFeatureFlagResponse.builder() + .name("app_scaling") + .enabled(true) + .url("/v2/config/feature_flags/app_scaling") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getUserRoles() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/feature_flags/set_roles_by_username") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/feature_flags/GET_set_user_roles_flag_response.json") + .build()) + .build()); + + this.featureFlags + .get(GetFeatureFlagRequest.builder().name("set_roles_by_username").build()) + .as(StepVerifier::create) + .expectNext( + GetFeatureFlagResponse.builder() + .name("set_roles_by_username") + .enabled(true) + .url("/v2/config/feature_flags/set_roles_by_username") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/feature_flags") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/feature_flags/GET_response.json") + .build()) + .build()); + + this.featureFlags + .list(ListFeatureFlagsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListFeatureFlagsResponse.builder() + .featureFlag( + FeatureFlagEntity.builder() + .name("user_org_creation") + .enabled(false) + .url("/v2/config/feature_flags/user_org_creation") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("private_domain_creation") + .enabled(false) + .errorMessage("foobar") + .url( + "/v2/config/feature_flags/private_domain_creation") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("app_bits_upload") + .enabled(true) + .url("/v2/config/feature_flags/app_bits_upload") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("app_scaling") + .enabled(true) + .url("/v2/config/feature_flags/app_scaling") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("route_creation") + .enabled(true) + .url("/v2/config/feature_flags/route_creation") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("service_instance_creation") + .enabled(true) + .url( + "/v2/config/feature_flags/service_instance_creation") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("diego_docker") + .enabled(false) + .url("/v2/config/feature_flags/diego_docker") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("set_roles_by_username") + .enabled(true) + .url( + "/v2/config/feature_flags/set_roles_by_username") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("unset_roles_by_username") + .enabled(true) + .url( + "/v2/config/feature_flags/unset_roles_by_username") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("task_creation") + .enabled(false) + .url("/v2/config/feature_flags/task_creation") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("space_scoped_private_broker_creation") + .enabled(true) + .url( + "/v2/config/feature_flags/space_scoped_private_broker_creation") + .build()) + .featureFlag( + FeatureFlagEntity.builder() + .name("space_developer_env_var_visibility") + .enabled(true) + .url( + "/v2/config/feature_flags/space_developer_env_var_visibility") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void set() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/config/feature_flags/user_org_creation") + .payload( + "fixtures/client/v2/feature_flags/PUT_user_org_creation_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/feature_flags/PUT_user_org_creation_response.json") + .build()) + .build()); + + this.featureFlags + .set( + SetFeatureFlagRequest.builder() + .enabled(true) + .name("user_org_creation") + .build()) + .as(StepVerifier::create) + .expectNext( + SetFeatureFlagResponse.builder() + .name("user_org_creation") + .enabled(true) + .url("/v2/config/feature_flags/user_org_creation") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/info/ReactorInfoTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/info/ReactorInfoTest.java new file mode 100644 index 00000000000..d2efab96204 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/info/ReactorInfoTest.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.info; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.info.GetInfoRequest; +import org.cloudfoundry.client.v2.info.GetInfoResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorInfoTest extends AbstractClientApiTest { + + private final ReactorInfo info = + new ReactorInfo(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/info/GET_response.json") + .build()) + .build()); + + this.info + .get(GetInfoRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + GetInfoResponse.builder() + .name("vcap") + .buildNumber("2222") + .support("http://support.cloudfoundry.com") + .version(2) + .description("Cloud Foundry sponsored by Pivotal") + .authorizationEndpoint("http://localhost:8080/uaa") + .tokenEndpoint("http://localhost:8080/uaa") + .apiVersion("2.44.0") + .applicationSshEndpoint("ssh.system.domain.example.com:2222") + .applicationSshHostKeyFingerprint( + "47:0d:d1:c8:c3:3d:0a:36:d1:49:2f:f2:90:27:31:d0") + .routingEndpoint("http://localhost:3000") + .loggingEndpoint("ws://loggregator.vcap.me:80") + .dopplerLoggingEndpoint("ws://doppler.vcap.me:80") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/jobs/ReactorJobsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/jobs/ReactorJobsTest.java new file mode 100644 index 00000000000..864332304d4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/jobs/ReactorJobsTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.jobs; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorJobsTest extends AbstractClientApiTest { + + private final ReactorJobs jobs = + new ReactorJobs(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder().method(GET).path("/jobs/test-job-id").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/jobs/GET_{id}_response.json") + .build()) + .build()); + + this.jobs + .get(GetJobRequest.builder().jobId("test-job-id").build()) + .as(StepVerifier::create) + .expectNext( + GetJobResponse.builder() + .metadata( + Metadata.builder() + .id("e86ffe00-a243-48f7-be05-8f1f41bee864") + .createdAt("2015-11-30T23:38:44Z") + .url( + "/v2/jobs/e86ffe00-a243-48f7-be05-8f1f41bee864") + .build()) + .entity( + JobEntity.builder() + .id("e86ffe00-a243-48f7-be05-8f1f41bee864") + .status("failed") + .error( + "Use of entity>error is deprecated in favor" + + " of entity>error_details.") + .errorDetails( + ErrorDetails.builder() + .errorCode("UnknownError") + .description( + "An unknown error" + + " occurred.") + .code(10001) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsTest.java new file mode 100644 index 00000000000..de8dfe9a830 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/organizationquotadefinitions/ReactorOrganizationQuotaDefinitionsTest.java @@ -0,0 +1,302 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.organizationquotadefinitions; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorOrganizationQuotaDefinitionsTest extends AbstractClientApiTest { + + private final ReactorOrganizationQuotaDefinitions quotaDefinitions = + new ReactorOrganizationQuotaDefinitions( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @SuppressWarnings("deprecation") + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/quota_definitions") + .payload( + "fixtures/client/v2/quota_definitions/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/quota_definitions/POST_response.json") + .build()) + .build()); + + this.quotaDefinitions + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(10) + .applicationTaskLimit(5) + .instanceMemoryLimit(10240) + .memoryLimit(5120) + .name("gold_quota") + .nonBasicServicesAllowed(true) + .totalReservedRoutePorts(3) + .totalRoutes(4) + .totalServices(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateOrganizationQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:39Z") + .id("0a3df5cb-122e-4849-a6b1-abb70d1b1296") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/quota_definitions/0a3df5cb-122e-4849-a6b1-abb70d1b1296") + .build()) + .entity( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(10) + .applicationTaskLimit(5) + .instanceMemoryLimit(10240) + .memoryLimit(5120) + .name("gold_quota") + .nonBasicServicesAllowed(true) + .totalPrivateDomains(-1) + .totalReservedRoutePorts(3) + .totalRoutes(4) + .totalServiceKeys(-1) + .totalServices(-1) + .trialDatabaseAllowed(false) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/quota_definitions/test-quota-definition-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.quotaDefinitions + .delete( + DeleteOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId("test-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/quota_definitions/test-quota-definition-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/quota_definitions/GET_{id}_response.json") + .build()) + .build()); + + this.quotaDefinitions + .get( + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId("test-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .id("c1b8a422-e2b2-4e28-8a16-90ebef2a6922") + .url( + "/v2/quota_definitions/c1b8a422-e2b2-4e28-8a16-90ebef2a6922") + .createdAt("2016-01-26T22:20:36Z") + .build()) + .entity( + OrganizationQuotaDefinitionEntity.builder() + .name("name-2527") + .nonBasicServicesAllowed(true) + .totalServices(60) + .totalRoutes(1000) + .totalPrivateDomains(-1) + .memoryLimit(20480) + .trialDatabaseAllowed(false) + .instanceMemoryLimit(-1) + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .totalServiceKeys(-1) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/quota_definitions?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/quota_definitions/GET_response.json") + .build()) + .build()); + + this.quotaDefinitions + .list(ListOrganizationQuotaDefinitionsRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationQuotaDefinitionsResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + OrganizationQuotaDefinitionResource.builder() + .metadata( + Metadata.builder() + .id( + "9a76e262-9dc1-4316-87ad-a8b3bfbb11d4") + .url( + "/v2/quota_definitions/9a76e262-9dc1-4316-87ad-a8b3bfbb11d4") + .createdAt("2016-01-26T22:20:04Z") + .build()) + .entity( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .instanceMemoryLimit(-1) + .memoryLimit(10240) + .name("default") + .nonBasicServicesAllowed(true) + .totalPrivateDomains(-1) + .totalRoutes(1000) + .totalServices(100) + .trialDatabaseAllowed(false) + .applicationTaskLimit(-1) + .totalServiceKeys(-1) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/quota_definitions/test-quota-definition-id") + .payload( + "fixtures/client/v2/quota_definitions/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/quota_definitions/PUT_{id}_response.json") + .build()) + .build()); + + this.quotaDefinitions + .update( + UpdateOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId("test-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateOrganizationQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:39Z") + .id("213b27a0-c937-4074-aade-bba2226980aa") + .updatedAt("2016-06-08T16:41:39Z") + .url( + "/v2/quota_definitions/213b27a0-c937-4074-aade-bba2226980aa") + .build()) + .entity( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .instanceMemoryLimit(-1) + .memoryLimit(20480) + .name("name-1998") + .nonBasicServicesAllowed(true) + .totalPrivateDomains(-1) + .totalReservedRoutePorts(5) + .totalRoutes(1000) + .totalServiceKeys(-1) + .totalServices(60) + .trialDatabaseAllowed(false) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/organizations/ReactorOrganizationsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/organizations/ReactorOrganizationsTest.java new file mode 100644 index 00000000000..6e7cf62af82 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/organizations/ReactorOrganizationsTest.java @@ -0,0 +1,2055 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.organizations; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.domains.DomainEntity; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationInstanceUsageRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationInstanceUsageResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationMemoryUsageRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationMemoryUsageResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationUserRolesRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationUserRolesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationServicesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationServicesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationUsersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationUsersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.OrganizationSpaceSummary; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.SummaryOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.SummaryOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.UserOrganizationRoleEntity; +import org.cloudfoundry.client.v2.organizations.UserOrganizationRoleResource; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainEntity; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.services.ServiceEntity; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.users.UserEntity; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorOrganizationsTest extends AbstractClientApiTest { + + private final ReactorOrganizations organizations = + new ReactorOrganizations( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateOrganizationAuditor() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/organizations/test-organization-id/auditors/uaa-id-71") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_auditors_{auditor-id}_response.json") + .build()) + .build()); + + this.organizations + .associateAuditor( + AssociateOrganizationAuditorRequest.builder() + .auditorId("uaa-id-71") + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationAuditorResponse.builder() + .metadata( + Metadata.builder() + .id("83c4fac5-cd9e-41ee-96df-b4f50fff4aef") + .url( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-187") + .billingEnabled(false) + .quotaDefinitionId( + "1d18a00b-4e36-412b-9308-2f5f2402e880") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/1d18a00b-4e36-412b-9308-2f5f2402e880") + .spacesUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/spaces") + .domainsUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/domains") + .privateDomainsUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/private_domains") + .usersUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/users") + .managersUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/managers") + .billingManagersUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/billing_managers") + .auditorsUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/auditors") + .applicationEventsUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationAuditorByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/organizations/test-organization-id/auditors") + .payload( + "fixtures/client/v2/organizations/PUT_{id}_auditors_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_auditors_response.json") + .build()) + .build()); + + this.organizations + .associateAuditorByUsername( + AssociateOrganizationAuditorByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationAuditorByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("50dfb04d-cd49-477d-a54c-32e00e180022") + .url( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022") + .createdAt("2015-11-30T23:38:58Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-2476") + .billingEnabled(false) + .quotaDefinitionId( + "8de0754e-bb1e-4739-be6e-91104bbab281") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/8de0754e-bb1e-4739-be6e-91104bbab281") + .spacesUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/spaces") + .domainsUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/domains") + .privateDomainsUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/private_domains") + .usersUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/users") + .managersUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/managers") + .billingManagersUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/billing_managers") + .auditorsUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/auditors") + .applicationEventsUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationBillingManager() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/organizations/test-organization-id/billing_managers/test-billing-manager-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_billing_managers_{billing-manager-id}_response.json") + .build()) + .build()); + + this.organizations + .associateBillingManager( + AssociateOrganizationBillingManagerRequest.builder() + .billingManagerId("test-billing-manager-id") + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationBillingManagerResponse.builder() + .entity( + OrganizationEntity.builder() + .applicationEventsUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/app_events") + .auditorsUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/auditors") + .billingEnabled(false) + .billingManagersUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/billing_managers") + .domainsUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/domains") + .managersUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/managers") + .name("name-200") + .privateDomainsUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/private_domains") + .quotaDefinitionId( + "ab51f0d8-1920-4bfc-9401-cd0e978e8c5e") + .quotaDefinitionUrl( + "/v2/quota_definitions/ab51f0d8-1920-4bfc-9401-cd0e978e8c5e") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/space_quota_definitions") + .spacesUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/spaces") + .status("active") + .usersUrl( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/users") + .build()) + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:10Z") + .id("39ab104d-79f9-4bac-82e0-35b826a236b8") + .url( + "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationBillingManagerByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/organizations/test-organization-id/billing_managers") + .payload( + "fixtures/client/v2/organizations/PUT_{id}_billing_managers_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_billing_managers_response.json") + .build()) + .build()); + + this.organizations + .associateBillingManagerByUsername( + AssociateOrganizationBillingManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationBillingManagerByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("c8d4f13c-8880-4859-8e03-fc690efd8f48") + .url( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48") + .createdAt("2015-11-30T23:38:58Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-2470") + .billingEnabled(false) + .quotaDefinitionId( + "4ad7378e-e90a-4714-b906-a451dd0d5507") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/4ad7378e-e90a-4714-b906-a451dd0d5507") + .spacesUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/spaces") + .domainsUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/domains") + .privateDomainsUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/private_domains") + .usersUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/users") + .managersUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/managers") + .billingManagersUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/billing_managers") + .auditorsUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/auditors") + .applicationEventsUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationManager() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/organizations/test-organization-id/managers/test-manager-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_managers_{manager-id}_response.json") + .build()) + .build()); + + this.organizations + .associateManager( + AssociateOrganizationManagerRequest.builder() + .organizationId("test-organization-id") + .managerId("test-manager-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationManagerResponse.builder() + .metadata( + Metadata.builder() + .id("cc7c5224-f973-4358-a95a-dd72decbb20f") + .url( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-218") + .billingEnabled(false) + .quotaDefinitionId( + "57f59bb7-7581-4257-9502-cbd60bb92d99") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/57f59bb7-7581-4257-9502-cbd60bb92d99") + .spacesUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/spaces") + .domainsUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/domains") + .privateDomainsUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/private_domains") + .usersUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/users") + .managersUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/managers") + .billingManagersUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/billing_managers") + .auditorsUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/auditors") + .applicationEventsUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationManagerByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/organizations/test-organization-id/managers") + .payload( + "fixtures/client/v2/organizations/PUT_{id}_managers_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_managers_response.json") + .build()) + .build()); + + this.organizations + .associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationManagerByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("8d2238e2-2fb3-4ede-b188-1fd3a533c4b4") + .url( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4") + .createdAt("2015-11-30T23:38:59Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-2523") + .billingEnabled(false) + .quotaDefinitionId( + "0e36ae22-a752-4e37-9dbf-0bac5c1b93c1") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/0e36ae22-a752-4e37-9dbf-0bac5c1b93c1") + .spacesUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/spaces") + .domainsUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/domains") + .privateDomainsUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/private_domains") + .usersUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/users") + .managersUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/managers") + .billingManagersUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/billing_managers") + .auditorsUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/auditors") + .applicationEventsUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationUser() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/organizations/test-organization-id/users/test-user-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_users_{user-id}_response.json") + .build()) + .build()); + + this.organizations + .associateUser( + AssociateOrganizationUserRequest.builder() + .organizationId("test-organization-id") + .userId("test-user-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationUserResponse.builder() + .metadata( + Metadata.builder() + .id("584664d0-e5bb-449b-bfe5-0136c30c4ff8") + .url( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8") + .createdAt("2015-07-27T22:43:11Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-234") + .billingEnabled(false) + .quotaDefinitionId( + "51a2f10b-9803-4f35-ad69-0350ff4b66d4") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/51a2f10b-9803-4f35-ad69-0350ff4b66d4") + .spacesUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/spaces") + .domainsUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/domains") + .privateDomainsUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/private_domains") + .usersUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/users") + .managersUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/managers") + .billingManagersUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/billing_managers") + .auditorsUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/auditors") + .applicationEventsUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganizationUserByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/organizations/test-organization-id/users") + .payload( + "fixtures/client/v2/organizations/PUT_{id}_users_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_users_response.json") + .build()) + .build()); + + this.organizations + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationUserByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("1a93417a-811a-46c7-85fa-4a0507c53f08") + .url( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08") + .createdAt("2015-11-30T23:38:59Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-2510") + .billingEnabled(false) + .quotaDefinitionId( + "4df84394-d265-4b78-a679-c31bb2e5379c") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/4df84394-d265-4b78-a679-c31bb2e5379c") + .spacesUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/spaces") + .domainsUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/domains") + .privateDomainsUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/private_domains") + .usersUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/users") + .managersUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/managers") + .billingManagersUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/billing_managers") + .auditorsUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/auditors") + .applicationEventsUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associatePrivateDomain() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/organizations/test-organization-id/private_domains/test-private-domain-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_private_domains_{private-domain-id}_response.json") + .build()) + .build()); + + this.organizations + .associatePrivateDomain( + AssociateOrganizationPrivateDomainRequest.builder() + .organizationId("test-organization-id") + .privateDomainId("test-private-domain-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateOrganizationPrivateDomainResponse.builder() + .entity( + OrganizationEntity.builder() + .name("name-228") + .billingEnabled(false) + .quotaDefinitionId( + "855b0cb8-5c58-4ebc-8189-6582c37060e6") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/855b0cb8-5c58-4ebc-8189-6582c37060e6") + .spacesUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/spaces") + .domainsUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/domains") + .privateDomainsUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/private_domains") + .usersUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/users") + .managersUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/managers") + .billingManagersUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/billing_managers") + .auditorsUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/auditors") + .applicationEventsUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/space_quota_definitions") + .build()) + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:10Z") + .id("676f9ff8-8c35-49ed-8ebf-fdf3db34cde7") + .url( + "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/organizations") + .payload( + "fixtures/client/v2/organizations/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/POST_response.json") + .build()) + .build()); + + this.organizations + .create( + CreateOrganizationRequest.builder() + .name("my-org-name") + .quotaDefinitionId("ffc919cd-3e21-43a6-9e4e-62802d149cdb") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateOrganizationResponse.builder() + .metadata( + Metadata.builder() + .id("137bfc86-5a2f-4759-9c0c-59ef614cd0be") + .url( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be") + .createdAt("2015-07-27T22:43:11Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("my-org-name") + .billingEnabled(false) + .quotaDefinitionId( + "ffc919cd-3e21-43a6-9e4e-62802d149cdb") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/ffc919cd-3e21-43a6-9e4e-62802d149cdb") + .spacesUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/spaces") + .domainsUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/domains") + .privateDomainsUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/private_domains") + .usersUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/users") + .managersUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/managers") + .billingManagersUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/billing_managers") + .auditorsUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/auditors") + .applicationEventsUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organizations/test-organization-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .delete( + DeleteOrganizationRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organizations/test-organization-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/organizations/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.organizations + .delete( + DeleteOrganizationRequest.builder() + .async(true) + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteOrganizationResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_response.json") + .build()) + .build()); + + this.organizations + .get( + GetOrganizationRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationResponse.builder() + .metadata( + Metadata.builder() + .id("027616f3-66c4-412c-8214-7e43db2d587b") + .url( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b") + .createdAt("2015-07-27T22:43:11Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-240") + .billingEnabled(false) + .quotaDefinitionId( + "f3f0b830-d50a-4265-b8f8-3c430aa0313b") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/f3f0b830-d50a-4265-b8f8-3c430aa0313b") + .spacesUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/spaces") + .domainsUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/domains") + .privateDomainsUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/private_domains") + .usersUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/users") + .managersUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/managers") + .billingManagersUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/billing_managers") + .auditorsUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/auditors") + .applicationEventsUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getInstanceUsage() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/instance_usage") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_instance_usage_response.json") + .build()) + .build()); + + this.organizations + .getInstanceUsage( + GetOrganizationInstanceUsageRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext(GetOrganizationInstanceUsageResponse.builder().instanceUsage(3).build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getMemoryUsage() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/memory_usage") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_memory_usage_response.json") + .build()) + .build()); + + this.organizations + .getMemoryUsage( + GetOrganizationMemoryUsageRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext(GetOrganizationMemoryUsageResponse.builder().memoryUsageInMb(0).build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getUserRoles() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/user_roles?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_user_roles_response.json") + .build()) + .build()); + + this.organizations + .getUserRoles( + GetOrganizationUserRolesRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationUserRolesResponse.builder() + .totalResults(2) + .totalPages(2) + .nextUrl( + "/v2/organizations/6fd1790e-0785-41ec-aff0-99915ce000c1/user_roles?order-direction=asc&page=2&results-per-page=1") + .resource( + UserOrganizationRoleResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-92") + .url("/v2/users/uaa-id-92") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + UserOrganizationRoleEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("everything@example.com") + .organizationRole("org_user") + .organizationRole("org_manager") + .organizationRole("org_auditor") + .organizationRole("billing_manager") + .spacesUrl( + "/v2/users/uaa-id-92/spaces") + .organizationsUrl( + "/v2/users/uaa-id-92/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-92/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-92/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-92/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-92/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-92/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_response.json") + .build()) + .build()); + + this.organizations + .list(ListOrganizationsRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + OrganizationResource.builder() + .metadata( + Metadata.builder() + .id( + "deb3c359-2261-45ba-b34f-ee7487acd71a") + .url( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a") + .createdAt("2015-07-27T22:43:05Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("the-system_domain-org-name") + .billingEnabled(false) + .quotaDefinitionId( + "9b56a1ec-4981-4a1e-9348-0d78eeca842c") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/9b56a1ec-4981-4a1e-9348-0d78eeca842c") + .spacesUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/spaces") + .domainsUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/domains") + .privateDomainsUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/private_domains") + .usersUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/users") + .managersUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/managers") + .billingManagersUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/billing_managers") + .auditorsUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/auditors") + .applicationEventsUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/space_quota_definitions") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listAuditors() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/auditors?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_auditors_response.json") + .build()) + .build()); + + this.organizations + .listAuditors( + ListOrganizationAuditorsRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationAuditorsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-73") + .url("/v2/users/uaa-id-73") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("auditor@example.com") + .spacesUrl( + "/v2/users/uaa-id-73/spaces") + .organizationsUrl( + "/v2/users/uaa-id-73/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-73/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-73/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-73/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-73/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-73/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listBillingManagers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/billing_managers?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_billing_managers_response.json") + .build()) + .build()); + + this.organizations + .listBillingManagers( + ListOrganizationBillingManagersRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationBillingManagersResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-84") + .url("/v2/users/uaa-id-84") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username( + "billing_manager@example.com") + .spacesUrl( + "/v2/users/uaa-id-84/spaces") + .organizationsUrl( + "/v2/users/uaa-id-84/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-84/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-84/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-84/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-84/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-84/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDomains() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/domains?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_domains_response.json") + .build()) + .build()); + + this.organizations + .listDomains( + ListOrganizationDomainsRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationDomainsResponse.builder() + .totalResults(2) + .totalPages(1) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "0010dd3b-aca0-4647-87d3-679059d67600") + .url( + "/v2/domains/0010dd3b-aca0-4647-87d3-679059d67600") + .createdAt("2016-01-26T22:20:04Z") + .build()) + .entity( + DomainEntity.builder() + .name("customer-app-domain1.com") + .build()) + .build()) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "e366a4ce-73d2-4a5a-8194-04c8ff4adfe1") + .url( + "/v2/domains/e366a4ce-73d2-4a5a-8194-04c8ff4adfe1") + .createdAt("2016-01-26T22:20:04Z") + .build()) + .entity( + DomainEntity.builder() + .name("customer-app-domain2.com") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listManagers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/managers?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_managers_response.json") + .build()) + .build()); + + this.organizations + .listManagers( + ListOrganizationManagersRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationManagersResponse.builder() + .totalResults(2) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-99") + .url("/v2/users/uaa-id-99") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("manager@example.com") + .spacesUrl( + "/v2/users/uaa-id-99/spaces") + .organizationsUrl( + "/v2/users/uaa-id-99/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-99/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-99/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-99/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-99/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-99/audited_spaces") + .build()) + .build()) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-100") + .url("/v2/users/uaa-id-100") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .spacesUrl( + "/v2/users/uaa-id-100/spaces") + .organizationsUrl( + "/v2/users/uaa-id-100/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-100/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-100/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-100/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-100/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-100/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listPrivateDomains() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/private_domains?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_private_domains_response.json") + .build()) + .build()); + + this.organizations + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationPrivateDomainsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + PrivateDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "4625debe-c7ac-4d8e-84d2-448691c30ebc") + .url( + "/v2/private_domains/4625debe-c7ac-4d8e-84d2-448691c30ebc") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + PrivateDomainEntity.builder() + .name("domain-2.example.com") + .owningOrganizationId( + "09beeba3-f2ed-4e45-90f9-fc2119e02e9e") + .owningOrganizationUrl( + "/v2/organizations/09beeba3-f2ed-4e45-90f9-fc2119e02e9e") + .sharedOrganizationsUrl( + "/v2/private_domains/4625debe-c7ac-4d8e-84d2-448691c30ebc/shared_organizations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServices() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/services?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_services_response.json") + .build()) + .build()); + + this.organizations + .listServices( + ListOrganizationServicesRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationServicesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceResource.builder() + .metadata( + Metadata.builder() + .id( + "5529fa75-d2f3-426c-b864-4ae45c3622da") + .url( + "/v2/services/5529fa75-d2f3-426c-b864-4ae45c3622da") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + ServiceEntity.builder() + .label("label-16") + .description("desc-39") + .active(true) + .bindable(true) + .requires(Collections.emptyList()) + .uniqueId( + "4d4e8356-f753-433e-8514-88ee78c4e153") + .serviceBrokerId( + "bf5b5cf7-acac-426b-8e79-cc57a227cd3c") + .planUpdateable(false) + .servicePlansUrl( + "/v2/services/5529fa75-d2f3-426c-b864-4ae45c3622da/service_plans") + .tags(Collections.emptyList()) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaceQuotaDefinitions() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/space_quota_definitions?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_space_quota_definitions_response.json") + .build()) + .build()); + + this.organizations + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationSpaceQuotaDefinitionsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceQuotaDefinitionResource.builder() + .metadata( + Metadata.builder() + .id( + "d0bf6c52-a880-4c8f-b7d9-d9302a2ac6c9") + .url( + "/v2/space_quota_definitions/d0bf6c52-a880-4c8f-b7d9-d9302a2ac6c9") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + SpaceQuotaDefinitionEntity.builder() + .instanceMemoryLimit(-1) + .memoryLimit(20480) + .name("name-199") + .nonBasicServicesAllowed(true) + .organizationId( + "a163840f-5bd5-48a0-8736-1d837bda1353") + .organizationUrl( + "/v2/organizations/a163840f-5bd5-48a0-8736-1d837bda1353") + .spacesUrl( + "/v2/space_quota_definitions/d0bf6c52-a880-4c8f-b7d9-d9302a2ac6c9/spaces") + .totalRoutes(1000) + .totalServices(60) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/spaces?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_spaces_response.json") + .build()) + .build()); + + this.organizations + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .id( + "9f6ce6e0-e3db-42ae-9572-bbc38f4f541b") + .url( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b") + .createdAt("2015-07-27T22:43:10Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-215") + .organizationId( + "4df92169-5b8d-489b-ba0f-7114168aa476") + .spaceQuotaDefinitionId(null) + .allowSsh(true) + .organizationUrl( + "/v2/organizations/4df92169-5b8d-489b-ba0f-7114168aa476") + .developersUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/developers") + .managersUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/managers") + .auditorsUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/auditors") + .applicationsUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/apps") + .routesUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/routes") + .domainsUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/domains") + .serviceInstancesUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/service_instances") + .applicationEventsUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/app_events") + .eventsUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/events") + .securityGroupsUrl( + "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listUsers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/users?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_users_response.json") + .build()) + .build()); + + this.organizations + .listUsers( + ListOrganizationUsersRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationUsersResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-111") + .url("/v2/users/uaa-id-111") + .createdAt("2015-07-27T22:43:11Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("user@example.com") + .spacesUrl( + "/v2/users/uaa-id-111/spaces") + .organizationsUrl( + "/v2/users/uaa-id-111/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-111/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-111/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-111/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-111/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-111/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeAuditor() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/organizations/test-organization-id/auditors/test-auditor-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeAuditor( + RemoveOrganizationAuditorRequest.builder() + .auditorId("test-auditor-id") + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeAuditorByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organizations/test-organization-id/auditors") + .payload( + "fixtures/client/v2/organizations/DELETE_{id}_auditors_request.json") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeAuditorByUsername( + RemoveOrganizationAuditorByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("auditor@example.com") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeBillingManager() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/organizations/test-organization-id/billing_managers/test-billing-manager-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeBillingManager( + RemoveOrganizationBillingManagerRequest.builder() + .billingManagerId("test-billing-manager-id") + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeManager() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/organizations/test-organization-id/managers/test-manager-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeManager( + RemoveOrganizationManagerRequest.builder() + .organizationId("test-organization-id") + .managerId("test-manager-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeOrganizationBillingManagerByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/organizations/test-organization-id/billing_managers") + .payload( + "fixtures/client/v2/organizations/DELETE_{id}_billing_managers_request.json") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeBillingManagerByUsername( + RemoveOrganizationBillingManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("billing_manager@example.com") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeOrganizationManagerByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organizations/test-organization-id/managers") + .payload( + "fixtures/client/v2/organizations/DELETE_{id}_managers_request.json") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeManagerByUsername( + RemoveOrganizationManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("manage@example.com") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removePrivateDomain() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/organizations/test-organization-id/private_domains/test-private-domain-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removePrivateDomain( + RemoveOrganizationPrivateDomainRequest.builder() + .organizationId("test-organization-id") + .privateDomainId("test-private-domain-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeUser() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/organizations/test-organization-id/users/test-user-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeUser( + RemoveOrganizationUserRequest.builder() + .organizationId("test-organization-id") + .userId("test-user-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeUserByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organizations/test-organization-id/users") + .payload( + "fixtures/client/v2/organizations/DELETE_{id}_users_request.json") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.organizations + .removeUserByUsername( + RemoveOrganizationUserByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void summary() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/summary") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/GET_{id}_summary_response.json") + .build()) + .build()); + + this.organizations + .summary( + SummaryOrganizationRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + SummaryOrganizationResponse.builder() + .id("525a6450-9202-4ea1-beca-6fdda210710e") + .name("name-357") + .status("active") + .space( + OrganizationSpaceSummary.builder() + .id("dec1c7b0-8ea6-488a-9410-f73649d30228") + .name("name-359") + .serviceCount(0) + .applicationCount(0) + .memoryDevelopmentTotal(0) + .memoryProductionTotal(0) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/organizations/test-organization-id") + .payload( + "fixtures/client/v2/organizations/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/organizations/PUT_{id}_response.json") + .build()) + .build()); + + this.organizations + .update( + UpdateOrganizationRequest.builder() + .organizationId("test-organization-id") + .name("New Organization Name") + .quotaDefinitionId("7df44b58-1834-486f-aed8-d5d97126e603") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateOrganizationResponse.builder() + .metadata( + Metadata.builder() + .id("31a539be-dbfd-4db6-aec1-6565ebe975ed") + .url( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed") + .createdAt("2015-07-27T22:43:11Z") + .updatedAt("2015-07-27T22:43:11Z") + .build()) + .entity( + OrganizationEntity.builder() + .name("New Organization Name") + .billingEnabled(false) + .quotaDefinitionId( + "7df44b58-1834-486f-aed8-d5d97126e603") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/7df44b58-1834-486f-aed8-d5d97126e603") + .spacesUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/spaces") + .domainsUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/domains") + .privateDomainsUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/private_domains") + .usersUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/users") + .managersUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/managers") + .billingManagersUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/billing_managers") + .auditorsUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/auditors") + .applicationEventsUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/space_quota_definitions") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/privatedomains/ReactorPrivateDomainsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/privatedomains/ReactorPrivateDomainsTest.java new file mode 100644 index 00000000000..4e8cfafd2b6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/privatedomains/ReactorPrivateDomainsTest.java @@ -0,0 +1,341 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.privatedomains; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.GetPrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.GetPrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainSharedOrganizationsRequest; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainSharedOrganizationsResponse; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsRequest; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainEntity; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorPrivateDomainsTest extends AbstractClientApiTest { + + private final ReactorPrivateDomains privateDomains = + new ReactorPrivateDomains( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/private_domains") + .payload( + "fixtures/client/v2/private_domains/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/private_domains/POST_response.json") + .build()) + .build()); + + this.privateDomains + .create( + CreatePrivateDomainRequest.builder() + .name("exmaple.com") + .owningOrganizationId("22bb8ae1-6324-40eb-b077-bd1bfad773f8") + .build()) + .as(StepVerifier::create) + .expectNext( + CreatePrivateDomainResponse.builder() + .metadata( + Metadata.builder() + .id("4af3234e-813d-453f-b3ae-fcdecfd87a47") + .url( + "/v2/private_domains/4af3234e-813d-453f-b3ae-fcdecfd87a47") + .createdAt("2016-01-19T19:41:12Z") + .build()) + .entity( + PrivateDomainEntity.builder() + .name("exmaple.com") + .owningOrganizationId( + "22bb8ae1-6324-40eb-b077-bd1bfad773f8") + .owningOrganizationUrl( + "/v2/organizations/22bb8ae1-6324-40eb-b077-bd1bfad773f8") + .sharedOrganizationsUrl( + "/v2/private_domains/4af3234e-813d-453f-b3ae-fcdecfd87a47/shared_organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/private_domains/test-private-domain-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.privateDomains + .delete( + DeletePrivateDomainRequest.builder() + .privateDomainId("test-private-domain-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/private_domains/test-private-domain-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/private_domains/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.privateDomains + .delete( + DeletePrivateDomainRequest.builder() + .async(true) + .privateDomainId("test-private-domain-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeletePrivateDomainResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/private_domains/test-private-domain-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/private_domains/GET_{id}_response.json") + .build()) + .build()); + + this.privateDomains + .get( + GetPrivateDomainRequest.builder() + .privateDomainId("test-private-domain-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetPrivateDomainResponse.builder() + .metadata( + Metadata.builder() + .id("3de9db5f-8e3b-4d10-a8c9-8137caafe43d") + .url( + "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d") + .createdAt("2016-02-19T02:04:00Z") + .build()) + .entity( + PrivateDomainEntity.builder() + .name("my-domain.com") + .owningOrganizationId( + "2f70efed-abb2-4b7a-9f31-d4fe4d849932") + .owningOrganizationUrl( + "/v2/organizations/2f70efed-abb2-4b7a-9f31-d4fe4d849932") + .sharedOrganizationsUrl( + "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d/shared_organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/private_domains?q=name%3Atest-name.com&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/private_domains/GET_response.json") + .build()) + .build()); + + this.privateDomains + .list(ListPrivateDomainsRequest.builder().name("test-name.com").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListPrivateDomainsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + PrivateDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "3de9db5f-8e3b-4d10-a8c9-8137caafe43d") + .url( + "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d") + .createdAt("2016-02-19T02:04:00Z") + .build()) + .entity( + PrivateDomainEntity.builder() + .name("my-domain.com") + .owningOrganizationId( + "2f70efed-abb2-4b7a-9f31-d4fe4d849932") + .owningOrganizationUrl( + "/v2/organizations/2f70efed-abb2-4b7a-9f31-d4fe4d849932") + .sharedOrganizationsUrl( + "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d/shared_organizations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSharedOrganizations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/private_domains/b2a35f0c-d5ad-4a59-bea7-461711d96b0d/shared_organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/private_domains/GET_{id}_shared_organizations_response.json") + .build()) + .build()); + + this.privateDomains + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest.builder() + .privateDomainId("b2a35f0c-d5ad-4a59-bea7-461711d96b0d") + .build()) + .as(StepVerifier::create) + .expectNext( + ListPrivateDomainSharedOrganizationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + OrganizationResource.builder() + .metadata( + Metadata.builder() + .id( + "420bb3ef-6064-42ed-9131-c1fe980bf9c6") + .createdAt("2016-06-08T16:41:39Z") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6") + .build()) + .entity( + OrganizationEntity.builder() + .name("name-2005") + .billingEnabled(false) + .quotaDefinitionId( + "2e863ad3-7bb9-4c5c-928c-cde2caec341b") + .status("active") + .quotaDefinitionUrl( + "/v2/quota_definitions/2e863ad3-7bb9-4c5c-928c-cde2caec341b") + .spacesUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/spaces") + .domainsUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/domains") + .privateDomainsUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/private_domains") + .usersUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/users") + .managersUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/managers") + .billingManagersUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/billing_managers") + .auditorsUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/auditors") + .applicationEventsUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/app_events") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/space_quota_definitions") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/resourcematch/ReactorResourceMatchTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/resourcematch/ReactorResourceMatchTest.java new file mode 100644 index 00000000000..27bed893271 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/resourcematch/ReactorResourceMatchTest.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.resourcematch; + +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesRequest; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v2.resourcematch.Resource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorResourceMatchTest extends AbstractClientApiTest { + + private final ReactorResourceMatch resourceMatch = + new ReactorResourceMatch( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/resource_match") + .payload( + "fixtures/client/v2/resource_match/PUT_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/resource_match/PUT_response.json") + .build()) + .build()); + + this.resourceMatch + .list( + ListMatchingResourcesRequest.builder() + .resource( + Resource.builder() + .hash("002d760bea1be268e27077412e11a320d0f164d3") + .size(36) + .build()) + .resource( + Resource.builder() + .hash("a9993e364706816aba3e25717850c26c9cd0d89d") + .size(1) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + ListMatchingResourcesResponse.builder() + .resource( + Resource.builder() + .hash("002d760bea1be268e27077412e11a320d0f164d3") + .size(36) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/routemappings/ReactorRouteMappingsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/routemappings/ReactorRouteMappingsTest.java new file mode 100644 index 00000000000..f67fd00a344 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/routemappings/ReactorRouteMappingsTest.java @@ -0,0 +1,267 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.routemappings; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.DeleteRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.DeleteRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.GetRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.GetRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.ListRouteMappingsRequest; +import org.cloudfoundry.client.v2.routemappings.ListRouteMappingsResponse; +import org.cloudfoundry.client.v2.routemappings.RouteMappingEntity; +import org.cloudfoundry.client.v2.routemappings.RouteMappingResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorRouteMappingsTest extends AbstractClientApiTest { + + private final ReactorRouteMappings routeMappings = + new ReactorRouteMappings( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/route_mappings") + .payload( + "fixtures/client/v2/route_mappings/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/route_mappings/POST_response.json") + .build()) + .build()); + + this.routeMappings + .create( + CreateRouteMappingRequest.builder() + .applicationId("d232b485-b035-4d65-9f77-6b867d859de5") + .routeId("c041e8a3-64d0-4beb-bac8-1900e3aedd07") + .applicationPort(8888) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateRouteMappingResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-01-19T19:40:59Z") + .id("ca9cdd28-53c4-4b8e-a7e0-1838f69b8f91") + .url( + "/v2/route_mappings/ca9cdd28-53c4-4b8e-a7e0-1838f69b8f91") + .build()) + .entity( + RouteMappingEntity.builder() + .applicationId( + "d232b485-b035-4d65-9f77-6b867d859de5") + .applicationPort(8888) + .routeId("c041e8a3-64d0-4beb-bac8-1900e3aedd07") + .applicationUrl( + "/v2/apps/d232b485-b035-4d65-9f77-6b867d859de5") + .routeUrl( + "/v2/routes/c041e8a3-64d0-4beb-bac8-1900e3aedd07") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/route_mappings/random-route-mapping-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.routeMappings + .delete( + DeleteRouteMappingRequest.builder() + .routeMappingId("random-route-mapping-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/route_mappings/random-route-mapping-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/route_mappings/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.routeMappings + .delete( + DeleteRouteMappingRequest.builder() + .async(true) + .routeMappingId("random-route-mapping-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteRouteMappingResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/route_mappings/route-mapping-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/route_mappings/GET_{id}_response.json") + .build()) + .build()); + + this.routeMappings + .get(GetRouteMappingRequest.builder().routeMappingId("route-mapping-id").build()) + .as(StepVerifier::create) + .expectNext( + GetRouteMappingResponse.builder() + .metadata( + Metadata.builder() + .id("304bead7-ad5a-4f6e-a093-f2a85d30c54a") + .createdAt("2016-04-06T00:17:40Z") + .url( + "/v2/route_mappings/304bead7-ad5a-4f6e-a093-f2a85d30c54a") + .build()) + .entity( + RouteMappingEntity.builder() + .applicationId( + "65489f49-f437-431a-8f58-c118ce08d83a") + .applicationPort(8888) + .applicationUrl( + "/v2/apps/65489f49-f437-431a-8f58-c118ce08d83a") + .routeId("c7ce0cac-f1d6-405c-83fd-c2d75513eb23") + .routeUrl( + "/v2/routes/c7ce0cac-f1d6-405c-83fd-c2d75513eb23") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/route_mappings?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/route_mappings/GET_response.json") + .build()) + .build()); + + this.routeMappings + .list(ListRouteMappingsRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListRouteMappingsResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + RouteMappingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-04-06T00:17:40Z") + .id( + "50dedf28-08db-4cdd-9903-0d74f3b8708d") + .url( + "/v2/route_mappings/50dedf28-08db-4cdd-9903-0d74f3b8708d") + .build()) + .entity( + RouteMappingEntity.builder() + .applicationId( + "fbfe5df8-5391-4e75-966b-69fe34b7ee5d") + .applicationPort(8888) + .routeId( + "b683ae9e-0a54-4445-a2ea-5d78d9f89266") + .applicationUrl( + "/v2/apps/fbfe5df8-5391-4e75-966b-69fe34b7ee5d") + .routeUrl( + "/v2/routes/b683ae9e-0a54-4445-a2ea-5d78d9f89266") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/routes/ReactorRoutesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/routes/ReactorRoutesTest.java new file mode 100644 index 00000000000..13a9388e27b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/routes/ReactorRoutesTest.java @@ -0,0 +1,587 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.routes; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.DockerCredentials; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.routemappings.RouteMappingEntity; +import org.cloudfoundry.client.v2.routemappings.RouteMappingResource; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v2.routes.DeleteRouteResponse; +import org.cloudfoundry.client.v2.routes.GetRouteRequest; +import org.cloudfoundry.client.v2.routes.GetRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsRequest; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsResponse; +import org.cloudfoundry.client.v2.routes.ListRouteMappingsRequest; +import org.cloudfoundry.client.v2.routes.ListRouteMappingsResponse; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.ListRoutesResponse; +import org.cloudfoundry.client.v2.routes.RemoveRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteExistsRequest; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.routes.UpdateRouteRequest; +import org.cloudfoundry.client.v2.routes.UpdateRouteResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorRoutesTest extends AbstractClientApiTest { + + private final ReactorRoutes routes = + new ReactorRoutes( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateApplication() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/routes/test-route-id/apps/test-app-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/routes/PUT_{id}_apps_{app-id}_response.json") + .build()) + .build()); + + this.routes + .associateApplication( + AssociateRouteApplicationRequest.builder() + .applicationId("test-app-id") + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateRouteApplicationResponse.builder() + .metadata( + Metadata.builder() + .id("a05c94a3-e4b3-456e-b044-475270919ea7") + .url( + "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7") + .createdAt("2016-03-17T21:41:19Z") + .build()) + .entity( + RouteEntity.builder() + .host("host-20") + .path("") + .port(0) + .domainId("f5804a26-df58-412e-95ed-fa2f2a699c18") + .spaceId("4886c9ec-4b1a-4a4c-8c8f-acfdd3d97d22") + .domainUrl( + "/v2/domains/f5804a26-df58-412e-95ed-fa2f2a699c18") + .spaceUrl( + "/v2/spaces/4886c9ec-4b1a-4a4c-8c8f-acfdd3d97d22") + .applicationsUrl( + "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/apps") + .routeMappingsUrl( + "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/route_mappings") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/routes") + .payload("fixtures/client/v2/routes/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/routes/POST_response.json") + .build()) + .build()); + + this.routes + .create( + CreateRouteRequest.builder() + .domainId("4d9e6314-58ca-4f09-a736-d8bcc903b95e") + .port(10000) + .spaceId("2f093daf-c030-4b57-99c2-9b8858b200e4") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateRouteResponse.builder() + .metadata( + Metadata.builder() + .id("ad307f5b-efec-4034-8cf1-1f86515ee093") + .url( + "/v2/routes/ad307f5b-efec-4034-8cf1-1f86515ee093") + .createdAt("2016-03-17T21:41:19Z") + .build()) + .entity( + RouteEntity.builder() + .host("") + .path("") + .domainId("c94d8b7e-081e-4293-8f24-964a2fe2b16c") + .spaceId("759cb2e0-239b-4202-ab83-1e6fd66becee") + .port(10000) + .domainUrl( + "/v2/domains/c94d8b7e-081e-4293-8f24-964a2fe2b16c") + .spaceUrl( + "/v2/spaces/759cb2e0-239b-4202-ab83-1e6fd66becee") + .applicationsUrl( + "/v2/routes/ad307f5b-efec-4034-8cf1-1f86515ee093/apps") + .routeMappingsUrl( + "/v2/routes/ad307f5b-efec-4034-8cf1-1f86515ee093/route_mappings") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/routes/test-route-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.routes + .delete(DeleteRouteRequest.builder().routeId("test-route-id").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/routes/test-route-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/routes/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.routes + .delete(DeleteRouteRequest.builder().async(true).routeId("test-route-id").build()) + .as(StepVerifier::create) + .expectNext( + DeleteRouteResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void exists() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/routes/reserved/domain/test-domain-id/host/test-host?path=test-path") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.routes + .exists( + RouteExistsRequest.builder() + .domainId("test-domain-id") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/routes/test-route-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/routes/GET_{id}_response.json") + .build()) + .build()); + + this.routes + .get(GetRouteRequest.builder().routeId("test-route-id").build()) + .as(StepVerifier::create) + .expectNext( + GetRouteResponse.builder() + .metadata( + Metadata.builder() + .id("e6c3ae35-9083-4816-9432-ee8ad700fd03") + .url( + "/v2/routes/e6c3ae35-9083-4816-9432-ee8ad700fd03") + .createdAt("2016-03-17T21:41:19Z") + .build()) + .entity( + RouteEntity.builder() + .host("host-24") + .path("") + .domainId("f268feb8-2dec-4709-8b2d-db2e6c764093") + .spaceId("dd4e9e11-1b61-44a9-a4c5-6a5eb393c2a0") + .serviceInstanceId( + "492eb6e7-820e-40dc-847c-6b30a6fc7b64") + .port(0) + .domainUrl( + "/v2/domains/f268feb8-2dec-4709-8b2d-db2e6c764093") + .spaceUrl( + "/v2/spaces/dd4e9e11-1b61-44a9-a4c5-6a5eb393c2a0") + .serviceInstanceUrl( + "/v2/service_instances/492eb6e7-820e-40dc-847c-6b30a6fc7b64") + .applicationsUrl( + "/v2/routes/e6c3ae35-9083-4816-9432-ee8ad700fd03/apps") + .routeMappingsUrl( + "/v2/routes/e6c3ae35-9083-4816-9432-ee8ad700fd03/route_mappings") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/routes?page=-1").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/routes/GET_response.json") + .build()) + .build()); + + this.routes + .list(ListRoutesRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListRoutesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + RouteResource.builder() + .metadata( + Metadata.builder() + .id( + "8fd7433e-e9c7-4897-809f-9a9696f72986") + .url( + "/v2/routes/8fd7433e-e9c7-4897-809f-9a9696f72986") + .createdAt("2016-03-17T21:41:19Z") + .build()) + .entity( + RouteEntity.builder() + .host("host-25") + .path("") + .domainId( + "76d083f5-a5cc-4179-81b8-530a134cccf6") + .spaceId( + "34453e18-fe59-4208-b29c-ae9f7b46985c") + .serviceInstanceId( + "8479be64-245d-4385-a553-593ffcc6b886") + .port(0) + .domainUrl( + "/v2/domains/76d083f5-a5cc-4179-81b8-530a134cccf6") + .spaceUrl( + "/v2/spaces/34453e18-fe59-4208-b29c-ae9f7b46985c") + .serviceInstanceUrl( + "/v2/service_instances/8479be64-245d-4385-a553-593ffcc6b886") + .applicationsUrl( + "/v2/routes/8fd7433e-e9c7-4897-809f-9a9696f72986/apps") + .routeMappingsUrl( + "/v2/routes/8fd7433e-e9c7-4897-809f-9a9696f72986/route_mappings") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void listApplications() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/routes/81464707-0f48-4ab9-87dc-667ef15489fb/apps?app_guid=6e62b293-f4c8-405a-be2b-b719e2848984") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/routes/GET_{id}_apps_response.json") + .build()) + .build()); + + this.routes + .listApplications( + ListRouteApplicationsRequest.builder() + .routeId("81464707-0f48-4ab9-87dc-667ef15489fb") + .applicationId("6e62b293-f4c8-405a-be2b-b719e2848984") + .build()) + .as(StepVerifier::create) + .expectNext( + ListRouteApplicationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ApplicationResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:28Z") + .id( + "6141e57e-7636-480b-8f17-78c6049813f6") + .updatedAt("2016-06-08T16:41:28Z") + .url( + "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6") + .build()) + .entity( + ApplicationEntity.builder() + .console(false) + .detectedStartCommand("") + .diego(false) + .diskQuota(1024) + .dockerCredentials( + DockerCredentials.builder() + .build()) + .enableSsh(true) + .eventsUrl( + "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/events") + .memory(1024) + .healthCheckType("port") + .instances(1) + .name("name-1412") + .packageState("PENDING") + .packageUpdatedAt( + "2016-06-08T16:41:28Z") + .production(false) + .routeMappingsUrl( + "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/route_mappings") + .routesUrl( + "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/routes") + .serviceBindingsUrl( + "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/service_bindings") + .spaceId( + "93e43758-13fe-4751-8edc-caf225e27647") + .spaceUrl( + "/v2/spaces/93e43758-13fe-4751-8edc-caf225e27647") + .stackId( + "0459956d-e777-412d-af7e-d45f8d172edc") + .stackUrl( + "/v2/stacks/0459956d-e777-412d-af7e-d45f8d172edc") + .state("STOPPED") + .version( + "51207851-f39e-428e-9a16-1372f4d6d4f6") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listMappings() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/routes/521c375d-a7e2-4f87-9527-7fd1db1b2010/route_mappings") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/routes/GET_{id}_route_mappings_response.json") + .build()) + .build()); + + this.routes + .listMappings( + ListRouteMappingsRequest.builder() + .routeId("521c375d-a7e2-4f87-9527-7fd1db1b2010") + .build()) + .as(StepVerifier::create) + .expectNext( + ListRouteMappingsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + RouteMappingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:28Z") + .id( + "9feb9667-9249-44b7-9e4e-92157a2aaefb") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/route_mappings/9feb9667-9249-44b7-9e4e-92157a2aaefb") + .build()) + .entity( + RouteMappingEntity.builder() + .applicationId( + "bf65b03d-5416-4603-9de2-ef74491d29b6") + .applicationUrl( + "/v2/apps/bf65b03d-5416-4603-9de2-ef74491d29b6") + .routeId( + "521c375d-a7e2-4f87-9527-7fd1db1b2010") + .routeUrl( + "/v2/routes/521c375d-a7e2-4f87-9527-7fd1db1b2010") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeApplication() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/routes/test-route-id/apps/test-app-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.routes + .removeApplication( + RemoveRouteApplicationRequest.builder() + .applicationId("test-app-id") + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/routes/test-route-id") + .payload("fixtures/client/v2/routes/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v2/routes/PUT_{id}_response.json") + .build()) + .build()); + + this.routes + .update(UpdateRouteRequest.builder().routeId("test-route-id").port(10000).build()) + .as(StepVerifier::create) + .expectNext( + UpdateRouteResponse.builder() + .metadata( + Metadata.builder() + .id("fc72a0ae-374b-4f06-b96d-38a3864ee91b") + .url( + "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b") + .createdAt("2016-03-17T21:41:19Z") + .updatedAt("2016-03-17T21:41:19Z") + .build()) + .entity( + RouteEntity.builder() + .host("host-23") + .path("") + .domainId("6077a91b-66f9-4c52-be1f-f7b4b17a8c0d") + .spaceId("afed22fe-2b38-4976-9a7d-b81356c82531") + .port(10000) + .domainUrl( + "/v2/domains/6077a91b-66f9-4c52-be1f-f7b4b17a8c0d") + .spaceUrl( + "/v2/spaces/afed22fe-2b38-4976-9a7d-b81356c82531") + .applicationsUrl( + "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b/apps") + .routeMappingsUrl( + "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b/route_mappings") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/securitygroups/ReactorSecurityGroupsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/securitygroups/ReactorSecurityGroupsTest.java new file mode 100644 index 00000000000..b456be7158c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/securitygroups/ReactorSecurityGroupsTest.java @@ -0,0 +1,882 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.securitygroups; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.client.v2.securitygroups.Protocol.ALL; +import static org.cloudfoundry.client.v2.securitygroups.Protocol.ICMP; +import static org.cloudfoundry.client.v2.securitygroups.Protocol.TCP; +import static org.cloudfoundry.client.v2.securitygroups.Protocol.UDP; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.securitygroups.AssociateSecurityGroupSpaceRequest; +import org.cloudfoundry.client.v2.securitygroups.AssociateSecurityGroupSpaceResponse; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.DeleteSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.GetSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.GetSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupRunningDefaultsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupRunningDefaultsResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupSpacesRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupSpacesResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupStagingDefaultsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupStagingDefaultsResponse; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsResponse; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupRunningDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupSpaceRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupStagingDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.RuleEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupRunningDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupRunningDefaultResponse; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupStagingDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupStagingDefaultResponse; +import org.cloudfoundry.client.v2.securitygroups.UpdateSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.UpdateSecurityGroupResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorSecurityGroupsTest extends AbstractClientApiTest { + + private final ReactorSecurityGroups securityGroups = + new ReactorSecurityGroups( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces/1305ec2b-a31c-4d2e-adc8-d9b764237e96") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/security_groups/PUT_{id}_spaces_{space-id}_response.json") + .build()) + .build()); + + this.securityGroups + .associateSpace( + AssociateSecurityGroupSpaceRequest.builder() + .securityGroupId("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .spaceId("1305ec2b-a31c-4d2e-adc8-d9b764237e96") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSecurityGroupSpaceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:21Z") + .id("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("dummy1") + .rules() + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/security_groups") + .payload( + "fixtures/client/v2/security_groups/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/security_groups/POST_response.json") + .build()) + .build()); + + this.securityGroups + .create( + CreateSecurityGroupRequest.builder() + .name("my_super_sec_group") + .rule( + RuleEntity.builder() + .protocol(ICMP) + .destination("0.0.0.0/0") + .type(0) + .code(1) + .build()) + .rule( + RuleEntity.builder() + .protocol(TCP) + .destination("0.0.0.0/0") + .ports("2048-3000") + .log(true) + .build()) + .rule( + RuleEntity.builder() + .protocol(UDP) + .destination("0.0.0.0/0") + .ports("53, 5353") + .build()) + .rule( + RuleEntity.builder() + .protocol(ALL) + .destination("0.0.0.0/0") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSecurityGroupResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-05-12T00:45:26Z") + .id("966e7ac0-1c1a-4ca9-8a5f-77c96576beb7") + .url( + "/v2/security_groups/966e7ac0-1c1a-4ca9-8a5f-77c96576beb7") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("my_super_sec_group") + .rule( + RuleEntity.builder() + .protocol(ICMP) + .destination("0.0.0.0/0") + .type(0) + .code(1) + .build()) + .rule( + RuleEntity.builder() + .protocol(TCP) + .destination("0.0.0.0/0") + .ports("2048-3000") + .log(true) + .build()) + .rule( + RuleEntity.builder() + .protocol(UDP) + .destination("0.0.0.0/0") + .ports("53, 5353") + .build()) + .rule( + RuleEntity.builder() + .protocol(ALL) + .destination("0.0.0.0/0") + .build()) + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/966e7ac0-1c1a-4ca9-8a5f-77c96576beb7/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/security_groups/test-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.securityGroups + .delete(DeleteSecurityGroupRequest.builder().securityGroupId("test-id").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/security_groups/test-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/security_groups/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.securityGroups + .delete( + DeleteSecurityGroupRequest.builder() + .async(true) + .securityGroupId("test-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteSecurityGroupResponse.builder() + .metadata( + Metadata.builder() + .id("260ba675-47b6-4094-be7a-349d58e3d36a") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/260ba675-47b6-4094-be7a-349d58e3d36a") + .build()) + .entity( + JobEntity.builder() + .id("260ba675-47b6-4094-be7a-349d58e3d36a") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteRunning() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/config/running_security_groups/test-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.securityGroups + .removeRunningDefault( + RemoveSecurityGroupRunningDefaultRequest.builder() + .securityGroupId("test-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteStaging() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/config/staging_security_groups/test-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.securityGroups + .removeStagingDefault( + RemoveSecurityGroupStagingDefaultRequest.builder() + .securityGroupId("test-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/security_groups/GET_{id}_response.json") + .build()) + .build()); + + this.securityGroups + .get( + GetSecurityGroupRequest.builder() + .securityGroupId("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .build()) + .as(StepVerifier::create) + .expectNext( + GetSecurityGroupResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:21Z") + .id("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("dummy1") + .rules() + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces") + .stagingSpacesUrl( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/staging_spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/security_groups").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/security_groups/GET_security_groups_response.json") + .build()) + .build()); + + this.securityGroups + .list(ListSecurityGroupsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListSecurityGroupsResponse.builder() + .totalResults(5) + .totalPages(1) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .id( + "1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .url( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .createdAt("2016-06-08T16:41:21Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("dummy1") + .rules() + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .id( + "61a3df25-f372-4554-9b77-811aaa5374c1") + .url( + "/v2/security_groups/61a3df25-f372-4554-9b77-811aaa5374c1") + .createdAt("2016-06-08T16:41:21Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("dummy2") + .rules() + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/61a3df25-f372-4554-9b77-811aaa5374c1/spaces") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .id( + "26bdad19-b077-4542-aac0-f7e4c53c344d") + .url( + "/v2/security_groups/26bdad19-b077-4542-aac0-f7e4c53c344d") + .createdAt("2016-06-08T16:41:22Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-67") + .rule( + RuleEntity.builder() + .protocol(UDP) + .ports("8080") + .destination( + "198.41.191.47/1") + .build()) + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/26bdad19-b077-4542-aac0-f7e4c53c344d/spaces") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .id( + "0a2b8908-66f5-4bef-80f3-ca21ed86fbb3") + .url( + "/v2/security_groups/0a2b8908-66f5-4bef-80f3-ca21ed86fbb3") + .createdAt("2016-06-08T16:41:22Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-68") + .rule( + RuleEntity.builder() + .protocol(UDP) + .ports("8080") + .destination( + "198.41.191.47/1") + .build()) + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/0a2b8908-66f5-4bef-80f3-ca21ed86fbb3/spaces") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .id( + "f5b93b76-cd25-4fed-bed6-0d9d0acff542") + .url( + "/v2/security_groups/f5b93b76-cd25-4fed-bed6-0d9d0acff542") + .createdAt("2016-06-08T16:41:22Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-69") + .rule( + RuleEntity.builder() + .protocol(UDP) + .ports("8080") + .destination( + "198.41.191.47/1") + .build()) + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/f5b93b76-cd25-4fed-bed6-0d9d0acff542/spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRunning() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/running_security_groups") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/config/GET_running_security_groups_response.json") + .build()) + .build()); + + this.securityGroups + .listRunningDefaults(ListSecurityGroupRunningDefaultsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListSecurityGroupRunningDefaultsResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-04-06T00:17:17Z") + .id( + "1f2f24f8-f68c-4a3b-b51a-8134fe2626d8") + .url( + "/v2/config/running_security_groups/1f2f24f8-f68c-4a3b-b51a-8134fe2626d8") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-114") + .rule( + RuleEntity.builder() + .destination( + "198.41.191.47/1") + .ports("8080") + .protocol(UDP) + .build()) + .runningDefault(true) + .stagingDefault(false) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces?space_guid=09a060b2-f97a-4a57-b7d2-35e06ad71050") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/config/GET_{id}_spaces_response.json") + .build()) + .build()); + + this.securityGroups + .listSpaces( + ListSecurityGroupSpacesRequest.builder() + .securityGroupId("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .spaceId("09a060b2-f97a-4a57-b7d2-35e06ad71050") + .build()) + .as(StepVerifier::create) + .expectNext( + ListSecurityGroupSpacesResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:21Z") + .id( + "3435dd59-f289-4191-83e6-6201d6fb6a22") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22") + .build()) + .entity( + SpaceEntity.builder() + .allowSsh(true) + .applicationEventsUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/app_events") + .applicationsUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/apps") + .auditorsUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/auditors") + .developersUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/developers") + .domainsUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/domains") + .eventsUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/events") + .managersUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/managers") + .name("name-40") + .organizationId( + "1d1dd3f4-36bd-4380-8d01-3c7a934a9281") + .organizationUrl( + "/v2/organizations/1d1dd3f4-36bd-4380-8d01-3c7a934a9281") + .routesUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/routes") + .securityGroupsUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/security_groups") + .serviceInstancesUrl( + "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/service_instances") + .spaceQuotaDefinitionId(null) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listStaging() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/config/staging_security_groups") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/config/GET_staging_security_groups_response.json") + .build()) + .build()); + + this.securityGroups + .listStagingDefaults(ListSecurityGroupStagingDefaultsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListSecurityGroupStagingDefaultsResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-04-16T01:23:52Z") + .id( + "c0bb3afb-ae01-4af0-96cf-a5b0d2dca894") + .url( + "/v2/config/staging_security_groups/c0bb3afb-ae01-4af0-96cf-a5b0d2dca894") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-570") + .rule( + RuleEntity.builder() + .destination( + "198.41.191.47/1") + .ports("8080") + .protocol(UDP) + .build()) + .runningDefault(false) + .stagingDefault(true) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces/ca8f04d1-bc2b-40ef-975e-fda2cc785c2a") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.securityGroups + .removeSpace( + RemoveSecurityGroupSpaceRequest.builder() + .securityGroupId("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .spaceId("ca8f04d1-bc2b-40ef-975e-fda2cc785c2a") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setRunning() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/config/running_security_groups/test-security-group-default-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/config/PUT_{id}_running_security_groups_response.json") + .build()) + .build()); + + this.securityGroups + .setRunningDefault( + SetSecurityGroupRunningDefaultRequest.builder() + .securityGroupId("test-security-group-default-id") + .build()) + .as(StepVerifier::create) + .expectNext( + SetSecurityGroupRunningDefaultResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-04-06T00:17:17Z") + .id("9aa7ab9c-997f-4f87-be50-87105521881a") + .url( + "/v2/config/running_security_groups/9aa7ab9c-997f-4f87-be50-87105521881a") + .updatedAt("2016-04-06T00:17:17Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-109") + .rule( + RuleEntity.builder() + .destination("198.41.191.47/1") + .ports("8080") + .protocol(UDP) + .build()) + .runningDefault(true) + .stagingDefault(false) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setStaging() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/config/staging_security_groups/test-security-group-default-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/config/PUT_{id}_staging_security_groups_response.json") + .build()) + .build()); + + this.securityGroups + .setStagingDefault( + SetSecurityGroupStagingDefaultRequest.builder() + .securityGroupId("test-security-group-default-id") + .build()) + .as(StepVerifier::create) + .expectNext( + SetSecurityGroupStagingDefaultResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-04-16T01:23:52Z") + .id("50165fce-6c41-4c35-a4d8-3858ee217d36") + .url( + "/v2/config/staging_security_groups/50165fce-6c41-4c35-a4d8-3858ee217d36") + .updatedAt("2016-04-16T01:23:52Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-567") + .rule( + RuleEntity.builder() + .destination("198.41.191.47/1") + .ports("8080") + .protocol(UDP) + .build()) + .runningDefault(false) + .stagingDefault(true) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .payload( + "fixtures/client/v2/security_groups/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/security_groups/PUT_{id}_response.json") + .build()) + .build()); + + this.securityGroups + .update( + UpdateSecurityGroupRequest.builder() + .name("new_name") + .rules() + .securityGroupId("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateSecurityGroupResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:21Z") + .id("1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .updatedAt("2016-06-08T16:41:21Z") + .url( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("new_name") + .rules() + .runningDefault(false) + .stagingDefault(false) + .spacesUrl( + "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicebindings/ReactorServiceBindingsV2Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicebindings/ReactorServiceBindingsV2Test.java new file mode 100644 index 00000000000..dbf9fffa579 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicebindings/ReactorServiceBindingsV2Test.java @@ -0,0 +1,397 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.servicebindings; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingParametersRequest; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingParametersResponse; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.LastOperation; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceBindingsV2Test extends AbstractClientApiTest { + + private final ReactorServiceBindingsV2 serviceBindings = + new ReactorServiceBindingsV2( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_bindings") + .payload( + "fixtures/client/v2/service_bindings/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_bindings/POST_response.json") + .build()) + .build()); + + this.serviceBindings + .create( + CreateServiceBindingRequest.builder() + .applicationId("26ddc1de-3eeb-424b-82f3-f7f30a38b610") + .serviceInstanceId("650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .parameters( + Collections.singletonMap( + "the_service_broker", (Object) "wants this object")) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceBindingResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:20Z") + .id("42eda707-fe4d-4eed-9b39-7cb5e665c226") + .url( + "/v2/service_bindings/42eda707-fe4d-4eed-9b39-7cb5e665c226") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "26ddc1de-3eeb-424b-82f3-f7f30a38b610") + .serviceInstanceId( + "650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .bindingOptions(Collections.emptyMap()) + .credential("creds-key-356", "creds-val-356") + .gatewayName("") + .applicationUrl( + "/v2/apps/26ddc1de-3eeb-424b-82f3-f7f30a38b610") + .serviceInstanceUrl( + "/v2/service_instances/650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_bindings/test-service-binding-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceBindings + .delete( + DeleteServiceBindingRequest.builder() + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_bindings/test-service-binding-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/service_bindings/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.serviceBindings + .delete( + DeleteServiceBindingRequest.builder() + .async(true) + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteServiceBindingResponse.builder() + .metadata( + Metadata.builder() + .id("c4faac01-5bbd-494f-8849-256a3bab06b8") + .createdAt("2016-03-14T22:30:51Z") + .url( + "/v2/jobs/c4faac01-5bbd-494f-8849-256a3bab06b8") + .build()) + .entity( + JobEntity.builder() + .id("c4faac01-5bbd-494f-8849-256a3bab06b8") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_bindings/test-service-binding-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_bindings/GET_{id}_response.json") + .build()) + .build()); + + this.serviceBindings + .get( + GetServiceBindingRequest.builder() + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceBindingResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:43Z") + .id("ddd7fb26-c42d-4acf-a035-60fdd094a167") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/service_bindings/ddd7fb26-c42d-4acf-a035-60fdd094a167") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "784bca1b-c4d9-4d99-9961-9f413620031a") + .applicationUrl( + "/v2/apps/784bca1b-c4d9-4d99-9961-9f413620031a") + .bindingOptions(Collections.emptyMap()) + .credential("creds-key-64", "creds-val-64") + .gatewayName("") + .lastOperation( + LastOperation.builder() + .createdAt("2018-02-28T16:25:19Z") + .description("") + .state("succeeded") + .type("create") + .updatedAt("2018-02-28T16:25:19Z") + .build()) + .name("prod-db") + .serviceBindingParametersUrl( + "/v2/service_bindings/ddd7fb26-c42d-4acf-a035-60fdd094a167/parameters") + .serviceInstanceId( + "ada8700c-dd02-467c-937b-32ce498302f6") + .serviceInstanceUrl( + "/v2/service_instances/ada8700c-dd02-467c-937b-32ce498302f6") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getParameters() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_bindings/test-service-binding-id/parameters") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_bindings/GET_{id}_parameters_response.json") + .build()) + .build()); + + this.serviceBindings + .getParameters( + GetServiceBindingParametersRequest.builder() + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceBindingParametersResponse.builder() + .parameter("test-param-key-1", "test-param-value-1") + .parameter("test-param-key-2", 12345) + .parameter("test-param-key-3", false) + .parameter("test-param-key-4", 3.141) + .parameter("test-param-key-5", null) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_bindings?q=app_guid%3Add44fd4f-5e20-4c52-b66d-7af6e201f01e&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_bindings/GET_response.json") + .build()) + .build()); + + this.serviceBindings + .list( + ListServiceBindingsRequest.builder() + .applicationId("dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceBindingsResponse.builder() + .totalResults(3) + .totalPages(1) + .resource( + ServiceBindingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:06Z") + .id( + "d6d87c3d-a38f-4b31-9bbe-2432d2faaa1d") + .url( + "/v2/service_bindings/d6d87c3d-a38f-4b31-9bbe-2432d2faaa1d") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .serviceInstanceId( + "bbd1f170-bb1f-481d-bcf7-def2bbe6a3a2") + .bindingOptions( + Collections.emptyMap()) + .credential( + "creds-key-3", + "creds-val-3") + .gatewayName("") + .applicationUrl( + "/v2/apps/dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .serviceInstanceUrl( + "/v2/service_instances/bbd1f170-bb1f-481d-bcf7-def2bbe6a3a2") + .build()) + .build()) + .resource( + ServiceBindingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-11-03T00:53:50Z") + .id( + "925d8848-4808-47cf-a3e8-049aa0163328") + .updatedAt("2015-11-04T12:54:50Z") + .url( + "/v2/service_bindings/925d8848-4808-47cf-a3e8-049aa0163328") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .serviceInstanceId( + "f99b3d23-55f9-48b5-add3-d7ab08b2ff0c") + .bindingOptions( + Collections.emptyMap()) + .credential( + "creds-key-108", + "creds-val-108") + .gatewayName("") + .applicationUrl( + "/v2/apps/dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .serviceInstanceUrl( + "/v2/service_instances/f99b3d23-55f9-48b5-add3-d7ab08b2ff0c") + .build()) + .build()) + .resource( + ServiceBindingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:20Z") + .id( + "42eda707-fe4d-4eed-9b39-7cb5e665c226") + .url( + "/v2/service_bindings/42eda707-fe4d-4eed-9b39-7cb5e665c226") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .serviceInstanceId( + "650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .bindingOptions( + Collections.emptyMap()) + .credential( + "creds-key-356", + "creds-val-356") + .gatewayName("") + .applicationUrl( + "/v2/apps/dd44fd4f-5e20-4c52-b66d-7af6e201f01e") + .serviceInstanceUrl( + "/v2/service_instances/650d0eb7-3b83-414a-82a0-d503d1c8eb5f") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicebrokers/ReactorServiceBrokersTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicebrokers/ReactorServiceBrokersTest.java new file mode 100644 index 00000000000..cb52d7be015 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicebrokers/ReactorServiceBrokersTest.java @@ -0,0 +1,304 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.servicebrokers; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerResponse; +import org.cloudfoundry.client.v2.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.GetServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.GetServiceBrokerResponse; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersResponse; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokerEntity; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokerResource; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceBrokersTest extends AbstractClientApiTest { + + private final ReactorServiceBrokers serviceBrokers = + new ReactorServiceBrokers( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_brokers") + .payload( + "fixtures/client/v2/service_brokers/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_brokers/POST_response.json") + .build()) + .build()); + + this.serviceBrokers + .create( + CreateServiceBrokerRequest.builder() + .name("service-broker-name") + .authenticationPassword("secretpassw0rd") + .authenticationUsername("admin") + .brokerUrl("https://broker.example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceBrokerResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:23Z") + .id("1e86a649-e4a2-4bed-830d-b12435ed4cd9") + .url( + "/v2/service_brokers/1e86a649-e4a2-4bed-830d-b12435ed4cd9") + .build()) + .entity( + ServiceBrokerEntity.builder() + .name("service-broker-name") + .brokerUrl("https://broker.example.com") + .authenticationUsername("admin") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_brokers/test-service-broker-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceBrokers + .delete( + DeleteServiceBrokerRequest.builder() + .serviceBrokerId("test-service-broker-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_brokers/test-service-broker-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_brokers/GET_{id}_response.json") + .build()) + .build()); + + this.serviceBrokers + .get( + GetServiceBrokerRequest.builder() + .serviceBrokerId("test-service-broker-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceBrokerResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:23Z") + .id("1311f77f-cfb6-499e-bcba-82c7ef968ae6") + .updatedAt("2015-07-27T22:43:23Z") + .url( + "/v2/service_brokers/1311f77f-cfb6-499e-bcba-82c7ef968ae6") + .build()) + .entity( + ServiceBrokerEntity.builder() + .name("name-974") + .brokerUrl("https://foo.com/url-36") + .authenticationUsername("auth_username-36") + .spaceId("7878cee1-a484-4148-92bf-84beae20842f") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_brokers?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_brokers/GET_response.json") + .build()) + .build()); + + this.serviceBrokers + .list(ListServiceBrokersRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListServiceBrokersResponse.builder() + .totalResults(3) + .totalPages(1) + .resource( + ServiceBrokerResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:23Z") + .id( + "b52de6f1-15dd-4069-8b42-f052cc9333fc") + .updatedAt("2015-07-27T22:43:23Z") + .url( + "/v2/service_brokers/b52de6f1-15dd-4069-8b42-f052cc9333fc") + .build()) + .entity( + ServiceBrokerEntity.builder() + .name("name-980") + .brokerUrl("https://foo.com/url-39") + .authenticationUsername( + "auth_username-39") + .spaceId( + "4f34c35e-be0d-409e-9279-1ccd7058c5d8") + .build()) + .build()) + .resource( + ServiceBrokerResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:23Z") + .id( + "812e9e7f-b5b0-4587-ba3c-b4a7c574fb88") + .url( + "/v2/service_brokers/812e9e7f-b5b0-4587-ba3c-b4a7c574fb88") + .build()) + .entity( + ServiceBrokerEntity.builder() + .name("name-981") + .brokerUrl("https://foo.com/url-40") + .authenticationUsername( + "auth_username-40") + .build()) + .build()) + .resource( + ServiceBrokerResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:23Z") + .id( + "93e760c4-ff3d-447a-9cff-a17f4454eaee") + .url( + "/v2/service_brokers/93e760c4-ff3d-447a-9cff-a17f4454eaee") + .build()) + .entity( + ServiceBrokerEntity.builder() + .name("name-982") + .brokerUrl("https://foo.com/url-41") + .authenticationUsername( + "auth_username-41") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/service_brokers/test-service-broker-id") + .payload( + "fixtures/client/v2/service_brokers/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_brokers/PUT_{id}_response.json") + .build()) + .build()); + + this.serviceBrokers + .update( + UpdateServiceBrokerRequest.builder() + .authenticationUsername("admin-user") + .authenticationPassword("some-secret") + .brokerUrl("https://mybroker.example.com") + .serviceBrokerId("test-service-broker-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServiceBrokerResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:23Z") + .id("92b935f5-20e2-4377-a7e2-f15faa110eab") + .updatedAt("2015-07-27T22:43:23Z") + .url( + "/v2/service_brokers/92b935f5-20e2-4377-a7e2-f15faa110eab") + .build()) + .entity( + ServiceBrokerEntity.builder() + .name("name-998") + .brokerUrl("https://mybroker.example.com") + .authenticationUsername("admin-user") + .spaceId("85e59d96-b68b-4908-8ff5-8d54f4371f14") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceinstances/ReactorServiceInstancesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceinstances/ReactorServiceInstancesTest.java new file mode 100644 index 00000000000..8ca8726d96a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceinstances/ReactorServiceInstancesTest.java @@ -0,0 +1,864 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceinstances; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.serviceinstances.BindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.serviceinstances.BindServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceParametersRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceParametersResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstancePermissionsRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstancePermissionsResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.LastOperation; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceRoutesResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceBindingsResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesResponse; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceinstances.UnbindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyEntity; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceInstancesTest extends AbstractClientApiTest { + + private final ReactorServiceInstances serviceInstances = + new ReactorServiceInstances( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void bindRoute() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/service_instances/test-service-instance-id/routes/route-id") + .payload( + "fixtures/client/v2/service_instances/PUT_{id}_routes_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_instances/PUT_{id}_routes_response.json") + .build()) + .build()); + + this.serviceInstances + .bindRoute( + BindServiceInstanceRouteRequest.builder() + .serviceInstanceId("test-service-instance-id") + .routeId("route-id") + .parameter("the_service_broker", "wants this object") + .build()) + .as(StepVerifier::create) + .expectNext( + BindServiceInstanceRouteResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-12-22T18:27:58Z") + .id("e7e5b08e-c530-4c1c-b420-fa0b09b3770d") + .url( + "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d") + .build()) + .entity( + ServiceInstanceEntity.builder() + .name("name-160") + .credential("creds-key-89", "creds-val-89") + .servicePlanId( + "957307f5-6811-4eba-8667-ffee5a704a4a") + .spaceId("36b01ada-ef02-4ff5-9f78-cd9e704211d2") + .type("managed_service_instance") + .tags(Collections.emptyList()) + .spaceUrl( + "/v2/spaces/36b01ada-ef02-4ff5-9f78-cd9e704211d2") + .servicePlanUrl( + "/v2/service_plans/957307f5-6811-4eba-8667-ffee5a704a4a") + .serviceBindingsUrl( + "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/service_keys") + .routesUrl( + "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/routes") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_instances?accepts_incomplete=true") + .payload( + "fixtures/client/v2/service_instances/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_instances/POST_response.json") + .build()) + .build()); + + this.serviceInstances + .create( + CreateServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .name("my-service-instance") + .servicePlanId("2048a369-d2d3-48cf-bcfd-eaf9032fa0ab") + .spaceId("86b29f7e-721d-4eb8-b34f-3b1d1eccdf23") + .parameter("the_service_broker", "wants this object") + .tag("accounting") + .tag("mongodb") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:08Z") + .id("8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a") + .url( + "/v2/service_instances/8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a") + .build()) + .entity( + ServiceInstanceEntity.builder() + .name("my-service-instance") + .credential("creds-key-356", "creds-val-356") + .servicePlanId( + "2048a369-d2d3-48cf-bcfd-eaf9032fa0ab") + .spaceId("86b29f7e-721d-4eb8-b34f-3b1d1eccdf23") + .type("managed_service_instance") + .lastOperation( + LastOperation.builder() + .createdAt("2015-07-27T22:43:08Z") + .updatedAt("2015-07-27T22:43:08Z") + .description("") + .state("in progress") + .type("create") + .build()) + .tag("accounting") + .tag("mongodb") + .spaceUrl( + "/v2/spaces/86b29f7e-721d-4eb8-b34f-3b1d1eccdf23") + .servicePlanUrl( + "/v2/service_plans/2048a369-d2d3-48cf-bcfd-eaf9032fa0ab") + .serviceBindingsUrl( + "/v2/service_instances/8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a/service_keys") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/test-service-instance-id?accepts_incomplete=true&purge=true") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceInstances + .delete( + DeleteServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .acceptsIncomplete(true) + .purge(true) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAcceptsIncomplete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/test-service-instance-id?accepts_incomplete=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/service_instances/DELETE_{id}_accepts_incomplete_response.json") + .build()) + .build()); + + this.serviceInstances + .delete( + DeleteServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .acceptsIncomplete(true) + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .id("2e20eccf-6828-4c56-81cb-28c0e295ce19") + .url( + "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19") + .createdAt("2017-02-27T12:30:29Z") + .updatedAt("2017-02-27T12:30:29Z") + .build()) + .entity( + ServiceInstanceEntity.builder() + .name("test-service") + .servicePlanId( + "07c64d77-4df5-4974-a4b2-3bc58cafcf0d") + .spaceId("840d3266-8547-40fe-986e-ffc20eaba235") + .dashboardUrl( + "http://test-dashboard-host/2e20eccf-6828-4c56-81cb-28c0e295ce19") + .type("managed_service_instance") + .lastOperation( + LastOperation.builder() + .type("delete") + .state("in progress") + .description("") + .updatedAt("2017-02-27T12:30:59Z") + .createdAt("2017-02-27T12:30:59Z") + .build()) + .spaceUrl( + "/v2/spaces/840d3266-8547-40fe-986e-ffc20eaba235") + .servicePlanUrl( + "/v2/service_plans/07c64d77-4df5-4974-a4b2-3bc58cafcf0d") + .serviceBindingsUrl( + "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19/service_keys") + .routesUrl( + "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19/routes") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/test-service-instance-id?async=true&purge=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/service_instances/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.serviceInstances + .delete( + DeleteServiceInstanceRequest.builder() + .async(true) + .serviceInstanceId("test-service-instance-id") + .purge(true) + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_instances/test-service-instance-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_{id}_response.json") + .build()) + .build()); + + this.serviceInstances + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:29Z") + .id("0d632575-bb06-4ea5-bb19-a451a9644d92") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92") + .build()) + .entity( + ServiceInstanceEntity.builder() + .credential("creds-key-38", "creds-val-38") + .lastOperation( + LastOperation.builder() + .createdAt("2016-06-08T16:41:29Z") + .description( + "service broker-provided" + + " description") + .state("succeeded") + .type("create") + .updatedAt("2016-06-08T16:41:29Z") + .build()) + .name("name-1508") + .routesUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/routes") + .serviceBindingsUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/service_bindings") + .serviceId("a14baddf-1ccc-5299-0152-ab9s49de4422") + .serviceInstanceParametersUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/parameters") + .serviceKeysUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/service_keys") + .servicePlanId( + "779d2df0-9cdd-48e8-9781-ea05301cedb1") + .servicePlanUrl( + "/v2/service_plans/779d2df0-9cdd-48e8-9781-ea05301cedb1") + .serviceUrl( + "/v2/services/a14baddf-1ccc-5299-0152-ab9s49de4422") + .sharedFromUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_from") + .sharedToUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_to") + .spaceId("38511660-89d9-4a6e-a889-c32c7e94f139") + .spaceUrl( + "/v2/spaces/38511660-89d9-4a6e-a889-c32c7e94f139") + .tag("accounting") + .tag("mongodb") + .type("managed_service_instance") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getParameters() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/parameters") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_{id}_parameters_response.json") + .build()) + .build()); + + this.serviceInstances + .getParameters( + GetServiceInstanceParametersRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceInstanceParametersResponse.builder() + .parameter("test-param-key-1", "test-param-value-1") + .parameter("test-param-key-2", 12345) + .parameter("test-param-key-3", false) + .parameter("test-param-key-4", 3.141) + .parameter("test-param-key-5", null) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getPermissions() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/permissions") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_{id}_permissions_response.json") + .build()) + .build()); + + this.serviceInstances + .getPermissions( + GetServiceInstancePermissionsRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceInstancePermissionsResponse.builder() + .manage(true) + .read(true) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_instances?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_response.json") + .build()) + .build()); + + this.serviceInstances + .list(ListServiceInstancesRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListServiceInstancesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceInstanceResource.builder() + .metadata( + Metadata.builder() + .id( + "24ec15f9-f6c7-434a-8893-51baab8408d8") + .url( + "/v2/service_instances/24ec15f9-f6c7-434a-8893-51baab8408d8") + .createdAt("2015-07-27T22:43:08Z") + .build()) + .entity( + ServiceInstanceEntity.builder() + .name("name-133") + .credential( + "creds-key-72", + "creds-val-72") + .servicePlanId( + "2b53255a-8b40-4671-803d-21d3f5d4183a") + .spaceId( + "83b3e705-49fd-4c40-8adf-f5e34f622a19") + .type("managed_service_instance") + .lastOperation( + LastOperation.builder() + .type("create") + .state("succeeded") + .description( + "service" + + " broker-provided" + + " description") + .updatedAt( + "2015-07-27T22:43:08Z") + .createdAt( + "2015-07-27T22:43:08Z") + .build()) + .tag("accounting") + .tag("mongodb") + .spaceUrl( + "/v2/spaces/83b3e705-49fd-4c40-8adf-f5e34f622a19") + .servicePlanUrl( + "/v2/service_plans/2b53255a-8b40-4671-803d-21d3f5d4183a") + .serviceBindingsUrl( + "/v2/service_instances/24ec15f9-f6c7-434a-8893-51baab8408d8/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/24ec15f9-f6c7-434a-8893-51baab8408d8/service_keys") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRoutes() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/26fae4d0-df82-42f3-ac67-da5873e3a277/routes") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_{id}_routes_response.json") + .build()) + .build()); + + this.serviceInstances + .listRoutes( + ListServiceInstanceRoutesRequest.builder() + .serviceInstanceId("26fae4d0-df82-42f3-ac67-da5873e3a277") + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceInstanceRoutesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + RouteResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:30Z") + .id( + "674b6eac-4a22-4a9d-bee2-b61299a57bf4") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/routes/674b6eac-4a22-4a9d-bee2-b61299a57bf4") + .build()) + .entity( + RouteEntity.builder() + .applicationsUrl( + "/v2/routes/674b6eac-4a22-4a9d-bee2-b61299a57bf4/apps") + .domainId( + "8580604f-60e0-4903-a73f-f2e5e6660a68") + .domainUrl( + "/v2/private_domains/8580604f-60e0-4903-a73f-f2e5e6660a68") + .host("host-17") + .path("") + .routeMappingsUrl( + "/v2/routes/674b6eac-4a22-4a9d-bee2-b61299a57bf4/route_mappings") + .serviceInstanceId( + "26fae4d0-df82-42f3-ac67-da5873e3a277") + .serviceInstanceUrl( + "/v2/service_instances/26fae4d0-df82-42f3-ac67-da5873e3a277") + .spaceId( + "276011c4-0550-4a01-82d5-7e9c95feb9ae") + .spaceUrl( + "/v2/spaces/276011c4-0550-4a01-82d5-7e9c95feb9ae") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceBindings() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/service_bindings?q=app_guid%3Atest-application-id&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_{id}_service_bindings_response.json") + .build()) + .build()); + + this.serviceInstances + .listServiceBindings( + ListServiceInstanceServiceBindingsRequest.builder() + .serviceInstanceId("test-service-instance-id") + .applicationId("test-application-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceInstanceServiceBindingsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceBindingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:09Z") + .id( + "05f3ec3c-8d97-4bd8-bf86-e44cc835a154") + .url( + "/v2/service_bindings/05f3ec3c-8d97-4bd8-bf86-e44cc835a154") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "8a50163b-a39d-4f44-aece-dc5a956da848") + .serviceInstanceId( + "a5a0567e-edbf-4da9-ae90-dce24af308a1") + .bindingOptions( + Collections.emptyMap()) + .credential( + "creds-key-85", + "creds-val-85") + .gatewayName("") + .applicationUrl( + "/v2/apps/8a50163b-a39d-4f44-aece-dc5a956da848") + .serviceInstanceUrl( + "/v2/service_instances/a5a0567e-edbf-4da9-ae90-dce24af308a1") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceKeys() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/service_keys?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_instances/GET_{id}_service_keys_response.json") + .build()) + .build()); + + this.serviceInstances + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .serviceInstanceId("test-service-instance-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceInstanceServiceKeysResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceKeyResource.builder() + .metadata( + Metadata.builder() + .id( + "03ddc0ba-f792-4762-b4e4-dc08b307dc4f") + .url( + "/v2/service_keys/03ddc0ba-f792-4762-b4e4-dc08b307dc4f") + .createdAt("2016-05-04T04:49:09Z") + .build()) + .entity( + ServiceKeyEntity.builder() + .name("a-service-key") + .serviceInstanceId( + "28120eae-4a44-42da-a3db-2a34aea8dcaa") + .credential( + "creds-key-68", + "creds-val-68") + .serviceInstanceUrl( + "/v2/service_instances/28120eae-4a44-42da-a3db-2a34aea8dcaa") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unbindRoute() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/8fe97ac9-d53a-4858-b6a4-53c20f1fe409/routes/3bbd74b5-516d-409e-a107-19eaf9b2da18") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceInstances + .unbindRoute( + UnbindServiceInstanceRouteRequest.builder() + .routeId("3bbd74b5-516d-409e-a107-19eaf9b2da18") + .serviceInstanceId("8fe97ac9-d53a-4858-b6a4-53c20f1fe409") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/service_instances/test-service-instance-id?accepts_incomplete=true") + .payload( + "fixtures/client/v2/service_instances/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_instances/PUT_{id}_response.json") + .build()) + .build()); + + this.serviceInstances + .update( + UpdateServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .serviceInstanceId("test-service-instance-id") + .servicePlanId("5b5e984f-bbf6-477b-9d3a-b6d5df941b50") + .parameter("the_service_broker", "wants this object") + .tags(Collections.emptyList()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:30Z") + .id("a34f1423-4b84-4727-ab49-3f1522c4cb16") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16") + .build()) + .entity( + ServiceInstanceEntity.builder() + .name("name-1529") + .credential("creds-key-41", "creds-val-41") + .servicePlanId( + "4ec73bf4-9f3a-44c7-bbac-61ee9cb5a511") + .spaceId("da37b4b7-2439-4b30-9eb3-bded0dbf690f") + .type("managed_service_instance") + .tags(Collections.emptyList()) + .lastOperation( + LastOperation.builder() + .createdAt("2016-06-08T16:41:30Z") + .updatedAt("2016-06-08T16:41:30Z") + .description("") + .state("in progress") + .type("update") + .build()) + .maintenanceInfo( + MaintenanceInfo.builder() + .description( + "OS image update.\n" + + "Expect downtime.") + .version("2.1.0") + .build()) + .routesUrl( + "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16/routes") + .spaceUrl( + "/v2/spaces/da37b4b7-2439-4b30-9eb3-bded0dbf690f") + .servicePlanUrl( + "/v2/service_plans/4ec73bf4-9f3a-44c7-bbac-61ee9cb5a511") + .serviceBindingsUrl( + "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16/service_keys") + .sharedFromUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_from") + .sharedToUrl( + "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_to") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicekeys/ReactorServiceKeysTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicekeys/ReactorServiceKeysTest.java new file mode 100644 index 00000000000..a0e3d0f1297 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/servicekeys/ReactorServiceKeysTest.java @@ -0,0 +1,218 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.servicekeys; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.DeleteServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.GetServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.GetServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.ListServiceKeysRequest; +import org.cloudfoundry.client.v2.servicekeys.ListServiceKeysResponse; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyEntity; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceKeysTest extends AbstractClientApiTest { + + private final ReactorServiceKeys serviceKeys = + new ReactorServiceKeys( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_keys") + .payload( + "fixtures/client/v2/service_keys/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_keys/POST_response.json") + .build()) + .build()); + + this.serviceKeys + .create( + CreateServiceKeyRequest.builder() + .name("name-960") + .serviceInstanceId("132944c8-c31d-4bb8-9155-ae4e2ebe1a0c") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceKeyResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:22Z") + .id("79aa4b11-99f3-484b-adfc-a63fa818c4d1") + .url( + "/v2/service_keys/79aa4b11-99f3-484b-adfc-a63fa818c4d1") + .build()) + .entity( + ServiceKeyEntity.builder() + .credential("creds-key-392", "creds-val-392") + .name("name-960") + .serviceInstanceId( + "132944c8-c31d-4bb8-9155-ae4e2ebe1a0c") + .serviceInstanceUrl( + "/v2/service_instances/132944c8-c31d-4bb8-9155-ae4e2ebe1a0c") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_keys/test-service-key-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceKeys + .delete( + DeleteServiceKeyRequest.builder() + .serviceKeyId("test-service-key-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_keys/test-service-key-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_keys/GET_{id}_response.json") + .build()) + .build()); + + this.serviceKeys + .get(GetServiceKeyRequest.builder().serviceKeyId("test-service-key-id").build()) + .as(StepVerifier::create) + .expectNext( + GetServiceKeyResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:23Z") + .id("6ad2cc9b-1996-49a3-9538-dfc0da3b1f32") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/service_keys/6ad2cc9b-1996-49a3-9538-dfc0da3b1f32") + .build()) + .entity( + ServiceKeyEntity.builder() + .credential("creds-key-7", "creds-val-7") + .name("name-140") + .serviceInstanceId( + "ca567b3d-e142-4139-94e3-1e0c010ba728") + .serviceInstanceUrl( + "/v2/service_instances/ca567b3d-e142-4139-94e3-1e0c010ba728") + .serviceKeyParametersUrl( + "/v2/service_keys/6ad2cc9b-1996-49a3-9538-dfc0da3b1f32/parameters") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_keys?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_keys/GET_response.json") + .build()) + .build()); + + this.serviceKeys + .list(ListServiceKeysRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListServiceKeysResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceKeyResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:22Z") + .id( + "3936801c-9d3f-4b9f-8465-aa3bd263612e") + .url( + "/v2/service_keys/3936801c-9d3f-4b9f-8465-aa3bd263612e") + .build()) + .entity( + ServiceKeyEntity.builder() + .credential( + "creds-key-383", + "creds-val-383") + .name("name-934") + .serviceInstanceId( + "84d384d9-42c2-4e4b-a8c6-865e9446e024") + .serviceInstanceUrl( + "/v2/service_instances/84d384d9-42c2-4e4b-a8c6-865e9446e024") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceplans/ReactorServicePlansTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceplans/ReactorServicePlansTest.java new file mode 100644 index 00000000000..6be9486d1b8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceplans/ReactorServicePlansTest.java @@ -0,0 +1,391 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceplans; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlanServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlanServiceInstancesResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansResponse; +import org.cloudfoundry.client.v2.serviceplans.Parameters; +import org.cloudfoundry.client.v2.serviceplans.Schema; +import org.cloudfoundry.client.v2.serviceplans.Schemas; +import org.cloudfoundry.client.v2.serviceplans.ServiceBindingSchema; +import org.cloudfoundry.client.v2.serviceplans.ServiceInstanceSchema; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanEntity; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServicePlansTest extends AbstractClientApiTest { + + private final ReactorServicePlans servicePlans = + new ReactorServicePlans( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_plans/test-service-plan-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.servicePlans + .delete( + DeleteServicePlanRequest.builder() + .servicePlanId("test-service-plan-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_plans/test-service-plan-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/service_plans/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.servicePlans + .delete( + DeleteServicePlanRequest.builder() + .async(true) + .servicePlanId("test-service-plan-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteServicePlanResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + Map details = new HashMap<>(); + details.put( + "description", "Billing account number used to charge use of shared fake server."); + details.put("type", "string"); + + Schema testSchema = + Schema.builder() + .parameters( + Parameters.builder() + .jsonSchema("http://json-schema.org/draft-04/schema#") + .properties( + Collections.singletonMap( + "billing-account", details)) + .type("object") + .build()) + .build(); + + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_plans/test-service-plan-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_plans/GET_{id}_response.json") + .build()) + .build()); + + this.servicePlans + .get(GetServicePlanRequest.builder().servicePlanId("test-service-plan-id").build()) + .as(StepVerifier::create) + .expectNext( + GetServicePlanResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:16Z") + .id("f6ceb8a2-e6fc-43d5-a11b-7ced9e1b47c7") + .url( + "/v2/service_plans/f6ceb8a2-e6fc-43d5-a11b-7ced9e1b47c7") + .build()) + .entity( + ServicePlanEntity.builder() + .name("name-462") + .free(false) + .description("desc-52") + .serviceId("8ac39757-0f9d-4295-9b6f-e626f7ee3cd4") + .uniqueId("2aa0162c-9c88-4084-ad1d-566a09e8d316") + .publiclyVisible(true) + .active(true) + .schemas( + Schemas.builder() + .serviceBinding( + ServiceBindingSchema + .builder() + .create(testSchema) + .build()) + .serviceInstance( + ServiceInstanceSchema + .builder() + .create(testSchema) + .update(testSchema) + .build()) + .build()) + .serviceUrl( + "/v2/services/8ac39757-0f9d-4295-9b6f-e626f7ee3cd4") + .serviceInstancesUrl( + "/v2/service_plans/f6ceb8a2-e6fc-43d5-a11b-7ced9e1b47c7/service_instances") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_plans?q=service_guid%3Atest-service-id&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_plans/GET_response.json") + .build()) + .build()); + + this.servicePlans + .list( + ListServicePlansRequest.builder() + .serviceId("test-service-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServicePlansResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServicePlanResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:16Z") + .id( + "956cb355-3acc-4ced-8161-a57b9b5c7943") + .url( + "/v2/service_plans/956cb355-3acc-4ced-8161-a57b9b5c7943") + .build()) + .entity( + ServicePlanEntity.builder() + .name("name-464") + .free(false) + .description("desc-54") + .serviceId( + "83dc64ef-eb0a-454c-b3d9-c554921f3bd2") + .uniqueId( + "49aee95b-2108-4bbb-9769-c6197f308acf") + .publiclyVisible(true) + .active(true) + .serviceUrl( + "/v2/services/83dc64ef-eb0a-454c-b3d9-c554921f3bd2") + .serviceInstancesUrl( + "/v2/service_plans/956cb355-3acc-4ced-8161-a57b9b5c7943/service_instances") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceInstances() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_plans/test-service-plan-id/service_instances?q=space_guid%3Atest-space-id&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_plans/GET_{id}_service_instances_response.json") + .build()) + .build()); + + this.servicePlans + .listServiceInstances( + ListServicePlanServiceInstancesRequest.builder() + .servicePlanId("test-service-plan-id") + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServicePlanServiceInstancesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceInstanceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:16Z") + .id( + "b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f") + .url( + "/v2/service_instances/b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f") + .build()) + .entity( + ServiceInstanceEntity.builder() + .name("name-457") + .credential( + "creds-key-268", + "creds-val-268") + .servicePlanId( + "bb29926c-7482-4ae5-803c-ec99e95aa278") + .spaceId( + "cf5812f5-bf43-40cc-88d4-d50b76d7797d") + .type("managed_service_instance") + .tags(Collections.emptyList()) + .spaceUrl( + "/v2/spaces/cf5812f5-bf43-40cc-88d4-d50b76d7797d") + .servicePlanUrl( + "/v2/service_plans/bb29926c-7482-4ae5-803c-ec99e95aa278") + .serviceBindingsUrl( + "/v2/service_instances/b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f/service_keys") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/service_plans/test-service-plan-id") + .payload( + "fixtures/client/v2/service_plans/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_plans/PUT_{id}_response.json") + .build()) + .build()); + + this.servicePlans + .update( + UpdateServicePlanRequest.builder() + .servicePlanId("test-service-plan-id") + .publiclyVisible(false) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServicePlanResponse.builder() + .metadata( + Metadata.builder() + .id("195f6bd5-0aa4-4a97-9c8d-5410e5e6d4b6") + .url( + "/v2/service_plans/195f6bd5-0aa4-4a97-9c8d-5410e5e6d4b6") + .createdAt("2016-02-19T02:04:09Z") + .updatedAt("2016-02-19T02:04:09Z") + .build()) + .entity( + ServicePlanEntity.builder() + .name("name-2674") + .free(false) + .description("desc-225") + .serviceId("42bea093-8fe5-491a-8a34-b1943dc3709a") + .uniqueId("7c4f2f8a-aa82-49e9-9f0c-76248aa1036d") + .publiclyVisible(false) + .active(true) + .serviceUrl( + "/v2/services/42bea093-8fe5-491a-8a34-b1943dc3709a") + .serviceInstancesUrl( + "/v2/service_plans/195f6bd5-0aa4-4a97-9c8d-5410e5e6d4b6/service_instances") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceplanvisibilities/ReactorServicePlanVisibilitiesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceplanvisibilities/ReactorServicePlanVisibilitiesTest.java new file mode 100644 index 00000000000..0c17705b272 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceplanvisibilities/ReactorServicePlanVisibilitiesTest.java @@ -0,0 +1,334 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceplanvisibilities; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.GetServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.GetServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilities; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityEntity; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityResource; +import org.cloudfoundry.client.v2.serviceplanvisibilities.UpdateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.UpdateServicePlanVisibilityResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServicePlanVisibilitiesTest extends AbstractClientApiTest { + + private final ServicePlanVisibilities servicePlanVisibilities = + new ReactorServicePlanVisibilities( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_plan_visibilities") + .payload( + "fixtures/client/v2/service_plan_visibilities/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_plan_visibilities/POST_response.json") + .build()) + .build()); + + this.servicePlanVisibilities + .create( + CreateServicePlanVisibilityRequest.builder() + .organizationId("09be17a1-0cc6-4edb-955c-cf2a2ae85470") + .servicePlanId("43f5496b-9117-404a-a637-eb38141b05af") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServicePlanVisibilityResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:28Z") + .id("28a22749-25f4-44bd-a371-c37e2ee53175") + .url( + "/v2/service_plan_visibilities/28a22749-25f4-44bd-a371-c37e2ee53175") + .build()) + .entity( + ServicePlanVisibilityEntity.builder() + .organizationId( + "09be17a1-0cc6-4edb-955c-cf2a2ae85470") + .organizationUrl( + "/v2/organizations/09be17a1-0cc6-4edb-955c-cf2a2ae85470") + .servicePlanId( + "43f5496b-9117-404a-a637-eb38141b05af") + .servicePlanUrl( + "/v2/service_plans/43f5496b-9117-404a-a637-eb38141b05af") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_plan_visibilities/test-service-plan-visibility-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.servicePlanVisibilities + .delete( + DeleteServicePlanVisibilityRequest.builder() + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_plan_visibilities/test-service-plan-visibility-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/service_plan_visibilities/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.servicePlanVisibilities + .delete( + DeleteServicePlanVisibilityRequest.builder() + .async(true) + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteServicePlanVisibilityResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_plan_visibilities/test-service-plan-visibility-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_plan_visibilities/GET_{id}_response.json") + .build()) + .build()); + + this.servicePlanVisibilities + .get( + GetServicePlanVisibilityRequest.builder() + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServicePlanVisibilityResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:28Z") + .id("18365c25-898b-4365-911d-6f6a09154297") + .url( + "/v2/service_plan_visibilities/18365c25-898b-4365-911d-6f6a09154297") + .build()) + .entity( + ServicePlanVisibilityEntity.builder() + .organizationId( + "a1cc950b-ed5b-41eb-8eee-d9a8f85aa1ea") + .organizationUrl( + "/v2/organizations/a1cc950b-ed5b-41eb-8eee-d9a8f85aa1ea") + .servicePlanId( + "ea1ba716-e720-4aef-8a90-439924bb53d0") + .servicePlanUrl( + "/v2/service_plans/ea1ba716-e720-4aef-8a90-439924bb53d0") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_plan_visibilities?q=organization_guid%3Atest-organization-id&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_plan_visibilities/GET_response.json") + .build()) + .build()); + + this.servicePlanVisibilities + .list( + ListServicePlanVisibilitiesRequest.builder() + .organizationId("test-organization-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServicePlanVisibilitiesResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + ServicePlanVisibilityResource.builder() + .metadata( + Metadata.builder() + .id( + "3d5c0584-fbf0-4d75-b68e-226e77496f69") + .url( + "/v2/service_plan_visibilities/3d5c0584-fbf0-4d75-b68e-226e77496f69") + .createdAt("2015-07-27T22:43:28Z") + .build()) + .entity( + ServicePlanVisibilityEntity.builder() + .organizationId( + "1dbe25db-6a8c-43e7-a941-cc483bb45570") + .organizationUrl( + "/v2/organizations/1dbe25db-6a8c-43e7-a941-cc483bb45570") + .servicePlanId( + "69cab29d-826c-48bf-b435-b43013f9c11b") + .servicePlanUrl( + "/v2/service_plans/69cab29d-826c-48bf-b435-b43013f9c11b") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/service_plan_visibilities/test-service-plan-visibility-id") + .payload( + "fixtures/client/v2/service_plan_visibilities/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/service_plan_visibilities/PUT_{id}_response.json") + .build()) + .build()); + + this.servicePlanVisibilities + .update( + UpdateServicePlanVisibilityRequest.builder() + .organizationId("e4d0b68b-9e73-4253-b03f-2bfda6cd814b") + .servicePlanId("7288464d-3866-436a-915c-2bada4725e7e") + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServicePlanVisibilityResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:28Z") + .id("5f1514f9-66ee-4799-9de2-69f2ec3cb5f1") + .updatedAt("2015-07-27T22:43:28Z") + .url( + "/v2/service_plan_visibilities/5f1514f9-66ee-4799-9de2-69f2ec3cb5f1") + .build()) + .entity( + ServicePlanVisibilityEntity.builder() + .organizationId( + "e4d0b68b-9e73-4253-b03f-2bfda6cd814b") + .organizationUrl( + "/v2/organizations/e4d0b68b-9e73-4253-b03f-2bfda6cd814b") + .servicePlanId( + "7288464d-3866-436a-915c-2bada4725e7e") + .servicePlanUrl( + "/v2/service_plans/7288464d-3866-436a-915c-2bada4725e7e") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/services/ReactorServicesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/services/ReactorServicesTest.java new file mode 100644 index 00000000000..8250ab197bf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/services/ReactorServicesTest.java @@ -0,0 +1,285 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.services; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanEntity; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.services.DeleteServiceRequest; +import org.cloudfoundry.client.v2.services.DeleteServiceResponse; +import org.cloudfoundry.client.v2.services.GetServiceRequest; +import org.cloudfoundry.client.v2.services.GetServiceResponse; +import org.cloudfoundry.client.v2.services.ListServiceServicePlansRequest; +import org.cloudfoundry.client.v2.services.ListServiceServicePlansResponse; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ListServicesResponse; +import org.cloudfoundry.client.v2.services.ServiceEntity; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServicesTest extends AbstractClientApiTest { + + private final ReactorServices services = + new ReactorServices( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/services/test-service-id?purge=true") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.services + .delete( + DeleteServiceRequest.builder() + .purge(true) + .serviceId("test-service-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/services/test-service-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/services/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.services + .delete( + DeleteServiceRequest.builder() + .async(true) + .serviceId("test-service-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteServiceResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/services/test-service-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/services/GET_{id}_response.json") + .build()) + .build()); + + this.services + .get(GetServiceRequest.builder().serviceId("test-service-id").build()) + .as(StepVerifier::create) + .expectNext( + GetServiceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:32Z") + .id("53f52780-e93c-4af7-a96c-6958311c40e5") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5") + .build()) + .entity( + ServiceEntity.builder() + .active(true) + .bindable(true) + .bindingsRetrievable(false) + .description("desc-135") + .instancesRetrievable(false) + .label("label-58") + .planUpdateable(false) + .serviceBrokerId( + "0e7250aa-364f-42c2-8fd2-808b0224376f") + .servicePlansUrl( + "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5/service_plans") + .uniqueId("c181996b-f233-43d1-8901-3a43eafcaacf") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/services?q=label%3Atest-label&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/services/GET_response.json") + .build()) + .build()); + + this.services + .list(ListServicesRequest.builder().label("test-label").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListServicesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceResource.builder() + .metadata( + Metadata.builder() + .id( + "69b84c38-e786-4270-9cca-59d02a700798") + .url( + "/v2/services/69b84c38-e786-4270-9cca-59d02a700798") + .createdAt("2015-07-27T22:43:35Z") + .build()) + .entity( + ServiceEntity.builder() + .label("label-87") + .description("desc-220") + .active(true) + .bindable(true) + .requires(Collections.emptyList()) + .tags(Collections.emptyList()) + .uniqueId( + "e46b095e-aa85-4ffb-98d9-0bc94b84d45c") + .serviceBrokerId( + "5c323c18-e26c-45ff-a4f9-6a8916912a22") + .planUpdateable(false) + .servicePlansUrl( + "/v2/services/69b84c38-e786-4270-9cca-59d02a700798/service_plans") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServicePlans() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/services/f1b0edbe-fac4-4512-9071-8b26045413bb/service_plans?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/services/GET_{id}_service_plans_response.json") + .build()) + .build()); + + this.services + .listServicePlans( + ListServiceServicePlansRequest.builder() + .serviceId("f1b0edbe-fac4-4512-9071-8b26045413bb") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceServicePlansResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServicePlanResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:35Z") + .id( + "51067400-d79f-4ca5-9400-1f36f5dd09e7") + .url( + "/v2/service_plans/51067400-d79f-4ca5-9400-1f36f5dd09e7") + .build()) + .entity( + ServicePlanEntity.builder() + .name("name-2409") + .free(false) + .description("desc-218") + .serviceId( + "f1b0edbe-fac4-4512-9071-8b26045413bb") + .uniqueId( + "48fb5a34-1c14-4da5-944e-a14fa1ba5325") + .publiclyVisible(true) + .active(true) + .serviceUrl( + "/v2/services/f1b0edbe-fac4-4512-9071-8b26045413bb") + .serviceInstancesUrl( + "/v2/service_plans/51067400-d79f-4ca5-9400-1f36f5dd09e7/service_instances") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceusageevents/ReactorServiceUsageEventsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceusageevents/ReactorServiceUsageEventsTest.java new file mode 100644 index 00000000000..f4b8855dc93 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/serviceusageevents/ReactorServiceUsageEventsTest.java @@ -0,0 +1,187 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.serviceusageevents; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.serviceusageevents.GetServiceUsageEventRequest; +import org.cloudfoundry.client.v2.serviceusageevents.GetServiceUsageEventResponse; +import org.cloudfoundry.client.v2.serviceusageevents.ListServiceUsageEventsRequest; +import org.cloudfoundry.client.v2.serviceusageevents.ListServiceUsageEventsResponse; +import org.cloudfoundry.client.v2.serviceusageevents.PurgeAndReseedServiceUsageEventsRequest; +import org.cloudfoundry.client.v2.serviceusageevents.ServiceUsageEventEntity; +import org.cloudfoundry.client.v2.serviceusageevents.ServiceUsageEventResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceUsageEventsTest extends AbstractClientApiTest { + + private final ReactorServiceUsageEvents serviceUsageEvents = + new ReactorServiceUsageEvents( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_usage_events/9470627d-0488-4d9a-8564-f97571487893") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_usage_events/GET_{id}_response.json") + .build()) + .build()); + + this.serviceUsageEvents + .get( + GetServiceUsageEventRequest.builder() + .serviceUsageEventId("9470627d-0488-4d9a-8564-f97571487893") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceUsageEventResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:30Z") + .id("9470627d-0488-4d9a-8564-f97571487893") + .url( + "/v2/service_usage_events/9470627d-0488-4d9a-8564-f97571487893") + .build()) + .entity( + ServiceUsageEventEntity.builder() + .state("CREATED") + .organizationId( + "guid-3f19bc03-d183-4189-bdeb-9f33468181da") + .spaceId( + "guid-d565b0c4-3c38-41dd-a102-1c113c759fbf") + .spaceName("name-2160") + .serviceInstanceId( + "guid-4cef8892-46fc-4d70-a5d5-36385989f5df") + .serviceInstanceName("name-2161") + .serviceInstanceType("type-4") + .servicePlanId( + "guid-f2a17886-488c-4066-9155-a1dbb64adadd") + .servicePlanName("name-2162") + .serviceId( + "guid-fdff7ee0-cc1b-4bdb-87d6-b0c3b47cb2b2") + .serviceLabel("label-79") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_usage_events?after_guid=e5defac2-4ae1-44ac-a3d0-1684ae657453&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/service_usage_events/GET_response.json") + .build()) + .build()); + + this.serviceUsageEvents + .list( + ListServiceUsageEventsRequest.builder() + .afterServiceUsageEventId("e5defac2-4ae1-44ac-a3d0-1684ae657453") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceUsageEventsResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + ServiceUsageEventResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:30Z") + .id( + "0c9c59b8-3462-4acf-be39-aa987f087146") + .url( + "/v2/service_usage_events/0c9c59b8-3462-4acf-be39-aa987f087146") + .build()) + .entity( + ServiceUsageEventEntity.builder() + .state("CREATED") + .organizationId( + "guid-4dd5a051-3460-4246-a842-1dc2d5983c51") + .spaceId( + "guid-76bd662b-fd5b-4b5c-a393-d65e67f99d53") + .spaceName("name-2154") + .serviceInstanceId( + "guid-15a7c119-838d-4516-acd9-062dec25d934") + .serviceInstanceName("name-2155") + .serviceInstanceType("type-2") + .servicePlanId( + "guid-eddab64c-7be0-407e-91b0-82a8093cdfc5") + .servicePlanName("name-2156") + .serviceId( + "guid-d471c693-824c-44a6-b069-a679e323326d") + .serviceLabel("label-77") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void purgeAndReseed() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/service_usage_events/destructively_purge_all_and_reseed_existing_instances") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceUsageEvents + .purgeAndReseed(PurgeAndReseedServiceUsageEventsRequest.builder().build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/shareddomains/ReactorSharedDomainsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/shareddomains/ReactorSharedDomainsTest.java new file mode 100644 index 00000000000..de1cf17a452 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/shareddomains/ReactorSharedDomainsTest.java @@ -0,0 +1,322 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.shareddomains; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.DeleteSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.DeleteSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainEntity; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Nested; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorSharedDomainsTest extends AbstractClientApiTest { + + private final ReactorSharedDomains sharedDomains = + new ReactorSharedDomains( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/shared_domains") + .payload( + "fixtures/client/v2/shared_domains/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/shared_domains/POST_response.json") + .build()) + .build()); + + this.sharedDomains + .create( + CreateSharedDomainRequest.builder() + .name("shared-domain.com") + .routerGroupId("random-guid") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSharedDomainResponse.builder() + .metadata( + Metadata.builder() + .id("d6c7d452-70bb-4edd-bbf1-a925dd51732c") + .url( + "/v2/shared_domains/d6c7d452-70bb-4edd-bbf1-a925dd51732c") + .createdAt("2016-04-22T19:33:17Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("example.com") + .routerGroupId("my-random-guid") + .routerGroupType("tcp") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/shared_domains/fa1385de-55ba-41d3-beb2-f83919c634d6") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.sharedDomains + .delete( + DeleteSharedDomainRequest.builder() + .sharedDomainId("fa1385de-55ba-41d3-beb2-f83919c634d6") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/shared_domains/fa1385de-55ba-41d3-beb2-f83919c634d6?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/shared_domains/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.sharedDomains + .delete( + DeleteSharedDomainRequest.builder() + .async(true) + .sharedDomainId("fa1385de-55ba-41d3-beb2-f83919c634d6") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteSharedDomainResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSharedDomains() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/shared_domains?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/shared_domains/GET_response.json") + .build()) + .build()); + + this.sharedDomains + .list(ListSharedDomainsRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListSharedDomainsResponse.builder() + .totalResults(5) + .totalPages(1) + .resource( + SharedDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "f01b174d-c750-46b0-9ddf-3aeb2064d796") + .url( + "/v2/shared_domains/f01b174d-c750-46b0-9ddf-3aeb2064d796") + .createdAt("2015-11-30T23:38:35Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("customer-app-domain1.com") + .build()) + .build()) + .resource( + SharedDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "3595f6cb-81cf-424e-a546-533877ccccfd") + .url( + "/v2/shared_domains/3595f6cb-81cf-424e-a546-533877ccccfd") + .createdAt("2015-11-30T23:38:35Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("customer-app-domain2.com") + .build()) + .build()) + .resource( + SharedDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "d0d28c59-86ee-4415-9269-500976f18e72") + .url( + "/v2/shared_domains/d0d28c59-86ee-4415-9269-500976f18e72") + .createdAt("2015-11-30T23:38:35Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("domain-19.example.com") + .build()) + .build()) + .resource( + SharedDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "b7242cdb-f81a-4469-b897-d5a218470fdf") + .url( + "/v2/shared_domains/b7242cdb-f81a-4469-b897-d5a218470fdf") + .createdAt("2015-11-30T23:38:35Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("domain-20.example.com") + .build()) + .build()) + .resource( + SharedDomainResource.builder() + .metadata( + Metadata.builder() + .id( + "130c193c-c1c6-41c9-98c2-4a0e16a948bf") + .url( + "/v2/shared_domains/130c193c-c1c6-41c9-98c2-4a0e16a948bf") + .createdAt("2015-11-30T23:38:35Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("domain-21.example.com") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Nested + public final class Get extends AbstractClientApiTest { + + private final ReactorSharedDomains sharedDomains = + new ReactorSharedDomains( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest(interactionContext()); + + this.sharedDomains + .get( + GetSharedDomainRequest.builder() + .sharedDomainId("fa1385de-55ba-41d3-beb2-f83919c634d6") + .build()) + .as(StepVerifier::create) + .expectNext( + GetSharedDomainResponse.builder() + .metadata( + Metadata.builder() + .id("fa1385de-55ba-41d3-beb2-f83919c634d6") + .url( + "/v2/shared_domains/fa1385de-55ba-41d3-beb2-f83919c634d6") + .createdAt("2016-06-08T16:41:33Z") + .build()) + .entity( + SharedDomainEntity.builder() + .name("customer-app-domain1.com") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + public InteractionContext interactionContext() { + return InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/shared_domains/fa1385de-55ba-41d3-beb2-f83919c634d6") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/shared_domains/GET_{id}_response.json") + .build()) + .build(); + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/spacequotadefinitions/ReactorSpaceQuotaDefinitionsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/spacequotadefinitions/ReactorSpaceQuotaDefinitionsTest.java new file mode 100644 index 00000000000..b2cc4554b0f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/spacequotadefinitions/ReactorSpaceQuotaDefinitionsTest.java @@ -0,0 +1,523 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.spacequotadefinitions; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.AssociateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.AssociateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.CreateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.CreateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.DeleteSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.DeleteSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionSpacesRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionSpacesResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.RemoveSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.UpdateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.UpdateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorSpaceQuotaDefinitionsTest extends AbstractClientApiTest { + + private final ReactorSpaceQuotaDefinitions spaceQuotaDefinitions = + new ReactorSpaceQuotaDefinitions( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/space_quota_definitions/test-space-quota-definition-id/spaces/test-space-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/space_quota_definitions/PUT_{id}_spaces_{id}_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .associateSpace( + AssociateSpaceQuotaDefinitionRequest.builder() + .spaceId("test-space-id") + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .id("ea82f16c-c21a-4a8a-947a-f7606e7f63fa") + .url( + "/v2/space_quota_definitions/ea82f16c-c21a-4a8a-947a-f7606e7f63fa") + .createdAt("2015-11-30T23:38:46Z") + .build()) + .entity( + SpaceQuotaDefinitionEntity.builder() + .name("name-1887") + .organizationId( + "e188543a-cb71-4786-8703-9addbebc5bbf") + .nonBasicServicesAllowed(true) + .totalServices(60) + .totalRoutes(1000) + .memoryLimit(20480) + .instanceMemoryLimit(-1) + .applicationInstanceLimit(-1) + .organizationUrl( + "/v2/organizations/e188543a-cb71-4786-8703-9addbebc5bbf") + .spacesUrl( + "/v2/space_quota_definitions/ea82f16c-c21a-4a8a-947a-f7606e7f63fa/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/space_quota_definitions") + .payload( + "fixtures/client/v2/space_quota_definitions/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/space_quota_definitions/POST_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .create( + CreateSpaceQuotaDefinitionRequest.builder() + .name("gold_quota") + .nonBasicServicesAllowed(true) + .totalServices(-1) + .totalRoutes(10) + .memoryLimit(5120) + .organizationId("c9b4ac17-ab4b-4368-b3e2-5cbf09b17a24") + .totalReservedRoutePorts(5) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSpaceQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .id("17f055b8-b4c8-47cf-8737-0220d5706b4a") + .url( + "/v2/space_quota_definitions/17f055b8-b4c8-47cf-8737-0220d5706b4a") + .createdAt("2016-06-08T16:41:29Z") + .build()) + .entity( + SpaceQuotaDefinitionEntity.builder() + .name("gold_quota") + .organizationId( + "c9b4ac17-ab4b-4368-b3e2-5cbf09b17a24") + .nonBasicServicesAllowed(true) + .totalServices(-1) + .totalRoutes(10) + .memoryLimit(5120) + .instanceMemoryLimit(-1) + .applicationInstanceLimit(-1) + .applicationTaskLimit(5) + .totalServiceKeys(-1) + .totalReservedRoutePorts(5) + .organizationUrl( + "/v2/organizations/c9b4ac17-ab4b-4368-b3e2-5cbf09b17a24") + .spacesUrl( + "/v2/space_quota_definitions/17f055b8-b4c8-47cf-8737-0220d5706b4a/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/space_quota_definitions/test-space-quota-definition-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaceQuotaDefinitions + .delete( + DeleteSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/space_quota_definitions/test-space-quota-definition-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/space_quota_definitions/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .delete( + DeleteSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .async(true) + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteSpaceQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getSpaceQuotaDefinition() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/space_quota_definitions/test-space-quota-definition-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/space_quota_definitions/GET_{id}_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .get( + GetSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetSpaceQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .id("4b8e7d14-71bd-4abb-b474-183375c75c84") + .url( + "/v2/space_quota_definitions/4b8e7d14-71bd-4abb-b474-183375c75c84") + .createdAt("2015-11-30T23:38:46Z") + .build()) + .entity( + SpaceQuotaDefinitionEntity.builder() + .name("name-1892") + .organizationId( + "0dbbac8c-16ac-4ba5-8f59-3d3a79874f5d") + .nonBasicServicesAllowed(true) + .totalServices(60) + .totalRoutes(1000) + .memoryLimit(20480) + .instanceMemoryLimit(-1) + .applicationInstanceLimit(-1) + .organizationUrl( + "/v2/organizations/0dbbac8c-16ac-4ba5-8f59-3d3a79874f5d") + .spacesUrl( + "/v2/space_quota_definitions/4b8e7d14-71bd-4abb-b474-183375c75c84/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/space_quota_definitions?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/space_quota_definitions/GET_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .list(ListSpaceQuotaDefinitionsRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceQuotaDefinitionsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceQuotaDefinitionResource.builder() + .metadata( + Metadata.builder() + .id( + "be2d5c01-3413-43db-bea2-49b0b60ec74d") + .url( + "/v2/space_quota_definitions/be2d5c01-3413-43db-bea2-49b0b60ec74d") + .createdAt("2015-07-27T22:43:32Z") + .build()) + .entity( + SpaceQuotaDefinitionEntity.builder() + .name("name-2236") + .organizationId( + "a81d5218-b473-474e-9afb-3223a8b2ae9f") + .nonBasicServicesAllowed(true) + .totalServices(60) + .totalRoutes(1000) + .memoryLimit(20480) + .instanceMemoryLimit(-1) + .organizationUrl( + "/v2/organizations/a81d5218-b473-474e-9afb-3223a8b2ae9f") + .spacesUrl( + "/v2/space_quota_definitions/be2d5c01-3413-43db-bea2-49b0b60ec74d/spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/space_quota_definitions/e37cdd97-af56-4417-a99d-060093057275/spaces") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/space_quota_definitions/GET_{id}_spaces_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest.builder() + .spaceQuotaDefinitionId("e37cdd97-af56-4417-a99d-060093057275") + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceQuotaDefinitionSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:29Z") + .id( + "a1f21571-07a6-42df-b9c0-501b97fac05b") + .updatedAt("2016-06-08T16:41:29Z") + .url( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b") + .build()) + .entity( + SpaceEntity.builder() + .name("name-1473") + .organizationId( + "e0878e36-e2f3-4290-b7c6-50f825ce6c77") + .organizationUrl( + "/v2/organizations/e0878e36-e2f3-4290-b7c6-50f825ce6c77") + .spaceQuotaDefinitionId( + "e37cdd97-af56-4417-a99d-060093057275") + .spaceQuotaDefinitionUrl( + "/v2/space_quota_definitions/e37cdd97-af56-4417-a99d-060093057275") + .allowSsh(true) + .developersUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/developers") + .managersUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/managers") + .auditorsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/auditors") + .applicationsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/apps") + .routesUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/routes") + .domainsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/domains") + .serviceInstancesUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/service_instances") + .applicationEventsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/app_events") + .eventsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/events") + .securityGroupsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/security_groups") + .stagingSecurityGroupsUrl( + "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/staging_security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/space_quota_definitions/test-space-quota-definition-id/spaces/test-space-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaceQuotaDefinitions + .removeSpace( + RemoveSpaceQuotaDefinitionRequest.builder() + .spaceId("test-space-id") + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/space_quota_definitions/bbd837ac-309d-4f53-9d49-67cb75364904") + .payload( + "fixtures/client/v2/space_quota_definitions/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/space_quota_definitions/PUT_{id}_response.json") + .build()) + .build()); + + this.spaceQuotaDefinitions + .update( + UpdateSpaceQuotaDefinitionRequest.builder() + .name("new_name") + .spaceQuotaDefinitionId("bbd837ac-309d-4f53-9d49-67cb75364904") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateSpaceQuotaDefinitionResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:29Z") + .id("bbd837ac-309d-4f53-9d49-67cb75364904") + .updatedAt("2016-06-08T16:41:29Z") + .url( + "/v2/space_quota_definitions/bbd837ac-309d-4f53-9d49-67cb75364904") + .build()) + .entity( + SpaceQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(5) + .instanceMemoryLimit(-1) + .memoryLimit(20480) + .name("new_name") + .nonBasicServicesAllowed(true) + .organizationId( + "dbd76462-6fec-4add-aaca-35b2ca7493bb") + .organizationUrl( + "/v2/organizations/dbd76462-6fec-4add-aaca-35b2ca7493bb") + .spacesUrl( + "/v2/space_quota_definitions/bbd837ac-309d-4f53-9d49-67cb75364904/spaces") + .totalReservedRoutePorts(-1) + .totalRoutes(1000) + .totalServices(60) + .totalServiceKeys(600) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/spaces/ReactorSpacesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/spaces/ReactorSpacesTest.java new file mode 100644 index 00000000000..9064651bdd2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/spaces/ReactorSpacesTest.java @@ -0,0 +1,2066 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.spaces; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.client.v2.securitygroups.Protocol.UDP; +import static org.cloudfoundry.client.v2.serviceinstances.ServiceInstance.builder; + +import java.time.Duration; +import java.util.Collections; +import java.util.Optional; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.DockerCredentials; +import org.cloudfoundry.client.v2.domains.Domain; +import org.cloudfoundry.client.v2.domains.DomainEntity; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.cloudfoundry.client.v2.events.EventEntity; +import org.cloudfoundry.client.v2.events.EventResource; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.routes.Route; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.securitygroups.RuleEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v2.serviceinstances.LastOperation; +import org.cloudfoundry.client.v2.serviceinstances.Plan; +import org.cloudfoundry.client.v2.serviceinstances.Service; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.services.ServiceEntity; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceSecurityGroupResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceDomainsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDomainsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceEventsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceEventsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceUserRolesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceUserRolesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.SpaceApplicationSummary; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceResponse; +import org.cloudfoundry.client.v2.spaces.UserSpaceRoleEntity; +import org.cloudfoundry.client.v2.spaces.UserSpaceRoleResource; +import org.cloudfoundry.client.v2.users.UserEntity; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.cloudfoundry.util.FluentMap; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorSpacesTest extends AbstractClientApiTest { + + private final ReactorSpaces spaces = + new ReactorSpaces( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateAuditor() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id/auditors/test-auditor-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_auditors_{id}_response.json") + .build()) + .build()); + + this.spaces + .associateAuditor( + AssociateSpaceAuditorRequest.builder() + .spaceId("test-space-id") + .auditorId("test-auditor-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceAuditorResponse.builder() + .metadata( + Metadata.builder() + .id("9639c996-9005-4b70-b852-d40f346d58dc") + .url( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-59") + .organizationId( + "bc168e1d-b399-4624-b7f6-fbe64eeb870f") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/bc168e1d-b399-4624-b7f6-fbe64eeb870f") + .developersUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/developers") + .managersUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/managers") + .auditorsUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/auditors") + .applicationsUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/apps") + .routesUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/routes") + .domainsUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/domains") + .serviceInstancesUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/service_instances") + .applicationEventsUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/app_events") + .eventsUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/events") + .securityGroupsUrl( + "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateAuditorByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id/auditors") + .payload( + "fixtures/client/v2/spaces/PUT_{id}_auditors_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_auditors_response.json") + .build()) + .build()); + + this.spaces + .associateAuditorByUsername( + AssociateSpaceAuditorByUsernameRequest.builder() + .spaceId("test-space-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceAuditorByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("873193ee-878c-436f-80bd-10d68927937d") + .url( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d") + .createdAt("2015-11-30T23:38:28Z") + .build()) + .entity( + SpaceEntity.builder() + .allowSsh(true) + .applicationEventsUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/app_events") + .applicationsUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/apps") + .auditorsUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/auditors") + .developersUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/developers") + .domainsUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/domains") + .eventsUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/events") + .managersUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/managers") + .name("name-101") + .organizationId( + "5fddaf61-092d-4b33-9490-8350963db89e") + .organizationUrl( + "/v2/organizations/5fddaf61-092d-4b33-9490-8350963db89e") + .routesUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/routes") + .securityGroupsUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/security_groups") + .serviceInstancesUrl( + "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/service_instances") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateDeveloper() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id/developers/test-developer-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_developers_{id}_response.json") + .build()) + .build()); + + this.spaces + .associateDeveloper( + AssociateSpaceDeveloperRequest.builder() + .spaceId("test-space-id") + .developerId("test-developer-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceDeveloperResponse.builder() + .metadata( + Metadata.builder() + .id("6f8f8e0d-54f2-4736-a08e-1044fcf061d3") + .url( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-68") + .organizationId( + "5b556f7c-63f5-43e5-9522-c4fec533b09d") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/5b556f7c-63f5-43e5-9522-c4fec533b09d") + .developersUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/developers") + .managersUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/managers") + .auditorsUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/auditors") + .applicationsUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/apps") + .routesUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/routes") + .domainsUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/domains") + .serviceInstancesUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/service_instances") + .applicationEventsUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/app_events") + .eventsUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/events") + .securityGroupsUrl( + "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateManager() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id/managers/test-manager-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_managers_{id}_response.json") + .build()) + .build()); + + this.spaces + .associateManager( + AssociateSpaceManagerRequest.builder() + .spaceId("test-space-id") + .managerId("test-manager-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceManagerResponse.builder() + .metadata( + Metadata.builder() + .id("542943ff-a40b-4004-9559-434b0169508c") + .url( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-85") + .organizationId( + "0a68fcd5-dc1c-48d0-98dc-33008ce0d7ce") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/0a68fcd5-dc1c-48d0-98dc-33008ce0d7ce") + .developersUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/developers") + .managersUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/managers") + .auditorsUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/auditors") + .applicationsUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/apps") + .routesUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/routes") + .domainsUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/domains") + .serviceInstancesUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/service_instances") + .applicationEventsUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/app_events") + .eventsUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/events") + .securityGroupsUrl( + "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateSecurityGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/spaces/test-space-id/security_groups/test-security-group-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_security_group_{id}_response.json") + .build()) + .build()); + + this.spaces + .associateSecurityGroup( + AssociateSpaceSecurityGroupRequest.builder() + .spaceId("test-space-id") + .securityGroupId("test-security-group-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceSecurityGroupResponse.builder() + .metadata( + Metadata.builder() + .id("c9424692-395b-403b-90e6-10049bbd9e23") + .url( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23") + .createdAt("2015-07-27T22:43:06Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-39") + .organizationId( + "67096164-bdcf-4b53-92e1-a2991882a066") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/67096164-bdcf-4b53-92e1-a2991882a066") + .developersUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/developers") + .managersUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/managers") + .auditorsUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/auditors") + .applicationsUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/apps") + .routesUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/routes") + .domainsUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/domains") + .serviceInstancesUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/service_instances") + .applicationEventsUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/app_events") + .eventsUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/events") + .securityGroupsUrl( + "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateSpaceDeveloperByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id/developers") + .payload( + "fixtures/client/v2/spaces/PUT_{id}_developers_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_developers_response.json") + .build()) + .build()); + + this.spaces + .associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest.builder() + .spaceId("test-space-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceDeveloperByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("b6d11f17-1cea-4c00-a951-fef3223b8c84") + .url( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84") + .createdAt("2015-11-30T23:38:27Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-58") + .organizationId( + "b13bbebe-427e-424d-8820-2937f7e218d5") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/b13bbebe-427e-424d-8820-2937f7e218d5") + .developersUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/developers") + .managersUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/managers") + .auditorsUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/auditors") + .applicationsUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/apps") + .routesUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/routes") + .domainsUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/domains") + .serviceInstancesUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/service_instances") + .applicationEventsUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/app_events") + .eventsUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/events") + .securityGroupsUrl( + "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateSpaceManagerByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id/managers") + .payload( + "fixtures/client/v2/spaces/PUT_{id}_managers_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/PUT_{id}_managers_response.json") + .build()) + .build()); + + this.spaces + .associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId("test-space-id") + .username("user@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateSpaceManagerByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("4351f97b-3485-4738-821b-5bf77bed44eb") + .url( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb") + .createdAt("2015-11-30T23:38:28Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-98") + .organizationId( + "a488910d-2d69-46a2-bf6e-319248e03705") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/a488910d-2d69-46a2-bf6e-319248e03705") + .developersUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/developers") + .managersUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/managers") + .auditorsUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/auditors") + .applicationsUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/apps") + .routesUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/routes") + .domainsUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/domains") + .serviceInstancesUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/service_instances") + .applicationEventsUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/app_events") + .eventsUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/events") + .securityGroupsUrl( + "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/spaces") + .payload("fixtures/client/v2/spaces/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/spaces/POST_response.json") + .build()) + .build()); + + this.spaces + .create( + CreateSpaceRequest.builder() + .name("development") + .organizationId("c523070c-3006-4715-86dd-414afaecd949") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSpaceResponse.builder() + .metadata( + Metadata.builder() + .id("d29dc30c-793c-49a6-97fe-9aff75dcbd12") + .url( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12") + .createdAt("2015-07-27T22:43:08Z") + .build()) + .entity( + SpaceEntity.builder() + .name("development") + .organizationId( + "c523070c-3006-4715-86dd-414afaecd949") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/c523070c-3006-4715-86dd-414afaecd949") + .developersUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/developers") + .managersUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/managers") + .auditorsUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/auditors") + .applicationsUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/apps") + .routesUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/routes") + .domainsUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/domains") + .serviceInstancesUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/service_instances") + .applicationEventsUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/app_events") + .eventsUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/events") + .securityGroupsUrl( + "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaces + .delete(DeleteSpaceRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.spaces + .delete(DeleteSpaceRequest.builder().async(true).spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext( + DeleteSpaceResponse.builder() + .metadata( + Metadata.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .createdAt("2016-02-02T17:16:31Z") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteRecursive() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id?recursive=true") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaces + .delete( + DeleteSpaceRequest.builder() + .recursive(true) + .spaceId("test-space-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/spaces/GET_{id}_response.json") + .build()) + .build()); + + this.spaces + .get(GetSpaceRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext( + GetSpaceResponse.builder() + .metadata( + Metadata.builder() + .id("0f102457-c1fc-42e5-9c81-c7be2bc65dcd") + .url( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd") + .createdAt("2015-07-27T22:43:08Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-108") + .organizationId( + "525a31fb-bc2b-4f7f-865e-1c93b42a6762") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/525a31fb-bc2b-4f7f-865e-1c93b42a6762") + .developersUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/developers") + .managersUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/managers") + .auditorsUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/auditors") + .applicationsUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/apps") + .routesUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/routes") + .domainsUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/domains") + .serviceInstancesUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/service_instances") + .applicationEventsUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/app_events") + .eventsUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/events") + .securityGroupsUrl( + "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void getSummary() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/summary") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_summary_response.json") + .build()) + .build()); + + this.spaces + .getSummary(GetSpaceSummaryRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext( + GetSpaceSummaryResponse.builder() + .id("c6473a38-92f4-4595-9462-01af4c4b1893") + .name("name-159") + .application( + SpaceApplicationSummary.builder() + .id("e378968e-89d4-4e84-bce5-ee997daea898") + .url("host-1.domain-5.example.com") + .route( + Route.builder() + .id( + "812c7de6-b14f-4193-8c95-74449c5ae0e4") + .host("host-1") + .path("") + .domain( + Domain.builder() + .id( + "0a7c349f-84c4-4fde-867d-a73814c66168") + .name( + "domain-5.example.com") + .build()) + .build()) + .serviceCount(1) + .environmentJsons(Collections.emptyMap()) + .serviceName("name-162") + .runningInstances(0) + .name("name-165") + .production(false) + .spaceId("c6473a38-92f4-4595-9462-01af4c4b1893") + .stackId("eefe21a1-6878-40d1-8485-80a88cfdbbe4") + .memory(1024) + .instances(1) + .diskQuota(1024) + .state("STOPPED") + .version("2bea31d1-b0b7-467d-9794-62dd7f0dd200") + .console(false) + .packageState("PENDING") + .healthCheckType("port") + .diego(false) + .ports(Collections.emptyList()) + .packageUpdatedAt("2016-04-22T19:33:13Z") + .detectedStartCommand("") + .enableSsh(true) + .dockerCredentials( + DockerCredentials.builder().build()) + .build()) + .service( + builder() + .id("a049e5e8-8597-469e-b1c6-ddb8eb2c0af0") + .name("name-162") + .boundApplicationCount(1) + .lastOperation( + LastOperation.builder() + .type("create") + .state("succeeded") + .description( + "description goes here") + .updatedAt("2016-04-22T19:33:13Z") + .createdAt("2016-04-22T19:33:13Z") + .build()) + .servicePlan( + Plan.builder() + .id( + "b9cb2cd3-2761-4e9b-9215-d64840ee3bf5") + .name("name-163") + .service( + Service.builder() + .id( + "00f143db-8b79-4e4a-bf03-021cf93131f4") + .label("label-16") + .build()) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/spaces/GET_response.json") + .build()) + .build()); + + this.spaces + .list(ListSpacesRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .id( + "b4293b09-8316-472c-a29a-6468a3adff59") + .url( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59") + .createdAt("2015-07-27T22:43:08Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-111") + .organizationId( + "3ce736dd-3b8c-4f64-acab-ed76488b79a3") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/3ce736dd-3b8c-4f64-acab-ed76488b79a3") + .developersUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/developers") + .managersUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/managers") + .auditorsUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/auditors") + .applicationsUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/apps") + .routesUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/routes") + .domainsUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/domains") + .serviceInstancesUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/service_instances") + .applicationEventsUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/app_events") + .eventsUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/events") + .securityGroupsUrl( + "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void listApplications() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/spaces/test-space-id/apps?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_apps_response.json") + .build()) + .build()); + + this.spaces + .listApplications( + ListSpaceApplicationsRequest.builder() + .spaceId("test-space-id") + .name("test-name") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceApplicationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ApplicationResource.builder() + .metadata( + Metadata.builder() + .id( + "4ee31730-3c0e-4ec6-8329-26e727ab8ccd") + .url( + "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd") + .createdAt("2015-07-27T22:43:08Z") + .updatedAt("2015-07-27T22:43:08Z") + .build()) + .entity( + ApplicationEntity.builder() + .name("name-103") + .production(false) + .spaceId( + "ca816a1b-ed3e-4ea8-bda2-2031d2e5b89f") + .stackId( + "e458a99f-53a4-4da4-b78a-5f2eb212cc47") + .memory(1024) + .instances(1) + .diskQuota(1024) + .state("STOPPED") + .version( + "cc21d137-45d6-4687-ab71-8288ac0e5724") + .console(false) + .packageState("PENDING") + .healthCheckType("port") + .diego(false) + .packageUpdatedAt( + "2015-07-27T22:43:08Z") + .detectedStartCommand("") + .enableSsh(true) + .dockerCredentials( + DockerCredentials.builder() + .build()) + .spaceUrl( + "/v2/spaces/ca816a1b-ed3e-4ea8-bda2-2031d2e5b89f") + .stackUrl( + "/v2/stacks/e458a99f-53a4-4da4-b78a-5f2eb212cc47") + .eventsUrl( + "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/events") + .serviceBindingsUrl( + "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/service_bindings") + .routesUrl( + "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/routes") + .routeMappingsUrl( + "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/route_mappings") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listAuditors() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/auditors?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_auditors_response.json") + .build()) + .build()); + + this.spaces + .listAuditors( + ListSpaceAuditorsRequest.builder() + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceAuditorsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-15") + .url("/v2/users/uaa-id-15") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("auditor@example.com") + .spacesUrl( + "/v2/users/uaa-id-15/spaces") + .organizationsUrl( + "/v2/users/uaa-id-15/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-15/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-15/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-15/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-15/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-15/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDevelopers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/developers?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_developers_response.json") + .build()) + .build()); + + this.spaces + .listDevelopers( + ListSpaceDevelopersRequest.builder() + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceDevelopersResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-24") + .url("/v2/users/uaa-id-24") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("developer@example.com") + .spacesUrl( + "/v2/users/uaa-id-24/spaces") + .organizationsUrl( + "/v2/users/uaa-id-24/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-24/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-24/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-24/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-24/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-24/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDomains() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/domains?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_domains_response.json") + .build()) + .build()); + + this.spaces + .listDomains( + ListSpaceDomainsRequest.builder().spaceId("test-space-id").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceDomainsResponse.builder() + .totalResults(2) + .totalPages(1) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "08ac844a-e880-48ef-a90c-f95131582fcc") + .url( + "/v2/domains/08ac844a-e880-48ef-a90c-f95131582fcc") + .createdAt("2015-07-27T22:43:05Z") + .build()) + .entity( + DomainEntity.builder() + .name("customer-app-domain1.com") + .build()) + .build()) + .resource( + DomainResource.builder() + .metadata( + Metadata.builder() + .id( + "973dcea1-5011-4bd0-aa9e-fa232bfaada7") + .url( + "/v2/domains/973dcea1-5011-4bd0-aa9e-fa232bfaada7") + .createdAt("2015-07-27T22:43:05Z") + .build()) + .entity( + DomainEntity.builder() + .name("customer-app-domain2.com") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listEvents() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/events?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_events_response.json") + .build()) + .build()); + + this.spaces + .listEvents( + ListSpaceEventsRequest.builder().spaceId("test-space-id").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceEventsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + EventResource.builder() + .metadata( + Metadata.builder() + .id( + "cbb42f10-2737-4522-95dc-3ada35056fa8") + .url( + "/v2/events/cbb42f10-2737-4522-95dc-3ada35056fa8") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + EventEntity.builder() + .type("audit.space.update") + .actor("uaa-id-10") + .actorType("user") + .actorName("user@example.com") + .actee( + "33d44b03-6203-47a7-b71c-9bf6fcaeb54a") + .acteeType("space") + .acteeName("name-56") + .timestamp("2015-07-27T22:43:07Z") + .metadata( + "request", + Optional.of( + FluentMap.builder() + .entry( + "name", + "new_name") + .build())) + .spaceId( + "33d44b03-6203-47a7-b71c-9bf6fcaeb54a") + .organizationId( + "ab7dff90-0bc7-4ce0-be5b-b8ecc676bc4a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listManagers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/managers?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_managers_response.json") + .build()) + .build()); + + this.spaces + .listManagers( + ListSpaceManagersRequest.builder() + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceManagersResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-35") + .url("/v2/users/uaa-id-35") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("manager@example.com") + .spacesUrl( + "/v2/users/uaa-id-35/spaces") + .organizationsUrl( + "/v2/users/uaa-id-35/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-35/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-35/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-35/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-35/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-35/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRoutes() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/routes?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_routes_response.json") + .build()) + .build()); + + this.spaces + .listRoutes( + ListSpaceRoutesRequest.builder().spaceId("test-space-id").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceRoutesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + RouteResource.builder() + .metadata( + Metadata.builder() + .id( + "f975dbb5-f6d2-4cac-8014-49994ce01853") + .url( + "/v2/routes/f975dbb5-f6d2-4cac-8014-49994ce01853") + .createdAt("2016-03-17T21:41:14Z") + .build()) + .entity( + RouteEntity.builder() + .host("host-12") + .path("") + .domainId( + "b3ed68d6-c35f-4b17-bacb-ebc90da7fce1") + .spaceId( + "e3e2198a-e098-4473-b430-39a1d53a1d5b") + .port(0) + .domainUrl( + "/v2/domains/b3ed68d6-c35f-4b17-bacb-ebc90da7fce1") + .spaceUrl( + "/v2/spaces/e3e2198a-e098-4473-b430-39a1d53a1d5b") + .applicationsUrl( + "/v2/routes/f975dbb5-f6d2-4cac-8014-49994ce01853/apps") + .routeMappingsUrl( + "/v2/routes/f975dbb5-f6d2-4cac-8014-49994ce01853/route_mappings") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSecurityGroups() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/security_groups?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_security_groups_response.json") + .build()) + .build()); + + this.spaces + .listSecurityGroups( + ListSpaceSecurityGroupsRequest.builder() + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceSecurityGroupsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SecurityGroupResource.builder() + .metadata( + Metadata.builder() + .id( + "a3728437-fe41-42c1-875c-b59cffc7498c") + .url( + "/v2/security_groups/a3728437-fe41-42c1-875c-b59cffc7498c") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + SecurityGroupEntity.builder() + .name("name-47") + .rule( + RuleEntity.builder() + .destination( + "198.41.191.47/1") + .ports("8080") + .protocol(UDP) + .build()) + .runningDefault(false) + .spacesUrl( + "/v2/security_groups/a3728437-fe41-42c1-875c-b59cffc7498c/spaces") + .stagingDefault(false) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceInstances() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/spaces/test-space-id/service_instances?page=-1&return_user_provided_service_instances=true") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_service_instances_response.json") + .build()) + .build()); + + this.spaces + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .spaceId("test-space-id") + .returnUserProvidedServiceInstances(true) + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceServiceInstancesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UnionServiceInstanceResource.builder() + .metadata( + Metadata.builder() + .id( + "7046d37c-8a50-49d5-ba53-abb103a92142") + .url( + "/v2/service_instances/7046d37c-8a50-49d5-ba53-abb103a92142") + .createdAt("2015-07-27T22:43:08Z") + .build()) + .entity( + UnionServiceInstanceEntity.builder() + .name("name-97") + .credential( + "creds-key-52", + "creds-val-52") + .servicePlanId( + "77157c85-203a-4fac-b9a3-003988ff879a") + .spaceId( + "aead50c9-0d45-410c-befd-431c8b7b3e30") + .type("managed_service_instance") + .tags(Collections.emptyList()) + .spaceUrl( + "/v2/spaces/aead50c9-0d45-410c-befd-431c8b7b3e30") + .servicePlanUrl( + "/v2/service_plans/77157c85-203a-4fac-b9a3-003988ff879a") + .serviceBindingsUrl( + "/v2/service_instances/7046d37c-8a50-49d5-ba53-abb103a92142/service_bindings") + .serviceKeysUrl( + "/v2/service_instances/7046d37c-8a50-49d5-ba53-abb103a92142/service_keys") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServices() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/services?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_services_response.json") + .build()) + .build()); + + this.spaces + .listServices( + ListSpaceServicesRequest.builder() + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceServicesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + ServiceResource.builder() + .metadata( + Metadata.builder() + .id( + "fcc4261f-da9a-40ba-9194-6919e0ab87f8") + .url( + "/v2/services/fcc4261f-da9a-40ba-9194-6919e0ab87f8") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + ServiceEntity.builder() + .label("label-5") + .description("desc-14") + .active(true) + .bindable(true) + .requires(Collections.emptyList()) + .tags(Collections.emptyList()) + .uniqueId( + "666902ad-81dc-41e9-a351-58e1055e3ab2") + .serviceBrokerId( + "15f1c3a0-910c-4b92-9386-377acada14cb") + .planUpdateable(false) + .servicePlansUrl( + "/v2/services/fcc4261f-da9a-40ba-9194-6919e0ab87f8/service_plans") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listUserRoles() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id/user_roles?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/GET_{id}_user_roles_response.json") + .build()) + .build()); + + this.spaces + .listUserRoles( + ListSpaceUserRolesRequest.builder() + .spaceId("test-space-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceUserRolesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + UserSpaceRoleResource.builder() + .metadata( + Metadata.builder() + .id("uaa-id-8") + .url("/v2/users/uaa-id-8") + .createdAt("2015-07-27T22:43:07Z") + .build()) + .entity( + UserSpaceRoleEntity.builder() + .admin(false) + .active(false) + .defaultSpaceId(null) + .username("everything@example.com") + .spaceRole("space_developer") + .spaceRole("space_manager") + .spaceRole("space_auditor") + .spacesUrl( + "/v2/users/uaa-id-8/spaces") + .organizationsUrl( + "/v2/users/uaa-id-8/organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-8/managed_organizations") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-8/billing_managed_organizations") + .auditedOrganizationsUrl( + "/v2/users/uaa-id-8/audited_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-8/managed_spaces") + .auditedSpacesUrl( + "/v2/users/uaa-id-8/audited_spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeAuditor() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/auditors/test-auditor-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaces + .removeAuditor( + RemoveSpaceAuditorRequest.builder() + .auditorId("test-auditor-id") + .spaceId("test-space-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeAuditorByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/auditors") + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_auditors_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_auditors_response.json") + .build()) + .build()); + + this.spaces + .removeAuditorByUsername( + RemoveSpaceAuditorByUsernameRequest.builder() + .spaceId("test-space-id") + .username("auditor@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + RemoveSpaceAuditorByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("6ee704bb-fc88-40f6-9ab9-02fe8df35730") + .url( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730") + .createdAt("2016-04-22T19:33:25Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-979") + .organizationId( + "c6aa1f1e-e5b4-4eff-8ae5-3a430866f5ea") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/c6aa1f1e-e5b4-4eff-8ae5-3a430866f5ea") + .developersUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/developers") + .managersUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/managers") + .auditorsUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/auditors") + .applicationsUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/apps") + .routesUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/routes") + .domainsUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/domains") + .serviceInstancesUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/service_instances") + .applicationEventsUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/app_events") + .eventsUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/events") + .securityGroupsUrl( + "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeDeveloper() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/developers/test-developer-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaces + .removeDeveloper( + RemoveSpaceDeveloperRequest.builder() + .developerId("test-developer-id") + .spaceId("test-space-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeDeveloperByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/developers") + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_developers_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_developers_response.json") + .build()) + .build()); + + this.spaces + .removeDeveloperByUsername( + RemoveSpaceDeveloperByUsernameRequest.builder() + .spaceId("test-space-id") + .username("developer@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + RemoveSpaceDeveloperByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("998375df-21ec-4d73-a0fd-83c11b7c7c1d") + .url( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d") + .createdAt("2016-04-22T19:33:26Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-1016") + .organizationId( + "d2ba20ee-07f8-4bab-91c7-41a5e103ca57") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/d2ba20ee-07f8-4bab-91c7-41a5e103ca57") + .developersUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/developers") + .managersUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/managers") + .auditorsUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/auditors") + .applicationsUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/apps") + .routesUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/routes") + .domainsUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/domains") + .serviceInstancesUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/service_instances") + .applicationEventsUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/app_events") + .eventsUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/events") + .securityGroupsUrl( + "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeManager() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/managers/test-manager-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaces + .removeManager( + RemoveSpaceManagerRequest.builder() + .spaceId("test-space-id") + .managerId("test-manager-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeManagerByUsername() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/managers") + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_managers_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/spaces/DELETE_{id}_managers_response.json") + .build()) + .build()); + + this.spaces + .removeManagerByUsername( + RemoveSpaceManagerByUsernameRequest.builder() + .spaceId("test-space-id") + .username("manager@example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + RemoveSpaceManagerByUsernameResponse.builder() + .metadata( + Metadata.builder() + .id("9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2") + .url( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2") + .createdAt("2016-04-22T19:33:27Z") + .build()) + .entity( + SpaceEntity.builder() + .name("name-1041") + .organizationId( + "2e1dbf6f-426e-4ad7-b48e-347bbd2bdaa6") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/2e1dbf6f-426e-4ad7-b48e-347bbd2bdaa6") + .developersUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/developers") + .managersUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/managers") + .auditorsUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/auditors") + .applicationsUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/apps") + .routesUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/routes") + .domainsUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/domains") + .serviceInstancesUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/service_instances") + .applicationEventsUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/app_events") + .eventsUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/events") + .securityGroupsUrl( + "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeSecurityGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/spaces/test-space-id/security_groups/test-security-group-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaces + .removeSecurityGroup( + RemoveSpaceSecurityGroupRequest.builder() + .spaceId("test-space-id") + .securityGroupId("test-security-group-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/spaces/test-space-id") + .payload("fixtures/client/v2/spaces/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/spaces/PUT_{id}_response.json") + .build()) + .build()); + + this.spaces + .update( + UpdateSpaceRequest.builder() + .spaceId("test-space-id") + .name("New Space Name") + .auditorIds(Collections.emptyList()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateSpaceResponse.builder() + .metadata( + Metadata.builder() + .id("e7b9e252-88cb-415c-ace4-2864922e550c") + .url( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c") + .createdAt("2015-07-27T22:43:08Z") + .updatedAt("2015-07-27T22:43:08Z") + .build()) + .entity( + SpaceEntity.builder() + .name("New Space Name") + .organizationId( + "71c72756-e8b8-4c4a-b832-b3f9e3052c70") + .allowSsh(true) + .organizationUrl( + "/v2/organizations/71c72756-e8b8-4c4a-b832-b3f9e3052c70") + .developersUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/developers") + .managersUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/managers") + .auditorsUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/auditors") + .applicationsUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/apps") + .routesUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/routes") + .domainsUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/domains") + .serviceInstancesUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/service_instances") + .applicationEventsUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/app_events") + .eventsUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/events") + .securityGroupsUrl( + "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/security_groups") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/stacks/ReactorStacksTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/stacks/ReactorStacksTest.java new file mode 100644 index 00000000000..0888b7aee0f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/stacks/ReactorStacksTest.java @@ -0,0 +1,268 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.stacks; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.stacks.CreateStackRequest; +import org.cloudfoundry.client.v2.stacks.CreateStackResponse; +import org.cloudfoundry.client.v2.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v2.stacks.DeleteStackResponse; +import org.cloudfoundry.client.v2.stacks.GetStackRequest; +import org.cloudfoundry.client.v2.stacks.GetStackResponse; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.stacks.ListStacksResponse; +import org.cloudfoundry.client.v2.stacks.StackEntity; +import org.cloudfoundry.client.v2.stacks.StackResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorStacksTest extends AbstractClientApiTest { + + private final ReactorStacks stacks = + new ReactorStacks( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/stacks") + .payload("fixtures/client/v2/stacks/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/stacks/POST_response.json") + .build()) + .build()); + + this.stacks + .create( + CreateStackRequest.builder() + .description("Description for the example stack") + .name("example_stack") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateStackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:23Z") + .id("c7d0b591-2572-4d23-bf7c-9dac95074a9e") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/stacks/c7d0b591-2572-4d23-bf7c-9dac95074a9e") + .build()) + .entity( + StackEntity.builder() + .description("Description for the example stack") + .name("example_stack") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/stacks/test-stack-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.stacks + .delete(DeleteStackRequest.builder().stackId("test-stack-id").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/stacks/test-stack-id?async=true") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/stacks/DELETE_{id}_async_response.json") + .build()) + .build()); + + this.stacks + .delete(DeleteStackRequest.builder().async(true).stackId("test-stack-id").build()) + .as(StepVerifier::create) + .expectNext( + DeleteStackResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-02-02T17:16:31Z") + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .url( + "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .build()) + .entity( + JobEntity.builder() + .id("2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1") + .status("queued") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/stacks/test-stack-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/stacks/GET_{id}_response.json") + .build()) + .build()); + + this.stacks + .get(GetStackRequest.builder().stackId("test-stack-id").build()) + .as(StepVerifier::create) + .expectNext( + GetStackResponse.builder() + .metadata( + Metadata.builder() + .id("fe4999cf-a207-4d40-bb03-f4bbf697edac") + .url( + "/v2/stacks/fe4999cf-a207-4d40-bb03-f4bbf697edac") + .createdAt("2015-12-22T18:27:59Z") + .build()) + .entity( + StackEntity.builder() + .name("cflinuxfs2") + .description("cflinuxfs2") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/stacks?q=name%3Atest-name&page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/stacks/GET_response.json") + .build()) + .build()); + + this.stacks + .list(ListStacksRequest.builder().name("test-name").page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListStacksResponse.builder() + .totalResults(3) + .totalPages(1) + .resource( + StackResource.builder() + .metadata( + Metadata.builder() + .id( + "fe4999cf-a207-4d40-bb03-f4bbf697edac") + .url( + "/v2/stacks/fe4999cf-a207-4d40-bb03-f4bbf697edac") + .createdAt("2015-12-22T18:27:59Z") + .build()) + .entity( + StackEntity.builder() + .name("cflinuxfs2") + .description("cflinuxfs2") + .build()) + .build()) + .resource( + StackResource.builder() + .metadata( + Metadata.builder() + .id( + "ff0f87c9-9add-477a-8674-c11c012667a6") + .url( + "/v2/stacks/ff0f87c9-9add-477a-8674-c11c012667a6") + .createdAt("2015-12-22T18:27:59Z") + .build()) + .entity( + StackEntity.builder() + .name("default-stack-name") + .description( + "default-stack-description") + .build()) + .build()) + .resource( + StackResource.builder() + .metadata( + Metadata.builder() + .id( + "01bd93b4-f252-4517-a4a5-191eb4c7fc7e") + .url( + "/v2/stacks/01bd93b4-f252-4517-a4a5-191eb4c7fc7e") + .createdAt("2015-12-22T18:27:59Z") + .build()) + .entity( + StackEntity.builder() + .name("cider") + .description("cider-description") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/userprovidedserviceinstances/ReactorUserProvidedServiceInstancesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/userprovidedserviceinstances/ReactorUserProvidedServiceInstancesTest.java new file mode 100644 index 00000000000..aafc8a246d2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/userprovidedserviceinstances/ReactorUserProvidedServiceInstancesTest.java @@ -0,0 +1,591 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.userprovidedserviceinstances; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.DeleteUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.GetUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.GetUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceRoutesResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceServiceBindingsResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.RemoveUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstanceEntity; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstanceResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorUserProvidedServiceInstancesTest extends AbstractClientApiTest { + + private final ReactorUserProvidedServiceInstances userProvidedServiceInstances = + new ReactorUserProvidedServiceInstances( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateRoute() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/routes/237d9236-7997-4b1a-be8d-2aaf2d85421a") + .payload( + "fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .routeId("237d9236-7997-4b1a-be8d-2aaf2d85421a") + .userProvidedServiceInstanceId( + "5badd282-6e07-4fc6-a8c4-78be99040774") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserProvidedServiceInstanceRouteResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:33Z") + .id("5badd282-6e07-4fc6-a8c4-78be99040774") + .url( + "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774") + .build()) + .entity( + UserProvidedServiceInstanceEntity.builder() + .credential("creds-key-52", "creds-val-52") + .name("name-1676") + .routeServiceUrl("https://foo.com/url-92") + .routesUrl( + "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/routes") + .serviceBindingsUrl( + "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/service_bindings") + .spaceId("91b53184-6430-4891-8d4b-fabbe96a84f6") + .spaceUrl( + "/v2/spaces/91b53184-6430-4891-8d4b-fabbe96a84f6") + .syslogDrainUrl("https://foo.com/url-93") + .type("user_provided_service_instance") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/user_provided_service_instances") + .payload( + "fixtures/client/v2/user_provided_service_instances/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/user_provided_service_instances/POST_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .create( + CreateUserProvidedServiceInstanceRequest.builder() + .spaceId("0d45d43f-7d50-43c6-9981-b32ce8d5a373") + .name("my-user-provided-instance") + .credential("somekey", "somevalue") + .routeServiceUrl("https://logger.example.com") + .syslogDrainUrl("syslog://example.com") + .tags("tag1", "tag2") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateUserProvidedServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:35Z") + .id("34d5500e-712d-49ef-8bbe-c9ac349532da") + .url( + "/v2/user_provided_service_instances/34d5500e-712d-49ef-8bbe-c9ac349532da") + .build()) + .entity( + UserProvidedServiceInstanceEntity.builder() + .name("my-user-provided-instance") + .credential("somekey", "somevalue") + .spaceId("0d45d43f-7d50-43c6-9981-b32ce8d5a373") + .type("user_provided_service_instance") + .syslogDrainUrl("syslog://example.com") + .routeServiceUrl("https://logger.example.com") + .tags("tag1", "tag2") + .spaceUrl( + "/v2/spaces/0d45d43f-7d50-43c6-9981-b32ce8d5a373") + .serviceBindingsUrl( + "/v2/user_provided_service_instances/34d5500e-712d-49ef-8bbe-c9ac349532da/service_bindings") + .routesUrl( + "/v2/user_provided_service_instances/34d5500e-712d-49ef-8bbe-c9ac349532da/routes") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/user_provided_service_instances/5b6b45c8-89be-48d2-affd-f64346ad4d93") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.userProvidedServiceInstances + .delete( + DeleteUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId( + "5b6b45c8-89be-48d2-affd-f64346ad4d93") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/user_provided_service_instances/8c12fd06-6639-4844-b5e7-a6831cadbbcc") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/user_provided_service_instances/GET_{id}_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .get( + GetUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId( + "8c12fd06-6639-4844-b5e7-a6831cadbbcc") + .build()) + .as(StepVerifier::create) + .expectNext( + GetUserProvidedServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:33Z") + .id("e9358711-0ad9-4f2a-b3dc-289d47c17c87") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87") + .build()) + .entity( + UserProvidedServiceInstanceEntity.builder() + .credential("creds-key-58", "creds-val-58") + .name("name-1700") + .routesUrl( + "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/routes") + .serviceBindingsUrl( + "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/service_bindings") + .spaceId("22236d1a-d9c7-44b7-bdad-2bb079a6c4a1") + .spaceUrl( + "/v2/spaces/22236d1a-d9c7-44b7-bdad-2bb079a6c4a1") + .syslogDrainUrl("https://foo.com/url-104") + .tags("accounting", "mongodb") + .type("user_provided_service_instance") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/user_provided_service_instances?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/user_provided_service_instances/GET_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .list(ListUserProvidedServiceInstancesRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListUserProvidedServiceInstancesResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + UserProvidedServiceInstanceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-07-27T22:43:34Z") + .id( + "8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866") + .url( + "/v2/user_provided_service_instances/8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866") + .build()) + .entity( + UserProvidedServiceInstanceEntity.builder() + .name("name-2365") + .credential( + "creds-key-665", + "creds-val-665") + .spaceId( + "2fff6e71-d329-4991-9c89-7fa8abca70df") + .type( + "user_provided_service_instance") + .syslogDrainUrl( + "https://foo.com/url-90") + .spaceUrl( + "/v2/spaces/2fff6e71-d329-4991-9c89-7fa8abca70df") + .serviceBindingsUrl( + "/v2/user_provided_service_instances/8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866/service_bindings") + .routesUrl( + "/v2/user_provided_service_instances/8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866/routes") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRoutes() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/user_provided_service_instances/500e64c6-7f70-4e3b-ab7b-940a6303d79b/routes") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/user_provided_service_instances/GET_{id}_routes_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .listRoutes( + ListUserProvidedServiceInstanceRoutesRequest.builder() + .userProvidedServiceInstanceId( + "500e64c6-7f70-4e3b-ab7b-940a6303d79b") + .build()) + .as(StepVerifier::create) + .expectNext( + ListUserProvidedServiceInstanceRoutesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + RouteResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:33Z") + .id( + "d6e18af9-9d84-4a53-a301-ab9bef03a7b0") + .updatedAt("2016-06-08T16:41:33Z") + .url( + "/v2/routes/d6e18af9-9d84-4a53-a301-ab9bef03a7b0") + .build()) + .entity( + RouteEntity.builder() + .applicationsUrl( + "/v2/routes/d6e18af9-9d84-4a53-a301-ab9bef03a7b0/apps") + .domainId( + "428b9275-47a6-481b-97e3-d93ae18611ee") + .domainUrl( + "/v2/private_domains/428b9275-47a6-481b-97e3-d93ae18611ee") + .host("host-24") + .path("") + .routeMappingsUrl( + "/v2/routes/d6e18af9-9d84-4a53-a301-ab9bef03a7b0/route_mappings") + .serviceInstanceId( + "500e64c6-7f70-4e3b-ab7b-940a6303d79b") + .serviceInstanceUrl( + "/v2/user_provided_service_instances/500e64c6-7f70-4e3b-ab7b-940a6303d79b") + .spaceId( + "dc7dd379-1ffb-4168-b2b4-773fe141dd2e") + .spaceUrl( + "/v2/spaces/dc7dd379-1ffb-4168-b2b4-773fe141dd2e") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceBindings() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/user_provided_service_instances/test-user-provided-service-instance-id/service_bindings?page=-1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/user_provided_service_instances/GET_{id}_service_bindings_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .listServiceBindings( + ListUserProvidedServiceInstanceServiceBindingsRequest.builder() + .userProvidedServiceInstanceId( + "test-user-provided-service-instance-id") + .page(-1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListUserProvidedServiceInstanceServiceBindingsResponse.builder() + .totalPages(1) + .totalResults(1) + .resource( + ServiceBindingResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-01-26T22:20:16Z") + .id( + "e6b8d548-e009-47d4-ab79-675e3da6bb52") + .url( + "/v2/service_bindings/e6b8d548-e009-47d4-ab79-675e3da6bb52") + .build()) + .entity( + ServiceBindingEntity.builder() + .applicationId( + "a9bbd896-7500-45be-a75a-25e3d254f67c") + .serviceInstanceId( + "16c81612-6a63-4faa-8cd5-acc80771b562") + .credential( + "creds-key-29", + "creds-val-29") + .bindingOptions( + Collections.emptyMap()) + .gatewayName("") + .applicationUrl( + "/v2/apps/a9bbd896-7500-45be-a75a-25e3d254f67c") + .serviceInstanceUrl( + "/v2/user_provided_service_instances/16c81612-6a63-4faa-8cd5-acc80771b562") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeRoute() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/user_provided_service_instances/fd195229-117c-4bbe-9418-c5df97131eae/routes/c3bc74b0-9465-413d-b5e6-3b305fb439cc") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.userProvidedServiceInstances + .removeRoute( + RemoveUserProvidedServiceInstanceRouteRequest.builder() + .routeId("c3bc74b0-9465-413d-b5e6-3b305fb439cc") + .userProvidedServiceInstanceId( + "fd195229-117c-4bbe-9418-c5df97131eae") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d") + .payload( + "fixtures/client/v2/user_provided_service_instances/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/user_provided_service_instances/PUT_{id}_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .update( + UpdateUserProvidedServiceInstanceRequest.builder() + .credential("somekey", "somenewvalue") + .tag("tag1") + .userProvidedServiceInstanceId( + "e2c198b1-fa15-414e-a9a4-31537996b39d") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateUserProvidedServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-02-19T02:04:06Z") + .id("e2c198b1-fa15-414e-a9a4-31537996b39d") + .updatedAt("2016-02-19T02:04:06Z") + .url( + "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d") + .build()) + .entity( + UserProvidedServiceInstanceEntity.builder() + .name("name-2565") + .credential("somekey", "somenewvalue") + .spaceId("438b5923-fe7a-4459-bbcd-a7c27332bad3") + .tag("tag1") + .type("user_provided_service_instance") + .syslogDrainUrl("https://foo.com/url-91") + .spaceUrl( + "/v2/spaces/438b5923-fe7a-4459-bbcd-a7c27332bad3") + .serviceBindingsUrl( + "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/service_bindings") + .routesUrl( + "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/routes") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateWithEmptyCredentials() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d") + .payload( + "fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_request.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_response.json") + .build()) + .build()); + + this.userProvidedServiceInstances + .update( + UpdateUserProvidedServiceInstanceRequest.builder() + .credentials(Collections.emptyMap()) + .userProvidedServiceInstanceId( + "e2c198b1-fa15-414e-a9a4-31537996b39d") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateUserProvidedServiceInstanceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-02-19T02:04:06Z") + .id("e2c198b1-fa15-414e-a9a4-31537996b39d") + .updatedAt("2016-02-19T02:04:06Z") + .url( + "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d") + .build()) + .entity( + UserProvidedServiceInstanceEntity.builder() + .credentials(Collections.emptyMap()) + .name("name-2565") + .spaceId("438b5923-fe7a-4459-bbcd-a7c27332bad3") + .type("user_provided_service_instance") + .syslogDrainUrl("https://foo.com/url-91") + .spaceUrl( + "/v2/spaces/438b5923-fe7a-4459-bbcd-a7c27332bad3") + .serviceBindingsUrl( + "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/service_bindings") + .routesUrl( + "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/routes") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsersTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsersTest.java new file mode 100644 index 00000000000..365368e872e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v2/users/ReactorUsersTest.java @@ -0,0 +1,1963 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v2.users; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserBillingManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserBillingManagedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserManagedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserManagedSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserManagedSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserSpaceResponse; +import org.cloudfoundry.client.v2.users.CreateUserRequest; +import org.cloudfoundry.client.v2.users.CreateUserResponse; +import org.cloudfoundry.client.v2.users.DeleteUserRequest; +import org.cloudfoundry.client.v2.users.GetUserRequest; +import org.cloudfoundry.client.v2.users.GetUserResponse; +import org.cloudfoundry.client.v2.users.ListUserAuditedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserAuditedOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserAuditedSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserAuditedSpacesResponse; +import org.cloudfoundry.client.v2.users.ListUserBillingManagedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserBillingManagedOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserManagedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserManagedOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserManagedSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserManagedSpacesResponse; +import org.cloudfoundry.client.v2.users.ListUserOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserOrganizationsResponse; +import org.cloudfoundry.client.v2.users.ListUserSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserSpacesResponse; +import org.cloudfoundry.client.v2.users.ListUsersRequest; +import org.cloudfoundry.client.v2.users.ListUsersResponse; +import org.cloudfoundry.client.v2.users.RemoveUserAuditedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserAuditedSpaceRequest; +import org.cloudfoundry.client.v2.users.RemoveUserBillingManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserManagedSpaceRequest; +import org.cloudfoundry.client.v2.users.RemoveUserOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserSpaceRequest; +import org.cloudfoundry.client.v2.users.SummaryUserRequest; +import org.cloudfoundry.client.v2.users.SummaryUserResponse; +import org.cloudfoundry.client.v2.users.UpdateUserRequest; +import org.cloudfoundry.client.v2.users.UpdateUserResponse; +import org.cloudfoundry.client.v2.users.UserEntity; +import org.cloudfoundry.client.v2.users.UserOrganizationEntity; +import org.cloudfoundry.client.v2.users.UserOrganizationResource; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.client.v2.users.UserSpaceEntity; +import org.cloudfoundry.client.v2.users.UserSpaceResource; +import org.cloudfoundry.client.v2.users.UserSummaryEntity; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorUsersTest extends AbstractClientApiTest { + + private final ReactorUsers users = + new ReactorUsers(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void associateAuditedOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-295/audited_organizations/52c32226-3446-4212-929a-c3b67d36f657") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_audited_organizations_{id}_response.json") + .build()) + .build()); + + this.users + .associateAuditedOrganization( + AssociateUserAuditedOrganizationRequest.builder() + .auditedOrganizationId("52c32226-3446-4212-929a-c3b67d36f657") + .userId("uaa-id-295") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserAuditedOrganizationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id("uaa-id-295") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-295") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-295/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-295/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-295/billing_managed_organizations") + .defaultSpaceId( + "aa72aeb6-25aa-4cdc-9ef7-9231fe5b136d") + .defaultSpaceUrl( + "/v2/spaces/aa72aeb6-25aa-4cdc-9ef7-9231fe5b136d") + .managedOrganizationsUrl( + "/v2/users/uaa-id-295/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-295/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-295/organizations") + .spacesUrl("/v2/users/uaa-id-295/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateAuditedSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-280/audited_spaces/012602a2-98d7-4ab7-a766-bdf5a841c2d4") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_audited_spaces_{id}_response.json") + .build()) + .build()); + + this.users + .associateAuditedSpace( + AssociateUserAuditedSpaceRequest.builder() + .auditedSpaceId("012602a2-98d7-4ab7-a766-bdf5a841c2d4") + .userId("uaa-id-280") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserAuditedSpaceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id("uaa-id-280") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-280") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-280/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-280/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-280/billing_managed_organizations") + .defaultSpaceId( + "06ed47f7-656a-4f31-8b3a-b0bdaaafc826") + .defaultSpaceUrl( + "/v2/spaces/06ed47f7-656a-4f31-8b3a-b0bdaaafc826") + .managedOrganizationsUrl( + "/v2/users/uaa-id-280/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-280/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-280/organizations") + .spacesUrl("/v2/users/uaa-id-280/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateBillingManagedOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-272/billing_managed_organizations/d0b087e3-cd43-4f3c-ba09-c00556976b1c") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_billing_managed_organizations_{id}_response.json") + .build()) + .build()); + + this.users + .associateBillingManagedOrganization( + AssociateUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId( + "d0b087e3-cd43-4f3c-ba09-c00556976b1c") + .userId("uaa-id-272") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserBillingManagedOrganizationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id("uaa-id-272") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-272") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-272/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-272/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-272/billing_managed_organizations") + .defaultSpaceId( + "a1e2a260-adeb-4689-b118-05d359c51fd7") + .defaultSpaceUrl( + "/v2/spaces/a1e2a260-adeb-4689-b118-05d359c51fd7") + .managedOrganizationsUrl( + "/v2/users/uaa-id-272/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-272/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-272/organizations") + .spacesUrl("/v2/users/uaa-id-272/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateManagedOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-287/managed_organizations/97e1bd4a-828e-4edf-b140-506533d4008e") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_managed_organizations_{id}_response.json") + .build()) + .build()); + + this.users + .associateManagedOrganization( + AssociateUserManagedOrganizationRequest.builder() + .managedOrganizationId("97e1bd4a-828e-4edf-b140-506533d4008e") + .userId("uaa-id-287") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserManagedOrganizationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id("uaa-id-287") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-287") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-287/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-287/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-287/billing_managed_organizations") + .defaultSpaceId( + "2becd2d1-62ee-472e-a66f-bea5d9f0dc53") + .defaultSpaceUrl( + "/v2/spaces/2becd2d1-62ee-472e-a66f-bea5d9f0dc53") + .managedOrganizationsUrl( + "/v2/users/uaa-id-287/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-287/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-287/organizations") + .spacesUrl("/v2/users/uaa-id-287/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateManagedSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-268/managed_spaces/b133899a-c3ea-451b-adaa-f8e2174cbfec") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_managed_spaces_{id}_response.json") + .build()) + .build()); + + this.users + .associateManagedSpace( + AssociateUserManagedSpaceRequest.builder() + .managedSpaceId("b133899a-c3ea-451b-adaa-f8e2174cbfec") + .userId("uaa-id-268") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserManagedSpaceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:35Z") + .id("uaa-id-268") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-268") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-268/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-268/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-268/billing_managed_organizations") + .defaultSpaceId( + "81d79071-61db-43d7-86d3-8f885d14fd4e") + .defaultSpaceUrl( + "/v2/spaces/81d79071-61db-43d7-86d3-8f885d14fd4e") + .managedOrganizationsUrl( + "/v2/users/uaa-id-268/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-268/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-268/organizations") + .spacesUrl("/v2/users/uaa-id-268/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-301/organizations/2f0bb84e-5229-4dd4-b053-855910833d2a") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_organizations_{id}_response.json") + .build()) + .build()); + + this.users + .associateOrganization( + AssociateUserOrganizationRequest.builder() + .organizationId("2f0bb84e-5229-4dd4-b053-855910833d2a") + .userId("uaa-id-301") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserOrganizationResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id("uaa-id-301") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-301") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-301/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-301/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-301/billing_managed_organizations") + .defaultSpaceId( + "10db6c03-3e24-4a2a-b311-a28b541376f1") + .defaultSpaceUrl( + "/v2/spaces/10db6c03-3e24-4a2a-b311-a28b541376f1") + .managedOrganizationsUrl( + "/v2/users/uaa-id-301/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-301/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-301/organizations") + .spacesUrl("/v2/users/uaa-id-301/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void associateSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/users/uaa-id-305/spaces/063d1561-16ab-4ece-825d-30e3814f4e2f") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v2/users/PUT_{id}_spaces_{id}_response.json") + .build()) + .build()); + + this.users + .associateSpace( + AssociateUserSpaceRequest.builder() + .spaceId("063d1561-16ab-4ece-825d-30e3814f4e2f") + .userId("uaa-id-305") + .build()) + .as(StepVerifier::create) + .expectNext( + AssociateUserSpaceResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id("uaa-id-305") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-305") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-305/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-305/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-305/billing_managed_organizations") + .defaultSpaceId( + "063d1561-16ab-4ece-825d-30e3814f4e2f") + .defaultSpaceUrl( + "/v2/spaces/063d1561-16ab-4ece-825d-30e3814f4e2f") + .managedOrganizationsUrl( + "/v2/users/uaa-id-305/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-305/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-305/organizations") + .spacesUrl("/v2/users/uaa-id-305/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/users") + .payload("fixtures/client/v2/users/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v2/users/POST_response.json") + .build()) + .build()); + + this.users + .create( + CreateUserRequest.builder() + .uaaId("guid-cb24b36d-4656-468e-a50d-b53113ac6177") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateUserResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:37Z") + .id("guid-cb24b36d-4656-468e-a50d-b53113ac6177") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .auditedOrganizationsUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/audited_organizations") + .auditedSpacesUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/billing_managed_organizations") + .managedOrganizationsUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/managed_organizations") + .managedSpacesUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/managed_spaces") + .organizationsUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/organizations") + .spacesUrl( + "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/users/uaa-id-319") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .delete(DeleteUserRequest.builder().userId("uaa-id-319").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder().method(GET).path("/users/uaa-id-317").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/users/GET_{id}_response.json") + .build()) + .build()); + + this.users + .get(GetUserRequest.builder().userId("uaa-id-317").build()) + .as(StepVerifier::create) + .expectNext( + GetUserResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:37Z") + .id("uaa-id-317") + .updatedAt("2016-06-08T16:41:26Z") + .url("/v2/users/uaa-id-317") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-317/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-317/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-317/billing_managed_organizations") + .defaultSpaceUrl( + "/v2/spaces/fc898723-2192-42d9-9567-c0b2e03a3169") + .defaultSpaceId( + "fc898723-2192-42d9-9567-c0b2e03a3169") + .managedOrganizationsUrl( + "/v2/users/uaa-id-317/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-317/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-317/organizations") + .spacesUrl("/v2/users/uaa-id-317/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/users?page=-1").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v2/users/GET_response.json") + .build()) + .build()); + + this.users + .list(ListUsersRequest.builder().page(-1).build()) + .as(StepVerifier::create) + .expectNext( + ListUsersResponse.builder() + .totalResults(2) + .totalPages(1) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-12-22T18:28:01Z") + .id("uaa-id-133") + .url("/v2/users/uaa-id-133") + .build()) + .entity( + UserEntity.builder() + .active(false) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-133/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-133/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-133/billing_managed_organizations") + .defaultSpaceUrl( + "/v2/spaces/55b306f6-b956-4c85-a7dc-64358121d39e") + .defaultSpaceId( + "55b306f6-b956-4c85-a7dc-64358121d39e") + .managedOrganizationsUrl( + "/v2/users/uaa-id-133/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-133/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-133/organizations") + .spacesUrl( + "/v2/users/uaa-id-133/spaces") + .username("user@example.com") + .build()) + .build()) + .resource( + UserResource.builder() + .metadata( + Metadata.builder() + .createdAt("2015-12-22T18:28:01Z") + .id("uaa-id-134") + .url("/v2/users/uaa-id-134") + .build()) + .entity( + UserEntity.builder() + .active(true) + .admin(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-134/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-134/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-134/billing_managed_organizations") + .managedOrganizationsUrl( + "/v2/users/uaa-id-134/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-134/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-134/organizations") + .spacesUrl( + "/v2/users/uaa-id-134/spaces") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listAuditedOrganizations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-297/audited_organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_audited_organizations_response.json") + .build()) + .build()); + + this.users + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest.builder().userId("uaa-id-297").build()) + .as(StepVerifier::create) + .expectNext( + ListUserAuditedOrganizationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + OrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id( + "3ced0de5-e2ce-403e-9706-17e2035947b4") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4") + .build()) + .entity( + OrganizationEntity.builder() + .applicationEventsUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/app_events") + .auditorsUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/auditors") + .billingEnabled(false) + .billingManagersUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/billing_managers") + .domainsUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/domains") + .managersUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/managers") + .name("name-1914") + .privateDomainsUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/private_domains") + .quotaDefinitionId( + "8eb22221-a9ec-4345-a2a0-4a7e816ca689") + .quotaDefinitionUrl( + "/v2/quota_definitions/8eb22221-a9ec-4345-a2a0-4a7e816ca689") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/space_quota_definitions") + .spacesUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/spaces") + .status("active") + .usersUrl( + "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/users") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listAuditedSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-282/audited_spaces") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_audited_spaces_response.json") + .build()) + .build()); + + this.users + .listAuditedSpaces( + ListUserAuditedSpacesRequest.builder().userId("uaa-id-282").build()) + .as(StepVerifier::create) + .expectNext( + ListUserAuditedSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id( + "b93f27a3-3fee-49a3-987a-20407c2b029b") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b") + .build()) + .entity( + SpaceEntity.builder() + .allowSsh(true) + .applicationEventsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/app_events") + .applicationsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/apps") + .auditorsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/auditors") + .developersUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/developers") + .domainsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/domains") + .eventsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/events") + .managersUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/managers") + .name("name-1868") + .organizationId( + "cf8bee37-4644-4792-b6c1-de14b93390a4") + .organizationUrl( + "/v2/organizations/cf8bee37-4644-4792-b6c1-de14b93390a4") + .routesUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/routes") + .securityGroupsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/security_groups") + .serviceInstancesUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/service_instances") + .stagingSecurityGroupsUrl( + "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/staging_security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listBillingManagedOrganizations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-276/billing_managed_organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_billing_managed_organizations_response.json") + .build()) + .build()); + + this.users + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest.builder() + .userId("uaa-id-276") + .build()) + .as(StepVerifier::create) + .expectNext( + ListUserBillingManagedOrganizationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + OrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id( + "67d9d56c-f41b-496d-bcac-833d5d71e104") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104") + .build()) + .entity( + OrganizationEntity.builder() + .applicationEventsUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/app_events") + .auditorsUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/auditors") + .billingEnabled(false) + .billingManagersUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/billing_managers") + .domainsUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/domains") + .managersUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/managers") + .name("name-1845") + .privateDomainsUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/private_domains") + .quotaDefinitionId( + "6cb01483-4b0a-4742-b00c-f55524f15b25") + .quotaDefinitionUrl( + "/v2/quota_definitions/6cb01483-4b0a-4742-b00c-f55524f15b25") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/space_quota_definitions") + .spacesUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/spaces") + .status("active") + .usersUrl( + "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/users") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listManagedOrganizations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-290/managed_organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_managed_organizations_response.json") + .build()) + .build()); + + this.users + .listManagedOrganizations( + ListUserManagedOrganizationsRequest.builder().userId("uaa-id-290").build()) + .as(StepVerifier::create) + .expectNext( + ListUserManagedOrganizationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + OrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id( + "db26c415-f907-45ea-a2d1-a579000f0749") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749") + .build()) + .entity( + OrganizationEntity.builder() + .applicationEventsUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/app_events") + .auditorsUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/auditors") + .billingEnabled(false) + .billingManagersUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/billing_managers") + .domainsUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/domains") + .managersUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/managers") + .name("name-1893") + .privateDomainsUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/private_domains") + .quotaDefinitionId( + "1677d31f-e75c-4f32-a879-fe4a7a7a3c23") + .quotaDefinitionUrl( + "/v2/quota_definitions/1677d31f-e75c-4f32-a879-fe4a7a7a3c23") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/space_quota_definitions") + .spacesUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/spaces") + .status("active") + .usersUrl( + "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/users") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listManagedSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-270/managed_spaces") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_managed_spaces_response.json") + .build()) + .build()); + + this.users + .listManagedSpaces( + ListUserManagedSpacesRequest.builder().userId("uaa-id-270").build()) + .as(StepVerifier::create) + .expectNext( + ListUserManagedSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:35Z") + .id( + "b0e100bd-6d7c-4a3d-b0d3-0249d739a086") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086") + .build()) + .entity( + SpaceEntity.builder() + .allowSsh(true) + .applicationEventsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/app_events") + .applicationsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/apps") + .auditorsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/auditors") + .developersUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/developers") + .domainsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/domains") + .eventsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/events") + .managersUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/managers") + .name("name-1820") + .organizationId( + "14766fb1-d8fa-4604-ba7a-248f341492a2") + .organizationUrl( + "/v2/organizations/14766fb1-d8fa-4604-ba7a-248f341492a2") + .routesUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/routes") + .securityGroupsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/security_groups") + .serviceInstancesUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/service_instances") + .stagingSecurityGroupsUrl( + "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/staging_security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listOrganizations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-299/organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_organizations_response.json") + .build()) + .build()); + + this.users + .listOrganizations( + ListUserOrganizationsRequest.builder().userId("uaa-id-299").build()) + .as(StepVerifier::create) + .expectNext( + ListUserOrganizationsResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + OrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:36Z") + .id( + "72d22faf-f70c-4e1d-ad42-256939db7fca") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca") + .build()) + .entity( + OrganizationEntity.builder() + .applicationEventsUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/app_events") + .auditorsUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/auditors") + .billingEnabled(false) + .billingManagersUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/billing_managers") + .domainsUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/domains") + .managersUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/managers") + .name("name-1919") + .privateDomainsUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/private_domains") + .quotaDefinitionId( + "8a51d151-a5fa-455f-9482-0ff0f2f50053") + .quotaDefinitionUrl( + "/v2/quota_definitions/8a51d151-a5fa-455f-9482-0ff0f2f50053") + .spaceQuotaDefinitionsUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/space_quota_definitions") + .spacesUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/spaces") + .status("active") + .usersUrl( + "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/users") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-309/spaces") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_spaces_response.json") + .build()) + .build()); + + this.users + .listSpaces(ListUserSpacesRequest.builder().userId("uaa-id-309").build()) + .as(StepVerifier::create) + .expectNext( + ListUserSpacesResponse.builder() + .totalResults(1) + .totalPages(1) + .resource( + SpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:37Z") + .id( + "9881c79e-d269-4a53-9d77-cb21b745356e") + .updatedAt("2016-06-08T16:41:26Z") + .url( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e") + .build()) + .entity( + SpaceEntity.builder() + .allowSsh(true) + .applicationEventsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/app_events") + .applicationsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/apps") + .auditorsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/auditors") + .developersUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/developers") + .domainsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/domains") + .eventsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/events") + .managersUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/managers") + .name("name-1948") + .organizationId( + "6a2a2d18-7620-43cf-a332-353824b431b2") + .organizationUrl( + "/v2/organizations/6a2a2d18-7620-43cf-a332-353824b431b2") + .routesUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/routes") + .securityGroupsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/security_groups") + .serviceInstancesUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/service_instances") + .stagingSecurityGroupsUrl( + "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/staging_security_groups") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeAuditedOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-293/audited_organizations/ab4226af-73e8-4c7d-a2e0-a713ebf9fd84") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeAuditedOrganization( + RemoveUserAuditedOrganizationRequest.builder() + .auditedOrganizationId("ab4226af-73e8-4c7d-a2e0-a713ebf9fd84") + .userId("uaa-id-293") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeAuditedSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-278/audited_spaces/95b843ee-9f7a-4021-a155-ad9c0f76e6fc") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeAuditedSpace( + RemoveUserAuditedSpaceRequest.builder() + .auditedSpaceId("95b843ee-9f7a-4021-a155-ad9c0f76e6fc") + .userId("uaa-id-278") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeBillingManagedOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-274/billing_managed_organizations/a2d908b0-504d-435c-83ef-82969d353741") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeBillingManagedOrganization( + RemoveUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId( + "a2d908b0-504d-435c-83ef-82969d353741") + .userId("uaa-id-274") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeManagedOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-284/managed_organizations/229d8290-bf5a-45f9-b6c4-2ad6500bb17e") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeManagedOrganization( + RemoveUserManagedOrganizationRequest.builder() + .managedOrganizationId("229d8290-bf5a-45f9-b6c4-2ad6500bb17e") + .userId("uaa-id-284") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeManagedSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-266/managed_spaces/0af3c27b-d995-4a63-a9c5-26fc01210128") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeManagedSpace( + RemoveUserManagedSpaceRequest.builder() + .managedSpaceId("0af3c27b-d995-4a63-a9c5-26fc01210128") + .userId("uaa-id-266") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeOrganization() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-303/organizations/aaac52d1-e99d-4536-a981-379980a3cb23") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeOrganization( + RemoveUserOrganizationRequest.builder() + .organizationId("aaac52d1-e99d-4536-a981-379980a3cb23") + .userId("uaa-id-303") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeSpace() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/users/uaa-id-307/spaces/6c37bc37-f712-4399-be89-2272980b66ef") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.users + .removeSpace( + RemoveUserSpaceRequest.builder() + .spaceId("6c37bc37-f712-4399-be89-2272980b66ef") + .userId("uaa-id-307") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void summary() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/uaa-id-355/summary") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v2/users/GET_{id}_summary_response.json") + .build()) + .build()); + + this.users + .summary(SummaryUserRequest.builder().userId("uaa-id-355").build()) + .as(StepVerifier::create) + .expectNext( + SummaryUserResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:40Z") + .id("uaa-id-355") + .updatedAt("2016-06-08T16:41:26Z") + .build()) + .entity( + UserSummaryEntity.builder() + .billingManagedOrganization( + UserOrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserOrganizationEntity + .builder() + .billingEnabled( + false) + .name("name-2041") + .status("active") + .space( + UserSpaceResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity + .builder() + .name( + "name-2043") + .build()) + .build()) + .quotaDefinition( + OrganizationQuotaDefinitionResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "6c6b51c9-823d-4c91-ab5c-9487a93360bc") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + OrganizationQuotaDefinitionEntity + .builder() + .applicationInstanceLimit( + -1) + .applicationTaskLimit( + -1) + .instanceMemoryLimit( + -1) + .memoryLimit( + 20480) + .name( + "name-2042") + .nonBasicServicesAllowed( + true) + .totalPrivateDomains( + -1) + .totalRoutes( + 1000) + .totalServices( + 60) + .trialDatabaseAllowed( + false) + .build()) + .build()) + .manager( + UserResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "uaa-id-355") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserEntity + .builder() + .active( + false) + .admin( + false) + .defaultSpaceId( + null) + .build()) + .build()) + .build()) + .build()) + .auditedOrganization( + UserOrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserOrganizationEntity + .builder() + .billingEnabled( + false) + .name("name-2041") + .status("active") + .space( + UserSpaceResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity + .builder() + .name( + "name-2043") + .build()) + .build()) + .quotaDefinition( + OrganizationQuotaDefinitionResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "6c6b51c9-823d-4c91-ab5c-9487a93360bc") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + OrganizationQuotaDefinitionEntity + .builder() + .applicationInstanceLimit( + -1) + .applicationTaskLimit( + -1) + .instanceMemoryLimit( + -1) + .memoryLimit( + 20480) + .name( + "name-2042") + .nonBasicServicesAllowed( + true) + .totalPrivateDomains( + -1) + .totalRoutes( + 1000) + .totalServices( + 60) + .trialDatabaseAllowed( + false) + .build()) + .build()) + .manager( + UserResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "uaa-id-355") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserEntity + .builder() + .active( + false) + .admin( + false) + .defaultSpaceId( + null) + .build()) + .build()) + .build()) + .build()) + .managedOrganization( + UserOrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserOrganizationEntity + .builder() + .billingEnabled( + false) + .name("name-2041") + .status("active") + .space( + UserSpaceResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity + .builder() + .name( + "name-2043") + .build()) + .build()) + .quotaDefinition( + OrganizationQuotaDefinitionResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "6c6b51c9-823d-4c91-ab5c-9487a93360bc") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + OrganizationQuotaDefinitionEntity + .builder() + .applicationInstanceLimit( + -1) + .applicationTaskLimit( + -1) + .instanceMemoryLimit( + -1) + .memoryLimit( + 20480) + .name( + "name-2042") + .nonBasicServicesAllowed( + true) + .totalPrivateDomains( + -1) + .totalRoutes( + 1000) + .totalServices( + 60) + .trialDatabaseAllowed( + false) + .build()) + .build()) + .manager( + UserResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "uaa-id-355") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserEntity + .builder() + .active( + false) + .admin( + false) + .defaultSpaceId( + null) + .build()) + .build()) + .build()) + .build()) + .organization( + UserOrganizationResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserOrganizationEntity + .builder() + .billingEnabled( + false) + .name("name-2041") + .status("active") + .space( + UserSpaceResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity + .builder() + .name( + "name-2043") + .build()) + .build()) + .quotaDefinition( + OrganizationQuotaDefinitionResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "6c6b51c9-823d-4c91-ab5c-9487a93360bc") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + OrganizationQuotaDefinitionEntity + .builder() + .applicationInstanceLimit( + -1) + .applicationTaskLimit( + -1) + .instanceMemoryLimit( + -1) + .memoryLimit( + 20480) + .name( + "name-2042") + .nonBasicServicesAllowed( + true) + .totalPrivateDomains( + -1) + .totalRoutes( + 1000) + .totalServices( + 60) + .trialDatabaseAllowed( + false) + .build()) + .build()) + .manager( + UserResource + .builder() + .metadata( + Metadata + .builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "uaa-id-355") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserEntity + .builder() + .active( + false) + .admin( + false) + .defaultSpaceId( + null) + .build()) + .build()) + .build()) + .build()) + .auditedSpace( + UserSpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity.builder() + .name("name-2043") + .build()) + .build()) + .managedSpace( + UserSpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity.builder() + .name("name-2043") + .build()) + .build()) + .space( + UserSpaceResource.builder() + .metadata( + Metadata.builder() + .createdAt( + "2016-06-08T16:41:40Z") + .id( + "db69758e-14e9-4fed-b69a-353a98a05a2e") + .updatedAt( + "2016-06-08T16:41:26Z") + .build()) + .entity( + UserSpaceEntity.builder() + .name("name-2043") + .build()) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/users/uaa-id-313") + .payload("fixtures/client/v2/users/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v2/users/PUT_{id}_response.json") + .build()) + .build()); + + this.users + .update( + UpdateUserRequest.builder() + .defaultSpaceId("56d8e095-b2c8-4ba9-b540-dc42ba1c7351") + .userId("uaa-id-313") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateUserResponse.builder() + .metadata( + Metadata.builder() + .createdAt("2016-06-08T16:41:37Z") + .id("uaa-id-313") + .updatedAt("2016-06-08T16:41:37Z") + .url("/v2/users/uaa-id-313") + .build()) + .entity( + UserEntity.builder() + .admin(false) + .active(false) + .auditedOrganizationsUrl( + "/v2/users/uaa-id-313/audited_organizations") + .auditedSpacesUrl( + "/v2/users/uaa-id-313/audited_spaces") + .billingManagedOrganizationsUrl( + "/v2/users/uaa-id-313/billing_managed_organizations") + .defaultSpaceId( + "56d8e095-b2c8-4ba9-b540-dc42ba1c7351") + .defaultSpaceUrl( + "/v2/spaces/56d8e095-b2c8-4ba9-b540-dc42ba1c7351") + .managedOrganizationsUrl( + "/v2/users/uaa-id-313/managed_organizations") + .managedSpacesUrl( + "/v2/users/uaa-id-313/managed_spaces") + .organizationsUrl( + "/v2/users/uaa-id-313/organizations") + .spacesUrl("/v2/users/uaa-id-313/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/FilterBuilderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/FilterBuilderTest.java new file mode 100644 index 00000000000..efc2d007557 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/FilterBuilderTest.java @@ -0,0 +1,102 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.stream.Stream; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.junit.jupiter.api.Test; +import org.springframework.util.MultiValueMap; +import org.springframework.web.util.UriComponentsBuilder; + +final class FilterBuilderTest { + + @Test + void test() { + UriComponentsBuilder builder = UriComponentsBuilder.newInstance(); + + Stream parameters = + new FilterBuilder().build(new StubFilterParamsSubClass()); + UriQueryParameters.set(builder, parameters); + + MultiValueMap queryParams = builder.encode().build().getQueryParams(); + + assertThat(queryParams).hasSize(6); + assertThat(queryParams.getFirst("test-single")).isEqualTo("test-value-1"); + assertThat(queryParams.getFirst("test-collection")) + .isEqualTo("test-value-2%2Ctest-value-3"); + assertThat(queryParams.getFirst("test-subclass")).isEqualTo("test-value-4"); + assertThat(queryParams.getFirst("test-override")).isEqualTo("test-value-7"); + assertThat(queryParams.getFirst("test-reserved-characters")) + .isEqualTo("%3A%2F%3F%23%5B%5D%40%21%24%26%27%28%29%2A%2B%2C%3B%3D"); + } + + public abstract static class StubFilterParams { + + @FilterParameter("test-collection") + public final List getCollection() { + return Arrays.asList("test-value-2", "test-value-3"); + } + + @FilterParameter("test-empty") + public final List getEmpty() { + return Collections.emptyList(); + } + + @FilterParameter("test-empty-value") + public final String getEmptyValue() { + return ""; + } + + @FilterParameter("test-null") + public final String getNull() { + return null; + } + + @FilterParameter("test-reserved-characters") + public final String getReservedCharacters() { + return ":/?#[]@!$&'()*+,;="; + } + + @FilterParameter("test-single") + public final String getSingle() { + return "test-value-1"; + } + + @FilterParameter("test-override") + abstract String getOverride(); + } + + public static final class StubFilterParamsSubClass extends StubFilterParams { + + @Override + public String getOverride() { + return "test-value-7"; + } + + @FilterParameter("test-subclass") + public String getSubclass() { + return "test-value-4"; + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/admin/ReactorAdminV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/admin/ReactorAdminV3Test.java new file mode 100644 index 00000000000..5d5e2594723 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/admin/ReactorAdminV3Test.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.admin; + +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.admin.ClearBuildpackCacheRequest; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorAdminV3Test extends AbstractClientApiTest { + + private final ReactorAdminV3 admin = + new ReactorAdminV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void clearBuildpackCache() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/admin/actions/clear_buildpack_cache") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/[guid]") + .build()) + .build()); + + this.admin + .clearBuildpackCache(ClearBuildpackCacheRequest.builder().build()) + .as(StepVerifier::create) + .expectNext("[guid]") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java new file mode 100644 index 00000000000..4e23eea93e4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/applications/ReactorApplicationsV3Test.java @@ -0,0 +1,2685 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.applications; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.client.v3.routes.Protocol.HTTP; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import org.cloudfoundry.client.v3.BuildpackData; +import org.cloudfoundry.client.v3.Checksum; +import org.cloudfoundry.client.v3.ChecksumType; +import org.cloudfoundry.client.v3.DockerData; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.LifecycleType; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.applications.ApplicationFeatureResource; +import org.cloudfoundry.client.v3.applications.ApplicationRelationships; +import org.cloudfoundry.client.v3.applications.ApplicationResource; +import org.cloudfoundry.client.v3.applications.ApplicationState; +import org.cloudfoundry.client.v3.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v3.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v3.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRelationshipRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRelationshipResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentVariablesRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentVariablesResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationFeatureResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationPermissionsRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationPermissionsResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessStatisticsRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessStatisticsResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationBuildsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationBuildsResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationDropletsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationDropletsResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationFeaturesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationFeaturesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationPackagesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationPackagesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationProcessesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationProcessesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationRoutesResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationTasksRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationTasksResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationsResponse; +import org.cloudfoundry.client.v3.applications.ScaleApplicationRequest; +import org.cloudfoundry.client.v3.applications.ScaleApplicationResponse; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.StartApplicationRequest; +import org.cloudfoundry.client.v3.applications.StartApplicationResponse; +import org.cloudfoundry.client.v3.applications.StopApplicationRequest; +import org.cloudfoundry.client.v3.applications.StopApplicationResponse; +import org.cloudfoundry.client.v3.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationEnvironmentVariablesRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationEnvironmentVariablesResponse; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureResponse; +import org.cloudfoundry.client.v3.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationResponse; +import org.cloudfoundry.client.v3.builds.BuildResource; +import org.cloudfoundry.client.v3.builds.BuildState; +import org.cloudfoundry.client.v3.builds.CreatedBy; +import org.cloudfoundry.client.v3.droplets.Buildpack; +import org.cloudfoundry.client.v3.droplets.DropletResource; +import org.cloudfoundry.client.v3.droplets.DropletState; +import org.cloudfoundry.client.v3.packages.BitsData; +import org.cloudfoundry.client.v3.packages.PackageResource; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.processes.Data; +import org.cloudfoundry.client.v3.processes.HealthCheck; +import org.cloudfoundry.client.v3.processes.HealthCheckType; +import org.cloudfoundry.client.v3.processes.PortMapping; +import org.cloudfoundry.client.v3.processes.ProcessRelationships; +import org.cloudfoundry.client.v3.processes.ProcessResource; +import org.cloudfoundry.client.v3.processes.ProcessState; +import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; +import org.cloudfoundry.client.v3.processes.ProcessUsage; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheck; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; +import org.cloudfoundry.client.v3.routes.Application; +import org.cloudfoundry.client.v3.routes.Destination; +import org.cloudfoundry.client.v3.routes.Process; +import org.cloudfoundry.client.v3.routes.RouteRelationships; +import org.cloudfoundry.client.v3.routes.RouteResource; +import org.cloudfoundry.client.v3.tasks.Result; +import org.cloudfoundry.client.v3.tasks.TaskResource; +import org.cloudfoundry.client.v3.tasks.TaskState; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.cloudfoundry.util.FluentMap; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorApplicationsV3Test extends AbstractClientApiTest { + + private final ReactorApplicationsV3 applications = + new ReactorApplicationsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps") + .payload("fixtures/client/v3/apps/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/apps/POST_response.json") + .build()) + .build()); + + this.applications + .create( + CreateApplicationRequest.builder() + .name("my_app") + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.3") + .label("isLive", "true") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateApplicationResponse.builder() + .id("1cb006ee-fb05-47e1-b541-c34179ddc446") + .name("my_app") + .state(ApplicationState.STOPPED) + .createdAt("2016-03-17T21:41:30Z") + .updatedAt("2016-06-08T16:41:26Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("java_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.3") + .label("isLive", "true") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/apps/test-application-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/[guid]") + .build()) + .build()); + + this.applications + .delete( + DeleteApplicationRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext("[guid]") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/apps/GET_{id}_response.json") + .build()) + .build()); + + this.applications + .get(GetApplicationRequest.builder().applicationId("test-application-id").build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationResponse.builder() + .id("1cb006ee-fb05-47e1-b541-c34179ddc446") + .name("my_app") + .state(ApplicationState.STOPPED) + .createdAt("2016-03-17T21:41:30Z") + .updatedAt("2016-06-08T16:41:26Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("java_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("isLive", "false") + .label("maintenance", "true") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getCurrentDroplet() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/droplets/current") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_droplets_current_response.json") + .build()) + .build()); + + this.applications + .getCurrentDroplet( + GetApplicationCurrentDropletRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationCurrentDropletResponse.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data(BuildpackData.builder().build()) + .build()) + .executionMetadata("") + .processType("rake", "bundle exec rake") + .processType("web", "bundle exec rackup config.ru -p $PORT") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .name("ruby_buildpack") + .detectOutput("ruby 1.6.14") + .build()) + .stack("cflinuxfs2") + .image(null) + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getCurrentDropletRelationship() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/apps/test-application-id/relationships/current_droplet") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_relationships_current_droplet_response.json") + .build()) + .build()); + + this.applications + .getCurrentDropletRelationship( + GetApplicationCurrentDropletRelationshipRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationCurrentDropletRelationshipResponse.builder() + .data( + Relationship.builder() + .id("9d8e007c-ce52-4ea7-8a57-f2825d2c6b39") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/current_droplet") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/droplets/current") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEnvironment() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/env") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_env_response.json") + .build()) + .build()); + + this.applications + .getEnvironment( + GetApplicationEnvironmentRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationEnvironmentResponse.builder() + .stagingEnvironmentVariable( + "GEM_CACHE", "http://gem-cache.example.org") + .runningEnvironmentVariable( + "HTTP_PROXY", "http://proxy.example.org") + .environmentVariable("RAILS_ENV", "production") + .systemEnvironmentVariable( + "VCAP_SERVICES", + FluentMap.builder() + .entry( + "mysql", + Collections.singletonList( + FluentMap.builder() + .entry( + "name", + "db-for-my-app") + .entry("label", "mysql") + .entry( + "tags", + Arrays.asList( + "relational", + "sql")) + .entry("plan", "xlarge") + .entry( + "credentials", + FluentMap.builder() + .entry( + "username", + "user") + .entry( + "password", + "top-secret") + .build()) + .entry( + "syslog_drain_url", + "https://syslog.example.org/drain") + .entry("provider", null) + .build())) + .build()) + .applicationEnvironmentVariable( + "VCAP_APPLICATION", + FluentMap.builder() + .entry( + "limits", + FluentMap.builder() + .entry("fds", 16384) + .build()) + .entry("application_name", "my_app") + .entry( + "application_uris", + Collections.singletonList( + "my_app.example.org")) + .entry("name", "my_app") + .entry("space_name", "my_space") + .entry( + "space_id", + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .entry( + "uris", + Collections.singletonList( + "my_app.example.org")) + .entry("users", null) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEnvironmentVariables() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/environment_variables") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_environment_variables_response.json") + .build()) + .build()); + + this.applications + .getEnvironmentVariables( + GetApplicationEnvironmentVariablesRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationEnvironmentVariablesResponse.builder() + .var("RAILS_ENV", "production") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/[guid]/environment_variables") + .build()) + .link( + "app", + Link.builder() + .href("https://api.example.org/v3/apps/[guid]") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getFeature() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/apps/test-application-id/features/test-feature-name") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_features_{name}_response.json") + .build()) + .build()); + + this.applications + .getFeature( + GetApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .featureName("test-feature-name") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationFeatureResponse.builder() + .description("Enable SSHing into the app.") + .enabled(true) + .name("ssh") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getPermissions() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/permissions") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_permissions_response.json") + .build()) + .build()); + + this.applications + .getPermissions( + GetApplicationPermissionsRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationPermissionsResponse.builder() + .readBasicData(true) + .readSensitiveData(false) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getProcess() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/processes/test-type") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json") + .build()) + .build()); + + this.applications + .getProcess( + GetApplicationProcessRequest.builder() + .applicationId("test-application-id") + .type("test-type") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationProcessResponse.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("rackup") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships(ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getProcessStatistics() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-id/processes/test-type/stats") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_processes_{type}_stats_response.json") + .build()) + .build()); + + this.applications + .getProcessStatistics( + GetApplicationProcessStatisticsRequest.builder() + .applicationId("test-id") + .type("test-type") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationProcessStatisticsResponse.builder() + .resource( + ProcessStatisticsResource.builder() + .type("web") + .index(0) + .state(ProcessState.RUNNING) + .usage( + ProcessUsage.builder() + .time( + "2016-03-23T23:17:30.476314154Z") + .cpu(0.00038711029163348665) + .memory(19177472L) + .disk(69705728L) + .build()) + .host("10.244.16.10") + .instancePort( + PortMapping.builder() + .external(64546) + .externalTlsProxyPort(1234) + .internal(8080) + .internalTlsProxyPort(5678) + .build()) + .uptime(9042L) + .memoryQuota(268435456L) + .diskQuota(1073741824L) + .fileDescriptorQuota(16384L) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getSshEnabled() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/ssh_enabled") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_ssh_enabled_response.json") + .build()) + .build()); + + this.applications + .getSshEnabled( + GetApplicationSshEnabledRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetApplicationSshEnabledResponse.builder() + .enabled(false) + .reason("Disabled globally") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/apps").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/apps/GET_response.json") + .build()) + .build()); + + this.applications + .list(ListApplicationsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/apps?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/apps?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/apps?page=2&per_page=2") + .build()) + .build()) + .resource( + ApplicationResource.builder() + .id("1cb006ee-fb05-47e1-b541-c34179ddc446") + .name("my_app") + .state(ApplicationState.STARTED) + .createdAt("2016-03-17T21:41:30Z") + .updatedAt("2016-03-18T11:32:30Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack( + "java_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.3") + .label("isLive", "true") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop") + .method("POST") + .build()) + .build()) + .resource( + ApplicationResource.builder() + .id("02b4ec9b-94c7-4468-9c23-4e906191a0f8") + .name("my_app2") + .state(ApplicationState.STOPPED) + .createdAt("1970-01-01T00:00:02Z") + .updatedAt("2016-06-08T16:41:26Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack( + "ruby_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/actions/stop") + .method("POST") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listBuilds() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/builds") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_builds_response.json") + .build()) + .build()); + + this.applications + .listBuilds( + ListApplicationBuildsRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationBuildsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/apps/test-application-id/builds?states=STAGING&page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/apps/test-application-id/builds?states=STAGING&page=1&per_page=2") + .build()) + .build()) + .resource( + BuildResource.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-06-08T16:41:26Z") + .createdBy( + CreatedBy.builder() + .id( + "3cb4e243-bed4-49d5-8739-f8b45abdec1c") + .name("bill") + .email("bill@example.com") + .build()) + .state(BuildState.STAGING) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack( + "ruby_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .inputPackage( + Relationship.builder() + .id( + "8e4da443-f255-499c-8b47-b3729b5b7432") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDroplets() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/droplets") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_droplets_response.json") + .build()) + .build()); + + this.applications + .listDroplets( + ListApplicationDropletsRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationDropletsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/app/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/app/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .build()) + .build()) + .image(null) + .executionMetadata("PRIVATE DATA HIDDEN") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .name("ruby_buildpack") + .detectOutput("ruby 1.6.14") + .build()) + .stack("cflinuxfs2") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("fdf3851c-def8-4de1-87f1-6d4543189e22") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.DOCKER) + .data(DockerData.builder().build()) + .build()) + .executionMetadata("[PRIVATE DATA HIDDEN IN LISTS]") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .image( + "cloudfoundry/diego-docker-app-custom:latest") + .checksum(null) + .stack(null) + .createdAt("2016-03-17T00:00:01Z") + .updatedAt("2016-03-17T21:41:32Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listFeatures() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/features") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_features_response.json") + .build()) + .build()); + + this.applications + .listFeatures( + ListApplicationFeaturesRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationFeaturesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "/v3/apps/05d39de4-2c9e-4c76-8fd6-10417da07e42/features") + .build()) + .last( + Link.builder() + .href( + "/v3/apps/05d39de4-2c9e-4c76-8fd6-10417da07e42/features") + .build()) + .build()) + .resource( + ApplicationFeatureResource.builder() + .name("ssh") + .description("Enable SSHing into the app.") + .enabled(true) + .build()) + .resource( + ApplicationFeatureResource.builder() + .name("revisions") + .description("Enable versioning of an application") + .enabled(false) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listPackages() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/packages") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_packages_response.json") + .build()) + .build()); + + this.applications + .listPackages( + ListApplicationPackagesRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationPackagesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/apps/f2efe391-2b5b-4836-8518-ad93fa9ebf69/packages?states=READY&page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/apps/f2efe391-2b5b-4836-8518-ad93fa9ebf69/packages?states=READY&page=1&per_page=50") + .build()) + .build()) + .resource( + PackageResource.builder() + .id("752edab0-2147-4f58-9c25-cd72ad8c3561") + .type(PackageType.BITS) + .data( + BitsData.builder() + .error(null) + .checksum( + Checksum.builder() + .type( + ChecksumType + .SHA256) + .value(null) + .build()) + .build()) + .state(PackageState.READY) + .createdAt("2016-03-17T21:41:09Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/752edab0-2147-4f58-9c25-cd72ad8c3561") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/packages/752edab0-2147-4f58-9c25-cd72ad8c3561/upload") + .method("POST") + .build()) + .link( + "download", + Link.builder() + .href( + "https://api.example.org/v3/packages/752edab0-2147-4f58-9c25-cd72ad8c3561/download") + .method("GET") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/f2efe391-2b5b-4836-8518-ad93fa9ebf69") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listProcesses() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/processes") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_processes_response.json") + .build()) + .build()); + + this.applications + .listProcesses( + ListApplicationProcessesRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationProcessesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/processes?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/processes?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/processes?page=2&per_page=2") + .build()) + .build()) + .resource( + ProcessResource.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("[PRIVATE DATA HIDDEN IN LISTS]") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships( + ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .resource( + ProcessResource.builder() + .id("3fccacd9-4b02-4b96-8d02-8e865865e9eb") + .type("worker") + .command("[PRIVATE DATA HIDDEN IN LISTS]") + .instances(1) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PROCESS) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships( + ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/stats") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRoutes() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/routes") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_routes_response.json") + .build()) + .build()); + this.applications + .listRoutes( + ListApplicationRoutesRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationRoutesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/routes?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/routes?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/routes?page=2&per_page=2") + .build()) + .build()) + .resource( + RouteResource.builder() + .host("test-hostname") + .id("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .protocol(HTTP) + .path("/some_path") + .createdAt("2019-05-10T17:17:48Z") + .updatedAt("2019-05-10T17:17:48Z") + .host("a-hostname") + .url("a-hostname.a-domain.com/some_path") + .destinations( + Destination.builder() + .destinationId( + "385bf117-17f5-4689-8c5c-08c6cc821fed") + .application( + Application.builder() + .applicationId( + "0a6636b5-7fc4-44d8-8752-0db3e40b35a5") + .process( + Process + .builder() + .type( + "web") + .build()) + .build()) + .port(8080) + .build()) + .destinations( + Destination.builder() + .destinationId( + "27e96a3b-5bcf-49ed-8048-351e0be23e6f") + .application( + Application.builder() + .applicationId( + "f61e59fa-2121-4217-8c7b-15bfd75baf25") + .process( + Process + .builder() + .type( + "web") + .build()) + .build()) + .port(8080) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships( + RouteRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "885a8cb3-c07b-4856-b448-eeb10bf36236") + .build()) + .build()) + .domain( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "0b5f3633-194c-42d2-9408-972366617e0e") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885a8cb3-c07b-4856-b448-eeb10bf36236") + .build()) + .link( + "domain", + Link.builder() + .href( + "https://api.example.org/v3/domains/0b5f3633-194c-42d2-9408-972366617e0e") + .build()) + .link( + "destinations", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listTasks() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/tasks") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/GET_{id}_tasks_response.json") + .build()) + .build()); + + this.applications + .listTasks( + ListApplicationTasksRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListApplicationTasksResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks?page=2&per_page=2") + .build()) + .build()) + .resource( + TaskResource.builder() + .id("d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .sequenceId(1) + .name("hello") + .state(TaskState.SUCCEEDED) + .memoryInMb(512) + .diskInMb(1024) + .result(Result.builder().build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .resource( + TaskResource.builder() + .id("63b4cd89-fd8b-4bf1-a311-7174fcc907d6") + .sequenceId(2) + .name("migrate") + .state(TaskState.FAILED) + .memoryInMb(512) + .diskInMb(1024) + .result( + Result.builder() + .failureReason( + "Exited with status 1") + .build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6/actions/cancel") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void scale() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/apps/test-application-id/processes/test-type/actions/scale") + .payload( + "fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json") + .build()) + .build()); + + this.applications + .scale( + ScaleApplicationRequest.builder() + .applicationId("test-application-id") + .type("test-type") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .build()) + .as(StepVerifier::create) + .expectNext( + ScaleApplicationResponse.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("rackup") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships(ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setCurrentDroplet() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/apps/test-application-id/relationships/current_droplet") + .payload( + "fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_response.json") + .build()) + .build()); + + this.applications + .setCurrentDroplet( + SetApplicationCurrentDropletRequest.builder() + .data(Relationship.builder().id("[droplet_guid]").build()) + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + SetApplicationCurrentDropletResponse.builder() + .data( + Relationship.builder() + .id("9d8e007c-ce52-4ea7-8a57-f2825d2c6b39") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/current_droplet") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/droplets/current") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void start() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps/test-application-id/actions/start") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/POST_{id}_actions_start_response.json") + .build()) + .build()); + + this.applications + .start( + StartApplicationRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + StartApplicationResponse.builder() + .id("1cb006ee-fb05-47e1-b541-c34179ddc446") + .name("my_app") + .state(ApplicationState.STARTED) + .createdAt("2016-03-17T21:41:30Z") + .updatedAt("2016-03-18T11:32:30Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("java_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void stop() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps/test-application-id/actions/stop") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/POST_{id}_actions_stop_response.json") + .build()) + .build()); + + this.applications + .stop(StopApplicationRequest.builder().applicationId("test-application-id").build()) + .as(StepVerifier::create) + .expectNext( + StopApplicationResponse.builder() + .id("1cb006ee-fb05-47e1-b541-c34179ddc446") + .name("my_app") + .state(ApplicationState.STOPPED) + .createdAt("2016-03-17T21:41:30Z") + .updatedAt("2016-03-18T11:32:30Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("java_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void terminateInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/apps/test-application-id/processes/test-type/instances/test-index") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.applications + .terminateInstance( + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .index("test-index") + .type("test-type") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/apps/test-application-id") + .payload("fixtures/client/v3/apps/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/apps/PATCH_{id}_response.json") + .build()) + .build()); + + this.applications + .update( + UpdateApplicationRequest.builder() + .applicationId("test-application-id") + .name("my_app") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("java_buildpack") + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("isLive", "false") + .label("maintenance", "true") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateApplicationResponse.builder() + .id("1cb006ee-fb05-47e1-b541-c34179ddc446") + .name("my_app") + .state(ApplicationState.STARTED) + .createdAt("2016-03-17T21:41:30Z") + .updatedAt("2016-03-18T11:32:30Z") + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("java_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("isLive", "false") + .label("maintenance", "true") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "processes", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes") + .build()) + .link( + "route_mappings", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings") + .build()) + .link( + "packages", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages") + .build()) + .link( + "environment_variables", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables") + .build()) + .link( + "current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current") + .build()) + .link( + "droplets", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets") + .build()) + .link( + "tasks", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks") + .build()) + .link( + "start", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start") + .method("POST") + .build()) + .link( + "stop", + Link.builder() + .href( + "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateEnvironmentVariables() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/apps/test-application-id/environment_variables") + .payload( + "fixtures/client/v3/apps/PATCH_{id}_environment_variables_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/PATCH_{id}_environment_variables_response.json") + .build()) + .build()); + + this.applications + .updateEnvironmentVariables( + UpdateApplicationEnvironmentVariablesRequest.builder() + .applicationId("test-application-id") + .var("DEBUG", "false") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateApplicationEnvironmentVariablesResponse.builder() + .var("RAILS_ENV", "production") + .var("DEBUG", "false") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/apps/[guid]/environment_variables") + .build()) + .link( + "app", + Link.builder() + .href("https://api.example.org/v3/apps/[guid]") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateFeature() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/apps/test-application-id/features/ssh") + .payload( + "fixtures/client/v3/apps/PATCH_{id}_features_{name}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/apps/PATCH_{id}_features_{name}_response.json") + .build()) + .build()); + + this.applications + .updateFeature( + UpdateApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .enabled(false) + .featureName("ssh") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateApplicationFeatureResponse.builder() + .description("Enable SSHing into the app.") + .enabled(true) + .name("ssh") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/auditevents/ReactorAuditEventsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/auditevents/ReactorAuditEventsV3Test.java new file mode 100644 index 00000000000..a1f8c8e9682 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/auditevents/ReactorAuditEventsV3Test.java @@ -0,0 +1,186 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.auditevents; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.auditevents.AuditEventActor; +import org.cloudfoundry.client.v3.auditevents.AuditEventResource; +import org.cloudfoundry.client.v3.auditevents.AuditEventTarget; +import org.cloudfoundry.client.v3.auditevents.GetAuditEventRequest; +import org.cloudfoundry.client.v3.auditevents.GetAuditEventResponse; +import org.cloudfoundry.client.v3.auditevents.ListAuditEventsRequest; +import org.cloudfoundry.client.v3.auditevents.ListAuditEventsResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorAuditEventsV3Test extends AbstractClientApiTest { + + private final ReactorAuditEventsV3 events = + new ReactorAuditEventsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/audit_events/a595fe2f-01ff-4965-a50c-290258ab8582") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/auditevents/GET_{id}_response.json") + .build()) + .build()); + + this.events + .get( + GetAuditEventRequest.builder() + .eventId("a595fe2f-01ff-4965-a50c-290258ab8582") + .build()) + .as(StepVerifier::create) + .expectNext( + GetAuditEventResponse.builder() + .id("a595fe2f-01ff-4965-a50c-290258ab8582") + .createdAt("2016-06-08T16:41:23Z") + .updatedAt("2016-06-08T16:41:26Z") + .type("audit.app.update") + .auditEventActor( + AuditEventActor.builder() + .id("d144abe3-3d7b-40d4-b63f-2584798d3ee5") + .name("admin") + .type("user") + .build()) + .auditEventTarget( + AuditEventTarget.builder() + .id("2e3151ba-9a63-4345-9c5b-6d8c238f4e55") + .name("my-app") + .type("app") + .build()) + .data((Collections.singletonMap("request", null))) + .spaceRelationship( + Relationship.builder() + .id("cb97dd25-d4f7-4185-9e6f-ad6e585c207c") + .build()) + .organizationRelationship( + Relationship.builder() + .id("d9be96f5-ea8f-4549-923f-bec882e32e3c") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/audit_events/a595fe2f-01ff-4965-a50c-290258ab8582") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/audit_events").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/auditevents/GET_response.json") + .build()) + .build()); + + this.events + .list(ListAuditEventsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListAuditEventsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/audit_events?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/audit_events?page=1&per_page=2") + .build()) + .build()) + .resource( + AuditEventResource.builder() + .id("a595fe2f-01ff-4965-a50c-290258ab8582") + .createdAt("2016-06-08T16:41:23Z") + .updatedAt("2016-06-08T16:41:26Z") + .type("audit.app.update") + .auditEventActor( + AuditEventActor.builder() + .id( + "d144abe3-3d7b-40d4-b63f-2584798d3ee5") + .name("admin") + .type("user") + .build()) + .auditEventTarget( + AuditEventTarget.builder() + .id( + "2e3151ba-9a63-4345-9c5b-6d8c238f4e55") + .name("my-app") + .type("app") + .build()) + .data( + Collections.singletonMap( + "request", + Collections.singletonMap( + "recursive", true))) + .spaceRelationship( + Relationship.builder() + .id( + "cb97dd25-d4f7-4185-9e6f-ad6e585c207c") + .build()) + .organizationRelationship( + Relationship.builder() + .id( + "d9be96f5-ea8f-4549-923f-bec882e32e3c") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org//v3/audit_events/a595fe2f-01ff-4965-a50c-290258ab8582") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/buildpacks/ReactorBuildpacksTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/buildpacks/ReactorBuildpacksTest.java new file mode 100644 index 00000000000..c4a79e1356f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/buildpacks/ReactorBuildpacksTest.java @@ -0,0 +1,438 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.buildpacks; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.LifecycleType; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.buildpacks.BuildpackResource; +import org.cloudfoundry.client.v3.buildpacks.BuildpackState; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksResponse; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.cloudfoundry.reactor.client.v3.builpacks.ReactorBuildpacksV3; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.test.StepVerifier; + +final class ReactorBuildpacksTest extends AbstractClientApiTest { + + private final ReactorBuildpacksV3 buildpacks = + new ReactorBuildpacksV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/buildpacks") + .payload("fixtures/client/v3/buildpacks/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/buildpacks/POST_response.json") + .build()) + .build()); + + this.buildpacks + .create( + CreateBuildpackRequest.builder() + .name("ruby_buildpack") + .position(42) + .enabled(true) + .locked(false) + .stack("windows64") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateBuildpackResponse.builder() + .id("fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .createdAt("2016-03-18T23:26:46Z") + .updatedAt("2016-10-17T20:00:42Z") + .name("ruby_buildpack") + .state(BuildpackState.AWAITING_UPLOAD) + .stack("windows64") + .position(42) + .enabled(true) + .locked(false) + .lifecycle(LifecycleType.BUILDPACK) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/buildpacks/test-buildpack-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/[guid]") + .build()) + .build()); + + this.buildpacks + .delete(DeleteBuildpackRequest.builder().buildpackId("test-buildpack-id").build()) + .as(StepVerifier::create) + .expectNext("[guid]") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/buildpacks/test-buildpack-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/buildpacks/GET_{id}_response.json") + .build()) + .build()); + + this.buildpacks + .get(GetBuildpackRequest.builder().buildpackId("test-buildpack-id").build()) + .as(StepVerifier::create) + .expectNext( + GetBuildpackResponse.builder() + .id("fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .createdAt("2016-03-18T23:26:46Z") + .updatedAt("2016-10-17T20:00:42Z") + .name("ruby_buildpack") + .state(BuildpackState.AWAITING_UPLOAD) + .stack("windows64") + .position(42) + .enabled(true) + .locked(false) + .lifecycle(LifecycleType.BUILDPACK) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/buildpacks").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/buildpacks/GET_response.json") + .build()) + .build()); + + this.buildpacks + .list(ListBuildpacksRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListBuildpacksResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/buildpacks?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/buildpacks?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/buildpacks?page=2&per_page=2") + .build()) + .build()) + .resource( + BuildpackResource.builder() + .id("fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .createdAt("2016-03-18T23:26:46Z") + .updatedAt("2016-10-17T20:00:42Z") + .name("my-buildpack") + .state(BuildpackState.AWAITING_UPLOAD) + .stack("my-stack") + .position(1) + .enabled(true) + .locked(false) + .lifecycle(LifecycleType.BUILDPACK) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload") + .method("POST") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/buildpacks/test-buildpack-id") + .payload( + "fixtures/client/v3/buildpacks/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/buildpacks/PATCH_{id}_response.json") + .build()) + .build()); + + this.buildpacks + .update( + UpdateBuildpackRequest.builder() + .buildpackId("test-buildpack-id") + .name("ruby_buildpack") + .position(42) + .enabled(true) + .locked(false) + .stack("windows64") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateBuildpackResponse.builder() + .id("fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .createdAt("2016-03-18T23:26:46Z") + .updatedAt("2016-10-17T20:00:42Z") + .name("ruby_buildpack") + .state(BuildpackState.AWAITING_UPLOAD) + .stack("windows64") + .position(42) + .enabled(true) + .locked(false) + .lifecycle(LifecycleType.BUILDPACK) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void upload() throws IOException { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/buildpacks/test-buildpack-id/upload") + .contents( + consumer( + (headers, body) -> { + String boundary = + extractBoundary(headers); + + assertThat( + body.readString( + Charset + .defaultCharset())) + .isEqualTo( + "--" + + boundary + + "\r\n" + + "content-disposition:" + + " form-data;" + + " name=\"bits\";" + + " filename=\"test-buildpack.zip\"\r\n" + + "content-length:" + + " 12\r\n" + + "content-type:" + + " application/zip\r\n" + + "content-transfer-encoding:" + + " binary\r\n" + + "\r\n" + + "test-content\r\n" + + "--" + + boundary + + "--\r\n"); + })) + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/buildpacks/POST_{id}_upload_response.json") + .build()) + .build()); + + this.buildpacks + .upload( + UploadBuildpackRequest.builder() + .bits( + new ClassPathResource( + "fixtures/client/v3/buildpacks/test-buildpack.zip") + .getFile() + .toPath()) + .buildpackId("test-buildpack-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UploadBuildpackResponse.builder() + .id("fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .createdAt("2016-03-18T23:26:46Z") + .updatedAt("2016-10-17T20:00:42Z") + .name("ruby_buildpack") + .state(BuildpackState.AWAITING_UPLOAD) + .stack("windows64") + .position(42) + .enabled(true) + .locked(false) + .lifecycle(LifecycleType.BUILDPACK) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload") + .method("POST") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/builds/ReactorBuildsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/builds/ReactorBuildsTest.java new file mode 100644 index 00000000000..c250c0b6a63 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/builds/ReactorBuildsTest.java @@ -0,0 +1,266 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.builds; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.BuildpackData; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.LifecycleType; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.builds.BuildResource; +import org.cloudfoundry.client.v3.builds.BuildState; +import org.cloudfoundry.client.v3.builds.CreateBuildRequest; +import org.cloudfoundry.client.v3.builds.CreateBuildResponse; +import org.cloudfoundry.client.v3.builds.CreatedBy; +import org.cloudfoundry.client.v3.builds.Droplet; +import org.cloudfoundry.client.v3.builds.GetBuildRequest; +import org.cloudfoundry.client.v3.builds.GetBuildResponse; +import org.cloudfoundry.client.v3.builds.ListBuildsRequest; +import org.cloudfoundry.client.v3.builds.ListBuildsResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorBuildsTest extends AbstractClientApiTest { + + private final ReactorBuilds builds = + new ReactorBuilds( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/builds") + .payload("fixtures/client/v3/builds/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/builds/POST_response.json") + .build()) + .build()); + + this.builds + .create( + CreateBuildRequest.builder() + .getPackage(Relationship.builder().id("[package-guid]").build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateBuildResponse.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-06-08T16:41:26Z") + .createdBy( + CreatedBy.builder() + .id("3cb4e243-bed4-49d5-8739-f8b45abdec1c") + .name("bill") + .email("bill@example.com") + .build()) + .state(BuildState.STAGING) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("ruby_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .inputPackage( + Relationship.builder() + .id("8e4da443-f255-499c-8b47-b3729b5b7432") + .build()) + .droplet(null) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/builds/test-build-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/builds/GET_{id}_response.json") + .build()) + .build()); + + this.builds + .get(GetBuildRequest.builder().buildId("test-build-id").build()) + .as(StepVerifier::create) + .expectNext( + GetBuildResponse.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .createdBy( + CreatedBy.builder() + .id("3cb4e243-bed4-49d5-8739-f8b45abdec1c") + .name("bill") + .email("bill@example.com") + .build()) + .state(BuildState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack("ruby_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .inputPackage( + Relationship.builder() + .id("8e4da443-f255-499c-8b47-b3729b5b7432") + .build()) + .droplet( + Droplet.builder() + .id("1e1186e7-d803-4c46-b9d6-5c81e50fe55a") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/builds").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/builds/GET_response.json") + .build()) + .build()); + + this.builds + .list(ListBuildsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListBuildsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/builds?states=STAGING&page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/builds?states=STAGING&page=1&per_page=2") + .build()) + .build()) + .resource( + BuildResource.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-06-08T16:41:26Z") + .createdBy( + CreatedBy.builder() + .id( + "3cb4e243-bed4-49d5-8739-f8b45abdec1c") + .name("bill") + .email("bill@example.com") + .build()) + .state(BuildState.STAGING) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .buildpack( + "ruby_buildpack") + .stack("cflinuxfs2") + .build()) + .build()) + .inputPackage( + Relationship.builder() + .id( + "8e4da443-f255-499c-8b47-b3729b5b7432") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/deployments/ReactorDeploymentsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/deployments/ReactorDeploymentsV3Test.java new file mode 100644 index 00000000000..97f66771414 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/deployments/ReactorDeploymentsV3Test.java @@ -0,0 +1,339 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.deployments; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static java.util.Collections.singletonList; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.deployments.CancelDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.CreateDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.CreateDeploymentResponse; +import org.cloudfoundry.client.v3.deployments.DeploymentRelationships; +import org.cloudfoundry.client.v3.deployments.DeploymentResource; +import org.cloudfoundry.client.v3.deployments.DeploymentState; +import org.cloudfoundry.client.v3.deployments.GetDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.GetDeploymentResponse; +import org.cloudfoundry.client.v3.deployments.ListDeploymentsRequest; +import org.cloudfoundry.client.v3.deployments.ListDeploymentsResponse; +import org.cloudfoundry.client.v3.deployments.Process; +import org.cloudfoundry.client.v3.deployments.Revision; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorDeploymentsV3Test extends AbstractClientApiTest { + + private final ReactorDeploymentsV3 deployments = + new ReactorDeploymentsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void cancel() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/deployments/test-deployment-id/actions/cancel") + .payload( + "fixtures/client/v3/deployments/POST_{id}_cancel_request.json") + .build()) + .response(TestResponse.builder().status(OK).build()) + .build()); + + this.deployments + .cancel( + CancelDeploymentRequest.builder() + .deploymentId("test-deployment-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/deployments") + .payload("fixtures/client/v3/deployments/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/deployments/POST_response.json") + .build()) + .build()); + + this.deployments + .create( + CreateDeploymentRequest.builder() + .droplet( + Relationship.builder() + .id("44ccfa61-dbcf-4a0d-82fe-f668e9d2a962") + .build()) + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateDeploymentResponse.builder() + .id("59c3d133-2b83-46f3-960e-7765a129aea4") + .state(DeploymentState.DEPLOYING) + .droplet( + Relationship.builder() + .id("44ccfa61-dbcf-4a0d-82fe-f668e9d2a962") + .build()) + .previousDroplet( + Relationship.builder() + .id("cc6bc315-bd06-49ce-92c2-bc3ad45268c2") + .build()) + .newProcesses( + singletonList( + Process.builder() + .id("fd5d3e60-f88c-4c37-b1ae-667cfc65a856") + .type( + "web-deployment-59c3d133-2b83-46f3-960e-7765a129aea4") + .build())) + .revision( + Revision.builder() + .id("56126cba-656a-4eba-a81e-7e9951b2df57") + .version(1) + .build()) + .createdAt("2018-04-25T22:42:10Z") + .updatedAt("2018-04-25T22:42:10Z") + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/deployments/59c3d133-2b83-46f3-960e-7765a129aea4") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/deployments/test-deployment-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/deployments/GET_{id}_response.json") + .build()) + .build()); + + this.deployments + .get(GetDeploymentRequest.builder().deploymentId("test-deployment-id").build()) + .as(StepVerifier::create) + .expectNext( + GetDeploymentResponse.builder() + .id("59c3d133-2b83-46f3-960e-7765a129aea4") + .state(DeploymentState.DEPLOYING) + .droplet( + Relationship.builder() + .id("44ccfa61-dbcf-4a0d-82fe-f668e9d2a962") + .build()) + .previousDroplet( + Relationship.builder() + .id("cc6bc315-bd06-49ce-92c2-bc3ad45268c2") + .build()) + .newProcesses( + singletonList( + Process.builder() + .id("fd5d3e60-f88c-4c37-b1ae-667cfc65a856") + .type( + "web-deployment-59c3d133-2b83-46f3-960e-7765a129aea4") + .build())) + .revision( + Revision.builder() + .id("56126cba-656a-4eba-a81e-7e9951b2df57") + .version(1) + .build()) + .createdAt("2018-04-25T22:42:10Z") + .updatedAt("2018-04-25T22:42:10Z") + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/deployments/59c3d133-2b83-46f3-960e-7765a129aea4") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("deprecation") + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/deployments").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/deployments/GET_response.json") + .build()) + .build()); + + this.deployments + .list(ListDeploymentsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListDeploymentsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/deployments?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/deployments?page=1&per_page=2") + .build()) + .build()) + .resource( + DeploymentResource.builder() + .id("59c3d133-2b83-46f3-960e-7765a129aea4") + .state(DeploymentState.DEPLOYING) + .droplet( + Relationship.builder() + .id( + "44ccfa61-dbcf-4a0d-82fe-f668e9d2a962") + .build()) + .previousDroplet( + Relationship.builder() + .id( + "cc6bc315-bd06-49ce-92c2-bc3ad45268c2") + .build()) + .newProcesses( + singletonList( + Process.builder() + .id( + "fd5d3e60-f88c-4c37-b1ae-667cfc65a856") + .type( + "web-deployment-59c3d133-2b83-46f3-960e-7765a129aea4") + .build())) + .revision( + Revision.builder() + .id( + "56126cba-656a-4eba-a81e-7e9951b2df57") + .version(1) + .build()) + .createdAt("2018-04-25T22:42:10Z") + .updatedAt("2018-04-25T22:42:10Z") + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/deployments/59c3d133-2b83-46f3-960e-7765a129aea4") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/305cea31-5a44-45ca-b51b-e89c7a8ef8b2") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/domains/ReactorDomainsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/domains/ReactorDomainsV3Test.java new file mode 100644 index 00000000000..36de7e88e47 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/domains/ReactorDomainsV3Test.java @@ -0,0 +1,484 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.domains; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DeleteDomainRequest; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.domains.GetDomainRequest; +import org.cloudfoundry.client.v3.domains.GetDomainResponse; +import org.cloudfoundry.client.v3.domains.ListDomainsRequest; +import org.cloudfoundry.client.v3.domains.ListDomainsResponse; +import org.cloudfoundry.client.v3.domains.RouterGroup; +import org.cloudfoundry.client.v3.domains.ShareDomainRequest; +import org.cloudfoundry.client.v3.domains.ShareDomainResponse; +import org.cloudfoundry.client.v3.domains.UnshareDomainRequest; +import org.cloudfoundry.client.v3.domains.UpdateDomainRequest; +import org.cloudfoundry.client.v3.domains.UpdateDomainResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorDomainsV3Test extends AbstractClientApiTest { + + private final ReactorDomainsV3 domains = + new ReactorDomainsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/domains") + .payload("fixtures/client/v3/domains/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/domains/POST_response.json") + .build()) + .build()); + + this.domains + .create( + CreateDomainRequest.builder() + .name("test-domain.com") + .internal(false) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateDomainResponse.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .name("test-domain.com") + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .isInternal(false) + .metadata( + Metadata.builder() + .labels(Collections.emptyMap()) + .annotations(Collections.emptyMap()) + .build()) + .relationships( + DomainRelationships.builder() + .organization(ToOneRelationship.builder().build()) + .sharedOrganizations( + ToManyRelationship.builder().build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .link( + "route_reservations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/domains/test-domain-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/[guid]") + .build()) + .build()); + + this.domains + .delete(DeleteDomainRequest.builder().domainId("test-domain-id").build()) + .as(StepVerifier::create) + .expectNext("[guid]") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/domains/test-domain-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/domains/GET_{id}_response.json") + .build()) + .build()); + + this.domains + .get(GetDomainRequest.builder().domainId("test-domain-id").build()) + .as(StepVerifier::create) + .expectNext( + GetDomainResponse.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .name("test-domain.com") + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .isInternal(false) + .metadata( + Metadata.builder() + .labels(Collections.emptyMap()) + .annotations(Collections.emptyMap()) + .build()) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "3a3f3d89-3f89-4f05-8188-751b298c79d5") + .build()) + .build()) + .sharedOrganizations( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id( + "404f3d89-3f89-6z72-8188-751b298d88d5") + .build()) + .data( + Relationship.builder() + .id( + "416d3d89-3f89-8h67-2189-123b298d3592") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/3a3f3d89-3f89-4f05-8188-751b298c79d5") + .build()) + .link( + "route_reservations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations") + .build()) + .link( + "shared_organizations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/relationships/shared_organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/domains").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/domains/GET_response.json") + .build()) + .build()); + + this.domains + .list(ListDomainsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListDomainsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/domains?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/domains?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/domains?page=2&per_page=2") + .build()) + .build()) + .resource( + DomainResource.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .name("test-domain.com") + .isInternal(false) + .routerGroup( + RouterGroup.builder() + .id( + "5806148f-cce6-4d86-7fbd-aa269e3f6f3f") + .build()) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data(null) + .build()) + .sharedOrganizations( + ToManyRelationship.builder() + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .link( + "route_reservations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void share() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/domains/test-domain-id/relationships/shared_organizations") + .payload( + "fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_response.json") + .build()) + .build()); + + this.domains + .share( + ShareDomainRequest.builder() + .domainId("test-domain-id") + .data( + Relationship.builder() + .id("404f3d89-3f89-6z72-8188-751b298d88d5") + .build()) + .data( + Relationship.builder() + .id("416d3d89-3f89-8h67-2189-123b298d3592") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + ShareDomainResponse.builder() + .data( + Relationship.builder() + .id("404f3d89-3f89-6z72-8188-751b298d88d5") + .build()) + .data( + Relationship.builder() + .id("416d3d89-3f89-8h67-2189-123b298d3592") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unshare() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/domains/test-domain-id/relationships/shared_organizations/test-org-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.domains + .unshare( + UnshareDomainRequest.builder() + .domainId("test-domain-id") + .organizationId("test-org-id") + .build()) + .as(StepVerifier::create) + .expectNext() + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/domains/test-domain-id") + .payload( + "fixtures/client/v3/domains/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/domains/PATCH_{id}_response.json") + .build()) + .build()); + + this.domains + .update( + UpdateDomainRequest.builder() + .domainId("test-domain-id") + .metadata( + Metadata.builder() + .annotation("note", "detailed information") + .label("key", "value") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateDomainResponse.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .name("test-domain.com") + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .isInternal(false) + .metadata( + Metadata.builder() + .label("key", "value") + .annotation("note", "detailed information") + .build()) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "3a3f3d89-3f89-4f05-8188-751b298c79d5") + .build()) + .build()) + .sharedOrganizations( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id( + "404f3d89-3f89-6z72-8188-751b298d88d5") + .build()) + .data( + Relationship.builder() + .id( + "416d3d89-3f89-8h67-2189-123b298d3592") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/3a3f3d89-3f89-4f05-8188-751b298c79d5") + .build()) + .link( + "route_reservations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations") + .build()) + .link( + "shared_organizations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/relationships/shared_organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/droplets/ReactorDropletsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/droplets/ReactorDropletsTest.java new file mode 100644 index 00000000000..a96ee53fb38 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/droplets/ReactorDropletsTest.java @@ -0,0 +1,435 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.droplets; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.BuildpackData; +import org.cloudfoundry.client.v3.Checksum; +import org.cloudfoundry.client.v3.ChecksumType; +import org.cloudfoundry.client.v3.DockerData; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.LifecycleType; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.droplets.Buildpack; +import org.cloudfoundry.client.v3.droplets.CopyDropletRequest; +import org.cloudfoundry.client.v3.droplets.CopyDropletResponse; +import org.cloudfoundry.client.v3.droplets.DeleteDropletRequest; +import org.cloudfoundry.client.v3.droplets.DropletRelationships; +import org.cloudfoundry.client.v3.droplets.DropletResource; +import org.cloudfoundry.client.v3.droplets.DropletState; +import org.cloudfoundry.client.v3.droplets.GetDropletRequest; +import org.cloudfoundry.client.v3.droplets.GetDropletResponse; +import org.cloudfoundry.client.v3.droplets.ListDropletsRequest; +import org.cloudfoundry.client.v3.droplets.ListDropletsResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorDropletsTest extends AbstractClientApiTest { + + private final ReactorDroplets droplets = + new ReactorDroplets( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void copy() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/droplets?source_guid=test-source-droplet-id") + .payload( + "fixtures/client/v3/droplets/POST_source_guid={id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/droplets/POST_source_guid={id}_response.json") + .build()) + .build()); + + this.droplets + .copy( + CopyDropletRequest.builder() + .sourceDropletId("test-source-droplet-id") + .relationships( + DropletRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("[app-guid]") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CopyDropletResponse.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .state(DropletState.COPYING) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data(BuildpackData.builder().build()) + .build()) + .executionMetadata("") + .processTypes(null) + .checksum(null) + .stack(null) + .image(null) + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/droplets/test-droplet-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/[guid]") + .build()) + .build()); + + this.droplets + .delete(DeleteDropletRequest.builder().dropletId("test-droplet-id").build()) + .as(StepVerifier::create) + .expectNext("[guid]") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/droplets/test-droplet-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/droplets/GET_{id}_response.json") + .build()) + .build()); + + this.droplets + .get(GetDropletRequest.builder().dropletId("test-droplet-id").build()) + .as(StepVerifier::create) + .expectNext( + GetDropletResponse.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data(BuildpackData.builder().build()) + .build()) + .executionMetadata("") + .processType("rake", "bundle exec rake") + .processType("web", "bundle exec rackup config.ru -p $PORT") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .buildpackName("ruby") + .detectOutput("ruby 1.6.14") + .name("ruby_buildpack") + .version("1.1.1.") + .build()) + .stack("cflinuxfs2") + .image(null) + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/droplets").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/droplets/GET_response.json") + .build()) + .build()); + + this.droplets + .list(ListDropletsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListDropletsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/droplets?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/droplets?page=1&per_page=50") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .build()) + .build()) + .executionMetadata("PRIVATE DATA HIDDEN") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .name("ruby_buildpack") + .detectOutput("ruby 1.6.14") + .build()) + .stack("cflinuxfs2") + .image(null) + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("fdf3851c-def8-4de1-87f1-6d4543189e22") + .state(DropletState.PROCESSING_UPLOAD) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.DOCKER) + .data(DockerData.builder().build()) + .build()) + .executionMetadata("[PRIVATE DATA HIDDEN IN LISTS]") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .image( + "cloudfoundry/diego-docker-app-custom:latest") + .checksum(null) + .stack(null) + .createdAt("2016-03-17T00:00:01Z") + .updatedAt("2016-03-17T21:41:32Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("fdf3851c-def8-4de1-87f1-6d4543189e23") + .state(DropletState.AWAITING_UPLOAD) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.DOCKER) + .data(DockerData.builder().build()) + .build()) + .executionMetadata("[PRIVATE DATA HIDDEN IN LISTS]") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .image( + "cloudfoundry/diego-docker-app-custom:latest") + .checksum(null) + .stack(null) + .createdAt("2016-03-17T00:00:01Z") + .updatedAt("2016-03-17T21:41:32Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/isolationsegments/ReactorIsolationSegmentsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/isolationsegments/ReactorIsolationSegmentsTest.java new file mode 100644 index 00000000000..232443a87a5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/isolationsegments/ReactorIsolationSegmentsTest.java @@ -0,0 +1,614 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.isolationsegments; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementResponse; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentResponse; +import org.cloudfoundry.client.v3.isolationsegments.DeleteIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.GetIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.GetIsolationSegmentResponse; +import org.cloudfoundry.client.v3.isolationsegments.IsolationSegmentResource; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentEntitledOrganizationsRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentEntitledOrganizationsResponse; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentOrganizationsRelationshipRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentOrganizationsRelationshipResponse; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentSpacesRelationshipResponse; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentsRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentsResponse; +import org.cloudfoundry.client.v3.isolationsegments.RemoveIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.UpdateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.UpdateIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorIsolationSegmentsTest extends AbstractClientApiTest { + + private final ReactorIsolationSegments isolationSegments = + new ReactorIsolationSegments( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void addOrganizationEntitlement() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/isolation_segments/test-isolation-segment-id/relationships/organizations") + .payload( + "fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_response.json") + .build()) + .build()); + + this.isolationSegments + .addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .data(Relationship.builder().id("org-guid-1").build()) + .data(Relationship.builder().id("org-guid-2").build()) + .build()) + .as(StepVerifier::create) + .expectNext( + AddIsolationSegmentOrganizationEntitlementResponse.builder() + .data( + Relationship.builder() + .id("68d54d31-9b3a-463b-ba94-e8e4c32edbac") + .build()) + .data( + Relationship.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/organizations") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/isolation_segments") + .payload( + "fixtures/client/v3/isolation_segments/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/isolation_segments/POST_response.json") + .build()) + .build()); + + this.isolationSegments + .create(CreateIsolationSegmentRequest.builder().name("my_segment").build()) + .as(StepVerifier::create) + .expectNext( + CreateIsolationSegmentResponse.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .name("an_isolation_segment") + .createdAt("2016-10-19T20:25:04Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/isolation_segments/test-isolation-segment-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.isolationSegments + .delete( + DeleteIsolationSegmentRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/isolation_segments/test-isolation-segment-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/GET_{id}_response.json") + .build()) + .build()); + + this.isolationSegments + .get( + GetIsolationSegmentRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetIsolationSegmentResponse.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .name("an_isolation_segment") + .createdAt("2016-10-19T20:25:04Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/isolation_segments") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/GET_response.json") + .build()) + .build()); + + this.isolationSegments + .list(ListIsolationSegmentsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListIsolationSegmentsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(11) + .totalPages(3) + .first( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments?page=1&per_page=5") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments?page=3&per_page=5") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments?page=2&per_page=5") + .build()) + .build()) + .resource( + IsolationSegmentResource.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .name("an_isolation_segment") + .createdAt("2016-10-19T20:25:04Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations") + .build()) + .build()) + .resource( + IsolationSegmentResource.builder() + .id("68d54d31-9b3a-463b-ba94-e8e4c32edbac") + .name("an_isolation_segment1") + .createdAt("2016-10-19T20:29:19Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/68d54d31-9b3a-463b-ba94-e8e4c32edbac") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/68d54d31-9b3a-463b-ba94-e8e4c32edbac/organizations") + .build()) + .build()) + .resource( + IsolationSegmentResource.builder() + .id("ecdc67c3-a71e-43ff-bddf-048930b8cd03") + .name("an_isolation_segment2") + .createdAt("2016-10-19T20:29:22Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/ecdc67c3-a71e-43ff-bddf-048930b8cd03") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/ecdc67c3-a71e-43ff-bddf-048930b8cd03/organizations") + .build()) + .build()) + .resource( + IsolationSegmentResource.builder() + .id("424c89e4-4353-46b7-9bf4-f90bd9bacac0") + .name("an_isolation_segment3") + .createdAt("2016-10-19T20:29:27Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/424c89e4-4353-46b7-9bf4-f90bd9bacac0") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/424c89e4-4353-46b7-9bf4-f90bd9bacac0/organizations") + .build()) + .build()) + .resource( + IsolationSegmentResource.builder() + .id("0a79fcec-a648-4eb8-a6c3-2b5be39047c7") + .name("an_isolation_segment4") + .createdAt("2016-10-19T20:29:33Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/0a79fcec-a648-4eb8-a6c3-2b5be39047c7") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/0a79fcec-a648-4eb8-a6c3-2b5be39047c7/organizations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listEntitledOrganizations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/isolation_segments/test-isolation-segment-id/organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/GET_{id}_organizations_response.json") + .build()) + .build()); + + this.isolationSegments + .listEntitledOrganizations( + ListIsolationSegmentEntitledOrganizationsRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListIsolationSegmentEntitledOrganizationsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50") + .build()) + .build()) + .resource( + OrganizationResource.builder() + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .createdAt("2017-02-01T01:33:58Z") + .updatedAt("2017-02-01T01:33:58Z") + .name("org1") + .build()) + .resource( + OrganizationResource.builder() + .id("d4c91047-7b29-4fda-b7f9-04033e5c9c9f") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .createdAt("2017-02-02T00:14:30Z") + .updatedAt("2017-02-02T00:14:30Z") + .name("org2") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listOrganizationsRelationship() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/isolation_segments/test-isolation-segment-id/relationships/organizations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/GET_{id}_relationships_organizations_response.json") + .build()) + .build()); + + this.isolationSegments + .listOrganizationsRelationship( + ListIsolationSegmentOrganizationsRelationshipRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListIsolationSegmentOrganizationsRelationshipResponse.builder() + .data( + Relationship.builder() + .id("68d54d31-9b3a-463b-ba94-e8e4c32edbac") + .build()) + .data( + Relationship.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/organizations") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpacesRelationship() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/isolation_segments/test-isolation-segment-id/relationships/spaces") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/GET_{id}_relationships_spaces_response.json") + .build()) + .build()); + + this.isolationSegments + .listSpacesRelationship( + ListIsolationSegmentSpacesRelationshipRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListIsolationSegmentSpacesRelationshipResponse.builder() + .data( + Relationship.builder() + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .build()) + .data( + Relationship.builder() + .id("d4c91047-7b29-4fda-b7f9-04033e5c9c9f") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeOrganizationEntitlement() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/isolation_segments/test-isolation-segment-id/relationships/organizations/test-organization-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.isolationSegments + .removeOrganizationEntitlement( + RemoveIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/isolation_segments/test-isolation-segment-id") + .payload( + "fixtures/client/v3/isolation_segments/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/isolation_segments/PATCH_{id}_response.json") + .build()) + .build()); + + this.isolationSegments + .update( + UpdateIsolationSegmentRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .name("my_isolation_segment") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateIsolationSegmentResponse.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .name("my_isolation_segment") + .createdAt("2016-10-19T20:25:04Z") + .updatedAt("2016-11-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "organizations", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/jobs/ReactorJobsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/jobs/ReactorJobsV3Test.java new file mode 100644 index 00000000000..d60e6b824d9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/jobs/ReactorJobsV3Test.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.jobs; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Error; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.jobs.GetJobRequest; +import org.cloudfoundry.client.v3.jobs.GetJobResponse; +import org.cloudfoundry.client.v3.jobs.JobState; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorJobsV3Test extends AbstractClientApiTest { + + private final ReactorJobsV3 jobs = + new ReactorJobsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder().method(GET).path("/jobs/test-job-id").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/jobs/GET_{id}_response.json") + .build()) + .build()); + + this.jobs + .get(GetJobRequest.builder().jobId("test-job-id").build()) + .as(StepVerifier::create) + .expectNext( + GetJobResponse.builder() + .id("b19ae525-cbd3-4155-b156-dc0c2a431b4c") + .createdAt("2016-10-19T20:25:04Z") + .updatedAt("2016-11-08T16:41:26Z") + .operation("app.delete") + .state(JobState.FAILED) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/jobs/b19ae525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .error( + Error.builder() + .code(10008) + .title("CF-UnprocessableEntity") + .detail("something went wrong") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3Test.java new file mode 100644 index 00000000000..0ea60e9b280 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/organizations/ReactorOrganizationsV3Test.java @@ -0,0 +1,637 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.organizations; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.client.v3.routes.Protocol.HTTP; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.UsageSummary; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.organizations.AssignOrganizationDefaultIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.AssignOrganizationDefaultIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultDomainRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultDomainResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationUsageSummaryRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationUsageSummaryResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.client.v3.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorOrganizationsV3Test extends AbstractClientApiTest { + + private final ReactorOrganizationsV3 organizations = + new ReactorOrganizationsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void assignDefaultIsolationSegment() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/organizations/test-organization-id/relationships/default_isolation_segment") + .payload( + "fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_response.json") + .build()) + .build()); + + this.organizations + .assignDefaultIsolationSegment( + AssignOrganizationDefaultIsolationSegmentRequest.builder() + .data(Relationship.builder().id("[iso-seg-guid]").build()) + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssignOrganizationDefaultIsolationSegmentResponse.builder() + .data( + Relationship.builder() + .id("9d8e007c-ce52-4ea7-8a57-f2825d2c6b39") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/default_isolation_segment") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/9d8e007c-ce52-4ea7-8a57-f2825d2c6b39") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/organizations") + .payload( + "fixtures/client/v3/organizations/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/POST_response.json") + .build()) + .build()); + + this.organizations + .create(CreateOrganizationRequest.builder().name("my-organization").build()) + .as(StepVerifier::create) + .expectNext( + CreateOrganizationResponse.builder() + .createdAt("2017-02-01T01:33:58Z") + .id("24637893-3b77-489d-bb79-8466f0d88b52") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/organizations/24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .name("my-organization") + .updatedAt("2017-02-01T01:33:58Z") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organizations/test-organization-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-job-id") + .build()) + .build()); + + this.organizations + .delete( + DeleteOrganizationRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext("test-job-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/GET_{id}_response.json") + .build()) + .build()); + + this.organizations + .get( + GetOrganizationRequest.builder() + .organizationId("24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationResponse.builder() + .createdAt("2017-02-01T01:33:58Z") + .id("24637893-3b77-489d-bb79-8466f0d88b52") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/organizations/24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .name("my-organization") + .updatedAt("2017-02-01T01:33:58Z") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getDefaultDomain() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/domains/default") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/GET_{id}_domains_default_response.json") + .build()) + .build()); + + this.organizations + .getDefaultDomain( + GetOrganizationDefaultDomainRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationDefaultDomainResponse.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .name("test-domain.com") + .isInternal(false) + .supportedProtocol(HTTP) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "3a3f3d89-3f89-4f05-8188-751b298c79d5") + .build()) + .build()) + .sharedOrganizations( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id( + "404f3d89-3f89-6z72-8188-751b298d88d5") + .build()) + .data( + Relationship.builder() + .id( + "416d3d89-3f89-8h67-2189-123b298d3592") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/3a3f3d89-3f89-4f05-8188-751b298c79d5") + .build()) + .link( + "route_reservations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations") + .build()) + .link( + "shared_organizations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/relationships/shared_organizations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getDefaultIsolationSegment() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organizations/test-organization-id/relationships/default_isolation_segment") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/GET_{id}_relationships_default_isolation_segment_response.json") + .build()) + .build()); + + this.organizations + .getDefaultIsolationSegment( + GetOrganizationDefaultIsolationSegmentRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationDefaultIsolationSegmentResponse.builder() + .data( + Relationship.builder() + .id("9d8e007c-ce52-4ea7-8a57-f2825d2c6b39") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/default_isolation_segment") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/9d8e007c-ce52-4ea7-8a57-f2825d2c6b39") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getUsageSummary() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/usage_summary") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/GET_{id}_usage_summary_response.json") + .build()) + .build()); + + this.organizations + .getUsageSummary( + GetOrganizationUsageSummaryRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationUsageSummaryResponse.builder() + .usageSummary( + UsageSummary.builder() + .startedInstances(3) + .memoryInMb(50) + .routes(0) + .serviceInstances(0) + .reservedPorts(0) + .perAppTasks(2) + .domains(2) + .serviceKeys(0) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/usage_summary") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/organizations").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/GET_response.json") + .build()) + .build()); + + this.organizations + .list(ListOrganizationsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50") + .build()) + .build()) + .resource( + OrganizationResource.builder() + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .createdAt("2017-02-01T01:33:58Z") + .updatedAt("2017-02-01T01:33:58Z") + .name("org1") + .build()) + .resource( + OrganizationResource.builder() + .id("d4c91047-7b29-4fda-b7f9-04033e5c9c9f") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .createdAt("2017-02-02T00:14:30Z") + .updatedAt("2017-02-02T00:14:30Z") + .name("org2") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDomains() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organizations/test-organization-id/domains") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/GET_{id}_domains_response.json") + .build()) + .build()); + + this.organizations + .listDomains( + ListOrganizationDomainsRequest.builder() + .organizationId("test-organization-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationDomainsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/domains?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/domains?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/domains?page=2&per_page=2") + .build()) + .build()) + .resource( + DomainResource.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .name("test-domain.com") + .isInternal(false) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "test-organization-id") + .build()) + .build()) + .sharedOrganizations( + ToManyRelationship.builder() + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/test-organization-id") + .build()) + .link( + "route_reservations", + Link.builder() + .href( + "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/organizations/test-organization-id") + .payload( + "fixtures/client/v3/organizations/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/organizations/PATCH_{id}_response.json") + .build()) + .build()); + + this.organizations + .update( + UpdateOrganizationRequest.builder() + .organizationId("test-organization-id") + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("dept", "1234") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateOrganizationResponse.builder() + .createdAt("2017-02-01T01:33:58Z") + .id("24637893-3b77-489d-bb79-8466f0d88b52") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/organizations/24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("dept", "1234") + .build()) + .name("my-organization") + .updatedAt("2017-02-01T01:33:58Z") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/packages/ReactorPackagesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/packages/ReactorPackagesTest.java new file mode 100644 index 00000000000..6ac5f2792ce --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/packages/ReactorPackagesTest.java @@ -0,0 +1,835 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.packages; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import java.io.IOException; +import java.nio.charset.Charset; +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.*; +import org.cloudfoundry.client.v3.droplets.Buildpack; +import org.cloudfoundry.client.v3.droplets.DropletResource; +import org.cloudfoundry.client.v3.droplets.DropletState; +import org.cloudfoundry.client.v3.packages.BitsData; +import org.cloudfoundry.client.v3.packages.CopyPackageRequest; +import org.cloudfoundry.client.v3.packages.CopyPackageResponse; +import org.cloudfoundry.client.v3.packages.CreatePackageRequest; +import org.cloudfoundry.client.v3.packages.CreatePackageResponse; +import org.cloudfoundry.client.v3.packages.DeletePackageRequest; +import org.cloudfoundry.client.v3.packages.DockerData; +import org.cloudfoundry.client.v3.packages.DownloadPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageResponse; +import org.cloudfoundry.client.v3.packages.ListPackageDropletsRequest; +import org.cloudfoundry.client.v3.packages.ListPackageDropletsResponse; +import org.cloudfoundry.client.v3.packages.ListPackagesRequest; +import org.cloudfoundry.client.v3.packages.ListPackagesResponse; +import org.cloudfoundry.client.v3.packages.PackageRelationships; +import org.cloudfoundry.client.v3.packages.PackageResource; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.packages.UploadPackageRequest; +import org.cloudfoundry.client.v3.packages.UploadPackageResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.cloudfoundry.util.OperationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.test.StepVerifier; + +final class ReactorPackagesTest extends AbstractClientApiTest { + + private final ReactorPackages packages = + new ReactorPackages( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void copy() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/packages?source_guid=test-source-package-id") + .payload( + "fixtures/client/v3/packages/POST_source_guid={id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/packages/POST_source_guid={id}_response.json") + .build()) + .build()); + + this.packages + .copy( + CopyPackageRequest.builder() + .sourcePackageId("test-source-package-id") + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "[destination-app-guid]") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CopyPackageResponse.builder() + .id("44f7c078-0934-470f-9883-4fcddc5b8f13") + .type(PackageType.BITS) + .data( + BitsData.builder() + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value(null) + .build()) + .error(null) + .build()) + .state(PackageState.PROCESSING_UPLOAD) + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload") + .method("POST") + .build()) + .link( + "download", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download") + .method("GET") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/packages") + .payload("fixtures/client/v3/packages/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/packages/POST_response.json") + .build()) + .build()); + + this.packages + .create( + CreatePackageRequest.builder() + .type(PackageType.BITS) + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("[guid]") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreatePackageResponse.builder() + .id("44f7c078-0934-470f-9883-4fcddc5b8f13") + .type(PackageType.BITS) + .data( + BitsData.builder() + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value(null) + .build()) + .error(null) + .build()) + .state(PackageState.PROCESSING_UPLOAD) + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload") + .method("POST") + .build()) + .link( + "download", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download") + .method("GET") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/packages/test-package-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/[guid]") + .build()) + .build()); + + this.packages + .delete(DeletePackageRequest.builder().packageId("test-package-id").build()) + .as(StepVerifier::create) + .expectNext("[guid]") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void download() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/packages/test-package-id/download") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/packages/GET_{id}_download_response.bin") + .build()) + .build()); + + this.packages + .download(DownloadPackageRequest.builder().packageId("test-package-id").build()) + .as(OperationUtils::collectByteArray) + .as(StepVerifier::create) + .consumeNextWith( + actual -> + assertThat(actual) + .isEqualTo( + getBytes( + "fixtures/client/v3/packages/GET_{id}_download_response.bin"))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/packages/test-package-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/packages/GET_{id}_response.json") + .build()) + .build()); + + this.packages + .get(GetPackageRequest.builder().packageId("test-package-id").build()) + .as(StepVerifier::create) + .expectNext( + GetPackageResponse.builder() + .id("44f7c078-0934-470f-9883-4fcddc5b8f13") + .type(PackageType.BITS) + .data( + BitsData.builder() + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value(null) + .build()) + .error(null) + .build()) + .state(PackageState.PROCESSING_UPLOAD) + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload") + .method("POST") + .build()) + .link( + "download", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download") + .method("GET") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/packages").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/packages/GET_response.json") + .build()) + .build()); + + this.packages + .list(ListPackagesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListPackagesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/packages?types=bits%2Cdocker&page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/packages?types=bits%2Cdocker&page=2&per_page=2") + .build()) + .build()) + .resource( + PackageResource.builder() + .id("a57fd932-85db-483a-a27e-b00efbb3b0a4") + .type(PackageType.BITS) + .data( + BitsData.builder() + .checksum( + Checksum.builder() + .type( + ChecksumType + .SHA256) + .value(null) + .build()) + .error(null) + .build()) + .state(PackageState.AWAITING_UPLOAD) + .createdAt("2015-11-03T00:53:54Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/a57fd932-85db-483a-a27e-b00efbb3b0a4") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/packages/a57fd932-85db-483a-a27e-b00efbb3b0a4/upload") + .method("POST") + .build()) + .link( + "download", + Link.builder() + .href( + "https://api.example.org/v3/packages/a57fd932-85db-483a-a27e-b00efbb3b0a4/download") + .method("GET") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/fa3558ce-1c4d-46fc-9776-54b9c8021745") + .build()) + .build()) + .resource( + PackageResource.builder() + .id("8f1f294d-cef8-4c11-9f0b-3bcdc0bd2691") + .type(PackageType.DOCKER) + .data( + DockerData.builder() + .image("registry/image:latest") + .username("username") + .password("***") + .build()) + .state(PackageState.READY) + .createdAt("2015-11-03T00:53:54Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/8f1f294d-cef8-4c11-9f0b-3bcdc0bd2691") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/fa3558ce-1c4d-46fc-9776-54b9c8021745") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDroplets() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/packages/test-package-id/droplets") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/packages/GET_{id}_droplets_response.json") + .build()) + .build()); + + this.packages + .listDroplets( + ListPackageDropletsRequest.builder().packageId("test-package-id").build()) + .as(StepVerifier::create) + .expectNext( + ListPackageDropletsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(4) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/packages/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/packages/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d16") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.BUILDPACK) + .data( + BuildpackData.builder() + .build()) + .build()) + .image(null) + .executionMetadata("PRIVATE DATA HIDDEN") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .name("ruby_buildpack") + .detectOutput("ruby 1.6.14") + .build()) + .stack("cflinuxfs2") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("585bc3c1-3743-497d-88b0-403ad6b56d17") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.KPACK) + .data( + KpackData.builder() + .buildpacks( + "foo", + "bar") + .build()) + .build()) + .image(null) + .executionMetadata("PRIVATE DATA HIDDEN") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .name("ruby_buildpack") + .detectOutput("ruby 1.6.14") + .build()) + .stack("cflinuxfs2") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d17") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e93") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058397") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058397/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("e351a2f2-dfc6-454b-8777-60ed2ff98edb") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.CNB) + .data(CnbData.builder().build()) + .build()) + .image(null) + .executionMetadata("PRIVATE DATA HIDDEN") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value( + "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855") + .build()) + .buildpack( + Buildpack.builder() + .name("ruby_buildpack") + .detectOutput("ruby 1.6.14") + .build()) + .stack("cflinuxfs2") + .createdAt("2016-03-28T23:39:34Z") + .updatedAt("2016-03-28T23:39:47Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/e351a2f2-dfc6-454b-8777-60ed2ff98edb") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/45c63fe0-f5f4-4f23-963e-a8311193d11e") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058398") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058398/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .resource( + DropletResource.builder() + .id("fdf3851c-def8-4de1-87f1-6d4543189e22") + .state(DropletState.STAGED) + .error(null) + .lifecycle( + Lifecycle.builder() + .type(LifecycleType.DOCKER) + .data( + org.cloudfoundry.client.v3 + .DockerData + .builder() + .build()) + .build()) + .executionMetadata("[PRIVATE DATA HIDDEN IN LISTS]") + .processType( + "redacted_message", + "[PRIVATE DATA HIDDEN IN LISTS]") + .image( + "cloudfoundry/diego-docker-app-custom:latest") + .checksum(null) + .stack(null) + .createdAt("2016-03-17T00:00:01Z") + .updatedAt("2016-03-17T21:41:32Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22") + .build()) + .link( + "package", + Link.builder() + .href( + "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396") + .build()) + .link( + "assign_current_droplet", + Link.builder() + .href( + "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet") + .method("PATCH") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void upload() throws IOException { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/packages/test-package-id/upload") + .contents( + consumer( + (headers, body) -> { + String boundary = + extractBoundary(headers); + + assertThat( + body.readString( + Charset + .defaultCharset())) + .isEqualTo( + "--" + + boundary + + "\r\n" + + "content-disposition:" + + " form-data;" + + " name=\"bits\";" + + " filename=\"test-package.zip\"\r\n" + + "content-length:" + + " 12\r\n" + + "content-type:" + + " application/zip\r\n" + + "content-transfer-encoding:" + + " binary\r\n" + + "\r\n" + + "test-content\r\n" + + "--" + + boundary + + "--\r\n"); + })) + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/packages/POST_{id}_upload_response.json") + .build()) + .build()); + + this.packages + .upload( + UploadPackageRequest.builder() + .bits( + new ClassPathResource( + "fixtures/client/v3/packages/test-package.zip") + .getFile() + .toPath()) + .packageId("test-package-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UploadPackageResponse.builder() + .id("44f7c078-0934-470f-9883-4fcddc5b8f13") + .type(PackageType.BITS) + .data( + BitsData.builder() + .checksum( + Checksum.builder() + .type(ChecksumType.SHA256) + .value(null) + .build()) + .error(null) + .build()) + .state(PackageState.PROCESSING_UPLOAD) + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13") + .build()) + .link( + "upload", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload") + .method("POST") + .build()) + .link( + "download", + Link.builder() + .href( + "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download") + .method("GET") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java new file mode 100644 index 00000000000..e53ab748098 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/processes/ReactorProcessesTest.java @@ -0,0 +1,643 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.processes; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.processes.Data; +import org.cloudfoundry.client.v3.processes.GetProcessRequest; +import org.cloudfoundry.client.v3.processes.GetProcessResponse; +import org.cloudfoundry.client.v3.processes.GetProcessStatisticsRequest; +import org.cloudfoundry.client.v3.processes.GetProcessStatisticsResponse; +import org.cloudfoundry.client.v3.processes.HealthCheck; +import org.cloudfoundry.client.v3.processes.HealthCheckType; +import org.cloudfoundry.client.v3.processes.ListProcessesRequest; +import org.cloudfoundry.client.v3.processes.ListProcessesResponse; +import org.cloudfoundry.client.v3.processes.PortMapping; +import org.cloudfoundry.client.v3.processes.ProcessRelationships; +import org.cloudfoundry.client.v3.processes.ProcessResource; +import org.cloudfoundry.client.v3.processes.ProcessState; +import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; +import org.cloudfoundry.client.v3.processes.ProcessUsage; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheck; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; +import org.cloudfoundry.client.v3.processes.ScaleProcessRequest; +import org.cloudfoundry.client.v3.processes.ScaleProcessResponse; +import org.cloudfoundry.client.v3.processes.TerminateProcessInstanceRequest; +import org.cloudfoundry.client.v3.processes.UpdateProcessRequest; +import org.cloudfoundry.client.v3.processes.UpdateProcessResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorProcessesTest extends AbstractClientApiTest { + + private final ReactorProcesses processes = + new ReactorProcesses( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void deleteInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/processes/test-process-id/instances/test-index") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.processes + .terminateInstance( + TerminateProcessInstanceRequest.builder() + .processId("test-process-id") + .index("test-index") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/processes/test-process-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/processes/GET_{id}_response.json") + .build()) + .build()); + + this.processes + .get(GetProcessRequest.builder().processId("test-process-id").build()) + .as(StepVerifier::create) + .expectNext( + GetProcessResponse.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("rackup") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships(ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getProcessStatistics() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/processes/test-id/stats") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/processes/GET_{id}_stats_response.json") + .build()) + .build()); + + this.processes + .getStatistics(GetProcessStatisticsRequest.builder().processId("test-id").build()) + .as(StepVerifier::create) + .expectNext( + GetProcessStatisticsResponse.builder() + .resource( + ProcessStatisticsResource.builder() + .type("web") + .index(0) + .state(ProcessState.RUNNING) + .usage( + ProcessUsage.builder() + .time( + "2016-03-23T23:17:30.476314154Z") + .cpu(0.00038711029163348665) + .memory(19177472L) + .disk(69705728L) + .build()) + .host("10.244.16.10") + .instancePort( + PortMapping.builder() + .external(64546) + .externalTlsProxyPort(1234) + .internal(8080) + .internalTlsProxyPort(5678) + .build()) + .uptime(9042L) + .memoryQuota(268435456L) + .diskQuota(1073741824L) + .fileDescriptorQuota(16384L) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getProcessStatisticsWithNullFields() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/processes/test-id/stats") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/processes/GET_{id}_stats_with_null_fields_response.json") + .build()) + .build()); + + this.processes + .getStatistics(GetProcessStatisticsRequest.builder().processId("test-id").build()) + .as(StepVerifier::create) + .expectNext( + GetProcessStatisticsResponse.builder() + .resource( + ProcessStatisticsResource.builder() + .type("web") + .index(0) + .state(ProcessState.STARTING) + .usage(ProcessUsage.builder().build()) + .host("") + .uptime(4L) + .fileDescriptorQuota(16384L) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/processes").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/processes/GET_response.json") + .build()) + .build()); + + this.processes + .list(ListProcessesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListProcessesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/processes?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/processes?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/processes?page=2&per_page=2") + .build()) + .build()) + .resource( + ProcessResource.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("[PRIVATE DATA HIDDEN IN LISTS]") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships( + ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .resource( + ProcessResource.builder() + .id("3fccacd9-4b02-4b96-8d02-8e865865e9eb") + .type("worker") + .command("[PRIVATE DATA HIDDEN IN LISTS]") + .instances(1) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PROCESS) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships( + ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/stats") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void scale() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/processes/test-process-id/actions/scale") + .payload( + "fixtures/client/v3/processes/POST_{id}_actions_scale_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/processes/POST_{id}_actions_scale_response.json") + .build()) + .build()); + + this.processes + .scale( + ScaleProcessRequest.builder() + .processId("test-process-id") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .build()) + .as(StepVerifier::create) + .expectNext( + ScaleProcessResponse.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("rackup") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships(ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/processes/test-process-id") + .payload( + "fixtures/client/v3/processes/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/processes/PATCH_{id}_response.json") + .build()) + .build()); + + this.processes + .update( + UpdateProcessRequest.builder() + .processId("test-process-id") + .command("rackup") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateProcessResponse.builder() + .id("6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .type("web") + .command("rackup") + .instances(5) + .memoryInMb(256) + .diskInMb(1_024) + .healthCheck( + HealthCheck.builder() + .type(HealthCheckType.PORT) + .data( + Data.builder() + .timeout(null) + .endpoint(null) + .build()) + .build()) + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .type(ReadinessHealthCheckType.PORT) + .data( + Data.builder() + .interval(null) + .timeout(null) + .endpoint(null) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .relationships(ProcessRelationships.builder().build()) + .createdAt("2016-03-23T18:48:22Z") + .updatedAt("2016-03-23T18:48:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82") + .build()) + .link( + "scale", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale") + .method("POST") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .link( + "stats", + Link.builder() + .href( + "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3Test.java new file mode 100644 index 00000000000..8488b3271a2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/organizations/ReactorOrganizationQuotasV3Test.java @@ -0,0 +1,349 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.quotas.organizations; + +import static io.netty.handler.codec.http.HttpMethod.*; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import java.util.Map; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.cloudfoundry.client.v3.quotas.organizations.*; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorOrganizationQuotasV3Test extends AbstractClientApiTest { + + private final ReactorOrganizationQuotasV3 organizationQuotasV3 = + new ReactorOrganizationQuotasV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/organization_quotas") + .payload( + "fixtures/client/v3/quotas/organizations/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/organizations/POST_response.json") + .build()) + .build()); + + this.organizationQuotasV3 + .create(CreateOrganizationQuotaRequest.builder().name("my-quota").build()) + .as(StepVerifier::create) + .expectNext( + CreateOrganizationQuotaResponse.builder() + .from(expectedOrganizationQuotaResource1()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/organization_quotas/test-organization-quota-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-job-id") + .build()) + .build()); + + this.organizationQuotasV3 + .delete( + DeleteOrganizationQuotaRequest.builder() + .organizationQuotaId("test-organization-quota-id") + .build()) + .as(StepVerifier::create) + .expectNext("test-job-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/organizations/GET_{id}_response.json") + .build()) + .build()); + + this.organizationQuotasV3 + .get( + GetOrganizationQuotaRequest.builder() + .organizationQuotaId("24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .as(StepVerifier::create) + .expectNext( + GetOrganizationQuotaResponse.builder() + .from(expectedOrganizationQuotaResource1()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/organization_quotas") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/organizations/GET_response.json") + .build()) + .build()); + + this.organizationQuotasV3 + .list(ListOrganizationQuotasRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListOrganizationQuotasResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/organization_quotas?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/organization_quotas?page=1&per_page=50") + .build()) + .build()) + .resource( + OrganizationQuotaResource.builder() + .from(expectedOrganizationQuotaResource1()) + .build()) + .resource( + OrganizationQuotaResource.builder() + .from(expectedOrganizationQuotaResource2()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52") + .payload( + "fixtures/client/v3/quotas/organizations/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/organizations/PATCH_{id}_response.json") + .build()) + .build()); + + this.organizationQuotasV3 + .update( + UpdateOrganizationQuotaRequest.builder() + .organizationQuotaId("24637893-3b77-489d-bb79-8466f0d88b52") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateOrganizationQuotaResponse.builder() + .from(expectedOrganizationQuotaResource1()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void apply() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52/relationships/organizations") + .payload( + "fixtures/client/v3/quotas/organizations/relationships/POST_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/organizations/relationships/POST_{id}_response.json") + .build()) + .build()); + + Relationship org1 = Relationship.builder().id("org-guid1").build(); + Relationship org2 = Relationship.builder().id("org-guid2").build(); + + ToManyRelationship organizationRelationships = + ToManyRelationship.builder().data(org1, org2).build(); + + this.organizationQuotasV3 + .apply( + ApplyOrganizationQuotaRequest.builder() + .organizationQuotaId("24637893-3b77-489d-bb79-8466f0d88b52") + .organizationRelationships(organizationRelationships) + .build()) + .as(StepVerifier::create) + .expectNext( + ApplyOrganizationQuotaResponse.builder() + .from(expectedApplyOrganizationQuotaResponse()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @NotNull + private static OrganizationQuotaResource expectedOrganizationQuotaResource1() { + return buildOrganizationQuotaResource( + "24637893-3b77-489d-bb79-8466f0d88b52", + "my-quota", + "9b370018-c38e-44c9-86d6-155c76801104"); + } + + private static OrganizationQuotaResource expectedOrganizationQuotaResource2() { + return buildOrganizationQuotaResource( + "bb49bf20-ad98-4729-93ae-38fbc564b630", + "my-quota-2", + "144251f2-a202-4ffe-ab47-9046c4077e99"); + } + + @NotNull + private static ApplyOrganizationQuotaResponse expectedApplyOrganizationQuotaResponse() { + + Relationship org1 = Relationship.builder().id("org-guid1").build(); + Relationship org2 = Relationship.builder().id("org-guid2").build(); + Relationship existingOrg = Relationship.builder().id("previous-org-guid").build(); + + ToManyRelationship organizationRelationships = + ToManyRelationship.builder().data(org1, org2, existingOrg).build(); + Link selfLink = + Link.builder() + .href( + "https://api.example.org/v3/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52/relationships/organizations") + .build(); + Map links = Collections.singletonMap("self", selfLink); + + return ApplyOrganizationQuotaResponse.builder() + .organizationRelationships(organizationRelationships) + .links(links) + .build(); + } + + @NotNull + private static OrganizationQuotaResource buildOrganizationQuotaResource( + String id, String name, String relatedOrganizationId) { + + Apps apps = + Apps.builder() + .totalMemoryInMb(5120) + .perProcessMemoryInMb(1024) + .logRateLimitInBytesPerSecond(1024) + .totalInstances(10) + .perAppTasks(5) + .build(); + Services services = + Services.builder() + .isPaidServicesAllowed(true) + .totalServiceInstances(10) + .totalServiceKeys(20) + .build(); + Routes routes = Routes.builder().totalRoutes(8).totalReservedPorts(4).build(); + Domains domains = Domains.builder().totalDomains(7).build(); + ToManyRelationship organizationRelationships = + ToManyRelationship.builder() + .data( + Collections.singletonList( + Relationship.builder().id(relatedOrganizationId).build())) + .build(); + OrganizationQuotaRelationships relationships = + OrganizationQuotaRelationships.builder() + .organizations(organizationRelationships) + .build(); + + return OrganizationQuotaResource.builder() + .createdAt("2016-05-04T17:00:41Z") + .id(id) + .link( + "self", + Link.builder() + .href("https://api.example.org/v3/organization_quotas/" + id) + .build()) + .name(name) + .updatedAt("2016-05-04T17:00:41Z") + .apps(apps) + .services(services) + .routes(routes) + .domains(domains) + .relationships(relationships) + .build(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3Test.java new file mode 100644 index 00000000000..7923efbb313 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/quotas/spaces/ReactorSpaceQuotasV3Test.java @@ -0,0 +1,399 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.quotas.spaces; + +import static io.netty.handler.codec.http.HttpMethod.*; +import static io.netty.handler.codec.http.HttpResponseStatus.*; + +import java.time.Duration; +import java.util.Collections; +import java.util.Map; +import org.cloudfoundry.client.v3.*; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.cloudfoundry.client.v3.quotas.spaces.*; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorSpaceQuotasV3Test extends AbstractClientApiTest { + + public static final String EXPECTED_SPACE_QUOTA_ID_1 = "f919ef8a-e333-472a-8172-baaf2c30d301"; + + private final ReactorSpaceQuotasV3 spaceQuotasV3 = + new ReactorSpaceQuotasV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/space_quotas") + .payload( + "fixtures/client/v3/quotas/spaces/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/spaces/POST_response.json") + .build()) + .build()); + + SpaceQuotaRelationships relationships = + SpaceQuotaRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("9b370018-c38e-44c9-86d6-155c76801104") + .build()) + .build()) + .spaces( + ToManyRelationship.builder() + .data( + Collections.singletonList( + Relationship.builder() + .id( + "dcfd6a55-62b9-496e-a26f-0064cec076bf") + .build())) + .build()) + .build(); + this.spaceQuotasV3 + .create( + CreateSpaceQuotaRequest.builder() + .name("my-quota") + .relationships(relationships) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSpaceQuotaResponse.builder() + .from(expectedSpaceQuotaResource1()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/space_quotas/test-space-quota-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-job-id") + .build()) + .build()); + + this.spaceQuotasV3 + .delete( + DeleteSpaceQuotaRequest.builder() + .spaceQuotaId("test-space-quota-id") + .build()) + .as(StepVerifier::create) + .expectNext("test-job-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/space_quotas/" + EXPECTED_SPACE_QUOTA_ID_1) + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/spaces/GET_{id}_response.json") + .build()) + .build()); + + this.spaceQuotasV3 + .get(GetSpaceQuotaRequest.builder().spaceQuotaId(EXPECTED_SPACE_QUOTA_ID_1).build()) + .as(StepVerifier::create) + .expectNext( + GetSpaceQuotaResponse.builder().from(expectedSpaceQuotaResource1()).build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/space_quotas").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/spaces/GET_response.json") + .build()) + .build()); + + this.spaceQuotasV3 + .list(ListSpaceQuotasRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListSpaceQuotasResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/space_quotas?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/space_quotas?page=1&per_page=50") + .build()) + .build()) + .resource( + SpaceQuotaResource.builder() + .from(expectedSpaceQuotaResource1()) + .build()) + .resource( + SpaceQuotaResource.builder() + .from(expectedSpaceQuotaResource2()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/space_quotas/" + EXPECTED_SPACE_QUOTA_ID_1) + .payload( + "fixtures/client/v3/quotas/spaces/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/spaces/PATCH_{id}_response.json") + .build()) + .build()); + + this.spaceQuotasV3 + .update( + UpdateSpaceQuotaRequest.builder() + .spaceQuotaId(EXPECTED_SPACE_QUOTA_ID_1) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateSpaceQuotaResponse.builder() + .from(expectedSpaceQuotaResource1()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void apply() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/space_quotas/24637893-3b77-489d-bb79-8466f0d88b52/relationships/spaces") + .payload( + "fixtures/client/v3/quotas/spaces/relationships/POST_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/quotas/spaces/relationships/POST_{id}_response.json") + .build()) + .build()); + + Relationship space1 = Relationship.builder().id("space-guid1").build(); + Relationship space2 = Relationship.builder().id("space-guid2").build(); + + ToManyRelationship organizationRelationships = + ToManyRelationship.builder().data(space1, space2).build(); + + this.spaceQuotasV3 + .apply( + ApplySpaceQuotaRequest.builder() + .spaceQuotaId("24637893-3b77-489d-bb79-8466f0d88b52") + .spaceRelationships(organizationRelationships) + .build()) + .as(StepVerifier::create) + .expectNext( + ApplySpaceQuotaResponse.builder() + .from(expectedApplySpaceQuotaResponse()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void remove() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/space_quotas/test-space-quota-id/relationships/spaces/test-space-guid") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.spaceQuotasV3 + .remove( + RemoveSpaceQuotaRequest.builder() + .spaceQuotaId("test-space-quota-id") + .spaceId("test-space-guid") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @NotNull + private static SpaceQuotaResource expectedSpaceQuotaResource1() { + return buildSpaceQuotaResource( + EXPECTED_SPACE_QUOTA_ID_1, + "my-quota", + "9b370018-c38e-44c9-86d6-155c76801104", + "dcfd6a55-62b9-496e-a26f-0064cec076bf"); + } + + private static SpaceQuotaResource expectedSpaceQuotaResource2() { + return buildSpaceQuotaResource( + "bb49bf20-ad98-4729-93ae-38fbc564b630", + "my-quota-2", + "9b370018-c38e-44c9-86d6-155c76801104", + null); + } + + @NotNull + private static ApplySpaceQuotaResponse expectedApplySpaceQuotaResponse() { + + Relationship space1 = Relationship.builder().id("space-guid1").build(); + Relationship space2 = Relationship.builder().id("space-guid2").build(); + Relationship existingSpace = Relationship.builder().id("previous-space-guid").build(); + + ToManyRelationship spaceRelationships = + ToManyRelationship.builder().data(space1, space2, existingSpace).build(); + Link selfLink = + Link.builder() + .href( + "https://api.example.org/v3/space_quotas/24637893-3b77-489d-bb79-8466f0d88b52/relationships/spaces") + .build(); + Map links = Collections.singletonMap("self", selfLink); + + return ApplySpaceQuotaResponse.builder() + .spaceRelationships(spaceRelationships) + .links(links) + .build(); + } + + @NotNull + private static SpaceQuotaResource buildSpaceQuotaResource( + String id, String name, String relatedOrganizationId, String relatedSpaceId) { + + Apps apps = + Apps.builder() + .totalMemoryInMb(5120) + .perProcessMemoryInMb(1024) + .totalInstances(10) + .perAppTasks(5) + .build(); + Services services = + Services.builder() + .isPaidServicesAllowed(true) + .totalServiceInstances(10) + .totalServiceKeys(20) + .build(); + Routes routes = Routes.builder().totalRoutes(8).totalReservedPorts(4).build(); + + ToOneRelationship organizationRelationship = + ToOneRelationship.builder() + .data(Relationship.builder().id(relatedOrganizationId).build()) + .build(); + ToManyRelationship spaceRelationships = + ToManyRelationship.builder().data(Collections.emptyList()).build(); + if (relatedSpaceId != null) { + spaceRelationships = + ToManyRelationship.builder() + .data( + Collections.singletonList( + Relationship.builder().id(relatedSpaceId).build())) + .build(); + } + SpaceQuotaRelationships relationships = + SpaceQuotaRelationships.builder() + .organization(organizationRelationship) + .spaces(spaceRelationships) + .build(); + + return SpaceQuotaResource.builder() + .createdAt("2016-05-04T17:00:41Z") + .id(id) + .link( + "self", + Link.builder() + .href("https://api.example.org/v3/space_quotas/" + id) + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/" + + relatedOrganizationId) + .build()) + .name(name) + .updatedAt("2016-05-04T18:00:41Z") + .apps(apps) + .services(services) + .routes(routes) + .relationships(relationships) + .build(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/roles/ReactorRolesV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/roles/ReactorRolesV3Test.java new file mode 100644 index 00000000000..1084b44a309 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/roles/ReactorRolesV3Test.java @@ -0,0 +1,379 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.roles; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.roles.CreateRoleRequest; +import org.cloudfoundry.client.v3.roles.CreateRoleResponse; +import org.cloudfoundry.client.v3.roles.DeleteRoleRequest; +import org.cloudfoundry.client.v3.roles.GetRoleRequest; +import org.cloudfoundry.client.v3.roles.GetRoleResponse; +import org.cloudfoundry.client.v3.roles.ListRolesRequest; +import org.cloudfoundry.client.v3.roles.ListRolesResponse; +import org.cloudfoundry.client.v3.roles.RoleRelationships; +import org.cloudfoundry.client.v3.roles.RoleResource; +import org.cloudfoundry.client.v3.roles.RoleType; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorRolesV3Test extends AbstractClientApiTest { + + private final ReactorRolesV3 roles = + new ReactorRolesV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/roles") + .payload("fixtures/client/v3/roles/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/roles/POST_response.json") + .build()) + .build()); + + this.roles + .create( + CreateRoleRequest.builder() + .type(RoleType.ORGANIZATION_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "test-organization-id") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateRoleResponse.builder() + .id("40557c70-d1bd-4976-a2ab-a85f5e882418") + .createdAt("2019-10-10T17:19:12Z") + .updatedAt("2019-10-10T17:19:12Z") + .type(RoleType.ORGANIZATION_AUDITOR) + .relationships( + RoleRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "test-organization-id") + .build()) + .build()) + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .space(ToOneRelationship.builder().build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/roles/40557c70-d1bd-4976-a2ab-a85f5e882418") + .build()) + .link( + "user", + Link.builder() + .href( + "https://api.example.org/v3/users/test-user-id") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/test-organization-id") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/roles/test-role-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-role-id") + .build()) + .build()); + + this.roles + .delete(DeleteRoleRequest.builder().roleId("test-role-id").build()) + .as(StepVerifier::create) + .expectNext("test-role-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/roles/40557c70-d1bd-4976-a2ab-a85f5e882418") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/roles/GET_{id}_response.json") + .build()) + .build()); + + this.roles + .get( + GetRoleRequest.builder() + .roleId("40557c70-d1bd-4976-a2ab-a85f5e882418") + .build()) + .as(StepVerifier::create) + .expectNext( + GetRoleResponse.builder() + .id("40557c70-d1bd-4976-a2ab-a85f5e882418") + .type(RoleType.ORGANIZATION_AUDITOR) + .createdAt("2019-10-10T17:19:12Z") + .updatedAt("2019-10-10T17:19:12Z") + .relationships( + RoleRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "test-organization-id") + .build()) + .build()) + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .space(ToOneRelationship.builder().build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/roles/40557c70-d1bd-4976-a2ab-a85f5e882418") + .build()) + .link( + "user", + Link.builder() + .href( + "https://api.example.org/v3/users/test-user-id") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/test-organization-id") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/roles").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/roles/GET_response.json") + .build()) + .build()); + + this.roles + .list(ListRolesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListRolesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/roles?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/roles?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/roles?page=2&per_page=2") + .build()) + .build()) + .resource( + RoleResource.builder() + .id("40557c70-d1bd-4976-a2ab-a85f5e882418") + .createdAt("2019-10-10T17:19:12Z") + .updatedAt("2019-10-10T17:19:12Z") + .type(RoleType.ORGANIZATION_AUDITOR) + .relationships( + RoleRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "test-organization-id") + .build()) + .build()) + .user( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "test-user-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/roles/40557c70-d1bd-4976-a2ab-a85f5e882418") + .build()) + .link( + "user", + Link.builder() + .href( + "https://api.example.org/v3/users/test-user-id") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/test-organization-id") + .build()) + .build()) + .resource( + RoleResource.builder() + .id("12347c70-d1bd-4976-a2ab-a85f5e882418") + .createdAt("2047-11-10T17:19:12Z") + .updatedAt("2047-11-10T17:19:12Z") + .type(RoleType.SPACE_AUDITOR) + .relationships( + RoleRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "test-space-id") + .build()) + .build()) + .user( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "test-user-id") + .build()) + .build()) + .organization( + ToOneRelationship.builder() + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/roles/12347c70-d1bd-4976-a2ab-a85f5e882418") + .build()) + .link( + "user", + Link.builder() + .href( + "https://api.example.org/v3/users/test-user-id") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/test-space-id") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/routes/ReactorRoutesV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/routes/ReactorRoutesV3Test.java new file mode 100644 index 00000000000..96731f354bc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/routes/ReactorRoutesV3Test.java @@ -0,0 +1,758 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.routes; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.routes.Application; +import org.cloudfoundry.client.v3.routes.CreateRouteRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteResponse; +import org.cloudfoundry.client.v3.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v3.routes.Destination; +import org.cloudfoundry.client.v3.routes.GetRouteRequest; +import org.cloudfoundry.client.v3.routes.GetRouteResponse; +import org.cloudfoundry.client.v3.routes.InsertRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.InsertRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.ListRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ListRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.ListRoutesRequest; +import org.cloudfoundry.client.v3.routes.ListRoutesResponse; +import org.cloudfoundry.client.v3.routes.Process; +import org.cloudfoundry.client.v3.routes.RemoveRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.RouteRelationships; +import org.cloudfoundry.client.v3.routes.RouteResource; +import org.cloudfoundry.client.v3.routes.UpdateRouteRequest; +import org.cloudfoundry.client.v3.routes.UpdateRouteResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorRoutesV3Test extends AbstractClientApiTest { + + private final ReactorRoutesV3 routes = + new ReactorRoutesV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/routes") + .payload("fixtures/client/v3/routes/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/routes/POST_response.json") + .build()) + .build()); + + this.routes + .create( + CreateRouteRequest.builder() + .relationships( + RouteRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("space-guid") + .build()) + .build()) + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("domain-guid") + .build()) + .build()) + .build()) + .path("/some_path") + .host("test-hostname") + .metadata( + Metadata.builder() + .label("test-label", "test-label-value") + .annotation("note", "detailed information") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateRouteResponse.builder() + .host("test-hostname") + .id("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .path("/some_path") + .url("test-hostname.a-domain.com/some_path") + .createdAt("2019-11-01T17:17:48Z") + .updatedAt("2019-11-01T17:17:48Z") + .metadata( + Metadata.builder() + .label("test-label", "test-label-value") + .annotation("note", "detailed information") + .build()) + .relationships( + RouteRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("space-guid") + .build()) + .build()) + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("domain-guid") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/space-guid") + .build()) + .link( + "domain", + Link.builder() + .href( + "https://api.example.org/v3/domains/domain-guid") + .build()) + .link( + "destinations", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/routes/test-route-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-route-id") + .build()) + .build()); + + this.routes + .delete(DeleteRouteRequest.builder().routeId("test-route-id").build()) + .as(StepVerifier::create) + .expectNext("test-route-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/routes/GET_{id}_response.json") + .build()) + .build()); + + this.routes + .get( + GetRouteRequest.builder() + .routeId("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .as(StepVerifier::create) + .expectNext( + GetRouteResponse.builder() + .id("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .host("test-host") + .path("/some_path") + .url("test-host.a-domain.com/some_path") + .metadata( + Metadata.builder() + .putAllAnnotations(Collections.emptyMap()) + .putAllLabels(Collections.emptyMap()) + .build()) + .createdAt("2019-11-01T17:17:48Z") + .updatedAt("2019-11-01T17:17:48Z") + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "test-domain-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/test-space-id") + .build()) + .link( + "domain", + Link.builder() + .href( + "https://api.example.org/v3/domains/test-domain-id") + .build()) + .link( + "destinations", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void insertDestinations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/routes/test-route-id/destinations") + .payload( + "fixtures/client/v3/routes/POST_{id}_destinations_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/routes/POST_{id}_destinations_response.json") + .build()) + .build()); + + this.routes + .insertDestinations( + InsertRouteDestinationsRequest.builder() + .destinations( + Destination.builder() + .application( + Application.builder() + .applicationId( + "1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .build(), + Destination.builder() + .application( + Application.builder() + .applicationId( + "01856e12-8ee8-11e9-98a5-bb397dbc818f") + .process( + Process.builder() + .type("api") + .build()) + .build()) + .port(9000) + .build()) + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectNext( + InsertRouteDestinationsResponse.builder() + .destinations( + Destination.builder() + .destinationId( + "89323d4e-2e84-43e7-83e9-adbf50a20c0e") + .application( + Application.builder() + .applicationId( + "1cb006ee-fb05-47e1-b541-c34179ddc446") + .process( + Process.builder() + .type("web") + .build()) + .build()) + .port(8080) + .build(), + Destination.builder() + .destinationId( + "fbef10a2-8ee7-11e9-aa2d-abeeaf7b83c5") + .application( + Application.builder() + .applicationId( + "01856e12-8ee8-11e9-98a5-bb397dbc818f") + .process( + Process.builder() + .type("api") + .build()) + .build()) + .port(9000) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .link( + "route", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/routes").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/routes/GET_response.json") + .build()) + .build()); + + this.routes + .list(ListRoutesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListRoutesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/routes?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/routes?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/routes?page=2&per_page=2") + .build()) + .build()) + .resource( + RouteResource.builder() + .host("test-hostname") + .id("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .path("/some_path") + .url("test-hostname.a-domain.com/some_path") + .createdAt("2019-11-01T17:17:48Z") + .updatedAt("2019-11-01T17:17:48Z") + .metadata( + Metadata.builder() + .label( + "test-label", + "test-label-value") + .annotation( + "note", + "detailed information") + .build()) + .relationships( + RouteRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "space-guid") + .build()) + .build()) + .domain( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "domain-guid") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/space-guid") + .build()) + .link( + "domain", + Link.builder() + .href( + "https://api.example.org/v3/domains/domain-guid") + .build()) + .link( + "destinations", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDestinations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/routes/test-route-id/destinations") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/routes/GET_{id}_destinations_response.json") + .build()) + .build()); + + this.routes + .listDestinations( + ListRouteDestinationsRequest.builder().routeId("test-route-id").build()) + .as(StepVerifier::create) + .expectNext( + ListRouteDestinationsResponse.builder() + .destinations( + Destination.builder() + .destinationId( + "89323d4e-2e84-43e7-83e9-adbf50a20c0e") + .application( + Application.builder() + .applicationId( + "1cb006ee-fb05-47e1-b541-c34179ddc446") + .process( + Process.builder() + .type("web") + .build()) + .build()) + .port(8080) + .build(), + Destination.builder() + .destinationId( + "fbef10a2-8ee7-11e9-aa2d-abeeaf7b83c5") + .application( + Application.builder() + .applicationId( + "01856e12-8ee8-11e9-98a5-bb397dbc818f") + .process( + Process.builder() + .type("api") + .build()) + .build()) + .port(9000) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .link( + "route", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeDestinations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/routes/test-route-id/destinations/test-destination-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.routes + .removeDestinations( + RemoveRouteDestinationsRequest.builder() + .destinationId("test-destination-id") + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void replaceDestinations() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/routes/test-route-id/destinations") + .payload( + "fixtures/client/v3/routes/PATCH_{id}_destinations_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/routes/PATCH_{id}_destinations_response.json") + .build()) + .build()); + + this.routes + .replaceDestinations( + ReplaceRouteDestinationsRequest.builder() + .destinations( + Destination.builder() + .application( + Application.builder() + .applicationId( + "1cb006ee-fb05-47e1-b541-c34179ddc446") + .build()) + .weight(61) + .build(), + Destination.builder() + .application( + Application.builder() + .applicationId( + "01856e12-8ee8-11e9-98a5-bb397dbc818f") + .process( + Process.builder() + .type("api") + .build()) + .build()) + .port(9000) + .weight(39) + .build()) + .routeId("test-route-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ReplaceRouteDestinationsResponse.builder() + .destinations( + Destination.builder() + .destinationId( + "89323d4e-2e84-43e7-83e9-adbf50a20c0e") + .application( + Application.builder() + .applicationId( + "1cb006ee-fb05-47e1-b541-c34179ddc446") + .process( + Process.builder() + .type("web") + .build()) + .build()) + .port(8080) + .weight(61) + .build(), + Destination.builder() + .destinationId( + "fbef10a2-8ee7-11e9-aa2d-abeeaf7b83c5") + .application( + Application.builder() + .applicationId( + "01856e12-8ee8-11e9-98a5-bb397dbc818f") + .process( + Process.builder() + .type("api") + .build()) + .build()) + .port(9000) + .weight(39) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .link( + "route", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .payload( + "fixtures/client/v3/routes/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/routes/PATCH_{id}_response.json") + .build()) + .build()); + + this.routes + .update( + UpdateRouteRequest.builder() + .routeId("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .metadata( + Metadata.builder() + .label("key", "value") + .annotation("note", "detailed information") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateRouteResponse.builder() + .host("test-hostname") + .id("cbad697f-cac1-48f4-9017-ac08f39dfb31") + .path("/some_path") + .url("test-hostname.a-domain.com/some_path") + .createdAt("2019-11-01T17:17:48Z") + .updatedAt("2019-11-01T17:17:48Z") + .metadata( + Metadata.builder() + .label("key", "value") + .annotation("note", "detailed information") + .build()) + .relationships( + RouteRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("space-guid") + .build()) + .build()) + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("domain-guid") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/space-guid") + .build()) + .link( + "domain", + Link.builder() + .href( + "https://api.example.org/v3/domains/domain-guid") + .build()) + .link( + "destinations", + Link.builder() + .href( + "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/securitygroups/ReactorSecurityGroupsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/securitygroups/ReactorSecurityGroupsV3Test.java new file mode 100644 index 00000000000..7ffeece9ffc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/securitygroups/ReactorSecurityGroupsV3Test.java @@ -0,0 +1,885 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.securitygroups; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.securitygroups.BindRunningSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.BindRunningSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.BindStagingSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.BindStagingSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.GetSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.GetSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.GloballyEnabled; +import org.cloudfoundry.client.v3.securitygroups.ListRunningSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListRunningSecurityGroupsResponse; +import org.cloudfoundry.client.v3.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListSecurityGroupsResponse; +import org.cloudfoundry.client.v3.securitygroups.ListStagingSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListStagingSecurityGroupsResponse; +import org.cloudfoundry.client.v3.securitygroups.Protocol; +import org.cloudfoundry.client.v3.securitygroups.Relationships; +import org.cloudfoundry.client.v3.securitygroups.Rule; +import org.cloudfoundry.client.v3.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v3.securitygroups.UnbindRunningSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UnbindStagingSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UpdateSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UpdateSecurityGroupResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +public final class ReactorSecurityGroupsV3Test extends AbstractClientApiTest { + + private final ReactorSecurityGroupsV3 securityGroups = + new ReactorSecurityGroupsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + public void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/security_groups") + .payload( + "fixtures/client/v3/security_groups/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/security_groups/POST_response.json") + .build()) + .build()); + this.securityGroups + .create( + CreateSecurityGroupRequest.builder() + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .name("my-group0") + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to private services") + .type(8) + .code(0) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSecurityGroupResponse.builder() + .name("my-group0") + .id("b85a788e-671f-4549-814d-e34cdb2f539a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .globallyEnabled( + GloballyEnabled.builder() + .staging(false) + .running(true) + .build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to private services") + .type(8) + .code(0) + .build()) + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id("space-guid-1") + .build()) + .data( + Relationship.builder() + .id("space-guid-2") + .build()) + .build()) + .runningSpaces(ToManyRelationship.builder().build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/GET_{id}_response.json") + .build()) + .build()); + this.securityGroups + .get( + GetSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .as(StepVerifier::create) + .expectNext( + GetSecurityGroupResponse.builder() + .name("my-group0") + .id("b85a788e-671f-4549-814d-e34cdb2f539a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .globallyEnabled( + GloballyEnabled.builder() + .staging(false) + .running(true) + .build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to private services") + .type(8) + .code(0) + .build()) + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id("space-guid-1") + .build()) + .data( + Relationship.builder() + .id("space-guid-2") + .build()) + .build()) + .runningSpaces(ToManyRelationship.builder().build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/security_groups").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/GET_response.json") + .build()) + .build()); + + this.securityGroups + .list(ListSecurityGroupsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListSecurityGroupsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/security_groups?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/security_groups?page=1&per_page=50") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .name("my-group0") + .id("b85a788e-671f-4549-814d-e34cdb2f539a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .globallyEnabled( + GloballyEnabled.builder() + .staging(false) + .running(true) + .build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to" + + " private services") + .type(8) + .code(0) + .build()) + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .data( + Relationship + .builder() + .id( + "space-guid-1") + .build()) + .data( + Relationship + .builder() + .id( + "space-guid-2") + .build()) + .build()) + .runningSpaces( + ToManyRelationship.builder() + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .name("my-group1") + .id("a89a788e-671f-4549-814d-e34c1b2f533a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .build()) + .runningSpaces( + ToManyRelationship.builder() + .build()) + .build()) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/a89a788e-671f-4549-814d-e34c1b2f533a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .payload( + "fixtures/client/v3/security_groups/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/PATCH_{id}_response.json") + .build()) + .build()); + this.securityGroups + .update( + UpdateSecurityGroupRequest.builder() + .name("my-group0") + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .globallyEnabled(GloballyEnabled.builder().running(true).build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to private services") + .type(8) + .code(0) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateSecurityGroupResponse.builder() + .name("my-group0") + .id("b85a788e-671f-4549-814d-e34cdb2f539a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .globallyEnabled( + GloballyEnabled.builder() + .staging(false) + .running(true) + .build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to private services") + .type(8) + .code(0) + .build()) + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id("space-guid-1") + .build()) + .data( + Relationship.builder() + .id("space-guid-2") + .build()) + .build()) + .runningSpaces(ToManyRelationship.builder().build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()); + + this.securityGroups + .delete( + DeleteSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .as(StepVerifier::create) + .expectNext("b85a788e-671f-4549-814d-e34cdb2f539a") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void bindStagingSecurityGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/staging_spaces") + .payload( + "fixtures/client/v3/security_groups/bind_staging/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/bind_staging/POST_response.json") + .build()) + .build()); + this.securityGroups + .bindStagingSecurityGroup( + BindStagingSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .boundSpaces(Relationship.builder().id("space-guid1").build()) + .boundSpaces(Relationship.builder().id("space-guid2").build()) + .build()) + .as(StepVerifier::create) + .expectNext( + BindStagingSecurityGroupResponse.builder() + .boundSpaces(Relationship.builder().id("space-guid1").build()) + .boundSpaces(Relationship.builder().id("space-guid2").build()) + .boundSpaces( + Relationship.builder().id("previous-space-guid").build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/staging_spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void bindRunningSecurityGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/running_spaces") + .payload( + "fixtures/client/v3/security_groups/bind_running/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/bind_running/POST_response.json") + .build()) + .build()); + this.securityGroups + .bindRunningSecurityGroup( + BindRunningSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .boundSpaces(Relationship.builder().id("space-guid1").build()) + .boundSpaces(Relationship.builder().id("space-guid2").build()) + .build()) + .as(StepVerifier::create) + .expectNext( + BindRunningSecurityGroupResponse.builder() + .boundSpaces(Relationship.builder().id("space-guid1").build()) + .boundSpaces(Relationship.builder().id("space-guid2").build()) + .boundSpaces( + Relationship.builder().id("previous-space-guid").build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/running_spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void unbindStagingSecurityGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/staging_spaces/space-guid-1") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + this.securityGroups + .unbindStagingSecurityGroup( + UnbindStagingSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .spaceId("space-guid-1") + .build()) + .as(StepVerifier::create) + .expectNextCount(0) + .verifyComplete(); + } + + @Test + public void unbindRunningSecurityGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/running_spaces/space-guid-1") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + this.securityGroups + .unbindRunningSecurityGroup( + UnbindRunningSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .spaceId("space-guid-1") + .build()) + .as(StepVerifier::create) + .expectNextCount(0) + .verifyComplete(); + } + + @Test + public void listRunning() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/running_security_groups") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/GET_running_{id}_response.json") + .build()) + .build()); + + this.securityGroups + .listRunning( + ListRunningSecurityGroupsRequest.builder() + .spaceId("c5048979-53b9-4d2a-9fca-78e6bc07c041") + .build()) + .as(StepVerifier::create) + .expectNext( + ListRunningSecurityGroupsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/running_security_groups?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/running_security_groups?page=1&per_page=50") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .name("my-group0") + .id("b85a788e-671f-4549-814d-e34cdb2f539a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .globallyEnabled( + GloballyEnabled.builder() + .staging(false) + .running(true) + .build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to" + + " private services") + .type(8) + .code(0) + .build()) + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .build()) + .runningSpaces( + ToManyRelationship.builder() + .data( + Relationship + .builder() + .id( + "space-guid-1") + .build()) + .data( + Relationship + .builder() + .id( + "space-guid-2") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .name("my-group1") + .id("a89a788e-671f-4549-814d-e34c1b2f533a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .build()) + .runningSpaces( + ToManyRelationship.builder() + .build()) + .build()) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/a89a788e-671f-4549-814d-e34c1b2f533a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + public void listStaging() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/staging_security_groups") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/security_groups/GET_staging_{id}_response.json") + .build()) + .build()); + + this.securityGroups + .listStaging( + ListStagingSecurityGroupsRequest.builder() + .spaceId("c5048979-53b9-4d2a-9fca-78e6bc07c041") + .build()) + .as(StepVerifier::create) + .expectNext( + ListStagingSecurityGroupsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/staging_security_groups?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/staging_security_groups?page=1&per_page=50") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .name("my-group0") + .id("b85a788e-671f-4549-814d-e34cdb2f539a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(false) + .build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description( + "Allow ping requests to" + + " private services") + .type(8) + .code(0) + .build()) + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .data( + Relationship + .builder() + .id( + "space-guid-1") + .build()) + .data( + Relationship + .builder() + .id( + "space-guid-2") + .build()) + .build()) + .runningSpaces( + ToManyRelationship.builder() + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a") + .build()) + .build()) + .resource( + SecurityGroupResource.builder() + .name("my-group1") + .id("a89a788e-671f-4549-814d-e34c1b2f533a") + .createdAt("2020-02-20T17:42:08Z") + .updatedAt("2020-02-20T17:42:08Z") + .relationships( + Relationships.builder() + .stagingSpaces( + ToManyRelationship.builder() + .build()) + .runningSpaces( + ToManyRelationship.builder() + .build()) + .build()) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/security_groups/a89a788e-671f-4549-814d-e34c1b2f533a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/servicebindings/ReactorServiceBindingsV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/servicebindings/ReactorServiceBindingsV3Test.java new file mode 100644 index 00000000000..5fb5fba7256 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/servicebindings/ReactorServiceBindingsV3Test.java @@ -0,0 +1,343 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.servicebindings; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v3.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingResponse; +import org.cloudfoundry.client.v3.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v3.servicebindings.ListServiceBindingsResponse; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingRelationships; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingType; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceBindingsV3Test extends AbstractClientApiTest { + + private final ReactorServiceBindingsV3 serviceBindings = + new ReactorServiceBindingsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_credential_bindings") + .payload( + "fixtures/client/v3/servicebindings/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/af5c57f6-8769-41fa-a499-2c84ed896788") + .build()) + .build()); + + this.serviceBindings + .create( + CreateServiceBindingRequest.builder() + .relationships( + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "8bfe4c1b-9e18-45b1-83be-124163f31f9e") + .build()) + .build()) + .build()) + .type(ServiceBindingType.APPLICATION) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceBindingResponse.builder() + .jobId("af5c57f6-8769-41fa-a499-2c84ed896788") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_credential_bindings/test-service-binding-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceBindings + .delete( + DeleteServiceBindingRequest.builder() + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_credential_bindings/test-service-binding-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/servicebindings/GET_{id}_response.json") + .build()) + .build()); + + this.serviceBindings + .get( + GetServiceBindingRequest.builder() + .serviceBindingId("test-service-binding-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceBindingResponse.builder() + .id("dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .type(ServiceBindingType.APPLICATION) + .relationships( + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "8bfe4c1b-9e18-45b1-83be-124163f31f9e") + .build()) + .build()) + .build()) + .createdAt("2015-11-13T17:02:56Z") + .link( + "self", + Link.builder() + .href( + "/v3/service_credential_bindings/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "service_instance", + Link.builder() + .href( + "/v3/service_instances/8bfe4c1b-9e18-45b1-83be-124163f31f9e") + .build()) + .link( + "app", + Link.builder() + .href( + "/v3/apps/74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_credential_bindings?app_guids=test-application-id&order_by=%2Bcreated_at&page=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/servicebindings/GET_response.json") + .build()) + .build()); + + this.serviceBindings + .list( + ListServiceBindingsRequest.builder() + .page(1) + .orderBy("+created_at") + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceBindingsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .first( + Link.builder() + .href( + "/v3/service_credential_bindings?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "/v3/service_credential_bindings?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "/v3/service_credential_bindings?page=2&per_page=2") + .build()) + .build()) + .resource( + ServiceBindingResource.builder() + .id("dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .type(ServiceBindingType.APPLICATION) + .relationships( + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "8bfe4c1b-9e18-45b1-83be-124163f31f9e") + .build()) + .build()) + .build()) + .createdAt("2015-11-13T17:02:56Z") + .link( + "self", + Link.builder() + .href( + "/v3/service_credential_bindings/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "service_instance", + Link.builder() + .href( + "/v3/service_instances/8bfe4c1b-9e18-45b1-83be-124163f31f9e") + .build()) + .link( + "app", + Link.builder() + .href( + "/v3/apps/74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .resource( + ServiceBindingResource.builder() + .id("7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62") + .type(ServiceBindingType.APPLICATION) + .relationships( + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "8bf356j3-9e18-45b1-3333-124163f31f9e") + .build()) + .build()) + .build()) + .createdAt("2015-11-13T17:02:56Z") + .link( + "self", + Link.builder() + .href( + "/v3/service_credential_bindings/7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62") + .build()) + .link( + "service_instance", + Link.builder() + .href( + "/v3/service_instances/8bf356j3-9e18-45b1-3333-124163f31f9e") + .build()) + .link( + "app", + Link.builder() + .href( + "/v3/apps/74f7c078-0934-470f-9883-4fddss5b8f13") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/servicebrokers/ReactorServiceBrokersV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/servicebrokers/ReactorServiceBrokersV3Test.java new file mode 100644 index 00000000000..cf4e1260c6e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/servicebrokers/ReactorServiceBrokersV3Test.java @@ -0,0 +1,427 @@ +package org.cloudfoundry.reactor.client.v3.servicebrokers; + +import io.netty.handler.codec.http.HttpMethod; +import io.netty.handler.codec.http.HttpResponseStatus; +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.servicebrokers.BasicAuthentication; +import org.cloudfoundry.client.v3.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.GetServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.GetServiceBrokerResponse; +import org.cloudfoundry.client.v3.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v3.servicebrokers.ListServiceBrokersResponse; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokerRelationships; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokerResource; +import org.cloudfoundry.client.v3.servicebrokers.UpdateServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.UpdateServiceBrokerResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceBrokersV3Test extends AbstractClientApiTest { + + private final ReactorServiceBrokersV3 serviceBrokersV3 = + new ReactorServiceBrokersV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(HttpMethod.POST) + .path("/service_brokers") + .payload( + "fixtures/client/v3/service_brokers/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(HttpResponseStatus.ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/af5c57f6-8769-41fa-a499-2c84ed896788") + .build()) + .build()); + + this.serviceBrokersV3 + .create( + CreateServiceBrokerRequest.builder() + .name("my_service_broker") + .url("https://example.service-broker.com") + .authentication( + BasicAuthentication.builder() + .username("us3rn4me") + .password("p4ssw0rd") + .build()) + .relationships( + ServiceBrokerRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext("af5c57f6-8769-41fa-a499-2c84ed896788") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(HttpMethod.DELETE) + .path("/service_brokers/test-service-broker-id") + .build()) + .response( + TestResponse.builder() + .status(HttpResponseStatus.ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/af5c57f6-8769-41fa-a499-2c84ed896788") + .build()) + .build()); + + this.serviceBrokersV3 + .delete( + DeleteServiceBrokerRequest.builder() + .serviceBrokerId("test-service-broker-id") + .build()) + .as(StepVerifier::create) + .expectNext("af5c57f6-8769-41fa-a499-2c84ed896788") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(HttpMethod.GET) + .path("/service_brokers/test-service-broker-id") + .build()) + .response( + TestResponse.builder() + .status(HttpResponseStatus.OK) + .payload( + "fixtures/client/v3/service_brokers/GET_{id}_response.json") + .build()) + .build()); + + this.serviceBrokersV3 + .get( + GetServiceBrokerRequest.builder() + .serviceBrokerId("test-service-broker-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceBrokerResponse.builder() + .id("dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .name("my_service_broker") + .url("https://example.service-broker.com") + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .relationships( + ServiceBrokerRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .label("type", "dev") + .annotations(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "service_offerings", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?service_broker_guids=dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(HttpMethod.GET) + .path("/service_brokers") + .build()) + .response( + TestResponse.builder() + .status(HttpResponseStatus.OK) + .payload( + "fixtures/client/v3/service_brokers/GET_response.json") + .build()) + .build()); + + this.serviceBrokersV3 + .list(ListServiceBrokersRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListServiceBrokersResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/service_brokers?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/service_brokers?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/service_brokers?page=2&per_page=2") + .build()) + .build()) + .resource( + ServiceBrokerResource.builder() + .id("dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .name("my_service_broker") + .url("https://example.service-broker.com") + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .relationships( + ServiceBrokerRelationships.builder() + .build()) + .metadata( + Metadata.builder() + .labels(Collections.emptyMap()) + .annotations(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "service_offerings", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?service_broker_guids=dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .build()) + .resource( + ServiceBrokerResource.builder() + .id("7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62") + .name("another_service_broker") + .url("https://another-example.service-broker.com") + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .relationships( + ServiceBrokerRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .labels(Collections.emptyMap()) + .annotations(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62") + .build()) + .link( + "service_offerings", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?service_broker_guids=7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(HttpMethod.PATCH) + .path("/service_brokers/test-service-broker-id") + .payload( + "fixtures/client/v3/service_brokers/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(HttpResponseStatus.ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/af5c57f6-8769-41fa-a499-2c84ed896788") + .build()) + .build()); + + this.serviceBrokersV3 + .update( + UpdateServiceBrokerRequest.builder() + .serviceBrokerId("test-service-broker-id") + .name("my_service_broker") + .url("https://example.service-broker.com") + .authentication( + BasicAuthentication.builder() + .username("us3rn4me") + .password("p4ssw0rd") + .build()) + .metadata( + Metadata.builder() + .label("key", "value") + .annotation("note", "detailed information") + .build()) + .build()) + .doOnSuccess(response -> System.out.println(response)) + .as(StepVerifier::create) + .expectNext( + UpdateServiceBrokerResponse.builder() + .jobId("af5c57f6-8769-41fa-a499-2c84ed896788") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateMetadata() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(HttpMethod.PATCH) + .path("/service_brokers/test-service-broker-id") + .payload( + "fixtures/client/v3/service_brokers/PATCH_{id}_metadata_request.json") + .build()) + .response( + TestResponse.builder() + .status(HttpResponseStatus.OK) + .payload( + "fixtures/client/v3/service_brokers/PATCH_{id}_metadata_response.json") + .build()) + .build()); + + this.serviceBrokersV3 + .update( + UpdateServiceBrokerRequest.builder() + .serviceBrokerId("test-service-broker-id") + .metadata( + Metadata.builder() + .label("type", "dev") + .annotations(Collections.emptyMap()) + .build()) + .build()) + .doOnSuccess(response -> System.out.println(response)) + .as(StepVerifier::create) + .expectNext( + UpdateServiceBrokerResponse.builder() + .serviceBroker( + ServiceBrokerResource.builder() + .id("dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .name("my_service_broker") + .url("https://example.service-broker.com") + .createdAt("2015-11-13T17:02:56Z") + .updatedAt("2016-06-08T16:41:26Z") + .relationships( + ServiceBrokerRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .label("type", "dev") + .annotations(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "service_offerings", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?service_broker_guids=dde5ad2a-d8f4-44dc-a56f-0452d744f1c3") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java new file mode 100644 index 00000000000..1e6df1f2585 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceinstances/ReactorServiceInstancesV3Test.java @@ -0,0 +1,1041 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.serviceinstances; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.v3.LastOperation; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.MaintenanceInfo; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetManagedServiceParametersRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetManagedServiceParametersResponse; +import org.cloudfoundry.client.v3.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.GetUserProvidedCredentialsRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetUserProvidedCredentialsResponse; +import org.cloudfoundry.client.v3.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListServiceInstancesResponse; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipResponse; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceRelationships; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceType; +import org.cloudfoundry.client.v3.serviceinstances.ShareServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.ShareServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.UnshareServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.UpdateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceInstancesV3Test extends AbstractClientApiTest { + + private final ReactorServiceInstancesV3 serviceInstances = + new ReactorServiceInstancesV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void getManagedServiceParameters() { + Map parameters = new HashMap<>(); + parameters.put("key_1", "value_1"); + parameters.put("key_2", "value_2"); + + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/parameters") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceinstances/GET_{id}_parameters.json") + .build()) + .build()); + + this.serviceInstances + .getManagedServiceParameters( + GetManagedServiceParametersRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetManagedServiceParametersResponse.builder() + .parameters(parameters) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getUserProvidedCredentials() { + Map credentials = new HashMap<>(); + credentials.put("username", "my-username"); + credentials.put("password", "super-secret"); + credentials.put("other", "credential"); + + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/credentials") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceinstances/GET_{id}_credentials.json") + .build()) + .build()); + + this.serviceInstances + .getUserProvidedCredentials( + GetUserProvidedCredentialsRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetUserProvidedCredentialsResponse.builder() + .credentials(credentials) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/serviceinstances/GET_{id}_response.json") + .build()) + .build()); + + this.serviceInstances + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId("c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceInstanceResponse.builder() + .id("c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .createdAt("2020-03-10T15:49:29Z") + .updatedAt("2020-03-10T15:49:29Z") + .name("my-managed-instance") + .tags("foo", "bar") + .type(ServiceInstanceType.MANAGED) + .maintenanceInfo(MaintenanceInfo.builder().version("1.0.0").build()) + .updateAvailable(false) + .dashboardUrl("https://service-broker.example.org/dashboard") + .lastOperation( + LastOperation.builder() + .type("create") + .state("succeeded") + .description("Operation succeeded") + .updatedAt("2020-03-10T15:49:32Z") + .createdAt("2020-03-10T15:49:29Z") + .build()) + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "5358d122-638e-11ea-afca-bf6e756684ac") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .build()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .link( + "service_plan", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/5358d122-638e-11ea-afca-bf6e756684ac") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .link( + "parameters", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/parameters") + .build()) + .link( + "shared_spaces", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/relationships/shared_spaces") + .build()) + .link( + "service_credential_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_credential_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .link( + "service_route_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_route_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances?names=test-service-instance-name&space_guids=test-space-id&page=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceinstances/GET_response.json") + .build()) + .build()); + + this.serviceInstances + .list( + ListServiceInstancesRequest.builder() + .page(1) + .serviceInstanceName("test-service-instance-name") + .spaceId("test-space-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListServiceInstancesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .first( + Link.builder() + .href( + "/v3/service_instances?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "/v3/service_instances?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "/v3/service_instances?page=2&per_page=2") + .build()) + .build()) + .resource( + ServiceInstanceResource.builder() + .id("85ccdcad-d725-4109-bca4-fd6ba062b5c8") + .createdAt("2017-11-17T13:54:21Z") + .name("my_service_instance1") + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "ae0031f9-dd49-461c-a945-df40e77c39cb") + .build()) + .build()) + .build()) + .link( + "space", + Link.builder() + .href( + "/v3/spaces/ae0031f9-dd49-461c-a945-df40e77c39cb") + .build()) + .build()) + .resource( + ServiceInstanceResource.builder() + .id("85ccdcad-d725-4109-bca4-fd6ba062b5c7") + .createdAt("2017-11-17T13:54:21Z") + .name("my_service_instance2") + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "ae0031f9-dd49-461c-a945-df40e77c39ce") + .build()) + .build()) + .build()) + .link( + "space", + Link.builder() + .href( + "/v3/spaces/ae0031f9-dd49-461c-a945-df40e77c39ce") + .build()) + .build()) + .resource( + ServiceInstanceResource.builder() + .id("85ccdcad-d725-4109-bca4-fd6ba062b5c6") + .createdAt("2017-11-17T13:54:21Z") + .name("my_service_instance3") + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "ae0031f9-dd49-461c-a945-df40e77c39cf") + .build()) + .build()) + .build()) + .link( + "space", + Link.builder() + .href( + "/v3/spaces/ae0031f9-dd49-461c-a945-df40e77c39cf") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSharedSpaces() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/service_instances/test-service-instance-id/relationships/shared_spaces") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceinstances/GET_{id}_relationships_spaces_shared_response.json") + .build()) + .build()); + + this.serviceInstances + .listSharedSpacesRelationship( + ListSharedSpacesRelationshipRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListSharedSpacesRelationshipResponse.builder() + .data( + Relationship.builder() + .id("68d54d31-9b3a-463b-ba94-e8e4c32edbac") + .build()) + .data( + Relationship.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "self", + Link.builder() + .href( + "/v3/service_instances/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/shared_spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void share() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/service_instances/test-service-instance-id/relationships/shared_spaces") + .payload( + "fixtures/client/v3/serviceinstances/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/serviceinstances/POST_response.json") + .build()) + .build()); + + this.serviceInstances + .share( + ShareServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .data(Relationship.builder().id("space-guid-1").build()) + .data(Relationship.builder().id("space-guid-2").build()) + .build()) + .as(StepVerifier::create) + .expectNext( + ShareServiceInstanceResponse.builder() + .data( + Relationship.builder() + .id("68d54d31-9b3a-463b-ba94-e8e4c32edbac") + .build()) + .data( + Relationship.builder() + .id("b19f6525-cbd3-4155-b156-dc0c2a431b4c") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/shared_spaces") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unshare() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/test-service-instance-id/relationships/shared_spaces/test-space-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceInstances + .unshare( + UnshareServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .spaceId("test-space-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createManagedServiceInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_instances") + .payload( + "fixtures/client/v3/serviceinstances/POST_request_create_managed_service_instance.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header("Location", "e1e4417c-74ee-11ea-a604-48bf6bec2d79") + .build()) + .build()); + + this.serviceInstances + .create( + CreateServiceInstanceRequest.builder() + .type(ServiceInstanceType.MANAGED) + .name("my_service_instance") + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "e0e4417c-74ee-11ea-a604-48bf6bec2d78") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "7304bc3c-7010-11ea-8840-48bf6bec2d78") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("foo", "bar") + .label("baz", "qux") + .build()) + .tags("foo", "bar", "baz") + .parameter("foo", "bar") + .parameter("baz", "qux") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceInstanceResponse.builder() + .jobId("e1e4417c-74ee-11ea-a604-48bf6bec2d79") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createUserProvidedService() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/service_instances") + .payload( + "fixtures/client/v3/serviceinstances/POST_request_create_user_provided_service_instance.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/serviceinstances/POST_response_create_user_provided_service_instance.json") + .build()) + .build()); + + this.serviceInstances + .create( + CreateServiceInstanceRequest.builder() + .type(ServiceInstanceType.USER_PROVIDED) + .name("my-user-provided-instance") + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "7304bc3c-7010-11ea-8840-48bf6bec2d78") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("foo", "bar") + .label("baz", "qux") + .build()) + .tag("sql") + .credential("foo", "bar") + .credential("baz", "qux") + .syslogDrainUrl("https://syslog.com/drain") + .routeServiceUrl("https://route.com/service") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateServiceInstanceResponse.builder() + .serviceInstance( + ServiceInstanceResource.builder() + .id("88ce23e5-27c3-4381-a2df-32a28ec43133") + .createdAt("2020-03-10T15:56:08Z") + .updatedAt("2020-03-10T15:56:08Z") + .lastOperation( + LastOperation.builder() + .type("create") + .state("succeeded") + .description("Operation succeeded") + .updatedAt("2020-03-10T15:49:32Z") + .createdAt("2020-03-10T15:49:29Z") + .build()) + .name("my-user-provided-instance") + .tag("sql") + .type(ServiceInstanceType.USER_PROVIDED) + .syslogDrainUrl("https://syslog.com/drain") + .routeServiceUrl("https://route.com/service") + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "7304bc3c-7010-11ea-8840-48bf6bec2d78") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("foo", "bar") + .label("baz", "qux") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .link( + "credentials", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133/credentials") + .build()) + .link( + "service_credential_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_credential_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .link( + "service_route_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_route_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateManagedServiceInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .payload( + "fixtures/client/v3/serviceinstances/PATCH_request_update_managed_service_instance.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v3/serviceinstances/PATCH_response_update_managed_service_instance.json") + .build()) + .build()); + + this.serviceInstances + .update( + UpdateServiceInstanceRequest.builder() + .serviceInstanceId("c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .name("my_service_instance") + .parameter("foo", "bar") + .parameter("baz", "qux") + .maintenanceInfo(MaintenanceInfo.builder().version("1.0.0").build()) + .tags("foo", "bar", "baz") + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "f2b6ba9c-a4d2-11ea-8ae6-48bf6bec2d78") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("note", "detailed information") + .label("key", "value") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServiceInstanceResponse.builder() + .serviceInstance( + ServiceInstanceResource.builder() + .id("c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .createdAt("2020-03-10T15:49:29Z") + .updatedAt("2020-03-10T15:49:29Z") + .name("my_service_instance") + .maintenanceInfo( + MaintenanceInfo.builder() + .version("1.0.0") + .build()) + .updateAvailable(false) + .type(ServiceInstanceType.MANAGED) + .dashboardUrl( + "https://service-broker.example.org/dashboard") + .tags("foo", "bar", "baz") + .lastOperation( + LastOperation.builder() + .type("update") + .description("Operation succeeded") + .state("succeeded") + .updatedAt("2020-03-10T15:49:32Z") + .createdAt("2020-03-10T15:49:29Z") + .build()) + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "5358d122-638e-11ea-afca-bf6e756684ac") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .label("key", "value") + .annotation( + "note", + "detailed information") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .link( + "service_plan", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/5358d122-638e-11ea-afca-bf6e756684ac") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .link( + "parameters", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/parameters") + .build()) + .link( + "shared_spaces", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/relationships/shared_spaces") + .build()) + .link( + "service_credential_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_credential_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .link( + "service_route_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_route_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateManagedServiceInstanceAsync() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .payload( + "fixtures/client/v3/serviceinstances/PATCH_request_update_managed_service_instance.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header("Location", "e1e4417c-74ee-11ea-a604-48bf6bec2d79") + .build()) + .build()); + + this.serviceInstances + .update( + UpdateServiceInstanceRequest.builder() + .serviceInstanceId("c89b3280-fe8d-4aa0-a42e-44465bb1c61c") + .name("my_service_instance") + .parameter("foo", "bar") + .parameter("baz", "qux") + .maintenanceInfo(MaintenanceInfo.builder().version("1.0.0").build()) + .tags("foo", "bar", "baz") + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "f2b6ba9c-a4d2-11ea-8ae6-48bf6bec2d78") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("note", "detailed information") + .label("key", "value") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServiceInstanceResponse.builder() + .jobId("e1e4417c-74ee-11ea-a604-48bf6bec2d79") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateUserProvidedServiceInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133") + .payload( + "fixtures/client/v3/serviceinstances/PATCH_request_update_user_provided_service_instance.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceinstances/PATCH_response_update_user_provided_service_instance.json") + .build()) + .build()); + + this.serviceInstances + .update( + UpdateServiceInstanceRequest.builder() + .serviceInstanceId("88ce23e5-27c3-4381-a2df-32a28ec43133") + .name("my-user-provided-instance") + .credential("foo", "bar") + .credential("baz", "qux") + .tags("foo", "bar", "baz") + .syslogDrainUrl("https://syslog.com/drain") + .routeServiceUrl("https://route.com/service") + .metadata( + Metadata.builder() + .annotation("foo", "bar") + .label("baz", "qux") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServiceInstanceResponse.builder() + .serviceInstance( + ServiceInstanceResource.builder() + .id("88ce23e5-27c3-4381-a2df-32a28ec43133") + .createdAt("2020-03-10T15:56:08Z") + .updatedAt("2020-03-10T15:56:08Z") + .lastOperation( + LastOperation.builder() + .type("create") + .state("succeeded") + .description("Operation succeeded") + .updatedAt("2020-03-10T15:49:32Z") + .createdAt("2020-03-10T15:49:29Z") + .build()) + .name("my-user-provided-instance") + .tags("foo", "bar", "baz") + .type(ServiceInstanceType.USER_PROVIDED) + .syslogDrainUrl("https://syslog.com/drain") + .routeServiceUrl("https://route.com/service") + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotation("foo", "bar") + .label("baz", "qux") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .link( + "space", + Link.builder() + .href( + "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7") + .build()) + .link( + "credentials", + Link.builder() + .href( + "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133/credentials") + .build()) + .link( + "service_credential_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_credential_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .link( + "service_route_bindings", + Link.builder() + .href( + "https://api.example.org/v3/service_route_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteManagedServiceInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header("Location", "e1e4417c-74ee-11ea-a604-48bf6bec2d79") + .build()) + .build()); + + this.serviceInstances + .delete( + DeleteServiceInstanceRequest.builder() + .serviceInstanceId("88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .as(StepVerifier::create) + .expectNext(Optional.of("e1e4417c-74ee-11ea-a604-48bf6bec2d79")) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteUserProvidedServiceInstance() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceInstances + .delete( + DeleteServiceInstanceRequest.builder() + .serviceInstanceId("88ce23e5-27c3-4381-a2df-32a28ec43133") + .build()) + .as(StepVerifier::create) + .expectNext(Optional.empty()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceofferings/ReactorServiceOfferingsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceofferings/ReactorServiceOfferingsTest.java new file mode 100644 index 00000000000..c71082bda36 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceofferings/ReactorServiceOfferingsTest.java @@ -0,0 +1,448 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.serviceofferings; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.serviceofferings.BrokerCatalog; +import org.cloudfoundry.client.v3.serviceofferings.DeleteServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.Features; +import org.cloudfoundry.client.v3.serviceofferings.GetServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.GetServiceOfferingResponse; +import org.cloudfoundry.client.v3.serviceofferings.ListServiceOfferingsRequest; +import org.cloudfoundry.client.v3.serviceofferings.ListServiceOfferingsResponse; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingRelationships; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingResource; +import org.cloudfoundry.client.v3.serviceofferings.UpdateServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.UpdateServiceOfferingResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServiceOfferingsTest extends AbstractClientApiTest { + + private final ReactorServiceOfferingsV3 serviceOfferings = + new ReactorServiceOfferingsV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_offerings/test-service-offering-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.serviceOfferings + .delete( + DeleteServiceOfferingRequest.builder() + .serviceOfferingId("test-service-offering-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_offerings/test-service-offering-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceofferings/GET_{id}_response.json") + .build()) + .build()); + + this.serviceOfferings + .get( + GetServiceOfferingRequest.builder() + .serviceOfferingId("test-service-offering-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetServiceOfferingResponse.builder() + .id("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .name("my_service_offering") + .description("Provides my service") + .available(true) + .tags("relational", "caching") + .requires(Collections.emptyList()) + .createdAt("2019-11-28T13:44:02Z") + .updatedAt("2019-11-28T13:44:02Z") + .shareable(true) + .documentationUrl("https://some-documentation-link.io") + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "db730a8c-11e5-11ea-838a-0f4fff3b1cfb") + .metadata( + Collections.singletonMap("shareable", true)) + .features( + Features.builder() + .planUpdateable(true) + .bindable(true) + .instancesRetrievable(true) + .bindingsRetrievable(true) + .allowContextUpdates(false) + .build()) + .build()) + .relationships( + ServiceOfferingRelationships.builder() + .serviceBroker( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/bf7eb420-11e5-11ea-b7db-4b5d5e7976a") + .build()) + .link( + "service_plans", + Link.builder() + .href( + "https://api.example.org/v3/service_plans?service_offering_guids=bf7eb420-11e5-11ea-b7db-4b5d5e7976a") + .build()) + .link( + "service_broker", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_offerings") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/serviceofferings/GET_response.json") + .build()) + .build()); + + this.serviceOfferings + .list(ListServiceOfferingsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListServiceOfferingsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/service_offerings?page=2&per_page=2") + .build()) + .build()) + .resource( + ServiceOfferingResource.builder() + .id("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .name("my_service_offering") + .description("Provides my service") + .available(true) + .tags("relational", "caching") + .requires(Collections.emptyList()) + .createdAt("2019-11-28T13:44:02Z") + .updatedAt("2019-11-28T13:44:02Z") + .shareable(true) + .documentationUrl( + "https://some-documentation-link.io") + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "db730a8c-11e5-11ea-838a-0f4fff3b1cfb") + .metadata( + Collections.singletonMap( + "shareable", true)) + .features( + Features.builder() + .planUpdateable( + true) + .bindable(true) + .instancesRetrievable( + true) + .bindingsRetrievable( + true) + .allowContextUpdates( + false) + .build()) + .build()) + .relationships( + ServiceOfferingRelationships.builder() + .serviceBroker( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/bf7eb420-11e5-11ea-b7db-4b5d5e7976a") + .build()) + .link( + "service_plans", + Link.builder() + .href( + "https://api.example.org/v3/service_plans?service_offering_guids=bf7eb420-11e5-11ea-b7db-4b5d5e7976a") + .build()) + .link( + "service_broker", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .resource( + ServiceOfferingResource.builder() + .id("20e6cd62-12bb-11ea-90d1-7bfec2c75bcd") + .name("other_service_offering") + .description("Provides another service") + .available(true) + .tag("caching") + .requires(Collections.emptyList()) + .createdAt("2019-11-29T16:44:02Z") + .updatedAt("2019-11-29T16:44:02Z") + .shareable(true) + .documentationUrl( + "https://some-other-documentation-link.io") + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "3cb11822-12bb-11ea-beb1-a350dc7453b9") + .metadata( + Collections.singletonMap( + "shareable", true)) + .features( + Features.builder() + .planUpdateable( + true) + .bindable(true) + .instancesRetrievable( + true) + .bindingsRetrievable( + true) + .allowContextUpdates( + false) + .build()) + .build()) + .relationships( + ServiceOfferingRelationships.builder() + .serviceBroker( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/20e6cd62-12bb-11ea-90d1-7bfec2c75bcd") + .build()) + .link( + "service_plans", + Link.builder() + .href( + "https://api.example.org/v3/service_plans?service_offering_guids=20e6cd62-12bb-11ea-90d1-7bfec2c75bcd") + .build()) + .link( + "service_broker", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/service_offerings/test-service-offering-id") + .payload( + "fixtures/client/v3/serviceofferings/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/serviceofferings/PATCH_{id}_response.json") + .build()) + .build()); + + this.serviceOfferings + .update( + UpdateServiceOfferingRequest.builder() + .serviceOfferingId("test-service-offering-id") + .metadata( + Metadata.builder() + .annotation("note", "detailed information") + .label("key", "value") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServiceOfferingResponse.builder() + .id("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .name("my_service_offering") + .description("Provides my service") + .available(true) + .tags("relational", "caching") + .requires(Collections.emptyList()) + .createdAt("2019-11-28T13:44:02Z") + .updatedAt("2019-11-28T13:44:02Z") + .shareable(true) + .documentationUrl("https://some-documentation-link.io") + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "db730a8c-11e5-11ea-838a-0f4fff3b1cfb") + .metadata( + Collections.singletonMap("shareable", true)) + .features( + Features.builder() + .planUpdateable(true) + .bindable(true) + .instancesRetrievable(true) + .bindingsRetrievable(true) + .allowContextUpdates(false) + .build()) + .build()) + .relationships( + ServiceOfferingRelationships.builder() + .serviceBroker( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/bf7eb420-11e5-11ea-b7db-4b5d5e7976a") + .build()) + .link( + "service_plans", + Link.builder() + .href( + "https://api.example.org/v3/service_plans?service_offering_guids=bf7eb420-11e5-11ea-b7db-4b5d5e7976a") + .build()) + .link( + "service_broker", + Link.builder() + .href( + "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceplans/ReactorServicePlansTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceplans/ReactorServicePlansTest.java new file mode 100644 index 00000000000..050d592936c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/serviceplans/ReactorServicePlansTest.java @@ -0,0 +1,652 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.serviceplans; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.client.v3.serviceplans.Visibility.ADMIN; +import static org.cloudfoundry.client.v3.serviceplans.Visibility.ORGANIZATION; +import static org.cloudfoundry.client.v3.serviceplans.Visibility.PUBLIC; + +import java.time.Duration; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.serviceplans.BrokerCatalog; +import org.cloudfoundry.client.v3.serviceplans.Cost; +import org.cloudfoundry.client.v3.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.Features; +import org.cloudfoundry.client.v3.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansResponse; +import org.cloudfoundry.client.v3.serviceplans.MaintenanceInfo; +import org.cloudfoundry.client.v3.serviceplans.Organization; +import org.cloudfoundry.client.v3.serviceplans.Parameters; +import org.cloudfoundry.client.v3.serviceplans.Schema; +import org.cloudfoundry.client.v3.serviceplans.Schemas; +import org.cloudfoundry.client.v3.serviceplans.ServiceBindingSchema; +import org.cloudfoundry.client.v3.serviceplans.ServiceInstanceSchema; +import org.cloudfoundry.client.v3.serviceplans.ServicePlanRelationships; +import org.cloudfoundry.client.v3.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanVisibilityResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServicePlansTest extends AbstractClientApiTest { + + private final ReactorServicePlansV3 servicePlans = + new ReactorServicePlansV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/service_plans/test-service-plan-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.servicePlans + .delete( + DeleteServicePlanRequest.builder() + .servicePlanId("test-service-plan-id") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + Map details = new HashMap<>(); + details.put( + "description", "Billing account number used to charge use of shared fake server."); + details.put("type", "string"); + + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/service_plans/test-service-plan-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/service_plans/GET_{id}_response.json") + .build()) + .build()); + + this.servicePlans + .get(GetServicePlanRequest.builder().servicePlanId("test-service-plan-id").build()) + .as(StepVerifier::create) + .expectNext( + GetServicePlanResponse.builder() + .id("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .name("my_big_service_plan") + .description("Big") + .visibilityType(PUBLIC) + .available(true) + .free(false) + .cost( + Cost.builder() + .currency("USD") + .amount(199.99F) + .unit("Monthly") + .build()) + .createdAt("2019-11-28T13:44:02Z") + .updatedAt("2019-11-28T13:44:02Z") + .maintenanceInfo( + MaintenanceInfo.builder() + .version("1.0.0+dev4") + .description("Database version 7.8.0") + .build()) + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "db730a8c-11e5-11ea-838a-0f4fff3b1cfb") + .metadata( + Collections.singletonMap( + "custom-key", "custom-information")) + .features( + Features.builder() + .planUpdateable(true) + .bindable(true) + .build()) + .build()) + .schemas( + Schemas.builder() + .serviceInstance( + ServiceInstanceSchema.builder() + .create( + Schema.builder() + .parameters( + Parameters + .builder() + .jsonSchema( + "http://json-schema.org/draft-04/schema#") + .type( + "object") + .properties( + Collections + .singletonMap( + "billing-account", + details)) + .property( + "billing-account", + details) + .build()) + .build()) + .update(Schema.builder().build()) + .build()) + .serviceBinding( + ServiceBindingSchema.builder() + .create(Schema.builder().build()) + .build()) + .build()) + .relationships( + ServicePlanRelationships.builder() + .serviceOffering( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .build()) + .link( + "service_offering", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .link( + "visibility", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + Map details = new HashMap<>(); + details.put( + "description", "Billing account number used to charge use of shared fake server."); + details.put("type", "string"); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/service_plans").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/service_plans/GET_response.json") + .build()) + .build()); + + this.servicePlans + .list(ListServicePlansRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListServicePlansResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/service_plans?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/service_plans?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/service_plans?page=2&per_page=2") + .build()) + .build()) + .resource( + ServicePlanResource.builder() + .id("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .name("my_big_service_plan") + .description("Big plan") + .visibilityType(ORGANIZATION) + .available(true) + .free(false) + .cost( + Cost.builder() + .currency("USD") + .amount(199.99F) + .unit("Monthly") + .build()) + .createdAt("2019-11-28T13:44:02Z") + .updatedAt("2019-11-28T13:44:02Z") + .maintenanceInfo( + MaintenanceInfo.builder() + .version("1.0.0+dev4") + .description( + "Database version 7.8.0") + .build()) + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "db730a8c-11e5-11ea-838a-0f4fff3b1cfb") + .metadata( + Collections.singletonMap( + "custom-key", + "custom-value")) + .features( + Features.builder() + .planUpdateable( + true) + .bindable(true) + .build()) + .build()) + .schemas( + Schemas.builder() + .serviceInstance( + ServiceInstanceSchema + .builder() + .create( + Schema + .builder() + .parameters( + Parameters + .builder() + .jsonSchema( + "http://json-schema.org/draft-04/schema#") + .type( + "object") + .properties( + Collections + .singletonMap( + "billing-account", + details)) + .property( + "billing-account", + details) + .build()) + .build()) + .update( + Schema + .builder() + .build()) + .build()) + .serviceBinding( + ServiceBindingSchema + .builder() + .create( + Schema + .builder() + .build()) + .build()) + .build()) + .relationships( + ServicePlanRelationships.builder() + .serviceOffering( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .build()) + .link( + "service_offering", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .link( + "visibility", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility") + .build()) + .build()) + .resource( + ServicePlanResource.builder() + .id("20e6cd62-12bb-11ea-90d1-7bfec2c75bcd") + .name("other_service_plan") + .description("Provides another service plan") + .visibilityType(ADMIN) + .available(true) + .free(true) + .createdAt("2019-11-29T16:44:02Z") + .updatedAt("2019-11-29T16:44:02Z") + .maintenanceInfo(MaintenanceInfo.builder().build()) + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "3cb11822-12bb-11ea-beb1-a350dc7453b9") + .metadata( + Collections.singletonMap( + "other-data", true)) + .features( + Features.builder() + .planUpdateable( + true) + .bindable(true) + .build()) + .build()) + .schemas( + Schemas.builder() + .serviceInstance( + ServiceInstanceSchema + .builder() + .create( + Schema + .builder() + .parameters( + null) + .build()) + .update( + Schema + .builder() + .parameters( + null) + .build()) + .build()) + .serviceBinding( + ServiceBindingSchema + .builder() + .create( + Schema + .builder() + .parameters( + null) + .build()) + .build()) + .build()) + .relationships( + ServicePlanRelationships.builder() + .serviceOffering( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/20e6cd62-12bb-11ea-90d1-7bfec2c75bcd") + .build()) + .link( + "service_offering", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .link( + "visibility", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/20e6cd62-12bb-11ea-90d1-7bfec2c75bcd/visibility") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + Map details = new HashMap<>(); + details.put( + "description", "Billing account number used to charge use of shared fake server."); + details.put("type", "string"); + + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/service_plans/test-service-plan-id") + .payload( + "fixtures/client/v3/service_plans/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/service_plans/PATCH_{id}_response.json") + .build()) + .build()); + + this.servicePlans + .update( + UpdateServicePlanRequest.builder() + .servicePlanId("test-service-plan-id") + .metadata( + Metadata.builder() + .annotation("note", "detailed information") + .label("key", "value") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServicePlanResponse.builder() + .id("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .name("my_big_service_plan") + .description("Big") + .visibilityType(PUBLIC) + .available(true) + .free(false) + .cost( + Cost.builder() + .currency("USD") + .amount(199.99F) + .unit("Monthly") + .build()) + .createdAt("2019-11-28T13:44:02Z") + .updatedAt("2019-11-28T13:44:02Z") + .maintenanceInfo( + MaintenanceInfo.builder() + .version("1.0.0+dev4") + .description("Database version 7.8.0") + .build()) + .brokerCatalog( + BrokerCatalog.builder() + .brokerCatalogId( + "db730a8c-11e5-11ea-838a-0f4fff3b1cfb") + .metadata("custom-key", "custom-information") + .features( + Features.builder() + .planUpdateable(true) + .bindable(true) + .build()) + .build()) + .schemas( + Schemas.builder() + .serviceInstance( + ServiceInstanceSchema.builder() + .create( + Schema.builder() + .parameters( + Parameters + .builder() + .jsonSchema( + "http://json-schema.org/draft-04/schema#") + .type( + "object") + .properties( + Collections + .singletonMap( + "billing-account", + details)) + .property( + "billing-account", + details) + .build()) + .build()) + .update(Schema.builder().build()) + .build()) + .serviceBinding( + ServiceBindingSchema.builder() + .create(Schema.builder().build()) + .build()) + .build()) + .relationships( + ServicePlanRelationships.builder() + .serviceOffering( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .build()) + .build()) + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .build()) + .link( + "service_offering", + Link.builder() + .href( + "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7") + .build()) + .link( + "visibility", + Link.builder() + .href( + "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updatePlanVisibility() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility") + .payload( + "fixtures/client/v3/service_plans/POST_{id}_request_update_plan.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/service_plans/POST_{id}_response_update_plan.json") + .build()) + .build()); + + this.servicePlans + .updateVisibility( + UpdateServicePlanVisibilityRequest.builder() + .servicePlanId("bf7eb420-11e5-11ea-b7db-4b5d5e7976a9") + .type(ORGANIZATION) + .organization( + Organization.builder() + .guid("0fc1ad4f-e1d7-4436-8e23-6b20f03c6482") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateServicePlanVisibilityResponse.builder() + .type(ORGANIZATION) + .organization( + Organization.builder() + .guid("0fc1ad4f-e1d7-4436-8e23-6b20f03c6482") + .name("other_org") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/spaces/ReactorSpacesV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/spaces/ReactorSpacesV3Test.java new file mode 100644 index 00000000000..ad9fd9f61a0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/spaces/ReactorSpacesV3Test.java @@ -0,0 +1,434 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.spaces; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentResponse; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v3.spaces.DeleteUnmappedRoutesRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceIsolationSegmentResponse; +import org.cloudfoundry.client.v3.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v3.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v3.spaces.ListSpacesResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.client.v3.spaces.SpaceResource; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorSpacesV3Test extends AbstractClientApiTest { + + private final ReactorSpacesV3 spaces = + new ReactorSpacesV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void assignIsolationSegment() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path( + "/spaces/test-space-id/relationships/isolation_segment") + .payload( + "fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_response.json") + .build()) + .build()); + + this.spaces + .assignIsolationSegment( + AssignSpaceIsolationSegmentRequest.builder() + .data(Relationship.builder().id("[iso-seg-guid]").build()) + .spaceId("test-space-id") + .build()) + .as(StepVerifier::create) + .expectNext( + AssignSpaceIsolationSegmentResponse.builder() + .data( + Relationship.builder() + .id("e4c91047-3b29-4fda-b7f9-04033e5a9c9f") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920/relationships/isolation_segment") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/e4c91047-3b29-4fda-b7f9-04033e5a9c9f") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/spaces") + .payload("fixtures/client/v3/spaces/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/spaces/POST_response.json") + .build()) + .build()); + + this.spaces + .create( + CreateSpaceRequest.builder() + .name("my-space") + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "e00705b9-7b42-4561-ae97-2520399d2133") + .build()) + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateSpaceResponse.builder() + .createdAt("2017-02-01T01:33:58Z") + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .name("my-space") + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "e00705b9-7b42-4561-ae97-2520399d2133") + .build()) + .build()) + .build()) + .updatedAt("2017-02-01T01:33:58Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920") + .build()) + .link( + "organization", + Link.builder() + .href( + "https://api.example.org/v3/organizations/e00705b9-7b42-4561-ae97-2520399d2133") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-job-id") + .build()) + .build()); + + this.spaces + .delete(DeleteSpaceRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext("test-job-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteUnmappedRoutes() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/spaces/test-space-id/routes?unmapped=true") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .header( + "Location", + "https://api.example.org/v3/jobs/test-job-id") + .build()) + .build()); + + this.spaces + .deleteUnmappedRoutes( + DeleteUnmappedRoutesRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext("test-job-id") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/spaces/test-space-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/spaces/GET_{id}_response.json") + .build()) + .build()); + + this.spaces + .get(GetSpaceRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext( + GetSpaceResponse.builder() + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .createdAt("2017-02-01T01:33:58Z") + .updatedAt("2017-02-01T01:33:58Z") + .name("space1") + .metadata( + Metadata.builder() + .annotations(Collections.emptyMap()) + .labels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getIsolationSegment() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/spaces/test-space-id/relationships/isolation_segment") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/spaces/GET_{id}_relationships_isolation_segment_response.json") + .build()) + .build()); + + this.spaces + .getIsolationSegment( + GetSpaceIsolationSegmentRequest.builder().spaceId("test-space-id").build()) + .as(StepVerifier::create) + .expectNext( + GetSpaceIsolationSegmentResponse.builder() + .data( + Relationship.builder() + .id("e4c91047-3b29-4fda-b7f9-04033e5a9c9f") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920/relationships/isolation_segment") + .build()) + .link( + "related", + Link.builder() + .href( + "https://api.example.org/v3/isolation_segments/e4c91047-3b29-4fda-b7f9-04033e5a9c9f") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/spaces").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/spaces/GET_response.json") + .build()) + .build()); + + this.spaces + .list(ListSpacesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListSpacesResponse.builder() + .pagination( + Pagination.builder() + .totalResults(2) + .totalPages(1) + .first( + Link.builder() + .href( + "https://api.example.org/v3/spaces?page=1&per_page=50") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/spaces?page=1&per_page=50") + .build()) + .build()) + .resource( + SpaceResource.builder() + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .createdAt("2017-02-01T01:33:58Z") + .updatedAt("2017-02-01T01:33:58Z") + .name("space1") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920") + .build()) + .build()) + .resource( + SpaceResource.builder() + .id("d4c91047-7b29-4fda-b7f9-04033e5c9c9f") + .createdAt("2017-02-02T00:14:30Z") + .updatedAt("2017-02-02T00:14:30Z") + .name("space2") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/d4c91047-7b29-4fda-b7f9-04033e5c9c9f") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/spaces/test-space-id") + .payload( + "fixtures/client/v3/spaces/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/spaces/PATCH_{id}_response.json") + .build()) + .build()); + + this.spaces + .update( + UpdateSpaceRequest.builder() + .spaceId("test-space-id") + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("dept", "1234") + .build()) + .name("test-space-name") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateSpaceResponse.builder() + .id("885735b5-aea4-4cf5-8e44-961af0e41920") + .createdAt("2017-02-01T01:33:58Z") + .updatedAt("2017-02-01T01:33:58Z") + .name("test-space-name") + .metadata( + Metadata.builder() + .annotation("version", "1.2.4") + .label("dept", "1234") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/stacks/ReactorStacksV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/stacks/ReactorStacksV3Test.java new file mode 100644 index 00000000000..eac89dfbe5b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/stacks/ReactorStacksV3Test.java @@ -0,0 +1,302 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.stacks; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.NO_CONTENT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.stacks.CreateStackRequest; +import org.cloudfoundry.client.v3.stacks.CreateStackResponse; +import org.cloudfoundry.client.v3.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v3.stacks.GetStackRequest; +import org.cloudfoundry.client.v3.stacks.GetStackResponse; +import org.cloudfoundry.client.v3.stacks.ListStacksRequest; +import org.cloudfoundry.client.v3.stacks.ListStacksResponse; +import org.cloudfoundry.client.v3.stacks.StackResource; +import org.cloudfoundry.client.v3.stacks.UpdateStackRequest; +import org.cloudfoundry.client.v3.stacks.UpdateStackResponse; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class ReactorStacksV3Test extends AbstractClientApiTest { + + private final ReactorStacksV3 stacks = + new ReactorStacksV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/stacks") + .payload("fixtures/client/v3/stacks/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/stacks/POST_response.json") + .build()) + .build()); + + this.stacks + .create( + CreateStackRequest.builder() + .name("test-stack-name") + .description("test-stack-description") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateStackResponse.builder() + .id("11c916c9-c2f9-440e-8e73-102e79c4704d") + .name("test-stack-name") + .description("test-stack-description") + .createdAt("2018-11-09T22:43:28Z") + .updatedAt("2018-11-09T22:43:28Z") + .metadata( + Metadata.builder() + .putAllAnnotations(Collections.emptyMap()) + .putAllLabels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.com/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/stacks/test-stack-id") + .build()) + .response(TestResponse.builder().status(NO_CONTENT).build()) + .build()); + + this.stacks + .delete(DeleteStackRequest.builder().stackId("test-stack-id").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/stacks/GET_{id}_response.json") + .build()) + .build()); + + this.stacks + .get( + GetStackRequest.builder() + .stackId("11c916c9-c2f9-440e-8e73-102e79c4704d") + .build()) + .as(StepVerifier::create) + .expectNext( + GetStackResponse.builder() + .id("11c916c9-c2f9-440e-8e73-102e79c4704d") + .name("test-stack-name") + .description("test-stack-description") + .createdAt("2018-11-09T22:43:28Z") + .updatedAt("2018-11-09T22:43:28Z") + .metadata( + Metadata.builder() + .putAllAnnotations(Collections.emptyMap()) + .putAllLabels(Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.com/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/stacks").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/stacks/GET_response.json") + .build()) + .build()); + + this.stacks + .list(ListStacksRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListStacksResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/stacks?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/stacks?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/stacks?page=2&per_page=2") + .build()) + .build()) + .resource( + StackResource.builder() + .id("11c916c9-c2f9-440e-8e73-102e79c4704d") + .name("test-stack-name-1") + .description("test-stack-description-1") + .createdAt("2018-11-09T22:43:28Z") + .updatedAt("2018-11-09T22:43:28Z") + .metadata( + Metadata.builder() + .putAllAnnotations( + Collections.emptyMap()) + .putAllLabels( + Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d") + .build()) + .build()) + .resource( + StackResource.builder() + .id("81c916c9-c2f9-440e-8e73-102e79c4704h") + .name("test-stack-name-2") + .description("test-stack-description-2") + .createdAt("2018-11-09T22:43:29Z") + .updatedAt("2018-11-09T22:43:29Z") + .metadata( + Metadata.builder() + .putAllAnnotations( + Collections.emptyMap()) + .putAllLabels( + Collections.emptyMap()) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/stacks/81c916c9-c2f9-440e-8e73-102e79c4704h") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/stacks/test-stack-id") + .payload( + "fixtures/client/v3/stacks/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/client/v3/stacks/PATCH_{id}_response.json") + .build()) + .build()); + + this.stacks + .update( + UpdateStackRequest.builder() + .stackId("test-stack-id") + .metadata( + Metadata.builder() + .label("key", "value") + .annotation("note", "detailed information") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateStackResponse.builder() + .id("11c916c9-c2f9-440e-8e73-102e79c4704d") + .name("test-stack-name") + .description("test-stack-description") + .createdAt("2018-11-09T22:43:28Z") + .updatedAt("2018-11-09T22:43:28Z") + .metadata( + Metadata.builder() + .label("key", "value") + .annotation("note", "detailed information") + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.com/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/tasks/ReactorTasksTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/tasks/ReactorTasksTest.java new file mode 100644 index 00000000000..0556a2fef1b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/tasks/ReactorTasksTest.java @@ -0,0 +1,363 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.client.v3.tasks; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.ACCEPTED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.tasks.CancelTaskRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskResponse; +import org.cloudfoundry.client.v3.tasks.CreateTaskRequest; +import org.cloudfoundry.client.v3.tasks.CreateTaskResponse; +import org.cloudfoundry.client.v3.tasks.GetTaskRequest; +import org.cloudfoundry.client.v3.tasks.GetTaskResponse; +import org.cloudfoundry.client.v3.tasks.ListTasksRequest; +import org.cloudfoundry.client.v3.tasks.ListTasksResponse; +import org.cloudfoundry.client.v3.tasks.Result; +import org.cloudfoundry.client.v3.tasks.TaskResource; +import org.cloudfoundry.client.v3.tasks.TaskState; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorTasksTest extends AbstractClientApiTest { + + private final ReactorTasks tasks = + new ReactorTasks(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void cancel() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/tasks/test-id/cancel") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v3/tasks/PUT_{id}_cancel_response.json") + .build()) + .build()); + + this.tasks + .cancel(CancelTaskRequest.builder().taskId("test-id").build()) + .as(StepVerifier::create) + .expectNext( + CancelTaskResponse.builder() + .id("d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .sequenceId(1) + .name("migrate") + .command("rake db:migrate") + .state(TaskState.CANCELING) + .memoryInMb(512) + .diskInMb(1024) + .result(Result.builder().build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/apps/test-application-id/tasks") + .payload( + "fixtures/client/v3/tasks/POST_apps_{id}_tasks_request.json") + .build()) + .response( + TestResponse.builder() + .status(ACCEPTED) + .payload( + "fixtures/client/v3/tasks/POST_apps_{id}_tasks_response.json") + .build()) + .build()); + + this.tasks + .create( + CreateTaskRequest.builder() + .applicationId("test-application-id") + .command("rake db:migrate") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateTaskResponse.builder() + .id("d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .sequenceId(1) + .name("migrate") + .command("rake db:migrate") + .state(TaskState.RUNNING) + .memoryInMb(512) + .diskInMb(1024) + .result(Result.builder().build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/tasks/test-id").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/tasks/GET_{id}_response.json") + .build()) + .build()); + + this.tasks + .get(GetTaskRequest.builder().taskId("test-id").build()) + .as(StepVerifier::create) + .expectNext( + GetTaskResponse.builder() + .id("d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .sequenceId(1) + .name("migrate") + .command("rake db:migrate") + .state(TaskState.RUNNING) + .memoryInMb(512) + .diskInMb(1024) + .result(Result.builder().build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/tasks").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/tasks/GET_response.json") + .build()) + .build()); + + this.tasks + .list(ListTasksRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListTasksResponse.builder() + .pagination( + Pagination.builder() + .totalResults(3) + .totalPages(2) + .first( + Link.builder() + .href( + "https://api.example.org/v3/tasks?page=1&per_page=2") + .build()) + .last( + Link.builder() + .href( + "https://api.example.org/v3/tasks?page=2&per_page=2") + .build()) + .next( + Link.builder() + .href( + "https://api.example.org/v3/tasks?page=2&per_page=2") + .build()) + .build()) + .resource( + TaskResource.builder() + .id("d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .sequenceId(1) + .name("hello") + .state(TaskState.SUCCEEDED) + .memoryInMb(512) + .diskInMb(1024) + .result(Result.builder().build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .resource( + TaskResource.builder() + .id("63b4cd89-fd8b-4bf1-a311-7174fcc907d6") + .sequenceId(2) + .name("migrate") + .state(TaskState.FAILED) + .memoryInMb(512) + .diskInMb(1024) + .result( + Result.builder() + .failureReason( + "Exited with status 1") + .build()) + .dropletId("740ebd2b-162b-469a-bd72-3edb96fabd9a") + .createdAt("2016-05-04T17:00:41Z") + .updatedAt("2016-05-04T17:00:42Z") + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6") + .build()) + .link( + "app", + Link.builder() + .href( + "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5") + .build()) + .link( + "cancel", + Link.builder() + .href( + "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6/actions/cancel") + .method("POST") + .build()) + .link( + "droplet", + Link.builder() + .href( + "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/users/ReactorUsersV3Test.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/users/ReactorUsersV3Test.java new file mode 100644 index 00000000000..b9d78e9a69e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/client/v3/users/ReactorUsersV3Test.java @@ -0,0 +1,215 @@ +package org.cloudfoundry.reactor.client.v3.users; + +import static io.netty.handler.codec.http.HttpMethod.*; +import static io.netty.handler.codec.http.HttpResponseStatus.*; + +import java.time.Duration; +import java.util.Collections; +import java.util.Map; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.users.*; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.client.AbstractClientApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorUsersV3Test extends AbstractClientApiTest { + private final ReactorUsersV3 users = + new ReactorUsersV3( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/users") + .payload("fixtures/client/v3/users/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/client/v3/users/POST_response.json") + .build()) + .build()); + + this.users + .create( + CreateUserRequest.builder() + .userId("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateUserResponse.builder() + .from( + expectedUserResource( + Collections.emptyMap(), Collections.emptyMap())) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/users/GET_{id}_response.json") + .build()) + .build()); + + this.users + .get( + GetUserRequest.builder() + .userId("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .as(StepVerifier::create) + .expectNext( + GetUserResponse.builder() + .from( + expectedUserResource( + Collections.emptyMap(), Collections.emptyMap())) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/users").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/client/v3/users/GET_response.json") + .build()) + .build()); + + Link first = + Link.builder().href("https://api.example.org/v3/users?page=1&per_page=1").build(); + Link last = + Link.builder().href("https://api.example.org/v3/users?page=1&per_page=1").build(); + this.users + .list(ListUsersRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListUsersResponse.builder() + .pagination( + Pagination.builder() + .first(first) + .last(last) + .totalResults(1) + .totalPages(1) + .build()) + .resource( + expectedUserResource( + Collections.emptyMap(), Collections.emptyMap())) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .payload("fixtures/client/v3/users/PATCH_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/client/v3/users/PATCH_{id}_response.json") + .build()) + .build()); + + this.users + .update( + UpdateUserRequest.builder() + .userId("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .metadata( + Metadata.builder() + .putAllAnnotations( + Collections.singletonMap( + "note", "detailed information")) + .putAllLabels( + Collections.singletonMap( + "environment", "production")) + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateUserResponse.builder() + .from( + expectedUserResource( + Collections.singletonMap( + "note", "detailed information"), + Collections.singletonMap( + "environment", "production"))) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .response(TestResponse.builder().status(ACCEPTED).build()) + .build()); + + this.users + .delete( + DeleteUserRequest.builder() + .userId("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + UserResource expectedUserResource(Map labels, Map annotations) { + return UserResource.builder() + .id("3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .username("some-name") + .presentationName("some-name") + .origin("uaa") + .metadata( + Metadata.builder() + .putAllAnnotations(labels) + .putAllLabels(annotations) + .build()) + .link( + "self", + Link.builder() + .href( + "https://api.example.org/v3/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5") + .build()) + .build(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/doppler/AbstractDopplerApiTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/doppler/AbstractDopplerApiTest.java new file mode 100644 index 00000000000..6d42bff2620 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/doppler/AbstractDopplerApiTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.doppler; + +import org.cloudfoundry.reactor.AbstractRestTest; + +abstract class AbstractDopplerApiTest extends AbstractRestTest {} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/doppler/ReactorDopplerClientTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/doppler/ReactorDopplerClientTest.java new file mode 100644 index 00000000000..21b436e34ff --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/doppler/ReactorDopplerClientTest.java @@ -0,0 +1,244 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.doppler; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.doppler.ContainerMetric; +import org.cloudfoundry.doppler.ContainerMetricsRequest; +import org.cloudfoundry.doppler.Envelope; +import org.cloudfoundry.doppler.EventType; +import org.cloudfoundry.doppler.LogMessage; +import org.cloudfoundry.doppler.MessageType; +import org.cloudfoundry.doppler.RecentLogsRequest; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorDopplerClientTest extends AbstractDopplerApiTest { + + private final ReactorDopplerEndpoints dopplerEndpoints = + new ReactorDopplerEndpoints( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void containerMetrics() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/containermetrics") + .build()) + .response( + TestResponse.builder() + .status(OK) + .contentType( + "multipart/x-protobuf;" + + " boundary=30662872b152b6fbeb87658af504679def2b6680145265ad354761ea7acf") + .payload( + "fixtures/doppler/apps/GET_{id}_containermetrics_response.bin") + .build()) + .build()); + + this.dopplerEndpoints + .containerMetrics( + ContainerMetricsRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNext( + Envelope.builder() + .containerMetric( + ContainerMetric.builder() + .applicationId( + "1a95eadc-95c6-4675-aa07-8c02f80ea8a4") + .cpuPercentage(0.09530591690894699) + .diskBytes(154005504L) + .instanceIndex(2) + .memoryBytes(385896448L) + .build()) + .deployment("cf-cfapps-io2-diego") + .eventType(EventType.CONTAINER_METRIC) + .index("17") + .ip("10.10.115.52") + .job("cell_z2") + .origin("rep") + .timestamp(1460991824620929073L) + .build(), + Envelope.builder() + .containerMetric( + ContainerMetric.builder() + .applicationId( + "1a95eadc-95c6-4675-aa07-8c02f80ea8a4") + .cpuPercentage(0.070504789909887) + .diskBytes(154005504L) + .instanceIndex(0) + .memoryBytes(371363840L) + .build()) + .deployment("cf-cfapps-io2-diego") + .eventType(EventType.CONTAINER_METRIC) + .index("55") + .ip("10.10.115.90") + .job("cell_z2") + .origin("rep") + .timestamp(1460991826249611682L) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void containerMetricsLarge() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/containermetrics") + .build()) + .response( + TestResponse.builder() + .status(OK) + .contentType( + "multipart/x-protobuf;" + + " boundary=d12911a0934bf75879de385a042c4037fa903841921ba84abb77cb73a444") + .payload( + "fixtures/doppler/apps/GET_{id}_containermetrics_response-large.bin") + .build()) + .build()); + + this.dopplerEndpoints + .containerMetrics( + ContainerMetricsRequest.builder() + .applicationId("test-application-id") + .build()) + .as(StepVerifier::create) + .expectNextCount(3093) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void recentLogs() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/recentlogs") + .build()) + .response( + TestResponse.builder() + .status(OK) + .contentType( + "multipart/x-protobuf;" + + " boundary=92d42123ec83c0af6a27ba0de34528b702a53e2e67ba99636286b6a4cafb") + .payload( + "fixtures/doppler/apps/GET_{id}_recentlogs_response.bin") + .build()) + .build()); + + this.dopplerEndpoints + .recentLogs( + RecentLogsRequest.builder().applicationId("test-application-id").build()) + .as(StepVerifier::create) + .expectNext( + Envelope.builder() + .deployment("cf-cfapps-io2-diego") + .eventType(EventType.LOG_MESSAGE) + .index("33") + .ip("10.10.115.68") + .job("cell_z2") + .logMessage( + LogMessage.builder() + .applicationId( + "1a95eadc-95c6-4675-aa07-8c02f80ea8a4") + .message( + "2016-04-21 22:36:28.035 INFO 24 --- [ " + + " main]" + + " o.s.j.e.a.AnnotationMBeanExporter " + + " : Located managed bean" + + " 'rabbitConnectionFactory':" + + " registering with JMX server as" + + " MBean" + + " [org.springframework.amqp.rabbit.connection:name=rabbitConnectionFactory,type=CachingConnectionFactory]") + .messageType(MessageType.OUT) + .sourceInstance("0") + .sourceType("APP") + .timestamp(1461278188035928339L) + .build()) + .origin("rep") + .timestamp(1461278188035930425L) + .build(), + Envelope.builder() + .deployment("cf-cfapps-io2-diego") + .eventType(EventType.LOG_MESSAGE) + .index("33") + .ip("10.10.115.68") + .job("cell_z2") + .logMessage( + LogMessage.builder() + .applicationId( + "1a95eadc-95c6-4675-aa07-8c02f80ea8a4") + .message("Container became healthy") + .messageType(MessageType.OUT) + .sourceInstance("0") + .sourceType("CELL") + .timestamp(1461278188715651492L) + .build()) + .origin("rep") + .timestamp(1461278188715653514L) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void recentLogsLarge() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/apps/test-application-id/recentlogs") + .build()) + .response( + TestResponse.builder() + .status(OK) + .contentType( + "multipart/x-protobuf;" + + " boundary=74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2") + .payload( + "fixtures/doppler/apps/GET_{id}_recentlogs_response-large.bin") + .build()) + .build()); + + this.dopplerEndpoints + .recentLogs( + RecentLogsRequest.builder().applicationId("test-application-id").build()) + .as(StepVerifier::create) + .expectNextCount(3093) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/logcache/v1/AbstractLogCacheApiTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/logcache/v1/AbstractLogCacheApiTest.java new file mode 100644 index 00000000000..1a0d9d68148 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/logcache/v1/AbstractLogCacheApiTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.logcache.v1; + +import org.cloudfoundry.reactor.AbstractRestTest; + +class AbstractLogCacheApiTest extends AbstractRestTest {} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/logcache/v1/ReactorLogCacheClientTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/logcache/v1/ReactorLogCacheClientTest.java new file mode 100644 index 00000000000..740461dc469 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/logcache/v1/ReactorLogCacheClientTest.java @@ -0,0 +1,353 @@ +/* + * Copyright 2013-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.logcache.v1; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.eq; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.net.URI; +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.logcache.v1.Envelope; +import org.cloudfoundry.logcache.v1.EnvelopeBatch; +import org.cloudfoundry.logcache.v1.Gauge; +import org.cloudfoundry.logcache.v1.InfoRequest; +import org.cloudfoundry.logcache.v1.InfoResponse; +import org.cloudfoundry.logcache.v1.Log; +import org.cloudfoundry.logcache.v1.LogType; +import org.cloudfoundry.logcache.v1.MetaRequest; +import org.cloudfoundry.logcache.v1.MetaResponse; +import org.cloudfoundry.logcache.v1.Metadata; +import org.cloudfoundry.logcache.v1.Metric; +import org.cloudfoundry.logcache.v1.ReadRequest; +import org.cloudfoundry.logcache.v1.ReadResponse; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.DefaultConnectionContext; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.RootProvider; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +class ReactorLogCacheClientTest extends AbstractLogCacheApiTest { + private static final String API_ROOT = + "http://api.my.rapid.server.com"; // the ".rAPId." part also contains the string "api". + private static final String LOGCACHE = + "http://log-cache.my.rapid.server.com"; // only the "api" at the start of + // the url should be replaced. + + private final ReactorLogCacheEndpoints logCacheEndpoints = + new ReactorLogCacheEndpoints( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void getRootFromFallback() { + URI webServerUri = URI.create(this.root.block(Duration.ofSeconds(5))); + Mono apiRoot = Mono.just(API_ROOT); + RootProvider rootProvider = mock(RootProvider.class); + when(rootProvider.getRoot(eq("log_cache"), any())) + .thenReturn(Mono.error(new IllegalArgumentException())); // trigger fallback + when(rootProvider.getRoot(any())).thenReturn(apiRoot); + ConnectionContext connectionContext = + DefaultConnectionContext.builder() + .rootProvider(rootProvider) + .apiHost(webServerUri.getHost()) + .port(webServerUri.getPort()) + .secure(false) + .build(); + ReactorLogCacheClient examinee = + ReactorLogCacheClient.builder() + .connectionContext(connectionContext) + .tokenProvider(TOKEN_PROVIDER) + .build(); + Mono logCacheRoot = examinee.getRoot(); + String rootString = logCacheRoot.block(Duration.ofSeconds(15)); + assertThat(rootString).isEqualTo(LOGCACHE); + } + + @Test + void getRootFromEndpoint() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/GET_response.json") + .build()) + .build()); + URI webServerUri = URI.create(this.root.block(Duration.ofSeconds(5))); + ConnectionContext connectionContext = + DefaultConnectionContext.builder() + .apiHost(webServerUri.getHost()) + .port(webServerUri.getPort()) + .secure(false) + .build(); + ReactorLogCacheClient examinee = + ReactorLogCacheClient.builder() + .connectionContext(connectionContext) + .tokenProvider(TOKEN_PROVIDER) + .build(); + Mono logCacheRoot = examinee.getRoot(); + String rootString = logCacheRoot.block(Duration.ofSeconds(5)); + assertThat(rootString) + .isEqualTo("http://cache-for-logging.run.pivotal.io:" + webServerUri.getPort()); + } + + @Test + void info() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/api/v1/info").build()) + .response( + TestResponse.builder() + .status(OK) + .contentType("text/plain; charset=utf-8") + .payload("fixtures/logcache.v1/GET_info_response.json") + .build()) + .build()); + + this.logCacheEndpoints + .info(InfoRequest.builder().build()) + .as(StepVerifier::create) + .expectNext(InfoResponse.builder().version("2.6.1").vmUptime(7166438L).build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void meta() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/api/v1/meta").build()) + .response( + TestResponse.builder() + .status(OK) + .contentType("text/plain; charset=utf-8") + .payload("fixtures/logcache.v1/GET_meta_response.json") + .build()) + .build()); + + this.logCacheEndpoints + .meta(MetaRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + MetaResponse.builder() + .meta( + "traffic_controller", + Metadata.builder() + .count(5490L) + .expired(1069110L) + .newestTimestamp(1588631926299067790L) + .oldestTimestamp(1588595386296937544L) + .build()) + .meta( + "uaa", + Metadata.builder() + .count(100000L) + .expired(79066604L) + .newestTimestamp(1588631951858159538L) + .oldestTimestamp(1588623478864261934L) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void read() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/api/v1/read/test-source-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .contentType("application/json") + .payload("fixtures/logcache.v1/GET_{id}_read_response.json") + .build()) + .build()); + + this.logCacheEndpoints + .read(ReadRequest.builder().sourceId("test-source-id").build()) + .as(StepVerifier::create) + .expectNext( + ReadResponse.builder() + .envelopes( + EnvelopeBatch.builder() + .batch( + Envelope.builder() + .timestamp(1588592413697846700L) + .sourceId( + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .instanceId("0") + .tag( + "app_id", + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .tag("app_name", "test") + .tag( + "deployment", + "cf-6a000373a858bcb78f1c") + .tag( + "index", + "f237deb0-471f-459a-a18b-de084a8113e7") + .tag("instance_id", "0") + .tag("ip", "10.194.34.36") + .tag("job", "diego_cell") + .tag( + "organization_id", + "825ec316-5590-416a-9247-1dd0a5750801") + .tag("organization_name", "system") + .tag("origin", "rep") + .tag( + "process_id", + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .tag( + "process_instance_id", + "9173f9d0-02b7-4f39-4738-f53b") + .tag("process_type", "web") + .tag( + "product", + "Pivotal Application" + + " Service") + .tag( + "source_id", + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .tag( + "space_id", + "547d902c-0554-4e7c-b886-3926a2e73bdf") + .tag("space_name", "test") + .tag( + "system_domain", + "cf.red.springapps.io") + .gauge( + Gauge.builder() + .metric( + "cpu", + Metric + .builder() + .unit( + "percentage") + .value( + 0.394234612100979) + .build()) + .metric( + "disk", + Metric + .builder() + .unit( + "bytes") + .value( + 433881088D) + .build()) + .metric( + "disk_quota", + Metric + .builder() + .unit( + "bytes") + .value( + 2122546345D) + .build()) + .metric( + "memory", + Metric + .builder() + .unit( + "bytes") + .value( + 822926477D) + .build()) + .metric( + "memory_quota", + Metric + .builder() + .unit( + "bytes") + .value( + 2147483648D) + .build()) + .build()) + .build(), + Envelope.builder() + .timestamp(1588617404686865694L) + .sourceId( + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .instanceId("0") + .tag( + "app_id", + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .tag("app_name", "test") + .tag( + "deployment", + "cf-6a000373a858bcb78f1c") + .tag( + "index", + "f237deb0-471f-459a-a18b-de084a8113e7") + .tag("instance_id", "0") + .tag("ip", "10.194.34.36") + .tag("job", "diego_cell") + .tag( + "organization_id", + "825ec316-5590-416a-9247-1dd0a5750801") + .tag("organization_name", "system") + .tag("origin", "rep") + .tag( + "process_id", + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .tag( + "process_instance_id", + "9173f9d0-02b7-4f39-4738-f53b") + .tag("process_type", "web") + .tag( + "product", + "Pivotal Application" + + " Service") + .tag( + "source_id", + "1a69c137-90f5-4b0a-8526-2ebca84c83a8") + .tag("source_type", "APP/PROC/WEB") + .tag( + "space_id", + "547d902c-0554-4e7c-b886-3926a2e73bdf") + .tag("space_name", "test") + .tag( + "system_domain", + "cf.red.springapps.io") + .log( + Log.builder() + .payload( + "MjAyMC0wNS0wNCAxODozNjo0NC42ODYgIElORk8gMTMgLS0tIFstaW5zdGFuY2Uua2V5LTBdIG8uYy5zLkZpbGVXYXRjaGluZ1g1MDlFeHRlbmRlZEtleU1hbmFnZXIgOiBVcGRhdGVkIEtleU1hbmFnZXIgZm9yIC9ldGMvY2YtaW5zdGFuY2UtY3JlZGVudGlhbHMvaW5zdGFuY2Uua2V5IGFuZCAvZXRjL2NmLWluc3RhbmNlLWNyZWRlbnRpYWxzL2luc3RhbmNlLmNydA==") + .type(LogType.OUT) + .build()) + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/AbstractNetworkingApiTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/AbstractNetworkingApiTest.java new file mode 100644 index 00000000000..25c1db20756 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/AbstractNetworkingApiTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking; + +import org.cloudfoundry.reactor.AbstractRestTest; + +public abstract class AbstractNetworkingApiTest extends AbstractRestTest {} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/v1/policies/ReactorPoliciesClientTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/v1/policies/ReactorPoliciesClientTest.java new file mode 100644 index 00000000000..f278332fb2e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/v1/policies/ReactorPoliciesClientTest.java @@ -0,0 +1,236 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking.v1.policies; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.networking.v1.policies.CreatePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.DeletePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.Destination; +import org.cloudfoundry.networking.v1.policies.ListPoliciesRequest; +import org.cloudfoundry.networking.v1.policies.ListPoliciesResponse; +import org.cloudfoundry.networking.v1.policies.Policy; +import org.cloudfoundry.networking.v1.policies.Ports; +import org.cloudfoundry.networking.v1.policies.Source; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.networking.AbstractNetworkingApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorPoliciesClientTest extends AbstractNetworkingApiTest { + + private final ReactorPolicies policies = + new ReactorPolicies( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/policies") + .payload("fixtures/networking/policies/POST_request.json") + .build()) + .response( + TestResponse.builder() + .payload("fixtures/networking/policies/POST_response.json") + .status(OK) + .build()) + .build()); + + this.policies + .create( + CreatePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination.builder() + .id( + "38f08df0-19df-4439-b4e9-61096d4301ea") + .protocol("tcp") + .ports( + Ports.builder() + .end(1235) + .start(1234) + .build()) + .build()) + .source( + Source.builder() + .id( + "1081ceac-f5c4-47a8-95e8-88e1e302efb5") + .build()) + .build()) + .policy( + Policy.builder() + .destination( + Destination.builder() + .id( + "308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .protocol("tcp") + .ports( + Ports.builder() + .end(1235) + .start(1234) + .build()) + .build()) + .source( + Source.builder() + .id( + "308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/policies/delete") + .payload( + "fixtures/networking/policies/POST_delete_request.json") + .build()) + .response( + TestResponse.builder() + .payload( + "fixtures/networking/policies/POST_delete_response.json") + .status(OK) + .build()) + .build()); + + this.policies + .delete( + DeletePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination.builder() + .id( + "38f08df0-19df-4439-b4e9-61096d4301ea") + .protocol("tcp") + .ports( + Ports.builder() + .end(1235) + .start(1234) + .build()) + .build()) + .source( + Source.builder() + .id( + "1081ceac-f5c4-47a8-95e8-88e1e302efb5") + .build()) + .build()) + .policy( + Policy.builder() + .destination( + Destination.builder() + .id( + "308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .protocol("tcp") + .ports( + Ports.builder() + .end(1235) + .start(1234) + .build()) + .build()) + .source( + Source.builder() + .id( + "308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .build()) + .build()) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/policies").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/networking/policies/GET_response.json") + .build()) + .build()); + + this.policies + .list(ListPoliciesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListPoliciesResponse.builder() + .totalPolicies(2) + .policy( + Policy.builder() + .destination( + Destination.builder() + .id( + "38f08df0-19df-4439-b4e9-61096d4301ea") + .protocol("tcp") + .ports( + Ports.builder() + .end(1235) + .start(1234) + .build()) + .build()) + .source( + Source.builder() + .id( + "1081ceac-f5c4-47a8-95e8-88e1e302efb5") + .build()) + .build()) + .policy( + Policy.builder() + .destination( + Destination.builder() + .id( + "308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .protocol("tcp") + .ports( + Ports.builder() + .end(1235) + .start(1234) + .build()) + .build()) + .source( + Source.builder() + .id( + "308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/v1/tags/ReactorTagsClientTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/v1/tags/ReactorTagsClientTest.java new file mode 100644 index 00000000000..8cf537c3a50 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/networking/v1/tags/ReactorTagsClientTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.networking.v1.tags; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.networking.v1.tags.ListTagsRequest; +import org.cloudfoundry.networking.v1.tags.ListTagsResponse; +import org.cloudfoundry.networking.v1.tags.Tag; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.networking.AbstractNetworkingApiTest; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorTagsClientTest extends AbstractNetworkingApiTest { + + private final ReactorTags tags = + new ReactorTags(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/tags").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/networking/tags/GET_response.json") + .build()) + .build()); + + this.tags + .list(ListTagsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListTagsResponse.builder() + .tag( + Tag.builder() + .id("1081ceac-f5c4-47a8-95e8-88e1e302efb5") + .tag("0001") + .build()) + .tag( + Tag.builder() + .id("308e7ef1-63f1-4a6c-978c-2e527cbb1c36") + .tag("0002") + .build()) + .tag( + Tag.builder() + .id("38f08df0-19df-4439-b4e9-61096d4301ea") + .tag("0003") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/AbstractRoutingApiTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/AbstractRoutingApiTest.java new file mode 100644 index 00000000000..8f4f8062a77 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/AbstractRoutingApiTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing; + +import org.cloudfoundry.reactor.AbstractRestTest; + +public abstract class AbstractRoutingApiTest extends AbstractRestTest {} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/routergroups/ReactorRouterGroupsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/routergroups/ReactorRouterGroupsTest.java new file mode 100644 index 00000000000..cb3edf35b8d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/routergroups/ReactorRouterGroupsTest.java @@ -0,0 +1,110 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.routergroups; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.routing.AbstractRoutingApiTest; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsRequest; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsResponse; +import org.cloudfoundry.routing.v1.routergroups.RouterGroup; +import org.cloudfoundry.routing.v1.routergroups.UpdateRouterGroupRequest; +import org.cloudfoundry.routing.v1.routergroups.UpdateRouterGroupResponse; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorRouterGroupsTest extends AbstractRoutingApiTest { + + private final ReactorRouterGroups routerGroups = + new ReactorRouterGroups( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder().method(GET).path("/v1/router_groups").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/routing/v1/routergroups/GET_response.json") + .build()) + .build()); + + this.routerGroups + .list(ListRouterGroupsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListRouterGroupsResponse.builder() + .routerGroup( + RouterGroup.builder() + .name("default-tcp") + .reservablePorts("1024-65535") + .routerGroupId("abc123") + .type("tcp") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/v1/router_groups/abc123") + .payload( + "fixtures/routing/v1/routergroups/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/routing/v1/routergroups/PUT_{id}_response.json") + .build()) + .build()); + + this.routerGroups + .update( + UpdateRouterGroupRequest.builder() + .reservablePorts("1024-65535") + .routerGroupId("abc123") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateRouterGroupResponse.builder() + .name("default-tcp") + .reservablePorts("1024-65535") + .routerGroupId("abc123") + .type("tcp") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/tcproutes/EventStreamCodecTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/tcproutes/EventStreamCodecTest.java new file mode 100644 index 00000000000..1c3693a90a8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/tcproutes/EventStreamCodecTest.java @@ -0,0 +1,199 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.tcproutes; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import org.cloudfoundry.reactor.AbstractRestTest; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Flux; +import reactor.netty.ByteBufFlux; +import reactor.netty.Connection; +import reactor.netty.http.client.HttpClientResponse; +import reactor.test.StepVerifier; + +final class EventStreamCodecTest extends AbstractRestTest { + + @Test + void allData() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "org/cloudfoundry/reactor/routing/v1/tcproutes/all-data.txt") + .build()) + .build()); + + CONNECTION_CONTEXT + .getHttpClient() + .get() + .uri(this.root.block()) + .responseConnection(EventStreamCodecTest::toEventsFlux) + .as(StepVerifier::create) + .expectNext(ServerSentEvent.builder().data("This is the first message.").build()) + .expectNext( + ServerSentEvent.builder() + .data("This is the second message, it") + .data("has two lines.") + .build()) + .expectNext(ServerSentEvent.builder().data("This is the third message.").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void colonSpacing() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "org/cloudfoundry/reactor/routing/v1/tcproutes/colon-spacing.txt") + .build()) + .build()); + + CONNECTION_CONTEXT + .getHttpClient() + .get() + .uri(this.root.block()) + .responseConnection(EventStreamCodecTest::toEventsFlux) + .as(StepVerifier::create) + .expectNext(ServerSentEvent.builder().data("test").build()) + .expectNext(ServerSentEvent.builder().data("test").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void randomColons() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "org/cloudfoundry/reactor/routing/v1/tcproutes/random-colons.txt") + .build()) + .build()); + + CONNECTION_CONTEXT + .getHttpClient() + .get() + .uri(this.root.block()) + .responseConnection(EventStreamCodecTest::toEventsFlux) + .as(StepVerifier::create) + .expectNext(ServerSentEvent.builder().data("").build()) + .expectNext(ServerSentEvent.builder().data("").data("").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void threeLines() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "org/cloudfoundry/reactor/routing/v1/tcproutes/three-lines.txt") + .build()) + .build()); + + CONNECTION_CONTEXT + .getHttpClient() + .get() + .uri(this.root.block()) + .responseConnection(EventStreamCodecTest::toEventsFlux) + .as(StepVerifier::create) + .expectNext(ServerSentEvent.builder().data("YHOO").data("+2").data("10").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void withComment() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "org/cloudfoundry/reactor/routing/v1/tcproutes/with-comment.txt") + .build()) + .build()); + + CONNECTION_CONTEXT + .getHttpClient() + .get() + .uri(this.root.block()) + .responseConnection(EventStreamCodecTest::toEventsFlux) + .as(StepVerifier::create) + .expectNext(ServerSentEvent.builder().id("1").data("first event").build()) + .expectNext(ServerSentEvent.builder().id("").data("second event").build()) + .expectNext(ServerSentEvent.builder().data(" third event").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void withEventTypes() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "org/cloudfoundry/reactor/routing/v1/tcproutes/with-event-types.txt") + .build()) + .build()); + + CONNECTION_CONTEXT + .getHttpClient() + .get() + .uri(this.root.block()) + .responseConnection(EventStreamCodecTest::toEventsFlux) + .as(StepVerifier::create) + .expectNext(ServerSentEvent.builder().eventType("add").data("73857293").build()) + .expectNext(ServerSentEvent.builder().eventType("remove").data("2153").build()) + .expectNext(ServerSentEvent.builder().eventType("add").data("113411").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static Flux toEventsFlux( + HttpClientResponse response, Connection connection) { + connection.addHandler(EventStreamCodec.createDecoder(response)); + ByteBufFlux body = connection.inbound().receive(); + + return EventStreamCodec.decode(body); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/tcproutes/ReactorTcpRoutesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/tcproutes/ReactorTcpRoutesTest.java new file mode 100644 index 00000000000..eb79fe9eac3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/routing/v1/tcproutes/ReactorTcpRoutesTest.java @@ -0,0 +1,142 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.routing.v1.tcproutes; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.routing.AbstractRoutingApiTest; +import org.cloudfoundry.routing.v1.ModificationTag; +import org.cloudfoundry.routing.v1.tcproutes.CreateTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.DeleteTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.ListTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.ListTcpRoutesResponse; +import org.cloudfoundry.routing.v1.tcproutes.TcpRoute; +import org.cloudfoundry.routing.v1.tcproutes.TcpRouteConfiguration; +import org.cloudfoundry.routing.v1.tcproutes.TcpRouteDeletion; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorTcpRoutesTest extends AbstractRoutingApiTest { + + private final ReactorTcpRoutes tcpRoutes = + new ReactorTcpRoutes( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/v1/tcp_routes/create") + .payload( + "fixtures/routing/v1/tcproutes/POST_create_request.json") + .build()) + .response(TestResponse.builder().status(OK).build()) + .build()); + + this.tcpRoutes + .create( + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp("10.1.1.12") + .backendPort(60000) + .port(5200) + .routerGroupId("xyz789") + .ttl(30) + .build()) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/v1/tcp_routes/delete") + .payload( + "fixtures/routing/v1/tcproutes/POST_delete_request.json") + .build()) + .response(TestResponse.builder().status(OK).build()) + .build()); + + this.tcpRoutes + .delete( + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendIp("10.1.1.12") + .backendPort(60000) + .port(5200) + .routerGroupId("xyz789") + .build()) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/v1/tcp_routes").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/routing/v1/tcproutes/GET_response.json") + .build()) + .build()); + + this.tcpRoutes + .list(ListTcpRoutesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListTcpRoutesResponse.builder() + .tcpRoute( + TcpRoute.builder() + .backendIp("10.1.1.12") + .backendPort(60000) + .modificationTag( + ModificationTag.builder() + .modificationTagId( + "cbdhb4e3-141d-4259-b0ac-99140e8998l0") + .index(10) + .build()) + .port(5200) + .routerGroupId("xyz789") + .ttl(30) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/AbstractUaaApiTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/AbstractUaaApiTest.java new file mode 100644 index 00000000000..bcc95caeb5a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/AbstractUaaApiTest.java @@ -0,0 +1,21 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import org.cloudfoundry.reactor.AbstractRestTest; + +public abstract class AbstractUaaApiTest extends AbstractRestTest {} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/IdentityZoneBuilderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/IdentityZoneBuilderTest.java new file mode 100644 index 00000000000..43e5ed73a81 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/IdentityZoneBuilderTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; + +import io.netty.handler.codec.http.HttpHeaders; +import org.cloudfoundry.uaa.IdentityZoned; +import org.junit.jupiter.api.Test; + +final class IdentityZoneBuilderTest { + + private final HttpHeaders outbound = mock(HttpHeaders.class); + + @Test + void augment() { + IdentityZoneBuilder.augment(this.outbound, new StubIdentityZoned()); + + verify(this.outbound).set("X-Identity-Zone-Id", "test-identity-zone-id"); + verify(this.outbound).set("X-Identity-Zone-Subdomain", "test-identity-zone-subdomain"); + } + + @Test + void augmentNotIdentityZoned() { + IdentityZoneBuilder.augment(this.outbound, new Object()); + + verifyNoInteractions(this.outbound); + } + + private static final class StubIdentityZoned implements IdentityZoned { + + @Override + public String getIdentityZoneId() { + return "test-identity-zone-id"; + } + + @Override + public String getIdentityZoneSubdomain() { + return "test-identity-zone-subdomain"; + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/ReactorUaaClientTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/ReactorUaaClientTest.java new file mode 100644 index 00000000000..85620c7464a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/ReactorUaaClientTest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.cloudfoundry.reactor.AbstractRestTest; +import org.junit.jupiter.api.Test; + +final class ReactorUaaClientTest extends AbstractRestTest { + + private final ReactorUaaClient client = + ReactorUaaClient.builder() + .connectionContext(CONNECTION_CONTEXT) + .root(this.root) + .tokenProvider(TOKEN_PROVIDER) + .build(); + + @Test + void authorizations() { + assertThat(this.client.authorizations()).isNotNull(); + } + + @Test + void clients() { + assertThat(this.client.clients()).isNotNull(); + } + + @Test + void groups() { + assertThat(this.client.groups()).isNotNull(); + } + + @Test + void identityProviders() { + assertThat(this.client.identityProviders()).isNotNull(); + } + + @Test + void identityZones() { + assertThat(this.client.identityZones()).isNotNull(); + } + + @Test + void tokens() { + assertThat(this.client.tokens()).isNotNull(); + } + + @Test + void users() { + assertThat(this.client.users()).isNotNull(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/UaaSigningKeyResolverTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/UaaSigningKeyResolverTest.java new file mode 100644 index 00000000000..ad22d5e60fb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/UaaSigningKeyResolverTest.java @@ -0,0 +1,133 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.impl.DefaultClaims; +import io.jsonwebtoken.impl.DefaultJwsHeader; +import io.jsonwebtoken.impl.security.AbstractJwk; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.PublicKey; +import java.util.Base64; +import java.util.HashMap; +import org.cloudfoundry.uaa.tokens.KeyType; +import org.cloudfoundry.uaa.tokens.ListTokenKeysRequest; +import org.cloudfoundry.uaa.tokens.ListTokenKeysResponse; +import org.cloudfoundry.uaa.tokens.TokenKey; +import org.cloudfoundry.uaa.tokens.Tokens; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; + +final class UaaSigningKeyResolverTest { + + private final Tokens tokens = mock(Tokens.class); + + private final UaaSigningKeyResolver signingKeyResolver = new UaaSigningKeyResolver(this.tokens); + + @Test + void resolveExistingKey() throws NoSuchAlgorithmException { + PublicKey publicKey = getKeyPair().getPublic(); + + when(this.tokens.listKeys(ListTokenKeysRequest.builder().build())) + .thenReturn( + Mono.just( + ListTokenKeysResponse.builder() + .key( + TokenKey.builder() + .algorithm(publicKey.getAlgorithm()) + .e("") + .id("test-key-id") + .keyType(KeyType.RSA) + .n("") + .use("") + .value(getEncoded(publicKey)) + .build()) + .build())); + + HashMap params = new HashMap<>(); + params.put(AbstractJwk.KID.getId(), "test-key-id"); + DefaultJwsHeader header = new DefaultJwsHeader(params); + Claims claims = new DefaultClaims(new HashMap<>()); + + this.signingKeyResolver.resolveSigningKey(header, claims); + assertThat(this.signingKeyResolver.resolveSigningKey(header, claims)).isNotNull(); + } + + @Test + void resolveRefreshedKey() throws NoSuchAlgorithmException { + PublicKey publicKey = getKeyPair().getPublic(); + + when(this.tokens.listKeys(ListTokenKeysRequest.builder().build())) + .thenReturn( + Mono.just( + ListTokenKeysResponse.builder() + .key( + TokenKey.builder() + .algorithm(publicKey.getAlgorithm()) + .e("") + .id("test-key-id") + .keyType(KeyType.RSA) + .n("") + .use("") + .value(getEncoded(publicKey)) + .build()) + .build())); + + HashMap params = new HashMap<>(); + params.put(AbstractJwk.KID.getId(), "test-key-id"); + DefaultJwsHeader header = new DefaultJwsHeader(params); + Claims claims = new DefaultClaims(new HashMap<>()); + + assertThat(this.signingKeyResolver.resolveSigningKey(header, claims)).isNotNull(); + } + + @Test + void resolveUnknownKey() { + assertThrows( + IllegalStateException.class, + () -> { + when(this.tokens.listKeys(ListTokenKeysRequest.builder().build())) + .thenReturn(Mono.just(ListTokenKeysResponse.builder().build())); + + HashMap params = new HashMap<>(); + params.put(AbstractJwk.KID.getId(), "test-key-id"); + DefaultJwsHeader header = new DefaultJwsHeader(params); + Claims claims = new DefaultClaims(new HashMap<>()); + + this.signingKeyResolver.resolveSigningKey(header, claims); + }); + } + + private static String getEncoded(PublicKey publicKey) { + return String.format( + "-----BEGIN PUBLIC KEY-----\n%s\n-----END PUBLIC KEY-----", + Base64.getEncoder().encodeToString(publicKey.getEncoded())); + } + + private KeyPair getKeyPair() throws NoSuchAlgorithmException { + KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); + keyPairGenerator.initialize(1024); + return keyPairGenerator.generateKeyPair(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/UsernameProviderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/UsernameProviderTest.java new file mode 100644 index 00000000000..3ec864cafcd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/UsernameProviderTest.java @@ -0,0 +1,123 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; + +import io.jsonwebtoken.Claims; +import io.jsonwebtoken.JwsHeader; +import io.jsonwebtoken.Jwts; +import io.jsonwebtoken.SignatureAlgorithm; +import io.jsonwebtoken.SigningKeyResolver; +import io.jsonwebtoken.impl.DefaultJwsHeader; +import io.jsonwebtoken.impl.security.AbstractJwk; +import java.security.KeyPair; +import java.security.KeyPairGenerator; +import java.security.NoSuchAlgorithmException; +import java.security.PrivateKey; +import java.sql.Date; +import java.time.Duration; +import java.time.Instant; +import java.util.HashMap; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class UsernameProviderTest { + + private final ConnectionContext connectionContext = mock(ConnectionContext.class); + + private final SigningKeyResolver signingKeyResolver = mock(SigningKeyResolver.class); + + private final TokenProvider tokenProvider = mock(TokenProvider.class); + + private final UsernameProvider usernameProvider = + new UsernameProvider( + this.connectionContext, this.signingKeyResolver, this.tokenProvider); + + @SuppressWarnings("unchecked") + @Test + void getInvalidToken() throws NoSuchAlgorithmException { + KeyPair keyPair = getKeyPair(); + when(this.signingKeyResolver.resolveSigningKey(any(JwsHeader.class), any(Claims.class))) + .thenReturn(keyPair.getPublic()); + + String invalidToken = + String.format( + "bearer %s", + getToken(keyPair.getPrivate(), Instant.now().minus(Duration.ofHours(1)))); + String validToken = + String.format( + "bearer %s", + getToken(keyPair.getPrivate(), Instant.now().plus(Duration.ofHours(1)))); + when(this.tokenProvider.getToken(this.connectionContext)) + .thenReturn(Mono.just(invalidToken), Mono.just(validToken)); + + this.usernameProvider + .get() + .as(StepVerifier::create) + .expectNext("test-username") + .expectComplete() + .verify(Duration.ofSeconds(1)); + + verify(this.tokenProvider).invalidate(this.connectionContext); + } + + @Test + void getValidToken() throws NoSuchAlgorithmException { + KeyPair keyPair = getKeyPair(); + when(this.signingKeyResolver.resolveSigningKey(any(JwsHeader.class), any(Claims.class))) + .thenReturn(keyPair.getPublic()); + + String token = + String.format( + "bearer %s", + getToken(keyPair.getPrivate(), Instant.now().plus(Duration.ofHours(1)))); + when(this.tokenProvider.getToken(this.connectionContext)).thenReturn(Mono.just(token)); + + this.usernameProvider + .get() + .as(StepVerifier::create) + .expectNext("test-username") + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @SuppressWarnings("unchecked") + private static String getToken(PrivateKey privateKey, Instant expiration) { + HashMap params = new HashMap<>(); + params.put(AbstractJwk.KID.getId(), "test-key-id"); + DefaultJwsHeader header = new DefaultJwsHeader(params); + return Jwts.builder() + .setHeader(header) + .signWith(privateKey, SignatureAlgorithm.RS256) + .claim("user_name", "test-username") + .setExpiration(Date.from(expiration)) + .compact(); + } + + private KeyPair getKeyPair() throws NoSuchAlgorithmException { + KeyPairGenerator keyPairGenerator = KeyPairGenerator.getInstance("RSA"); + keyPairGenerator.initialize(2048); + return keyPairGenerator.generateKeyPair(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/VersionBuilderTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/VersionBuilderTest.java new file mode 100644 index 00000000000..f73cc6734a6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/VersionBuilderTest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa; + +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; + +import io.netty.handler.codec.http.HttpHeaders; +import org.cloudfoundry.uaa.Versioned; +import org.junit.jupiter.api.Test; + +final class VersionBuilderTest { + + private final HttpHeaders outbound = mock(HttpHeaders.class); + + @Test + void augment() { + VersionBuilder.augment(this.outbound, new StubVersioned("test-version")); + verify(this.outbound).set("If-Match", "test-version"); + } + + @Test + void augmentNotVersioned() { + VersionBuilder.augment(this.outbound, new Object()); + verifyNoInteractions(this.outbound); + } + + @Test + void augmentNullVersion() { + VersionBuilder.augment(this.outbound, new StubVersioned(null)); + verifyNoInteractions(this.outbound); + } + + private static final class StubVersioned implements Versioned { + + private final String version; + + private StubVersioned(String version) { + this.version = version; + } + + @Override + public String getVersion() { + return this.version; + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizationsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizationsTest.java new file mode 100644 index 00000000000..6c526858467 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/authorizations/ReactorAuthorizationsTest.java @@ -0,0 +1,375 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.authorizations; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpResponseStatus.FOUND; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import java.util.Locale; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantApiRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantBrowserRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantHybridRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByImplicitGrantBrowserRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithAuthorizationCodeGrantRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithIdTokenRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithImplicitGrantRequest; +import org.cloudfoundry.uaa.authorizations.GetOpenIdProviderConfigurationRequest; +import org.cloudfoundry.uaa.authorizations.GetOpenIdProviderConfigurationResponse; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorAuthorizationsTest extends AbstractUaaApiTest { + + private final ReactorAuthorizations authorizations = + new ReactorAuthorizations( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void authorizeByAuthorizationCodeGrantApi() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=login&redirect_uri=https%3A%2F%2Fuaa.cloudfoundry.com%2Fredirect%2Fcf&state=v4LpFF&response_type=code") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header( + "Location", + "https://uaa.cloudfoundry.com/redirect/cf?code=O6A5eT&state=v4LpFF") + .build()) + .build()); + + this.authorizations + .authorizationCodeGrantApi( + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .clientId("login") + .redirectUri("https://uaa.cloudfoundry.com/redirect/cf") + .state("v4LpFF") + .build()) + .as(StepVerifier::create) + .expectNext("O6A5eT") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void authorizeByAuthorizationCodeGrantBrowser() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=login&redirect_uri=https%3A%2F%2Fuaa.cloudfoundry.com%2Fredirect%2Fcf&scope=openid%20oauth.approvals&response_type=code") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header("Location", "http://redirect.to/login") + .build()) + .build()); + + this.authorizations + .authorizationCodeGrantBrowser( + AuthorizeByAuthorizationCodeGrantBrowserRequest.builder() + .clientId("login") + .redirectUri("https://uaa.cloudfoundry.com/redirect/cf") + .scope("openid") + .scope("oauth.approvals") + .build()) + .as(StepVerifier::create) + .expectNext("http://redirect.to/login") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void authorizeByAuthorizationCodeGrantHybrid() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=app&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapp%2F&scope=openid&response_type=code%20id_token") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header( + "Location", + "http://localhost:8080/app/#token_type=bearer&" + + "id_token=eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiI3ZmQyZDAyNi0yNzA0LTQ5MjItODA4YS1lZThiZGFhY2RkMjciLCJ1c2VyX25hbWUiOiJtYXJpc3NhIiwib3Jp" + + "Z2luIjoidWFhIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3VhYS9vYXV0aC90b2tlbiIsImNsaWVudF9pZCI6ImFwcCIsImF1ZCI6WyJhcHAiXSwiemlkIjoidWFhIiwidXNlcl9pZCI6IjdmZDJkMDI2LTI3MDQtNDkyMi04" + + "MDhhLWVlOGJkYWFjZGQyNyIsImF6cCI6ImFwcCIsInNjb3BlIjpbIm9wZW5pZCJdLCJleHAiOjE0NzQ5NjY2ODAsImlhdCI6MTQ3NDkyMzQ4MCwianRpIjoiOGRmMjBhNDZjOThjNGYxNGIzOTBjMTdlZWU4YTM1NmYiLCJlbWFpbCI6" + + "Im1hcmlzc2FAdGVzdC5vcmciLCJyZXZfc2lnIjoiOTE3NjM3NTUiLCJjaWQiOiJhcHAifQ.YvgEJn1zG30IO_JL5iEY0ytT5rQIPscrAuZa0SBrU0I&" + + "code=8wcTGEtsLK&" + + "expires_in=43199&jti=8df20a46c98c4f14b390c17eee8a356f") + .build()) + .build()); + + this.authorizations + .authorizationCodeGrantHybrid( + AuthorizeByAuthorizationCodeGrantHybridRequest.builder() + .clientId("app") + .redirectUri("http://localhost:8080/app/") + .scope("openid") + .build()) + .as(StepVerifier::create) + .expectNext( + "http://localhost:8080/app/#token_type=bearer&" + + "id_token=eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiI3ZmQyZDAyNi0yNzA0LTQ5MjItODA4YS1lZThiZGFhY2RkMjciLCJ1c2VyX25hbWUiOiJtYXJpc3NhIiwib3JpZ2lu" + + "IjoidWFhIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3VhYS9vYXV0aC90b2tlbiIsImNsaWVudF9pZCI6ImFwcCIsImF1ZCI6WyJhcHAiXSwiemlkIjoidWFhIiwidXNlcl9pZCI6IjdmZDJkMDI2LTI3MDQtNDkyMi04MDhhLWVl" + + "OGJkYWFjZGQyNyIsImF6cCI6ImFwcCIsInNjb3BlIjpbIm9wZW5pZCJdLCJleHAiOjE0NzQ5NjY2ODAsImlhdCI6MTQ3NDkyMzQ4MCwianRpIjoiOGRmMjBhNDZjOThjNGYxNGIzOTBjMTdlZWU4YTM1NmYiLCJlbWFpbCI6Im1hcmlzc2FA" + + "dGVzdC5vcmciLCJyZXZfc2lnIjoiOTE3NjM3NTUiLCJjaWQiOiJhcHAifQ.YvgEJn1zG30IO_JL5iEY0ytT5rQIPscrAuZa0SBrU0I&" + + "code=8wcTGEtsLK&" + + "expires_in=43199&jti=8df20a46c98c4f14b390c17eee8a356f") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void authorizeByImplicitGrantBrowser() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=app&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapp%2F&scope=openid&response_type=token") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header( + "Location", + "http://localhost:8080/app/#token_type=bearer&" + + "access_token=eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiJlNzI4Y2UxZjUyZjE0NTU2YjViNGNiOThkMmY1ZmRiZCIsInN1YiI6IjIzOTJhMzIwLTQzZWUtNDV" + + "expires_in=43199&" + + "jti=e728ce1f52f14556b5b4cb98d2f5fdbd") + .build()) + .build()); + + this.authorizations + .implicitGrantBrowser( + AuthorizeByImplicitGrantBrowserRequest.builder() + .clientId("app") + .redirectUri("http://localhost:8080/app/") + .scope("openid") + .build()) + .as(StepVerifier::create) + .expectNext( + "http://localhost:8080/app/#token_type=bearer&" + + "access_token=eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJqdGkiOiJlNzI4Y2UxZjUyZjE0NTU2YjViNGNiOThkMmY1ZmRiZCIsInN1YiI6IjIzOTJhMzIwLTQzZWUtNDV" + + "expires_in=43199&jti=e728ce1f52f14556b5b4cb98d2f5fdbd") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void authorizeByOpenIdWithAuthorizationCodeGrant() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=app&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapp%2F&scope=openid&response_type=code%20id_token") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header("Location", "http://redirect.to/login") + .build()) + .build()); + + this.authorizations + .openIdWithAuthorizationCodeAndIdToken( + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.builder() + .clientId("app") + .redirectUri("http://localhost:8080/app/") + .scope("openid") + .build()) + .as(StepVerifier::create) + .expectNext("http://redirect.to/login") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void authorizeByOpenIdWithToken() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=app&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapp%2F&scope=openid&response_type=id_token") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header( + "Location", + "http://localhost:8080/app/#token_type=bearer" + + "&id_token=eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ.eyJzdWIiOiIyMzkyYTMyMC00M2VlLTQ1ZTgtODdhNC1iYTkzYTIwMTZmODciLCJ1c2VyX25hbWUiOiJtYXJpc3NhIiw" + + "ib3JpZ2luIjoidWFhIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3VhYS9vYXV0aC90b2tlbiIsImNsaWVudF9pZCI6ImFwcCIsImF1ZCI6WyJhcHAiXSwiemlkIjoidWFhIiwidXNlcl9pZCI6IjIzOTJhMzIwLTQzZWU" + + "tNDVlOC04N2E0LWJhOTNhMjAxNmY4NyIsImF6cCI6ImFwcCIsInNjb3BlIjpbIm9wZW5pZCJdLCJleHAiOjE0NjYwNzg0OTAsImlhdCI6MTQ2NjAzNTI5MCwianRpIjoiM2NjNDg2NmYzMWRjNGIyMThkMTdiZDNhMzE4MjhmNWU" + + "iLCJlbWFpbCI6Im1hcmlzc2FAdGVzdC5vcmciLCJyZXZfc2lnIjoiMzYyNzRiZmMiLCJjaWQiOiJhcHAifQ.zR0b0TVFY8VrxAXLve2VRZvwb9HWMtbD79KSHwgr1wo" + + "&expires_in=43199" + + "&jti=3cc4866f31dc4b218d17bd3a31828f5e") + .build()) + .build()); + + this.authorizations + .openIdWithIdToken( + AuthorizeByOpenIdWithIdTokenRequest.builder() + .clientId("app") + .redirectUri("http://localhost:8080/app/") + .scope("openid") + .build()) + .as(StepVerifier::create) + .expectNext( + "http://localhost:8080/app/#token_type=bearer" + + "&id_token=eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLCJ0eXAiOiJKV1QifQ" + + ".eyJzdWIiOiIyMzkyYTMyMC00M2VlLTQ1ZTgtODdhNC1iYTkzYTIwMTZmODciLCJ1c2VyX25hbWUiOiJtYXJpc3NhIiwib3JpZ2l" + + "uIjoidWFhIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MDgwL3VhYS9vYXV0aC90b2tlbiIsImNsaWVudF9pZCI6ImFwcCIsImF1ZCI6WyJhcHAiXSwiemlkIjoidWFhIiwidXNlcl9pZCI6IjIzOTJhMzIwLTQzZWUtNDVlOC04N2E0LWJ" + + "hOTNhMjAxNmY4NyIsImF6cCI6ImFwcCIsInNjb3BlIjpbIm9wZW5pZCJdLCJleHAiOjE0NjYwNzg0OTAsImlhdCI6MTQ2NjAzNTI5MCwianRpIjoiM2NjNDg2NmYzMWRjNGIyMThkMTdiZDNhMzE4MjhmNWUiLCJlbWFpbCI6Im1hcmlzc2F" + + "AdGVzdC5vcmciLCJyZXZfc2lnIjoiMzYyNzRiZmMiLCJjaWQiOiJhcHAifQ.zR0b0TVFY8VrxAXLve2VRZvwb9HWMtbD79KSHwgr1wo" + + "&expires_in=43199&jti=3cc4866f31dc4b218d17bd3a31828f5e") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void authorizeByOpenIdWithimplicitGrant() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/authorize?client_id=app&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fapp%2F&scope=openid&response_type=token%20id_token") + .build()) + .response( + TestResponse.builder() + .status(FOUND) + .header("Location", "http://redirect.to/login") + .build()) + .build()); + + this.authorizations + .openIdWithTokenAndIdToken( + AuthorizeByOpenIdWithImplicitGrantRequest.builder() + .clientId("app") + .redirectUri("http://localhost:8080/app/") + .scope("openid") + .build()) + .as(StepVerifier::create) + .expectNext("http://redirect.to/login") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getOpenIdProviderConfigurationRequest() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/.well-known/openid-configuration") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/authorizations/GET_response.json") + .build()) + .build()); + + this.authorizations + .getOpenIdProviderConfiguration( + GetOpenIdProviderConfigurationRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + GetOpenIdProviderConfigurationResponse.builder() + .authorizationEndpoint("http://localhost/oauth/authorize") + .supportedClaims( + "sub", + "user_name", + "origin", + "iss", + "auth_time", + "amr", + "acr", + "client_id", + "aud", + "zid", + "grant_type", + "user_id", + "azp", + "scope", + "exp", + "iat", + "jti", + "rev_sig", + "cid", + "given_name", + "family_name", + "phone_number", + "email") + .claimsParameterSupported(false) + .supportedClaimType("normal") + .issuer("http://localhost:8080/uaa/oauth/token") + .javaWebKeySetEndpoint("http://localhost/token_keys") + .serviceDocumentation("http://docs.cloudfoundry.org/api/uaa/") + .supportedIdTokenEncryptionAlgorithm("none") + .supportedIdTokenSigningAlgorithms("RS256", "HS256") + .supportedSubjectType("public") + .supportedResponseTypes( + "code", "code id_token", "id_token", "token id_token") + .supportedScopes( + "openid", + "profile", + "email", + "phone", + "roles", + "user_attributes") + .supportedTokenEndpointAuthorizationMethods( + "client_secret_basic", "client_secret_post") + .supportedTokenEndpointAuthorizationSigningAlgorithms( + "RS256", "HS256") + .supportedUiLocale(Locale.US) + .tokenEndpoint("http://localhost/oauth/token") + .userInfoEndpoint("http://localhost/userinfo") + .endSessionEndpoint("http://localhost/logout.do") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/clients/ReactorClientsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/clients/ReactorClientsTest.java new file mode 100644 index 00000000000..c36ac4f4434 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/clients/ReactorClientsTest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.clients; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.uaa.tokens.GrantType.AUTHORIZATION_CODE; +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.cloudfoundry.uaa.tokens.GrantType.REFRESH_TOKEN; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.SortOrder; +import org.cloudfoundry.uaa.clients.ActionClient; +import org.cloudfoundry.uaa.clients.BatchChangeSecretRequest; +import org.cloudfoundry.uaa.clients.BatchChangeSecretResponse; +import org.cloudfoundry.uaa.clients.BatchCreateClientsRequest; +import org.cloudfoundry.uaa.clients.BatchCreateClientsResponse; +import org.cloudfoundry.uaa.clients.BatchDeleteClientsRequest; +import org.cloudfoundry.uaa.clients.BatchDeleteClientsResponse; +import org.cloudfoundry.uaa.clients.BatchUpdateClientsRequest; +import org.cloudfoundry.uaa.clients.BatchUpdateClientsResponse; +import org.cloudfoundry.uaa.clients.ChangeSecret; +import org.cloudfoundry.uaa.clients.ChangeSecretRequest; +import org.cloudfoundry.uaa.clients.ChangeSecretResponse; +import org.cloudfoundry.uaa.clients.Client; +import org.cloudfoundry.uaa.clients.CreateClient; +import org.cloudfoundry.uaa.clients.CreateClientAction; +import org.cloudfoundry.uaa.clients.CreateClientRequest; +import org.cloudfoundry.uaa.clients.CreateClientResponse; +import org.cloudfoundry.uaa.clients.DeleteClientAction; +import org.cloudfoundry.uaa.clients.DeleteClientRequest; +import org.cloudfoundry.uaa.clients.DeleteClientResponse; +import org.cloudfoundry.uaa.clients.GetClientRequest; +import org.cloudfoundry.uaa.clients.GetClientResponse; +import org.cloudfoundry.uaa.clients.GetMetadataRequest; +import org.cloudfoundry.uaa.clients.GetMetadataResponse; +import org.cloudfoundry.uaa.clients.ListClientsRequest; +import org.cloudfoundry.uaa.clients.ListClientsResponse; +import org.cloudfoundry.uaa.clients.ListMetadatasRequest; +import org.cloudfoundry.uaa.clients.ListMetadatasResponse; +import org.cloudfoundry.uaa.clients.Metadata; +import org.cloudfoundry.uaa.clients.MixedActionsRequest; +import org.cloudfoundry.uaa.clients.MixedActionsResponse; +import org.cloudfoundry.uaa.clients.UpdateClient; +import org.cloudfoundry.uaa.clients.UpdateClientRequest; +import org.cloudfoundry.uaa.clients.UpdateClientResponse; +import org.cloudfoundry.uaa.clients.UpdateMetadataRequest; +import org.cloudfoundry.uaa.clients.UpdateMetadataResponse; +import org.cloudfoundry.uaa.clients.UpdateSecretAction; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorClientsTest extends AbstractUaaApiTest { + + private final ReactorClients clients = + new ReactorClients( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void batchChangeSecret() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/oauth/clients/tx/secret") + .payload("fixtures/uaa/clients/POST_tx_secret_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/uaa/clients/POST_tx_secret_response.json") + .build()) + .build()); + + this.clients + .batchChangeSecret( + BatchChangeSecretRequest.builder() + .changeSecret( + ChangeSecret.builder() + .clientId("Zkgt1Y") + .secret("new_secret") + .build()) + .changeSecret( + ChangeSecret.builder() + .clientId("Xm43aH") + .secret("new_secret") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + BatchChangeSecretResponse.builder() + .client( + Client.builder() + .accessTokenValidity(2700L) + .allowedProviders("uaa", "ldap", "my-saml-provider") + .approvalsDeleted(true) + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("Zkgt1Y") + .lastModified(1474923482301L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .refreshTokenValidity(7000L) + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("uHICvG") + .build()) + .client( + Client.builder() + .accessTokenValidity(2700L) + .allowedProviders("uaa", "ldap", "my-saml-provider") + .approvalsDeleted(true) + .authorities( + "clients.read", + "new.authority", + "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("Xm43aH") + .lastModified(1474923482302L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .refreshTokenValidity(7000L) + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("WjlWvu") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void batchCreate() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/oauth/clients/tx") + .payload("fixtures/uaa/clients/POST_tx_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/uaa/clients/POST_tx_response.json") + .build()) + .build()); + + this.clients + .batchCreate( + BatchCreateClientsRequest.builder() + .client( + CreateClient.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("14pnUs") + .clientSecret("secret") + .name("My Client Name") + .redirectUriPatterns( + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*") + .scopes("clients.read", "clients.write") + .tokenSalt("erRsWH") + .build()) + .client( + CreateClient.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("0Tgnfy") + .clientSecret("secret") + .name("My Client Name") + .redirectUriPatterns( + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*") + .scopes("clients.read", "clients.write") + .tokenSalt("4wMTwN") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + BatchCreateClientsResponse.builder() + .client( + Client.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("14pnUs") + .lastModified(1468364444218L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("erRsWH") + .build()) + .client( + Client.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("0Tgnfy") + .lastModified(1468364444318L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("4wMTwN") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void batchDelete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/oauth/clients/tx/delete") + .payload("fixtures/uaa/clients/POST_tx_delete_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/clients/POST_tx_delete_response.json") + .build()) + .build()); + + this.clients + .batchDelete( + BatchDeleteClientsRequest.builder().clientIds("14pnUs", "qECLyr").build()) + .as(StepVerifier::create) + .expectNext( + BatchDeleteClientsResponse.builder() + .client( + Client.builder() + .approvalsDeleted(true) + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("14pnUs") + .lastModified(1468364444461L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("erRsWH") + .build()) + .client( + Client.builder() + .approvalsDeleted(true) + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("qECLyr") + .lastModified(1468364444868L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("48TIsq") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void batchUpdate() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/oauth/clients/tx") + .payload("fixtures/uaa/clients/PUT_tx_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/PUT_tx_response.json") + .build()) + .build()); + + this.clients + .batchUpdate( + BatchUpdateClientsRequest.builder() + .client( + UpdateClient.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("14pnUs") + .name("My Client Name") + .redirectUriPatterns( + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*") + .scopes("clients.read", "clients.write") + .tokenSalt("erRsWH") + .build()) + .client( + UpdateClient.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities( + "clients.read", + "new.authority", + "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("0Tgnfy") + .name("My Client Name") + .redirectUriPatterns( + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*") + .scopes("clients.read", "clients.write") + .tokenSalt("4wMTwN") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + BatchUpdateClientsResponse.builder() + .client( + Client.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("14pnUs") + .lastModified(1468364444218L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("erRsWH") + .build()) + .client( + Client.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities( + "clients.read", + "new.authority", + "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("0Tgnfy") + .lastModified(1468364444318L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("4wMTwN") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void changeSecrets() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/oauth/clients/BMGkqk/secret") + .payload( + "fixtures/uaa/clients/PUT_{id}_secret_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/clients/PUT_{id}_secret_response.json") + .build()) + .build()); + + this.clients + .changeSecret( + ChangeSecretRequest.builder() + .clientId("BMGkqk") + .secret("new_secret") + .build()) + .as(StepVerifier::create) + .expectNext( + ChangeSecretResponse.builder() + .message("secret updated") + .status("ok") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/oauth/clients") + .payload("fixtures/uaa/clients/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/uaa/clients/POST_response.json") + .build()) + .build()); + + this.clients + .create( + CreateClientRequest.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("aPq3I1") + .clientSecret("secret") + .name("My Client Name") + .redirectUriPatterns( + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*") + .scopes("clients.read", "clients.write") + .tokenSalt("hRZ21X") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateClientResponse.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("aPq3I1") + .lastModified(1468364445109L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("hRZ21X") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/oauth/clients/test-client-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/DELETE_{id}_response.json") + .build()) + .build()); + + this.clients + .delete(DeleteClientRequest.builder().clientId("test-client-id").build()) + .as(StepVerifier::create) + .expectNext( + DeleteClientResponse.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("Gieovr") + .lastModified(1468364443957L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("a4mzKu") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deserialize() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/oauth/clients").build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/clients/GET_response_deserialize.json") + .build()) + .build()); + + this.clients + .list(ListClientsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListClientsResponse.builder() + .resource( + Client.builder() + .action("none") + .authority("uaa.none") + .authorizedGrantTypes( + AUTHORIZATION_CODE, REFRESH_TOKEN) + .autoApprove("true") + .clientId("ssh-proxy") + .lastModified(1469112324000L) + .redirectUriPattern("/login") + .resourceId("none") + .scopes( + "openid", + "cloud_controller.read", + "cloud_controller.write") + .build()) + .resource( + Client.builder() + .action("none") + .authorities( + "routing.routes.write", + "routing.routes.read") + .authorizedGrantTypes( + CLIENT_CREDENTIALS, REFRESH_TOKEN) + .autoApproves( + "routing.routes.write", + "routing.routes.read") + .clientId("tcp_emitter") + .lastModified(1469112324000L) + .resourceId("none") + .scope("uaa.none") + .build()) + .startIndex(1) + .itemsPerPage(2) + .totalResults(2) + .schema("http://cloudfoundry.org/schema/scim/oauth-clients-1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/oauth/clients/test-client-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/GET_{id}_response.json") + .build()) + .build()); + + this.clients + .get(GetClientRequest.builder().clientId("test-client-id").build()) + .as(StepVerifier::create) + .expectNext( + GetClientResponse.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("4Z3t1r") + .lastModified(1468364445592L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("mr80UZ") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getMetadata() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/oauth/clients/P4vuAaSe/meta") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/GET_{id}_meta_response.json") + .build()) + .build()); + + this.clients + .getMetadata(GetMetadataRequest.builder().clientId("P4vuAaSe").build()) + .as(StepVerifier::create) + .expectNext( + GetMetadataResponse.builder() + .appIcon("aWNvbiBmb3IgY2xpZW50IDQ=") + .appLaunchUrl("http://myloginpage.com") + .clientId("P4vuAaSe") + .showOnHomePage(true) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/oauth/clients?count=10&filter=client_id%2Beq%2B%22EGgNW3%22&sortBy=client_id&sortOrder=descending&startIndex=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/GET_response.json") + .build()) + .build()); + + this.clients + .list( + ListClientsRequest.builder() + .count(10) + .filter("client_id+eq+\"EGgNW3\"") + .sortBy("client_id") + .sortOrder(SortOrder.DESCENDING) + .startIndex(1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListClientsResponse.builder() + .resource( + Client.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("EGgNW3") + .lastModified(1468364445334L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("7uDPJX") + .build()) + .startIndex(1) + .itemsPerPage(1) + .totalResults(1) + .schema("http://cloudfoundry.org/schema/scim/oauth-clients-1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listMetadatas() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/oauth/clients/meta") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/GET_meta_response.json") + .build()) + .build()); + + this.clients + .listMetadatas(ListMetadatasRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListMetadatasResponse.builder() + .metadata( + Metadata.builder() + .appIcon("Y2xpZW50IDMgaWNvbg==") + .appLaunchUrl("http://client3.com/app") + .clientId("9134O7y4") + .showOnHomePage(true) + .build()) + .metadata( + Metadata.builder() + .appIcon("") + .appLaunchUrl("http://changed.app.launch/url") + .clientId("RpFRZpY3") + .showOnHomePage(false) + .build()) + .metadata( + Metadata.builder() + .appIcon("aWNvbiBmb3IgY2xpZW50IDQ=") + .appLaunchUrl("http://client4.com/app") + .clientId("ewegZo0R") + .showOnHomePage(false) + .build()) + .metadata( + Metadata.builder() + .appIcon("aWNvbiBmb3IgY2xpZW50IDQ=") + .appLaunchUrl("http://myloginpage.com") + .clientId("lqhK1n8q") + .showOnHomePage(true) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mixedActions() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/oauth/clients/tx/modify") + .payload("fixtures/uaa/clients/POST_tx_modify_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/clients/POST_tx_modify_response.json") + .build()) + .build()); + + this.clients + .mixedActions( + MixedActionsRequest.builder() + .action( + UpdateSecretAction.builder() + .clientId("Zkgt1Y") + .secret("new_secret") + .build()) + .action(DeleteClientAction.builder().clientId("Xm43aH").build()) + .action( + CreateClientAction.builder() + .accessTokenValidity(2700L) + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("tlA1z5") + .clientSecret("secret") + .name("My Client Name") + .redirectUriPatterns( + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*") + .resourceIds() + .refreshTokenValidity(7000L) + .scopes("clients.read", "clients.write") + .tokenSalt("UpzrHR") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + MixedActionsResponse.builder() + .client( + ActionClient.builder() + .action("secret") + .approvalsDeleted(false) + .clientId("Zkgt1Y") + .build()) + .client( + ActionClient.builder() + .accessTokenValidity(2700L) + .action("delete") + .allowedProviders("uaa", "ldap", "my-saml-provider") + .approvalsDeleted(true) + .authorities( + "clients.read", + "new.authority", + "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("Xm43aH") + .lastModified(1474923482302L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .refreshTokenValidity(7000L) + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("WjlWvu") + .build()) + .client( + ActionClient.builder() + .accessTokenValidity(2700L) + .action("add") + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("true") + .clientId("tlA1z5") + .lastModified(1474923482727L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .refreshTokenValidity(7000L) + .resourceId("none") + .scopes("clients.read", "clients.write") + .tokenSalt("UpzrHR") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/oauth/clients/55pTMX") + .payload("fixtures/uaa/clients/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/PUT_{id}_response.json") + .build()) + .build()); + + this.clients + .update( + UpdateClientRequest.builder() + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("clients.autoapprove") + .clientId("55pTMX") + .scopes("clients.new", "clients.autoapprove") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateClientResponse.builder() + .allowedProviders("uaa", "ldap", "my-saml-provider") + .authorities("clients.read", "clients.write") + .authorizedGrantType(CLIENT_CREDENTIALS) + .autoApprove("clients.autoapprove") + .clientId("55pTMX") + .lastModified(1468364443857L) + .name("My Client Name") + .redirectUriPatterns( + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com") + .resourceId("none") + .scopes("clients.new", "clients.autoapprove") + .tokenSalt("8mwCEy") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateMetadata() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/oauth/clients/RpFRZpY3/meta") + .payload("fixtures/uaa/clients/PUT_{id}_meta_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/clients/PUT_{id}_meta_response.json") + .build()) + .build()); + + this.clients + .updateMetadata( + UpdateMetadataRequest.builder() + .appLaunchUrl("http://changed.app.launch/url") + .clientId("RpFRZpY3") + .showOnHomePage(false) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateMetadataResponse.builder() + .appLaunchUrl("http://changed.app.launch/url") + .appIcon("") + .clientId("RpFRZpY3") + .showOnHomePage(false) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/groups/ReactorGroupsTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/groups/ReactorGroupsTest.java new file mode 100644 index 00000000000..2275afcccde --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/groups/ReactorGroupsTest.java @@ -0,0 +1,736 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.groups; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.uaa.SortOrder.ASCENDING; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.Metadata; +import org.cloudfoundry.uaa.groups.AddMemberRequest; +import org.cloudfoundry.uaa.groups.AddMemberResponse; +import org.cloudfoundry.uaa.groups.CheckMembershipRequest; +import org.cloudfoundry.uaa.groups.CheckMembershipResponse; +import org.cloudfoundry.uaa.groups.CreateGroupRequest; +import org.cloudfoundry.uaa.groups.CreateGroupResponse; +import org.cloudfoundry.uaa.groups.DeleteGroupRequest; +import org.cloudfoundry.uaa.groups.DeleteGroupResponse; +import org.cloudfoundry.uaa.groups.ExternalGroupResource; +import org.cloudfoundry.uaa.groups.GetGroupRequest; +import org.cloudfoundry.uaa.groups.GetGroupResponse; +import org.cloudfoundry.uaa.groups.Group; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsRequest; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsResponse; +import org.cloudfoundry.uaa.groups.ListGroupsRequest; +import org.cloudfoundry.uaa.groups.ListGroupsResponse; +import org.cloudfoundry.uaa.groups.ListMembersRequest; +import org.cloudfoundry.uaa.groups.ListMembersResponse; +import org.cloudfoundry.uaa.groups.MapExternalGroupRequest; +import org.cloudfoundry.uaa.groups.MapExternalGroupResponse; +import org.cloudfoundry.uaa.groups.Member; +import org.cloudfoundry.uaa.groups.MemberSummary; +import org.cloudfoundry.uaa.groups.MemberType; +import org.cloudfoundry.uaa.groups.RemoveMemberRequest; +import org.cloudfoundry.uaa.groups.RemoveMemberResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdResponse; +import org.cloudfoundry.uaa.groups.UpdateGroupRequest; +import org.cloudfoundry.uaa.groups.UpdateGroupResponse; +import org.cloudfoundry.uaa.groups.UserEntity; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.Meta; +import org.cloudfoundry.uaa.users.Name; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorGroupsTest extends AbstractUaaApiTest { + + private final ReactorGroups groups = + new ReactorGroups( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void addMember() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/Groups/test-group-id/members") + .payload( + "fixtures/uaa/groups/POST_{id}_members_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/uaa/groups/POST_{id}_members_response.json") + .build()) + .build()); + + this.groups + .addMember( + AddMemberRequest.builder() + .groupId("test-group-id") + .origin("uaa") + .type(MemberType.USER) + .memberId("40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .build()) + .as(StepVerifier::create) + .expectNext( + AddMemberResponse.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void checkMember() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/Groups/test-group-id/members/test-member-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/groups/GET_{id}_members_{id}_response.json") + .build()) + .build()); + + this.groups + .checkMembership( + CheckMembershipRequest.builder() + .groupId("test-group-id") + .memberId("test-member-id") + .build()) + .as(StepVerifier::create) + .expectNext( + CheckMembershipResponse.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("test-member-id") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .header("X-Identity-Zone-Id", "uaa") + .method(POST) + .path("/Groups") + .payload("fixtures/uaa/groups/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/uaa/groups/POST_response.json") + .build()) + .build()); + + this.groups + .create( + CreateGroupRequest.builder() + .description("the cool group") + .displayName("Cool Group Name") + .identityZoneId("uaa") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("f0e6a061-6e3a-4be9-ace5-142ee24e20b7") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateGroupResponse.builder() + .id("46081184-7ca9-453d-9bf8-74da7113bec6") + .metadata( + Metadata.builder() + .created("2016-06-03T17:59:30.527Z") + .lastModified("2016-06-03T17:59:30.527Z") + .version(0) + .build()) + .description("the cool group") + .displayName("Cool Group Name") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("f0e6a061-6e3a-4be9-ace5-142ee24e20b7") + .build()) + .schema("urn:scim:schemas:core:1.0") + .zoneId("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .header("If-Match", "*") + .method(DELETE) + .path("/Groups/test-group-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/groups/DELETE_{id}_response.json") + .build()) + .build()); + + this.groups + .delete(DeleteGroupRequest.builder().groupId("test-group-id").version("*").build()) + .as(StepVerifier::create) + .expectNext( + DeleteGroupResponse.builder() + .id("test-group-id") + .metadata( + Metadata.builder() + .created("2016-06-03T17:59:30.527Z") + .lastModified("2016-06-03T17:59:30.561Z") + .version(1) + .build()) + .description("the cool group") + .displayName("Cooler Group Name for Delete") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("f0e6a061-6e3a-4be9-ace5-142ee24e20b7") + .build()) + .schema("urn:scim:schemas:core:1.0") + .zoneId("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/Groups/test-group-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/groups/GET_{id}_response.json") + .build()) + .build()); + + this.groups + .get(GetGroupRequest.builder().groupId("test-group-id").build()) + .as(StepVerifier::create) + .expectNext( + GetGroupResponse.builder() + .id("test-group-id") + .metadata( + Metadata.builder() + .created("2016-06-03T17:59:30.527Z") + .lastModified("2016-06-03T17:59:30.561Z") + .version(1) + .build()) + .description("the cool group") + .displayName("Cooler Group Name for Retrieve") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("f0e6a061-6e3a-4be9-ace5-142ee24e20b7") + .build()) + .schema("urn:scim:schemas:core:1.0") + .zoneId("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/Groups?count=50&filter=id%2Beq%2B%22f87c557a-8ddc-43d3-98fb-e420ebc7f0f1%22%2Bor%2BdisplayName%2Beq%2B%22Cooler%20Group%20Name%20for%20List%22" + + "&sortBy=email&sortOrder=ascending&startIndex=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/groups/GET_response.json") + .build()) + .build()); + + this.groups + .list( + ListGroupsRequest.builder() + .filter( + "id+eq+\"f87c557a-8ddc-43d3-98fb-e420ebc7f0f1\"+or+displayName+eq+\"Cooler" + + " Group Name for List\"") + .count(50) + .startIndex(1) + .sortBy("email") + .sortOrder(ASCENDING) + .build()) + .as(StepVerifier::create) + .expectNext( + ListGroupsResponse.builder() + .resource( + Group.builder() + .id("f87c557a-8ddc-43d3-98fb-e420ebc7f0f1") + .metadata( + Metadata.builder() + .created("2016-06-16T00:01:41.692Z") + .lastModified( + "2016-06-16T00:01:41.728Z") + .version(1) + .build()) + .description("the cool group") + .displayName("Cooler Group Name for List") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId( + "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .build()) + .schema("urn:scim:schemas:core:1.0") + .zoneId("uaa") + .build()) + .startIndex(1) + .itemsPerPage(50) + .totalResults(1) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listExternalGroupMappings() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/Groups/External?count=50&filter=group_id%2Beq%2B%220480db7f-d1bc-4d2b-b723-febc684c0ee9%22&startIndex=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/groups/GET_external_response.json") + .build()) + .build()); + + this.groups + .listExternalGroupMappings( + ListExternalGroupMappingsRequest.builder() + .filter("group_id+eq+\"0480db7f-d1bc-4d2b-b723-febc684c0ee9\"") + .count(50) + .startIndex(1) + .build()) + .as(StepVerifier::create) + .expectNext( + ListExternalGroupMappingsResponse.builder() + .resource( + ExternalGroupResource.builder() + .groupId("c4a41861-6c83-45a7-995e-64fb66565dce") + .displayName( + "Group For Testing Retrieving External" + + " Group Mappings") + .origin("ldap") + .externalGroup("external group") + .build()) + .startIndex(1) + .itemsPerPage(1) + .totalResults(1) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listMembers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/Groups/f87c557a-8ddc-43d3-98fb-e420ebc7f0f1/members?returnEntities=true") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/groups/GET_members_response.json") + .build()) + .build()); + + this.groups + .listMembers( + ListMembersRequest.builder() + .groupId("f87c557a-8ddc-43d3-98fb-e420ebc7f0f1") + .returnEntities(true) + .build()) + .as(StepVerifier::create) + .expectNext( + ListMembersResponse.builder() + .member( + Member.builder() + .memberId("40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .type(MemberType.USER) + .origin("uaa") + .entity( + UserEntity.builder() + .id( + "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .externalId("test-user") + .meta( + Meta.builder() + .version(0) + .created( + "2016-06-16T00:01:41.665Z") + .lastModified( + "2016-06-16T00:01:41.665Z") + .build()) + .userName("40HfKc") + .name( + Name.builder() + .familyName( + "cool-familyName") + .givenName( + "cool-name") + .build()) + .email( + Email.builder() + .value( + "cool@chill.com") + .primary(false) + .build()) + .active(true) + .verified(true) + .origin("uaa") + .zoneId("uaa") + .passwordLastModified( + "2016-06-16T00:01:41.000Z") + .schema("urn:scim:schemas:core:1.0") + .build()) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listMembersNoEntity() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/Groups/f87c557a-8ddc-43d3-98fb-e420ebc7f0f1/members?returnEntities=false") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/groups/GET_members_response_no_entity.json") + .build()) + .build()); + + this.groups + .listMembers( + ListMembersRequest.builder() + .groupId("f87c557a-8ddc-43d3-98fb-e420ebc7f0f1") + .returnEntities(false) + .build()) + .as(StepVerifier::create) + .expectNext( + ListMembersResponse.builder() + .member( + Member.builder() + .memberId("40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .type(MemberType.USER) + .origin("uaa") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapExternalGroup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/Groups/External") + .payload("fixtures/uaa/groups/POST_external_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/uaa/groups/POST_external_response.json") + .build()) + .build()); + + this.groups + .mapExternalGroup( + MapExternalGroupRequest.builder() + .groupId("76937b62-346c-4848-953c-d790b87ec80a") + .externalGroup("External group") + .build()) + .as(StepVerifier::create) + .expectNext( + MapExternalGroupResponse.builder() + .groupId("76937b62-346c-4848-953c-d790b87ec80a") + .displayName("Group For Testing Creating External Group Mapping") + .origin("ldap") + .externalGroup("External group") + .metadata( + Metadata.builder() + .created("2016-06-16T00:01:41.393Z") + .lastModified("2016-06-16T00:01:41.393Z") + .version(0) + .build()) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void removeMember() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/Groups/test-group-id/members/40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/groups/DELETE_{id}_members_{id}_response.json") + .build()) + .build()); + + this.groups + .removeMember( + RemoveMemberRequest.builder() + .groupId("test-group-id") + .memberId("40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .build()) + .as(StepVerifier::create) + .expectNext( + RemoveMemberResponse.builder() + .memberId("40bc8ef1-0719-4a0c-9f60-e9f843cd4af2") + .type(MemberType.USER) + .origin("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void success() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/Groups/test-group-id") + .header("If-Match", "0") + .header("X-Identity-Zone-Id", "uaa") + .payload("fixtures/uaa/groups/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/groups/PUT_{id}_response.json") + .build()) + .build()); + + this.groups + .update( + UpdateGroupRequest.builder() + .identityZoneId("uaa") + .groupId("test-group-id") + .version("0") + .description("the cool group") + .displayName("Cooler Group Name for Update") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("f0e6a061-6e3a-4be9-ace5-142ee24e20b7") + .build()) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateGroupResponse.builder() + .id("test-group-id") + .metadata( + Metadata.builder() + .created("2016-06-03T17:59:30.527Z") + .lastModified("2016-06-03T17:59:30.561Z") + .version(1) + .build()) + .description("the cool group") + .displayName("Cooler Group Name for Update") + .member( + MemberSummary.builder() + .origin("uaa") + .type(MemberType.USER) + .memberId("f0e6a061-6e3a-4be9-ace5-142ee24e20b7") + .build()) + .schema("urn:scim:schemas:core:1.0") + .zoneId("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapExternalGroupByGroupDisplayName() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/Groups/External/displayName/Group%20For%20Testing%20Deleting%20External%20Group%20Mapping%20By%20Name/externalGroup/external%20group/origin/ldap") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/groups/DELETE_external_displayname_{displayName}_externalgroup_{externalGroup}_origin_{origin}_response.json") + .build()) + .build()); + + this.groups + .unmapExternalGroupByGroupDisplayName( + UnmapExternalGroupByGroupDisplayNameRequest.builder() + .groupDisplayName( + "Group For Testing Deleting External Group Mapping By Name") + .externalGroup("external group") + .origin("ldap") + .build()) + .as(StepVerifier::create) + .expectNext( + UnmapExternalGroupByGroupDisplayNameResponse.builder() + .groupId("f8f0048f-de32-4d20-b41d-5820b690063d") + .displayName( + "Group For Testing Deleting External Group Mapping By Name") + .origin("ldap") + .externalGroup("external group") + .metadata( + Metadata.builder() + .created("2016-06-16T00:01:41.465Z") + .lastModified("2016-06-16T00:01:41.465Z") + .version(0) + .build()) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapExternalGroupByGroupId() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/Groups/External/groupId/d68167b4-81b3-490d-9838-94092d5c89f6/externalGroup/external%20group/origin/ldap") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/groups/DELETE_external_groupid_{groupId}_externalgroup_{externalGroup}_origin_{origin}_response.json") + .build()) + .build()); + + this.groups + .unmapExternalGroupByGroupId( + UnmapExternalGroupByGroupIdRequest.builder() + .groupId("d68167b4-81b3-490d-9838-94092d5c89f6") + .externalGroup("external group") + .origin("ldap") + .build()) + .as(StepVerifier::create) + .expectNext( + UnmapExternalGroupByGroupIdResponse.builder() + .groupId("d68167b4-81b3-490d-9838-94092d5c89f6") + .displayName("Group For Testing Deleting External Group Mapping") + .origin("ldap") + .externalGroup("external group") + .metadata( + Metadata.builder() + .created("2016-06-16T00:01:41.223Z") + .lastModified("2016-06-16T00:01:41.223Z") + .version(0) + .build()) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/identityproviders/ReactorIdentityProvidersTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/identityproviders/ReactorIdentityProvidersTest.java new file mode 100644 index 00000000000..94b78f7d545 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/identityproviders/ReactorIdentityProvidersTest.java @@ -0,0 +1,743 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.identityproviders; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.identityproviders.AttributeMappings; +import org.cloudfoundry.uaa.identityproviders.CreateIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.CreateIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.DeleteIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.DeleteIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.ExternalGroupMappingMode; +import org.cloudfoundry.uaa.identityproviders.GetIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.GetIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.IdentityProvider; +import org.cloudfoundry.uaa.identityproviders.InternalConfiguration; +import org.cloudfoundry.uaa.identityproviders.LdapConfiguration; +import org.cloudfoundry.uaa.identityproviders.LdapGroupFile; +import org.cloudfoundry.uaa.identityproviders.LdapProfileFile; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersRequest; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersResponse; +import org.cloudfoundry.uaa.identityproviders.LockoutPolicy; +import org.cloudfoundry.uaa.identityproviders.OAuth2Configuration; +import org.cloudfoundry.uaa.identityproviders.SamlConfiguration; +import org.cloudfoundry.uaa.identityproviders.Type; +import org.cloudfoundry.uaa.identityproviders.UpdateIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.UpdateIdentityProviderResponse; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorIdentityProvidersTest extends AbstractUaaApiTest { + + private final ReactorIdentityProviders identityProviders = + new ReactorIdentityProviders( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void createLdap() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/identity-providers?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .payload( + "fixtures/uaa/identity-providers/POST_request_ldap.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/uaa/identity-providers/POST_response_ldap.json") + .build()) + .build()); + + this.identityProviders + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + LdapConfiguration.builder() + .attributeMappings( + AttributeMappings.builder().build()) + .ldapProfileFile(LdapProfileFile.SIMPLE_BIND) + .ldapGroupFile(LdapGroupFile.NO_GROUP) + .baseUrl("ldap://localhost:33389") + .skipSSLVerification(false) + .mailAttributeName("mail") + .mailSubstituteOverridesLdap(false) + .build()) + .name("ldap name") + .originKey("ldap") + .type(Type.LDAP) + .identityZoneId("test-identity-zone-id") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateIdentityProviderResponse.builder() + .active(true) + .createdAt(1465001967988L) + .configuration( + LdapConfiguration.builder() + .attributeMappings( + AttributeMappings.builder().build()) + .autoAddGroups(true) + .baseUrl("ldap://localhost:33389") + .externalGroupsWhitelist(Collections.emptyList()) + .groupSearchDepthLimit(10) + .groupSearchSubTree(true) + .ldapProfileFile(LdapProfileFile.SIMPLE_BIND) + .ldapGroupFile(LdapGroupFile.NO_GROUP) + .mailAttributeName("mail") + .mailSubstituteOverridesLdap(false) + .skipSSLVerification(false) + .userDistinguishedNamePattern( + "cn={0},ou=Users,dc=test,dc=com") + .userDistinguishedNamePatternDelimiter(";") + .build()) + .id("aaccbccb-1c85-4e8b-86ed-4ce66f91c856") + .identityZoneId("uaa") + .lastModified(1465001967988L) + .name("ldap name") + .originKey("ldap") + .type(Type.LDAP) + .version(0) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createOauth() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/identity-providers?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .payload( + "fixtures/uaa/identity-providers/POST_request_oauth.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/uaa/identity-providers/POST_response_oauth.json") + .build()) + .build()); + + this.identityProviders + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + OAuth2Configuration.builder() + .attributeMappings( + AttributeMappings.builder().build()) + .authUrl("http://auth.url") + .tokenUrl("http://token.url") + .tokenKey("token-key") + .showLinkText(false) + .skipSslVerification(false) + .relyingPartyId("uaa") + .relyingPartySecret("secret") + .addShadowUserOnLogin(true) + .build()) + .name("UAA Provider") + .originKey("oauth2.0") + .type(Type.OAUTH2) + .identityZoneId("test-identity-zone-id") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateIdentityProviderResponse.builder() + .active(true) + .createdAt(1465001966855L) + .configuration( + OAuth2Configuration.builder() + .attributeMappings( + AttributeMappings.builder().build()) + .authUrl("http://auth.url") + .externalGroupsWhitelist(Collections.emptyList()) + .tokenUrl("http://token.url") + .tokenKey("token-key") + .showLinkText(false) + .skipSslVerification(false) + .relyingPartyId("uaa") + .relyingPartySecret("secret") + .addShadowUserOnLogin(true) + .build()) + .id("16506900-561d-411f-904b-15c3e2722cba") + .identityZoneId("uaa") + .lastModified(1465001966855L) + .name("UAA Provider") + .originKey("oauth2.0") + .type(Type.OAUTH2) + .version(0) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createSaml() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/identity-providers?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .payload( + "fixtures/uaa/identity-providers/POST_request_saml.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/uaa/identity-providers/POST_response_saml.json") + .build()) + .build()); + + this.identityProviders + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + SamlConfiguration.builder() + .addShadowUserOnLogin(true) + .assertionConsumerIndex(0) + .attributeMappings( + AttributeMappings.builder().build()) + .groupMappingMode( + ExternalGroupMappingMode.EXPLICITLY_MAPPED) + .linkText( + "IDPEndpointsMockTests Saml Provider:SAML") + .metaDataLocation( + "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\n" + + "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\n" + + "MBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\n" + + "Zm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\n" + + "VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\n" + + "BE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\n" + + "AQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\n" + + "WWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\n" + + "Bw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n" + + "3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\n" + + "vvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\n" + + "GFHNkZ6DmoT" + + "/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n") + .metadataTrustCheck(false) + .nameId( + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress") + .showSamlLink(false) + .socketFactoryClassName( + "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory") + .build()) + .name("SAML name") + .originKey("SAML") + .type(Type.SAML) + .identityZoneId("test-identity-zone-id") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateIdentityProviderResponse.builder() + .active(true) + .createdAt(1465001965526L) + .configuration( + SamlConfiguration.builder() + .addShadowUserOnLogin(true) + .assertionConsumerIndex(0) + .attributeMappings( + AttributeMappings.builder().build()) + .externalGroupsWhitelist(Collections.emptyList()) + .groupMappingMode( + ExternalGroupMappingMode.EXPLICITLY_MAPPED) + .idpEntityAlias("SAML") + .linkText( + "IDPEndpointsMockTests Saml Provider:SAML") + .metaDataLocation( + "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\n" + + "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\n" + + "MBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\n" + + "Zm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\n" + + "VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\n" + + "BE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\n" + + "AQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\n" + + "WWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\n" + + "Bw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n" + + "3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\n" + + "vvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\n" + + "GFHNkZ6DmoT" + + "/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n") + .metadataTrustCheck(false) + .nameId( + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress") + .showSamlLink(false) + .socketFactoryClassName( + "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory") + .zoneId("uaa") + .build()) + .id("a2e96056-c777-40b8-95b8-ff81b441fcf1") + .identityZoneId("uaa") + .lastModified(1465001965526L) + .name("SAML name") + .originKey("SAML") + .type(Type.SAML) + .version(0) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path( + "/identity-providers/test-identity-provider-id?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/identity-providers/DELETE_{id}_response.json") + .build()) + .build()); + + this.identityProviders + .delete( + DeleteIdentityProviderRequest.builder() + .identityProviderId("test-identity-provider-id") + .identityZoneId("test-identity-zone-id") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteIdentityProviderResponse.builder() + .active(true) + .createdAt(1466035298319L) + .configuration( + SamlConfiguration.builder() + .addShadowUserOnLogin(true) + .assertionConsumerIndex(0) + .attributeMappings( + AttributeMappings.builder().build()) + .externalGroupsWhitelist(Collections.emptyList()) + .groupMappingMode( + ExternalGroupMappingMode.EXPLICITLY_MAPPED) + .idpEntityAlias("saml-for-delete") + .linkText( + "IDPEndpointsMockTests Saml" + + " Provider:saml-for-delete") + .metaDataLocation( + "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\n" + + "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\n" + + "MBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\n" + + "Zm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\n" + + "VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\n" + + "BE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\n" + + "AQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\n" + + "WWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\n" + + "Bw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n" + + "3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\n" + + "vvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\n" + + "GFHNkZ6DmoT" + + "/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n") + .metadataTrustCheck(false) + .nameId( + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress") + .showSamlLink(false) + .socketFactoryClassName( + "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory") + .zoneId("uaa") + .build()) + .id("3ba5978b-8db1-4f27-bfbd-f24f6773b52f") + .identityZoneId("uaa") + .lastModified(1466035298319L) + .name("saml-for-delete name") + .originKey("saml-for-delete") + .type(Type.SAML) + .version(0) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/identity-providers/test-identity-provider-id?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload( + "fixtures/uaa/identity-providers/GET_{id}_response.json") + .build()) + .build()); + + this.identityProviders + .get( + GetIdentityProviderRequest.builder() + .identityProviderId("test-identity-provider-id") + .identityZoneId("test-identity-zone-id") + .build()) + .as(StepVerifier::create) + .expectNext( + GetIdentityProviderResponse.builder() + .active(true) + .createdAt(1465001966715L) + .configuration( + SamlConfiguration.builder() + .addShadowUserOnLogin(true) + .assertionConsumerIndex(0) + .attributeMappings( + AttributeMappings.builder().build()) + .externalGroupsWhitelist(Collections.emptyList()) + .groupMappingMode( + ExternalGroupMappingMode.EXPLICITLY_MAPPED) + .idpEntityAlias("saml-for-get") + .linkText( + "IDPEndpointsMockTests Saml" + + " Provider:saml-for-get") + .metaDataLocation( + "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\n" + + "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\n" + + "MBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\n" + + "Zm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\n" + + "VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\n" + + "BE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\n" + + "AQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\n" + + "WWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\n" + + "Bw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n" + + "3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\n" + + "vvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\n" + + "GFHNkZ6DmoT" + + "/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n") + .metadataTrustCheck(false) + .nameId( + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress") + .showSamlLink(false) + .socketFactoryClassName( + "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory") + .zoneId("uaa") + .build()) + .id("0077d56d-4e10-447a-9438-57d058e033ae") + .identityZoneId("uaa") + .lastModified(1465001966715L) + .name("saml-for-get name") + .originKey("saml-for-get") + .type(Type.SAML) + .version(0) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/identity-providers?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/identity-providers/GET_response.json") + .build()) + .build()); + + this.identityProviders + .list( + ListIdentityProvidersRequest.builder() + .identityZoneId("test-identity-zone-id") + .build()) + .as(StepVerifier::create) + .expectNext( + ListIdentityProvidersResponse.builder() + .identityProvider( + IdentityProvider.builder() + .active(true) + .createdAt(1465001965526L) + .configuration( + SamlConfiguration.builder() + .addShadowUserOnLogin(true) + .assertionConsumerIndex(0) + .attributeMappings( + AttributeMappings.builder() + .build()) + .externalGroupsWhitelist( + Collections.emptyList()) + .groupMappingMode( + ExternalGroupMappingMode + .EXPLICITLY_MAPPED) + .idpEntityAlias("SAML") + .linkText( + "IDPEndpointsMockTests Saml" + + " Provider:SAML") + .metaDataLocation( + "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\n" + + "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\n" + + "MBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\n" + + "Zm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\n" + + "VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\n" + + "BE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\n" + + "AQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\n" + + "WWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\n" + + "Bw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n" + + "3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\n" + + "vvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\n" + + "GFHNkZ6DmoT" + + "/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n") + .metadataTrustCheck(false) + .nameId( + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress") + .showSamlLink(false) + .socketFactoryClassName( + "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory") + .zoneId("uaa") + .build()) + .id("a2e96056-c777-40b8-95b8-ff81b441fcf1") + .identityZoneId("uaa") + .lastModified(1465001965526L) + .name("SAML name") + .originKey("SAML") + .type(Type.SAML) + .version(0) + .build()) + .identityProvider( + IdentityProvider.builder() + .active(false) + .createdAt(946713600000L) + .id("e6f15c2c-e5fa-46f6-a301-66b802d0102f") + .identityZoneId("uaa") + .lastModified(1465001954764L) + .name("keystone") + .originKey("keystone") + .type(Type.KEYSTONE) + .version(1) + .build()) + .identityProvider( + IdentityProvider.builder() + .active(false) + .createdAt(946713600000L) + .id("a3b9ef5d-e717-4ea9-91fa-371fa7a32f46") + .identityZoneId("uaa") + .lastModified(1465001955226L) + .name("ldap") + .originKey("ldap") + .type(Type.LDAP) + .version(1) + .build()) + .identityProvider( + IdentityProvider.builder() + .active(true) + .createdAt(1465001966855L) + .configuration( + OAuth2Configuration.builder() + .attributeMappings( + AttributeMappings.builder() + .build()) + .authUrl("http://auth.url") + .externalGroupsWhitelist( + Collections.emptyList()) + .tokenUrl("http://token.url") + .tokenKey("token-key") + .showLinkText(false) + .skipSslVerification(false) + .relyingPartyId("uaa") + .relyingPartySecret("secret") + .addShadowUserOnLogin(true) + .build()) + .id("16506900-561d-411f-904b-15c3e2722cba") + .identityZoneId("uaa") + .lastModified(1465001966855L) + .name("UAA Provider") + .originKey("oauth2.0") + .type(Type.OAUTH2) + .version(0) + .build()) + .identityProvider( + IdentityProvider.builder() + .active(true) + .createdAt(946713600000L) + .id("8d364146-ecb3-461e-b294-87580807a08f") + .identityZoneId("uaa") + .lastModified(1465001955249L) + .name("uaa") + .originKey("uaa") + .type(Type.INTERNAL) + .version(1) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/identity-providers/test-identity-provider-id?rawConfig=true") + .header("X-Identity-Zone-Id", "test-identity-zone-id") + .payload( + "fixtures/uaa/identity-providers/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/identity-providers/PUT_{id}_response.json") + .build()) + .build()); + + this.identityProviders + .update( + UpdateIdentityProviderRequest.builder() + .active(true) + .configuration( + InternalConfiguration.builder() + .disableInternalUserManagement(false) + .lockoutPolicy( + LockoutPolicy.builder() + .lockAccountPeriodInSecond(8) + .lockoutPeriodInSecond(8) + .numberOfAllowedFailures(8) + .build()) + .build()) + .name("uaa") + .originKey("uaa") + .type(Type.INTERNAL) + .version(1) + .identityZoneId("test-identity-zone-id") + .identityProviderId("test-identity-provider-id") + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateIdentityProviderResponse.builder() + .active(true) + .createdAt(946713600000L) + .configuration( + InternalConfiguration.builder() + .disableInternalUserManagement(false) + .lockoutPolicy( + LockoutPolicy.builder() + .lockAccountPeriodInSecond(8) + .lockoutPeriodInSecond(8) + .numberOfAllowedFailures(8) + .build()) + .build()) + .id("test-identity-provider-id") + .identityZoneId("uaa") + .lastModified(1465001967669L) + .name("uaa") + .originKey("uaa") + .type(Type.INTERNAL) + .version(2) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/identityzones/ReactorIdentityZonesTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/identityzones/ReactorIdentityZonesTest.java new file mode 100644 index 00000000000..62674816d25 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/identityzones/ReactorIdentityZonesTest.java @@ -0,0 +1,1132 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.identityzones; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.CREATED; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.identityproviders.Type; +import org.cloudfoundry.uaa.identityzones.Banner; +import org.cloudfoundry.uaa.identityzones.Branding; +import org.cloudfoundry.uaa.identityzones.ClientLockoutPolicy; +import org.cloudfoundry.uaa.identityzones.ClientSecretPolicy; +import org.cloudfoundry.uaa.identityzones.Consent; +import org.cloudfoundry.uaa.identityzones.CorsConfiguration; +import org.cloudfoundry.uaa.identityzones.CorsPolicy; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.DeleteIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.DeleteIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.GetIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.GetIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.IdentityZone; +import org.cloudfoundry.uaa.identityzones.IdentityZoneConfiguration; +import org.cloudfoundry.uaa.identityzones.Key; +import org.cloudfoundry.uaa.identityzones.Links; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesRequest; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesResponse; +import org.cloudfoundry.uaa.identityzones.LogoutLink; +import org.cloudfoundry.uaa.identityzones.MfaConfig; +import org.cloudfoundry.uaa.identityzones.Prompt; +import org.cloudfoundry.uaa.identityzones.RefreshTokenFormat; +import org.cloudfoundry.uaa.identityzones.SamlConfiguration; +import org.cloudfoundry.uaa.identityzones.SelfServiceLink; +import org.cloudfoundry.uaa.identityzones.TokenPolicy; +import org.cloudfoundry.uaa.identityzones.UpdateIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.UpdateIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.UserConfig; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorIdentityZonesTest extends AbstractUaaApiTest { + + private final ReactorIdentityZones identityZones = + new ReactorIdentityZones( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void create() { + IdentityZoneConfiguration testConfiguration = + IdentityZoneConfiguration.builder() + .clientSecretPolicy( + ClientSecretPolicy.builder() + .minimumLength(-1) + .maximumLength(-1) + .requireUpperCaseCharacter(-1) + .requireLowerCaseCharacter(-1) + .requireDigit(-1) + .requireSpecialCharacter(-1) + .build()) + .tokenPolicy( + TokenPolicy.builder() + .accessTokenValidity(-1) + .refreshTokenValidity(-1) + .jwtRevocable(false) + .refreshTokenUnique(false) + .refreshTokenFormat(RefreshTokenFormat.JWT) + .key( + "exampleKeyId", + Collections.singletonMap( + "signingKey", "s1gNiNg.K3y/t3XT")) + .build()) + .samlConfiguration( + SamlConfiguration.builder() + .assertionSigned(true) + .requestSigned(true) + .wantAssertionSigned(true) + .wantPartnerAuthenticationRequestSigned(false) + .assertionTimeToLive(600) + .activeKeyId("legacy-saml-key") + .key( + "legacy-saml-key", + Key.builder() + .key( + "-----BEGIN RSA PRIVATE KEY-----\n" + + "MIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF\n" + + "At0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr\n" + + "QA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS\n" + + "kQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce\n" + + "7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J\n" + + "BO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN\n" + + "A24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==\n" + + "-----END RSA PRIVATE" + + " KEY-----\n") + .passphrase("password") + .certificate( + "-----BEGIN CERTIFICATE-----\n" + + "MIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\n" + + "A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\n" + + "MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\n" + + "YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\n" + + "ODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\n" + + "CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\n" + + "ZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n" + + "8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\n" + + "AQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n" + + "8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n" + + "2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\n" + + "Hn+GmxZA\n" + + "-----END CERTIFICATE-----\n") + .build()) + .entityId("cloudfoundry-saml-login") + .disableInResponseToCheck(false) + .privateKey( + "-----BEGIN RSA PRIVATE KEY-----\n" + + "MIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF\n" + + "At0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr\n" + + "QA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS\n" + + "kQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce\n" + + "7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J\n" + + "BO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN\n" + + "A24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==\n" + + "-----END RSA PRIVATE KEY-----\n") + .privateKeyPassword("password") + .certificate( + "-----BEGIN CERTIFICATE-----\n" + + "MIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\n" + + "A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\n" + + "MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\n" + + "YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\n" + + "ODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\n" + + "CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\n" + + "ZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n" + + "8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\n" + + "AQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n" + + "8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n" + + "2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\n" + + "Hn+GmxZA\n" + + "-----END CERTIFICATE-----\n") + .build()) + .corsPolicy( + CorsPolicy.builder() + .xhrConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeaders( + "Accept", + "Authorization", + "Content-Type") + .allowedMethod("GET") + .allowedCredentials(false) + .maxAge(1728000L) + .build()) + .defaultConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeaders( + "Accept", + "Authorization", + "Content-Type") + .allowedMethod("GET") + .allowedCredentials(false) + .maxAge(1728000L) + .build()) + .build()) + .links( + Links.builder() + .logout( + LogoutLink.builder() + .redirectUrl("/login") + .redirectParameterName("redirect") + .disableRedirectParameter(false) + .build()) + .homeRedirect("http://my.hosted.homepage.com/") + .selfService( + SelfServiceLink.builder() + .selfServiceLinksEnabled(true) + .build()) + .build()) + .prompt( + Prompt.builder() + .fieldName("username") + .fieldType("text") + .text("Email") + .build()) + .prompt( + Prompt.builder() + .fieldName("password") + .fieldType("password") + .text("Password") + .build()) + .prompt( + Prompt.builder() + .fieldName("passcode") + .fieldType("password") + .text("One Time Code (Get on at /passcode)") + .build()) + .ldapDiscoveryEnabled(false) + .branding( + Branding.builder() + .companyName("Test Company") + .productLogo("VGVzdFByb2R1Y3RMb2dv") + .squareLogo("VGVzdFNxdWFyZUxvZ28=") + .footerLegalText("Test footer legal text") + .footerLink("Support", "http://support.example.com") + .banner( + Banner.builder() + .logo("VGVzdFByb2R1Y3RMb2dv") + .text("Announcement") + .textColor("#000000") + .backgroundColor("#89cff0") + .link("http://announce.example.com") + .build()) + .build()) + .accountChooserEnabled(false) + .userConfig( + UserConfig.builder() + .defaultGroups( + "openid", + "password.write", + "uaa.user", + "approvals.me", + "profile", + "roles", + "user_attributes", + "uaa.offline_token") + .build()) + .mfaConfig(MfaConfig.builder().enabled(false).build()) + .build(); + + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/identity-zones") + .payload("fixtures/uaa/identity-zones/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(CREATED) + .payload("fixtures/uaa/identity-zones/POST_response.json") + .build()) + .build()); + + this.identityZones + .create( + CreateIdentityZoneRequest.builder() + .identityZoneId("twiglet-create") + .subdomain("twiglet-create") + .configuration(testConfiguration) + .name("The Twiglet Zone") + .version(0) + .description("Like the Twilight Zone but tastier.") + .createdAt(1512452533738L) + .lastModified(1512452533738L) + .build()) + .as(StepVerifier::create) + .expectNext( + CreateIdentityZoneResponse.builder() + .id("twiglet-create") + .subdomain("twiglet-create") + .configuration(testConfiguration) + .name("The Twiglet Zone") + .version(0) + .description("Like the Twilight Zone but tastier.") + .createdAt(1512452533738L) + .lastModified(1512452533738L) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/identity-zones/twiglet-delete") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/identity-zones/DELETE_{id}_response.json") + .build()) + .build()); + + this.identityZones + .delete( + DeleteIdentityZoneRequest.builder() + .identityZoneId("twiglet-delete") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteIdentityZoneResponse.builder() + .id("twiglet-delete") + .subdomain("twiglet-delete") + .configuration( + IdentityZoneConfiguration.builder() + .clientLockoutPolicy( + ClientLockoutPolicy.builder() + .lockoutPeriodSeconds(-1) + .lockoutAfterFailures(-1) + .countFailuresWithin(-1) + .build()) + .tokenPolicy( + TokenPolicy.builder() + .accessTokenValidity(-1) + .refreshTokenValidity(-1) + .jwtRevocable(false) + .keys(Collections.emptyMap()) + .build()) + .samlConfiguration( + SamlConfiguration.builder() + .assertionSigned(true) + .requestSigned(true) + .wantAssertionSigned(true) + .wantPartnerAuthenticationRequestSigned( + false) + .assertionTimeToLive(600) + .build()) + .corsPolicy( + CorsPolicy.builder() + .xhrConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .defaultConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .build()) + .links( + Links.builder() + .logout( + LogoutLink.builder() + .redirectUrl( + "/login") + .redirectParameterName( + "redirect") + .disableRedirectParameter( + true) + .build()) + .homeRedirect( + "http://my.hosted.homepage.com/") + .selfService( + SelfServiceLink.builder() + .selfServiceLinksEnabled( + true) + .signupLink( + "/create_account") + .resetPasswordLink( + "/forgot_password") + .build()) + .build()) + .prompt( + Prompt.builder() + .fieldName("username") + .fieldType("text") + .text("Email") + .build()) + .prompt( + Prompt.builder() + .fieldName("password") + .fieldType("password") + .text("Password") + .build()) + .prompt( + Prompt.builder() + .fieldName("passcode") + .fieldType("password") + .text( + "One Time Code (Get on at" + + " /passcode)") + .build()) + .ldapDiscoveryEnabled(false) + .branding( + Branding.builder() + .companyName("Test Company") + .productLogo("VGVzdFByb2R1Y3RMb2dv") + .squareLogo("VGVzdFNxdWFyZUxvZ28=") + .footerLegalText( + "Test footer legal text") + .footerLink( + "Support", + "http://support.example.com") + .build()) + .accountChooserEnabled(false) + .build()) + .name("The Twiglet Zone") + .version(0) + .createdAt(1481728057024L) + .lastModified(1481728057024L) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/identity-zones/twiglet-get") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/identity-zones/GET_{id}_response.json") + .build()) + .build()); + + this.identityZones + .get(GetIdentityZoneRequest.builder().identityZoneId("twiglet-get").build()) + .as(StepVerifier::create) + .expectNext( + GetIdentityZoneResponse.builder() + .id("twiglet-get") + .subdomain("twiglet-get") + .configuration( + IdentityZoneConfiguration.builder() + .clientSecretPolicy( + ClientSecretPolicy.builder() + .minimumLength(-1) + .maximumLength(-1) + .requireDigit(-1) + .requireLowerCaseCharacter(-1) + .requireSpecialCharacter(-1) + .requireUpperCaseCharacter(-1) + .build()) + .tokenPolicy( + TokenPolicy.builder() + .accessTokenValidity(3600) + .activeKeyId("active-key-1") + .jwtRevocable(false) + .refreshTokenFormat( + RefreshTokenFormat.JWT) + .refreshTokenUnique(false) + .refreshTokenValidity(7200) + .build()) + .samlConfiguration( + SamlConfiguration.builder() + .activeKeyId("legacy-saml-key") + .assertionSigned(true) + .assertionTimeToLive(600) + .certificate( + "-----BEGIN" + + " CERTIFICATE-----\n" + + "MIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\n" + + "A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\n" + + "MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\n" + + "YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\n" + + "ODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\n" + + "CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\n" + + "ZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n" + + "8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\n" + + "AQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n" + + "8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n" + + "2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\n" + + "Hn+GmxZA\n" + + "-----END" + + " CERTIFICATE-----\n") + .disableInResponseToCheck(false) + .entityId("cloudfoundry-saml-login") + .key( + "legacy-saml-key", + Key.builder() + .certificate( + "-----BEGIN" + + " CERTIFICATE-----\n" + + "MIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\n" + + "A1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\n" + + "MRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\n" + + "YiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\n" + + "ODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\n" + + "CAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\n" + + "ZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n" + + "8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\n" + + "AQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n" + + "8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n" + + "2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\n" + + "Hn+GmxZA\n" + + "-----END" + + " CERTIFICATE-----\n") + .build()) + .requestSigned(true) + .wantAssertionSigned(true) + .wantPartnerAuthenticationRequestSigned( + false) + .build()) + .corsPolicy( + CorsPolicy.builder() + .xhrConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .defaultConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .build()) + .links( + Links.builder() + .logout( + LogoutLink.builder() + .redirectUrl( + "/login") + .redirectParameterName( + "redirect") + .disableRedirectParameter( + false) + .build()) + .homeRedirect( + "http://my.hosted.homepage.com/") + .selfService( + SelfServiceLink.builder() + .selfServiceLinksEnabled( + true) + .build()) + .build()) + .prompt( + Prompt.builder() + .fieldName("username") + .fieldType("text") + .text("Email") + .build()) + .prompt( + Prompt.builder() + .fieldName("password") + .fieldType("password") + .text("Password") + .build()) + .prompt( + Prompt.builder() + .fieldName("passcode") + .fieldType("password") + .text( + "Temporary Authentication" + + " Code (Get on at" + + " /passcode)") + .build()) + .ldapDiscoveryEnabled(false) + .branding( + Branding.builder() + .banner( + Banner.builder() + .backgroundColor( + "#89cff0") + .link( + "http://announce.example.com") + .logo( + "VGVzdFByb2R1Y3RMb2dv") + .text( + "Announcement") + .textColor( + "#000000") + .build()) + .companyName("Test Company") + .consent( + Consent.builder() + .link( + "http://policy.example.com") + .text("Some Policy") + .build()) + .footerLegalText( + "Test footer legal text") + .footerLink( + "Support", + "http://support.example.com") + .productLogo("VGVzdFByb2R1Y3RMb2dv") + .squareLogo("VGVzdFNxdWFyZUxvZ28=") + .build()) + .accountChooserEnabled(false) + .issuer("http://localhost:8080/uaa") + .mfaConfig( + MfaConfig.builder() + .enabled(false) + .identityProvider(Type.INTERNAL) + .identityProvider(Type.LDAP) + .build()) + .userConfig( + UserConfig.builder() + .defaultGroups( + Arrays.asList( + "openid", + "password.write", + "uaa.user", + "approvals.me", + "profile", + "roles", + "user_attributes", + "uaa.offline_token")) + .build()) + .build()) + .name("The Twiglet Zone") + .version(0) + .createdAt(1529690486268L) + .lastModified(1529690486268L) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/identity-zones").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/identity-zones/GET_response.json") + .build()) + .build()); + + this.identityZones + .list(ListIdentityZonesRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListIdentityZonesResponse.builder() + .identityZone( + IdentityZone.builder() + .id("15wtczzd") + .subdomain("15wtczzd") + .configuration( + IdentityZoneConfiguration.builder() + .clientLockoutPolicy( + ClientLockoutPolicy + .builder() + .lockoutPeriodSeconds( + -1) + .lockoutAfterFailures( + -1) + .countFailuresWithin( + -1) + .build()) + .tokenPolicy( + TokenPolicy.builder() + .accessTokenValidity( + -1) + .refreshTokenValidity( + -1) + .jwtRevocable(false) + .keys( + Collections + .emptyMap()) + .build()) + .samlConfiguration( + SamlConfiguration.builder() + .assertionSigned( + true) + .requestSigned(true) + .wantAssertionSigned( + true) + .wantPartnerAuthenticationRequestSigned( + false) + .assertionTimeToLive( + 600) + .build()) + .corsPolicy( + CorsPolicy.builder() + .xhrConfiguration( + CorsConfiguration + .builder() + .allowedOrigin( + ".*") + .allowedUri( + ".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge( + 1728000L) + .build()) + .defaultConfiguration( + CorsConfiguration + .builder() + .allowedOrigin( + ".*") + .allowedUri( + ".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge( + 1728000L) + .build()) + .build()) + .links( + Links.builder() + .logout( + LogoutLink + .builder() + .redirectUrl( + "/login") + .redirectParameterName( + "redirect") + .disableRedirectParameter( + true) + .build()) + .selfService( + SelfServiceLink + .builder() + .selfServiceLinksEnabled( + true) + .signupLink( + "/create_account") + .resetPasswordLink( + "/forgot_password") + .build()) + .build()) + .prompt( + Prompt.builder() + .fieldName( + "username") + .fieldType("text") + .text("Email") + .build()) + .prompt( + Prompt.builder() + .fieldName( + "password") + .fieldType( + "password") + .text("Password") + .build()) + .prompt( + Prompt.builder() + .fieldName( + "passcode") + .fieldType( + "password") + .text( + "One Time" + + " Code" + + " (Get" + + " on at" + + " /passcode)") + .build()) + .ldapDiscoveryEnabled(false) + .accountChooserEnabled(false) + .build()) + .name("The Twiglet Zone") + .version(0) + .description("Like the Twilight Zone but tastier.") + .createdAt(1481728053399L) + .lastModified(1481728053399L) + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/identity-zones/twiglet-update") + .payload( + "fixtures/uaa/identity-zones/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/identity-zones/PUT_{id}_response.json") + .build()) + .build()); + + this.identityZones + .update( + UpdateIdentityZoneRequest.builder() + .identityZoneId("twiglet-update") + .subdomain("twiglet-update") + .configuration( + IdentityZoneConfiguration.builder() + .clientLockoutPolicy( + ClientLockoutPolicy.builder() + .lockoutPeriodSeconds(-1) + .lockoutAfterFailures(-1) + .countFailuresWithin(-1) + .build()) + .tokenPolicy( + TokenPolicy.builder() + .accessTokenValidity(-1) + .refreshTokenValidity(-1) + .jwtRevocable(false) + .key( + "updatedKeyId", + Collections.singletonMap( + "signingKey", + "upD4t3d.s1gNiNg.K3y/t3XT")) + .build()) + .samlConfiguration( + SamlConfiguration.builder() + .assertionSigned(true) + .requestSigned(true) + .wantAssertionSigned(true) + .wantPartnerAuthenticationRequestSigned( + false) + .assertionTimeToLive(600) + .build()) + .corsPolicy( + CorsPolicy.builder() + .xhrConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .defaultConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .build()) + .links( + Links.builder() + .logout( + LogoutLink.builder() + .redirectUrl( + "/login") + .redirectParameterName( + "redirect") + .disableRedirectParameter( + true) + .build()) + .homeRedirect( + "http://my.hosted.homepage.com/") + .selfService( + SelfServiceLink.builder() + .selfServiceLinksEnabled( + true) + .signupLink( + "/create_account") + .resetPasswordLink( + "/forgot_password") + .build()) + .build()) + .prompt( + Prompt.builder() + .fieldName("username") + .fieldType("text") + .text("Email") + .build()) + .prompt( + Prompt.builder() + .fieldName("password") + .fieldType("password") + .text("Password") + .build()) + .prompt( + Prompt.builder() + .fieldName("passcode") + .fieldType("password") + .text( + "One Time Code (Get on at" + + " /passcode)") + .build()) + .ldapDiscoveryEnabled(false) + .branding( + Branding.builder() + .companyName("Test Company") + .productLogo("VGVzdFByb2R1Y3RMb2dv") + .squareLogo("VGVzdFNxdWFyZUxvZ28=") + .footerLegalText( + "Test footer legal text") + .footerLink( + "Support", + "http://support.example.com") + .build()) + .accountChooserEnabled(false) + .build()) + .name("The Updated Twiglet Zone") + .version(0) + .description("Like the Twilight Zone but not tastier.") + .createdAt(1481728057246L) + .lastModified(1481728057246L) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateIdentityZoneResponse.builder() + .id("twiglet-update") + .subdomain("twiglet-update") + .configuration( + IdentityZoneConfiguration.builder() + .clientLockoutPolicy( + ClientLockoutPolicy.builder() + .lockoutPeriodSeconds(-1) + .lockoutAfterFailures(-1) + .countFailuresWithin(-1) + .build()) + .tokenPolicy( + TokenPolicy.builder() + .accessTokenValidity(-1) + .refreshTokenValidity(-1) + .jwtRevocable(false) + .key( + "updatedKeyId", + Collections.singletonMap( + "signingKey", + "upD4t3d.s1gNiNg.K3y/t3XT")) + .build()) + .samlConfiguration( + SamlConfiguration.builder() + .assertionSigned(true) + .requestSigned(true) + .wantAssertionSigned(true) + .wantPartnerAuthenticationRequestSigned( + false) + .assertionTimeToLive(600) + .build()) + .corsPolicy( + CorsPolicy.builder() + .xhrConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .defaultConfiguration( + CorsConfiguration.builder() + .allowedOrigin(".*") + .allowedUri(".*") + .allowedHeader( + "Accept") + .allowedHeader( + "Authorization") + .allowedHeader( + "Content-Type") + .allowedMethod( + "GET") + .allowedCredentials( + false) + .maxAge(1728000L) + .build()) + .build()) + .links( + Links.builder() + .logout( + LogoutLink.builder() + .redirectUrl( + "/login") + .redirectParameterName( + "redirect") + .disableRedirectParameter( + true) + .build()) + .homeRedirect( + "http://my.hosted.homepage.com/") + .selfService( + SelfServiceLink.builder() + .selfServiceLinksEnabled( + true) + .signupLink( + "/create_account") + .resetPasswordLink( + "/forgot_password") + .build()) + .build()) + .prompt( + Prompt.builder() + .fieldName("username") + .fieldType("text") + .text("Email") + .build()) + .prompt( + Prompt.builder() + .fieldName("password") + .fieldType("password") + .text("Password") + .build()) + .prompt( + Prompt.builder() + .fieldName("passcode") + .fieldType("password") + .text( + "One Time Code (Get on at" + + " /passcode)") + .build()) + .ldapDiscoveryEnabled(false) + .branding( + Branding.builder() + .companyName("Test Company") + .productLogo("VGVzdFByb2R1Y3RMb2dv") + .squareLogo("VGVzdFNxdWFyZUxvZ28=") + .footerLegalText( + "Test footer legal text") + .footerLink( + "Support", + "http://support.example.com") + .build()) + .accountChooserEnabled(false) + .build()) + .name("The Updated Twiglet Zone") + .version(1) + .description("Like the Twilight Zone but not tastier.") + .createdAt(1481728057213L) + .lastModified(1481728057259L) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/serverinformation/ReactorServerInformationTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/serverinformation/ReactorServerInformationTest.java new file mode 100644 index 00000000000..a0e921ef75a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/serverinformation/ReactorServerInformationTest.java @@ -0,0 +1,158 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.serverinformation; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.FOUND; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.serverinformation.ApplicationInfo; +import org.cloudfoundry.uaa.serverinformation.AutoLoginRequest; +import org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeRequest; +import org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeResponse; +import org.cloudfoundry.uaa.serverinformation.GetInfoRequest; +import org.cloudfoundry.uaa.serverinformation.GetInfoResponse; +import org.cloudfoundry.uaa.serverinformation.Links; +import org.cloudfoundry.uaa.serverinformation.Prompts; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorServerInformationTest extends AbstractUaaApiTest { + + private final ReactorServerInformation info = + new ReactorServerInformation( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void autoLogin() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/autologin?client_id=admin&code=NaOjAprtCK") + .build()) + .response(TestResponse.builder().status(FOUND).build()) + .build()); + + this.info + .autoLogin(AutoLoginRequest.builder().clientId("admin").code("NaOjAprtCK").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getAutoLoginAuthenticationCode() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/autologin") + .payload("fixtures/uaa/info/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/info/POST_response.json") + .build()) + .build()); + + this.info + .getAuthenticationCode( + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId("admin") + .clientSecret("adminsecret") + .password("koala") + .username("marissa") + .build()) + .as(StepVerifier::create) + .expectNext( + GetAutoLoginAuthenticationCodeResponse.builder() + .code("m0R24i7t2s") + .path("/oauth/authorize") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getInfo() { + Map ipDefinitions = new HashMap<>(); + ipDefinitions.put( + "SAMLMetadataUrl", + "http://localhost:8080/uaa/saml/discovery?returnIDParam=idp&entityID=cloudfoundry-saml-login&idp=SAMLMetadataUrl&isPassive=true"); + ipDefinitions.put( + "SAML", + "http://localhost:8080/uaa/saml/discovery?returnIDParam=idp&entityID=cloudfoundry-saml-login&idp=SAML&isPassive=true"); + + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/info").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/info/GET_response.json") + .build()) + .build()); + + this.info + .getInfo(GetInfoRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + GetInfoResponse.builder() + .app(ApplicationInfo.builder().version("4.7.0-SNAPSHOT").build()) + .commitId("4bba13c") + .entityId("cloudfoundry-saml-login") + .idpDefinitions(ipDefinitions) + .links( + Links.builder() + .login("http://localhost:8080/uaa") + .password("/forgot_password") + .register("/create_account") + .uaa("http://localhost:8080/uaa") + .build()) + .prompts( + Prompts.builder() + .passcode( + Arrays.asList( + "password", + "One Time Code ( Get one at" + + " http://localhost:8080/uaa/passcode" + + " )")) + .password(Arrays.asList("password", "Password")) + .username(Arrays.asList("text", "Email")) + .build()) + .showLoginLinks(true) + .timestamp("2017-09-08T23:11:58+0000") + .zoneName("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/tokens/ReactorTokensTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/tokens/ReactorTokensTest.java new file mode 100644 index 00000000000..db0299aa645 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/tokens/ReactorTokensTest.java @@ -0,0 +1,471 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.tokens; + +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.tokens.CheckTokenRequest; +import org.cloudfoundry.uaa.tokens.CheckTokenResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByAuthorizationCodeRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByAuthorizationCodeResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByClientCredentialsRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByClientCredentialsResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByOneTimePasscodeRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByOneTimePasscodeResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByOpenIdRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByOpenIdResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByPasswordRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByPasswordResponse; +import org.cloudfoundry.uaa.tokens.GetTokenKeyRequest; +import org.cloudfoundry.uaa.tokens.GetTokenKeyResponse; +import org.cloudfoundry.uaa.tokens.KeyType; +import org.cloudfoundry.uaa.tokens.ListTokenKeysRequest; +import org.cloudfoundry.uaa.tokens.ListTokenKeysResponse; +import org.cloudfoundry.uaa.tokens.RefreshTokenRequest; +import org.cloudfoundry.uaa.tokens.RefreshTokenResponse; +import org.cloudfoundry.uaa.tokens.TokenFormat; +import org.cloudfoundry.uaa.tokens.TokenKey; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorTokensTest extends AbstractUaaApiTest { + + private final ReactorTokens tokens = + new ReactorTokens( + CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void check() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/check_token?scopes=password.write%2Cscim.userids&token=f9f2f98d88e04ff7bb1f69041d3c0346") + .header( + "Authorization", + "Basic YXBwOmFwcGNsaWVudHNlY3JldA==") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/check/POST_response.json") + .build()) + .build()); + + this.tokens + .check( + CheckTokenRequest.builder() + .token("f9f2f98d88e04ff7bb1f69041d3c0346") + .scope("password.write") + .scope("scim.userids") + .clientId("app") + .clientSecret("appclientsecret") + .build()) + .as(StepVerifier::create) + .expectNext( + CheckTokenResponse.builder() + .userId("ae77988e-1b25-4e02-87f2-81f98293a356") + .userName("marissa") + .email("marissa@test.org") + .clientId("app") + .expirationTime(1462015244L) + .scopes( + Arrays.asList( + "scim.userids", + "openid", + "cloud_controller.read", + "password.write", + "cloud_controller.write")) + .jwtId("f9f2f98d88e04ff7bb1f69041d3c0346") + .audiences( + Arrays.asList( + "app", + "scim", + "openid", + "cloud_controller", + "password")) + .subject("ae77988e-1b25-4e02-87f2-81f98293a356") + .issuer("http://localhost:8080/uaa/oauth/token") + .issuedAt(1461972044L) + .cid("app") + .grantType("password") + .authorizedParty("app") + .authorizationTime(1461972044L) + .zoneId("uaa") + .revocationSignature("4e89e4da") + .origin("uaa") + .revocable(true) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getKey() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/token_key").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/token_key/GET_response.json") + .build()) + .build()); + + this.tokens + .getKey(GetTokenKeyRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + GetTokenKeyResponse.builder() + .id("testKey") + .algorithm("SHA256withRSA") + .value( + "-----BEGIN PUBLIC KEY-----\n" + + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0m59l2u9iDnMbrXHfqkO\n" + + "rn2dVQ3vfBJqcDuFUK03d+1PZGbVlNCqnkpIJ8syFppW8ljnWweP7+LiWpRoz0I7\n" + + "fYb3d8TjhV86Y997Fl4DBrxgM6KTJOuE/uxnoDhZQ14LgOU2ckXjOzOdTsnGMKQB\n" + + "LCl0vpcXBtFLMaSbpv1ozi8h7DJyVZ6EnFQZUWGdgTMhDrmqevfx95U/16c5WBDO\n" + + "kqwIn7Glry9n9Suxygbf8g5AzpWcusZgDLIIZ7JTUldBb8qU2a0Dl4mvLZOn4wPo\n" + + "jfj9Cw2QICsc5+Pwf21fP+hzf+1WSRHbnYv8uanRO0gZ8ekGaghM/2H6gqJbo2nI\n" + + "JwIDAQAB\n" + + "-----END PUBLIC KEY-----") + .keyType(KeyType.RSA) + .use("sig") + .n( + "ANJufZdrvYg5zG61x36pDq59nVUN73wSanA7hVCtN3ftT2Rm1ZTQqp5KSCfLMhaaVvJY51sHj" + + "+/i4lqUaM9CO32G93fE44VfOmPfexZeAwa8YDOikyTrhP7sZ6A4WUNeC4DlNnJF4zsznU7JxjCkASwpdL6XFwbRSzGkm6b9aM4vIewyclWehJxUGVFhnYEzIQ65qnr38feVP9enOVgQzpKsCJ+xpa8vZ/UrscoG3" + + "/IOQM6VnLrGYAyyCGeyU1JXQW/KlNmtA5eJry2Tp+MD6I34/QsNkCArHOfj8H9tXz/oc3/tVkkR252L/Lmp0TtIGfHpBmoITP9h+oKiW6NpyCc=") + .e("AQAB") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getTokenByAuthorizationCode() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/oauth/token?code=zI6Z1X&client_id=login&client_secret=loginsecret&redirect_uri=https%3A%2F%2Fuaa.cloudfoundry.com%2Fredirect%2Fcf" + + "&token_format=opaque&grant_type=authorization_code&response_type=token") + .header("Authorization", null) + .header("Content-Type", "application/x-www-form-urlencoded") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/tokens/GET_response_AC.json") + .build()) + .build()); + + this.tokens + .getByAuthorizationCode( + GetTokenByAuthorizationCodeRequest.builder() + .clientId("login") + .clientSecret("loginsecret") + .authorizationCode("zI6Z1X") + .redirectUri("https://uaa.cloudfoundry.com/redirect/cf") + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .as(StepVerifier::create) + .expectNext( + GetTokenByAuthorizationCodeResponse.builder() + .accessToken("555e2047bbc849628ff8cbfa7b342274") + .tokenType("bearer") + .refreshToken("555e2047bbc849628ff8cbfa7b342274-r") + .expiresInSeconds(43199) + .scopes("openid oauth.approvals") + .tokenId("555e2047bbc849628ff8cbfa7b342274") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getTokenByClientCredentials() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/oauth/token?client_id=login&client_secret=loginsecret&token_format=opaque&grant_type=client_credentials&response_type=token") + .header("Authorization", null) + .header("Content-Type", "application/x-www-form-urlencoded") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/tokens/GET_response_CC.json") + .build()) + .build()); + + this.tokens + .getByClientCredentials( + GetTokenByClientCredentialsRequest.builder() + .clientId("login") + .clientSecret("loginsecret") + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .as(StepVerifier::create) + .expectNext( + GetTokenByClientCredentialsResponse.builder() + .accessToken("f87f93a2666d4e6eaa54e34df86d160c") + .tokenType("bearer") + .expiresInSeconds(43199) + .scopes( + "clients.read emails.write scim.userids password.write" + + " idps.write notifications.write oauth.login" + + " scim.write critical_notifications.write") + .tokenId("f87f93a2666d4e6eaa54e34df86d160c") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getTokenByOneTimePasscode() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/oauth/token?client_id=app&client_secret=appclientsecret&passcode=qcZNkd&token_format=opaque&grant_type=password&response_type=token") + .header("Authorization", null) + .header("Content-Type", "application/x-www-form-urlencoded") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/tokens/GET_response_OT.json") + .build()) + .build()); + + this.tokens + .getByOneTimePasscode( + GetTokenByOneTimePasscodeRequest.builder() + .clientId("app") + .clientSecret("appclientsecret") + .passcode("qcZNkd") + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .as(StepVerifier::create) + .expectNext( + GetTokenByOneTimePasscodeResponse.builder() + .accessToken("0ddcada64ef742a28badaf4750ef435f") + .tokenType("bearer") + .refreshToken("0ddcada64ef742a28badaf4750ef435f-r") + .expiresInSeconds(43199) + .scopes( + "scim.userids openid cloud_controller.read password.write" + + " cloud_controller.write") + .tokenId("0ddcada64ef742a28badaf4750ef435f") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getTokenByOpenId() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/oauth/token?code=NAlA1d&client_id=app&client_secret=appclientsecret&redirect_uri=https%3A%2F%2Fuaa.cloudfoundry.com%2Fredirect%2Fcf&token_format=opaque" + + "&grant_type=authorization_code&response_type=id_token") + .header("Authorization", null) + .header("Content-Type", "application/x-www-form-urlencoded") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/tokens/GET_response_OI.json") + .build()) + .build()); + + this.tokens + .getByOpenId( + GetTokenByOpenIdRequest.builder() + .clientId("app") + .clientSecret("appclientsecret") + .authorizationCode("NAlA1d") + .redirectUri("https://uaa.cloudfoundry.com/redirect/cf") + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .as(StepVerifier::create) + .expectNext( + GetTokenByOpenIdResponse.builder() + .accessToken("53a58e6581ee49d08f9e572f673bc8db") + .tokenType("bearer") + .openIdToken( + "eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLC") + .refreshToken("53a58e6581ee49d08f9e572f673bc8db-r") + .expiresInSeconds(43199) + .scopes("openid oauth.approvals") + .tokenId("53a58e6581ee49d08f9e572f673bc8db") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getTokenByPassword() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/oauth/token?client_id=app&client_secret=appclientsecret&password=secr3T&token_format=opaque&" + + "username=jENeJj%40test.org&grant_type=password&response_type=token") + .header("Authorization", null) + .header("Content-Type", "application/x-www-form-urlencoded") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/tokens/GET_response_PW.json") + .build()) + .build()); + + this.tokens + .getByPassword( + GetTokenByPasswordRequest.builder() + .clientId("app") + .clientSecret("appclientsecret") + .password("secr3T") + .tokenFormat(TokenFormat.OPAQUE) + .username("jENeJj@test.org") + .build()) + .as(StepVerifier::create) + .expectNext( + GetTokenByPasswordResponse.builder() + .accessToken("cd37a35114084fafb83d21c6f2af0e84") + .tokenType("bearer") + .refreshToken("cd37a35114084fafb83d21c6f2af0e84-r") + .expiresInSeconds(43199) + .scopes( + "scim.userids openid cloud_controller.read password.write" + + " cloud_controller.write") + .tokenId("cd37a35114084fafb83d21c6f2af0e84") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listKeys() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/token_keys").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/token_keys/GET_response.json") + .build()) + .build()); + + this.tokens + .listKeys(ListTokenKeysRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ListTokenKeysResponse.builder() + .key( + TokenKey.builder() + .id("testKey") + .algorithm("SHA256withRSA") + .value( + "-----BEGIN PUBLIC KEY-----\n" + + "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0m59l2u9iDnMbrXHfqkO\n" + + "rn2dVQ3vfBJqcDuFUK03d+1PZGbVlNCqnkpIJ8syFppW8ljnWweP7+LiWpRoz0I7\n" + + "fYb3d8TjhV86Y997Fl4DBrxgM6KTJOuE/uxnoDhZQ14LgOU2ckXjOzOdTsnGMKQB\n" + + "LCl0vpcXBtFLMaSbpv1ozi8h7DJyVZ6EnFQZUWGdgTMhDrmqevfx95U/16c5WBDO\n" + + "kqwIn7Glry9n9Suxygbf8g5AzpWcusZgDLIIZ7JTUldBb8qU2a0Dl4mvLZOn4wPo\n" + + "jfj9Cw2QICsc5+Pwf21fP+hzf+1WSRHbnYv8uanRO0gZ8ekGaghM/2H6gqJbo2nI\n" + + "JwIDAQAB\n" + + "-----END PUBLIC KEY-----") + .keyType(KeyType.RSA) + .use("sig") + .n( + "ANJufZdrvYg5zG61x36pDq59nVUN73wSanA7hVCtN3ftT2Rm1ZTQqp5KSCfLMhaaVvJY51sHj" + + "+/i4lqUaM9CO32G93fE44VfOmPfexZeAwa8YDOikyTrhP7sZ6A4WUNeC4DlNnJF4zsznU7JxjCkASwpdL6XFwbRSzGkm6b9aM4vIewyclWehJxUGVFhnYEzIQ65qnr38feVP9enOVgQzpKsCJ+xpa8vZ/UrscoG3" + + "/IOQM6VnLrGYAyyCGeyU1JXQW/KlNmtA5eJry2Tp+MD6I34/QsNkCArHOfj8H9tXz/oc3/tVkkR252L/Lmp0TtIGfHpBmoITP9h+oKiW6NpyCc=") + .e("AQAB") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void refreshToken() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/oauth/token?client_id=app&client_secret=appclientsecret&refresh_token=6af5fc07a8b74c2eafb0079ff477bb11-r&token_format=opaque&grant_type=refresh_token") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/tokens/GET_refresh_response.json") + .build()) + .build()); + + this.tokens + .refresh( + RefreshTokenRequest.builder() + .clientId("app") + .clientSecret("appclientsecret") + .refreshToken("6af5fc07a8b74c2eafb0079ff477bb11-r") + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .as(StepVerifier::create) + .expectNext( + RefreshTokenResponse.builder() + .accessToken("eyJhbGciOiJIUzI1NiIsImtpZCI6Imx") + .tokenType("bearer") + .refreshToken("eyJhbGciOiJIUzI1NiIsImtpZCI6Imx_E") + .expiresInSeconds(43199) + .scopes( + "scim.userids cloud_controller.read password.write" + + " cloud_controller.write openid") + .tokenId("6af5fc07a8b74c2eafb0079ff477bb11") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/users/ReactorUsersTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/users/ReactorUsersTest.java new file mode 100644 index 00000000000..7ace0b0f463 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/uaa/users/ReactorUsersTest.java @@ -0,0 +1,953 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.uaa.users; + +import static io.netty.handler.codec.http.HttpMethod.DELETE; +import static io.netty.handler.codec.http.HttpMethod.GET; +import static io.netty.handler.codec.http.HttpMethod.PATCH; +import static io.netty.handler.codec.http.HttpMethod.POST; +import static io.netty.handler.codec.http.HttpMethod.PUT; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.cloudfoundry.uaa.SortOrder.ASCENDING; +import static org.cloudfoundry.uaa.SortOrder.DESCENDING; +import static org.cloudfoundry.uaa.users.ApprovalStatus.APPROVED; +import static org.cloudfoundry.uaa.users.ApprovalStatus.DENIED; +import static org.cloudfoundry.uaa.users.MembershipType.DIRECT; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.reactor.InteractionContext; +import org.cloudfoundry.reactor.TestRequest; +import org.cloudfoundry.reactor.TestResponse; +import org.cloudfoundry.reactor.uaa.AbstractUaaApiTest; +import org.cloudfoundry.uaa.users.Approval; +import org.cloudfoundry.uaa.users.ChangeUserPasswordRequest; +import org.cloudfoundry.uaa.users.ChangeUserPasswordResponse; +import org.cloudfoundry.uaa.users.CreateUserRequest; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.DeleteUserRequest; +import org.cloudfoundry.uaa.users.DeleteUserResponse; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.ExpirePasswordRequest; +import org.cloudfoundry.uaa.users.ExpirePasswordResponse; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkRequest; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkResponse; +import org.cloudfoundry.uaa.users.Group; +import org.cloudfoundry.uaa.users.Invite; +import org.cloudfoundry.uaa.users.InviteUsersRequest; +import org.cloudfoundry.uaa.users.InviteUsersResponse; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.uaa.users.ListUsersResponse; +import org.cloudfoundry.uaa.users.LookupUserIdsRequest; +import org.cloudfoundry.uaa.users.LookupUserIdsResponse; +import org.cloudfoundry.uaa.users.Meta; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.uaa.users.PhoneNumber; +import org.cloudfoundry.uaa.users.UpdateUserRequest; +import org.cloudfoundry.uaa.users.UpdateUserResponse; +import org.cloudfoundry.uaa.users.User; +import org.cloudfoundry.uaa.users.UserId; +import org.cloudfoundry.uaa.users.UserInfoRequest; +import org.cloudfoundry.uaa.users.UserInfoResponse; +import org.cloudfoundry.uaa.users.VerifyUserRequest; +import org.cloudfoundry.uaa.users.VerifyUserResponse; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +final class ReactorUsersTest extends AbstractUaaApiTest { + + private final ReactorUsers users = + new ReactorUsers(CONNECTION_CONTEXT, this.root, TOKEN_PROVIDER, Collections.emptyMap()); + + @Test + void changePassword() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path( + "/Users/9140c37c-c5d9-4c4d-a265-b6fe2f9dd02d/password") + .payload("fixtures/uaa/users/PUT_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/PUT_response.json") + .build()) + .build()); + + this.users + .changePassword( + ChangeUserPasswordRequest.builder() + .oldPassword("secret") + .password("newsecret") + .userId("9140c37c-c5d9-4c4d-a265-b6fe2f9dd02d") + .build()) + .as(StepVerifier::create) + .expectNext( + ChangeUserPasswordResponse.builder() + .status("ok") + .message("password updated") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void create() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path("/Users") + .payload("fixtures/uaa/users/POST_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/POST_response.json") + .build()) + .build()); + + this.users + .create( + CreateUserRequest.builder() + .externalId("test-user") + .userName("ZO6FEI@test.org") + .name( + Name.builder() + .familyName("family name") + .givenName("given name") + .build()) + .email( + Email.builder() + .value("ZO6FEI@test.org") + .primary(true) + .build()) + .phoneNumber(PhoneNumber.builder().value("5555555555").build()) + .active(true) + .verified(true) + .origin("") + .password("secret") + .build()) + .as(StepVerifier::create) + .expectNext( + CreateUserResponse.builder() + .id("9d175c69-8f25-4460-82d7-be9657f87a68") + .externalId("test-user") + .meta( + Meta.builder() + .version(0) + .created("2016-05-18T18:25:24.559Z") + .lastModified("2016-05-18T18:25:24.559Z") + .build()) + .userName("ZO6FEI@test.org") + .name( + Name.builder() + .familyName("family name") + .givenName("given name") + .build()) + .email( + Email.builder() + .value("ZO6FEI@test.org") + .primary(false) + .build()) + .phoneNumber(PhoneNumber.builder().value("5555555555").build()) + .group( + Group.builder() + .value("4622c5e1-ddfd-4e17-9e81-2ae3c03972be") + .display("password.write") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("62f67643-05d8-43c6-b193-4cd6ab9960cb") + .display("cloud_controller.write") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("c47bf470-f9c4-4eea-97e4-490ce7b8f6f7") + .display("uaa.user") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("8a6add1f-d3ee-400c-a263-c4197351b78e") + .display("approvals.me") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("e10424ed-ed80-45ac-848b-7f7e79b00c42") + .display("cloud_controller.read") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("ede11441-6ffe-4510-81f8-bb40626155f0") + .display("openid") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("7e3d4b06-0d6b-43a1-ac3a-5f1b2642262c") + .display("scim.me") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("3b481f3c-d9a7-4920-a687-72cb0381b671") + .display( + "cloud_controller_service_permissions.read") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("4480c647-4047-4c6a-877f-70f5f96e8c11") + .display("oauth.approvals") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("542bb178-1c04-4bb5-813a-5a038319ac1d") + .display("user_attributes") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("c4ac4653-2fdd-4901-a028-9c9866cb4e9c") + .display("scim.userids") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("74fde138-daf3-4e4d-bb52-93a6cb727030") + .display("profile") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("1b18551f-eead-4076-90dd-b464998f6ddd") + .display("roles") + .type(DIRECT) + .build()) + .active(true) + .verified(true) + .origin("uaa") + .zoneId("uaa") + .passwordLastModified("2016-05-18T18:25:24.000Z") + .schemas(Collections.singletonList("urn:scim:schemas:core:1.0")) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(DELETE) + .path("/Users/421225f4-318e-4a4d-9219-4b6a0ed3678a") + .header("If-Match", "*") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/DELETE_response.json") + .build()) + .build()); + + this.users + .delete( + DeleteUserRequest.builder() + .userId("421225f4-318e-4a4d-9219-4b6a0ed3678a") + .version("*") + .build()) + .as(StepVerifier::create) + .expectNext( + DeleteUserResponse.builder() + .id("421225f4-318e-4a4d-9219-4b6a0ed3678a") + .externalId("test-user") + .meta( + Meta.builder() + .version(0) + .created("2016-05-18T18:25:23.102Z") + .lastModified("2016-05-18T18:25:23.102Z") + .build()) + .userName("7Q4Rqr@test.org") + .name( + Name.builder() + .familyName("family name") + .givenName("given name") + .build()) + .email( + Email.builder() + .value("7Q4Rqr@test.org") + .primary(false) + .build()) + .group( + Group.builder() + .value("4622c5e1-ddfd-4e17-9e81-2ae3c03972be") + .display("password.write") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("62f67643-05d8-43c6-b193-4cd6ab9960cb") + .display("cloud_controller.write") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("c47bf470-f9c4-4eea-97e4-490ce7b8f6f7") + .display("uaa.user") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("8a6add1f-d3ee-400c-a263-c4197351b78e") + .display("approvals.me") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("e10424ed-ed80-45ac-848b-7f7e79b00c42") + .display("cloud_controller.read") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("ede11441-6ffe-4510-81f8-bb40626155f0") + .display("openid") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("7e3d4b06-0d6b-43a1-ac3a-5f1b2642262c") + .display("scim.me") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("3b481f3c-d9a7-4920-a687-72cb0381b671") + .display( + "cloud_controller_service_permissions.read") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("4480c647-4047-4c6a-877f-70f5f96e8c11") + .display("oauth.approvals") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("542bb178-1c04-4bb5-813a-5a038319ac1d") + .display("user_attributes") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("c4ac4653-2fdd-4901-a028-9c9866cb4e9c") + .display("scim.userids") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("74fde138-daf3-4e4d-bb52-93a6cb727030") + .display("profile") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value("1b18551f-eead-4076-90dd-b464998f6ddd") + .display("roles") + .type(DIRECT) + .build()) + .approval( + Approval.builder() + .userId("421225f4-318e-4a4d-9219-4b6a0ed3678a") + .clientId("identity") + .scope("uaa.user") + .status(APPROVED) + .lastUpdatedAt("2016-05-18T18:25:53.114Z") + .expiresAt("2016-05-18T18:25:53.114Z") + .build()) + .approval( + Approval.builder() + .userId("421225f4-318e-4a4d-9219-4b6a0ed3678a") + .clientId("client id") + .scope("scim.read") + .status(APPROVED) + .lastUpdatedAt("2016-05-18T18:25:23.112Z") + .expiresAt("2016-05-18T18:25:33.112Z") + .build()) + .active(true) + .verified(true) + .origin("uaa") + .zoneId("uaa") + .passwordLastModified("2016-05-18T18:25:23.000Z") + .schemas(Collections.singletonList("urn:scim:schemas:core:1.0")) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void expirePassword() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PATCH) + .path("/Users/9022f2cf-2663-479e-82e6-d2ccc348a1e4/status") + .payload( + "fixtures/uaa/users/PATCH_{id}_status_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/users/PATCH_{id}_status_response.json") + .build()) + .build()); + + this.users + .expirePassword( + ExpirePasswordRequest.builder() + .passwordChangeRequired(true) + .userId("9022f2cf-2663-479e-82e6-d2ccc348a1e4") + .build()) + .as(StepVerifier::create) + .expectNext(ExpirePasswordResponse.builder().passwordChangeRequired(true).build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getVerificationLink() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/Users/1faa46a0-0c6f-4e13-8334-d1f6e5f2e1dd/verify-link?redirect_uri=http%3A%2F%2Fredirect.to%2Fapp") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/users/GET_{id}_verify_link_response.json") + .build()) + .build()); + + this.users + .getVerificationLink( + GetUserVerificationLinkRequest.builder() + .redirectUri("http://redirect.to/app") + .userId("1faa46a0-0c6f-4e13-8334-d1f6e5f2e1dd") + .build()) + .as(StepVerifier::create) + .expectNext( + GetUserVerificationLinkResponse.builder() + .verifyLink("http://localhost/verify_user?code=nOGQWBqCx5") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void inviteUsers() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(POST) + .path( + "/invite_users?client_id=u7ptqw&redirect_uri=example.com") + .payload( + "fixtures/uaa/users/POST_invite_users_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/users//POST_invite_users_response.json") + .build()) + .build()); + + this.users + .invite( + InviteUsersRequest.builder() + .clientId("u7ptqw") + .emails("user1@pjy596.com", "user2@pjy596.com") + .redirectUri("example.com") + .build()) + .as(StepVerifier::create) + .expectNext( + InviteUsersResponse.builder() + .newInvite( + Invite.builder() + .email("user1@pjy596.com") + .userId("68af461b-484e-464a-96ac-a336abed48ad") + .origin("uaa") + .success(true) + .inviteLink( + "http://localhost/invitations/accept?code=WEqtpOh73k") + .build()) + .newInvite( + Invite.builder() + .email("user2@pjy596.com") + .userId("d256cf96-5c14-4649-9a0d-5564c66411b5") + .origin("uaa") + .success(true) + .inviteLink( + "http://localhost/invitations/accept?code=n5X0hCsD3N") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/Users?count=50&filter=id%2Beq%2B%22a94534d5-de08-41eb-8712-a51314e6a484%22%2Bor%2Bemail%2Beq%2B%22Da63pG%40test.org%22&sortBy=email&sortOrder=ascending&startIndex=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/GET_response.json") + .build()) + .build()); + + this.users + .list( + ListUsersRequest.builder() + .filter( + "id+eq+\"a94534d5-de08-41eb-8712-a51314e6a484\"+or+email+eq+\"Da63pG@test.org\"") + .count(50) + .startIndex(1) + .sortBy("email") + .sortOrder(ASCENDING) + .build()) + .as(StepVerifier::create) + .expectNext( + ListUsersResponse.builder() + .resource( + User.builder() + .id("a94534d5-de08-41eb-8712-a51314e6a484") + .externalId("test-user") + .meta( + Meta.builder() + .version(0) + .created("2016-05-18T18:25:24.036Z") + .lastModified( + "2016-05-18T18:25:24.036Z") + .build()) + .userName("Da63pG@test.org") + .name( + Name.builder() + .familyName("family name") + .givenName("given name") + .build()) + .email( + Email.builder() + .value("Da63pG@test.org") + .primary(false) + .build()) + .group( + Group.builder() + .value( + "4622c5e1-ddfd-4e17-9e81-2ae3c03972be") + .display("password.write") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "62f67643-05d8-43c6-b193-4cd6ab9960cb") + .display("cloud_controller.write") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "c47bf470-f9c4-4eea-97e4-490ce7b8f6f7") + .display("uaa.user") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "8a6add1f-d3ee-400c-a263-c4197351b78e") + .display("approvals.me") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "e10424ed-ed80-45ac-848b-7f7e79b00c42") + .display("cloud_controller.read") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "ede11441-6ffe-4510-81f8-bb40626155f0") + .display("openid") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "7e3d4b06-0d6b-43a1-ac3a-5f1b2642262c") + .display("scim.me") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "3b481f3c-d9a7-4920-a687-72cb0381b671") + .display( + "cloud_controller_service_permissions.read") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "4480c647-4047-4c6a-877f-70f5f96e8c11") + .display("oauth.approvals") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "542bb178-1c04-4bb5-813a-5a038319ac1d") + .display("user_attributes") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "c4ac4653-2fdd-4901-a028-9c9866cb4e9c") + .display("scim.userids") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "74fde138-daf3-4e4d-bb52-93a6cb727030") + .display("profile") + .type(DIRECT) + .build()) + .group( + Group.builder() + .value( + "1b18551f-eead-4076-90dd-b464998f6ddd") + .display("roles") + .type(DIRECT) + .build()) + .approval( + Approval.builder() + .userId( + "a94534d5-de08-41eb-8712-a51314e6a484") + .clientId("client id") + .scope("scim.read") + .status(APPROVED) + .lastUpdatedAt( + "2016-05-18T18:25:24.047Z") + .expiresAt( + "2016-05-18T18:25:34.047Z") + .build()) + .active(true) + .verified(true) + .origin("uaa") + .zoneId("uaa") + .passwordLastModified("2016-05-18T18:25:24.000Z") + .schema("urn:scim:schemas:core:1.0") + .build()) + .startIndex(1) + .itemsPerPage(50) + .totalResults(1) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void lookup() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path( + "/ids/Users?count=10&filter=userName%2Beq%2B%22bobOu38vE%40test.org%22%2Bor%2Bid%2Beq%2B%22c1476587-5ec9-4b7e-9ed2-381e3133f07a%22" + + "&includeInactive=true&sortOrder=descending&startIndex=1") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/GET_ids_response.json") + .build()) + .build()); + + this.users + .lookup( + LookupUserIdsRequest.builder() + .filter( + "userName+eq+\"bobOu38vE@test.org\"+or+id+eq+\"c1476587-5ec9-4b7e-9ed2-381e3133f07a\"") + .count(10) + .startIndex(1) + .sortOrder(DESCENDING) + .includeInactive(true) + .build()) + .as(StepVerifier::create) + .expectNext( + LookupUserIdsResponse.builder() + .resource( + UserId.builder() + .id("c1476587-5ec9-4b7e-9ed2-381e3133f07a") + .userName("dwayneSnbjBm@test.org") + .origin("uaa") + .build()) + .resource( + UserId.builder() + .id("2fc67623-ee31-4edc-9b1f-0b50416195fb") + .userName("bobOu38vE@test.org") + .origin("uaa") + .build()) + .startIndex(1) + .itemsPerPage(10) + .totalResults(2) + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(PUT) + .path("/Users/test-user-id") + .header("If-Match", "*") + .payload("fixtures/uaa/users/PUT_{id}_request.json") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/PUT_{id}_response.json") + .build()) + .build()); + + this.users + .update( + UpdateUserRequest.builder() + .active(true) + .email( + Email.builder() + .primary(false) + .value("oH4jON@test.org") + .build()) + .phoneNumber(PhoneNumber.builder().value("5555555555").build()) + .externalId("test-user") + .id(("test-user-id")) + .version("*") + .name( + Name.builder() + .familyName("family name") + .givenName("given name") + .build()) + .origin("uaa") + .userName("oH4jON@test.org") + .verified(true) + .build()) + .as(StepVerifier::create) + .expectNext( + UpdateUserResponse.builder() + .active(true) + .approval( + Approval.builder() + .clientId("identity") + .expiresAt("2016-05-18T18:25:54.239Z") + .lastUpdatedAt("2016-05-18T18:25:54.239Z") + .scope("uaa.user") + .status(DENIED) + .userId("test-user-id") + .build()) + .approval( + Approval.builder() + .clientId("client id") + .expiresAt("2016-05-18T18:25:34.236Z") + .lastUpdatedAt("2016-05-18T18:25:34.236Z") + .scope("scim.read") + .status(APPROVED) + .userId("test-user-id") + .build()) + .email( + Email.builder() + .primary(false) + .value("oH4jON@test.org") + .build()) + .phoneNumber(PhoneNumber.builder().value("5555555555").build()) + .externalId("test-user") + .group( + Group.builder() + .display("password.write") + .value("4622c5e1-ddfd-4e17-9e81-2ae3c03972be") + .type(DIRECT) + .build()) + .group( + Group.builder() + .display("cloud_controller.write") + .value("62f67643-05d8-43c6-b193-4cd6ab9960cb") + .type(DIRECT) + .build()) + .group( + Group.builder() + .display("uaa.user") + .value("c47bf470-f9c4-4eea-97e4-490ce7b8f6f7") + .type(DIRECT) + .build()) + .id(("test-user-id")) + .meta( + Meta.builder() + .created("2016-05-18T18:25:24.222Z") + .lastModified("2016-05-18T18:25:24.265Z") + .version(1) + .build()) + .name( + Name.builder() + .familyName("family name") + .givenName("given name") + .build()) + .origin("uaa") + .passwordLastModified("2016-05-18T18:25:24.000Z") + .schema("urn:scim:schemas:core:1.0") + .userName("oH4jON@test.org") + .verified(true) + .zoneId("uaa") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void userInfo() { + mockRequest( + InteractionContext.builder() + .request(TestRequest.builder().method(GET).path("/userinfo").build()) + .response( + TestResponse.builder() + .status(OK) + .payload("fixtures/uaa/users/GET_userinfo_response.json") + .build()) + .build()); + + this.users + .userInfo(UserInfoRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + UserInfoResponse.builder() + .email("anO0Lv@test.org") + .emailVerified(true) + .familyName("PasswordResetUserLast") + .givenName("PasswordResetUserFirst") + .name("PasswordResetUserFirst PasswordResetUserLast") + .phoneNumber("+15558880000") + .previousLogonTime(null) + .sub("ab485a4f-168a-4de8-b3ac-ab501767bfc9") + .userId("ab485a4f-168a-4de8-b3ac-ab501767bfc9") + .userName("anO0Lv@test.org") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void verifyUser() { + mockRequest( + InteractionContext.builder() + .request( + TestRequest.builder() + .method(GET) + .path("/Users/c0d42e48-9b69-461d-a77b-f75d3a5948b6/verify") + .header("If-Match", "12") + .build()) + .response( + TestResponse.builder() + .status(OK) + .payload( + "fixtures/uaa/users/GET_{id}_verify_user_response.json") + .build()) + .build()); + + this.users + .verify( + VerifyUserRequest.builder() + .userId("c0d42e48-9b69-461d-a77b-f75d3a5948b6") + .version("12") + .build()) + .as(StepVerifier::create) + .expectNext( + VerifyUserResponse.builder() + .id("c0d42e48-9b69-461d-a77b-f75d3a5948b6") + .meta( + Meta.builder() + .version(12) + .created("2016-06-03T17:59:31.027Z") + .lastModified("2016-06-03T17:59:31.027Z") + .build()) + .userName("billy_o@example.com") + .name( + Name.builder() + .familyName("d'Orange") + .givenName("William") + .build()) + .email( + Email.builder() + .value("billy_o@example.com") + .primary(false) + .build()) + .active(true) + .verified(true) + .origin("uaa") + .zoneId("uaa") + .passwordLastModified("2016-06-03T17:59:31.000Z") + .schema("urn:scim:schemas:core:1.0") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/util/CertificateCollectingTrustManagerTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/util/CertificateCollectingTrustManagerTest.java new file mode 100644 index 00000000000..a4ad9fe78ab --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/util/CertificateCollectingTrustManagerTest.java @@ -0,0 +1,123 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.mockito.Mockito.RETURNS_SMART_NULLS; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.verify; + +import java.security.cert.CertificateException; +import java.security.cert.X509Certificate; +import javax.net.ssl.X509TrustManager; +import org.junit.jupiter.api.Test; + +final class CertificateCollectingTrustManagerTest { + + private final X509Certificate[] chain = new X509Certificate[0]; + + private final X509TrustManager delegate = mock(X509TrustManager.class, RETURNS_SMART_NULLS); + + private final CertificateCollectingTrustManager trustManager = + new CertificateCollectingTrustManager(this.delegate); + + @Test + void checkClientTrustedAlreadyCollected() { + assertThrows( + IllegalStateException.class, + () -> { + this.trustManager.checkClientTrusted(this.chain, null); + this.trustManager.checkClientTrusted(this.chain, null); + }); + } + + @Test + void checkClientTrustedNotTrusted() throws CertificateException { + doThrow(new CertificateException()) + .when(this.delegate) + .checkClientTrusted(this.chain, null); + + this.trustManager.checkClientTrusted(this.chain, null); + + assertThat(this.trustManager.isTrusted()).isFalse(); + } + + @Test + void checkClientTrustedTrusted() { + this.trustManager.checkClientTrusted(this.chain, null); + + assertThat(this.trustManager.isTrusted()).isTrue(); + } + + @Test + void checkServerTrustedAlreadyCollected() { + assertThrows( + IllegalStateException.class, + () -> { + this.trustManager.checkServerTrusted(this.chain, null); + this.trustManager.checkServerTrusted(this.chain, null); + }); + } + + @Test + void checkServerTrustedNotTrusted() throws CertificateException { + doThrow(new CertificateException()) + .when(this.delegate) + .checkServerTrusted(this.chain, null); + + this.trustManager.checkServerTrusted(this.chain, null); + + assertThat(this.trustManager.isTrusted()).isFalse(); + } + + @Test + void checkServerTrustedTrusted() { + this.trustManager.checkServerTrusted(this.chain, null); + + assertThat(this.trustManager.isTrusted()).isTrue(); + } + + @Test + void getAcceptedIssuers() { + this.trustManager.getAcceptedIssuers(); + + verify(this.delegate).getAcceptedIssuers(); + } + + @Test + void getCollectedCertificateChain() { + this.trustManager.checkServerTrusted(this.chain, null); + + X509Certificate[] collectedCertificateChain = + this.trustManager.getCollectedCertificateChain(); + assertThat(collectedCertificateChain).isNotNull(); + assertThat(collectedCertificateChain).hasSize(0); + assertThat(collectedCertificateChain).isNotSameAs(this.chain); + } + + @Test + void getCollectedCertificateChainNotCollected() { + assertThat(this.trustManager.getCollectedCertificateChain()).isNull(); + } + + @Test + void isTrusted() { + assertThat(this.trustManager.isTrusted()).isFalse(); + } +} diff --git a/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/util/ErrorPayloadMappersTest.java b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/util/ErrorPayloadMappersTest.java new file mode 100644 index 00000000000..099b9cf9185 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/java/org/cloudfoundry/reactor/util/ErrorPayloadMappersTest.java @@ -0,0 +1,414 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.reactor.util; + +import static io.netty.handler.codec.http.HttpResponseStatus.BAD_REQUEST; +import static io.netty.handler.codec.http.HttpResponseStatus.INTERNAL_SERVER_ERROR; +import static io.netty.handler.codec.http.HttpResponseStatus.OK; +import static org.assertj.core.api.Assertions.assertThat; +import static org.mockito.Mockito.RETURNS_SMART_NULLS; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.time.Duration; +import org.cloudfoundry.UnknownCloudFoundryException; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v3.ClientV3Exception; +import org.cloudfoundry.reactor.HttpClientResponseWithConnection; +import org.cloudfoundry.uaa.UaaException; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.netty.ByteBufFlux; +import reactor.netty.Connection; +import reactor.netty.NettyInbound; +import reactor.netty.http.client.HttpClientResponse; +import reactor.test.StepVerifier; + +final class ErrorPayloadMappersTest { + + private final Connection connection = mock(Connection.class, RETURNS_SMART_NULLS); + + private final NettyInbound inbound = mock(NettyInbound.class, RETURNS_SMART_NULLS); + + private final ObjectMapper objectMapper = new ObjectMapper(); + + private final HttpClientResponse response = mock(HttpClientResponse.class, RETURNS_SMART_NULLS); + + @Test + void clientV2BadPayload() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/invalid_error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(BAD_REQUEST); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV2(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UnknownCloudFoundryException.class) + .hasMessage("Unknown Cloud Foundry Exception") + .extracting("statusCode", "payload") + .containsExactly( + BAD_REQUEST.code(), "Invalid Error Response")) + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV2ClientError() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/client/v2/error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(BAD_REQUEST); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV2(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "CF-UnprocessableEntity(10008): The request is" + + " semantically invalid: space_guid and name" + + " unique") + .extracting( + "statusCode", "code", "description", "errorCode") + .containsExactly( + BAD_REQUEST.code(), + 10008, + "The request is semantically invalid: space_guid" + + " and name unique", + "CF-UnprocessableEntity")) + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV2NoError() { + when(this.response.status()).thenReturn(OK); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV2(this.objectMapper)) + .as(StepVerifier::create) + .expectNext(responseWithConnection) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV2ServerError() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/client/v2/error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(INTERNAL_SERVER_ERROR); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV2(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "CF-UnprocessableEntity(10008): The request is" + + " semantically invalid: space_guid and name" + + " unique") + .extracting( + "statusCode", "code", "description", "errorCode") + .containsExactly( + INTERNAL_SERVER_ERROR.code(), + 10008, + "The request is semantically invalid: space_guid" + + " and name unique", + "CF-UnprocessableEntity")) + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV3BadPayload() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/invalid_error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(BAD_REQUEST); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV3(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UnknownCloudFoundryException.class) + .hasMessage("Unknown Cloud Foundry Exception") + .extracting("statusCode", "payload") + .containsExactly( + BAD_REQUEST.code(), "Invalid Error Response")) + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV3ClientError() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/client/v3/error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(BAD_REQUEST); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV3(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> { + assertThat(t) + .isInstanceOf(ClientV3Exception.class) + .hasMessage( + "CF-UnprocessableEntity(10008): something went wrong") + .extracting("statusCode") + .isEqualTo(BAD_REQUEST.code()); + + assertThat(((ClientV3Exception) t).getErrors()) + .flatExtracting( + org.cloudfoundry.client.v3.Error::getCode, + org.cloudfoundry.client.v3.Error::getDetail, + org.cloudfoundry.client.v3.Error::getTitle) + .containsExactly( + 10008, + "something went wrong", + "CF-UnprocessableEntity"); + }) + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV3NoError() { + when(this.response.status()).thenReturn(OK); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV3(this.objectMapper)) + .as(StepVerifier::create) + .expectNext(responseWithConnection) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void clientV3ServerError() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/client/v3/error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(INTERNAL_SERVER_ERROR); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.clientV3(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> { + assertThat(t) + .isInstanceOf(ClientV3Exception.class) + .hasMessage( + "CF-UnprocessableEntity(10008): something went wrong") + .extracting("statusCode") + .isEqualTo(INTERNAL_SERVER_ERROR.code()); + + assertThat(((ClientV3Exception) t).getErrors()) + .flatExtracting( + org.cloudfoundry.client.v3.Error::getCode, + org.cloudfoundry.client.v3.Error::getDetail, + org.cloudfoundry.client.v3.Error::getTitle) + .containsExactly( + 10008, + "something went wrong", + "CF-UnprocessableEntity"); + }) + .verify(Duration.ofSeconds(1)); + } + + @Test + void uaaBadPayload() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/invalid_error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(BAD_REQUEST); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.uaa(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UnknownCloudFoundryException.class) + .hasMessage("Unknown Cloud Foundry Exception") + .extracting("statusCode", "payload") + .containsExactly( + BAD_REQUEST.code(), "Invalid Error Response")) + .verify(Duration.ofSeconds(1)); + } + + @Test + void uaaClientError() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/uaa/error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(BAD_REQUEST); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.uaa(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UaaException.class) + .hasMessage("unauthorized: Bad credentials") + .extracting( + "statusCode", + "error", + "errorDescription", + "payload") + .containsExactly( + BAD_REQUEST.code(), + "unauthorized", + "Bad credentials", + "{\n" + + " \"error\": \"unauthorized\",\n" + + " \"error_description\": \"Bad" + + " credentials\",\n" + + " \"extra_information\": {\n" + + " \"some\": [\n" + + " \"extra\",\n" + + " \"information\"\n" + + " ]\n" + + " }\n" + + "}\n")) + .verify(Duration.ofSeconds(1)); + } + + @Test + void uaaNoError() { + when(this.response.status()).thenReturn(OK); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.uaa(this.objectMapper)) + .as(StepVerifier::create) + .expectNext(responseWithConnection) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void uaaServerError() throws IOException { + when(this.connection.inbound()).thenReturn(this.inbound); + when(this.inbound.receive()) + .thenReturn( + ByteBufFlux.fromPath( + new ClassPathResource("fixtures/uaa/error_response.json") + .getFile() + .toPath())); + when(this.response.status()).thenReturn(INTERNAL_SERVER_ERROR); + HttpClientResponseWithConnection responseWithConnection = + buildResponseWithConnection(this.connection); + + Flux.just(responseWithConnection) + .transform(ErrorPayloadMappers.uaa(this.objectMapper)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UaaException.class) + .hasMessage("unauthorized: Bad credentials") + .extracting( + "statusCode", + "error", + "errorDescription", + "payload") + .containsExactly( + INTERNAL_SERVER_ERROR.code(), + "unauthorized", + "Bad credentials", + "{\n" + + " \"error\": \"unauthorized\",\n" + + " \"error_description\": \"Bad" + + " credentials\",\n" + + " \"extra_information\": {\n" + + " \"some\": [\n" + + " \"extra\",\n" + + " \"information\"\n" + + " ]\n" + + " }\n" + + "}\n")) + .verify(Duration.ofSeconds(1)); + } + + private HttpClientResponseWithConnection buildResponseWithConnection(Connection connection) { + return HttpClientResponseWithConnection.of(connection, this.response); + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/GET_response.json new file mode 100644 index 00000000000..611fa8679a9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/GET_response.json @@ -0,0 +1,35 @@ +{ + "links": { + "self": { + "href": "https://api.run.pivotal.io" + }, + "cloud_controller_v2": { + "href": "https://api.run.pivotal.io/v2", + "meta": { + "version": "2.93.0" + } + }, + "cloud_controller_v3": { + "href": "https://api.run.pivotal.io/v3", + "meta": { + "version": "3.28.0" + } + }, + "empty_value": null, + "network_policy_v0": { + "href": "https://api.run.pivotal.io/networking/v0/external" + }, + "network_policy_v1": { + "href": "https://api.run.pivotal.io/networking/v1/external" + }, + "uaa": { + "href": "https://uaa.run.pivotal.io" + }, + "log_cache": { + "href": "https://cache-for-logging.run.pivotal.io" + }, + "logging": { + "href": "wss://doppler.run.pivotal.io:443" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/app_usage_events/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/app_usage_events/GET_response.json new file mode 100644 index 00000000000..44284b7a6db --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/app_usage_events/GET_response.json @@ -0,0 +1,33 @@ +{ + "total_results": 2, + "total_pages": 2, + "prev_url": null, + "next_url": "/v2/app_usage_events?after_guid=f1d8ddec-d36a-4670-acb8-6082a1f1a95f&order-direction=asc&page=2&results-per-page=1", + "resources": [ + { + "metadata": { + "guid": "12dc4396-b7d1-444e-a3b4-9497c4ca0d14", + "url": "/v2/app_usage_events/12dc4396-b7d1-444e-a3b4-9497c4ca0d14", + "created_at": "2016-03-14T22:30:38Z" + }, + "entity": { + "state": "STARTED", + "memory_in_mb_per_instance": 564, + "instance_count": 1, + "app_guid": "guid-1460025b-eb6a-4459-8f43-0d7db43dc71f", + "app_name": "name-1783", + "space_guid": "guid-766a0db1-6391-4d9e-9ce9-f2f7cdf93190", + "space_name": "name-1784", + "org_guid": "guid-7f111ae5-9017-49f6-afe7-3a175b9f7a79", + "buildpack_guid": "guid-c17e9ffa-a1f8-4140-9718-f627be3a3459", + "buildpack_name": "name-1785", + "package_state": "STAGED", + "parent_app_guid": null, + "parent_app_name": null, + "process_type": "web", + "task_name": null, + "task_guid": null + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/app_usage_events/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/app_usage_events/GET_{id}_response.json new file mode 100644 index 00000000000..8f7baf5f7b8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/app_usage_events/GET_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "caac0ed4-febf-48a4-951f-c0a7fadf6a68", + "url": "/v2/app_usage_events/caac0ed4-febf-48a4-951f-c0a7fadf6a68", + "created_at": "2016-03-17T21:41:21Z" + }, + "entity": { + "state": "STARTED", + "memory_in_mb_per_instance": 564, + "instance_count": 1, + "app_guid": "guid-8cdd38d1-2c13-46a5-8f5e-e91a6cc4b060", + "app_name": "name-1103", + "space_guid": "guid-9c4485f6-7579-45da-8c07-f62e1bc8c499", + "space_name": "name-1104", + "org_guid": "guid-1ed968f6-a9f7-469b-a04f-ed1ebc2df1e7", + "buildpack_guid": "guid-1ffac859-4635-41fd-91bb-3ba07768a5ec", + "buildpack_name": "name-1105", + "package_state": "STAGED", + "parent_app_guid": null, + "parent_app_name": null, + "process_type": "web", + "task_name": null, + "task_guid": null + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_apps_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_apps_response.json new file mode 100644 index 00000000000..2eaf749a4aa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_apps_response.json @@ -0,0 +1,148 @@ +{ + "total_results": 3, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "3d294ed0-105c-4ccd-8f79-5605d6b7198c", + "url": "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": "2015-07-27T22:43:20Z" + }, + "entity": { + "name": "name-761", + "production": false, + "space_guid": "30d5165d-0bef-4103-97cd-72269b9d7a4c", + "stack_guid": "d3476df6-534d-4140-b85b-401fa4923234", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "3ca77d11-93e0-4a60-bab5-30f38b8a8649", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:20Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/30d5165d-0bef-4103-97cd-72269b9d7a4c", + "stack_url": "/v2/stacks/d3476df6-534d-4140-b85b-401fa4923234", + "events_url": "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/events", + "service_bindings_url": "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/service_bindings", + "routes_url": "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/routes", + "route_mappings_url": "/v2/apps/3d294ed0-105c-4ccd-8f79-5605d6b7198c/route_mappings", + "ports": null + } + }, + { + "metadata": { + "guid": "522c5382-29e9-48aa-9db0-9f6cfa643ec1", + "url": "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": "2015-07-27T22:43:20Z" + }, + "entity": { + "name": "name-766", + "production": false, + "space_guid": "cf929611-97ab-4c42-93e5-9ec26e26f456", + "stack_guid": "14b4a0b7-7c7b-4cf2-99f0-cc3ed1473f09", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "cddf0ec1-acf6-48e7-831b-884972cb7ac3", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:20Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/cf929611-97ab-4c42-93e5-9ec26e26f456", + "stack_url": "/v2/stacks/14b4a0b7-7c7b-4cf2-99f0-cc3ed1473f09", + "events_url": "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/events", + "service_bindings_url": "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/service_bindings", + "routes_url": "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/routes", + "route_mappings_url": "/v2/apps/522c5382-29e9-48aa-9db0-9f6cfa643ec1/route_mappings", + "ports": null + } + }, + { + "metadata": { + "guid": "ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf", + "url": "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": "2015-07-27T22:43:20Z" + }, + "entity": { + "name": "name-771", + "production": false, + "space_guid": "e438b2bf-17d6-4265-8813-18e0ab95c029", + "stack_guid": "8d42ba27-60df-420e-9208-535e753b706a", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "8e74d312-1bc9-4953-b4fe-d2613ea4972a", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:20Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/e438b2bf-17d6-4265-8813-18e0ab95c029", + "stack_url": "/v2/stacks/8d42ba27-60df-420e-9208-535e753b706a", + "events_url": "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/events", + "service_bindings_url": "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/service_bindings", + "routes_url": "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/routes", + "route_mappings_url": "/v2/apps/ec31bfbd-ab5c-490d-8e83-3c1ea5d1bedf/route_mappings" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_download_response.bin b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_download_response.bin new file mode 100644 index 00000000000..66d3f44176a Binary files /dev/null and b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_download_response.bin differ diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_env_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_env_response.json new file mode 100644 index 00000000000..bc8ce9010db --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_env_response.json @@ -0,0 +1,36 @@ +{ + "staging_env_json": { + "STAGING_ENV": "staging_value" + }, + "running_env_json": { + "RUNNING_ENV": "running_value" + }, + "environment_json": { + "env_var": "env_val" + }, + "system_env_json": { + "VCAP_SERVICES": { + } + }, + "application_env_json": { + "VCAP_APPLICATION": { + "limits": { + "mem": 1024, + "disk": 1024, + "fds": 16384 + }, + "application_id": "96e63272-5da0-44b8-90a9-63d12b2692bb", + "application_version": "86cef6fd-fb03-4f02-97ff-cc6b9d80bbf4", + "application_name": "name-897", + "application_uris": [ + ], + "version": "86cef6fd-fb03-4f02-97ff-cc6b9d80bbf4", + "name": "name-897", + "space_name": "name-898", + "space_id": "147eef57-aadb-43b0-9518-b355ab4db678", + "uris": [ + ], + "users": null + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_instances_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_instances_response.json new file mode 100644 index 00000000000..2475e1d3ae0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_instances_response.json @@ -0,0 +1,10 @@ +{ + "0": { + "state": "RUNNING", + "since": 1403140717.984577, + "debug_ip": null, + "debug_port": null, + "console_ip": null, + "console_port": null + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_permissions_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_permissions_response.json new file mode 100644 index 00000000000..07d94f9af18 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_permissions_response.json @@ -0,0 +1,4 @@ +{ + "read_sensitive_data": true, + "read_basic_data": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_response.json new file mode 100644 index 00000000000..539ece7647c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_response.json @@ -0,0 +1,46 @@ +{ + "metadata": { + "guid": "03f286bb-f17c-42b4-8dcd-b818b0b798af", + "url": "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": "2015-07-27T22:43:20Z" + }, + "entity": { + "name": "name-751", + "production": false, + "space_guid": "b10ca4ed-fa71-4597-8567-e7dd1719c0c7", + "stack_guid": "160fb300-c60e-4682-8527-8500e0318839", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "2b0d7e20-ce57-44b4-b0ec-7ca6d1d50e20", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:20Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/b10ca4ed-fa71-4597-8567-e7dd1719c0c7", + "stack_url": "/v2/stacks/160fb300-c60e-4682-8527-8500e0318839", + "events_url": "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/events", + "service_bindings_url": "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/service_bindings", + "route_mappings_url": "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/route_mappings", + "routes_url": "/v2/apps/03f286bb-f17c-42b4-8dcd-b818b0b798af/routes" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_routes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_routes_response.json new file mode 100644 index 00000000000..06c09e9ac82 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_routes_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "893e7d4e-2038-4253-8dd6-1e056d5b24b3", + "url": "/v2/routes/893e7d4e-2038-4253-8dd6-1e056d5b24b3", + "created_at": "2016-03-17T21:41:11Z", + "updated_at": null + }, + "entity": { + "host": "host-1", + "path": "", + "domain_guid": "b7174cc3-c108-40a6-bc21-87da4475b759", + "space_guid": "ccba126a-e222-4845-82fd-5b84a805158a", + "service_instance_guid": null, + "port": 0, + "domain_url": "/v2/domains/b7174cc3-c108-40a6-bc21-87da4475b759", + "space_url": "/v2/spaces/ccba126a-e222-4845-82fd-5b84a805158a", + "apps_url": "/v2/routes/893e7d4e-2038-4253-8dd6-1e056d5b24b3/apps", + "route_mappings_url": "/v2/routes/893e7d4e-2038-4253-8dd6-1e056d5b24b3/route_mappings" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_service_bindings_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_service_bindings_response.json new file mode 100644 index 00000000000..4298a494814 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_service_bindings_response.json @@ -0,0 +1,30 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "42eda707-fe4d-4eed-9b39-7cb5e665c226", + "url": "/v2/service_bindings/42eda707-fe4d-4eed-9b39-7cb5e665c226", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": null + }, + "entity": { + "app_guid": "26ddc1de-3eeb-424b-82f3-f7f30a38b610", + "service_instance_guid": "650d0eb7-3b83-414a-82a0-d503d1c8eb5f", + "credentials": { + "creds-key-356": "creds-val-356" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/26ddc1de-3eeb-424b-82f3-f7f30a38b610", + "service_instance_url": "/v2/service_instances/650d0eb7-3b83-414a-82a0-d503d1c8eb5f" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_stats_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_stats_response.json new file mode 100644 index 00000000000..acb96780f2f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_stats_response.json @@ -0,0 +1,24 @@ +{ + "0": { + "state": "RUNNING", + "isolation_segment": "iso-seg-name", + "stats": { + "usage": { + "disk": 66392064, + "mem": 29880320, + "cpu": 0.13511219703079957, + "time": "2014-06-19 22:37:58 +0000" + }, + "name": "app_name", + "uris": [ + "app_name.example.com" + ], + "host": "10.0.0.1", + "port": 61035, + "uptime": 65007, + "mem_quota": 536870912, + "disk_quota": 1073741824, + "fds_quota": 16384 + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_summary_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_summary_response.json new file mode 100644 index 00000000000..3337da76ba6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/GET_{id}_summary_response.json @@ -0,0 +1,85 @@ +{ + "guid": "2ee5ef3f-3884-4240-ab99-c747ea21663b", + "name": "name-1136", + "routes": [ + { + "guid": "704e6015-9785-42a3-b23c-06598154594d", + "host": "host-23", + "port": null, + "path": "", + "domain": { + "guid": "ebddac49-b094-4ce7-8c9b-0e00b4bc7525", + "name": "domain-72.example.com" + } + } + ], + "running_instances": 0, + "services": [ + { + "guid": "01826f41-9d8b-4458-88c6-9b8ddb04d0e8", + "name": "name-1138", + "bound_app_count": 1, + "last_operation": null, + "dashboard_url": null, + "service_plan": { + "guid": "6dce1c90-929b-466c-98d1-1b856dc6e221", + "name": "name-1139", + "service": { + "guid": "994dae37-1a53-4959-aaa6-ba85e77d35e6", + "label": "label-46", + "provider": null, + "version": null + } + } + } + ], + "available_domains": [ + { + "guid": "ebddac49-b094-4ce7-8c9b-0e00b4bc7525", + "name": "domain-72.example.com", + "owning_organization_guid": "48e781a9-3ccd-469c-a5cc-91bc86722924" + }, + { + "guid": "4f6e6f6e-695a-44df-816b-3d48ec05702b", + "name": "customer-app-domain1.com", + "router_group_guid": null, + "router_group_type": null + }, + { + "guid": "43c8f83f-95b4-46fe-94cc-7748565d9a2b", + "name": "customer-app-domain2.com", + "router_group_guid": null, + "router_group_type": null + } + ], + "production": false, + "space_guid": "1fa31e11-a974-45b6-873c-ef690ce93e2b", + "stack_guid": "4a447da1-c518-4acb-b691-8d370df83b48", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "0a5fecd5-d790-43cc-a9bf-640db1b00b1b", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2016-04-22T19:33:29Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "ports": [] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_request.json new file mode 100644 index 00000000000..e4be217e9f6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_request.json @@ -0,0 +1,6 @@ +{ + "name": "docker_app", + "space_guid": "6ef4e580-c189-49c8-959e-4a3d021b3307", + "docker_image": "cloudfoundry/hello", + "diego": true +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_response.json new file mode 100644 index 00000000000..f1dc48bd45d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_response.json @@ -0,0 +1,48 @@ +{ + "metadata": { + "guid": "78d1a119-2ded-405f-8675-421d8dade602", + "url": "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": null + }, + "entity": { + "name": "docker_app", + "production": false, + "space_guid": "6ef4e580-c189-49c8-959e-4a3d021b3307", + "stack_guid": "d449ecea-669f-448a-a9e7-ec84d51e2fdb", + "buildpack": null, + "detected_buildpack": null, + "environment_json": { + }, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "69ebcffe-d79b-482a-91b6-39dfc86e7692", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": true, + "docker_image": "cloudfoundry/hello:latest", + "package_updated_at": "2015-07-27T22:43:20Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/6ef4e580-c189-49c8-959e-4a3d021b3307", + "stack_url": "/v2/stacks/d449ecea-669f-448a-a9e7-ec84d51e2fdb", + "events_url": "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/events", + "service_bindings_url": "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/service_bindings", + "routes_url": "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/routes", + "route_mappings_url": "/v2/apps/78d1a119-2ded-405f-8675-421d8dade602/route_mappings", + "ports": [] + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_copy_bits_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_copy_bits_request.json new file mode 100644 index 00000000000..a532fd8806d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_copy_bits_request.json @@ -0,0 +1,3 @@ +{ + "source_app_guid": "af6ab819-3fb7-42e3-a0f6-947022881b7b" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_copy_bits_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_copy_bits_response.json new file mode 100644 index 00000000000..de921b0b117 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_copy_bits_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "c900719e-c70a-4c75-9e6a-9535f118acc3", + "created_at": "2015-07-27T22:43:34Z", + "url": "/v2/jobs/c900719e-c70a-4c75-9e6a-9535f118acc3" + }, + "entity": { + "guid": "c900719e-c70a-4c75-9e6a-9535f118acc3", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_restage_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_restage_response.json new file mode 100644 index 00000000000..9bd132befd9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/POST_{id}_restage_response.json @@ -0,0 +1,41 @@ +{ + "metadata": { + "guid": "2c6b3d3c-47bb-4060-be49-a56496ab57d4", + "url": "/v2/apps/2c6b3d3c-47bb-4060-be49-a56496ab57d4", + "created_at": "2015-07-27T22:43:33Z", + "updated_at": "2015-07-27T22:43:33Z" + }, + "entity": { + "name": "name-2307", + "production": false, + "space_guid": "1b59d670-770e-48b7-9056-b2eb64c8445d", + "stack_guid": "ae6c816a-887f-44a4-af1a-a611902ba09c", + "buildpack": null, + "detected_buildpack": null, + "environment_json": {}, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STARTED", + "version": "102573ce-4e28-4271-b042-3539098c7b30", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:33Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "ports": [] + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_bits_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_bits_response.json new file mode 100644 index 00000000000..c4af5f37b99 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_bits_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "eff6a47e-67a1-4e3b-99a5-4f9bcab7620a", + "created_at": "2015-07-27T22:43:33Z", + "url": "/v2/jobs/eff6a47e-67a1-4e3b-99a5-4f9bcab7620a" + }, + "entity": { + "guid": "eff6a47e-67a1-4e3b-99a5-4f9bcab7620a", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_droplet_upload_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_droplet_upload_response.json new file mode 100644 index 00000000000..8be4f36a878 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_droplet_upload_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "8d321cee-8633-42e9-a021-78876d0d389c", + "created_at": "2016-06-08T16:41:21Z", + "url": "/v2/jobs/8d321cee-8633-42e9-a021-78876d0d389c" + }, + "entity": { + "guid": "8d321cee-8633-42e9-a021-78876d0d389c", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_request.json new file mode 100644 index 00000000000..abc616efa0f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_request.json @@ -0,0 +1,4 @@ +{ + "name": "new_name", + "environment_json": {} +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_response.json new file mode 100644 index 00000000000..690541c1957 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_response.json @@ -0,0 +1,47 @@ +{ + "metadata": { + "guid": "0c71909b-3d44-49c3-b65d-13894d70972c", + "url": "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c", + "created_at": "2015-07-27T22:43:21Z", + "updated_at": "2015-07-27T22:43:21Z" + }, + "entity": { + "name": "new_name", + "production": false, + "space_guid": "701aebe5-92fd-44cf-a7e6-bc54685c32ea", + "stack_guid": "2cdc06a4-cb6e-4191-9ce8-b6bca4a16aaf", + "buildpack": null, + "detected_buildpack": null, + "environment_json": {}, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "89c2beaa-5f16-49f2-bf8c-cbe49edf555b", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:21Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/701aebe5-92fd-44cf-a7e6-bc54685c32ea", + "stack_url": "/v2/stacks/2cdc06a4-cb6e-4191-9ce8-b6bca4a16aaf", + "events_url": "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/events", + "service_bindings_url": "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/service_bindings", + "routes_url": "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/routes", + "route_mappings_url": "/v2/apps/0c71909b-3d44-49c3-b65d-13894d70972c/route_mappings", + "ports": [] + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_routes_{route-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_routes_{route-id}_response.json new file mode 100644 index 00000000000..a2ee72c662f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/PUT_{id}_routes_{route-id}_response.json @@ -0,0 +1,47 @@ +{ + "metadata": { + "guid": "638e90b6-502f-47a8-a3bf-b18fdf3fb70a", + "url": "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a", + "created_at": "2015-07-27T22:43:19Z", + "updated_at": "2015-07-27T22:43:19Z" + }, + "entity": { + "name": "name-657", + "production": false, + "space_guid": "bc900bc3-df1f-4842-9621-e69b90207ad1", + "stack_guid": "46576b60-3d3e-42a6-bdb3-171bc2dedfc4", + "buildpack": null, + "detected_buildpack": null, + "environment_json": {}, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "eee05ab9-9d6c-490c-932a-996d061b5fe4", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:19Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/bc900bc3-df1f-4842-9621-e69b90207ad1", + "stack_url": "/v2/stacks/46576b60-3d3e-42a6-bdb3-171bc2dedfc4", + "events_url": "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/events", + "service_bindings_url": "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/service_bindings", + "routes_url": "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/routes", + "route_mappings_url": "/v2/apps/638e90b6-502f-47a8-a3bf-b18fdf3fb70a/route_mappings", + "ports": [] + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/test-application.zip b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/test-application.zip new file mode 100644 index 00000000000..b2f47e917c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/test-application.zip @@ -0,0 +1 @@ +test-content \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/test-droplet.tgz b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/test-droplet.tgz new file mode 100644 index 00000000000..b2f47e917c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/apps/test-droplet.tgz @@ -0,0 +1 @@ +test-content \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/blobstores/DELETE_buildpack_cache_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/blobstores/DELETE_buildpack_cache_response.json new file mode 100644 index 00000000000..f207e48e5a1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/blobstores/DELETE_buildpack_cache_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "919a6964-ea88-43cc-9ac1-0dbc3769f743", + "created_at": "2016-06-08T16:41:31Z", + "url": "/v2/jobs/919a6964-ea88-43cc-9ac1-0dbc3769f743" + }, + "entity": { + "guid": "919a6964-ea88-43cc-9ac1-0dbc3769f743", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/DELETE_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/DELETE_{id}_response.json new file mode 100644 index 00000000000..756db1ccd1b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/DELETE_{id}_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "c900719e-c70a-4c75-9e6a-9535f118acc3", + "created_at": "2015-07-27T22:43:34Z", + "url": "/v2/jobs/c900719e-c70a-4c75-9e6a-9535f118acc3" + }, + "entity": { + "guid": "c900719e-c70a-4c75-9e6a-9535f118acc3", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/GET_response.json new file mode 100644 index 00000000000..094044b1654 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/GET_response.json @@ -0,0 +1,53 @@ +{ + "total_results": 3, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "45203d32-475b-4d55-9d34-3ffc935edd49", + "url": "/v2/buildpacks/45203d32-475b-4d55-9d34-3ffc935edd49", + "created_at": "2016-03-17T21:41:28Z", + "updated_at": null + }, + "entity": { + "name": "name_1", + "position": 1, + "enabled": true, + "locked": false, + "filename": "name-2308" + } + }, + { + "metadata": { + "guid": "1aeb95ef-7058-495c-b260-dea2e8efb976", + "url": "/v2/buildpacks/1aeb95ef-7058-495c-b260-dea2e8efb976", + "created_at": "2016-03-17T21:41:28Z", + "updated_at": null + }, + "entity": { + "name": "name_2", + "position": 2, + "enabled": true, + "locked": false, + "filename": "name-2309" + } + }, + { + "metadata": { + "guid": "4dd0046a-7a54-4f57-a31f-06d7e57eb463", + "url": "/v2/buildpacks/4dd0046a-7a54-4f57-a31f-06d7e57eb463", + "created_at": "2016-03-17T21:41:28Z", + "updated_at": null + }, + "entity": { + "name": "name_3", + "position": 3, + "enabled": true, + "locked": false, + "filename": "name-2310" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/GET_{id}_response.json new file mode 100644 index 00000000000..0283a7134d7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/GET_{id}_response.json @@ -0,0 +1,15 @@ +{ + "metadata": { + "guid": "35d3fa06-08db-4b9e-b2a7-58724a179687", + "url": "/v2/buildpacks/35d3fa06-08db-4b9e-b2a7-58724a179687", + "created_at": "2016-03-17T21:41:28Z", + "updated_at": null + }, + "entity": { + "name": "name_1", + "position": 1, + "enabled": true, + "locked": false, + "filename": "name-2302" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/POST_request.json new file mode 100644 index 00000000000..ae8e73b8682 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/POST_request.json @@ -0,0 +1,3 @@ +{ + "name": "Golang_buildpack" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/POST_response.json new file mode 100644 index 00000000000..4f70646f09c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/POST_response.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "guid": "11bd4dd1-134e-4d15-b8fe-dd9f36bae66a", + "url": "/v2/buildpacks/11bd4dd1-134e-4d15-b8fe-dd9f36bae66a", + "created_at": "2016-06-08T16:41:31Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "Golang_buildpack", + "stack": "cflinuxfs2", + "position": 1, + "enabled": true, + "locked": false, + "filename": null + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_bits_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_bits_response.json new file mode 100644 index 00000000000..ad55267bfc0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_bits_response.json @@ -0,0 +1,15 @@ +{ + "metadata": { + "guid": "353360ea-59bb-414b-a90e-100c37317a02", + "url": "/v2/buildpacks/353360ea-59bb-414b-a90e-100c37317a02", + "created_at": "2016-04-21T08:51:39Z", + "updated_at": "2016-04-21T09:38:16Z" + }, + "entity": { + "name": "binary_buildpack", + "position": 8, + "enabled": true, + "locked": false, + "filename": "binary_buildpack-cached-v1.0.1.zip" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_request.json new file mode 100644 index 00000000000..c994fef1c29 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_request.json @@ -0,0 +1,3 @@ +{ + "enabled": false +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_response.json new file mode 100644 index 00000000000..ecd7d2bd3fd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/PUT_{id}_response.json @@ -0,0 +1,15 @@ +{ + "metadata": { + "guid": "edd64481-e13c-4193-b6cc-2a727a62e817", + "url": "/v2/buildpacks/edd64481-e13c-4193-b6cc-2a727a62e817", + "created_at": "2016-03-17T21:41:28Z", + "updated_at": "2016-03-17T21:41:28Z" + }, + "entity": { + "name": "name_1", + "position": 1, + "enabled": false, + "locked": false, + "filename": "name-2314" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/test-buildpack.zip b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/test-buildpack.zip new file mode 100644 index 00000000000..b2f47e917c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/buildpacks/test-buildpack.zip @@ -0,0 +1 @@ +test-content \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_running_security_groups_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_running_security_groups_response.json new file mode 100644 index 00000000000..db368f11032 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_running_security_groups_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "1f2f24f8-f68c-4a3b-b51a-8134fe2626d8", + "url": "/v2/config/running_security_groups/1f2f24f8-f68c-4a3b-b51a-8134fe2626d8", + "created_at": "2016-04-06T00:17:17Z", + "updated_at": null + }, + "entity": { + "name": "name-114", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": true, + "staging_default": false + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_staging_security_groups_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_staging_security_groups_response.json new file mode 100644 index 00000000000..a61b93f2d19 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_staging_security_groups_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "c0bb3afb-ae01-4af0-96cf-a5b0d2dca894", + "url": "/v2/config/staging_security_groups/c0bb3afb-ae01-4af0-96cf-a5b0d2dca894", + "created_at": "2016-04-16T01:23:52Z", + "updated_at": null + }, + "entity": { + "name": "name-570", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": false, + "staging_default": true + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_{id}_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_{id}_spaces_response.json new file mode 100644 index 00000000000..f7595ed14c7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/GET_{id}_spaces_response.json @@ -0,0 +1,33 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "3435dd59-f289-4191-83e6-6201d6fb6a22", + "url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22", + "created_at": "2016-06-08T16:41:21Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-40", + "organization_guid": "1d1dd3f4-36bd-4380-8d01-3c7a934a9281", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/1d1dd3f4-36bd-4380-8d01-3c7a934a9281", + "developers_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/developers", + "managers_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/managers", + "auditors_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/auditors", + "apps_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/apps", + "routes_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/routes", + "domains_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/domains", + "service_instances_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/service_instances", + "app_events_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/app_events", + "events_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/events", + "security_groups_url": "/v2/spaces/3435dd59-f289-4191-83e6-6201d6fb6a22/security_groups" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/PUT_{id}_running_security_groups_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/PUT_{id}_running_security_groups_response.json new file mode 100644 index 00000000000..a9579b568a1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/PUT_{id}_running_security_groups_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "9aa7ab9c-997f-4f87-be50-87105521881a", + "url": "/v2/config/running_security_groups/9aa7ab9c-997f-4f87-be50-87105521881a", + "created_at": "2016-04-06T00:17:17Z", + "updated_at": "2016-04-06T00:17:17Z" + }, + "entity": { + "name": "name-109", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": true, + "staging_default": false + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/PUT_{id}_staging_security_groups_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/PUT_{id}_staging_security_groups_response.json new file mode 100644 index 00000000000..d07e19dc936 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/config/PUT_{id}_staging_security_groups_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "50165fce-6c41-4c35-a4d8-3858ee217d36", + "url": "/v2/config/staging_security_groups/50165fce-6c41-4c35-a4d8-3858ee217d36", + "created_at": "2016-04-16T01:23:52Z", + "updated_at": "2016-04-16T01:23:52Z" + }, + "entity": { + "name": "name-567", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": false, + "staging_default": true + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_response.json new file mode 100644 index 00000000000..766ca2192cb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_response.json @@ -0,0 +1,55 @@ +{ + "total_results": 4, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "c8e670ff-2473-4e21-8047-afc6e0c62ce7", + "url": "/v2/domains/c8e670ff-2473-4e21-8047-afc6e0c62ce7", + "created_at": "2015-07-27T22:43:31Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain1.com" + } + }, + { + "metadata": { + "guid": "2b63d3fa-52e9-4f12-87d1-a96af5bd3cd4", + "url": "/v2/domains/2b63d3fa-52e9-4f12-87d1-a96af5bd3cd4", + "created_at": "2015-07-27T22:43:31Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain2.com" + } + }, + { + "metadata": { + "guid": "2c60a78c-0f6e-4ef8-81db-f3a6cb5e31da", + "url": "/v2/domains/2c60a78c-0f6e-4ef8-81db-f3a6cb5e31da", + "created_at": "2015-07-27T22:43:31Z", + "updated_at": null + }, + "entity": { + "name": "vcap.me", + "owning_organization_guid": "f93d5a41-5d35-4e21-ac32-421dfd545d3c", + "owning_organization_url": "/v2/organizations/f93d5a41-5d35-4e21-ac32-421dfd545d3c", + "spaces_url": "/v2/domains/2c60a78c-0f6e-4ef8-81db-f3a6cb5e31da/spaces" + } + }, + { + "metadata": { + "guid": "b37aab98-5882-420a-a91f-65539e36e860", + "url": "/v2/domains/b37aab98-5882-420a-a91f-65539e36e860", + "created_at": "2015-07-27T22:43:33Z", + "updated_at": null + }, + "entity": { + "name": "domain-62.example.com" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_{id}_response.json new file mode 100644 index 00000000000..391687e174c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_{id}_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "7cd249aa-197c-425c-8831-57cbc24e8e26", + "url": "/v2/domains/7cd249aa-197c-425c-8831-57cbc24e8e26", + "created_at": "2015-07-27T22:43:33Z", + "updated_at": null + }, + "entity": { + "name": "domain-63.example.com" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_{id}_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_{id}_spaces_response.json new file mode 100644 index 00000000000..d03d6a6d293 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/GET_{id}_spaces_response.json @@ -0,0 +1,33 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "d1686ef7-59dc-4ada-8900-85e89d749046", + "url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046", + "created_at": "2015-07-27T22:43:33Z", + "updated_at": null + }, + "entity": { + "name": "name-2311", + "organization_guid": "836b112a-30bc-4d55-b8e4-7323849759d1", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/836b112a-30bc-4d55-b8e4-7323849759d1", + "developers_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/developers", + "managers_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/managers", + "auditors_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/auditors", + "apps_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/apps", + "routes_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/routes", + "domains_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/domains", + "service_instances_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/service_instances", + "app_events_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/app_events", + "events_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/events", + "security_groups_url": "/v2/spaces/d1686ef7-59dc-4ada-8900-85e89d749046/security_groups" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/POST_request.json new file mode 100644 index 00000000000..e02fcb6c41a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/POST_request.json @@ -0,0 +1,5 @@ +{ + "name": "exmaple.com", + "wildcard": true, + "owning_organization_guid": "09e0d56f-4e50-4bff-af83-9bd87a7d7f00" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/POST_response.json new file mode 100644 index 00000000000..8c3d84214ec --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/domains/POST_response.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "guid": "abb8338f-eaea-4149-85c0-61888bac0737", + "url": "/v2/domains/abb8338f-eaea-4149-85c0-61888bac0737", + "created_at": "2015-07-27T22:43:33Z", + "updated_at": null + }, + "entity": { + "name": "exmaple.com", + "owning_organization_guid": "09e0d56f-4e50-4bff-af83-9bd87a7d7f00", + "shared_organizations": [ + ], + "owning_organization_url": "/v2/organizations/09e0d56f-4e50-4bff-af83-9bd87a7d7f00", + "spaces_url": "/v2/domains/abb8338f-eaea-4149-85c0-61888bac0737/spaces" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/GET_running_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/GET_running_response.json new file mode 100644 index 00000000000..63ef0a8f511 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/GET_running_response.json @@ -0,0 +1,4 @@ +{ + "abc": 123, + "do-re-me": "far-so-la-tee" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/GET_staging_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/GET_staging_response.json new file mode 100644 index 00000000000..63ef0a8f511 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/GET_staging_response.json @@ -0,0 +1,4 @@ +{ + "abc": 123, + "do-re-me": "far-so-la-tee" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_request.json new file mode 100644 index 00000000000..9f1ffacc80d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_request.json @@ -0,0 +1,4 @@ +{ + "abc": 123, + "do-re-me": "fa-so-la-tee" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_request_empty.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_request_empty.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_request_empty.json @@ -0,0 +1,2 @@ +{ +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_response.json new file mode 100644 index 00000000000..9f1ffacc80d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_response.json @@ -0,0 +1,4 @@ +{ + "abc": 123, + "do-re-me": "fa-so-la-tee" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_response_empty.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_response_empty.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_running_response_empty.json @@ -0,0 +1,2 @@ +{ +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_request.json new file mode 100644 index 00000000000..63ef0a8f511 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_request.json @@ -0,0 +1,4 @@ +{ + "abc": 123, + "do-re-me": "far-so-la-tee" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_request_empty.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_request_empty.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_request_empty.json @@ -0,0 +1,2 @@ +{ +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_response.json new file mode 100644 index 00000000000..63ef0a8f511 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_response.json @@ -0,0 +1,4 @@ +{ + "abc": 123, + "do-re-me": "far-so-la-tee" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_response_empty.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_response_empty.json new file mode 100644 index 00000000000..2c63c085104 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/environment_variable_groups/PUT_staging_response_empty.json @@ -0,0 +1,2 @@ +{ +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/error_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/error_response.json new file mode 100644 index 00000000000..3aefa5b3560 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/error_response.json @@ -0,0 +1,5 @@ +{ + "code": 10008, + "description": "The request is semantically invalid: space_guid and name unique", + "error_code": "CF-UnprocessableEntity" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/events/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/events/GET_response.json new file mode 100644 index 00000000000..179b3abd4bd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/events/GET_response.json @@ -0,0 +1,74 @@ +{ + "total_results": 3, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "2cc565c7-18e7-4fff-8fb0-52525f09ee6b", + "url": "/v2/events/2cc565c7-18e7-4fff-8fb0-52525f09ee6b", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null + }, + "entity": { + "type": "name-1034", + "actor": "guid-ddc7f725-c67f-4e68-8118-1ae1687f9fff", + "actor_type": "name-1035", + "actor_name": "name-1036", + "actee": "guid-16ac41e9-c30c-45e1-b51c-226fb37e4197", + "actee_type": "name-1037", + "actee_name": "name-1038", + "timestamp": "2015-07-27T22:43:23Z", + "metadata": { + }, + "space_guid": "1a769af6-8ddb-4508-a35a-cc61c51fdcdf", + "organization_guid": "49723c2a-a11e-43f8-971a-b34e9134ce00" + } + }, + { + "metadata": { + "guid": "a82493b7-bd16-421b-aef0-d0b5c40869e8", + "url": "/v2/events/a82493b7-bd16-421b-aef0-d0b5c40869e8", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null + }, + "entity": { + "type": "name-1042", + "actor": "guid-e68c8d10-dc83-4466-8735-9c4201166af9", + "actor_type": "name-1043", + "actor_name": "name-1044", + "actee": "guid-d3ecb6be-c8a0-4e3b-9838-b78c58a88b65", + "actee_type": "name-1045", + "actee_name": "name-1046", + "timestamp": "2015-07-27T22:43:23Z", + "metadata": { + }, + "space_guid": "dbe6bbdc-0d9c-495c-abbb-0b5eb93c8494", + "organization_guid": "52c7fb45-e31b-4271-9f16-8c94df30d8c7" + } + }, + { + "metadata": { + "guid": "4a0e6a34-2807-44cd-a5cc-b61890662ade", + "url": "/v2/events/4a0e6a34-2807-44cd-a5cc-b61890662ade", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null + }, + "entity": { + "type": "name-1050", + "actor": "guid-69e5e7e7-7723-4af8-a7cb-255d9a90c8db", + "actor_type": "name-1051", + "actor_name": "name-1052", + "actee": "guid-cc1f17ce-85ab-4cc2-988b-9fca0f3a1d03", + "actee_type": "name-1053", + "actee_name": "name-1054", + "timestamp": "2015-07-27T22:43:23Z", + "metadata": { + }, + "space_guid": "38a2f075-fe19-4edc-8787-5571f2af7051", + "organization_guid": "9160433e-860d-4251-bd6d-140187a2c5db" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/events/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/events/GET_{id}_response.json new file mode 100644 index 00000000000..5c53af9061c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/events/GET_{id}_response.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "guid": "8f1366e5-1fe2-418c-ae33-38bf29ad857a", + "url": "/v2/events/8f1366e5-1fe2-418c-ae33-38bf29ad857a", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null + }, + "entity": { + "type": "name-1010", + "actor": "guid-a01d98f8-ba9a-40b0-86ba-3deacc2978c2", + "actor_type": "name-1011", + "actor_name": "name-1012", + "actee": "guid-ff2c9780-b8db-4276-ba5f-b06adb724873", + "actee_type": "name-1013", + "actee_name": "name-1014", + "timestamp": "2015-07-27T22:43:23Z", + "metadata": { + }, + "space_guid": "dcb0dcdd-5236-4af3-abc2-1ab0ff424794", + "organization_guid": "3317f885-4670-4249-9861-7c75d851d492" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_app_scaling_flag_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_app_scaling_flag_response.json new file mode 100644 index 00000000000..65c0edc3a1a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_app_scaling_flag_response.json @@ -0,0 +1,6 @@ +{ + "name": "app_scaling", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/app_scaling" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_response.json new file mode 100644 index 00000000000..cdc1f1bb795 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_response.json @@ -0,0 +1,74 @@ +[ + { + "name": "user_org_creation", + "enabled": false, + "error_message": null, + "url": "/v2/config/feature_flags/user_org_creation" + }, + { + "name": "private_domain_creation", + "enabled": false, + "error_message": "foobar", + "url": "/v2/config/feature_flags/private_domain_creation" + }, + { + "name": "app_bits_upload", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/app_bits_upload" + }, + { + "name": "app_scaling", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/app_scaling" + }, + { + "name": "route_creation", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/route_creation" + }, + { + "name": "service_instance_creation", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/service_instance_creation" + }, + { + "name": "diego_docker", + "enabled": false, + "error_message": null, + "url": "/v2/config/feature_flags/diego_docker" + }, + { + "name": "set_roles_by_username", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/set_roles_by_username" + }, + { + "name": "unset_roles_by_username", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/unset_roles_by_username" + }, + { + "name": "task_creation", + "enabled": false, + "error_message": null, + "url": "/v2/config/feature_flags/task_creation" + }, + { + "name": "space_scoped_private_broker_creation", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/space_scoped_private_broker_creation" + }, + { + "name": "space_developer_env_var_visibility", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/space_developer_env_var_visibility" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_set_user_roles_flag_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_set_user_roles_flag_response.json new file mode 100644 index 00000000000..7f6c1742eab --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/GET_set_user_roles_flag_response.json @@ -0,0 +1,6 @@ +{ + "name": "set_roles_by_username", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/set_roles_by_username" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/PUT_user_org_creation_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/PUT_user_org_creation_request.json new file mode 100644 index 00000000000..37c8ceff4b1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/PUT_user_org_creation_request.json @@ -0,0 +1,3 @@ +{ + "enabled": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/PUT_user_org_creation_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/PUT_user_org_creation_response.json new file mode 100644 index 00000000000..f6890146f73 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/feature_flags/PUT_user_org_creation_response.json @@ -0,0 +1,6 @@ +{ + "name": "user_org_creation", + "enabled": true, + "error_message": null, + "url": "/v2/config/feature_flags/user_org_creation" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/info/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/info/GET_response.json new file mode 100644 index 00000000000..7302aea04f7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/info/GET_response.json @@ -0,0 +1,18 @@ +{ + "name": "vcap", + "build": "2222", + "support": "http://support.cloudfoundry.com", + "version": 2, + "description": "Cloud Foundry sponsored by Pivotal", + "authorization_endpoint": "http://localhost:8080/uaa", + "token_endpoint": "http://localhost:8080/uaa", + "min_cli_version": null, + "min_recommended_cli_version": null, + "api_version": "2.44.0", + "app_ssh_endpoint": "ssh.system.domain.example.com:2222", + "app_ssh_host_key_fingerprint": "47:0d:d1:c8:c3:3d:0a:36:d1:49:2f:f2:90:27:31:d0", + "app_ssh_oauth_client": null, + "routing_endpoint": "http://localhost:3000", + "logging_endpoint": "ws://loggregator.vcap.me:80", + "doppler_logging_endpoint": "ws://doppler.vcap.me:80" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/jobs/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/jobs/GET_{id}_response.json new file mode 100644 index 00000000000..b23b9bb73a4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/jobs/GET_{id}_response.json @@ -0,0 +1,17 @@ +{ + "metadata": { + "guid": "e86ffe00-a243-48f7-be05-8f1f41bee864", + "created_at": "2015-11-30T23:38:44Z", + "url": "/v2/jobs/e86ffe00-a243-48f7-be05-8f1f41bee864" + }, + "entity": { + "guid": "e86ffe00-a243-48f7-be05-8f1f41bee864", + "status": "failed", + "error": "Use of entity>error is deprecated in favor of entity>error_details.", + "error_details": { + "error_code": "UnknownError", + "description": "An unknown error occurred.", + "code": 10001 + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_auditors_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_auditors_request.json new file mode 100644 index 00000000000..0f5e12b5f12 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_auditors_request.json @@ -0,0 +1,3 @@ +{ + "username": "auditor@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_billing_managers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_billing_managers_request.json new file mode 100644 index 00000000000..10bb5370ba9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_billing_managers_request.json @@ -0,0 +1,3 @@ +{ + "username": "billing_manager@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_managers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_managers_request.json new file mode 100644 index 00000000000..784c1af0950 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_managers_request.json @@ -0,0 +1,3 @@ +{ + "username": "manage@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_users_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_users_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/DELETE_{id}_users_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_response.json new file mode 100644 index 00000000000..e71e685baa9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "deb3c359-2261-45ba-b34f-ee7487acd71a", + "url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a", + "created_at": "2015-07-27T22:43:05Z", + "updated_at": null + }, + "entity": { + "name": "the-system_domain-org-name", + "billing_enabled": false, + "quota_definition_guid": "9b56a1ec-4981-4a1e-9348-0d78eeca842c", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/9b56a1ec-4981-4a1e-9348-0d78eeca842c", + "spaces_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/spaces", + "domains_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/domains", + "private_domains_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/private_domains", + "users_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/users", + "managers_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/managers", + "billing_managers_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/billing_managers", + "auditors_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/auditors", + "app_events_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/app_events", + "space_quota_definitions_url": "/v2/organizations/deb3c359-2261-45ba-b34f-ee7487acd71a/space_quota_definitions" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_auditors_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_auditors_response.json new file mode 100644 index 00000000000..1de270b1606 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_auditors_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-73", + "url": "/v2/users/uaa-id-73", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "auditor@example.com", + "spaces_url": "/v2/users/uaa-id-73/spaces", + "organizations_url": "/v2/users/uaa-id-73/organizations", + "managed_organizations_url": "/v2/users/uaa-id-73/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-73/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-73/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-73/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-73/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_billing_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_billing_managers_response.json new file mode 100644 index 00000000000..25c9ab05a10 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_billing_managers_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-84", + "url": "/v2/users/uaa-id-84", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "billing_manager@example.com", + "spaces_url": "/v2/users/uaa-id-84/spaces", + "organizations_url": "/v2/users/uaa-id-84/organizations", + "managed_organizations_url": "/v2/users/uaa-id-84/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-84/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-84/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-84/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-84/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_domains_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_domains_response.json new file mode 100644 index 00000000000..21ccdee908b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_domains_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 2, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "0010dd3b-aca0-4647-87d3-679059d67600", + "url": "/v2/domains/0010dd3b-aca0-4647-87d3-679059d67600", + "created_at": "2016-01-26T22:20:04Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain1.com", + "router_group_guid": null + } + }, + { + "metadata": { + "guid": "e366a4ce-73d2-4a5a-8194-04c8ff4adfe1", + "url": "/v2/domains/e366a4ce-73d2-4a5a-8194-04c8ff4adfe1", + "created_at": "2016-01-26T22:20:04Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain2.com", + "router_group_guid": null + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_instance_usage_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_instance_usage_response.json new file mode 100644 index 00000000000..95525013f14 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_instance_usage_response.json @@ -0,0 +1,3 @@ +{ + "instance_usage": 3 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_managers_response.json new file mode 100644 index 00000000000..4ca7666c36c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_managers_response.json @@ -0,0 +1,49 @@ +{ + "total_results": 2, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-99", + "url": "/v2/users/uaa-id-99", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "manager@example.com", + "spaces_url": "/v2/users/uaa-id-99/spaces", + "organizations_url": "/v2/users/uaa-id-99/organizations", + "managed_organizations_url": "/v2/users/uaa-id-99/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-99/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-99/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-99/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-99/audited_spaces" + } + }, + { + "metadata": { + "guid": "uaa-id-100", + "url": "/v2/users/uaa-id-100", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "spaces_url": "/v2/users/uaa-id-100/spaces", + "organizations_url": "/v2/users/uaa-id-100/organizations", + "managed_organizations_url": "/v2/users/uaa-id-100/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-100/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-100/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-100/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-100/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_memory_usage_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_memory_usage_response.json new file mode 100644 index 00000000000..3c897370499 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_memory_usage_response.json @@ -0,0 +1,3 @@ +{ + "memory_usage_in_mb": 0 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_private_domains_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_private_domains_response.json new file mode 100644 index 00000000000..e931e77f621 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_private_domains_response.json @@ -0,0 +1,22 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "4625debe-c7ac-4d8e-84d2-448691c30ebc", + "url": "/v2/private_domains/4625debe-c7ac-4d8e-84d2-448691c30ebc", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "domain-2.example.com", + "owning_organization_guid": "09beeba3-f2ed-4e45-90f9-fc2119e02e9e", + "owning_organization_url": "/v2/organizations/09beeba3-f2ed-4e45-90f9-fc2119e02e9e", + "shared_organizations_url": "/v2/private_domains/4625debe-c7ac-4d8e-84d2-448691c30ebc/shared_organizations" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_response.json new file mode 100644 index 00000000000..afb1c32f177 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "027616f3-66c4-412c-8214-7e43db2d587b", + "url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b", + "created_at": "2015-07-27T22:43:11Z", + "updated_at": null + }, + "entity": { + "name": "name-240", + "billing_enabled": false, + "quota_definition_guid": "f3f0b830-d50a-4265-b8f8-3c430aa0313b", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/f3f0b830-d50a-4265-b8f8-3c430aa0313b", + "spaces_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/spaces", + "domains_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/domains", + "private_domains_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/private_domains", + "users_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/users", + "managers_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/managers", + "billing_managers_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/billing_managers", + "auditors_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/auditors", + "app_events_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/app_events", + "space_quota_definitions_url": "/v2/organizations/027616f3-66c4-412c-8214-7e43db2d587b/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_services_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_services_response.json new file mode 100644 index 00000000000..b2c15248d83 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_services_response.json @@ -0,0 +1,37 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "5529fa75-d2f3-426c-b864-4ae45c3622da", + "url": "/v2/services/5529fa75-d2f3-426c-b864-4ae45c3622da", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "label": "label-16", + "provider": null, + "url": null, + "description": "desc-39", + "long_description": null, + "version": null, + "info_url": null, + "active": true, + "bindable": true, + "unique_id": "4d4e8356-f753-433e-8514-88ee78c4e153", + "extra": null, + "tags": [ + ], + "requires": [ + ], + "documentation_url": null, + "service_broker_guid": "bf5b5cf7-acac-426b-8e79-cc57a227cd3c", + "plan_updateable": false, + "service_plans_url": "/v2/services/5529fa75-d2f3-426c-b864-4ae45c3622da/service_plans" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_space_quota_definitions_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_space_quota_definitions_response.json new file mode 100644 index 00000000000..1fe6beff1a8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_space_quota_definitions_response.json @@ -0,0 +1,27 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "d0bf6c52-a880-4c8f-b7d9-d9302a2ac6c9", + "url": "/v2/space_quota_definitions/d0bf6c52-a880-4c8f-b7d9-d9302a2ac6c9", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "name-199", + "organization_guid": "a163840f-5bd5-48a0-8736-1d837bda1353", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "memory_limit": 20480, + "instance_memory_limit": -1, + "organization_url": "/v2/organizations/a163840f-5bd5-48a0-8736-1d837bda1353", + "spaces_url": "/v2/space_quota_definitions/d0bf6c52-a880-4c8f-b7d9-d9302a2ac6c9/spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_spaces_response.json new file mode 100644 index 00000000000..b87128f089d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_spaces_response.json @@ -0,0 +1,33 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "9f6ce6e0-e3db-42ae-9572-bbc38f4f541b", + "url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "name-215", + "organization_guid": "4df92169-5b8d-489b-ba0f-7114168aa476", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/4df92169-5b8d-489b-ba0f-7114168aa476", + "developers_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/developers", + "managers_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/managers", + "auditors_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/auditors", + "apps_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/apps", + "routes_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/routes", + "domains_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/domains", + "service_instances_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/service_instances", + "app_events_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/app_events", + "events_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/events", + "security_groups_url": "/v2/spaces/9f6ce6e0-e3db-42ae-9572-bbc38f4f541b/security_groups" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_summary_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_summary_response.json new file mode 100644 index 00000000000..3c99db719bf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_summary_response.json @@ -0,0 +1,15 @@ +{ + "guid": "525a6450-9202-4ea1-beca-6fdda210710e", + "name": "name-357", + "status": "active", + "spaces": [ + { + "guid": "dec1c7b0-8ea6-488a-9410-f73649d30228", + "name": "name-359", + "service_count": 0, + "app_count": 0, + "mem_dev_total": 0, + "mem_prod_total": 0 + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_user_roles_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_user_roles_response.json new file mode 100644 index 00000000000..78d3ce19606 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_user_roles_response.json @@ -0,0 +1,35 @@ +{ + "total_results": 2, + "total_pages": 2, + "prev_url": null, + "next_url": "/v2/organizations/6fd1790e-0785-41ec-aff0-99915ce000c1/user_roles?order-direction=asc&page=2&results-per-page=1", + "resources": [ + { + "metadata": { + "guid": "uaa-id-92", + "url": "/v2/users/uaa-id-92", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "everything@example.com", + "organization_roles": [ + "org_user", + "org_manager", + "org_auditor", + "billing_manager" + ], + "spaces_url": "/v2/users/uaa-id-92/spaces", + "organizations_url": "/v2/users/uaa-id-92/organizations", + "managed_organizations_url": "/v2/users/uaa-id-92/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-92/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-92/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-92/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-92/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_users_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_users_response.json new file mode 100644 index 00000000000..bc39bb01b26 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/GET_{id}_users_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-111", + "url": "/v2/users/uaa-id-111", + "created_at": "2015-07-27T22:43:11Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "user@example.com", + "spaces_url": "/v2/users/uaa-id-111/spaces", + "organizations_url": "/v2/users/uaa-id-111/organizations", + "managed_organizations_url": "/v2/users/uaa-id-111/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-111/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-111/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-111/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-111/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/POST_request.json new file mode 100644 index 00000000000..71ce450301c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "my-org-name", + "quota_definition_guid": "ffc919cd-3e21-43a6-9e4e-62802d149cdb" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/POST_response.json new file mode 100644 index 00000000000..1132cd95ab4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/POST_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "137bfc86-5a2f-4759-9c0c-59ef614cd0be", + "url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be", + "created_at": "2015-07-27T22:43:11Z", + "updated_at": null + }, + "entity": { + "name": "my-org-name", + "billing_enabled": false, + "quota_definition_guid": "ffc919cd-3e21-43a6-9e4e-62802d149cdb", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/ffc919cd-3e21-43a6-9e4e-62802d149cdb", + "spaces_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/spaces", + "domains_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/domains", + "private_domains_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/private_domains", + "users_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/users", + "managers_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/managers", + "billing_managers_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/billing_managers", + "auditors_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/auditors", + "app_events_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/app_events", + "space_quota_definitions_url": "/v2/organizations/137bfc86-5a2f-4759-9c0c-59ef614cd0be/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_response.json new file mode 100644 index 00000000000..b556ceca82d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "50dfb04d-cd49-477d-a54c-32e00e180022", + "url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022", + "created_at": "2015-11-30T23:38:58Z", + "updated_at": null + }, + "entity": { + "name": "name-2476", + "billing_enabled": false, + "quota_definition_guid": "8de0754e-bb1e-4739-be6e-91104bbab281", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/8de0754e-bb1e-4739-be6e-91104bbab281", + "spaces_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/spaces", + "domains_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/domains", + "private_domains_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/private_domains", + "users_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/users", + "managers_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/managers", + "billing_managers_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/billing_managers", + "auditors_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/auditors", + "app_events_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/app_events", + "space_quota_definitions_url": "/v2/organizations/50dfb04d-cd49-477d-a54c-32e00e180022/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_{auditor-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_{auditor-id}_response.json new file mode 100644 index 00000000000..181e63c2182 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_auditors_{auditor-id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "83c4fac5-cd9e-41ee-96df-b4f50fff4aef", + "url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "name-187", + "billing_enabled": false, + "quota_definition_guid": "1d18a00b-4e36-412b-9308-2f5f2402e880", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/1d18a00b-4e36-412b-9308-2f5f2402e880", + "spaces_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/spaces", + "domains_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/domains", + "private_domains_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/private_domains", + "users_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/users", + "managers_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/managers", + "billing_managers_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/billing_managers", + "auditors_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/auditors", + "app_events_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/app_events", + "space_quota_definitions_url": "/v2/organizations/83c4fac5-cd9e-41ee-96df-b4f50fff4aef/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_response.json new file mode 100644 index 00000000000..7dd268cf01c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "c8d4f13c-8880-4859-8e03-fc690efd8f48", + "url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48", + "created_at": "2015-11-30T23:38:58Z", + "updated_at": null + }, + "entity": { + "name": "name-2470", + "billing_enabled": false, + "quota_definition_guid": "4ad7378e-e90a-4714-b906-a451dd0d5507", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/4ad7378e-e90a-4714-b906-a451dd0d5507", + "spaces_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/spaces", + "domains_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/domains", + "private_domains_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/private_domains", + "users_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/users", + "managers_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/managers", + "billing_managers_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/billing_managers", + "auditors_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/auditors", + "app_events_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/app_events", + "space_quota_definitions_url": "/v2/organizations/c8d4f13c-8880-4859-8e03-fc690efd8f48/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_{billing-manager-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_{billing-manager-id}_response.json new file mode 100644 index 00000000000..f6a536fe0c9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_billing_managers_{billing-manager-id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "39ab104d-79f9-4bac-82e0-35b826a236b8", + "url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "name-200", + "billing_enabled": false, + "quota_definition_guid": "ab51f0d8-1920-4bfc-9401-cd0e978e8c5e", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/ab51f0d8-1920-4bfc-9401-cd0e978e8c5e", + "spaces_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/spaces", + "domains_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/domains", + "private_domains_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/private_domains", + "users_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/users", + "managers_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/managers", + "billing_managers_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/billing_managers", + "auditors_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/auditors", + "app_events_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/app_events", + "space_quota_definitions_url": "/v2/organizations/39ab104d-79f9-4bac-82e0-35b826a236b8/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_response.json new file mode 100644 index 00000000000..305bbf7d1d2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "8d2238e2-2fb3-4ede-b188-1fd3a533c4b4", + "url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4", + "created_at": "2015-11-30T23:38:59Z", + "updated_at": null + }, + "entity": { + "name": "name-2523", + "billing_enabled": false, + "quota_definition_guid": "0e36ae22-a752-4e37-9dbf-0bac5c1b93c1", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/0e36ae22-a752-4e37-9dbf-0bac5c1b93c1", + "spaces_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/spaces", + "domains_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/domains", + "private_domains_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/private_domains", + "users_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/users", + "managers_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/managers", + "billing_managers_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/billing_managers", + "auditors_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/auditors", + "app_events_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/app_events", + "space_quota_definitions_url": "/v2/organizations/8d2238e2-2fb3-4ede-b188-1fd3a533c4b4/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_{manager-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_{manager-id}_response.json new file mode 100644 index 00000000000..73f75ec8f4b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_managers_{manager-id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "cc7c5224-f973-4358-a95a-dd72decbb20f", + "url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "name-218", + "billing_enabled": false, + "quota_definition_guid": "57f59bb7-7581-4257-9502-cbd60bb92d99", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/57f59bb7-7581-4257-9502-cbd60bb92d99", + "spaces_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/spaces", + "domains_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/domains", + "private_domains_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/private_domains", + "users_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/users", + "managers_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/managers", + "billing_managers_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/billing_managers", + "auditors_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/auditors", + "app_events_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/app_events", + "space_quota_definitions_url": "/v2/organizations/cc7c5224-f973-4358-a95a-dd72decbb20f/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_private_domains_{private-domain-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_private_domains_{private-domain-id}_response.json new file mode 100644 index 00000000000..f013a656e38 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_private_domains_{private-domain-id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "676f9ff8-8c35-49ed-8ebf-fdf3db34cde7", + "url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7", + "created_at": "2015-07-27T22:43:10Z", + "updated_at": null + }, + "entity": { + "name": "name-228", + "billing_enabled": false, + "quota_definition_guid": "855b0cb8-5c58-4ebc-8189-6582c37060e6", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/855b0cb8-5c58-4ebc-8189-6582c37060e6", + "spaces_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/spaces", + "domains_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/domains", + "private_domains_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/private_domains", + "users_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/users", + "managers_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/managers", + "billing_managers_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/billing_managers", + "auditors_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/auditors", + "app_events_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/app_events", + "space_quota_definitions_url": "/v2/organizations/676f9ff8-8c35-49ed-8ebf-fdf3db34cde7/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_request.json new file mode 100644 index 00000000000..e860de2ffa0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_request.json @@ -0,0 +1,4 @@ +{ + "name": "New Organization Name", + "quota_definition_guid": "7df44b58-1834-486f-aed8-d5d97126e603" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_response.json new file mode 100644 index 00000000000..1586f56f3c0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "31a539be-dbfd-4db6-aec1-6565ebe975ed", + "url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed", + "created_at": "2015-07-27T22:43:11Z", + "updated_at": "2015-07-27T22:43:11Z" + }, + "entity": { + "name": "New Organization Name", + "billing_enabled": false, + "quota_definition_guid": "7df44b58-1834-486f-aed8-d5d97126e603", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/7df44b58-1834-486f-aed8-d5d97126e603", + "spaces_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/spaces", + "domains_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/domains", + "private_domains_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/private_domains", + "users_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/users", + "managers_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/managers", + "billing_managers_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/billing_managers", + "auditors_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/auditors", + "app_events_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/app_events", + "space_quota_definitions_url": "/v2/organizations/31a539be-dbfd-4db6-aec1-6565ebe975ed/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_response.json new file mode 100644 index 00000000000..49b5058917b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "1a93417a-811a-46c7-85fa-4a0507c53f08", + "url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08", + "created_at": "2015-11-30T23:38:59Z", + "updated_at": null + }, + "entity": { + "name": "name-2510", + "billing_enabled": false, + "quota_definition_guid": "4df84394-d265-4b78-a679-c31bb2e5379c", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/4df84394-d265-4b78-a679-c31bb2e5379c", + "spaces_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/spaces", + "domains_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/domains", + "private_domains_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/private_domains", + "users_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/users", + "managers_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/managers", + "billing_managers_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/billing_managers", + "auditors_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/auditors", + "app_events_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/app_events", + "space_quota_definitions_url": "/v2/organizations/1a93417a-811a-46c7-85fa-4a0507c53f08/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_{user-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_{user-id}_response.json new file mode 100644 index 00000000000..1d51951fed8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/organizations/PUT_{id}_users_{user-id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "584664d0-e5bb-449b-bfe5-0136c30c4ff8", + "url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8", + "created_at": "2015-07-27T22:43:11Z", + "updated_at": null + }, + "entity": { + "name": "name-234", + "billing_enabled": false, + "quota_definition_guid": "51a2f10b-9803-4f35-ad69-0350ff4b66d4", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/51a2f10b-9803-4f35-ad69-0350ff4b66d4", + "spaces_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/spaces", + "domains_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/domains", + "private_domains_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/private_domains", + "users_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/users", + "managers_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/managers", + "billing_managers_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/billing_managers", + "auditors_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/auditors", + "app_events_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/app_events", + "space_quota_definitions_url": "/v2/organizations/584664d0-e5bb-449b-bfe5-0136c30c4ff8/space_quota_definitions" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..2197040115d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_response.json new file mode 100644 index 00000000000..2017fc0e35e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_response.json @@ -0,0 +1,22 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "3de9db5f-8e3b-4d10-a8c9-8137caafe43d", + "url": "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d", + "created_at": "2016-02-19T02:04:00Z", + "updated_at": null + }, + "entity": { + "name": "my-domain.com", + "owning_organization_guid": "2f70efed-abb2-4b7a-9f31-d4fe4d849932", + "owning_organization_url": "/v2/organizations/2f70efed-abb2-4b7a-9f31-d4fe4d849932", + "shared_organizations_url": "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d/shared_organizations" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_{id}_response.json new file mode 100644 index 00000000000..3307131d682 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_{id}_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "3de9db5f-8e3b-4d10-a8c9-8137caafe43d", + "url": "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d", + "created_at": "2016-02-19T02:04:00Z", + "updated_at": null + }, + "entity": { + "name": "my-domain.com", + "owning_organization_guid": "2f70efed-abb2-4b7a-9f31-d4fe4d849932", + "owning_organization_url": "/v2/organizations/2f70efed-abb2-4b7a-9f31-d4fe4d849932", + "shared_organizations_url": "/v2/private_domains/3de9db5f-8e3b-4d10-a8c9-8137caafe43d/shared_organizations" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_{id}_shared_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_{id}_shared_organizations_response.json new file mode 100644 index 00000000000..902a959a56b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/GET_{id}_shared_organizations_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "420bb3ef-6064-42ed-9131-c1fe980bf9c6", + "url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6", + "created_at": "2016-06-08T16:41:39Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2005", + "billing_enabled": false, + "quota_definition_guid": "2e863ad3-7bb9-4c5c-928c-cde2caec341b", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/2e863ad3-7bb9-4c5c-928c-cde2caec341b", + "spaces_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/spaces", + "domains_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/domains", + "private_domains_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/private_domains", + "users_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/users", + "managers_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/managers", + "billing_managers_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/billing_managers", + "auditors_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/auditors", + "app_events_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/app_events", + "space_quota_definitions_url": "/v2/organizations/420bb3ef-6064-42ed-9131-c1fe980bf9c6/space_quota_definitions" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/POST_request.json new file mode 100644 index 00000000000..ff1498c2331 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "exmaple.com", + "owning_organization_guid": "22bb8ae1-6324-40eb-b077-bd1bfad773f8" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/POST_response.json new file mode 100644 index 00000000000..df7122953a8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/private_domains/POST_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "4af3234e-813d-453f-b3ae-fcdecfd87a47", + "url": "/v2/private_domains/4af3234e-813d-453f-b3ae-fcdecfd87a47", + "created_at": "2016-01-19T19:41:12Z", + "updated_at": null + }, + "entity": { + "name": "exmaple.com", + "owning_organization_guid": "22bb8ae1-6324-40eb-b077-bd1bfad773f8", + "owning_organization_url": "/v2/organizations/22bb8ae1-6324-40eb-b077-bd1bfad773f8", + "shared_organizations_url": "/v2/private_domains/4af3234e-813d-453f-b3ae-fcdecfd87a47/shared_organizations" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/GET_response.json new file mode 100644 index 00000000000..70fbf055158 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/GET_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "9a76e262-9dc1-4316-87ad-a8b3bfbb11d4", + "url": "/v2/quota_definitions/9a76e262-9dc1-4316-87ad-a8b3bfbb11d4", + "created_at": "2016-01-26T22:20:04Z", + "updated_at": null + }, + "entity": { + "name": "default", + "non_basic_services_allowed": true, + "total_services": 100, + "total_routes": 1000, + "total_private_domains": -1, + "memory_limit": 10240, + "trial_db_allowed": false, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "app_task_limit": -1, + "total_service_keys": -1 + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/GET_{id}_response.json new file mode 100644 index 00000000000..0c0cd689a4b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/GET_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "c1b8a422-e2b2-4e28-8a16-90ebef2a6922", + "url": "/v2/quota_definitions/c1b8a422-e2b2-4e28-8a16-90ebef2a6922", + "created_at": "2016-01-26T22:20:36Z", + "updated_at": null + }, + "entity": { + "name": "name-2527", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "total_private_domains": -1, + "memory_limit": 20480, + "trial_db_allowed": false, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "app_task_limit": -1, + "total_service_keys": -1 + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/POST_request.json new file mode 100644 index 00000000000..061ebb880ce --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/POST_request.json @@ -0,0 +1,11 @@ +{ + "name": "gold_quota", + "non_basic_services_allowed": true, + "total_services": -1, + "total_routes": 4, + "memory_limit": 5120, + "instance_memory_limit": 10240, + "app_instance_limit": 10, + "app_task_limit": 5, + "total_reserved_route_ports": 3 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/POST_response.json new file mode 100644 index 00000000000..c1efc6ad72a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/POST_response.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "guid": "0a3df5cb-122e-4849-a6b1-abb70d1b1296", + "url": "/v2/quota_definitions/0a3df5cb-122e-4849-a6b1-abb70d1b1296", + "created_at": "2016-06-08T16:41:39Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "gold_quota", + "non_basic_services_allowed": true, + "total_services": -1, + "total_routes": 4, + "total_private_domains": -1, + "memory_limit": 5120, + "trial_db_allowed": false, + "instance_memory_limit": 10240, + "app_instance_limit": 10, + "app_task_limit": 5, + "total_service_keys": -1, + "total_reserved_route_ports": 3 + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/PUT_{id}_request.json new file mode 100644 index 00000000000..7a73a41bfdf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/PUT_{id}_request.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/PUT_{id}_response.json new file mode 100644 index 00000000000..a88e2411bed --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/quota_definitions/PUT_{id}_response.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "guid": "213b27a0-c937-4074-aade-bba2226980aa", + "url": "/v2/quota_definitions/213b27a0-c937-4074-aade-bba2226980aa", + "created_at": "2016-06-08T16:41:39Z", + "updated_at": "2016-06-08T16:41:39Z" + }, + "entity": { + "name": "name-1998", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "total_private_domains": -1, + "memory_limit": 20480, + "trial_db_allowed": false, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "app_task_limit": -1, + "total_service_keys": -1, + "total_reserved_route_ports": 5 + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/resource_match/PUT_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/resource_match/PUT_request.json new file mode 100644 index 00000000000..f26afffacf7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/resource_match/PUT_request.json @@ -0,0 +1,10 @@ +[ + { + "sha1": "002d760bea1be268e27077412e11a320d0f164d3", + "size": 36 + }, + { + "sha1": "a9993e364706816aba3e25717850c26c9cd0d89d", + "size": 1 + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/resource_match/PUT_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/resource_match/PUT_response.json new file mode 100644 index 00000000000..40f4ee0687a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/resource_match/PUT_response.json @@ -0,0 +1,6 @@ +[ + { + "sha1": "002d760bea1be268e27077412e11a320d0f164d3", + "size": 36 + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/GET_response.json new file mode 100644 index 00000000000..0a9fa03e136 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/GET_response.json @@ -0,0 +1,23 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "50dedf28-08db-4cdd-9903-0d74f3b8708d", + "url": "/v2/route_mappings/50dedf28-08db-4cdd-9903-0d74f3b8708d", + "created_at": "2016-04-06T00:17:40Z", + "updated_at": null + }, + "entity": { + "app_port": 8888, + "app_guid": "fbfe5df8-5391-4e75-966b-69fe34b7ee5d", + "route_guid": "b683ae9e-0a54-4445-a2ea-5d78d9f89266", + "app_url": "/v2/apps/fbfe5df8-5391-4e75-966b-69fe34b7ee5d", + "route_url": "/v2/routes/b683ae9e-0a54-4445-a2ea-5d78d9f89266" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/GET_{id}_response.json new file mode 100644 index 00000000000..2a20faaa096 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/GET_{id}_response.json @@ -0,0 +1,15 @@ +{ + "metadata": { + "guid": "304bead7-ad5a-4f6e-a093-f2a85d30c54a", + "url": "/v2/route_mappings/304bead7-ad5a-4f6e-a093-f2a85d30c54a", + "created_at": "2016-04-06T00:17:40Z", + "updated_at": null + }, + "entity": { + "app_port": 8888, + "app_guid": "65489f49-f437-431a-8f58-c118ce08d83a", + "route_guid": "c7ce0cac-f1d6-405c-83fd-c2d75513eb23", + "app_url": "/v2/apps/65489f49-f437-431a-8f58-c118ce08d83a", + "route_url": "/v2/routes/c7ce0cac-f1d6-405c-83fd-c2d75513eb23" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/POST_request.json new file mode 100644 index 00000000000..11a051799e4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/POST_request.json @@ -0,0 +1,5 @@ +{ + "app_guid": "d232b485-b035-4d65-9f77-6b867d859de5", + "route_guid": "c041e8a3-64d0-4beb-bac8-1900e3aedd07", + "app_port": 8888 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/POST_response.json new file mode 100644 index 00000000000..475c5e7418c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/route_mappings/POST_response.json @@ -0,0 +1,15 @@ +{ + "metadata": { + "guid": "ca9cdd28-53c4-4b8e-a7e0-1838f69b8f91", + "url": "/v2/route_mappings/ca9cdd28-53c4-4b8e-a7e0-1838f69b8f91", + "created_at": "2016-01-19T19:40:59Z", + "updated_at": null + }, + "entity": { + "app_guid": "d232b485-b035-4d65-9f77-6b867d859de5", + "app_port": 8888, + "route_guid": "c041e8a3-64d0-4beb-bac8-1900e3aedd07", + "app_url": "/v2/apps/d232b485-b035-4d65-9f77-6b867d859de5", + "route_url": "/v2/routes/c041e8a3-64d0-4beb-bac8-1900e3aedd07" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_response.json new file mode 100644 index 00000000000..880bee3f5b4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "8fd7433e-e9c7-4897-809f-9a9696f72986", + "url": "/v2/routes/8fd7433e-e9c7-4897-809f-9a9696f72986", + "created_at": "2016-03-17T21:41:19Z", + "updated_at": null + }, + "entity": { + "host": "host-25", + "path": "", + "domain_guid": "76d083f5-a5cc-4179-81b8-530a134cccf6", + "space_guid": "34453e18-fe59-4208-b29c-ae9f7b46985c", + "service_instance_guid": "8479be64-245d-4385-a553-593ffcc6b886", + "port": 0, + "domain_url": "/v2/domains/76d083f5-a5cc-4179-81b8-530a134cccf6", + "space_url": "/v2/spaces/34453e18-fe59-4208-b29c-ae9f7b46985c", + "service_instance_url": "/v2/service_instances/8479be64-245d-4385-a553-593ffcc6b886", + "apps_url": "/v2/routes/8fd7433e-e9c7-4897-809f-9a9696f72986/apps", + "route_mappings_url": "/v2/routes/8fd7433e-e9c7-4897-809f-9a9696f72986/route_mappings" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_apps_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_apps_response.json new file mode 100644 index 00000000000..9fdd070252c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_apps_response.json @@ -0,0 +1,55 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "6141e57e-7636-480b-8f17-78c6049813f6", + "url": "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6", + "created_at": "2016-06-08T16:41:28Z", + "updated_at": "2016-06-08T16:41:28Z" + }, + "entity": { + "name": "name-1412", + "production": false, + "space_guid": "93e43758-13fe-4751-8edc-caf225e27647", + "stack_guid": "0459956d-e777-412d-af7e-d45f8d172edc", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "51207851-f39e-428e-9a16-1372f4d6d4f6", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2016-06-08T16:41:28Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "ports": null, + "space_url": "/v2/spaces/93e43758-13fe-4751-8edc-caf225e27647", + "stack_url": "/v2/stacks/0459956d-e777-412d-af7e-d45f8d172edc", + "routes_url": "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/routes", + "events_url": "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/events", + "service_bindings_url": "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/service_bindings", + "route_mappings_url": "/v2/apps/6141e57e-7636-480b-8f17-78c6049813f6/route_mappings" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_response.json new file mode 100644 index 00000000000..19f11f9f7bf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "e6c3ae35-9083-4816-9432-ee8ad700fd03", + "url": "/v2/routes/e6c3ae35-9083-4816-9432-ee8ad700fd03", + "created_at": "2016-03-17T21:41:19Z", + "updated_at": null + }, + "entity": { + "host": "host-24", + "path": "", + "domain_guid": "f268feb8-2dec-4709-8b2d-db2e6c764093", + "space_guid": "dd4e9e11-1b61-44a9-a4c5-6a5eb393c2a0", + "service_instance_guid": "492eb6e7-820e-40dc-847c-6b30a6fc7b64", + "port": 0, + "domain_url": "/v2/domains/f268feb8-2dec-4709-8b2d-db2e6c764093", + "space_url": "/v2/spaces/dd4e9e11-1b61-44a9-a4c5-6a5eb393c2a0", + "service_instance_url": "/v2/service_instances/492eb6e7-820e-40dc-847c-6b30a6fc7b64", + "apps_url": "/v2/routes/e6c3ae35-9083-4816-9432-ee8ad700fd03/apps", + "route_mappings_url": "/v2/routes/e6c3ae35-9083-4816-9432-ee8ad700fd03/route_mappings" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_route_mappings_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_route_mappings_response.json new file mode 100644 index 00000000000..4a174dbc917 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/GET_{id}_route_mappings_response.json @@ -0,0 +1,23 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "9feb9667-9249-44b7-9e4e-92157a2aaefb", + "url": "/v2/route_mappings/9feb9667-9249-44b7-9e4e-92157a2aaefb", + "created_at": "2016-06-08T16:41:28Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "app_port": null, + "app_guid": "bf65b03d-5416-4603-9de2-ef74491d29b6", + "route_guid": "521c375d-a7e2-4f87-9527-7fd1db1b2010", + "app_url": "/v2/apps/bf65b03d-5416-4603-9de2-ef74491d29b6", + "route_url": "/v2/routes/521c375d-a7e2-4f87-9527-7fd1db1b2010" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/POST_request.json new file mode 100644 index 00000000000..97fd0e4a684 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/POST_request.json @@ -0,0 +1,5 @@ +{ + "domain_guid": "4d9e6314-58ca-4f09-a736-d8bcc903b95e", + "space_guid": "2f093daf-c030-4b57-99c2-9b8858b200e4", + "port": 10000 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/POST_response.json new file mode 100644 index 00000000000..79f357b429b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/POST_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "ad307f5b-efec-4034-8cf1-1f86515ee093", + "url": "/v2/routes/ad307f5b-efec-4034-8cf1-1f86515ee093", + "created_at": "2016-03-17T21:41:19Z", + "updated_at": null + }, + "entity": { + "host": "", + "path": "", + "domain_guid": "c94d8b7e-081e-4293-8f24-964a2fe2b16c", + "space_guid": "759cb2e0-239b-4202-ab83-1e6fd66becee", + "service_instance_guid": null, + "port": 10000, + "domain_url": "/v2/domains/c94d8b7e-081e-4293-8f24-964a2fe2b16c", + "space_url": "/v2/spaces/759cb2e0-239b-4202-ab83-1e6fd66becee", + "apps_url": "/v2/routes/ad307f5b-efec-4034-8cf1-1f86515ee093/apps", + "route_mappings_url": "/v2/routes/ad307f5b-efec-4034-8cf1-1f86515ee093/route_mappings" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_apps_{app-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_apps_{app-id}_response.json new file mode 100644 index 00000000000..7fa937496f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_apps_{app-id}_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "a05c94a3-e4b3-456e-b044-475270919ea7", + "url": "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7", + "created_at": "2016-03-17T21:41:19Z", + "updated_at": null + }, + "entity": { + "host": "host-20", + "path": "", + "domain_guid": "f5804a26-df58-412e-95ed-fa2f2a699c18", + "space_guid": "4886c9ec-4b1a-4a4c-8c8f-acfdd3d97d22", + "service_instance_guid": null, + "port": 0, + "domain_url": "/v2/domains/f5804a26-df58-412e-95ed-fa2f2a699c18", + "space_url": "/v2/spaces/4886c9ec-4b1a-4a4c-8c8f-acfdd3d97d22", + "apps_url": "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/apps", + "route_mappings_url": "/v2/routes/a05c94a3-e4b3-456e-b044-475270919ea7/route_mappings" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_request.json new file mode 100644 index 00000000000..d5b96814259 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_request.json @@ -0,0 +1,3 @@ +{ + "port": 10000 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_response.json new file mode 100644 index 00000000000..e9af712ba75 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/routes/PUT_{id}_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "fc72a0ae-374b-4f06-b96d-38a3864ee91b", + "url": "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b", + "created_at": "2016-03-17T21:41:19Z", + "updated_at": "2016-03-17T21:41:19Z" + }, + "entity": { + "host": "host-23", + "path": "", + "domain_guid": "6077a91b-66f9-4c52-be1f-f7b4b17a8c0d", + "space_guid": "afed22fe-2b38-4976-9a7d-b81356c82531", + "service_instance_guid": null, + "port": 10000, + "domain_url": "/v2/domains/6077a91b-66f9-4c52-be1f-f7b4b17a8c0d", + "space_url": "/v2/spaces/afed22fe-2b38-4976-9a7d-b81356c82531", + "apps_url": "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b/apps", + "route_mappings_url": "/v2/routes/fc72a0ae-374b-4f06-b96d-38a3864ee91b/route_mappings" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..d0b48c1d7e3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "260ba675-47b6-4094-be7a-349d58e3d36a", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/260ba675-47b6-4094-be7a-349d58e3d36a" + }, + "entity": { + "guid": "260ba675-47b6-4094-be7a-349d58e3d36a", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/GET_security_groups_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/GET_security_groups_response.json new file mode 100644 index 00000000000..a36a2425988 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/GET_security_groups_response.json @@ -0,0 +1,103 @@ +{ + "total_results": 5, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "created_at": "2016-06-08T16:41:21Z", + "updated_at": null + }, + "entity": { + "name": "dummy1", + "rules": [ + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces" + } + }, + { + "metadata": { + "guid": "61a3df25-f372-4554-9b77-811aaa5374c1", + "url": "/v2/security_groups/61a3df25-f372-4554-9b77-811aaa5374c1", + "created_at": "2016-06-08T16:41:21Z", + "updated_at": null + }, + "entity": { + "name": "dummy2", + "rules": [ + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/61a3df25-f372-4554-9b77-811aaa5374c1/spaces" + } + }, + { + "metadata": { + "guid": "26bdad19-b077-4542-aac0-f7e4c53c344d", + "url": "/v2/security_groups/26bdad19-b077-4542-aac0-f7e4c53c344d", + "created_at": "2016-06-08T16:41:22Z", + "updated_at": null + }, + "entity": { + "name": "name-67", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/26bdad19-b077-4542-aac0-f7e4c53c344d/spaces" + } + }, + { + "metadata": { + "guid": "0a2b8908-66f5-4bef-80f3-ca21ed86fbb3", + "url": "/v2/security_groups/0a2b8908-66f5-4bef-80f3-ca21ed86fbb3", + "created_at": "2016-06-08T16:41:22Z", + "updated_at": null + }, + "entity": { + "name": "name-68", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/0a2b8908-66f5-4bef-80f3-ca21ed86fbb3/spaces" + } + }, + { + "metadata": { + "guid": "f5b93b76-cd25-4fed-bed6-0d9d0acff542", + "url": "/v2/security_groups/f5b93b76-cd25-4fed-bed6-0d9d0acff542", + "created_at": "2016-06-08T16:41:22Z", + "updated_at": null + }, + "entity": { + "name": "name-69", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/f5b93b76-cd25-4fed-bed6-0d9d0acff542/spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/GET_{id}_response.json new file mode 100644 index 00000000000..c564bbae631 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/GET_{id}_response.json @@ -0,0 +1,17 @@ +{ + "metadata": { + "guid": "1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "created_at": "2016-06-08T16:41:21Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "dummy1", + "rules": [ + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces", + "staging_spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/staging_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/POST_request.json new file mode 100644 index 00000000000..2b61fc42117 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/POST_request.json @@ -0,0 +1,26 @@ +{ + "name": "my_super_sec_group", + "rules": [ + { + "protocol": "icmp", + "destination": "0.0.0.0/0", + "type": 0, + "code": 1 + }, + { + "protocol": "tcp", + "destination": "0.0.0.0/0", + "ports": "2048-3000", + "log": true + }, + { + "protocol": "udp", + "destination": "0.0.0.0/0", + "ports": "53, 5353" + }, + { + "protocol": "all", + "destination": "0.0.0.0/0" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/POST_response.json new file mode 100644 index 00000000000..b5143d105b7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/POST_response.json @@ -0,0 +1,37 @@ +{ + "metadata": { + "guid": "966e7ac0-1c1a-4ca9-8a5f-77c96576beb7", + "url": "/v2/security_groups/966e7ac0-1c1a-4ca9-8a5f-77c96576beb7", + "created_at": "2016-05-12T00:45:26Z", + "updated_at": null + }, + "entity": { + "name": "my_super_sec_group", + "rules": [ + { + "protocol": "icmp", + "destination": "0.0.0.0/0", + "type": 0, + "code": 1 + }, + { + "protocol": "tcp", + "destination": "0.0.0.0/0", + "ports": "2048-3000", + "log": true + }, + { + "protocol": "udp", + "destination": "0.0.0.0/0", + "ports": "53, 5353" + }, + { + "protocol": "all", + "destination": "0.0.0.0/0" + } + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/966e7ac0-1c1a-4ca9-8a5f-77c96576beb7/spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_request.json new file mode 100644 index 00000000000..f39e93f2781 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_request.json @@ -0,0 +1,5 @@ +{ + "name": "new_name", + "rules": [ + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_response.json new file mode 100644 index 00000000000..04842362f50 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_response.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "guid": "1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "created_at": "2016-06-08T16:41:21Z", + "updated_at": "2016-06-08T16:41:21Z" + }, + "entity": { + "name": "new_name", + "rules": [ + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_spaces_{space-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_spaces_{space-id}_response.json new file mode 100644 index 00000000000..a0a727d2e79 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/security_groups/PUT_{id}_spaces_{space-id}_response.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "guid": "1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159", + "created_at": "2016-06-08T16:41:21Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "dummy1", + "rules": [ + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/1452e164-0c3e-4a6c-b3c3-c40ad9fd0159/spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..7ff9f008d37 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "c4faac01-5bbd-494f-8849-256a3bab06b8", + "created_at": "2016-03-14T22:30:51Z", + "url": "/v2/jobs/c4faac01-5bbd-494f-8849-256a3bab06b8" + }, + "entity": { + "guid": "c4faac01-5bbd-494f-8849-256a3bab06b8", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_response.json new file mode 100644 index 00000000000..51ae82da5c9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_response.json @@ -0,0 +1,74 @@ +{ + "total_results": 3, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "d6d87c3d-a38f-4b31-9bbe-2432d2faaa1d", + "url": "/v2/service_bindings/d6d87c3d-a38f-4b31-9bbe-2432d2faaa1d", + "created_at": "2015-07-27T22:43:06Z", + "updated_at": null + }, + "entity": { + "app_guid": "dd44fd4f-5e20-4c52-b66d-7af6e201f01e", + "service_instance_guid": "bbd1f170-bb1f-481d-bcf7-def2bbe6a3a2", + "credentials": { + "creds-key-3": "creds-val-3" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/dd44fd4f-5e20-4c52-b66d-7af6e201f01e", + "service_instance_url": "/v2/service_instances/bbd1f170-bb1f-481d-bcf7-def2bbe6a3a2" + } + }, + { + "metadata": { + "guid": "925d8848-4808-47cf-a3e8-049aa0163328", + "url": "/v2/service_bindings/925d8848-4808-47cf-a3e8-049aa0163328", + "created_at": "2015-11-03T00:53:50Z", + "updated_at": "2015-11-04T12:54:50Z" + }, + "entity": { + "app_guid": "dd44fd4f-5e20-4c52-b66d-7af6e201f01e", + "service_instance_guid": "f99b3d23-55f9-48b5-add3-d7ab08b2ff0c", + "credentials": { + "creds-key-108": "creds-val-108" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/dd44fd4f-5e20-4c52-b66d-7af6e201f01e", + "service_instance_url": "/v2/service_instances/f99b3d23-55f9-48b5-add3-d7ab08b2ff0c" + } + }, + { + "metadata": { + "guid": "42eda707-fe4d-4eed-9b39-7cb5e665c226", + "url": "/v2/service_bindings/42eda707-fe4d-4eed-9b39-7cb5e665c226", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": null + }, + "entity": { + "app_guid": "dd44fd4f-5e20-4c52-b66d-7af6e201f01e", + "service_instance_guid": "650d0eb7-3b83-414a-82a0-d503d1c8eb5f", + "credentials": { + "creds-key-356": "creds-val-356" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/dd44fd4f-5e20-4c52-b66d-7af6e201f01e", + "service_instance_url": "/v2/service_instances/650d0eb7-3b83-414a-82a0-d503d1c8eb5f" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_{id}_parameters_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_{id}_parameters_response.json new file mode 100644 index 00000000000..002cdfd5776 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_{id}_parameters_response.json @@ -0,0 +1,7 @@ +{ + "test-param-key-1": "test-param-value-1", + "test-param-key-2": 12345, + "test-param-key-3": false, + "test-param-key-4": 3.141, + "test-param-key-5": null +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_{id}_response.json new file mode 100644 index 00000000000..7f8b8bd1264 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/GET_{id}_response.json @@ -0,0 +1,29 @@ +{ + "metadata": { + "guid": "ddd7fb26-c42d-4acf-a035-60fdd094a167", + "url": "/v2/service_bindings/ddd7fb26-c42d-4acf-a035-60fdd094a167", + "created_at": "2016-06-08T16:41:43Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "app_guid": "784bca1b-c4d9-4d99-9961-9f413620031a", + "service_instance_guid": "ada8700c-dd02-467c-937b-32ce498302f6", + "credentials": { + "creds-key-64": "creds-val-64" + }, + "binding_options": { + }, + "gateway_name": "", + "name": "prod-db", + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "", + "updated_at": "2018-02-28T16:25:19Z", + "created_at": "2018-02-28T16:25:19Z" + }, + "app_url": "/v2/apps/784bca1b-c4d9-4d99-9961-9f413620031a", + "service_instance_url": "/v2/service_instances/ada8700c-dd02-467c-937b-32ce498302f6", + "service_binding_parameters_url": "/v2/service_bindings/ddd7fb26-c42d-4acf-a035-60fdd094a167/parameters" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/POST_request.json new file mode 100644 index 00000000000..b908e9933aa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/POST_request.json @@ -0,0 +1,7 @@ +{ + "service_instance_guid": "650d0eb7-3b83-414a-82a0-d503d1c8eb5f", + "app_guid": "26ddc1de-3eeb-424b-82f3-f7f30a38b610", + "parameters": { + "the_service_broker": "wants this object" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/POST_response.json new file mode 100644 index 00000000000..bc3fd833039 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_bindings/POST_response.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "guid": "42eda707-fe4d-4eed-9b39-7cb5e665c226", + "url": "/v2/service_bindings/42eda707-fe4d-4eed-9b39-7cb5e665c226", + "created_at": "2015-07-27T22:43:20Z", + "updated_at": null + }, + "entity": { + "app_guid": "26ddc1de-3eeb-424b-82f3-f7f30a38b610", + "service_instance_guid": "650d0eb7-3b83-414a-82a0-d503d1c8eb5f", + "credentials": { + "creds-key-356": "creds-val-356" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/26ddc1de-3eeb-424b-82f3-f7f30a38b610", + "service_instance_url": "/v2/service_instances/650d0eb7-3b83-414a-82a0-d503d1c8eb5f" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/GET_response.json new file mode 100644 index 00000000000..369066e5ce5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/GET_response.json @@ -0,0 +1,50 @@ +{ + "total_results": 3, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "b52de6f1-15dd-4069-8b42-f052cc9333fc", + "url": "/v2/service_brokers/b52de6f1-15dd-4069-8b42-f052cc9333fc", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": "2015-07-27T22:43:23Z" + }, + "entity": { + "name": "name-980", + "broker_url": "https://foo.com/url-39", + "auth_username": "auth_username-39", + "space_guid": "4f34c35e-be0d-409e-9279-1ccd7058c5d8" + } + }, + { + "metadata": { + "guid": "812e9e7f-b5b0-4587-ba3c-b4a7c574fb88", + "url": "/v2/service_brokers/812e9e7f-b5b0-4587-ba3c-b4a7c574fb88", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null + }, + "entity": { + "name": "name-981", + "broker_url": "https://foo.com/url-40", + "auth_username": "auth_username-40", + "space_guid": null + } + }, + { + "metadata": { + "guid": "93e760c4-ff3d-447a-9cff-a17f4454eaee", + "url": "/v2/service_brokers/93e760c4-ff3d-447a-9cff-a17f4454eaee", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null + }, + "entity": { + "name": "name-982", + "broker_url": "https://foo.com/url-41", + "auth_username": "auth_username-41", + "space_guid": null + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/GET_{id}_response.json new file mode 100644 index 00000000000..f9d323ea705 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/GET_{id}_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "1311f77f-cfb6-499e-bcba-82c7ef968ae6", + "url": "/v2/service_brokers/1311f77f-cfb6-499e-bcba-82c7ef968ae6", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": "2015-07-27T22:43:23Z" + }, + "entity": { + "name": "name-974", + "broker_url": "https://foo.com/url-36", + "auth_username": "auth_username-36", + "space_guid": "7878cee1-a484-4148-92bf-84beae20842f" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/POST_request.json new file mode 100644 index 00000000000..e3e0be4acfb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/POST_request.json @@ -0,0 +1,6 @@ +{ + "auth_password": "secretpassw0rd", + "auth_username": "admin", + "broker_url": "https://broker.example.com", + "name": "service-broker-name" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/POST_response.json new file mode 100644 index 00000000000..42f24d27c4e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/POST_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "1e86a649-e4a2-4bed-830d-b12435ed4cd9", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": null, + "url": "/v2/service_brokers/1e86a649-e4a2-4bed-830d-b12435ed4cd9" + }, + "entity": { + "name": "service-broker-name", + "broker_url": "https://broker.example.com", + "auth_username": "admin", + "space_guid": null + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/PUT_{id}_request.json new file mode 100644 index 00000000000..668c684f072 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/PUT_{id}_request.json @@ -0,0 +1,5 @@ +{ + "auth_username": "admin-user", + "auth_password": "some-secret", + "broker_url": "https://mybroker.example.com" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/PUT_{id}_response.json new file mode 100644 index 00000000000..20c76985759 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_brokers/PUT_{id}_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "92b935f5-20e2-4377-a7e2-f15faa110eab", + "created_at": "2015-07-27T22:43:23Z", + "updated_at": "2015-07-27T22:43:23Z", + "url": "/v2/service_brokers/92b935f5-20e2-4377-a7e2-f15faa110eab" + }, + "entity": { + "name": "name-998", + "broker_url": "https://mybroker.example.com", + "auth_username": "admin-user", + "space_guid": "85e59d96-b68b-4908-8ff5-8d54f4371f14" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/DELETE_{id}_accepts_incomplete_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/DELETE_{id}_accepts_incomplete_response.json new file mode 100644 index 00000000000..9cc0eb92e13 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/DELETE_{id}_accepts_incomplete_response.json @@ -0,0 +1,28 @@ +{ + "metadata": { + "guid": "2e20eccf-6828-4c56-81cb-28c0e295ce19", + "url": "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19", + "created_at": "2017-02-27T12:30:29Z", + "updated_at": "2017-02-27T12:30:29Z" + }, + "entity": { + "name": "test-service", + "service_plan_guid": "07c64d77-4df5-4974-a4b2-3bc58cafcf0d", + "space_guid": "840d3266-8547-40fe-986e-ffc20eaba235", + "gateway_data": null, + "dashboard_url": "http://test-dashboard-host/2e20eccf-6828-4c56-81cb-28c0e295ce19", + "type": "managed_service_instance", + "last_operation": { + "type": "delete", + "state": "in progress", + "description": "", + "updated_at": "2017-02-27T12:30:59Z", + "created_at": "2017-02-27T12:30:59Z" + }, + "space_url": "/v2/spaces/840d3266-8547-40fe-986e-ffc20eaba235", + "service_plan_url": "/v2/service_plans/07c64d77-4df5-4974-a4b2-3bc58cafcf0d", + "service_bindings_url": "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19/service_bindings", + "service_keys_url": "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19/service_keys", + "routes_url": "/v2/service_instances/2e20eccf-6828-4c56-81cb-28c0e295ce19/routes" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_response.json new file mode 100644 index 00000000000..17ef9fb2c8a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_response.json @@ -0,0 +1,42 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "24ec15f9-f6c7-434a-8893-51baab8408d8", + "url": "/v2/service_instances/24ec15f9-f6c7-434a-8893-51baab8408d8", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": null + }, + "entity": { + "name": "name-133", + "credentials": { + "creds-key-72": "creds-val-72" + }, + "service_plan_guid": "2b53255a-8b40-4671-803d-21d3f5d4183a", + "space_guid": "83b3e705-49fd-4c40-8adf-f5e34f622a19", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "service broker-provided description", + "updated_at": "2015-07-27T22:43:08Z", + "created_at": "2015-07-27T22:43:08Z" + }, + "tags": [ + "accounting", + "mongodb" + ], + "space_url": "/v2/spaces/83b3e705-49fd-4c40-8adf-f5e34f622a19", + "service_plan_url": "/v2/service_plans/2b53255a-8b40-4671-803d-21d3f5d4183a", + "service_bindings_url": "/v2/service_instances/24ec15f9-f6c7-434a-8893-51baab8408d8/service_bindings", + "service_keys_url": "/v2/service_instances/24ec15f9-f6c7-434a-8893-51baab8408d8/service_keys" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_parameters_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_parameters_response.json new file mode 100644 index 00000000000..002cdfd5776 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_parameters_response.json @@ -0,0 +1,7 @@ +{ + "test-param-key-1": "test-param-value-1", + "test-param-key-2": 12345, + "test-param-key-3": false, + "test-param-key-4": 3.141, + "test-param-key-5": null +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_permissions_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_permissions_response.json new file mode 100644 index 00000000000..195713e2c15 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_permissions_response.json @@ -0,0 +1,4 @@ +{ + "manage": true, + "read": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_response.json new file mode 100644 index 00000000000..fd7fd807308 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_response.json @@ -0,0 +1,40 @@ +{ + "metadata": { + "guid": "0d632575-bb06-4ea5-bb19-a451a9644d92", + "url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92", + "created_at": "2016-06-08T16:41:29Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1508", + "credentials": { + "creds-key-38": "creds-val-38" + }, + "service_guid": "a14baddf-1ccc-5299-0152-ab9s49de4422", + "service_plan_guid": "779d2df0-9cdd-48e8-9781-ea05301cedb1", + "space_guid": "38511660-89d9-4a6e-a889-c32c7e94f139", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "service broker-provided description", + "updated_at": "2016-06-08T16:41:29Z", + "created_at": "2016-06-08T16:41:29Z" + }, + "tags": [ + "accounting", + "mongodb" + ], + "space_url": "/v2/spaces/38511660-89d9-4a6e-a889-c32c7e94f139", + "service_url": "/v2/services/a14baddf-1ccc-5299-0152-ab9s49de4422", + "service_plan_url": "/v2/service_plans/779d2df0-9cdd-48e8-9781-ea05301cedb1", + "service_bindings_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/service_bindings", + "service_keys_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/service_keys", + "routes_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/routes", + "shared_from_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_from", + "shared_to_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_to", + "service_instance_parameters_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/parameters" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_routes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_routes_response.json new file mode 100644 index 00000000000..b372fd57e65 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_routes_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "674b6eac-4a22-4a9d-bee2-b61299a57bf4", + "url": "/v2/routes/674b6eac-4a22-4a9d-bee2-b61299a57bf4", + "created_at": "2016-06-08T16:41:30Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "host": "host-17", + "path": "", + "domain_guid": "8580604f-60e0-4903-a73f-f2e5e6660a68", + "space_guid": "276011c4-0550-4a01-82d5-7e9c95feb9ae", + "service_instance_guid": "26fae4d0-df82-42f3-ac67-da5873e3a277", + "port": null, + "domain_url": "/v2/private_domains/8580604f-60e0-4903-a73f-f2e5e6660a68", + "space_url": "/v2/spaces/276011c4-0550-4a01-82d5-7e9c95feb9ae", + "service_instance_url": "/v2/service_instances/26fae4d0-df82-42f3-ac67-da5873e3a277", + "apps_url": "/v2/routes/674b6eac-4a22-4a9d-bee2-b61299a57bf4/apps", + "route_mappings_url": "/v2/routes/674b6eac-4a22-4a9d-bee2-b61299a57bf4/route_mappings" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_service_bindings_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_service_bindings_response.json new file mode 100644 index 00000000000..b0f7f088ba6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_service_bindings_response.json @@ -0,0 +1,30 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "05f3ec3c-8d97-4bd8-bf86-e44cc835a154", + "url": "/v2/service_bindings/05f3ec3c-8d97-4bd8-bf86-e44cc835a154", + "created_at": "2015-07-27T22:43:09Z", + "updated_at": null + }, + "entity": { + "app_guid": "8a50163b-a39d-4f44-aece-dc5a956da848", + "service_instance_guid": "a5a0567e-edbf-4da9-ae90-dce24af308a1", + "credentials": { + "creds-key-85": "creds-val-85" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/8a50163b-a39d-4f44-aece-dc5a956da848", + "service_instance_url": "/v2/service_instances/a5a0567e-edbf-4da9-ae90-dce24af308a1" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_service_keys_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_service_keys_response.json new file mode 100644 index 00000000000..4717b4392e8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/GET_{id}_service_keys_response.json @@ -0,0 +1,24 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "03ddc0ba-f792-4762-b4e4-dc08b307dc4f", + "url": "/v2/service_keys/03ddc0ba-f792-4762-b4e4-dc08b307dc4f", + "created_at": "2016-05-04T04:49:09Z", + "updated_at": null + }, + "entity": { + "name": "a-service-key", + "service_instance_guid": "28120eae-4a44-42da-a3db-2a34aea8dcaa", + "credentials": { + "creds-key-68": "creds-val-68" + }, + "service_instance_url": "/v2/service_instances/28120eae-4a44-42da-a3db-2a34aea8dcaa" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/POST_request.json new file mode 100644 index 00000000000..2cdda997928 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/POST_request.json @@ -0,0 +1,12 @@ +{ + "name": "my-service-instance", + "parameters": { + "the_service_broker": "wants this object" + }, + "service_plan_guid": "2048a369-d2d3-48cf-bcfd-eaf9032fa0ab", + "space_guid": "86b29f7e-721d-4eb8-b34f-3b1d1eccdf23", + "tags": [ + "accounting", + "mongodb" + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/POST_response.json new file mode 100644 index 00000000000..cb10519fb61 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/POST_response.json @@ -0,0 +1,34 @@ +{ + "metadata": { + "guid": "8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a", + "url": "/v2/service_instances/8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": null + }, + "entity": { + "name": "my-service-instance", + "credentials": { + "creds-key-356": "creds-val-356" + }, + "service_plan_guid": "2048a369-d2d3-48cf-bcfd-eaf9032fa0ab", + "space_guid": "86b29f7e-721d-4eb8-b34f-3b1d1eccdf23", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": { + "type": "create", + "state": "in progress", + "description": "", + "updated_at": "2015-07-27T22:43:08Z", + "created_at": "2015-07-27T22:43:08Z" + }, + "tags": [ + "accounting", + "mongodb" + ], + "space_url": "/v2/spaces/86b29f7e-721d-4eb8-b34f-3b1d1eccdf23", + "service_plan_url": "/v2/service_plans/2048a369-d2d3-48cf-bcfd-eaf9032fa0ab", + "service_bindings_url": "/v2/service_instances/8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a/service_bindings", + "service_keys_url": "/v2/service_instances/8b2b3c5e-c1ba-41d0-ac87-08c776cfc25a/service_keys" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_request.json new file mode 100644 index 00000000000..427eb9e3d39 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_request.json @@ -0,0 +1,7 @@ +{ + "service_plan_guid": "5b5e984f-bbf6-477b-9d3a-b6d5df941b50", + "parameters": { + "the_service_broker": "wants this object" + }, + "tags": [] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_response.json new file mode 100644 index 00000000000..a6be5ca82d9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_response.json @@ -0,0 +1,40 @@ +{ + "metadata": { + "guid": "a34f1423-4b84-4727-ab49-3f1522c4cb16", + "url": "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16", + "created_at": "2016-06-08T16:41:30Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1529", + "credentials": { + "creds-key-41": "creds-val-41" + }, + "service_plan_guid": "4ec73bf4-9f3a-44c7-bbac-61ee9cb5a511", + "space_guid": "da37b4b7-2439-4b30-9eb3-bded0dbf690f", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": { + "type": "update", + "state": "in progress", + "description": "", + "updated_at": "2016-06-08T16:41:30Z", + "created_at": "2016-06-08T16:41:30Z" + }, + "tags": [ + + ], + "maintenance_info": { + "version": "2.1.0", + "description": "OS image update.\nExpect downtime." + }, + "space_url": "/v2/spaces/da37b4b7-2439-4b30-9eb3-bded0dbf690f", + "service_plan_url": "/v2/service_plans/4ec73bf4-9f3a-44c7-bbac-61ee9cb5a511", + "service_bindings_url": "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16/service_bindings", + "service_keys_url": "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16/service_keys", + "routes_url": "/v2/service_instances/a34f1423-4b84-4727-ab49-3f1522c4cb16/routes", + "shared_from_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_from", + "shared_to_url": "/v2/service_instances/0d632575-bb06-4ea5-bb19-a451a9644d92/shared_to" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_routes_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_routes_request.json new file mode 100644 index 00000000000..85e350bb06c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_routes_request.json @@ -0,0 +1,5 @@ +{ + "parameters": { + "the_service_broker": "wants this object" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_routes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_routes_response.json new file mode 100644 index 00000000000..be0389ba986 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_instances/PUT_{id}_routes_response.json @@ -0,0 +1,27 @@ +{ + "metadata": { + "guid": "e7e5b08e-c530-4c1c-b420-fa0b09b3770d", + "url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d", + "created_at": "2015-12-22T18:27:58Z", + "updated_at": null + }, + "entity": { + "name": "name-160", + "credentials": { + "creds-key-89": "creds-val-89" + }, + "service_plan_guid": "957307f5-6811-4eba-8667-ffee5a704a4a", + "space_guid": "36b01ada-ef02-4ff5-9f78-cd9e704211d2", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": null, + "tags": [ + ], + "space_url": "/v2/spaces/36b01ada-ef02-4ff5-9f78-cd9e704211d2", + "service_plan_url": "/v2/service_plans/957307f5-6811-4eba-8667-ffee5a704a4a", + "service_bindings_url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/service_bindings", + "service_keys_url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/service_keys", + "routes_url": "/v2/service_instances/e7e5b08e-c530-4c1c-b420-fa0b09b3770d/routes" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/GET_response.json new file mode 100644 index 00000000000..07d16773a39 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/GET_response.json @@ -0,0 +1,24 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "3936801c-9d3f-4b9f-8465-aa3bd263612e", + "url": "/v2/service_keys/3936801c-9d3f-4b9f-8465-aa3bd263612e", + "created_at": "2015-07-27T22:43:22Z", + "updated_at": null + }, + "entity": { + "name": "name-934", + "service_instance_guid": "84d384d9-42c2-4e4b-a8c6-865e9446e024", + "credentials": { + "creds-key-383": "creds-val-383" + }, + "service_instance_url": "/v2/service_instances/84d384d9-42c2-4e4b-a8c6-865e9446e024" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/GET_{id}_response.json new file mode 100644 index 00000000000..489911692ec --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/GET_{id}_response.json @@ -0,0 +1,17 @@ +{ + "metadata": { + "guid": "6ad2cc9b-1996-49a3-9538-dfc0da3b1f32", + "url": "/v2/service_keys/6ad2cc9b-1996-49a3-9538-dfc0da3b1f32", + "created_at": "2016-06-08T16:41:23Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-140", + "service_instance_guid": "ca567b3d-e142-4139-94e3-1e0c010ba728", + "credentials": { + "creds-key-7": "creds-val-7" + }, + "service_instance_url": "/v2/service_instances/ca567b3d-e142-4139-94e3-1e0c010ba728", + "service_key_parameters_url": "/v2/service_keys/6ad2cc9b-1996-49a3-9538-dfc0da3b1f32/parameters" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/POST_request.json new file mode 100644 index 00000000000..1895590bcd7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "name-960", + "service_instance_guid": "132944c8-c31d-4bb8-9155-ae4e2ebe1a0c" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/POST_response.json new file mode 100644 index 00000000000..0371f754bfa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_keys/POST_response.json @@ -0,0 +1,16 @@ +{ + "metadata": { + "guid": "79aa4b11-99f3-484b-adfc-a63fa818c4d1", + "url": "/v2/service_keys/79aa4b11-99f3-484b-adfc-a63fa818c4d1", + "created_at": "2015-07-27T22:43:22Z", + "updated_at": null + }, + "entity": { + "name": "name-960", + "service_instance_guid": "132944c8-c31d-4bb8-9155-ae4e2ebe1a0c", + "credentials": { + "creds-key-392": "creds-val-392" + }, + "service_instance_url": "/v2/service_instances/132944c8-c31d-4bb8-9155-ae4e2ebe1a0c" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/GET_response.json new file mode 100644 index 00000000000..742d48d6c11 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/GET_response.json @@ -0,0 +1,22 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "3d5c0584-fbf0-4d75-b68e-226e77496f69", + "url": "/v2/service_plan_visibilities/3d5c0584-fbf0-4d75-b68e-226e77496f69", + "created_at": "2015-07-27T22:43:28Z", + "updated_at": null + }, + "entity": { + "service_plan_guid": "69cab29d-826c-48bf-b435-b43013f9c11b", + "organization_guid": "1dbe25db-6a8c-43e7-a941-cc483bb45570", + "service_plan_url": "/v2/service_plans/69cab29d-826c-48bf-b435-b43013f9c11b", + "organization_url": "/v2/organizations/1dbe25db-6a8c-43e7-a941-cc483bb45570" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/GET_{id}_response.json new file mode 100644 index 00000000000..262331b1044 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/GET_{id}_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "18365c25-898b-4365-911d-6f6a09154297", + "url": "/v2/service_plan_visibilities/18365c25-898b-4365-911d-6f6a09154297", + "created_at": "2015-07-27T22:43:28Z", + "updated_at": null + }, + "entity": { + "service_plan_guid": "ea1ba716-e720-4aef-8a90-439924bb53d0", + "organization_guid": "a1cc950b-ed5b-41eb-8eee-d9a8f85aa1ea", + "service_plan_url": "/v2/service_plans/ea1ba716-e720-4aef-8a90-439924bb53d0", + "organization_url": "/v2/organizations/a1cc950b-ed5b-41eb-8eee-d9a8f85aa1ea" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/POST_request.json new file mode 100644 index 00000000000..675b9451237 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/POST_request.json @@ -0,0 +1,4 @@ +{ + "service_plan_guid": "43f5496b-9117-404a-a637-eb38141b05af", + "organization_guid": "09be17a1-0cc6-4edb-955c-cf2a2ae85470" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/POST_response.json new file mode 100644 index 00000000000..c835838ac28 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/POST_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "28a22749-25f4-44bd-a371-c37e2ee53175", + "url": "/v2/service_plan_visibilities/28a22749-25f4-44bd-a371-c37e2ee53175", + "created_at": "2015-07-27T22:43:28Z", + "updated_at": null + }, + "entity": { + "service_plan_guid": "43f5496b-9117-404a-a637-eb38141b05af", + "organization_guid": "09be17a1-0cc6-4edb-955c-cf2a2ae85470", + "service_plan_url": "/v2/service_plans/43f5496b-9117-404a-a637-eb38141b05af", + "organization_url": "/v2/organizations/09be17a1-0cc6-4edb-955c-cf2a2ae85470" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/PUT_{id}_request.json new file mode 100644 index 00000000000..ce5e99f77f3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/PUT_{id}_request.json @@ -0,0 +1,4 @@ +{ + "service_plan_guid": "7288464d-3866-436a-915c-2bada4725e7e", + "organization_guid": "e4d0b68b-9e73-4253-b03f-2bfda6cd814b" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/PUT_{id}_response.json new file mode 100644 index 00000000000..fa587432d54 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plan_visibilities/PUT_{id}_response.json @@ -0,0 +1,14 @@ +{ + "metadata": { + "guid": "5f1514f9-66ee-4799-9de2-69f2ec3cb5f1", + "url": "/v2/service_plan_visibilities/5f1514f9-66ee-4799-9de2-69f2ec3cb5f1", + "created_at": "2015-07-27T22:43:28Z", + "updated_at": "2015-07-27T22:43:28Z" + }, + "entity": { + "service_plan_guid": "7288464d-3866-436a-915c-2bada4725e7e", + "organization_guid": "e4d0b68b-9e73-4253-b03f-2bfda6cd814b", + "service_plan_url": "/v2/service_plans/7288464d-3866-436a-915c-2bada4725e7e", + "organization_url": "/v2/organizations/e4d0b68b-9e73-4253-b03f-2bfda6cd814b" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_response.json new file mode 100644 index 00000000000..36ea79b63c4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "956cb355-3acc-4ced-8161-a57b9b5c7943", + "url": "/v2/service_plans/956cb355-3acc-4ced-8161-a57b9b5c7943", + "created_at": "2015-07-27T22:43:16Z", + "updated_at": null + }, + "entity": { + "name": "name-464", + "free": false, + "description": "desc-54", + "service_guid": "83dc64ef-eb0a-454c-b3d9-c554921f3bd2", + "extra": null, + "unique_id": "49aee95b-2108-4bbb-9769-c6197f308acf", + "public": true, + "active": true, + "service_url": "/v2/services/83dc64ef-eb0a-454c-b3d9-c554921f3bd2", + "service_instances_url": "/v2/service_plans/956cb355-3acc-4ced-8161-a57b9b5c7943/service_instances" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_{id}_response.json new file mode 100644 index 00000000000..a9236e5965f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_{id}_response.json @@ -0,0 +1,62 @@ +{ + "metadata": { + "guid": "f6ceb8a2-e6fc-43d5-a11b-7ced9e1b47c7", + "url": "/v2/service_plans/f6ceb8a2-e6fc-43d5-a11b-7ced9e1b47c7", + "created_at": "2015-07-27T22:43:16Z", + "updated_at": null + }, + "entity": { + "name": "name-462", + "free": false, + "description": "desc-52", + "service_guid": "8ac39757-0f9d-4295-9b6f-e626f7ee3cd4", + "extra": null, + "unique_id": "2aa0162c-9c88-4084-ad1d-566a09e8d316", + "public": true, + "active": true, + "service_url": "/v2/services/8ac39757-0f9d-4295-9b6f-e626f7ee3cd4", + "service_instances_url": "/v2/service_plans/f6ceb8a2-e6fc-43d5-a11b-7ced9e1b47c7/service_instances", + "schemas": { + "service_instance": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + }, + "update": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + } + }, + "service_binding": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_{id}_service_instances_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_{id}_service_instances_response.json new file mode 100644 index 00000000000..55f0260ddca --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/GET_{id}_service_instances_response.json @@ -0,0 +1,34 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f", + "url": "/v2/service_instances/b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f", + "created_at": "2015-07-27T22:43:16Z", + "updated_at": null + }, + "entity": { + "name": "name-457", + "credentials": { + "creds-key-268": "creds-val-268" + }, + "service_plan_guid": "bb29926c-7482-4ae5-803c-ec99e95aa278", + "space_guid": "cf5812f5-bf43-40cc-88d4-d50b76d7797d", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": null, + "tags": [ + ], + "space_url": "/v2/spaces/cf5812f5-bf43-40cc-88d4-d50b76d7797d", + "service_plan_url": "/v2/service_plans/bb29926c-7482-4ae5-803c-ec99e95aa278", + "service_bindings_url": "/v2/service_instances/b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f/service_bindings", + "service_keys_url": "/v2/service_instances/b95c56b9-f81b-4d34-9a00-a1a1ddba5f2f/service_keys" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_request.json new file mode 100644 index 00000000000..f975c39029a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_request.json @@ -0,0 +1,3 @@ +{ + "public": false +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_response.json new file mode 100644 index 00000000000..2024dcfba79 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "195f6bd5-0aa4-4a97-9c8d-5410e5e6d4b6", + "url": "/v2/service_plans/195f6bd5-0aa4-4a97-9c8d-5410e5e6d4b6", + "created_at": "2016-02-19T02:04:09Z", + "updated_at": "2016-02-19T02:04:09Z" + }, + "entity": { + "name": "name-2674", + "free": false, + "description": "desc-225", + "service_guid": "42bea093-8fe5-491a-8a34-b1943dc3709a", + "extra": null, + "unique_id": "7c4f2f8a-aa82-49e9-9f0c-76248aa1036d", + "public": false, + "active": true, + "service_url": "/v2/services/42bea093-8fe5-491a-8a34-b1943dc3709a", + "service_instances_url": "/v2/service_plans/195f6bd5-0aa4-4a97-9c8d-5410e5e6d4b6/service_instances" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_service_instances_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_service_instances_request.json new file mode 100644 index 00000000000..82f7f84d3d2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_service_instances_request.json @@ -0,0 +1,3 @@ +{ + "service_plan_guid": "8234565b-70d1-41cc-ac11-783694c35d15" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_service_instances_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_service_instances_response.json new file mode 100644 index 00000000000..9a3191426ad --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_plans/PUT_{id}_service_instances_response.json @@ -0,0 +1,3 @@ +{ + "changed_count": 1 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_usage_events/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_usage_events/GET_response.json new file mode 100644 index 00000000000..8f2c1d1e855 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_usage_events/GET_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "0c9c59b8-3462-4acf-be39-aa987f087146", + "url": "/v2/service_usage_events/0c9c59b8-3462-4acf-be39-aa987f087146", + "created_at": "2015-07-27T22:43:30Z" + }, + "entity": { + "state": "CREATED", + "org_guid": "guid-4dd5a051-3460-4246-a842-1dc2d5983c51", + "space_guid": "guid-76bd662b-fd5b-4b5c-a393-d65e67f99d53", + "space_name": "name-2154", + "service_instance_guid": "guid-15a7c119-838d-4516-acd9-062dec25d934", + "service_instance_name": "name-2155", + "service_instance_type": "type-2", + "service_plan_guid": "guid-eddab64c-7be0-407e-91b0-82a8093cdfc5", + "service_plan_name": "name-2156", + "service_guid": "guid-d471c693-824c-44a6-b069-a679e323326d", + "service_label": "label-77" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_usage_events/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_usage_events/GET_{id}_response.json new file mode 100644 index 00000000000..ca27bbbd710 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/service_usage_events/GET_{id}_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "9470627d-0488-4d9a-8564-f97571487893", + "url": "/v2/service_usage_events/9470627d-0488-4d9a-8564-f97571487893", + "created_at": "2015-07-27T22:43:30Z" + }, + "entity": { + "state": "CREATED", + "org_guid": "guid-3f19bc03-d183-4189-bdeb-9f33468181da", + "space_guid": "guid-d565b0c4-3c38-41dd-a102-1c113c759fbf", + "space_name": "name-2160", + "service_instance_guid": "guid-4cef8892-46fc-4d70-a5d5-36385989f5df", + "service_instance_name": "name-2161", + "service_instance_type": "type-4", + "service_plan_guid": "guid-f2a17886-488c-4066-9155-a1dbb64adadd", + "service_plan_name": "name-2162", + "service_guid": "guid-fdff7ee0-cc1b-4bdb-87d6-b0c3b47cb2b2", + "service_label": "label-79" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..2197040115d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_response.json new file mode 100644 index 00000000000..a6d5fe04029 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_response.json @@ -0,0 +1,37 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "69b84c38-e786-4270-9cca-59d02a700798", + "url": "/v2/services/69b84c38-e786-4270-9cca-59d02a700798", + "created_at": "2015-07-27T22:43:35Z", + "updated_at": null + }, + "entity": { + "label": "label-87", + "provider": null, + "url": null, + "description": "desc-220", + "long_description": null, + "version": null, + "info_url": null, + "active": true, + "bindable": true, + "unique_id": "e46b095e-aa85-4ffb-98d9-0bc94b84d45c", + "extra": null, + "tags": [ + ], + "requires": [ + ], + "documentation_url": null, + "service_broker_guid": "5c323c18-e26c-45ff-a4f9-6a8916912a22", + "plan_updateable": false, + "service_plans_url": "/v2/services/69b84c38-e786-4270-9cca-59d02a700798/service_plans" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_{id}_response.json new file mode 100644 index 00000000000..dcb8e9825e0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_{id}_response.json @@ -0,0 +1,27 @@ +{ + "metadata": { + "guid": "53f52780-e93c-4af7-a96c-6958311c40e5", + "url": "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5", + "created_at": "2016-06-08T16:41:32Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "label": "label-58", + "provider": null, + "url": null, + "description": "desc-135", + "long_description": null, + "version": null, + "info_url": null, + "active": true, + "bindable": true, + "unique_id": "c181996b-f233-43d1-8901-3a43eafcaacf", + "extra": null, + "documentation_url": null, + "service_broker_guid": "0e7250aa-364f-42c2-8fd2-808b0224376f", + "plan_updateable": false, + "instances_retrievable": false, + "bindings_retrievable": false, + "service_plans_url": "/v2/services/53f52780-e93c-4af7-a96c-6958311c40e5/service_plans" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_{id}_service_plans_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_{id}_service_plans_response.json new file mode 100644 index 00000000000..aade31c5816 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/services/GET_{id}_service_plans_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "51067400-d79f-4ca5-9400-1f36f5dd09e7", + "url": "/v2/service_plans/51067400-d79f-4ca5-9400-1f36f5dd09e7", + "created_at": "2015-07-27T22:43:35Z", + "updated_at": null + }, + "entity": { + "name": "name-2409", + "free": false, + "description": "desc-218", + "service_guid": "f1b0edbe-fac4-4512-9071-8b26045413bb", + "extra": null, + "unique_id": "48fb5a34-1c14-4da5-944e-a14fa1ba5325", + "public": true, + "active": true, + "service_url": "/v2/services/f1b0edbe-fac4-4512-9071-8b26045413bb", + "service_instances_url": "/v2/service_plans/51067400-d79f-4ca5-9400-1f36f5dd09e7/service_instances" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..57859e3b9f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/GET_response.json new file mode 100644 index 00000000000..40bb06c6e23 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/GET_response.json @@ -0,0 +1,68 @@ +{ + "total_results": 5, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "f01b174d-c750-46b0-9ddf-3aeb2064d796", + "url": "/v2/shared_domains/f01b174d-c750-46b0-9ddf-3aeb2064d796", + "created_at": "2015-11-30T23:38:35Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain1.com", + "router_group_guid": null + } + }, + { + "metadata": { + "guid": "3595f6cb-81cf-424e-a546-533877ccccfd", + "url": "/v2/shared_domains/3595f6cb-81cf-424e-a546-533877ccccfd", + "created_at": "2015-11-30T23:38:35Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain2.com", + "router_group_guid": null + } + }, + { + "metadata": { + "guid": "d0d28c59-86ee-4415-9269-500976f18e72", + "url": "/v2/shared_domains/d0d28c59-86ee-4415-9269-500976f18e72", + "created_at": "2015-11-30T23:38:35Z", + "updated_at": null + }, + "entity": { + "name": "domain-19.example.com", + "router_group_guid": null + } + }, + { + "metadata": { + "guid": "b7242cdb-f81a-4469-b897-d5a218470fdf", + "url": "/v2/shared_domains/b7242cdb-f81a-4469-b897-d5a218470fdf", + "created_at": "2015-11-30T23:38:35Z", + "updated_at": null + }, + "entity": { + "name": "domain-20.example.com", + "router_group_guid": null + } + }, + { + "metadata": { + "guid": "130c193c-c1c6-41c9-98c2-4a0e16a948bf", + "url": "/v2/shared_domains/130c193c-c1c6-41c9-98c2-4a0e16a948bf", + "created_at": "2015-11-30T23:38:35Z", + "updated_at": null + }, + "entity": { + "name": "domain-21.example.com", + "router_group_guid": null + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/GET_{id}_response.json new file mode 100644 index 00000000000..5aecd575841 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/GET_{id}_response.json @@ -0,0 +1,13 @@ +{ + "metadata": { + "guid": "fa1385de-55ba-41d3-beb2-f83919c634d6", + "url": "/v2/shared_domains/fa1385de-55ba-41d3-beb2-f83919c634d6", + "created_at": "2016-06-08T16:41:33Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain1.com", + "router_group_guid": null, + "router_group_type": null + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/POST_request.json new file mode 100644 index 00000000000..a3a7df89620 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "shared-domain.com", + "router_group_guid": "random-guid" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/POST_response.json new file mode 100644 index 00000000000..0266ffafe1b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/shared_domains/POST_response.json @@ -0,0 +1,13 @@ +{ + "metadata": { + "guid": "d6c7d452-70bb-4edd-bbf1-a925dd51732c", + "url": "/v2/shared_domains/d6c7d452-70bb-4edd-bbf1-a925dd51732c", + "created_at": "2016-04-22T19:33:17Z", + "updated_at": null + }, + "entity": { + "name": "example.com", + "router_group_guid": "my-random-guid", + "router_group_type": "tcp" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..2197040115d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_response.json new file mode 100644 index 00000000000..23915e93057 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_response.json @@ -0,0 +1,27 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "be2d5c01-3413-43db-bea2-49b0b60ec74d", + "url": "/v2/space_quota_definitions/be2d5c01-3413-43db-bea2-49b0b60ec74d", + "created_at": "2015-07-27T22:43:32Z", + "updated_at": null + }, + "entity": { + "name": "name-2236", + "organization_guid": "a81d5218-b473-474e-9afb-3223a8b2ae9f", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "memory_limit": 20480, + "instance_memory_limit": -1, + "organization_url": "/v2/organizations/a81d5218-b473-474e-9afb-3223a8b2ae9f", + "spaces_url": "/v2/space_quota_definitions/be2d5c01-3413-43db-bea2-49b0b60ec74d/spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_{id}_response.json new file mode 100644 index 00000000000..408763e7f3f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_{id}_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "4b8e7d14-71bd-4abb-b474-183375c75c84", + "url": "/v2/space_quota_definitions/4b8e7d14-71bd-4abb-b474-183375c75c84", + "created_at": "2015-11-30T23:38:46Z", + "updated_at": null + }, + "entity": { + "name": "name-1892", + "organization_guid": "0dbbac8c-16ac-4ba5-8f59-3d3a79874f5d", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "memory_limit": 20480, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "organization_url": "/v2/organizations/0dbbac8c-16ac-4ba5-8f59-3d3a79874f5d", + "spaces_url": "/v2/space_quota_definitions/4b8e7d14-71bd-4abb-b474-183375c75c84/spaces" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_{id}_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_{id}_spaces_response.json new file mode 100644 index 00000000000..0a1ff4e04a5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/GET_{id}_spaces_response.json @@ -0,0 +1,35 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "a1f21571-07a6-42df-b9c0-501b97fac05b", + "url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b", + "created_at": "2016-06-08T16:41:29Z", + "updated_at": "2016-06-08T16:41:29Z" + }, + "entity": { + "name": "name-1473", + "organization_guid": "e0878e36-e2f3-4290-b7c6-50f825ce6c77", + "space_quota_definition_guid": "e37cdd97-af56-4417-a99d-060093057275", + "allow_ssh": true, + "organization_url": "/v2/organizations/e0878e36-e2f3-4290-b7c6-50f825ce6c77", + "space_quota_definition_url": "/v2/space_quota_definitions/e37cdd97-af56-4417-a99d-060093057275", + "developers_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/developers", + "managers_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/managers", + "auditors_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/auditors", + "apps_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/apps", + "routes_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/routes", + "domains_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/domains", + "service_instances_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/service_instances", + "app_events_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/app_events", + "events_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/events", + "security_groups_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/security_groups", + "staging_security_groups_url": "/v2/spaces/a1f21571-07a6-42df-b9c0-501b97fac05b/staging_security_groups" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/POST_request.json new file mode 100644 index 00000000000..a34c6f14637 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/POST_request.json @@ -0,0 +1,9 @@ +{ + "name": "gold_quota", + "non_basic_services_allowed": true, + "total_services": -1, + "total_routes": 10, + "memory_limit": 5120, + "organization_guid": "c9b4ac17-ab4b-4368-b3e2-5cbf09b17a24", + "total_reserved_route_ports": 5 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/POST_response.json new file mode 100644 index 00000000000..22ef034fa60 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/POST_response.json @@ -0,0 +1,23 @@ +{ + "metadata": { + "guid": "17f055b8-b4c8-47cf-8737-0220d5706b4a", + "url": "/v2/space_quota_definitions/17f055b8-b4c8-47cf-8737-0220d5706b4a", + "created_at": "2016-06-08T16:41:29Z", + "updated_at": null + }, + "entity": { + "name": "gold_quota", + "organization_guid": "c9b4ac17-ab4b-4368-b3e2-5cbf09b17a24", + "non_basic_services_allowed": true, + "total_services": -1, + "total_routes": 10, + "memory_limit": 5120, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "app_task_limit": 5, + "total_service_keys": -1, + "total_reserved_route_ports": 5, + "organization_url": "/v2/organizations/c9b4ac17-ab4b-4368-b3e2-5cbf09b17a24", + "spaces_url": "/v2/space_quota_definitions/17f055b8-b4c8-47cf-8737-0220d5706b4a/spaces" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_request.json new file mode 100644 index 00000000000..dba8c0c3126 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_request.json @@ -0,0 +1,3 @@ +{ + "name": "new_name" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_response.json new file mode 100644 index 00000000000..2ec805124b0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_response.json @@ -0,0 +1,23 @@ +{ + "metadata": { + "guid": "bbd837ac-309d-4f53-9d49-67cb75364904", + "url": "/v2/space_quota_definitions/bbd837ac-309d-4f53-9d49-67cb75364904", + "created_at": "2016-06-08T16:41:29Z", + "updated_at": "2016-06-08T16:41:29Z" + }, + "entity": { + "name": "new_name", + "organization_guid": "dbd76462-6fec-4add-aaca-35b2ca7493bb", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "memory_limit": 20480, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "app_task_limit": 5, + "total_service_keys": 600, + "total_reserved_route_ports": -1, + "organization_url": "/v2/organizations/dbd76462-6fec-4add-aaca-35b2ca7493bb", + "spaces_url": "/v2/space_quota_definitions/bbd837ac-309d-4f53-9d49-67cb75364904/spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_spaces_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_spaces_{id}_response.json new file mode 100644 index 00000000000..fbad2490fb3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/space_quota_definitions/PUT_{id}_spaces_{id}_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "ea82f16c-c21a-4a8a-947a-f7606e7f63fa", + "url": "/v2/space_quota_definitions/ea82f16c-c21a-4a8a-947a-f7606e7f63fa", + "created_at": "2015-11-30T23:38:46Z", + "updated_at": null + }, + "entity": { + "name": "name-1887", + "organization_guid": "e188543a-cb71-4786-8703-9addbebc5bbf", + "non_basic_services_allowed": true, + "total_services": 60, + "total_routes": 1000, + "memory_limit": 20480, + "instance_memory_limit": -1, + "app_instance_limit": -1, + "organization_url": "/v2/organizations/e188543a-cb71-4786-8703-9addbebc5bbf", + "spaces_url": "/v2/space_quota_definitions/ea82f16c-c21a-4a8a-947a-f7606e7f63fa/spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..2197040115d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_request.json new file mode 100644 index 00000000000..0f5e12b5f12 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_request.json @@ -0,0 +1,3 @@ +{ + "username": "auditor@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_response.json new file mode 100644 index 00000000000..2be22a32cb4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "6ee704bb-fc88-40f6-9ab9-02fe8df35730", + "url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730", + "created_at": "2016-04-22T19:33:25Z", + "updated_at": null + }, + "entity": { + "name": "name-979", + "organization_guid": "c6aa1f1e-e5b4-4eff-8ae5-3a430866f5ea", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/c6aa1f1e-e5b4-4eff-8ae5-3a430866f5ea", + "developers_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/developers", + "managers_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/managers", + "auditors_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/auditors", + "apps_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/apps", + "routes_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/routes", + "domains_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/domains", + "service_instances_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/service_instances", + "app_events_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/app_events", + "events_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/events", + "security_groups_url": "/v2/spaces/6ee704bb-fc88-40f6-9ab9-02fe8df35730/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_{auditor-id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_{auditor-id}_response.json new file mode 100644 index 00000000000..6d421454dc0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_auditors_{auditor-id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "f493f9e0-074d-4631-b59a-52a47c29ec5f", + "url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "name": "name-65", + "organization_guid": "fb8817aa-1684-40d1-92f1-561709dddfdc", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/fb8817aa-1684-40d1-92f1-561709dddfdc", + "developers_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/developers", + "managers_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/managers", + "auditors_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/auditors", + "apps_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/apps", + "routes_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/routes", + "domains_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/domains", + "service_instances_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/service_instances", + "app_events_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/app_events", + "events_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/events", + "security_groups_url": "/v2/spaces/f493f9e0-074d-4631-b59a-52a47c29ec5f/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_developers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_developers_request.json new file mode 100644 index 00000000000..c010591f0c3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_developers_request.json @@ -0,0 +1,3 @@ +{ + "username": "developer@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_developers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_developers_response.json new file mode 100644 index 00000000000..206dc805b1a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_developers_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "998375df-21ec-4d73-a0fd-83c11b7c7c1d", + "url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d", + "created_at": "2016-04-22T19:33:26Z", + "updated_at": null + }, + "entity": { + "name": "name-1016", + "organization_guid": "d2ba20ee-07f8-4bab-91c7-41a5e103ca57", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/d2ba20ee-07f8-4bab-91c7-41a5e103ca57", + "developers_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/developers", + "managers_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/managers", + "auditors_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/auditors", + "apps_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/apps", + "routes_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/routes", + "domains_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/domains", + "service_instances_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/service_instances", + "app_events_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/app_events", + "events_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/events", + "security_groups_url": "/v2/spaces/998375df-21ec-4d73-a0fd-83c11b7c7c1d/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_managers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_managers_request.json new file mode 100644 index 00000000000..26a16689d15 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_managers_request.json @@ -0,0 +1,3 @@ +{ + "username": "manager@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_managers_response.json new file mode 100644 index 00000000000..d58bdd7ca4d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/DELETE_{id}_managers_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2", + "url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2", + "created_at": "2016-04-22T19:33:27Z", + "updated_at": null + }, + "entity": { + "name": "name-1041", + "organization_guid": "2e1dbf6f-426e-4ad7-b48e-347bbd2bdaa6", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/2e1dbf6f-426e-4ad7-b48e-347bbd2bdaa6", + "developers_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/developers", + "managers_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/managers", + "auditors_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/auditors", + "apps_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/apps", + "routes_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/routes", + "domains_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/domains", + "service_instances_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/service_instances", + "app_events_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/app_events", + "events_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/events", + "security_groups_url": "/v2/spaces/9f29c6d5-10cf-4d2c-a934-b0f2ea054bd2/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_response.json new file mode 100644 index 00000000000..ee8b69afbc4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_response.json @@ -0,0 +1,33 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "b4293b09-8316-472c-a29a-6468a3adff59", + "url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": null + }, + "entity": { + "name": "name-111", + "organization_guid": "3ce736dd-3b8c-4f64-acab-ed76488b79a3", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/3ce736dd-3b8c-4f64-acab-ed76488b79a3", + "developers_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/developers", + "managers_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/managers", + "auditors_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/auditors", + "apps_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/apps", + "routes_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/routes", + "domains_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/domains", + "service_instances_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/service_instances", + "app_events_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/app_events", + "events_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/events", + "security_groups_url": "/v2/spaces/b4293b09-8316-472c-a29a-6468a3adff59/security_groups" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_apps_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_apps_response.json new file mode 100644 index 00000000000..bdc773ea090 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_apps_response.json @@ -0,0 +1,54 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "4ee31730-3c0e-4ec6-8329-26e727ab8ccd", + "url": "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": "2015-07-27T22:43:08Z" + }, + "entity": { + "name": "name-103", + "production": false, + "space_guid": "ca816a1b-ed3e-4ea8-bda2-2031d2e5b89f", + "stack_guid": "e458a99f-53a4-4da4-b78a-5f2eb212cc47", + "buildpack": null, + "detected_buildpack": null, + "environment_json": null, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "cc21d137-45d6-4687-ab71-8288ac0e5724", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2015-07-27T22:43:08Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "space_url": "/v2/spaces/ca816a1b-ed3e-4ea8-bda2-2031d2e5b89f", + "stack_url": "/v2/stacks/e458a99f-53a4-4da4-b78a-5f2eb212cc47", + "events_url": "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/events", + "service_bindings_url": "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/service_bindings", + "routes_url": "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/routes", + "route_mappings_url": "/v2/apps/4ee31730-3c0e-4ec6-8329-26e727ab8ccd/route_mappings" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_auditors_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_auditors_response.json new file mode 100644 index 00000000000..fe1c5bbb81f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_auditors_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-15", + "url": "/v2/users/uaa-id-15", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "auditor@example.com", + "spaces_url": "/v2/users/uaa-id-15/spaces", + "organizations_url": "/v2/users/uaa-id-15/organizations", + "managed_organizations_url": "/v2/users/uaa-id-15/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-15/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-15/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-15/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-15/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_developers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_developers_response.json new file mode 100644 index 00000000000..ab2758a285c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_developers_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-24", + "url": "/v2/users/uaa-id-24", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "developer@example.com", + "spaces_url": "/v2/users/uaa-id-24/spaces", + "organizations_url": "/v2/users/uaa-id-24/organizations", + "managed_organizations_url": "/v2/users/uaa-id-24/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-24/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-24/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-24/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-24/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_domains_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_domains_response.json new file mode 100644 index 00000000000..50452edff71 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_domains_response.json @@ -0,0 +1,30 @@ +{ + "total_results": 2, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "08ac844a-e880-48ef-a90c-f95131582fcc", + "url": "/v2/domains/08ac844a-e880-48ef-a90c-f95131582fcc", + "created_at": "2015-07-27T22:43:05Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain1.com" + } + }, + { + "metadata": { + "guid": "973dcea1-5011-4bd0-aa9e-fa232bfaada7", + "url": "/v2/domains/973dcea1-5011-4bd0-aa9e-fa232bfaada7", + "created_at": "2015-07-27T22:43:05Z", + "updated_at": null + }, + "entity": { + "name": "customer-app-domain2.com" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_events_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_events_response.json new file mode 100644 index 00000000000..7cde487c3e1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_events_response.json @@ -0,0 +1,33 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "cbb42f10-2737-4522-95dc-3ada35056fa8", + "url": "/v2/events/cbb42f10-2737-4522-95dc-3ada35056fa8", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "type": "audit.space.update", + "actor": "uaa-id-10", + "actor_type": "user", + "actor_name": "user@example.com", + "actee": "33d44b03-6203-47a7-b71c-9bf6fcaeb54a", + "actee_type": "space", + "actee_name": "name-56", + "timestamp": "2015-07-27T22:43:07Z", + "metadata": { + "request": { + "name": "new_name" + } + }, + "space_guid": "33d44b03-6203-47a7-b71c-9bf6fcaeb54a", + "organization_guid": "ab7dff90-0bc7-4ce0-be5b-b8ecc676bc4a" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_managers_response.json new file mode 100644 index 00000000000..4253dbf1303 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_managers_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-35", + "url": "/v2/users/uaa-id-35", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "manager@example.com", + "spaces_url": "/v2/users/uaa-id-35/spaces", + "organizations_url": "/v2/users/uaa-id-35/organizations", + "managed_organizations_url": "/v2/users/uaa-id-35/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-35/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-35/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-35/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-35/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_response.json new file mode 100644 index 00000000000..7441c174b13 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "0f102457-c1fc-42e5-9c81-c7be2bc65dcd", + "url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": null + }, + "entity": { + "name": "name-108", + "organization_guid": "525a31fb-bc2b-4f7f-865e-1c93b42a6762", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/525a31fb-bc2b-4f7f-865e-1c93b42a6762", + "developers_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/developers", + "managers_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/managers", + "auditors_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/auditors", + "apps_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/apps", + "routes_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/routes", + "domains_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/domains", + "service_instances_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/service_instances", + "app_events_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/app_events", + "events_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/events", + "security_groups_url": "/v2/spaces/0f102457-c1fc-42e5-9c81-c7be2bc65dcd/security_groups" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_routes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_routes_response.json new file mode 100644 index 00000000000..52df9c5a21c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_routes_response.json @@ -0,0 +1,28 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "f975dbb5-f6d2-4cac-8014-49994ce01853", + "url": "/v2/routes/f975dbb5-f6d2-4cac-8014-49994ce01853", + "created_at": "2016-03-17T21:41:14Z", + "updated_at": null + }, + "entity": { + "host": "host-12", + "path": "", + "domain_guid": "b3ed68d6-c35f-4b17-bacb-ebc90da7fce1", + "space_guid": "e3e2198a-e098-4473-b430-39a1d53a1d5b", + "service_instance_guid": null, + "port": 0, + "domain_url": "/v2/domains/b3ed68d6-c35f-4b17-bacb-ebc90da7fce1", + "space_url": "/v2/spaces/e3e2198a-e098-4473-b430-39a1d53a1d5b", + "apps_url": "/v2/routes/f975dbb5-f6d2-4cac-8014-49994ce01853/apps", + "route_mappings_url": "/v2/routes/f975dbb5-f6d2-4cac-8014-49994ce01853/route_mappings" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_security_groups_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_security_groups_response.json new file mode 100644 index 00000000000..da2a510aa1c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_security_groups_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "a3728437-fe41-42c1-875c-b59cffc7498c", + "url": "/v2/security_groups/a3728437-fe41-42c1-875c-b59cffc7498c", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "name": "name-47", + "rules": [ + { + "protocol": "udp", + "ports": "8080", + "destination": "198.41.191.47/1" + } + ], + "running_default": false, + "staging_default": false, + "spaces_url": "/v2/security_groups/a3728437-fe41-42c1-875c-b59cffc7498c/spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_service_instances_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_service_instances_response.json new file mode 100644 index 00000000000..ab2e167980a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_service_instances_response.json @@ -0,0 +1,34 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "7046d37c-8a50-49d5-ba53-abb103a92142", + "url": "/v2/service_instances/7046d37c-8a50-49d5-ba53-abb103a92142", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": null + }, + "entity": { + "name": "name-97", + "credentials": { + "creds-key-52": "creds-val-52" + }, + "service_plan_guid": "77157c85-203a-4fac-b9a3-003988ff879a", + "space_guid": "aead50c9-0d45-410c-befd-431c8b7b3e30", + "gateway_data": null, + "dashboard_url": null, + "type": "managed_service_instance", + "last_operation": null, + "tags": [ + ], + "space_url": "/v2/spaces/aead50c9-0d45-410c-befd-431c8b7b3e30", + "service_plan_url": "/v2/service_plans/77157c85-203a-4fac-b9a3-003988ff879a", + "service_bindings_url": "/v2/service_instances/7046d37c-8a50-49d5-ba53-abb103a92142/service_bindings", + "service_keys_url": "/v2/service_instances/7046d37c-8a50-49d5-ba53-abb103a92142/service_keys" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_services_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_services_response.json new file mode 100644 index 00000000000..964ce0c361b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_services_response.json @@ -0,0 +1,37 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "fcc4261f-da9a-40ba-9194-6919e0ab87f8", + "url": "/v2/services/fcc4261f-da9a-40ba-9194-6919e0ab87f8", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "label": "label-5", + "provider": null, + "url": null, + "description": "desc-14", + "long_description": null, + "version": null, + "info_url": null, + "active": true, + "bindable": true, + "unique_id": "666902ad-81dc-41e9-a351-58e1055e3ab2", + "extra": null, + "tags": [ + ], + "requires": [ + ], + "documentation_url": null, + "service_broker_guid": "15f1c3a0-910c-4b92-9386-377acada14cb", + "plan_updateable": false, + "service_plans_url": "/v2/services/fcc4261f-da9a-40ba-9194-6919e0ab87f8/service_plans" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_summary_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_summary_response.json new file mode 100644 index 00000000000..d907e7e1e93 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_summary_response.json @@ -0,0 +1,85 @@ +{ + "guid": "c6473a38-92f4-4595-9462-01af4c4b1893", + "name": "name-159", + "apps": [ + { + "guid": "e378968e-89d4-4e84-bce5-ee997daea898", + "urls": [ + "host-1.domain-5.example.com" + ], + "routes": [ + { + "guid": "812c7de6-b14f-4193-8c95-74449c5ae0e4", + "host": "host-1", + "port": null, + "path": "", + "domain": { + "guid": "0a7c349f-84c4-4fde-867d-a73814c66168", + "name": "domain-5.example.com" + } + } + ], + "service_count": 1, + "service_names": [ + "name-162" + ], + "running_instances": 0, + "name": "name-165", + "production": false, + "space_guid": "c6473a38-92f4-4595-9462-01af4c4b1893", + "stack_guid": "eefe21a1-6878-40d1-8485-80a88cfdbbe4", + "buildpack": null, + "detected_buildpack": null, + "environment_json": {}, + "memory": 1024, + "instances": 1, + "disk_quota": 1024, + "state": "STOPPED", + "version": "2bea31d1-b0b7-467d-9794-62dd7f0dd200", + "command": null, + "console": false, + "debug": null, + "staging_task_id": null, + "package_state": "PENDING", + "health_check_type": "port", + "health_check_timeout": null, + "staging_failed_reason": null, + "staging_failed_description": null, + "diego": false, + "docker_image": null, + "package_updated_at": "2016-04-22T19:33:13Z", + "detected_start_command": "", + "enable_ssh": true, + "docker_credentials": { + "username": null, + "password": null + }, + "ports": [] + } + ], + "services": [ + { + "guid": "a049e5e8-8597-469e-b1c6-ddb8eb2c0af0", + "name": "name-162", + "bound_app_count": 1, + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "description goes here", + "updated_at": "2016-04-22T19:33:13Z", + "created_at": "2016-04-22T19:33:13Z" + }, + "dashboard_url": null, + "service_plan": { + "guid": "b9cb2cd3-2761-4e9b-9215-d64840ee3bf5", + "name": "name-163", + "service": { + "guid": "00f143db-8b79-4e4a-bf03-021cf93131f4", + "label": "label-16", + "provider": null, + "version": null + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_user_roles_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_user_roles_response.json new file mode 100644 index 00000000000..038182bf67c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/GET_{id}_user_roles_response.json @@ -0,0 +1,34 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-8", + "url": "/v2/users/uaa-id-8", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "username": "everything@example.com", + "space_roles": [ + "space_developer", + "space_manager", + "space_auditor" + ], + "spaces_url": "/v2/users/uaa-id-8/spaces", + "organizations_url": "/v2/users/uaa-id-8/organizations", + "managed_organizations_url": "/v2/users/uaa-id-8/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-8/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-8/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-8/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-8/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/POST_request.json new file mode 100644 index 00000000000..40a18baac6c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "development", + "organization_guid": "c523070c-3006-4715-86dd-414afaecd949" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/POST_response.json new file mode 100644 index 00000000000..bdb594b9d5d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/POST_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "d29dc30c-793c-49a6-97fe-9aff75dcbd12", + "url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": null + }, + "entity": { + "name": "development", + "organization_guid": "c523070c-3006-4715-86dd-414afaecd949", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/c523070c-3006-4715-86dd-414afaecd949", + "developers_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/developers", + "managers_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/managers", + "auditors_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/auditors", + "apps_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/apps", + "routes_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/routes", + "domains_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/domains", + "service_instances_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/service_instances", + "app_events_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/app_events", + "events_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/events", + "security_groups_url": "/v2/spaces/d29dc30c-793c-49a6-97fe-9aff75dcbd12/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_response.json new file mode 100644 index 00000000000..caf0c6b4932 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "873193ee-878c-436f-80bd-10d68927937d", + "url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d", + "created_at": "2015-11-30T23:38:28Z", + "updated_at": null + }, + "entity": { + "name": "name-101", + "organization_guid": "5fddaf61-092d-4b33-9490-8350963db89e", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/5fddaf61-092d-4b33-9490-8350963db89e", + "developers_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/developers", + "managers_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/managers", + "auditors_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/auditors", + "apps_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/apps", + "routes_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/routes", + "domains_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/domains", + "service_instances_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/service_instances", + "app_events_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/app_events", + "events_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/events", + "security_groups_url": "/v2/spaces/873193ee-878c-436f-80bd-10d68927937d/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_{id}_response.json new file mode 100644 index 00000000000..9b2e221945a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_auditors_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "9639c996-9005-4b70-b852-d40f346d58dc", + "url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "name": "name-59", + "organization_guid": "bc168e1d-b399-4624-b7f6-fbe64eeb870f", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/bc168e1d-b399-4624-b7f6-fbe64eeb870f", + "developers_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/developers", + "managers_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/managers", + "auditors_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/auditors", + "apps_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/apps", + "routes_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/routes", + "domains_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/domains", + "service_instances_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/service_instances", + "app_events_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/app_events", + "events_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/events", + "security_groups_url": "/v2/spaces/9639c996-9005-4b70-b852-d40f346d58dc/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_response.json new file mode 100644 index 00000000000..008b6c042af --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "b6d11f17-1cea-4c00-a951-fef3223b8c84", + "url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84", + "created_at": "2015-11-30T23:38:27Z", + "updated_at": null + }, + "entity": { + "name": "name-58", + "organization_guid": "b13bbebe-427e-424d-8820-2937f7e218d5", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/b13bbebe-427e-424d-8820-2937f7e218d5", + "developers_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/developers", + "managers_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/managers", + "auditors_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/auditors", + "apps_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/apps", + "routes_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/routes", + "domains_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/domains", + "service_instances_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/service_instances", + "app_events_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/app_events", + "events_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/events", + "security_groups_url": "/v2/spaces/b6d11f17-1cea-4c00-a951-fef3223b8c84/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_{id}_response.json new file mode 100644 index 00000000000..5d3f9111362 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_developers_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "6f8f8e0d-54f2-4736-a08e-1044fcf061d3", + "url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "name": "name-68", + "organization_guid": "5b556f7c-63f5-43e5-9522-c4fec533b09d", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/5b556f7c-63f5-43e5-9522-c4fec533b09d", + "developers_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/developers", + "managers_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/managers", + "auditors_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/auditors", + "apps_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/apps", + "routes_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/routes", + "domains_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/domains", + "service_instances_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/service_instances", + "app_events_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/app_events", + "events_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/events", + "security_groups_url": "/v2/spaces/6f8f8e0d-54f2-4736-a08e-1044fcf061d3/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_request.json new file mode 100644 index 00000000000..a9f1fe3b399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_request.json @@ -0,0 +1,3 @@ +{ + "username": "user@example.com" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_response.json new file mode 100644 index 00000000000..830bf2ead16 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "4351f97b-3485-4738-821b-5bf77bed44eb", + "url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb", + "created_at": "2015-11-30T23:38:28Z", + "updated_at": null + }, + "entity": { + "name": "name-98", + "organization_guid": "a488910d-2d69-46a2-bf6e-319248e03705", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/a488910d-2d69-46a2-bf6e-319248e03705", + "developers_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/developers", + "managers_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/managers", + "auditors_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/auditors", + "apps_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/apps", + "routes_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/routes", + "domains_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/domains", + "service_instances_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/service_instances", + "app_events_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/app_events", + "events_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/events", + "security_groups_url": "/v2/spaces/4351f97b-3485-4738-821b-5bf77bed44eb/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_{id}_response.json new file mode 100644 index 00000000000..cd562f5974f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_managers_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "542943ff-a40b-4004-9559-434b0169508c", + "url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c", + "created_at": "2015-07-27T22:43:07Z", + "updated_at": null + }, + "entity": { + "name": "name-85", + "organization_guid": "0a68fcd5-dc1c-48d0-98dc-33008ce0d7ce", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/0a68fcd5-dc1c-48d0-98dc-33008ce0d7ce", + "developers_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/developers", + "managers_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/managers", + "auditors_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/auditors", + "apps_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/apps", + "routes_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/routes", + "domains_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/domains", + "service_instances_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/service_instances", + "app_events_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/app_events", + "events_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/events", + "security_groups_url": "/v2/spaces/542943ff-a40b-4004-9559-434b0169508c/security_groups" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_request.json new file mode 100644 index 00000000000..0c62d799fcf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_request.json @@ -0,0 +1,4 @@ +{ + "name": "New Space Name", + "auditor_guids": [] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_response.json new file mode 100644 index 00000000000..76c8d814b1d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "e7b9e252-88cb-415c-ace4-2864922e550c", + "url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c", + "created_at": "2015-07-27T22:43:08Z", + "updated_at": "2015-07-27T22:43:08Z" + }, + "entity": { + "name": "New Space Name", + "organization_guid": "71c72756-e8b8-4c4a-b832-b3f9e3052c70", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/71c72756-e8b8-4c4a-b832-b3f9e3052c70", + "developers_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/developers", + "managers_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/managers", + "auditors_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/auditors", + "apps_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/apps", + "routes_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/routes", + "domains_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/domains", + "service_instances_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/service_instances", + "app_events_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/app_events", + "events_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/events", + "security_groups_url": "/v2/spaces/e7b9e252-88cb-415c-ace4-2864922e550c/security_groups" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_security_group_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_security_group_{id}_response.json new file mode 100644 index 00000000000..fbfdde3ec9d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/spaces/PUT_{id}_security_group_{id}_response.json @@ -0,0 +1,25 @@ +{ + "metadata": { + "guid": "c9424692-395b-403b-90e6-10049bbd9e23", + "url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23", + "created_at": "2015-07-27T22:43:06Z", + "updated_at": null + }, + "entity": { + "name": "name-39", + "organization_guid": "67096164-bdcf-4b53-92e1-a2991882a066", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/67096164-bdcf-4b53-92e1-a2991882a066", + "developers_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/developers", + "managers_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/managers", + "auditors_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/auditors", + "apps_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/apps", + "routes_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/routes", + "domains_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/domains", + "service_instances_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/service_instances", + "app_events_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/app_events", + "events_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/events", + "security_groups_url": "/v2/spaces/c9424692-395b-403b-90e6-10049bbd9e23/security_groups" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/DELETE_{id}_async_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/DELETE_{id}_async_response.json new file mode 100644 index 00000000000..2197040115d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/DELETE_{id}_async_response.json @@ -0,0 +1,11 @@ +{ + "metadata": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "created_at": "2016-02-02T17:16:31Z", + "url": "/v2/jobs/2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1" + }, + "entity": { + "guid": "2d9707ba-6f0b-4aef-a3de-fe9bdcf0c9d1", + "status": "queued" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/GET_response.json new file mode 100644 index 00000000000..2458cfbd3ff --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/GET_response.json @@ -0,0 +1,44 @@ +{ + "total_results": 3, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "fe4999cf-a207-4d40-bb03-f4bbf697edac", + "url": "/v2/stacks/fe4999cf-a207-4d40-bb03-f4bbf697edac", + "created_at": "2015-12-22T18:27:59Z", + "updated_at": null + }, + "entity": { + "name": "cflinuxfs2", + "description": "cflinuxfs2" + } + }, + { + "metadata": { + "guid": "ff0f87c9-9add-477a-8674-c11c012667a6", + "url": "/v2/stacks/ff0f87c9-9add-477a-8674-c11c012667a6", + "created_at": "2015-12-22T18:27:59Z", + "updated_at": null + }, + "entity": { + "name": "default-stack-name", + "description": "default-stack-description" + } + }, + { + "metadata": { + "guid": "01bd93b4-f252-4517-a4a5-191eb4c7fc7e", + "url": "/v2/stacks/01bd93b4-f252-4517-a4a5-191eb4c7fc7e", + "created_at": "2015-12-22T18:27:59Z", + "updated_at": null + }, + "entity": { + "name": "cider", + "description": "cider-description" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/GET_{id}_response.json new file mode 100644 index 00000000000..30ad1c3a16a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/GET_{id}_response.json @@ -0,0 +1,12 @@ +{ + "metadata": { + "guid": "fe4999cf-a207-4d40-bb03-f4bbf697edac", + "url": "/v2/stacks/fe4999cf-a207-4d40-bb03-f4bbf697edac", + "created_at": "2015-12-22T18:27:59Z", + "updated_at": null + }, + "entity": { + "name": "cflinuxfs2", + "description": "cflinuxfs2" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/POST_request.json new file mode 100644 index 00000000000..597c65701bf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "example_stack", + "description": "Description for the example stack" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/POST_response.json new file mode 100644 index 00000000000..b9ded986509 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/stacks/POST_response.json @@ -0,0 +1,12 @@ +{ + "metadata": { + "guid": "c7d0b591-2572-4d23-bf7c-9dac95074a9e", + "url": "/v2/stacks/c7d0b591-2572-4d23-bf7c-9dac95074a9e", + "created_at": "2016-06-08T16:41:23Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "example_stack", + "description": "Description for the example stack" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_response.json new file mode 100644 index 00000000000..b4c841fbf87 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866", + "url": "/v2/user_provided_service_instances/8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866", + "created_at": "2015-07-27T22:43:34Z", + "updated_at": null + }, + "entity": { + "name": "name-2365", + "credentials": { + "creds-key-665": "creds-val-665" + }, + "space_guid": "2fff6e71-d329-4991-9c89-7fa8abca70df", + "type": "user_provided_service_instance", + "syslog_drain_url": "https://foo.com/url-90", + "route_service_url": null, + "space_url": "/v2/spaces/2fff6e71-d329-4991-9c89-7fa8abca70df", + "service_bindings_url": "/v2/user_provided_service_instances/8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866/service_bindings", + "routes_url": "/v2/user_provided_service_instances/8db6d37b-1ca8-4d0a-b1d3-2a6aaceae866/routes" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_response.json new file mode 100644 index 00000000000..cf6dce896f3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_response.json @@ -0,0 +1,24 @@ +{ + "metadata": { + "guid": "e9358711-0ad9-4f2a-b3dc-289d47c17c87", + "url": "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87", + "created_at": "2016-06-08T16:41:33Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1700", + "credentials": { + "creds-key-58": "creds-val-58" + }, + "space_guid": "22236d1a-d9c7-44b7-bdad-2bb079a6c4a1", + "type": "user_provided_service_instance", + "syslog_drain_url": "https://foo.com/url-104", + "tags": [ + "accounting", + "mongodb" + ], + "space_url": "/v2/spaces/22236d1a-d9c7-44b7-bdad-2bb079a6c4a1", + "service_bindings_url": "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/service_bindings", + "routes_url": "/v2/user_provided_service_instances/e9358711-0ad9-4f2a-b3dc-289d47c17c87/routes" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_routes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_routes_response.json new file mode 100644 index 00000000000..0fb3c51e029 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_routes_response.json @@ -0,0 +1,29 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "d6e18af9-9d84-4a53-a301-ab9bef03a7b0", + "url": "/v2/routes/d6e18af9-9d84-4a53-a301-ab9bef03a7b0", + "created_at": "2016-06-08T16:41:33Z", + "updated_at": "2016-06-08T16:41:33Z" + }, + "entity": { + "host": "host-24", + "path": "", + "domain_guid": "428b9275-47a6-481b-97e3-d93ae18611ee", + "space_guid": "dc7dd379-1ffb-4168-b2b4-773fe141dd2e", + "service_instance_guid": "500e64c6-7f70-4e3b-ab7b-940a6303d79b", + "port": null, + "domain_url": "/v2/private_domains/428b9275-47a6-481b-97e3-d93ae18611ee", + "space_url": "/v2/spaces/dc7dd379-1ffb-4168-b2b4-773fe141dd2e", + "service_instance_url": "/v2/user_provided_service_instances/500e64c6-7f70-4e3b-ab7b-940a6303d79b", + "apps_url": "/v2/routes/d6e18af9-9d84-4a53-a301-ab9bef03a7b0/apps", + "route_mappings_url": "/v2/routes/d6e18af9-9d84-4a53-a301-ab9bef03a7b0/route_mappings" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_service_bindings_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_service_bindings_response.json new file mode 100644 index 00000000000..3da2a999665 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/GET_{id}_service_bindings_response.json @@ -0,0 +1,30 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "e6b8d548-e009-47d4-ab79-675e3da6bb52", + "url": "/v2/service_bindings/e6b8d548-e009-47d4-ab79-675e3da6bb52", + "created_at": "2016-01-26T22:20:16Z", + "updated_at": null + }, + "entity": { + "app_guid": "a9bbd896-7500-45be-a75a-25e3d254f67c", + "service_instance_guid": "16c81612-6a63-4faa-8cd5-acc80771b562", + "credentials": { + "creds-key-29": "creds-val-29" + }, + "binding_options": { + }, + "gateway_data": null, + "gateway_name": "", + "syslog_drain_url": null, + "app_url": "/v2/apps/a9bbd896-7500-45be-a75a-25e3d254f67c", + "service_instance_url": "/v2/user_provided_service_instances/16c81612-6a63-4faa-8cd5-acc80771b562" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/POST_request.json new file mode 100644 index 00000000000..3e4672ccafd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/POST_request.json @@ -0,0 +1,10 @@ +{ + "credentials": { + "somekey": "somevalue" + }, + "name": "my-user-provided-instance", + "space_guid": "0d45d43f-7d50-43c6-9981-b32ce8d5a373", + "syslog_drain_url": "syslog://example.com", + "route_service_url": "https://logger.example.com", + "tags": ["tag1", "tag2"] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/POST_response.json new file mode 100644 index 00000000000..de01bd5af05 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/POST_response.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "guid": "34d5500e-712d-49ef-8bbe-c9ac349532da", + "url": "/v2/user_provided_service_instances/34d5500e-712d-49ef-8bbe-c9ac349532da", + "created_at": "2015-07-27T22:43:35Z", + "updated_at": null + }, + "entity": { + "name": "my-user-provided-instance", + "credentials": { + "somekey": "somevalue" + }, + "space_guid": "0d45d43f-7d50-43c6-9981-b32ce8d5a373", + "type": "user_provided_service_instance", + "syslog_drain_url": "syslog://example.com", + "route_service_url": "https://logger.example.com", + "space_url": "/v2/spaces/0d45d43f-7d50-43c6-9981-b32ce8d5a373", + "service_bindings_url": "/v2/user_provided_service_instances/34d5500e-712d-49ef-8bbe-c9ac349532da/service_bindings", + "routes_url": "/v2/user_provided_service_instances/34d5500e-712d-49ef-8bbe-c9ac349532da/routes", + "tags":["tag1","tag2"] + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_request.json new file mode 100644 index 00000000000..83029417552 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_request.json @@ -0,0 +1,3 @@ +{ + "credentials": {} +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_response.json new file mode 100644 index 00000000000..46c37b97eaa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_empty_creds_response.json @@ -0,0 +1,19 @@ +{ + "metadata": { + "guid": "e2c198b1-fa15-414e-a9a4-31537996b39d", + "url": "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d", + "created_at": "2016-02-19T02:04:06Z", + "updated_at": "2016-02-19T02:04:06Z" + }, + "entity": { + "name": "name-2565", + "credentials": {}, + "space_guid": "438b5923-fe7a-4459-bbcd-a7c27332bad3", + "type": "user_provided_service_instance", + "syslog_drain_url": "https://foo.com/url-91", + "route_service_url": null, + "space_url": "/v2/spaces/438b5923-fe7a-4459-bbcd-a7c27332bad3", + "service_bindings_url": "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/service_bindings", + "routes_url": "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/routes" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_request.json new file mode 100644 index 00000000000..9ba55a0bb3a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_request.json @@ -0,0 +1,6 @@ +{ + "credentials": { + "somekey": "somenewvalue" + }, + "tags": ["tag1"] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_response.json new file mode 100644 index 00000000000..a5d77661a92 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_response.json @@ -0,0 +1,22 @@ +{ + "metadata": { + "guid": "e2c198b1-fa15-414e-a9a4-31537996b39d", + "url": "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d", + "created_at": "2016-02-19T02:04:06Z", + "updated_at": "2016-02-19T02:04:06Z" + }, + "entity": { + "name": "name-2565", + "credentials": { + "somekey": "somenewvalue" + }, + "space_guid": "438b5923-fe7a-4459-bbcd-a7c27332bad3", + "tags": ["tag1"], + "type": "user_provided_service_instance", + "syslog_drain_url": "https://foo.com/url-91", + "route_service_url": null, + "space_url": "/v2/spaces/438b5923-fe7a-4459-bbcd-a7c27332bad3", + "service_bindings_url": "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/service_bindings", + "routes_url": "/v2/user_provided_service_instances/e2c198b1-fa15-414e-a9a4-31537996b39d/routes" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_request.json new file mode 100644 index 00000000000..9e26dfeeb6e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_request.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_response.json new file mode 100644 index 00000000000..fdbe4f1d0cd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/user_provided_service_instances/PUT_{id}_route_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "5badd282-6e07-4fc6-a8c4-78be99040774", + "url": "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774", + "created_at": "2016-06-08T16:41:33Z", + "updated_at": null + }, + "entity": { + "name": "name-1676", + "credentials": { + "creds-key-52": "creds-val-52" + }, + "space_guid": "91b53184-6430-4891-8d4b-fabbe96a84f6", + "type": "user_provided_service_instance", + "syslog_drain_url": "https://foo.com/url-93", + "route_service_url": "https://foo.com/url-92", + "space_url": "/v2/spaces/91b53184-6430-4891-8d4b-fabbe96a84f6", + "service_bindings_url": "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/service_bindings", + "routes_url": "/v2/user_provided_service_instances/5badd282-6e07-4fc6-a8c4-78be99040774/routes" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_response.json new file mode 100644 index 00000000000..1bd4caa0260 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_response.json @@ -0,0 +1,50 @@ +{ + "total_results": 2, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "uaa-id-133", + "url": "/v2/users/uaa-id-133", + "created_at": "2015-12-22T18:28:01Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "55b306f6-b956-4c85-a7dc-64358121d39e", + "username": "user@example.com", + "default_space_url": "/v2/spaces/55b306f6-b956-4c85-a7dc-64358121d39e", + "spaces_url": "/v2/users/uaa-id-133/spaces", + "organizations_url": "/v2/users/uaa-id-133/organizations", + "managed_organizations_url": "/v2/users/uaa-id-133/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-133/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-133/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-133/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-133/audited_spaces" + } + }, + { + "metadata": { + "guid": "uaa-id-134", + "url": "/v2/users/uaa-id-134", + "created_at": "2015-12-22T18:28:01Z", + "updated_at": null + }, + "entity": { + "admin": false, + "active": true, + "default_space_guid": null, + "spaces_url": "/v2/users/uaa-id-134/spaces", + "organizations_url": "/v2/users/uaa-id-134/organizations", + "managed_organizations_url": "/v2/users/uaa-id-134/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-134/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-134/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-134/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-134/audited_spaces" + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_audited_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_audited_organizations_response.json new file mode 100644 index 00000000000..256fc79069d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_audited_organizations_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "3ced0de5-e2ce-403e-9706-17e2035947b4", + "url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1914", + "billing_enabled": false, + "quota_definition_guid": "8eb22221-a9ec-4345-a2a0-4a7e816ca689", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/8eb22221-a9ec-4345-a2a0-4a7e816ca689", + "spaces_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/spaces", + "domains_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/domains", + "private_domains_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/private_domains", + "users_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/users", + "managers_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/managers", + "billing_managers_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/billing_managers", + "auditors_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/auditors", + "app_events_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/app_events", + "space_quota_definitions_url": "/v2/organizations/3ced0de5-e2ce-403e-9706-17e2035947b4/space_quota_definitions" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_audited_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_audited_spaces_response.json new file mode 100644 index 00000000000..c19e0ca9e51 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_audited_spaces_response.json @@ -0,0 +1,34 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "b93f27a3-3fee-49a3-987a-20407c2b029b", + "url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1868", + "organization_guid": "cf8bee37-4644-4792-b6c1-de14b93390a4", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/cf8bee37-4644-4792-b6c1-de14b93390a4", + "developers_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/developers", + "managers_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/managers", + "auditors_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/auditors", + "apps_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/apps", + "routes_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/routes", + "domains_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/domains", + "service_instances_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/service_instances", + "app_events_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/app_events", + "events_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/events", + "security_groups_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/security_groups", + "staging_security_groups_url": "/v2/spaces/b93f27a3-3fee-49a3-987a-20407c2b029b/staging_security_groups" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_billing_managed_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_billing_managed_organizations_response.json new file mode 100644 index 00000000000..95421701347 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_billing_managed_organizations_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "67d9d56c-f41b-496d-bcac-833d5d71e104", + "url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1845", + "billing_enabled": false, + "quota_definition_guid": "6cb01483-4b0a-4742-b00c-f55524f15b25", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/6cb01483-4b0a-4742-b00c-f55524f15b25", + "spaces_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/spaces", + "domains_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/domains", + "private_domains_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/private_domains", + "users_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/users", + "managers_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/managers", + "billing_managers_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/billing_managers", + "auditors_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/auditors", + "app_events_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/app_events", + "space_quota_definitions_url": "/v2/organizations/67d9d56c-f41b-496d-bcac-833d5d71e104/space_quota_definitions" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_managed_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_managed_organizations_response.json new file mode 100644 index 00000000000..dc60c0aeae9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_managed_organizations_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "db26c415-f907-45ea-a2d1-a579000f0749", + "url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1893", + "billing_enabled": false, + "quota_definition_guid": "1677d31f-e75c-4f32-a879-fe4a7a7a3c23", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/1677d31f-e75c-4f32-a879-fe4a7a7a3c23", + "spaces_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/spaces", + "domains_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/domains", + "private_domains_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/private_domains", + "users_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/users", + "managers_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/managers", + "billing_managers_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/billing_managers", + "auditors_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/auditors", + "app_events_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/app_events", + "space_quota_definitions_url": "/v2/organizations/db26c415-f907-45ea-a2d1-a579000f0749/space_quota_definitions" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_managed_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_managed_spaces_response.json new file mode 100644 index 00000000000..2c8c72c8c4c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_managed_spaces_response.json @@ -0,0 +1,34 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "b0e100bd-6d7c-4a3d-b0d3-0249d739a086", + "url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086", + "created_at": "2016-06-08T16:41:35Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1820", + "organization_guid": "14766fb1-d8fa-4604-ba7a-248f341492a2", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/14766fb1-d8fa-4604-ba7a-248f341492a2", + "developers_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/developers", + "managers_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/managers", + "auditors_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/auditors", + "apps_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/apps", + "routes_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/routes", + "domains_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/domains", + "service_instances_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/service_instances", + "app_events_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/app_events", + "events_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/events", + "security_groups_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/security_groups", + "staging_security_groups_url": "/v2/spaces/b0e100bd-6d7c-4a3d-b0d3-0249d739a086/staging_security_groups" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_organizations_response.json new file mode 100644 index 00000000000..319e88f766f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_organizations_response.json @@ -0,0 +1,32 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "72d22faf-f70c-4e1d-ad42-256939db7fca", + "url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1919", + "billing_enabled": false, + "quota_definition_guid": "8a51d151-a5fa-455f-9482-0ff0f2f50053", + "status": "active", + "quota_definition_url": "/v2/quota_definitions/8a51d151-a5fa-455f-9482-0ff0f2f50053", + "spaces_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/spaces", + "domains_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/domains", + "private_domains_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/private_domains", + "users_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/users", + "managers_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/managers", + "billing_managers_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/billing_managers", + "auditors_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/auditors", + "app_events_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/app_events", + "space_quota_definitions_url": "/v2/organizations/72d22faf-f70c-4e1d-ad42-256939db7fca/space_quota_definitions" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_response.json new file mode 100644 index 00000000000..64599937080 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-317", + "url": "/v2/users/uaa-id-317", + "created_at": "2016-06-08T16:41:37Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "fc898723-2192-42d9-9567-c0b2e03a3169", + "default_space_url": "/v2/spaces/fc898723-2192-42d9-9567-c0b2e03a3169", + "spaces_url": "/v2/users/uaa-id-317/spaces", + "organizations_url": "/v2/users/uaa-id-317/organizations", + "managed_organizations_url": "/v2/users/uaa-id-317/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-317/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-317/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-317/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-317/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_spaces_response.json new file mode 100644 index 00000000000..8d5ce636093 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_spaces_response.json @@ -0,0 +1,34 @@ +{ + "total_results": 1, + "total_pages": 1, + "prev_url": null, + "next_url": null, + "resources": [ + { + "metadata": { + "guid": "9881c79e-d269-4a53-9d77-cb21b745356e", + "url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e", + "created_at": "2016-06-08T16:41:37Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-1948", + "organization_guid": "6a2a2d18-7620-43cf-a332-353824b431b2", + "space_quota_definition_guid": null, + "allow_ssh": true, + "organization_url": "/v2/organizations/6a2a2d18-7620-43cf-a332-353824b431b2", + "developers_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/developers", + "managers_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/managers", + "auditors_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/auditors", + "apps_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/apps", + "routes_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/routes", + "domains_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/domains", + "service_instances_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/service_instances", + "app_events_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/app_events", + "events_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/events", + "security_groups_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/security_groups", + "staging_security_groups_url": "/v2/spaces/9881c79e-d269-4a53-9d77-cb21b745356e/staging_security_groups" + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_summary_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_summary_response.json new file mode 100644 index 00000000000..ff077710da7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/GET_{id}_summary_response.json @@ -0,0 +1,281 @@ +{ + "metadata": { + "guid": "uaa-id-355", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "organizations": [ + { + "metadata": { + "guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2041", + "billing_enabled": false, + "status": "active", + "spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ], + "quota_definition": { + "metadata": { + "guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2042", + "non_basic_services_allowed": true, + "total_services": 60, + "memory_limit": 20480, + "trial_db_allowed": false, + "total_routes": 1000, + "instance_memory_limit": -1, + "total_private_domains": -1, + "app_instance_limit": -1, + "app_task_limit": -1 + } + }, + "managers": [ + { + "metadata": { + "guid": "uaa-id-355", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null + } + } + ] + } + } + ], + "managed_organizations": [ + { + "metadata": { + "guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2041", + "billing_enabled": false, + "status": "active", + "spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ], + "quota_definition": { + "metadata": { + "guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2042", + "non_basic_services_allowed": true, + "total_services": 60, + "memory_limit": 20480, + "trial_db_allowed": false, + "total_routes": 1000, + "instance_memory_limit": -1, + "total_private_domains": -1, + "app_instance_limit": -1, + "app_task_limit": -1 + } + }, + "managers": [ + { + "metadata": { + "guid": "uaa-id-355", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null + } + } + ] + } + } + ], + "billing_managed_organizations": [ + { + "metadata": { + "guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2041", + "billing_enabled": false, + "status": "active", + "spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ], + "quota_definition": { + "metadata": { + "guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2042", + "non_basic_services_allowed": true, + "total_services": 60, + "memory_limit": 20480, + "trial_db_allowed": false, + "total_routes": 1000, + "instance_memory_limit": -1, + "total_private_domains": -1, + "app_instance_limit": -1, + "app_task_limit": -1 + } + }, + "managers": [ + { + "metadata": { + "guid": "uaa-id-355", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null + } + } + ] + } + } + ], + "audited_organizations": [ + { + "metadata": { + "guid": "a8f940a4-3b9f-4e26-9ceb-2e5062cc1513", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2041", + "billing_enabled": false, + "status": "active", + "spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ], + "quota_definition": { + "metadata": { + "guid": "6c6b51c9-823d-4c91-ab5c-9487a93360bc", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2042", + "non_basic_services_allowed": true, + "total_services": 60, + "memory_limit": 20480, + "trial_db_allowed": false, + "total_routes": 1000, + "instance_memory_limit": -1, + "total_private_domains": -1, + "app_instance_limit": -1, + "app_task_limit": -1 + } + }, + "managers": [ + { + "metadata": { + "guid": "uaa-id-355", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null + } + } + ] + } + } + ], + "spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ], + "managed_spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ], + "audited_spaces": [ + { + "metadata": { + "guid": "db69758e-14e9-4fed-b69a-353a98a05a2e", + "created_at": "2016-06-08T16:41:40Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "name": "name-2043" + } + } + ] + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/POST_request.json new file mode 100644 index 00000000000..cefa96aee20 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/POST_request.json @@ -0,0 +1,3 @@ +{ + "guid": "guid-cb24b36d-4656-468e-a50d-b53113ac6177" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/POST_response.json new file mode 100644 index 00000000000..caf6d633f7c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/POST_response.json @@ -0,0 +1,20 @@ +{ + "metadata": { + "guid": "guid-cb24b36d-4656-468e-a50d-b53113ac6177", + "url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177", + "created_at": "2016-06-08T16:41:37Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": null, + "spaces_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/spaces", + "organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/organizations", + "managed_organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/managed_organizations", + "billing_managed_organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/billing_managed_organizations", + "audited_organizations_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/audited_organizations", + "managed_spaces_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/managed_spaces", + "audited_spaces_url": "/v2/users/guid-cb24b36d-4656-468e-a50d-b53113ac6177/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_audited_organizations_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_audited_organizations_{id}_response.json new file mode 100644 index 00000000000..a57c34741de --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_audited_organizations_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-295", + "url": "/v2/users/uaa-id-295", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "aa72aeb6-25aa-4cdc-9ef7-9231fe5b136d", + "default_space_url": "/v2/spaces/aa72aeb6-25aa-4cdc-9ef7-9231fe5b136d", + "spaces_url": "/v2/users/uaa-id-295/spaces", + "organizations_url": "/v2/users/uaa-id-295/organizations", + "managed_organizations_url": "/v2/users/uaa-id-295/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-295/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-295/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-295/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-295/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_audited_spaces_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_audited_spaces_{id}_response.json new file mode 100644 index 00000000000..a4010768231 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_audited_spaces_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-280", + "url": "/v2/users/uaa-id-280", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "06ed47f7-656a-4f31-8b3a-b0bdaaafc826", + "default_space_url": "/v2/spaces/06ed47f7-656a-4f31-8b3a-b0bdaaafc826", + "spaces_url": "/v2/users/uaa-id-280/spaces", + "organizations_url": "/v2/users/uaa-id-280/organizations", + "managed_organizations_url": "/v2/users/uaa-id-280/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-280/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-280/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-280/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-280/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_billing_managed_organizations_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_billing_managed_organizations_{id}_response.json new file mode 100644 index 00000000000..8491ac23aed --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_billing_managed_organizations_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-272", + "url": "/v2/users/uaa-id-272", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "a1e2a260-adeb-4689-b118-05d359c51fd7", + "default_space_url": "/v2/spaces/a1e2a260-adeb-4689-b118-05d359c51fd7", + "spaces_url": "/v2/users/uaa-id-272/spaces", + "organizations_url": "/v2/users/uaa-id-272/organizations", + "managed_organizations_url": "/v2/users/uaa-id-272/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-272/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-272/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-272/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-272/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_managed_organizations_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_managed_organizations_{id}_response.json new file mode 100644 index 00000000000..bcd6f5a0004 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_managed_organizations_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-287", + "url": "/v2/users/uaa-id-287", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "2becd2d1-62ee-472e-a66f-bea5d9f0dc53", + "default_space_url": "/v2/spaces/2becd2d1-62ee-472e-a66f-bea5d9f0dc53", + "spaces_url": "/v2/users/uaa-id-287/spaces", + "organizations_url": "/v2/users/uaa-id-287/organizations", + "managed_organizations_url": "/v2/users/uaa-id-287/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-287/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-287/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-287/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-287/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_managed_spaces_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_managed_spaces_{id}_response.json new file mode 100644 index 00000000000..04b7d9f7dd5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_managed_spaces_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-268", + "url": "/v2/users/uaa-id-268", + "created_at": "2016-06-08T16:41:35Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "81d79071-61db-43d7-86d3-8f885d14fd4e", + "default_space_url": "/v2/spaces/81d79071-61db-43d7-86d3-8f885d14fd4e", + "spaces_url": "/v2/users/uaa-id-268/spaces", + "organizations_url": "/v2/users/uaa-id-268/organizations", + "managed_organizations_url": "/v2/users/uaa-id-268/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-268/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-268/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-268/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-268/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_organizations_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_organizations_{id}_response.json new file mode 100644 index 00000000000..ed2a12b5de5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_organizations_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-301", + "url": "/v2/users/uaa-id-301", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "10db6c03-3e24-4a2a-b311-a28b541376f1", + "default_space_url": "/v2/spaces/10db6c03-3e24-4a2a-b311-a28b541376f1", + "spaces_url": "/v2/users/uaa-id-301/spaces", + "organizations_url": "/v2/users/uaa-id-301/organizations", + "managed_organizations_url": "/v2/users/uaa-id-301/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-301/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-301/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-301/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-301/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_request.json new file mode 100644 index 00000000000..5f1f7fc26f6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_request.json @@ -0,0 +1,3 @@ +{ + "default_space_guid": "56d8e095-b2c8-4ba9-b540-dc42ba1c7351" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_response.json new file mode 100644 index 00000000000..2801b9004e9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-313", + "url": "/v2/users/uaa-id-313", + "created_at": "2016-06-08T16:41:37Z", + "updated_at": "2016-06-08T16:41:37Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "56d8e095-b2c8-4ba9-b540-dc42ba1c7351", + "default_space_url": "/v2/spaces/56d8e095-b2c8-4ba9-b540-dc42ba1c7351", + "spaces_url": "/v2/users/uaa-id-313/spaces", + "organizations_url": "/v2/users/uaa-id-313/organizations", + "managed_organizations_url": "/v2/users/uaa-id-313/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-313/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-313/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-313/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-313/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_spaces_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_spaces_{id}_response.json new file mode 100644 index 00000000000..9b2479999ba --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v2/users/PUT_{id}_spaces_{id}_response.json @@ -0,0 +1,21 @@ +{ + "metadata": { + "guid": "uaa-id-305", + "url": "/v2/users/uaa-id-305", + "created_at": "2016-06-08T16:41:36Z", + "updated_at": "2016-06-08T16:41:26Z" + }, + "entity": { + "admin": false, + "active": false, + "default_space_guid": "063d1561-16ab-4ece-825d-30e3814f4e2f", + "default_space_url": "/v2/spaces/063d1561-16ab-4ece-825d-30e3814f4e2f", + "spaces_url": "/v2/users/uaa-id-305/spaces", + "organizations_url": "/v2/users/uaa-id-305/organizations", + "managed_organizations_url": "/v2/users/uaa-id-305/managed_organizations", + "billing_managed_organizations_url": "/v2/users/uaa-id-305/billing_managed_organizations", + "audited_organizations_url": "/v2/users/uaa-id-305/audited_organizations", + "managed_spaces_url": "/v2/users/uaa-id-305/managed_spaces", + "audited_spaces_url": "/v2/users/uaa-id-305/audited_spaces" + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_response.json new file mode 100644 index 00000000000..a2f71578978 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_response.json @@ -0,0 +1,146 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/apps?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/apps?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/apps?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "name": "my_app", + "state": "STARTED", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-03-18T11:32:30Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "isLive": true + }, + "annotations": { + "version": "1.2.3" + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop", + "method": "POST" + } + } + }, + { + "guid": "02b4ec9b-94c7-4468-9c23-4e906191a0f8", + "name": "my_app2", + "state": "STOPPED", + "created_at": "1970-01-01T00:00:02Z", + "updated_at": "2016-06-08T16:41:26Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "ruby_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/02b4ec9b-94c7-4468-9c23-4e906191a0f8/actions/stop", + "method": "POST" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_builds_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_builds_response.json new file mode 100644 index 00000000000..68232af4c59 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_builds_response.json @@ -0,0 +1,49 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/apps/test-application-id/builds?states=STAGING&page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/apps/test-application-id/builds?states=STAGING&page=1&per_page=2" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-06-08T16:41:26Z", + "created_by": { + "guid": "3cb4e243-bed4-49d5-8739-f8b45abdec1c", + "name": "bill", + "email": "bill@example.com" + }, + "state": "STAGING", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "ruby_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "package": { + "guid": "8e4da443-f255-499c-8b47-b3729b5b7432" + }, + "droplet": null, + "links": { + "self": { + "href": "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_droplets_current_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_droplets_current_response.json new file mode 100644 index 00000000000..2cb0ef7fe9f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_droplets_current_response.json @@ -0,0 +1,43 @@ +{ + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": {} + }, + "execution_metadata": "", + "process_types": { + "rake": "bundle exec rake", + "web": "bundle exec rackup config.ru -p $PORT" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14" + } + ], + "stack": "cflinuxfs2", + "image": null, + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_droplets_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_droplets_response.json new file mode 100644 index 00000000000..da5512f61d9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_droplets_response.json @@ -0,0 +1,92 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/app/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/app/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": {} + }, + "image": null, + "execution_metadata": "PRIVATE DATA HIDDEN", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14" + } + ], + "stack": "cflinuxfs2", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + }, + { + "guid": "fdf3851c-def8-4de1-87f1-6d4543189e22", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "docker", + "data": {} + }, + "execution_metadata": "[PRIVATE DATA HIDDEN IN LISTS]", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "image": "cloudfoundry/diego-docker-app-custom:latest", + "checksum": null, + "buildpacks": null, + "stack": null, + "created_at": "2016-03-17T00:00:01Z", + "updated_at": "2016-03-17T21:41:32Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22" + }, + "package": { + "href": "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_env_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_env_response.json new file mode 100644 index 00000000000..8fa8ce8eeeb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_env_response.json @@ -0,0 +1,50 @@ +{ + "staging_env_json": { + "GEM_CACHE": "http://gem-cache.example.org" + }, + "running_env_json": { + "HTTP_PROXY": "http://proxy.example.org" + }, + "environment_variables": { + "RAILS_ENV": "production" + }, + "system_env_json": { + "VCAP_SERVICES": { + "mysql": [ + { + "name": "db-for-my-app", + "label": "mysql", + "tags": [ + "relational", + "sql" + ], + "plan": "xlarge", + "credentials": { + "username": "user", + "password": "top-secret" + }, + "syslog_drain_url": "https://syslog.example.org/drain", + "provider": null + } + ] + } + }, + "application_env_json": { + "VCAP_APPLICATION": { + "limits": { + "fds": 16384 + }, + "application_name": "my_app", + "application_uris": [ + "my_app.example.org" + ], + "name": "my_app", + "space_name": "my_space", + "space_id": "2f35885d-0c9d-4423-83ad-fd05066f8576", + "uris": [ + "my_app.example.org" + ], + "users": null + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_environment_variables_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_environment_variables_response.json new file mode 100644 index 00000000000..49c9f3769e3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_environment_variables_response.json @@ -0,0 +1,13 @@ +{ + "var": { + "RAILS_ENV": "production" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/[guid]/environment_variables" + }, + "app": { + "href": "https://api.example.org/v3/apps/[guid]" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_features_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_features_response.json new file mode 100644 index 00000000000..263c07a671a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_features_response.json @@ -0,0 +1,26 @@ +{ + "resources": [ + { + "name": "ssh", + "description": "Enable SSHing into the app.", + "enabled": true + }, + { + "name": "revisions", + "description": "Enable versioning of an application", + "enabled": false + } + ], + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "/v3/apps/05d39de4-2c9e-4c76-8fd6-10417da07e42/features" + }, + "last": { + "href": "/v3/apps/05d39de4-2c9e-4c76-8fd6-10417da07e42/features" + }, + "next": null, + "previous": null + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_features_{name}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_features_{name}_response.json new file mode 100644 index 00000000000..6ae5653dc0d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_features_{name}_response.json @@ -0,0 +1,5 @@ +{ + "name": "ssh", + "description": "Enable SSHing into the app.", + "enabled": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_packages_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_packages_response.json new file mode 100644 index 00000000000..d13b2add7bb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_packages_response.json @@ -0,0 +1,46 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/apps/f2efe391-2b5b-4836-8518-ad93fa9ebf69/packages?states=READY&page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/apps/f2efe391-2b5b-4836-8518-ad93fa9ebf69/packages?states=READY&page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "752edab0-2147-4f58-9c25-cd72ad8c3561", + "type": "bits", + "data": { + "error": null, + "checksum": { + "type": "sha256", + "value": null + } + }, + "state": "READY", + "created_at": "2016-03-17T21:41:09Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/752edab0-2147-4f58-9c25-cd72ad8c3561" + }, + "upload": { + "href": "https://api.example.org/v3/packages/752edab0-2147-4f58-9c25-cd72ad8c3561/upload", + "method": "POST" + }, + "download": { + "href": "https://api.example.org/v3/packages/752edab0-2147-4f58-9c25-cd72ad8c3561/download", + "method": "GET" + }, + "app": { + "href": "https://api.example.org/v3/apps/f2efe391-2b5b-4836-8518-ad93fa9ebf69" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_permissions_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_permissions_response.json new file mode 100644 index 00000000000..5f46cb08f3f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_permissions_response.json @@ -0,0 +1,4 @@ +{ + "read_basic_data": true, + "read_sensitive_data": false +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json new file mode 100644 index 00000000000..bd791faf15c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_response.json @@ -0,0 +1,114 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/processes?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/processes?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/processes?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "[PRIVATE DATA HIDDEN IN LISTS]", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } + }, + { + "guid": "3fccacd9-4b02-4b96-8d02-8e865865e9eb", + "type": "worker", + "command": "[PRIVATE DATA HIDDEN IN LISTS]", + "instances": 1, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "process", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb" + }, + "scale": { + "href": "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/stats" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json new file mode 100644 index 00000000000..d367c69e917 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_response.json @@ -0,0 +1,48 @@ +{ + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "rackup", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_stats_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_stats_response.json new file mode 100644 index 00000000000..7b3cab6f03e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_processes_{type}_stats_response.json @@ -0,0 +1,28 @@ +{ + "resources": [ + { + "type": "web", + "index": 0, + "state": "RUNNING", + "usage": { + "time": "2016-03-23T23:17:30.476314154Z", + "cpu": 0.00038711029163348665, + "mem": 19177472, + "disk": 69705728 + }, + "host": "10.244.16.10", + "instance_ports": [ + { + "external": 64546, + "external_tls_proxy_port": 1234, + "internal": 8080, + "internal_tls_proxy_port": 5678 + } + ], + "uptime": 9042, + "mem_quota": 268435456, + "disk_quota": 1073741824, + "fds_quota": 16384 + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_relationships_current_droplet_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_relationships_current_droplet_response.json new file mode 100644 index 00000000000..9e7370a6c39 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_relationships_current_droplet_response.json @@ -0,0 +1,13 @@ +{ + "data": { + "guid": "9d8e007c-ce52-4ea7-8a57-f2825d2c6b39" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/current_droplet" + }, + "related": { + "href": "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/droplets/current" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_response.json new file mode 100644 index 00000000000..036746ba4c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_response.json @@ -0,0 +1,69 @@ +{ + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "name": "my_app", + "state": "STOPPED", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-06-08T16:41:26Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "isLive": "false", + "maintenance": "true" + }, + "annotations": { + "version": "1.2.4" + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop", + "method": "POST" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_routes_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_routes_response.json new file mode 100644 index 00000000000..c30823dd9c2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_routes_response.json @@ -0,0 +1,81 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/routes?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/routes?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/routes?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "cbad697f-cac1-48f4-9017-ac08f39dfb31", + "protocol": "http", + "created_at": "2019-05-10T17:17:48Z", + "updated_at": "2019-05-10T17:17:48Z", + "host": "a-hostname", + "path": "/some_path", + "url": "a-hostname.a-domain.com/some_path", + "destinations": [ + { + "guid": "385bf117-17f5-4689-8c5c-08c6cc821fed", + "app": { + "guid": "0a6636b5-7fc4-44d8-8752-0db3e40b35a5", + "process": { + "type": "web" + } + }, + "weight": null, + "port": 8080 + }, + { + "guid": "27e96a3b-5bcf-49ed-8048-351e0be23e6f", + "app": { + "guid": "f61e59fa-2121-4217-8c7b-15bfd75baf25", + "process": { + "type": "web" + } + }, + "weight": null, + "port": 8080 + } + ], + "metadata": { + "labels": {}, + "annotations": {} + }, + "relationships": { + "space": { + "data": { + "guid": "885a8cb3-c07b-4856-b448-eeb10bf36236" + } + }, + "domain": { + "data": { + "guid": "0b5f3633-194c-42d2-9408-972366617e0e" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + }, + "space": { + "href": "https://api.example.org/v3/spaces/885a8cb3-c07b-4856-b448-eeb10bf36236" + }, + "domain": { + "href": "https://api.example.org/v3/domains/0b5f3633-194c-42d2-9408-972366617e0e" + }, + "destinations": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_ssh_enabled_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_ssh_enabled_response.json new file mode 100644 index 00000000000..e0f1b61d50f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_ssh_enabled_response.json @@ -0,0 +1,4 @@ +{ + "enabled": false, + "reason": "Disabled globally" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_tasks_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_tasks_response.json new file mode 100644 index 00000000000..e258a58d917 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/GET_{id}_tasks_response.json @@ -0,0 +1,76 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5/tasks?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", + "sequence_id": 1, + "name": "hello", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": null + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } + }, + { + "guid": "63b4cd89-fd8b-4bf1-a311-7174fcc907d6", + "sequence_id": 2, + "name": "migrate", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": "Exited with status 1" + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_environment_variables_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_environment_variables_request.json new file mode 100644 index 00000000000..81d498f6807 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_environment_variables_request.json @@ -0,0 +1,5 @@ +{ + "var": { + "DEBUG": "false" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_environment_variables_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_environment_variables_response.json new file mode 100644 index 00000000000..c8581a09333 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_environment_variables_response.json @@ -0,0 +1,14 @@ +{ + "var": { + "RAILS_ENV": "production", + "DEBUG": "false" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/[guid]/environment_variables" + }, + "app": { + "href": "https://api.example.org/v3/apps/[guid]" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_features_{name}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_features_{name}_request.json new file mode 100644 index 00000000000..c994fef1c29 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_features_{name}_request.json @@ -0,0 +1,3 @@ +{ + "enabled": false +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_features_{name}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_features_{name}_response.json new file mode 100644 index 00000000000..6ae5653dc0d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_features_{name}_response.json @@ -0,0 +1,5 @@ +{ + "name": "ssh", + "description": "Enable SSHing into the app.", + "enabled": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_request.json new file mode 100644 index 00000000000..c05195ed73b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_request.json @@ -0,0 +1,5 @@ +{ + "data": { + "guid": "[droplet_guid]" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_response.json new file mode 100644 index 00000000000..9e7370a6c39 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_relationships_current_droplet_response.json @@ -0,0 +1,13 @@ +{ + "data": { + "guid": "9d8e007c-ce52-4ea7-8a57-f2825d2c6b39" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/current_droplet" + }, + "related": { + "href": "https://api.example.org/v3/apps/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/droplets/current" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_request.json new file mode 100644 index 00000000000..21c19266ad5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_request.json @@ -0,0 +1,20 @@ +{ + "name": "my_app", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ] + } + }, + "metadata": { + "labels": { + "isLive": "false", + "maintenance": "true" + }, + "annotations": { + "version": "1.2.4" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_response.json new file mode 100644 index 00000000000..373dd814c38 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PATCH_{id}_response.json @@ -0,0 +1,69 @@ +{ + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "name": "my_app", + "state": "STARTED", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-03-18T11:32:30Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "isLive": "false", + "maintenance": "true" + }, + "annotations": { + "version": "1.2.4" + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop", + "method": "POST" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_request.json new file mode 100644 index 00000000000..18e7305fea9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_request.json @@ -0,0 +1,18 @@ +{ + "name": "my_app", + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "isLive": "true" + }, + "annotations": { + "version": "1.2.3" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_response.json new file mode 100644 index 00000000000..df6057ccf9a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_response.json @@ -0,0 +1,66 @@ +{ + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "name": "my_app", + "state": "STOPPED", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-06-08T16:41:26Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": ["java_buildpack"], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "isLive": true + }, + "annotations": { + "version": "1.2.3" + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop", + "method": "POST" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_{id}_actions_start_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_{id}_actions_start_response.json new file mode 100644 index 00000000000..3f62a9593e7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_{id}_actions_start_response.json @@ -0,0 +1,60 @@ +{ + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "name": "my_app", + "state": "STARTED", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-03-18T11:32:30Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop", + "method": "POST" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_{id}_actions_stop_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_{id}_actions_stop_response.json new file mode 100644 index 00000000000..81db906f134 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/POST_{id}_actions_stop_response.json @@ -0,0 +1,60 @@ +{ + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "name": "my_app", + "state": "STOPPED", + "created_at": "2016-03-17T21:41:30Z", + "updated_at": "2016-03-18T11:32:30Z", + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "java_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "processes": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/processes" + }, + "route_mappings": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/route_mappings" + }, + "packages": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/packages" + }, + "environment_variables": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/environment_variables" + }, + "current_droplet": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets/current" + }, + "droplets": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/droplets" + }, + "tasks": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/tasks" + }, + "start": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/start", + "method": "POST" + }, + "stop": { + "href": "https://api.example.org/v3/apps/1cb006ee-fb05-47e1-b541-c34179ddc446/actions/stop", + "method": "POST" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_request.json new file mode 100644 index 00000000000..9d09fddda69 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_request.json @@ -0,0 +1,5 @@ +{ + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json new file mode 100644 index 00000000000..d367c69e917 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/apps/PUT_{id}_processes_{type}_actions_scale_response.json @@ -0,0 +1,48 @@ +{ + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "rackup", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/auditevents/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/auditevents/GET_response.json new file mode 100644 index 00000000000..e09d1097db7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/auditevents/GET_response.json @@ -0,0 +1,48 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/audit_events?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/audit_events?page=1&per_page=2" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "a595fe2f-01ff-4965-a50c-290258ab8582", + "created_at": "2016-06-08T16:41:23Z", + "updated_at": "2016-06-08T16:41:26Z", + "type": "audit.app.update", + "actor": { + "guid": "d144abe3-3d7b-40d4-b63f-2584798d3ee5", + "type": "user", + "name": "admin" + }, + "target": { + "guid": "2e3151ba-9a63-4345-9c5b-6d8c238f4e55", + "type": "app", + "name": "my-app" + }, + "data": { + "request": { + "recursive": true + } + }, + "space": { + "guid": "cb97dd25-d4f7-4185-9e6f-ad6e585c207c" + }, + "organization": { + "guid": "d9be96f5-ea8f-4549-923f-bec882e32e3c" + }, + "links": { + "self": { + "href": "https://api.example.org//v3/audit_events/a595fe2f-01ff-4965-a50c-290258ab8582" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/auditevents/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/auditevents/GET_{id}_response.json new file mode 100644 index 00000000000..4528ae4a583 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/auditevents/GET_{id}_response.json @@ -0,0 +1,30 @@ +{ + "guid": "a595fe2f-01ff-4965-a50c-290258ab8582", + "created_at": "2016-06-08T16:41:23Z", + "updated_at": "2016-06-08T16:41:26Z", + "type": "audit.app.update", + "actor": { + "guid": "d144abe3-3d7b-40d4-b63f-2584798d3ee5", + "type": "user", + "name": "admin" + }, + "target": { + "guid": "2e3151ba-9a63-4345-9c5b-6d8c238f4e55", + "type": "app", + "name": "my-app" + }, + "data": { + "request": null + }, + "space": { + "guid": "cb97dd25-d4f7-4185-9e6f-ad6e585c207c" + }, + "organization": { + "guid": "d9be96f5-ea8f-4549-923f-bec882e32e3c" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/audit_events/a595fe2f-01ff-4965-a50c-290258ab8582" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/GET_response.json new file mode 100644 index 00000000000..540a8822822 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/GET_response.json @@ -0,0 +1,44 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/buildpacks?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/buildpacks?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/buildpacks?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "fd35633f-5c5c-4e4e-a5a9-0722c970a9d2", + "created_at": "2016-03-18T23:26:46Z", + "updated_at": "2016-10-17T20:00:42Z", + "name": "my-buildpack", + "state": "AWAITING_UPLOAD", + "filename": null, + "stack": "my-stack", + "position": 1, + "enabled": true, + "locked": false, + "lifecycle": "buildpack", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2" + }, + "upload": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload", + "method": "POST" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/GET_{id}_response.json new file mode 100644 index 00000000000..6b79ea9321e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/GET_{id}_response.json @@ -0,0 +1,26 @@ +{ + "guid": "fd35633f-5c5c-4e4e-a5a9-0722c970a9d2", + "created_at": "2016-03-18T23:26:46Z", + "updated_at": "2016-10-17T20:00:42Z", + "name": "ruby_buildpack", + "state": "AWAITING_UPLOAD", + "filename": null, + "stack": "windows64", + "position": 42, + "enabled": true, + "locked": false, + "lifecycle": "buildpack", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2" + }, + "upload": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload", + "method": "POST" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/PATCH_{id}_request.json new file mode 100644 index 00000000000..fd9a4b2ecb2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/PATCH_{id}_request.json @@ -0,0 +1,7 @@ +{ + "name": "ruby_buildpack", + "position": 42, + "enabled": true, + "locked": false, + "stack": "windows64" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/PATCH_{id}_response.json new file mode 100644 index 00000000000..6b79ea9321e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/PATCH_{id}_response.json @@ -0,0 +1,26 @@ +{ + "guid": "fd35633f-5c5c-4e4e-a5a9-0722c970a9d2", + "created_at": "2016-03-18T23:26:46Z", + "updated_at": "2016-10-17T20:00:42Z", + "name": "ruby_buildpack", + "state": "AWAITING_UPLOAD", + "filename": null, + "stack": "windows64", + "position": 42, + "enabled": true, + "locked": false, + "lifecycle": "buildpack", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2" + }, + "upload": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload", + "method": "POST" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_request.json new file mode 100644 index 00000000000..fd9a4b2ecb2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_request.json @@ -0,0 +1,7 @@ +{ + "name": "ruby_buildpack", + "position": 42, + "enabled": true, + "locked": false, + "stack": "windows64" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_response.json new file mode 100644 index 00000000000..6b79ea9321e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_response.json @@ -0,0 +1,26 @@ +{ + "guid": "fd35633f-5c5c-4e4e-a5a9-0722c970a9d2", + "created_at": "2016-03-18T23:26:46Z", + "updated_at": "2016-10-17T20:00:42Z", + "name": "ruby_buildpack", + "state": "AWAITING_UPLOAD", + "filename": null, + "stack": "windows64", + "position": 42, + "enabled": true, + "locked": false, + "lifecycle": "buildpack", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2" + }, + "upload": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload", + "method": "POST" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_{id}_upload_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_{id}_upload_response.json new file mode 100644 index 00000000000..6b79ea9321e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/POST_{id}_upload_response.json @@ -0,0 +1,26 @@ +{ + "guid": "fd35633f-5c5c-4e4e-a5a9-0722c970a9d2", + "created_at": "2016-03-18T23:26:46Z", + "updated_at": "2016-10-17T20:00:42Z", + "name": "ruby_buildpack", + "state": "AWAITING_UPLOAD", + "filename": null, + "stack": "windows64", + "position": 42, + "enabled": true, + "locked": false, + "lifecycle": "buildpack", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2" + }, + "upload": { + "href": "https://api.example.org/v3/buildpacks/fd35633f-5c5c-4e4e-a5a9-0722c970a9d2/upload", + "method": "POST" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/test-buildpack.zip b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/test-buildpack.zip new file mode 100644 index 00000000000..b2f47e917c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/buildpacks/test-buildpack.zip @@ -0,0 +1 @@ +test-content \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/GET_response.json new file mode 100644 index 00000000000..ce7ade8bd1b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/GET_response.json @@ -0,0 +1,49 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/builds?states=STAGING&page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/builds?states=STAGING&page=1&per_page=2" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-06-08T16:41:26Z", + "created_by": { + "guid": "3cb4e243-bed4-49d5-8739-f8b45abdec1c", + "name": "bill", + "email": "bill@example.com" + }, + "state": "STAGING", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "ruby_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "package": { + "guid": "8e4da443-f255-499c-8b47-b3729b5b7432" + }, + "droplet": null, + "links": { + "self": { + "href": "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/GET_{id}_response.json new file mode 100644 index 00000000000..11619e42c0e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/GET_{id}_response.json @@ -0,0 +1,35 @@ +{ + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "created_by": { + "guid": "3cb4e243-bed4-49d5-8739-f8b45abdec1c", + "name": "bill", + "email": "bill@example.com" + }, + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "ruby_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "package": { + "guid": "8e4da443-f255-499c-8b47-b3729b5b7432" + }, + "droplet": { + "guid": "1e1186e7-d803-4c46-b9d6-5c81e50fe55a" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/POST_request.json new file mode 100644 index 00000000000..84c1ff44ec1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/POST_request.json @@ -0,0 +1,5 @@ +{ + "package": { + "guid": "[package-guid]" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/POST_response.json new file mode 100644 index 00000000000..0c6e569922e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/builds/POST_response.json @@ -0,0 +1,33 @@ +{ + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-06-08T16:41:26Z", + "created_by": { + "guid": "3cb4e243-bed4-49d5-8739-f8b45abdec1c", + "name": "bill", + "email": "bill@example.com" + }, + "state": "STAGING", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "ruby_buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "package": { + "guid": "8e4da443-f255-499c-8b47-b3729b5b7432" + }, + "droplet": null, + "links": { + "self": { + "href": "https://api.example.org/v3/builds/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/GET_response.json new file mode 100644 index 00000000000..b7db8296454 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/GET_response.json @@ -0,0 +1,53 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/deployments?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/deployments?page=1&per_page=2" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "59c3d133-2b83-46f3-960e-7765a129aea4", + "state": "DEPLOYING", + "droplet": { + "guid": "44ccfa61-dbcf-4a0d-82fe-f668e9d2a962" + }, + "previous_droplet": { + "guid": "cc6bc315-bd06-49ce-92c2-bc3ad45268c2" + }, + "new_processes": [ + { + "guid": "fd5d3e60-f88c-4c37-b1ae-667cfc65a856", + "type": "web-deployment-59c3d133-2b83-46f3-960e-7765a129aea4" + } + ], + "revision": { + "guid": "56126cba-656a-4eba-a81e-7e9951b2df57", + "version": 1 + }, + "created_at": "2018-04-25T22:42:10Z", + "updated_at": "2018-04-25T22:42:10Z", + "relationships": { + "app": { + "data": { + "guid": "305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/deployments/59c3d133-2b83-46f3-960e-7765a129aea4" + }, + "app": { + "href": "https://api.example.org/v3/apps/305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/GET_{id}_response.json new file mode 100644 index 00000000000..3050c4d892c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/GET_{id}_response.json @@ -0,0 +1,37 @@ +{ + "guid": "59c3d133-2b83-46f3-960e-7765a129aea4", + "state": "DEPLOYING", + "droplet": { + "guid": "44ccfa61-dbcf-4a0d-82fe-f668e9d2a962" + }, + "previous_droplet": { + "guid": "cc6bc315-bd06-49ce-92c2-bc3ad45268c2" + }, + "new_processes": [ + { + "guid": "fd5d3e60-f88c-4c37-b1ae-667cfc65a856", + "type": "web-deployment-59c3d133-2b83-46f3-960e-7765a129aea4" + } + ], + "revision": { + "guid": "56126cba-656a-4eba-a81e-7e9951b2df57", + "version": 1 + }, + "created_at": "2018-04-25T22:42:10Z", + "updated_at": "2018-04-25T22:42:10Z", + "relationships": { + "app": { + "data": { + "guid": "305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/deployments/59c3d133-2b83-46f3-960e-7765a129aea4" + }, + "app": { + "href": "https://api.example.org/v3/apps/305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_request.json new file mode 100644 index 00000000000..530086ff410 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_request.json @@ -0,0 +1,12 @@ +{ + "droplet": { + "guid": "44ccfa61-dbcf-4a0d-82fe-f668e9d2a962" + }, + "relationships": { + "app": { + "data": { + "guid": "305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_response.json new file mode 100644 index 00000000000..1ff773b1dcf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_response.json @@ -0,0 +1,37 @@ +{ + "guid": "59c3d133-2b83-46f3-960e-7765a129aea4", + "state": "DEPLOYING", + "created_at": "2018-04-25T22:42:10Z", + "updated_at": "2018-04-25T22:42:10Z", + "droplet": { + "guid": "44ccfa61-dbcf-4a0d-82fe-f668e9d2a962" + }, + "previous_droplet": { + "guid": "cc6bc315-bd06-49ce-92c2-bc3ad45268c2" + }, + "relationships": { + "app": { + "data": { + "guid": "305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } + }, + "new_processes": [ + { + "guid": "fd5d3e60-f88c-4c37-b1ae-667cfc65a856", + "type": "web-deployment-59c3d133-2b83-46f3-960e-7765a129aea4" + } + ], + "revision": { + "guid": "56126cba-656a-4eba-a81e-7e9951b2df57", + "version": 1 + }, + "links": { + "self": { + "href": "https://api.example.org/v3/deployments/59c3d133-2b83-46f3-960e-7765a129aea4" + }, + "app": { + "href": "https://api.example.org/v3/apps/305cea31-5a44-45ca-b51b-e89c7a8ef8b2" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_{id}_cancel_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_{id}_cancel_request.json new file mode 100644 index 00000000000..9e26dfeeb6e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/deployments/POST_{id}_cancel_request.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/GET_response.json new file mode 100644 index 00000000000..475006d70c0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/GET_response.json @@ -0,0 +1,46 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/domains?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/domains?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/domains?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "name": "test-domain.com", + "internal": false, + "router_group": { "guid": "5806148f-cce6-4d86-7fbd-aa269e3f6f3f" }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "relationships": { + "organization": { + "data": null + }, + "shared_organizations": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + }, + "route_reservations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/GET_{id}_response.json new file mode 100644 index 00000000000..18ea51c6156 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/GET_{id}_response.json @@ -0,0 +1,42 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "name": "test-domain.com", + "internal": false, + "metadata": { + "labels": {}, + "annotations": {} + }, + "relationships": { + "organization": { + "data": { + "guid": "3a3f3d89-3f89-4f05-8188-751b298c79d5" + } + }, + "shared_organizations": { + "data": [ + { + "guid": "404f3d89-3f89-6z72-8188-751b298d88d5" + }, + { + "guid": "416d3d89-3f89-8h67-2189-123b298d3592" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/3a3f3d89-3f89-4f05-8188-751b298c79d5" + }, + "route_reservations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations" + }, + "shared_organizations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/relationships/shared_organizations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/PATCH_{id}_request.json new file mode 100644 index 00000000000..ea6fec54515 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/PATCH_{id}_request.json @@ -0,0 +1,10 @@ +{ + "metadata": { + "labels": { + "key": "value" + }, + "annotations": { + "note": "detailed information" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/PATCH_{id}_response.json new file mode 100644 index 00000000000..d7127c40727 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/PATCH_{id}_response.json @@ -0,0 +1,46 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "name": "test-domain.com", + "internal": false, + "metadata": { + "labels": { + "key": "value" + }, + "annotations": { + "note": "detailed information" + } + }, + "relationships": { + "organization": { + "data": { + "guid": "3a3f3d89-3f89-4f05-8188-751b298c79d5" + } + }, + "shared_organizations": { + "data": [ + { + "guid": "404f3d89-3f89-6z72-8188-751b298d88d5" + }, + { + "guid": "416d3d89-3f89-8h67-2189-123b298d3592" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/3a3f3d89-3f89-4f05-8188-751b298c79d5" + }, + "route_reservations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations" + }, + "shared_organizations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/relationships/shared_organizations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_request.json new file mode 100644 index 00000000000..7e427d3f942 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "test-domain.com", + "internal": false +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_response.json new file mode 100644 index 00000000000..8c5c09c809e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_response.json @@ -0,0 +1,27 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "name": "test-domain.com", + "internal": false, + "metadata": { + "labels": {}, + "annotations": {} + }, + "relationships": { + "organization": { + "data": null + }, + "shared_organizations": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + }, + "route_reservations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_request.json new file mode 100644 index 00000000000..5c8631b7f7d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "404f3d89-3f89-6z72-8188-751b298d88d5" + }, + { + "guid": "416d3d89-3f89-8h67-2189-123b298d3592" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_response.json new file mode 100644 index 00000000000..5c8631b7f7d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/domains/POST_{id}_relationships_shared_organizations_response.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "404f3d89-3f89-6z72-8188-751b298d88d5" + }, + { + "guid": "416d3d89-3f89-8h67-2189-123b298d3592" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/GET_response.json new file mode 100644 index 00000000000..41d10e7e602 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/GET_response.json @@ -0,0 +1,126 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/droplets?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/droplets?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": {} + }, + "image": null, + "execution_metadata": "PRIVATE DATA HIDDEN", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14" + } + ], + "stack": "cflinuxfs2", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + }, + { + "guid": "fdf3851c-def8-4de1-87f1-6d4543189e22", + "state": "PROCESSING_UPLOAD", + "error": null, + "lifecycle": { + "type": "docker", + "data": {} + }, + "execution_metadata": "[PRIVATE DATA HIDDEN IN LISTS]", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "image": "cloudfoundry/diego-docker-app-custom:latest", + "checksum": null, + "buildpacks": null, + "stack": null, + "created_at": "2016-03-17T00:00:01Z", + "updated_at": "2016-03-17T21:41:32Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22" + }, + "package": { + "href": "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + }, + { + "guid": "fdf3851c-def8-4de1-87f1-6d4543189e23", + "state": "AWAITING_UPLOAD", + "error": null, + "lifecycle": { + "type": "docker", + "data": {} + }, + "execution_metadata": "[PRIVATE DATA HIDDEN IN LISTS]", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "image": "cloudfoundry/diego-docker-app-custom:latest", + "checksum": null, + "buildpacks": null, + "stack": null, + "created_at": "2016-03-17T00:00:01Z", + "updated_at": "2016-03-17T21:41:32Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22" + }, + "package": { + "href": "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/GET_{id}_response.json new file mode 100644 index 00000000000..34aee2a994f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/GET_{id}_response.json @@ -0,0 +1,45 @@ +{ + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": {} + }, + "execution_metadata": "", + "process_types": { + "rake": "bundle exec rake", + "web": "bundle exec rackup config.ru -p $PORT" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14", + "version": "1.1.1.", + "buildpack_name": "ruby" + } + ], + "stack": "cflinuxfs2", + "image": null, + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/POST_source_guid={id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/POST_source_guid={id}_request.json new file mode 100644 index 00000000000..3864df33091 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/POST_source_guid={id}_request.json @@ -0,0 +1,9 @@ +{ + "relationships": { + "app": { + "data": { + "guid": "[app-guid]" + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/POST_source_guid={id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/POST_source_guid={id}_response.json new file mode 100644 index 00000000000..5cfd30ccde1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/droplets/POST_source_guid={id}_response.json @@ -0,0 +1,32 @@ +{ + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "state": "COPYING", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": {} + }, + "execution_metadata": "", + "process_types": null, + "checksum": null, + "buildpacks": null, + "stack": null, + "image": null, + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/error_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/error_response.json new file mode 100644 index 00000000000..e773eb37dc0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/error_response.json @@ -0,0 +1,9 @@ +{ + "errors": [ + { + "code": 10008, + "title": "CF-UnprocessableEntity", + "detail": "something went wrong" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_response.json new file mode 100644 index 00000000000..2259c32affb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_response.json @@ -0,0 +1,88 @@ +{ + "pagination": { + "total_results": 11, + "total_pages": 3, + "first": { + "href": "https://api.example.org/v3/isolation_segments?page=1&per_page=5" + }, + "last": { + "href": "https://api.example.org/v3/isolation_segments?page=3&per_page=5" + }, + "next": { + "href": "https://api.example.org/v3/isolation_segments?page=2&per_page=5" + }, + "previous": null + }, + "resources": [ + { + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c", + "name": "an_isolation_segment", + "created_at": "2016-10-19T20:25:04Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations" + } + } + }, + { + "guid": "68d54d31-9b3a-463b-ba94-e8e4c32edbac", + "name": "an_isolation_segment1", + "created_at": "2016-10-19T20:29:19Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/68d54d31-9b3a-463b-ba94-e8e4c32edbac" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/68d54d31-9b3a-463b-ba94-e8e4c32edbac/organizations" + } + } + }, + { + "guid": "ecdc67c3-a71e-43ff-bddf-048930b8cd03", + "name": "an_isolation_segment2", + "created_at": "2016-10-19T20:29:22Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/ecdc67c3-a71e-43ff-bddf-048930b8cd03" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/ecdc67c3-a71e-43ff-bddf-048930b8cd03/organizations" + } + } + }, + { + "guid": "424c89e4-4353-46b7-9bf4-f90bd9bacac0", + "name": "an_isolation_segment3", + "created_at": "2016-10-19T20:29:27Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/424c89e4-4353-46b7-9bf4-f90bd9bacac0" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/424c89e4-4353-46b7-9bf4-f90bd9bacac0/organizations" + } + } + }, + { + "guid": "0a79fcec-a648-4eb8-a6c3-2b5be39047c7", + "name": "an_isolation_segment4", + "created_at": "2016-10-19T20:29:33Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/0a79fcec-a648-4eb8-a6c3-2b5be39047c7" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/0a79fcec-a648-4eb8-a6c3-2b5be39047c7/organizations" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_organizations_response.json new file mode 100644 index 00000000000..4452a8fef9e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_organizations_response.json @@ -0,0 +1,38 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920", + "metadata": { + "annotations": {}, + "labels": {} + }, + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "org1", + "links": {} + }, + { + "guid": "d4c91047-7b29-4fda-b7f9-04033e5c9c9f", + "metadata": { + "annotations": {}, + "labels": {} + }, + "created_at": "2017-02-02T00:14:30Z", + "updated_at": "2017-02-02T00:14:30Z", + "name": "org2", + "links": {} + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_relationships_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_relationships_organizations_response.json new file mode 100644 index 00000000000..4bc1c912d47 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_relationships_organizations_response.json @@ -0,0 +1,18 @@ +{ + "data": [ + { + "guid": "68d54d31-9b3a-463b-ba94-e8e4c32edbac" + }, + { + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/organizations" + }, + "related": { + "href": "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/organizations" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_relationships_spaces_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_relationships_spaces_response.json new file mode 100644 index 00000000000..8cfd02372f6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_relationships_spaces_response.json @@ -0,0 +1,15 @@ +{ + "data": [ + { + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920" + }, + { + "guid": "d4c91047-7b29-4fda-b7f9-04033e5c9c9f" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/spaces" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_response.json new file mode 100644 index 00000000000..6662b4bef54 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/GET_{id}_response.json @@ -0,0 +1,14 @@ +{ + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c", + "name": "an_isolation_segment", + "created_at": "2016-10-19T20:25:04Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/PATCH_{id}_request.json new file mode 100644 index 00000000000..9f5dcafd474 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/PATCH_{id}_request.json @@ -0,0 +1,3 @@ +{ + "name": "my_isolation_segment" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/PATCH_{id}_response.json new file mode 100644 index 00000000000..c84e4b24946 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/PATCH_{id}_response.json @@ -0,0 +1,14 @@ +{ + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c", + "name": "my_isolation_segment", + "created_at": "2016-10-19T20:25:04Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_request.json new file mode 100644 index 00000000000..6aa25e6caf6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_request.json @@ -0,0 +1,3 @@ +{ + "name": "my_segment" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_response.json new file mode 100644 index 00000000000..6662b4bef54 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_response.json @@ -0,0 +1,14 @@ +{ + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c", + "name": "an_isolation_segment", + "created_at": "2016-10-19T20:25:04Z", + "updated_at": "2016-11-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c" + }, + "organizations": { + "href": "https://api.example.org/v3/isolation_segments/b19f6525-cbd3-4155-b156-dc0c2a431b4c/organizations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_request.json new file mode 100644 index 00000000000..8c93548a6b1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "org-guid-1" + }, + { + "guid": "org-guid-2" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_response.json new file mode 100644 index 00000000000..c9674d83cb4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/isolation_segments/POST_{id}_relationships_organizations_response.json @@ -0,0 +1,18 @@ +{ + "data": [ + { + "guid": "68d54d31-9b3a-463b-ba94-e8e4c32edbac" + }, + { + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/organizations" + }, + "related": { + "href": "https://api.example.org/v3/isolation_segments/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/organizations" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/jobs/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/jobs/GET_{id}_response.json new file mode 100644 index 00000000000..3ae7a2d66b4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/jobs/GET_{id}_response.json @@ -0,0 +1,22 @@ +{ + "guid": "b19ae525-cbd3-4155-b156-dc0c2a431b4c", + "created_at": "2016-10-19T20:25:04Z", + "updated_at": "2016-11-08T16:41:26Z", + "operation": "app.delete", + "state": "FAILED", + "links": { + "self": { + "href": "https://api.example.org/v3/jobs/b19ae525-cbd3-4155-b156-dc0c2a431b4c" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + } + }, + "errors": [ + { + "code": 10008, + "title": "CF-UnprocessableEntity", + "detail": "something went wrong" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_response.json new file mode 100644 index 00000000000..4452a8fef9e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_response.json @@ -0,0 +1,38 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/isolation_segments/933b4c58-120b-499a-b85d-4b6fc9e2903b/organizations?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920", + "metadata": { + "annotations": {}, + "labels": {} + }, + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "org1", + "links": {} + }, + { + "guid": "d4c91047-7b29-4fda-b7f9-04033e5c9c9f", + "metadata": { + "annotations": {}, + "labels": {} + }, + "created_at": "2017-02-02T00:14:30Z", + "updated_at": "2017-02-02T00:14:30Z", + "name": "org2", + "links": {} + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_domains_default_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_domains_default_response.json new file mode 100644 index 00000000000..2105659ed5c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_domains_default_response.json @@ -0,0 +1,46 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "name": "test-domain.com", + "internal": false, + "router_group": null, + "supported_protocols": [ + "http" + ], + "metadata": { + "labels": {}, + "annotations": {} + }, + "relationships": { + "organization": { + "data": { + "guid": "3a3f3d89-3f89-4f05-8188-751b298c79d5" + } + }, + "shared_organizations": { + "data": [ + { + "guid": "404f3d89-3f89-6z72-8188-751b298d88d5" + }, + { + "guid": "416d3d89-3f89-8h67-2189-123b298d3592" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/3a3f3d89-3f89-4f05-8188-751b298c79d5" + }, + "route_reservations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations" + }, + "shared_organizations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/relationships/shared_organizations" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_domains_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_domains_response.json new file mode 100644 index 00000000000..757121dff5b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_domains_response.json @@ -0,0 +1,50 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/domains?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/domains?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/domains?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "name": "test-domain.com", + "internal": false, + "metadata": { + "labels": {}, + "annotations": {} + }, + "relationships": { + "organization": { + "data": { + "guid": "test-organization-id" + } + }, + "shared_organizations": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/test-organization-id" + }, + "route_reservations": { + "href": "https://api.example.org/v3/domains/3a5d3d89-3f89-4f05-8188-8a2b298c79d5/route_reservations" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_relationships_default_isolation_segment_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_relationships_default_isolation_segment_response.json new file mode 100644 index 00000000000..bbf5fff4ef6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_relationships_default_isolation_segment_response.json @@ -0,0 +1,13 @@ +{ + "data": { + "guid": "9d8e007c-ce52-4ea7-8a57-f2825d2c6b39" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/default_isolation_segment" + }, + "related": { + "href": "https://api.example.org/v3/isolation_segments/9d8e007c-ce52-4ea7-8a57-f2825d2c6b39" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_response.json new file mode 100644 index 00000000000..59e58e32823 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_response.json @@ -0,0 +1,15 @@ +{ + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "metadata": { + "annotations": {}, + "labels": {} + }, + "name": "my-organization", + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/24637893-3b77-489d-bb79-8466f0d88b52" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_usage_summary_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_usage_summary_response.json new file mode 100644 index 00000000000..1ae0fdbaffb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/GET_{id}_usage_summary_response.json @@ -0,0 +1,20 @@ +{ + "usage_summary": { + "started_instances": 3, + "memory_in_mb": 50, + "routes": 0, + "service_instances": 0, + "reserved_ports": 0, + "per_app_tasks": 2, + "domains": 2, + "service_keys": 0 + }, + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/usage_summary" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_request.json new file mode 100644 index 00000000000..a9a3a5aedbc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_request.json @@ -0,0 +1,5 @@ +{ + "data": { + "guid": "[iso-seg-guid]" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_response.json new file mode 100644 index 00000000000..bbf5fff4ef6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_relationships_default_isolation_segment_response.json @@ -0,0 +1,13 @@ +{ + "data": { + "guid": "9d8e007c-ce52-4ea7-8a57-f2825d2c6b39" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/d4c91047-7b29-4fda-b7f9-04033e5c9c9f/relationships/default_isolation_segment" + }, + "related": { + "href": "https://api.example.org/v3/isolation_segments/9d8e007c-ce52-4ea7-8a57-f2825d2c6b39" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_request.json new file mode 100644 index 00000000000..2c6f513284a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_request.json @@ -0,0 +1,10 @@ +{ + "metadata": { + "labels": { + "dept": "1234" + }, + "annotations": { + "version": "1.2.4" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_response.json new file mode 100644 index 00000000000..fbd801bcd6d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/PATCH_{id}_response.json @@ -0,0 +1,19 @@ +{ + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "metadata": { + "labels": { + "dept": "1234" + }, + "annotations": { + "version": "1.2.4" + } + }, + "name": "my-organization", + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/24637893-3b77-489d-bb79-8466f0d88b52" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/POST_request.json new file mode 100644 index 00000000000..9713b7c7745 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/POST_request.json @@ -0,0 +1,3 @@ +{ + "name": "my-organization" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/POST_response.json new file mode 100644 index 00000000000..59e58e32823 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/organizations/POST_response.json @@ -0,0 +1,15 @@ +{ + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "metadata": { + "annotations": {}, + "labels": {} + }, + "name": "my-organization", + "links": { + "self": { + "href": "https://api.example.org/v3/organizations/24637893-3b77-489d-bb79-8466f0d88b52" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_response.json new file mode 100644 index 00000000000..559c6c96fd0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_response.json @@ -0,0 +1,66 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/packages?types=bits%2Cdocker&page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/packages?types=bits%2Cdocker&page=2&per_page=2" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "a57fd932-85db-483a-a27e-b00efbb3b0a4", + "type": "bits", + "data": { + "checksum": { + "type": "sha256", + "value": null + }, + "error": null + }, + "state": "AWAITING_UPLOAD", + "created_at": "2015-11-03T00:53:54Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/a57fd932-85db-483a-a27e-b00efbb3b0a4" + }, + "upload": { + "href": "https://api.example.org/v3/packages/a57fd932-85db-483a-a27e-b00efbb3b0a4/upload", + "method": "POST" + }, + "download": { + "href": "https://api.example.org/v3/packages/a57fd932-85db-483a-a27e-b00efbb3b0a4/download", + "method": "GET" + }, + "app": { + "href": "https://api.example.org/v3/apps/fa3558ce-1c4d-46fc-9776-54b9c8021745" + } + } + }, + { + "guid": "8f1f294d-cef8-4c11-9f0b-3bcdc0bd2691", + "type": "docker", + "data": { + "image": "registry/image:latest", + "username": "username", + "password": "***" + }, + "state": "READY", + "created_at": "2015-11-03T00:53:54Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/8f1f294d-cef8-4c11-9f0b-3bcdc0bd2691" + }, + "app": { + "href": "https://api.example.org/v3/apps/fa3558ce-1c4d-46fc-9776-54b9c8021745" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_download_response.bin b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_download_response.bin new file mode 100644 index 00000000000..95dc47d43d5 Binary files /dev/null and b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_download_response.bin differ diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_droplets_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_droplets_response.json new file mode 100644 index 00000000000..64bb8756c03 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_droplets_response.json @@ -0,0 +1,178 @@ +{ + "pagination": { + "total_results": 4, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/packages/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/packages/7b34f1cf-7e73-428a-bb5a-8a17a8058396/droplets?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d16", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": {} + }, + "image": null, + "execution_metadata": "PRIVATE DATA HIDDEN", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14" + } + ], + "stack": "cflinuxfs2", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d16" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e92" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + }, + { + "guid": "585bc3c1-3743-497d-88b0-403ad6b56d17", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "kpack", + "data": { + "buildpacks": ["foo", "bar"] + } + }, + "image": null, + "execution_metadata": "PRIVATE DATA HIDDEN", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14" + } + ], + "stack": "cflinuxfs2", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/585bc3c1-3743-497d-88b0-403ad6b56d17" + }, + "package": { + "href": "https://api.example.org/v3/packages/8222f76a-9e09-4360-b3aa-1ed329945e93" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058397" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058397/relationships/current_droplet", + "method": "PATCH" + } + } + }, + { + "guid": "e351a2f2-dfc6-454b-8777-60ed2ff98edb", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "cnb", + "data": {} + }, + "image": null, + "execution_metadata": "PRIVATE DATA HIDDEN", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "checksum": { + "type": "sha256", + "value": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" + }, + "buildpacks": [ + { + "name": "ruby_buildpack", + "detect_output": "ruby 1.6.14" + } + ], + "stack": "cflinuxfs2", + "created_at": "2016-03-28T23:39:34Z", + "updated_at": "2016-03-28T23:39:47Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/e351a2f2-dfc6-454b-8777-60ed2ff98edb" + }, + "package": { + "href": "https://api.example.org/v3/packages/45c63fe0-f5f4-4f23-963e-a8311193d11e" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058398" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058398/relationships/current_droplet", + "method": "PATCH" + } + } + }, + { + "guid": "fdf3851c-def8-4de1-87f1-6d4543189e22", + "state": "STAGED", + "error": null, + "lifecycle": { + "type": "docker", + "data": {} + }, + "execution_metadata": "[PRIVATE DATA HIDDEN IN LISTS]", + "process_types": { + "redacted_message": "[PRIVATE DATA HIDDEN IN LISTS]" + }, + "image": "cloudfoundry/diego-docker-app-custom:latest", + "checksum": null, + "buildpacks": null, + "stack": null, + "created_at": "2016-03-17T00:00:01Z", + "updated_at": "2016-03-17T21:41:32Z", + "links": { + "self": { + "href": "https://api.example.org/v3/droplets/fdf3851c-def8-4de1-87f1-6d4543189e22" + }, + "package": { + "href": "https://api.example.org/v3/packages/c5725684-a02f-4e59-bc67-8f36ae944688" + }, + "app": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396" + }, + "assign_current_droplet": { + "href": "https://api.example.org/v3/apps/7b34f1cf-7e73-428a-bb5a-8a17a8058396/relationships/current_droplet", + "method": "PATCH" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_response.json new file mode 100644 index 00000000000..11ce43d6c07 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/GET_{id}_response.json @@ -0,0 +1,30 @@ +{ + "guid": "44f7c078-0934-470f-9883-4fcddc5b8f13", + "type": "bits", + "data": { + "checksum": { + "type": "sha256", + "value": null + }, + "error": null + }, + "state": "PROCESSING_UPLOAD", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13" + }, + "upload": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload", + "method": "POST" + }, + "download": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download", + "method": "GET" + }, + "app": { + "href": "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_request.json new file mode 100644 index 00000000000..830f62bd09c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_request.json @@ -0,0 +1,10 @@ +{ + "type": "bits", + "relationships": { + "app": { + "data": { + "guid": "[guid]" + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_response.json new file mode 100644 index 00000000000..11ce43d6c07 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_response.json @@ -0,0 +1,30 @@ +{ + "guid": "44f7c078-0934-470f-9883-4fcddc5b8f13", + "type": "bits", + "data": { + "checksum": { + "type": "sha256", + "value": null + }, + "error": null + }, + "state": "PROCESSING_UPLOAD", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13" + }, + "upload": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload", + "method": "POST" + }, + "download": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download", + "method": "GET" + }, + "app": { + "href": "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_source_guid={id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_source_guid={id}_request.json new file mode 100644 index 00000000000..002c47b5281 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_source_guid={id}_request.json @@ -0,0 +1,9 @@ +{ + "relationships": { + "app": { + "data": { + "guid": "[destination-app-guid]" + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_source_guid={id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_source_guid={id}_response.json new file mode 100644 index 00000000000..11ce43d6c07 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_source_guid={id}_response.json @@ -0,0 +1,30 @@ +{ + "guid": "44f7c078-0934-470f-9883-4fcddc5b8f13", + "type": "bits", + "data": { + "checksum": { + "type": "sha256", + "value": null + }, + "error": null + }, + "state": "PROCESSING_UPLOAD", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13" + }, + "upload": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload", + "method": "POST" + }, + "download": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download", + "method": "GET" + }, + "app": { + "href": "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_droplets_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_droplets_request.json new file mode 100644 index 00000000000..d417e340cf4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_droplets_request.json @@ -0,0 +1,14 @@ +{ + "environment_variables": { + "CUSTOM_ENV_VAR": "hello" + }, + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "http://github.com/myorg/awesome-buildpack" + ], + "stack": "cflinuxfs2" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_droplets_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_droplets_response.json new file mode 100644 index 00000000000..88f4e53aac8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_droplets_response.json @@ -0,0 +1,57 @@ +{ + "guid": "whatuuid", + "state": "PENDING", + "error": null, + "lifecycle": { + "type": "buildpack", + "data": { + "buildpacks": [ + "http://github.com/myorg/awesome-buildpack" + ], + "stack": "cflinuxfs2" + } + }, + "staging_memory_in_mb": 1024, + "staging_disk_in_mb": 4096, + "result": null, + "environment_variables": { + "CUSTOM_ENV_VAR": "hello", + "VCAP_APPLICATION": { + "limits": { + "mem": 1024, + "disk": 4096, + "fds": 16384 + }, + "application_id": "f82a88a2-2197-45b2-8b6d-84d1be8e2d0e", + "application_version": "whatuuid", + "application_name": "name-673", + "application_uris": [], + "version": "whatuuid", + "name": "name-673", + "space_name": "name-670", + "space_id": "8543c9f2-0ec4-4bd2-adb4-eee7b2cd6c9d", + "uris": [], + "users": null + }, + "CF_STACK": "cflinuxfs2", + "MEMORY_LIMIT": 1024, + "VCAP_SERVICES": {} + }, + "created_at": "2015-11-03T00:53:54Z", + "updated_at": null, + "links": { + "self": { + "href": "/v3/droplets/whatuuid" + }, + "package": { + "href": "/v3/packages/aee22e31-6476-435e-a8c9-8961c6ead83e" + }, + "app": { + "href": "/v3/apps/f82a88a2-2197-45b2-8b6d-84d1be8e2d0e" + }, + "assign_current_droplet": { + "href": "/v3/apps/f82a88a2-2197-45b2-8b6d-84d1be8e2d0e/droplets/current", + "method": "PUT" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_upload_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_upload_response.json new file mode 100644 index 00000000000..11ce43d6c07 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/POST_{id}_upload_response.json @@ -0,0 +1,30 @@ +{ + "guid": "44f7c078-0934-470f-9883-4fcddc5b8f13", + "type": "bits", + "data": { + "checksum": { + "type": "sha256", + "value": null + }, + "error": null + }, + "state": "PROCESSING_UPLOAD", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "links": { + "self": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13" + }, + "upload": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/upload", + "method": "POST" + }, + "download": { + "href": "https://api.example.org/v3/packages/44f7c078-0934-470f-9883-4fcddc5b8f13/download", + "method": "GET" + }, + "app": { + "href": "https://api.example.org/v3/apps/1d3bf0ec-5806-43c4-b64e-8364dba1086a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/test-package.zip b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/test-package.zip new file mode 100644 index 00000000000..b2f47e917c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/packages/test-package.zip @@ -0,0 +1 @@ +test-content \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json new file mode 100644 index 00000000000..0ee0d5c3071 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_response.json @@ -0,0 +1,114 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/processes?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/processes?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/processes?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "[PRIVATE DATA HIDDEN IN LISTS]", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } + }, + { + "guid": "3fccacd9-4b02-4b96-8d02-8e865865e9eb", + "type": "worker", + "command": "[PRIVATE DATA HIDDEN IN LISTS]", + "instances": 1, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "process", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb" + }, + "scale": { + "href": "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/3fccacd9-4b02-4b96-8d02-8e865865e9eb/stats" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json new file mode 100644 index 00000000000..d367c69e917 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_response.json @@ -0,0 +1,48 @@ +{ + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "rackup", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_stats_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_stats_response.json new file mode 100644 index 00000000000..7b3cab6f03e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_stats_response.json @@ -0,0 +1,28 @@ +{ + "resources": [ + { + "type": "web", + "index": 0, + "state": "RUNNING", + "usage": { + "time": "2016-03-23T23:17:30.476314154Z", + "cpu": 0.00038711029163348665, + "mem": 19177472, + "disk": 69705728 + }, + "host": "10.244.16.10", + "instance_ports": [ + { + "external": 64546, + "external_tls_proxy_port": 1234, + "internal": 8080, + "internal_tls_proxy_port": 5678 + } + ], + "uptime": 9042, + "mem_quota": 268435456, + "disk_quota": 1073741824, + "fds_quota": 16384 + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_stats_with_null_fields_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_stats_with_null_fields_response.json new file mode 100644 index 00000000000..2fbad6bd6b2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/GET_{id}_stats_with_null_fields_response.json @@ -0,0 +1,16 @@ +{ + "resources": [ + { + "type": "web", + "index": 0, + "state": "STARTING", + "usage": {}, + "host": "", + "instance_ports": [], + "uptime": 4, + "mem_quota": null, + "disk_quota": null, + "fds_quota": 16384 + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_request.json new file mode 100644 index 00000000000..64aa8a73061 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_request.json @@ -0,0 +1,3 @@ +{ + "command": "rackup" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json new file mode 100644 index 00000000000..f136f02b962 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/PATCH_{id}_response.json @@ -0,0 +1,50 @@ +{ + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "rackup", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": { + + }, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_request.json new file mode 100644 index 00000000000..9d09fddda69 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_request.json @@ -0,0 +1,5 @@ +{ + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json new file mode 100644 index 00000000000..d367c69e917 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/processes/POST_{id}_actions_scale_response.json @@ -0,0 +1,48 @@ +{ + "guid": "6a901b7c-9417-4dc1-8189-d3234aa0ab82", + "type": "web", + "command": "rackup", + "instances": 5, + "memory_in_mb": 256, + "disk_in_mb": 1024, + "health_check": { + "type": "port", + "data": { + "timeout": null, + "endpoint": null + } + }, + "readiness_health_check": { + "type": "port", + "data": { + "interval": null, + "endpoint": null, + "invocation_timeout": null + } + }, + "metadata": { + "annotations": {}, + "labels": {} + }, + "relationships": {}, + "created_at": "2016-03-23T18:48:22Z", + "updated_at": "2016-03-23T18:48:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82" + }, + "scale": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/actions/scale", + "method": "POST" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + }, + "stats": { + "href": "https://api.example.org/v3/processes/6a901b7c-9417-4dc1-8189-d3234aa0ab82/stats" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/GET_response.json new file mode 100644 index 00000000000..7c33318b282 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/GET_response.json @@ -0,0 +1,86 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/organization_quotas?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/organization_quotas?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "domains": { + "total_domains": 7 + }, + "relationships": { + "organizations": { + "data": [ + { "guid": "9b370018-c38e-44c9-86d6-155c76801104" } + ] + } + }, + "links": { + "self": { "href": "https://api.example.org/v3/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52" } + } + }, + { + "guid": "bb49bf20-ad98-4729-93ae-38fbc564b630", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:41Z", + "name": "my-quota-2", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "domains": { + "total_domains": 7 + }, + "relationships": { + "organizations": { + "data": [ + { "guid": "144251f2-a202-4ffe-ab47-9046c4077e99" } + ] + } + }, + "links": { + "self": { "href": "https://api.example.org/v3/organization_quotas/bb49bf20-ad98-4729-93ae-38fbc564b630" } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/GET_{id}_response.json new file mode 100644 index 00000000000..af547d449f8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/GET_{id}_response.json @@ -0,0 +1,35 @@ +{ + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "domains": { + "total_domains": 7 + }, + "relationships": { + "organizations": { + "data": [ + { "guid": "9b370018-c38e-44c9-86d6-155c76801104" } + ] + } + }, + "links": { + "self": { "href": "https://api.example.org/v3/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52" } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/PATCH_{id}_request.json new file mode 100644 index 00000000000..7a73a41bfdf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/PATCH_{id}_request.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/PATCH_{id}_response.json new file mode 100644 index 00000000000..af547d449f8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/PATCH_{id}_response.json @@ -0,0 +1,35 @@ +{ + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "domains": { + "total_domains": 7 + }, + "relationships": { + "organizations": { + "data": [ + { "guid": "9b370018-c38e-44c9-86d6-155c76801104" } + ] + } + }, + "links": { + "self": { "href": "https://api.example.org/v3/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52" } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/POST_request.json new file mode 100644 index 00000000000..fe1dcc937e9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/POST_request.json @@ -0,0 +1,3 @@ +{ + "name": "my-quota" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/POST_response.json new file mode 100644 index 00000000000..af547d449f8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/POST_response.json @@ -0,0 +1,35 @@ +{ + "guid": "24637893-3b77-489d-bb79-8466f0d88b52", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "log_rate_limit_in_bytes_per_second": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "domains": { + "total_domains": 7 + }, + "relationships": { + "organizations": { + "data": [ + { "guid": "9b370018-c38e-44c9-86d6-155c76801104" } + ] + } + }, + "links": { + "self": { "href": "https://api.example.org/v3/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52" } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/relationships/POST_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/relationships/POST_{id}_request.json new file mode 100644 index 00000000000..093842883d5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/relationships/POST_{id}_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "org-guid1" + }, + { + "guid": "org-guid2" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/relationships/POST_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/relationships/POST_{id}_response.json new file mode 100644 index 00000000000..e1abe6da192 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/organizations/relationships/POST_{id}_response.json @@ -0,0 +1,18 @@ +{ + "data": [ + { + "guid": "org-guid1" + }, + { + "guid": "org-guid2" + }, + { + "guid": "previous-org-guid" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/organization_quotas/24637893-3b77-489d-bb79-8466f0d88b52/relationships/organizations" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/GET_response.json new file mode 100644 index 00000000000..c695fa74b70 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/GET_response.json @@ -0,0 +1,98 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/space_quotas?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/space_quotas?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "f919ef8a-e333-472a-8172-baaf2c30d301", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T18:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "relationships": { + "organization": { + "data": { + "guid": "9b370018-c38e-44c9-86d6-155c76801104" + } + }, + "spaces": { + "data": [ + { + "guid": "dcfd6a55-62b9-496e-a26f-0064cec076bf" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/space_quotas/f919ef8a-e333-472a-8172-baaf2c30d301" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/9b370018-c38e-44c9-86d6-155c76801104" + } + } + }, + { + "guid": "bb49bf20-ad98-4729-93ae-38fbc564b630", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T18:00:41Z", + "name": "my-quota-2", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "relationships": { + "organization": { + "data": { + "guid": "9b370018-c38e-44c9-86d6-155c76801104" + } + }, + "spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/space_quotas/bb49bf20-ad98-4729-93ae-38fbc564b630" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/9b370018-c38e-44c9-86d6-155c76801104" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/GET_{id}_response.json new file mode 100644 index 00000000000..c90b41bbd2e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/GET_{id}_response.json @@ -0,0 +1,43 @@ +{ + "guid": "f919ef8a-e333-472a-8172-baaf2c30d301", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T18:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "relationships": { + "organization": { + "data": { + "guid": "9b370018-c38e-44c9-86d6-155c76801104" + } + }, + "spaces": { + "data": [ + { + "guid": "dcfd6a55-62b9-496e-a26f-0064cec076bf" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/space_quotas/f919ef8a-e333-472a-8172-baaf2c30d301" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/9b370018-c38e-44c9-86d6-155c76801104" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/PATCH_{id}_request.json new file mode 100644 index 00000000000..7a73a41bfdf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/PATCH_{id}_request.json @@ -0,0 +1,2 @@ +{ +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/PATCH_{id}_response.json new file mode 100644 index 00000000000..c90b41bbd2e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/PATCH_{id}_response.json @@ -0,0 +1,43 @@ +{ + "guid": "f919ef8a-e333-472a-8172-baaf2c30d301", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T18:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "relationships": { + "organization": { + "data": { + "guid": "9b370018-c38e-44c9-86d6-155c76801104" + } + }, + "spaces": { + "data": [ + { + "guid": "dcfd6a55-62b9-496e-a26f-0064cec076bf" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/space_quotas/f919ef8a-e333-472a-8172-baaf2c30d301" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/9b370018-c38e-44c9-86d6-155c76801104" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/POST_request.json new file mode 100644 index 00000000000..59745ba5ea6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/POST_request.json @@ -0,0 +1,17 @@ +{ + "name": "my-quota", + "relationships": { + "organization": { + "data": { + "guid": "9b370018-c38e-44c9-86d6-155c76801104" + } + }, + "spaces": { + "data": [ + { + "guid": "dcfd6a55-62b9-496e-a26f-0064cec076bf" + } + ] + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/POST_response.json new file mode 100644 index 00000000000..883b8ef4636 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/POST_response.json @@ -0,0 +1,43 @@ +{ + "guid": "f919ef8a-e333-472a-8172-baaf2c30d301", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T18:00:41Z", + "name": "my-quota", + "apps": { + "total_memory_in_mb": 5120, + "per_process_memory_in_mb": 1024, + "total_instances": 10, + "per_app_tasks": 5 + }, + "services": { + "paid_services_allowed": true, + "total_service_instances": 10, + "total_service_keys": 20 + }, + "routes": { + "total_routes": 8, + "total_reserved_ports": 4 + }, + "relationships": { + "organization": { + "data": { + "guid": "9b370018-c38e-44c9-86d6-155c76801104" + } + }, + "spaces": { + "data": [ + { + "guid": "dcfd6a55-62b9-496e-a26f-0064cec076bf" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/space_quotas/f919ef8a-e333-472a-8172-baaf2c30d301" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/9b370018-c38e-44c9-86d6-155c76801104" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/relationships/POST_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/relationships/POST_{id}_request.json new file mode 100644 index 00000000000..9cf906732a3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/relationships/POST_{id}_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "space-guid1" + }, + { + "guid": "space-guid2" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/relationships/POST_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/relationships/POST_{id}_response.json new file mode 100644 index 00000000000..7b316d68e36 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/quotas/spaces/relationships/POST_{id}_response.json @@ -0,0 +1,18 @@ +{ + "data": [ + { + "guid": "space-guid1" + }, + { + "guid": "space-guid2" + }, + { + "guid": "previous-space-guid" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/space_quotas/24637893-3b77-489d-bb79-8466f0d88b52/relationships/spaces" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/GET_response.json new file mode 100644 index 00000000000..92740913f32 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/GET_response.json @@ -0,0 +1,82 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/roles?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/roles?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/roles?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "40557c70-d1bd-4976-a2ab-a85f5e882418", + "created_at": "2019-10-10T17:19:12Z", + "updated_at": "2019-10-10T17:19:12Z", + "type": "organization_auditor", + "relationships": { + "user": { + "data": { + "guid": "test-user-id" + } + }, + "organization": { + "data": { + "guid": "test-organization-id" + } + }, + "space": { + "data": null + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/roles/40557c70-d1bd-4976-a2ab-a85f5e882418" + }, + "user": { + "href": "https://api.example.org/v3/users/test-user-id" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/test-organization-id" + } + } + }, + { + "guid": "12347c70-d1bd-4976-a2ab-a85f5e882418", + "created_at": "2047-11-10T17:19:12Z", + "updated_at": "2047-11-10T17:19:12Z", + "type": "space_auditor", + "relationships": { + "user": { + "data": { + "guid": "test-user-id" + } + }, + "organization": { + "data": null + }, + "space": { + "data": { + "guid": "test-space-id" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/roles/12347c70-d1bd-4976-a2ab-a85f5e882418" + }, + "user": { + "href": "https://api.example.org/v3/users/test-user-id" + }, + "space": { + "href": "https://api.example.org/v3/spaces/test-space-id" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/GET_{id}_response.json new file mode 100644 index 00000000000..28b567ff811 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/GET_{id}_response.json @@ -0,0 +1,32 @@ +{ + "guid": "40557c70-d1bd-4976-a2ab-a85f5e882418", + "created_at": "2019-10-10T17:19:12Z", + "updated_at": "2019-10-10T17:19:12Z", + "type": "organization_auditor", + "relationships": { + "user": { + "data": { + "guid": "test-user-id" + } + }, + "organization": { + "data": { + "guid": "test-organization-id" + } + }, + "space": { + "data": null + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/roles/40557c70-d1bd-4976-a2ab-a85f5e882418" + }, + "user": { + "href": "https://api.example.org/v3/users/test-user-id" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/test-organization-id" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/POST_request.json new file mode 100644 index 00000000000..1a929d7bd2b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/POST_request.json @@ -0,0 +1,15 @@ +{ + "type": "organization_auditor", + "relationships": { + "user": { + "data": { + "guid": "test-user-id" + } + }, + "organization": { + "data": { + "guid": "test-organization-id" + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/POST_response.json new file mode 100644 index 00000000000..28b567ff811 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/roles/POST_response.json @@ -0,0 +1,32 @@ +{ + "guid": "40557c70-d1bd-4976-a2ab-a85f5e882418", + "created_at": "2019-10-10T17:19:12Z", + "updated_at": "2019-10-10T17:19:12Z", + "type": "organization_auditor", + "relationships": { + "user": { + "data": { + "guid": "test-user-id" + } + }, + "organization": { + "data": { + "guid": "test-organization-id" + } + }, + "space": { + "data": null + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/roles/40557c70-d1bd-4976-a2ab-a85f5e882418" + }, + "user": { + "href": "https://api.example.org/v3/users/test-user-id" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/test-organization-id" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_response.json new file mode 100644 index 00000000000..e3c5d46e8d5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_response.json @@ -0,0 +1,56 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/routes?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/routes?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/routes?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "cbad697f-cac1-48f4-9017-ac08f39dfb31", + "host": "test-hostname", + "path": "/some_path", + "url": "test-hostname.a-domain.com/some_path", + "created_at": "2019-11-01T17:17:48Z", + "updated_at": "2019-11-01T17:17:48Z", + "metadata": { + "labels": { "test-label": "test-label-value" }, + "annotations": { "note": "detailed information"} + }, + "relationships": { + "space": { + "data": { + "guid": "space-guid" + } + }, + "domain": { + "data": { + "guid": "domain-guid" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + }, + "space": { + "href": "https://api.example.org/v3/spaces/space-guid" + }, + "domain": { + "href": "https://api.example.org/v3/domains/domain-guid" + }, + "destinations": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_{id}_destinations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_{id}_destinations_response.json new file mode 100644 index 00000000000..c210923588c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_{id}_destinations_response.json @@ -0,0 +1,34 @@ +{ + "destinations": [ + { + "guid": "89323d4e-2e84-43e7-83e9-adbf50a20c0e", + "app": { + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "process": { + "type": "web" + } + }, + "weight": null, + "port": 8080 + }, + { + "guid": "fbef10a2-8ee7-11e9-aa2d-abeeaf7b83c5", + "app": { + "guid": "01856e12-8ee8-11e9-98a5-bb397dbc818f", + "process": { + "type": "api" + } + }, + "weight": null, + "port": 9000 + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + }, + "route": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_{id}_response.json new file mode 100644 index 00000000000..43c5efa4c04 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/GET_{id}_response.json @@ -0,0 +1,38 @@ +{ + "guid": "cbad697f-cac1-48f4-9017-ac08f39dfb31", + "host": "test-host", + "path": "/some_path", + "url": "test-host.a-domain.com/some_path", + "created_at": "2019-11-01T17:17:48Z", + "updated_at": "2019-11-01T17:17:48Z", + "metadata": { + "labels": { }, + "annotations": { } + }, + "relationships": { + "space": { + "data": { + "guid": "test-space-id" + } + }, + "domain": { + "data": { + "guid": "test-domain-id" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + }, + "space": { + "href": "https://api.example.org/v3/spaces/test-space-id" + }, + "domain": { + "href": "https://api.example.org/v3/domains/test-domain-id" + }, + "destinations": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_destinations_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_destinations_request.json new file mode 100644 index 00000000000..3325124fd69 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_destinations_request.json @@ -0,0 +1,20 @@ +{ + "destinations": [ + { + "app": { + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446" + }, + "weight": 61 + }, + { + "app": { + "guid": "01856e12-8ee8-11e9-98a5-bb397dbc818f", + "process": { + "type": "api" + } + }, + "weight": 39, + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_destinations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_destinations_response.json new file mode 100644 index 00000000000..e6d03af40c2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_destinations_response.json @@ -0,0 +1,34 @@ +{ + "destinations": [ + { + "guid": "89323d4e-2e84-43e7-83e9-adbf50a20c0e", + "app": { + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "process": { + "type": "web" + } + }, + "weight": 61, + "port": 8080 + }, + { + "guid": "fbef10a2-8ee7-11e9-aa2d-abeeaf7b83c5", + "app": { + "guid": "01856e12-8ee8-11e9-98a5-bb397dbc818f", + "process": { + "type": "api" + } + }, + "weight": 39, + "port": 9000 + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + }, + "route": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_request.json new file mode 100644 index 00000000000..3a2f7fcc8c7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_request.json @@ -0,0 +1,6 @@ +{ + "metadata": { + "labels": {"key": "value"}, + "annotations": {"note": "detailed information"} + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_response.json new file mode 100644 index 00000000000..9a567239d1e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/PATCH_{id}_response.json @@ -0,0 +1,38 @@ +{ + "guid": "cbad697f-cac1-48f4-9017-ac08f39dfb31", + "host": "test-hostname", + "path": "/some_path", + "url": "test-hostname.a-domain.com/some_path", + "created_at": "2019-11-01T17:17:48Z", + "updated_at": "2019-11-01T17:17:48Z", + "metadata": { + "labels": {"key": "value"}, + "annotations": {"note": "detailed information"} + }, + "relationships": { + "space": { + "data": { + "guid": "space-guid" + } + }, + "domain": { + "data": { + "guid": "domain-guid" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + }, + "space": { + "href": "https://api.example.org/v3/spaces/space-guid" + }, + "domain": { + "href": "https://api.example.org/v3/domains/domain-guid" + }, + "destinations": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_request.json new file mode 100644 index 00000000000..8f7cdc42363 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_request.json @@ -0,0 +1,16 @@ +{ + "host": "test-hostname", + "path": "/some_path", + "relationships": { + "domain": { + "data": { "guid": "domain-guid" } + }, + "space": { + "data": { "guid": "space-guid" } + } + }, + "metadata": { + "labels": { "test-label": "test-label-value" }, + "annotations": { "note": "detailed information"} + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_response.json new file mode 100644 index 00000000000..c0f79a3db77 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_response.json @@ -0,0 +1,38 @@ +{ + "guid": "cbad697f-cac1-48f4-9017-ac08f39dfb31", + "host": "test-hostname", + "path": "/some_path", + "url": "test-hostname.a-domain.com/some_path", + "created_at": "2019-11-01T17:17:48Z", + "updated_at": "2019-11-01T17:17:48Z", + "metadata": { + "labels": { "test-label": "test-label-value" }, + "annotations": { "note": "detailed information"} + }, + "relationships": { + "space": { + "data": { + "guid": "space-guid" + } + }, + "domain": { + "data": { + "guid": "domain-guid" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + }, + "space": { + "href": "https://api.example.org/v3/spaces/space-guid" + }, + "domain": { + "href": "https://api.example.org/v3/domains/domain-guid" + }, + "destinations": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_{id}_destinations_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_{id}_destinations_request.json new file mode 100644 index 00000000000..bbcf025e0d1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_{id}_destinations_request.json @@ -0,0 +1,18 @@ +{ + "destinations": [ + { + "app": { + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446" + } + }, + { + "app": { + "guid": "01856e12-8ee8-11e9-98a5-bb397dbc818f", + "process": { + "type": "api" + } + }, + "port": 9000 + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_{id}_destinations_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_{id}_destinations_response.json new file mode 100644 index 00000000000..c210923588c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/routes/POST_{id}_destinations_response.json @@ -0,0 +1,34 @@ +{ + "destinations": [ + { + "guid": "89323d4e-2e84-43e7-83e9-adbf50a20c0e", + "app": { + "guid": "1cb006ee-fb05-47e1-b541-c34179ddc446", + "process": { + "type": "web" + } + }, + "weight": null, + "port": 8080 + }, + { + "guid": "fbef10a2-8ee7-11e9-aa2d-abeeaf7b83c5", + "app": { + "guid": "01856e12-8ee8-11e9-98a5-bb397dbc818f", + "process": { + "type": "api" + } + }, + "weight": null, + "port": 9000 + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31/destinations" + }, + "route": { + "href": "https://api.example.org/v3/routes/cbad697f-cac1-48f4-9017-ac08f39dfb31" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_response.json new file mode 100644 index 00000000000..9e39d26c2a1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_response.json @@ -0,0 +1,84 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/security_groups?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/security_groups?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "b85a788e-671f-4549-814d-e34cdb2f539a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group0", + "globally_enabled": { + "running": true, + "staging": false + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ], + "relationships": { + "staging_spaces": { + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a" + } + } + }, + { + "guid": "a89a788e-671f-4549-814d-e34c1b2f533a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group1", + "globally_enabled": { + "running": true, + "staging": true + }, + "rules": [], + "relationships": { + "staging_spaces": { + "data": [] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/a89a788e-671f-4549-814d-e34c1b2f533a" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_running_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_running_{id}_response.json new file mode 100644 index 00000000000..c02b6b95267 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_running_{id}_response.json @@ -0,0 +1,84 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/running_security_groups?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/running_security_groups?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "b85a788e-671f-4549-814d-e34cdb2f539a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group0", + "globally_enabled": { + "running": true, + "staging": false + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ], + "relationships": { + "staging_spaces": { + "data": [] + }, + "running_spaces": { + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a" + } + } + }, + { + "guid": "a89a788e-671f-4549-814d-e34c1b2f533a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group1", + "globally_enabled": { + "running": true, + "staging": true + }, + "rules": [], + "relationships": { + "staging_spaces": { + "data": [] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/a89a788e-671f-4549-814d-e34c1b2f533a" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_staging_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_staging_{id}_response.json new file mode 100644 index 00000000000..b9dede15381 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_staging_{id}_response.json @@ -0,0 +1,84 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/staging_security_groups?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/spaces/c5048979-53b9-4d2a-9fca-78e6bc07c041/staging_security_groups?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "b85a788e-671f-4549-814d-e34cdb2f539a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group0", + "globally_enabled": { + "running": false, + "staging": true + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ], + "relationships": { + "staging_spaces": { + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a" + } + } + }, + { + "guid": "a89a788e-671f-4549-814d-e34c1b2f533a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group1", + "globally_enabled": { + "running": true, + "staging": true + }, + "rules": [], + "relationships": { + "staging_spaces": { + "data": [] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/a89a788e-671f-4549-814d-e34c1b2f533a" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_{id}_response.json new file mode 100644 index 00000000000..5c1290a8e35 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/GET_{id}_response.json @@ -0,0 +1,44 @@ +{ + "guid": "b85a788e-671f-4549-814d-e34cdb2f539a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group0", + "globally_enabled": { + "running": true, + "staging": false + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ], + "relationships": { + "staging_spaces": { + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/PATCH_{id}_request.json new file mode 100644 index 00000000000..7b146d9a9b5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/PATCH_{id}_request.json @@ -0,0 +1,20 @@ +{ + "name": "my-group0", + "globally_enabled": { + "running": true + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/PATCH_{id}_response.json new file mode 100644 index 00000000000..5c1290a8e35 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/PATCH_{id}_response.json @@ -0,0 +1,44 @@ +{ + "guid": "b85a788e-671f-4549-814d-e34cdb2f539a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group0", + "globally_enabled": { + "running": true, + "staging": false + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ], + "relationships": { + "staging_spaces": { + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/POST_request.json new file mode 100644 index 00000000000..35e74431db8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/POST_request.json @@ -0,0 +1,17 @@ +{ + "name": "my-group0", + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/POST_response.json new file mode 100644 index 00000000000..5c1290a8e35 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/POST_response.json @@ -0,0 +1,44 @@ +{ + "guid": "b85a788e-671f-4549-814d-e34cdb2f539a", + "created_at": "2020-02-20T17:42:08Z", + "updated_at": "2020-02-20T17:42:08Z", + "name": "my-group0", + "globally_enabled": { + "running": true, + "staging": false + }, + "rules": [ + { + "protocol": "tcp", + "destination": "10.10.10.0/24", + "ports": "443,80,8080" + }, + { + "protocol": "icmp", + "destination": "10.10.10.0/24", + "type": 8, + "code": 0, + "description": "Allow ping requests to private services" + } + ], + "relationships": { + "staging_spaces": { + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] + }, + "running_spaces": { + "data": [] + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_running/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_running/POST_request.json new file mode 100644 index 00000000000..eaa31060cad --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_running/POST_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "space-guid1" + }, + { + "guid": "space-guid2" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_running/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_running/POST_response.json new file mode 100644 index 00000000000..35ce11babff --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_running/POST_response.json @@ -0,0 +1,18 @@ +{ + "data": [ + { + "guid": "space-guid1" + }, + { + "guid": "space-guid2" + }, + { + "guid": "previous-space-guid" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/running_spaces" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_staging/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_staging/POST_request.json new file mode 100644 index 00000000000..eaa31060cad --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_staging/POST_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "space-guid1" + }, + { + "guid": "space-guid2" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_staging/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_staging/POST_response.json new file mode 100644 index 00000000000..06b4b5914d5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/security_groups/bind_staging/POST_response.json @@ -0,0 +1,18 @@ +{ + "data": [ + { + "guid": "space-guid1" + }, + { + "guid": "space-guid2" + }, + { + "guid": "previous-space-guid" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/security_groups/b85a788e-671f-4549-814d-e34cdb2f539a/relationships/staging_spaces" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/GET_response.json new file mode 100644 index 00000000000..32eb030fe63 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/GET_response.json @@ -0,0 +1,67 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/service_brokers?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/service_brokers?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/service_brokers?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "dde5ad2a-d8f4-44dc-a56f-0452d744f1c3", + "name": "my_service_broker", + "url": "https://example.service-broker.com", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "relationships": {} , + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_brokers/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "service_offerings": { + "href": "https://api.example.org/v3/service_offerings?service_broker_guids=dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + } + } + }, + { + "guid": "7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62", + "name": "another_service_broker", + "url": "https://another-example.service-broker.com", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_brokers/7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62" + }, + "service_offerings": { + "href": "https://api.example.org/v3/service_offerings?service_broker_guids=7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/GET_{id}_response.json new file mode 100644 index 00000000000..5fcf2cfe806 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/GET_{id}_response.json @@ -0,0 +1,31 @@ +{ + "guid": "dde5ad2a-d8f4-44dc-a56f-0452d744f1c3", + "name": "my_service_broker", + "url": "https://example.service-broker.com", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "type": "dev" + }, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_brokers/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "service_offerings": { + "href": "https://api.example.org/v3/service_offerings?service_broker_guids=dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_metadata_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_metadata_request.json new file mode 100644 index 00000000000..4f439d3d4db --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_metadata_request.json @@ -0,0 +1,6 @@ +{ + "metadata": { + "labels": {"type": "dev"}, + "annotations": {} + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_metadata_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_metadata_response.json new file mode 100644 index 00000000000..517567ccf87 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_metadata_response.json @@ -0,0 +1,31 @@ +{ + "guid": "dde5ad2a-d8f4-44dc-a56f-0452d744f1c3", + "name": "my_service_broker", + "url": "https://example.service-broker.com", + "created_at": "2015-11-13T17:02:56Z", + "updated_at": "2016-06-08T16:41:26Z", + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + }, + "metadata": { + "labels": { + "type": "dev" + }, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_brokers/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "service_offerings": { + "href": "https://api.example.org/v3/service_offerings?service_broker_guids=dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "space": { + "href": "https://api.example.org/v3/spaces/2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_request.json new file mode 100644 index 00000000000..c68ed082961 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/PATCH_{id}_request.json @@ -0,0 +1,15 @@ +{ + "name": "my_service_broker", + "url": "https://example.service-broker.com", + "authentication": { + "type": "basic", + "credentials": { + "username": "us3rn4me", + "password": "p4ssw0rd" + } + }, + "metadata": { + "labels": {"key": "value"}, + "annotations": {"note": "detailed information"} + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/POST_request.json new file mode 100644 index 00000000000..9c3b6875ceb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_brokers/POST_request.json @@ -0,0 +1,18 @@ +{ + "name": "my_service_broker", + "url": "https://example.service-broker.com", + "authentication": { + "type": "basic", + "credentials": { + "username": "us3rn4me", + "password": "p4ssw0rd" + } + }, + "relationships": { + "space": { + "data": { + "guid": "2f35885d-0c9d-4423-83ad-fd05066f8576" + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/GET_response.json new file mode 100644 index 00000000000..12dcf119e2e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/GET_response.json @@ -0,0 +1,145 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/service_plans?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/service_plans?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/service_plans?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "bf7eb420-11e5-11ea-b7db-4b5d5e7976a9", + "name": "my_big_service_plan", + "description": "Big plan", + "visibility_type": "organization", + "available": true, + "free": false, + "costs": [ + { + "currency": "USD", + "amount": 199.99, + "unit": "Monthly" + } + ], + "created_at": "2019-11-28T13:44:02Z", + "updated_at": "2019-11-28T13:44:02Z", + "maintenance_info": { + "version": "1.0.0+dev4", + "description": "Database version 7.8.0" + }, + "broker_catalog": { + "id": "db730a8c-11e5-11ea-838a-0f4fff3b1cfb", + "metadata": { + "custom-key": "custom-value" + }, + "maximum_polling_duration": null, + "features": { + "plan_updateable": true, + "bindable": true + } + }, + "schemas": { + "service_instance": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + }, + "update": {} + }, + "service_binding": { + "create": {} + } + }, + "relationships": { + "service_offering": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9" + }, + "service_offering": { + "href": "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + }, + "visibility": { + "href": "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility" + } + } + }, + { + "guid": "20e6cd62-12bb-11ea-90d1-7bfec2c75bcd", + "name": "other_service_plan", + "description": "Provides another service plan", + "visibility_type": "admin", + "available": true, + "free": true, + "created_at": "2019-11-29T16:44:02Z", + "updated_at": "2019-11-29T16:44:02Z", + "maintenance_info": {}, + "broker_catalog": { + "id": "3cb11822-12bb-11ea-beb1-a350dc7453b9", + "metadata": { + "other-data": true + }, + "maximum_polling_duration": null, + "features": { + "plan_updateable": true, + "bindable": true + } + }, + "schemas": { + "service_instance": { + "create": {}, + "update": {} + }, + "service_binding": { + "create": {} + } + }, + "relationships": { + "service_offering": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_plans/20e6cd62-12bb-11ea-90d1-7bfec2c75bcd" + }, + "service_offering": { + "href": "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + }, + "visibility": { + "href": "https://api.example.org/v3/service_plans/20e6cd62-12bb-11ea-90d1-7bfec2c75bcd/visibility" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/GET_{id}_response.json new file mode 100644 index 00000000000..8a2948677d6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/GET_{id}_response.json @@ -0,0 +1,74 @@ +{ + "guid": "bf7eb420-11e5-11ea-b7db-4b5d5e7976a9", + "name": "my_big_service_plan", + "description": "Big", + "visibility_type": "public", + "available": true, + "free": false, + "costs": [ + { + "currency": "USD", + "amount": 199.99, + "unit": "Monthly" + } + ], + "created_at": "2019-11-28T13:44:02Z", + "updated_at": "2019-11-28T13:44:02Z", + "maintenance_info": { + "version": "1.0.0+dev4", + "description": "Database version 7.8.0" + }, + "broker_catalog": { + "id": "db730a8c-11e5-11ea-838a-0f4fff3b1cfb", + "metadata": { + "custom-key": "custom-information" + }, + "maximum_polling_duration": null, + "features": { + "plan_updateable": true, + "bindable": true + } + }, + "schemas": { + "service_instance": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + }, + "update": {} + }, + "service_binding": { + "create": {} + } + }, + "relationships": { + "service_offering": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9" + }, + "service_offering": { + "href": "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + }, + "visibility": { + "href": "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/PATCH_{id}_request.json new file mode 100644 index 00000000000..d2d6d044047 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/PATCH_{id}_request.json @@ -0,0 +1,10 @@ +{ + "metadata": { + "labels": { + "key": "value" + }, + "annotations": { + "note": "detailed information" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/PATCH_{id}_response.json new file mode 100644 index 00000000000..c77bbde7d00 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/PATCH_{id}_response.json @@ -0,0 +1,74 @@ +{ + "guid": "bf7eb420-11e5-11ea-b7db-4b5d5e7976a9", + "name": "my_big_service_plan", + "description": "Big", + "visibility_type": "public", + "available": true, + "free": false, + "costs": [ + { + "currency": "USD", + "amount": 199.99, + "unit": "Monthly" + } + ], + "created_at": "2019-11-28T13:44:02Z", + "updated_at": "2019-11-28T13:44:02Z", + "maintenance_info": { + "version": "1.0.0+dev4", + "description": "Database version 7.8.0" + }, + "broker_catalog": { + "id": "db730a8c-11e5-11ea-838a-0f4fff3b1cfb", + "metadata": { + "custom-key": "custom-information" + }, + "maximum_polling_duration": null, + "features": { + "plan_updateable": true, + "bindable": true + } + }, + "schemas": { + "service_instance": { + "create": { + "parameters": { + "$schema": "http://json-schema.org/draft-04/schema#", + "type": "object", + "properties": { + "billing-account": { + "description": "Billing account number used to charge use of shared fake server.", + "type": "string" + } + } + } + }, + "update": {} + }, + "service_binding": { + "create": {} + } + }, + "relationships": { + "service_offering": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9" + }, + "service_offering": { + "href": "https://api.example.org/v3/service_offerings/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + }, + "visibility": { + "href": "https://api.example.org/v3/service_plans/bf7eb420-11e5-11ea-b7db-4b5d5e7976a9/visibility" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/POST_{id}_request_update_plan.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/POST_{id}_request_update_plan.json new file mode 100644 index 00000000000..ff0f20ffb22 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/POST_{id}_request_update_plan.json @@ -0,0 +1,8 @@ +{ + "type": "organization", + "organizations": [ + { + "guid": "0fc1ad4f-e1d7-4436-8e23-6b20f03c6482" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/POST_{id}_response_update_plan.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/POST_{id}_response_update_plan.json new file mode 100644 index 00000000000..75268df51df --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/service_plans/POST_{id}_response_update_plan.json @@ -0,0 +1,9 @@ +{ + "type": "organization", + "organizations": [ + { + "guid": "0fc1ad4f-e1d7-4436-8e23-6b20f03c6482", + "name": "other_org" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/GET_response.json new file mode 100644 index 00000000000..f3c7b24e152 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/GET_response.json @@ -0,0 +1,75 @@ +{ + "pagination": { + "total_results": 3, + "first": { + "href": "/v3/service_credential_bindings?page=1&per_page=2" + }, + "last": { + "href": "/v3/service_credential_bindings?page=2&per_page=2" + }, + "next": { + "href": "/v3/service_credential_bindings?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "dde5ad2a-d8f4-44dc-a56f-0452d744f1c3", + "type": "app", + "relationships": { + "app": { + "data": { + "guid": "74f7c078-0934-470f-9883-4fddss5b8f13" + } + }, + "service_instance": { + "data": { + "guid": "8bfe4c1b-9e18-45b1-83be-124163f31f9e" + } + } + }, + "created_at": "2015-11-13T17:02:56Z", + "updated_at": null, + "links": { + "self": { + "href": "/v3/service_credential_bindings/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "service_instance": { + "href": "/v3/service_instances/8bfe4c1b-9e18-45b1-83be-124163f31f9e" + }, + "app": { + "href": "/v3/apps/74f7c078-0934-470f-9883-4fddss5b8f13" + } + } + }, + { + "guid": "7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62", + "type": "app", + "relationships": { + "app": { + "data": { + "guid": "74f7c078-0934-470f-9883-4fddss5b8f13" + } + }, + "service_instance": { + "data": { + "guid": "8bf356j3-9e18-45b1-3333-124163f31f9e" + } + } + }, + "created_at": "2015-11-13T17:02:56Z", + "updated_at": null, + "links": { + "self": { + "href": "/v3/service_credential_bindings/7aa37bad-6ccb-4ef9-ba48-9ce3a91b2b62" + }, + "service_instance": { + "href": "/v3/service_instances/8bf356j3-9e18-45b1-3333-124163f31f9e" + }, + "app": { + "href": "/v3/apps/74f7c078-0934-470f-9883-4fddss5b8f13" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/GET_{id}_response.json new file mode 100644 index 00000000000..790344cbaf6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/GET_{id}_response.json @@ -0,0 +1,29 @@ +{ + "guid": "dde5ad2a-d8f4-44dc-a56f-0452d744f1c3", + "type": "app", + "relationships": { + "app": { + "data": { + "guid": "74f7c078-0934-470f-9883-4fddss5b8f13" + } + }, + "service_instance": { + "data": { + "guid": "8bfe4c1b-9e18-45b1-83be-124163f31f9e" + } + } + }, + "created_at": "2015-11-13T17:02:56Z", + "updated_at": null, + "links": { + "self": { + "href": "/v3/service_credential_bindings/dde5ad2a-d8f4-44dc-a56f-0452d744f1c3" + }, + "service_instance": { + "href": "/v3/service_instances/8bfe4c1b-9e18-45b1-83be-124163f31f9e" + }, + "app": { + "href": "/v3/apps/74f7c078-0934-470f-9883-4fddss5b8f13" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/POST_request.json new file mode 100644 index 00000000000..ebb8b0febd3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/servicebindings/POST_request.json @@ -0,0 +1,15 @@ +{ + "type": "app", + "relationships": { + "app": { + "data": { + "guid": "74f7c078-0934-470f-9883-4fddss5b8f13" + } + }, + "service_instance": { + "data": { + "guid": "8bfe4c1b-9e18-45b1-83be-124163f31f9e" + } + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_response.json new file mode 100644 index 00000000000..a18550a0f7b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_response.json @@ -0,0 +1,71 @@ +{ + "pagination": { + "total_results": 3, + "first": { + "href": "/v3/service_instances?page=1&per_page=2" + }, + "last": { + "href": "/v3/service_instances?page=2&per_page=2" + }, + "next": { + "href": "/v3/service_instances?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "85ccdcad-d725-4109-bca4-fd6ba062b5c8", + "created_at": "2017-11-17T13:54:21Z", + "updated_at": null, + "name": "my_service_instance1", + "relationships": { + "space": { + "data": { + "guid": "ae0031f9-dd49-461c-a945-df40e77c39cb" + } + } + }, + "links": { + "space": { + "href": "/v3/spaces/ae0031f9-dd49-461c-a945-df40e77c39cb" + } + } + }, + { + "guid": "85ccdcad-d725-4109-bca4-fd6ba062b5c7", + "created_at": "2017-11-17T13:54:21Z", + "updated_at": null, + "name": "my_service_instance2", + "relationships": { + "space": { + "data": { + "guid": "ae0031f9-dd49-461c-a945-df40e77c39ce" + } + } + }, + "links": { + "space": { + "href": "/v3/spaces/ae0031f9-dd49-461c-a945-df40e77c39ce" + } + } + }, + { + "guid": "85ccdcad-d725-4109-bca4-fd6ba062b5c6", + "created_at": "2017-11-17T13:54:21Z", + "updated_at": null, + "name": "my_service_instance3", + "relationships": { + "space": { + "data": { + "guid": "ae0031f9-dd49-461c-a945-df40e77c39cf" + } + } + }, + "links": { + "space": { + "href": "/v3/spaces/ae0031f9-dd49-461c-a945-df40e77c39cf" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_credentials.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_credentials.json new file mode 100644 index 00000000000..9b04fa31f1c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_credentials.json @@ -0,0 +1,5 @@ +{ + "username": "my-username", + "password": "super-secret", + "other": "credential" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_parameters.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_parameters.json new file mode 100644 index 00000000000..189347197c3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_parameters.json @@ -0,0 +1,4 @@ +{ + "key_1": "value_1", + "key_2": "value_2" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_relationships_spaces_shared_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_relationships_spaces_shared_response.json new file mode 100644 index 00000000000..97dd62a23b4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_relationships_spaces_shared_response.json @@ -0,0 +1,15 @@ +{ + "data": [ + { + "guid": "68d54d31-9b3a-463b-ba94-e8e4c32edbac" + }, + { + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c" + } + ], + "links": { + "self": { + "href": "/v3/service_instances/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/shared_spaces" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_response.json new file mode 100644 index 00000000000..ee1df48b448 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/GET_{id}_response.json @@ -0,0 +1,55 @@ +{ + "guid": "c89b3280-fe8d-4aa0-a42e-44465bb1c61c", + "created_at": "2020-03-10T15:49:29Z", + "updated_at": "2020-03-10T15:49:29Z", + "name": "my-managed-instance", + "tags": ["foo", "bar"], + "type": "managed", + "maintenance_info": { + "version": "1.0.0" + }, + "upgrade_available": false, + "dashboard_url": "https://service-broker.example.org/dashboard", + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "Operation succeeded", + "updated_at": "2020-03-10T15:49:32Z", + "created_at": "2020-03-10T15:49:29Z" + }, + "relationships": { + "service_plan": { + "data": { + "guid": "5358d122-638e-11ea-afca-bf6e756684ac" + } + }, + "space": { + "data": { + "guid": "5a84d315-9513-4d74-95e5-f6a5501eeef7" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c" + }, + "service_plan": { + "href": "https://api.example.org/v3/service_plans/5358d122-638e-11ea-afca-bf6e756684ac" + }, + "space": { + "href": "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7" + }, + "parameters": { + "href": "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/parameters" + }, + "shared_spaces": { + "href": "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/relationships/shared_spaces" + }, + "service_credential_bindings": { + "href": "https://api.example.org/v3/service_credential_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c" + }, + "service_route_bindings": { + "href": "https://api.example.org/v3/service_route_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_request_update_managed_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_request_update_managed_service_instance.json new file mode 100644 index 00000000000..72d958985f9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_request_update_managed_service_instance.json @@ -0,0 +1,26 @@ +{ + "name": "my_service_instance", + "parameters": { + "foo": "bar", + "baz": "qux" + }, + "tags": ["foo", "bar", "baz"], + "relationships": { + "service_plan": { + "data": { + "guid": "f2b6ba9c-a4d2-11ea-8ae6-48bf6bec2d78" + } + } + }, + "maintenance_info": { + "version": "1.0.0" + }, + "metadata": { + "annotations": { + "note": "detailed information" + }, + "labels": { + "key": "value" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_request_update_user_provided_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_request_update_user_provided_service_instance.json new file mode 100644 index 00000000000..e0db3ef9ee5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_request_update_user_provided_service_instance.json @@ -0,0 +1,18 @@ +{ + "name": "my-user-provided-instance", + "credentials": { + "foo": "bar", + "baz": "qux" + }, + "tags": ["foo", "bar", "baz"], + "syslog_drain_url": "https://syslog.com/drain", + "route_service_url": "https://route.com/service", + "metadata": { + "annotations": { + "foo": "bar" + }, + "labels": { + "baz": "qux" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_response_update_managed_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_response_update_managed_service_instance.json new file mode 100644 index 00000000000..509f05864dd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_response_update_managed_service_instance.json @@ -0,0 +1,59 @@ +{ + "guid": "c89b3280-fe8d-4aa0-a42e-44465bb1c61c", + "created_at": "2020-03-10T15:49:29Z", + "updated_at": "2020-03-10T15:49:29Z", + "name": "my_service_instance", + "tags": ["foo", "bar", "baz"], + "type": "managed", + "maintenance_info": { + "version": "1.0.0" + }, + "upgrade_available": false, + "dashboard_url": "https://service-broker.example.org/dashboard", + "last_operation": { + "type": "update", + "state": "succeeded", + "description": "Operation succeeded", + "updated_at": "2020-03-10T15:49:32Z", + "created_at": "2020-03-10T15:49:29Z" + }, + "relationships": { + "service_plan": { + "data": { + "guid": "5358d122-638e-11ea-afca-bf6e756684ac" + } + }, + "space": { + "data": { + "guid": "5a84d315-9513-4d74-95e5-f6a5501eeef7" + } + } + }, + "metadata": { + "labels": {"key": "value"}, + "annotations": {"note": "detailed information"} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c" + }, + "service_plan": { + "href": "https://api.example.org/v3/service_plans/5358d122-638e-11ea-afca-bf6e756684ac" + }, + "space": { + "href": "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7" + }, + "parameters": { + "href": "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/parameters" + }, + "shared_spaces": { + "href": "https://api.example.org/v3/service_instances/c89b3280-fe8d-4aa0-a42e-44465bb1c61c/relationships/shared_spaces" + }, + "service_credential_bindings": { + "href": "https://api.example.org/v3/service_credential_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c" + }, + "service_route_bindings": { + "href": "https://api.example.org/v3/service_route_bindings?service_instance_guids=c89b3280-fe8d-4aa0-a42e-44465bb1c61c" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_response_update_user_provided_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_response_update_user_provided_service_instance.json new file mode 100644 index 00000000000..470ef303c41 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/PATCH_response_update_user_provided_service_instance.json @@ -0,0 +1,45 @@ +{ + "guid": "88ce23e5-27c3-4381-a2df-32a28ec43133", + "created_at": "2020-03-10T15:56:08Z", + "updated_at": "2020-03-10T15:56:08Z", + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "Operation succeeded", + "updated_at": "2020-03-10T15:49:32Z", + "created_at": "2020-03-10T15:49:29Z" + }, + "name": "my-user-provided-instance", + "tags": ["foo", "bar", "baz"], + "type": "user-provided", + "syslog_drain_url": "https://syslog.com/drain", + "route_service_url": "https://route.com/service", + "relationships": { + "space": { + "data": { + "guid": "5a84d315-9513-4d74-95e5-f6a5501eeef7" + } + } + }, + "metadata": { + "labels": {"baz": "qux"}, + "annotations": {"foo": "bar"} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133" + }, + "space": { + "href": "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7" + }, + "credentials": { + "href": "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133/credentials" + }, + "service_credential_bindings": { + "href": "https://api.example.org/v3/service_credential_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133" + }, + "service_route_bindings": { + "href": "https://api.example.org/v3/service_route_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request.json new file mode 100644 index 00000000000..e7e784b5e2d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request.json @@ -0,0 +1,10 @@ +{ + "data": [ + { + "guid": "space-guid-1" + }, + { + "guid": "space-guid-2" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request_create_managed_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request_create_managed_service_instance.json new file mode 100644 index 00000000000..4c5b632e6bc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request_create_managed_service_instance.json @@ -0,0 +1,33 @@ +{ + "type": "managed", + "name": "my_service_instance", + "parameters": { + "foo": "bar", + "baz": "qux" + }, + "tags": [ + "foo", + "bar", + "baz" + ], + "metadata": { + "annotations": { + "foo": "bar" + }, + "labels": { + "baz": "qux" + } + }, + "relationships": { + "space": { + "data": { + "guid": "7304bc3c-7010-11ea-8840-48bf6bec2d78" + } + }, + "service_plan": { + "data": { + "guid": "e0e4417c-74ee-11ea-a604-48bf6bec2d78" + } + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request_create_user_provided_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request_create_user_provided_service_instance.json new file mode 100644 index 00000000000..292d40ea3d2 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_request_create_user_provided_service_instance.json @@ -0,0 +1,26 @@ +{ + "type": "user-provided", + "name": "my-user-provided-instance", + "credentials": { + "foo": "bar", + "baz": "qux" + }, + "tags": ["sql"], + "syslog_drain_url": "https://syslog.com/drain", + "route_service_url": "https://route.com/service", + "metadata": { + "annotations": { + "foo": "bar" + }, + "labels": { + "baz": "qux" + } + }, + "relationships": { + "space": { + "data": { + "guid": "7304bc3c-7010-11ea-8840-48bf6bec2d78" + } + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_response.json new file mode 100644 index 00000000000..a854f52ec5b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_response.json @@ -0,0 +1,15 @@ +{ + "data": [ + { + "guid": "68d54d31-9b3a-463b-ba94-e8e4c32edbac" + }, + { + "guid": "b19f6525-cbd3-4155-b156-dc0c2a431b4c" + } + ], + "links": { + "self": { + "href": "https://api.example.org/v3/service_instances/bdeg4371-cbd3-4155-b156-dc0c2a431b4c/relationships/shared_spaces" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_response_create_user_provided_service_instance.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_response_create_user_provided_service_instance.json new file mode 100644 index 00000000000..b35107b1b7e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceinstances/POST_response_create_user_provided_service_instance.json @@ -0,0 +1,45 @@ +{ + "guid": "88ce23e5-27c3-4381-a2df-32a28ec43133", + "created_at": "2020-03-10T15:56:08Z", + "updated_at": "2020-03-10T15:56:08Z", + "last_operation": { + "type": "create", + "state": "succeeded", + "description": "Operation succeeded", + "updated_at": "2020-03-10T15:49:32Z", + "created_at": "2020-03-10T15:49:29Z" + }, + "name": "my-user-provided-instance", + "tags": ["sql"], + "type": "user-provided", + "syslog_drain_url": "https://syslog.com/drain", + "route_service_url": "https://route.com/service", + "relationships": { + "space": { + "data": { + "guid": "7304bc3c-7010-11ea-8840-48bf6bec2d78" + } + } + }, + "metadata": { + "labels": {"baz": "qux"}, + "annotations": {"foo": "bar"} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133" + }, + "space": { + "href": "https://api.example.org/v3/spaces/5a84d315-9513-4d74-95e5-f6a5501eeef7" + }, + "credentials": { + "href": "https://api.example.org/v3/service_instances/88ce23e5-27c3-4381-a2df-32a28ec43133/credentials" + }, + "service_credential_bindings": { + "href": "https://api.example.org/v3/service_credential_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133" + }, + "service_route_bindings": { + "href": "https://api.example.org/v3/service_route_bindings?service_instance_guids=88ce23e5-27c3-4381-a2df-32a28ec43133" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/GET_response.json new file mode 100644 index 00000000000..8182fb95896 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/GET_response.json @@ -0,0 +1,117 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/service_offerings?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/service_offerings?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/service_offerings?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "bf7eb420-11e5-11ea-b7db-4b5d5e7976a9", + "name": "my_service_offering", + "description": "Provides my service", + "available": true, + "tags": [ + "relational", + "caching" + ], + "requires": [], + "created_at": "2019-11-28T13:44:02Z", + "updated_at": "2019-11-28T13:44:02Z", + "shareable": true, + "documentation_url": "https://some-documentation-link.io", + "broker_catalog": { + "id": "db730a8c-11e5-11ea-838a-0f4fff3b1cfb", + "metadata": { + "shareable": true + }, + "features": { + "plan_updateable": true, + "bindable": true, + "instances_retrievable": true, + "bindings_retrievable": true, + "allow_context_updates": false + } + }, + "relationships": { + "service_broker": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_offerings/bf7eb420-11e5-11ea-b7db-4b5d5e7976a" + }, + "service_plans": { + "href": "https://api.example.org/v3/service_plans?service_offering_guids=bf7eb420-11e5-11ea-b7db-4b5d5e7976a" + }, + "service_broker": { + "href": "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + { + "guid": "20e6cd62-12bb-11ea-90d1-7bfec2c75bcd", + "name": "other_service_offering", + "description": "Provides another service", + "available": true, + "tags": [ + "caching" + ], + "requires": [], + "created_at": "2019-11-29T16:44:02Z", + "updated_at": "2019-11-29T16:44:02Z", + "shareable": true, + "documentation_url": "https://some-other-documentation-link.io", + "broker_catalog": { + "id": "3cb11822-12bb-11ea-beb1-a350dc7453b9", + "metadata": { + "shareable": true + }, + "features": { + "plan_updateable": true, + "bindable": true, + "instances_retrievable": true, + "bindings_retrievable": true, + "allow_context_updates": false + } + }, + "relationships": { + "service_broker": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_offerings/20e6cd62-12bb-11ea-90d1-7bfec2c75bcd" + }, + "service_plans": { + "href": "https://api.example.org/v3/service_plans?service_offering_guids=20e6cd62-12bb-11ea-90d1-7bfec2c75bcd" + }, + "service_broker": { + "href": "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/GET_{id}_response.json new file mode 100644 index 00000000000..87f695c9728 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/GET_{id}_response.json @@ -0,0 +1,50 @@ +{ + "guid": "bf7eb420-11e5-11ea-b7db-4b5d5e7976a9", + "name": "my_service_offering", + "description": "Provides my service", + "available": true, + "tags": [ + "relational", + "caching" + ], + "requires": [], + "created_at": "2019-11-28T13:44:02Z", + "updated_at": "2019-11-28T13:44:02Z", + "shareable": true, + "documentation_url": "https://some-documentation-link.io", + "broker_catalog": { + "id": "db730a8c-11e5-11ea-838a-0f4fff3b1cfb", + "metadata": { + "shareable": true + }, + "features": { + "plan_updateable": true, + "bindable": true, + "instances_retrievable": true, + "bindings_retrievable": true, + "allow_context_updates": false + } + }, + "relationships": { + "service_broker": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_offerings/bf7eb420-11e5-11ea-b7db-4b5d5e7976a" + }, + "service_plans": { + "href": "https://api.example.org/v3/service_plans?service_offering_guids=bf7eb420-11e5-11ea-b7db-4b5d5e7976a" + }, + "service_broker": { + "href": "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/PATCH_{id}_request.json new file mode 100644 index 00000000000..d2d6d044047 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/PATCH_{id}_request.json @@ -0,0 +1,10 @@ +{ + "metadata": { + "labels": { + "key": "value" + }, + "annotations": { + "note": "detailed information" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/PATCH_{id}_response.json new file mode 100644 index 00000000000..87f695c9728 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/serviceofferings/PATCH_{id}_response.json @@ -0,0 +1,50 @@ +{ + "guid": "bf7eb420-11e5-11ea-b7db-4b5d5e7976a9", + "name": "my_service_offering", + "description": "Provides my service", + "available": true, + "tags": [ + "relational", + "caching" + ], + "requires": [], + "created_at": "2019-11-28T13:44:02Z", + "updated_at": "2019-11-28T13:44:02Z", + "shareable": true, + "documentation_url": "https://some-documentation-link.io", + "broker_catalog": { + "id": "db730a8c-11e5-11ea-838a-0f4fff3b1cfb", + "metadata": { + "shareable": true + }, + "features": { + "plan_updateable": true, + "bindable": true, + "instances_retrievable": true, + "bindings_retrievable": true, + "allow_context_updates": false + } + }, + "relationships": { + "service_broker": { + "data": { + "guid": "13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } + }, + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/service_offerings/bf7eb420-11e5-11ea-b7db-4b5d5e7976a" + }, + "service_plans": { + "href": "https://api.example.org/v3/service_plans?service_offering_guids=bf7eb420-11e5-11ea-b7db-4b5d5e7976a" + }, + "service_broker": { + "href": "https://api.example.org/v3/service_brokers/13c60e38-11e7-11ea-9106-33ee3c5bd4d7" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_response.json new file mode 100644 index 00000000000..1a80a6b308e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_response.json @@ -0,0 +1,38 @@ +{ + "pagination": { + "total_results": 2, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/spaces?page=1&per_page=50" + }, + "last": { + "href": "https://api.example.org/v3/spaces?page=1&per_page=50" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "space1", + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920" + } + } + }, + { + "guid": "d4c91047-7b29-4fda-b7f9-04033e5c9c9f", + "created_at": "2017-02-02T00:14:30Z", + "updated_at": "2017-02-02T00:14:30Z", + "name": "space2", + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/d4c91047-7b29-4fda-b7f9-04033e5c9c9f" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_{id}_relationships_isolation_segment_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_{id}_relationships_isolation_segment_response.json new file mode 100644 index 00000000000..b84306ca158 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_{id}_relationships_isolation_segment_response.json @@ -0,0 +1,13 @@ +{ + "data": { + "guid": "e4c91047-3b29-4fda-b7f9-04033e5a9c9f" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920/relationships/isolation_segment" + }, + "related": { + "href": "https://api.example.org/v3/isolation_segments/e4c91047-3b29-4fda-b7f9-04033e5a9c9f" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_{id}_response.json new file mode 100644 index 00000000000..83ce1b25b3a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/GET_{id}_response.json @@ -0,0 +1,15 @@ +{ + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "space1", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_request.json new file mode 100644 index 00000000000..a9a3a5aedbc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_request.json @@ -0,0 +1,5 @@ +{ + "data": { + "guid": "[iso-seg-guid]" + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_response.json new file mode 100644 index 00000000000..b84306ca158 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_relationships_isolation_segment_response.json @@ -0,0 +1,13 @@ +{ + "data": { + "guid": "e4c91047-3b29-4fda-b7f9-04033e5a9c9f" + }, + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920/relationships/isolation_segment" + }, + "related": { + "href": "https://api.example.org/v3/isolation_segments/e4c91047-3b29-4fda-b7f9-04033e5a9c9f" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_request.json new file mode 100644 index 00000000000..6b3242c3c1d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_request.json @@ -0,0 +1,11 @@ +{ + "name": "test-space-name", + "metadata": { + "labels": { + "dept": "1234" + }, + "annotations": { + "version": "1.2.4" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_response.json new file mode 100644 index 00000000000..76436e566fb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/PATCH_{id}_response.json @@ -0,0 +1,19 @@ +{ + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "metadata": { + "labels": { + "dept": "1234" + }, + "annotations": { + "version": "1.2.4" + } + }, + "name": "test-space-name", + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/POST_request.json new file mode 100644 index 00000000000..c95b412e607 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/POST_request.json @@ -0,0 +1,10 @@ +{ + "name": "my-space", + "relationships": { + "organization": { + "data": { + "guid": "e00705b9-7b42-4561-ae97-2520399d2133" + } + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/POST_response.json new file mode 100644 index 00000000000..dd5d11dbec0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/spaces/POST_response.json @@ -0,0 +1,21 @@ +{ + "guid": "885735b5-aea4-4cf5-8e44-961af0e41920", + "created_at": "2017-02-01T01:33:58Z", + "updated_at": "2017-02-01T01:33:58Z", + "name": "my-space", + "relationships": { + "organization": { + "data": { + "guid": "e00705b9-7b42-4561-ae97-2520399d2133" + } + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/spaces/885735b5-aea4-4cf5-8e44-961af0e41920" + }, + "organization": { + "href": "https://api.example.org/v3/organizations/e00705b9-7b42-4561-ae97-2520399d2133" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/GET_response.json new file mode 100644 index 00000000000..6af6e23ad17 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/GET_response.json @@ -0,0 +1,50 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/stacks?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/stacks?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/stacks?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "11c916c9-c2f9-440e-8e73-102e79c4704d", + "created_at": "2018-11-09T22:43:28Z", + "updated_at": "2018-11-09T22:43:28Z", + "name": "test-stack-name-1", + "description": "test-stack-description-1", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d" + } + } + }, + { + "guid": "81c916c9-c2f9-440e-8e73-102e79c4704h", + "created_at": "2018-11-09T22:43:29Z", + "updated_at": "2018-11-09T22:43:29Z", + "name": "test-stack-name-2", + "description": "test-stack-description-2", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/stacks/81c916c9-c2f9-440e-8e73-102e79c4704h" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/GET_{id}_response.json new file mode 100644 index 00000000000..b5d9427b9dd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/GET_{id}_response.json @@ -0,0 +1,16 @@ +{ + "guid": "11c916c9-c2f9-440e-8e73-102e79c4704d", + "created_at": "2018-11-09T22:43:28Z", + "updated_at": "2018-11-09T22:43:28Z", + "name": "test-stack-name", + "description": "test-stack-description", + "metadata": { + "labels": { }, + "annotations": { } + }, + "links": { + "self": { + "href": "https://api.example.com/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/PATCH_{id}_request.json new file mode 100644 index 00000000000..ea6fec54515 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/PATCH_{id}_request.json @@ -0,0 +1,10 @@ +{ + "metadata": { + "labels": { + "key": "value" + }, + "annotations": { + "note": "detailed information" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/PATCH_{id}_response.json new file mode 100644 index 00000000000..b76f8337027 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/PATCH_{id}_response.json @@ -0,0 +1,16 @@ +{ + "guid": "11c916c9-c2f9-440e-8e73-102e79c4704d", + "created_at": "2018-11-09T22:43:28Z", + "updated_at": "2018-11-09T22:43:28Z", + "name": "test-stack-name", + "description": "test-stack-description", + "metadata": { + "labels": { "key": "value" }, + "annotations": { "note": "detailed information" } + }, + "links": { + "self": { + "href": "https://api.example.com/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/POST_request.json new file mode 100644 index 00000000000..017000c9065 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/POST_request.json @@ -0,0 +1,4 @@ +{ + "name": "test-stack-name", + "description": "test-stack-description" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/POST_response.json new file mode 100644 index 00000000000..b5d9427b9dd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/stacks/POST_response.json @@ -0,0 +1,16 @@ +{ + "guid": "11c916c9-c2f9-440e-8e73-102e79c4704d", + "created_at": "2018-11-09T22:43:28Z", + "updated_at": "2018-11-09T22:43:28Z", + "name": "test-stack-name", + "description": "test-stack-description", + "metadata": { + "labels": { }, + "annotations": { } + }, + "links": { + "self": { + "href": "https://api.example.com/v3/stacks/11c916c9-c2f9-440e-8e73-102e79c4704d" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/GET_response.json new file mode 100644 index 00000000000..b9264641f34 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/GET_response.json @@ -0,0 +1,76 @@ +{ + "pagination": { + "total_results": 3, + "total_pages": 2, + "first": { + "href": "https://api.example.org/v3/tasks?page=1&per_page=2" + }, + "last": { + "href": "https://api.example.org/v3/tasks?page=2&per_page=2" + }, + "next": { + "href": "https://api.example.org/v3/tasks?page=2&per_page=2" + }, + "previous": null + }, + "resources": [ + { + "guid": "d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", + "sequence_id": 1, + "name": "hello", + "state": "SUCCEEDED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": null + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } + }, + { + "guid": "63b4cd89-fd8b-4bf1-a311-7174fcc907d6", + "sequence_id": 2, + "name": "migrate", + "state": "FAILED", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": "Exited with status 1" + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/63b4cd89-fd8b-4bf1-a311-7174fcc907d6/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/GET_{id}_response.json new file mode 100644 index 00000000000..667e60f098f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/GET_{id}_response.json @@ -0,0 +1,30 @@ +{ + "guid": "d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", + "sequence_id": 1, + "name": "migrate", + "command": "rake db:migrate", + "state": "RUNNING", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": null + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/POST_apps_{id}_tasks_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/POST_apps_{id}_tasks_request.json new file mode 100644 index 00000000000..05c95c8b785 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/POST_apps_{id}_tasks_request.json @@ -0,0 +1,3 @@ +{ + "command": "rake db:migrate" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/POST_apps_{id}_tasks_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/POST_apps_{id}_tasks_response.json new file mode 100644 index 00000000000..667e60f098f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/POST_apps_{id}_tasks_response.json @@ -0,0 +1,30 @@ +{ + "guid": "d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", + "sequence_id": 1, + "name": "migrate", + "command": "rake db:migrate", + "state": "RUNNING", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": null + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa/actions/cancel", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/PUT_{id}_cancel_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/PUT_{id}_cancel_response.json new file mode 100644 index 00000000000..3da65c24386 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/tasks/PUT_{id}_cancel_response.json @@ -0,0 +1,30 @@ +{ + "guid": "d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", + "sequence_id": 1, + "name": "migrate", + "command": "rake db:migrate", + "state": "CANCELING", + "memory_in_mb": 512, + "disk_in_mb": 1024, + "result": { + "failure_reason": null + }, + "droplet_guid": "740ebd2b-162b-469a-bd72-3edb96fabd9a", + "created_at": "2016-05-04T17:00:41Z", + "updated_at": "2016-05-04T17:00:42Z", + "links": { + "self": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa" + }, + "app": { + "href": "https://api.example.org/v3/apps/ccc25a0f-c8f4-4b39-9f1b-de9f328d0ee5" + }, + "cancel": { + "href": "https://api.example.org/v3/tasks/d5cc22ec-99a3-4e6a-af91-a44b4ab7b6fa", + "method": "POST" + }, + "droplet": { + "href": "https://api.example.org/v3/droplets/740ebd2b-162b-469a-bd72-3edb96fabd9a" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/GET_response.json new file mode 100644 index 00000000000..c727d7dbe1b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/GET_response.json @@ -0,0 +1,33 @@ +{ + "pagination": { + "total_results": 1, + "total_pages": 1, + "first": { + "href": "https://api.example.org/v3/users?page=1&per_page=1" + }, + "last": { + "href": "https://api.example.org/v3/users?page=1&per_page=1" + }, + "next": null, + "previous": null + }, + "resources": [ + { + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "username": "some-name", + "presentation_name": "some-name", + "origin": "uaa", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/GET_{id}_response.json new file mode 100644 index 00000000000..b60ce5ab333 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/GET_{id}_response.json @@ -0,0 +1,17 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "username": "some-name", + "presentation_name": "some-name", + "origin": "uaa", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/PATCH_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/PATCH_{id}_request.json new file mode 100644 index 00000000000..52c4a1b6106 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/PATCH_{id}_request.json @@ -0,0 +1,10 @@ +{ + "metadata": { + "labels": { + "environment": "production" + }, + "annotations": { + "note": "detailed information" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/PATCH_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/PATCH_{id}_response.json new file mode 100644 index 00000000000..f1729ecb51e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/PATCH_{id}_response.json @@ -0,0 +1,21 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "username": "some-name", + "presentation_name": "some-name", + "origin": "uaa", + "metadata": { + "labels": { + "environment": "production" + }, + "annotations": { + "note": "detailed information" + } + }, + "links": { + "self": { + "href": "https://api.example.org/v3/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/POST_request.json new file mode 100644 index 00000000000..e5463b4edbf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/POST_request.json @@ -0,0 +1,3 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/POST_response.json new file mode 100644 index 00000000000..b60ce5ab333 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/client/v3/users/POST_response.json @@ -0,0 +1,17 @@ +{ + "guid": "3a5d3d89-3f89-4f05-8188-8a2b298c79d5", + "created_at": "2019-03-08T01:06:19Z", + "updated_at": "2019-03-08T01:06:19Z", + "username": "some-name", + "presentation_name": "some-name", + "origin": "uaa", + "metadata": { + "labels": {}, + "annotations": {} + }, + "links": { + "self": { + "href": "https://api.example.org/v3/users/3a5d3d89-3f89-4f05-8188-8a2b298c79d5" + } + } +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_containermetrics_response-large.bin b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_containermetrics_response-large.bin new file mode 100644 index 00000000000..d40fafa99ad Binary files /dev/null and b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_containermetrics_response-large.bin differ diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_containermetrics_response.bin b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_containermetrics_response.bin new file mode 100644 index 00000000000..f8be5f7f13a Binary files /dev/null and b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_containermetrics_response.bin differ diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_recentlogs_response-large.bin b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_recentlogs_response-large.bin new file mode 100644 index 00000000000..e6f8dbba0c8 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_recentlogs_response-large.bin @@ -0,0 +1,21086 @@ +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤Õ¨ƒ‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.611+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"240ba39f-51c2-4fe0-6123-3de508dee113" response_time:0.003815935 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1324e6c012f9d505" x_b3_spanid:"1324e6c012f9d505" x_b3_parentspanid:"-" +§É¨ƒ‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×èàô‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.850+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33214" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e7f2da58-5bf9-413a-4262-393338945c19" response_time:0.002637225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"43525f148adf9a40" x_b3_spanid:"43525f148adf9a40" x_b3_parentspanid:"-" +‘Ýàô‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÇÊăٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.013+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d89c22f-bd05-476d-5435-7a676ba3684e" response_time:0.002938186 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4aee3b81900501a8" x_b3_spanid:"4aee3b81900501a8" x_b3_parentspanid:"-" +¾ÂăٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬¿ÃτٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.309+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f5c1da4-a45d-4b2b-49b3-2637fc7c4892" response_time:0.002865815 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae1ae7e734ec85be" x_b3_spanid:"ae1ae7e734ec85be" x_b3_parentspanid:"-" +ª´ÃτٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò§þ¥…ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.491+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10498" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e45d735-23de-4a2e-7001-a69f6dc9720d" response_time:0.002515346 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc50280a6909936b" x_b3_spanid:"dc50280a6909936b" x_b3_parentspanid:"-" +Ä’þ¥…ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝþÚ¢…ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.483+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13f16fad-b58f-42f1-6b9f-565277fc4018" response_time:0.003361963 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e764b8871509839" x_b3_spanid:"0e764b8871509839" x_b3_parentspanid:"-" +¦óÚ¢…ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿Âû¸†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.798+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33246" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"89b160d7-7cdc-458d-54f8-809ddd49d377" response_time:0.002858169 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38e790d3e1db39f1" x_b3_spanid:"38e790d3e1db39f1" x_b3_parentspanid:"-" +¿µû¸†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑÈ¡¦†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.759+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10498" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a910e396-4797-4d09-60bd-36fd684c8454" response_time:0.003222217 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f65ec80bbf9080c" x_b3_spanid:"3f65ec80bbf9080c" x_b3_parentspanid:"-" +í±¡¦†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½‚ŸªˆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.305+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5bfa3e3-f20f-40bb-7c73-834982a3f8e4" response_time:0.002443924 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c11bfdedb6ff644" x_b3_spanid:"7c11bfdedb6ff644" x_b3_parentspanid:"-" +Í÷žªˆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ÃÝ­ˆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.312+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"97ae93ca-d436-4b71-6f3a-716ab882be99" response_time:0.002139772 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"49542fee5507fc6e" x_b3_spanid:"49542fee5507fc6e" x_b3_parentspanid:"-" +¤¸Ý­ˆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Éú¥÷†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.930+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e07e43e8-6120-49c3-4663-142c42cce942" response_time:0.002390645 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dfbd152fcd2c6f99" x_b3_spanid:"dfbd152fcd2c6f99" x_b3_parentspanid:"-" +çï¥÷†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°¥¾ÿ†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.947+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b558f874-2fc0-40e8-615c-88a04df59046" response_time:0.002418036 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8e10a712214c78a0" x_b3_spanid:"8e10a712214c78a0" x_b3_parentspanid:"-" +Èš¾ÿ†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁÖ é‡ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.168+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15924" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13b0e536-76da-4d61-4cf3-b10f2991e6cd" response_time:0.002898251 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef136df0984458be" x_b3_spanid:"ef136df0984458be" x_b3_parentspanid:"-" +ÖÊ é‡ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Úïâà‹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.224+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33246" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e7e626f-90fe-44cf-55aa-49bfc9a177c9" response_time:0.002784755 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f8dea5925c1b651" x_b3_spanid:"6f8dea5925c1b651" x_b3_parentspanid:"-" +¾ââà‹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥•ˆú‹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.277+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33214" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"877c74a1-0e11-48e8-63cd-d15217e21cbf" response_time:0.002810805 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"74dc6dd69eb56df5" x_b3_spanid:"74dc6dd69eb56df5" x_b3_parentspanid:"-" +ÚŽˆú‹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿Ý¡¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.672+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33246" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f20b477-8095-4e4f-50be-66bee5fa5225" response_time:0.002548399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36b0d608714b5e52" x_b3_spanid:"36b0d608714b5e52" x_b3_parentspanid:"-" +´Ï¡¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶à°â”ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.644+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19138" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d4a3985-d69a-4b7b-588d-5b4e53773a67" response_time:0.002228607 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf2c322335d7c5c8" x_b3_spanid:"cf2c322335d7c5c8" x_b3_parentspanid:"-" +¹Õ°â”ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’Ô÷ç•ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.922+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26700" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13b003e3-e314-4c61-45e6-b1baa3fa953f" response_time:0.004102743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cb3d9a3d8a10dfae" x_b3_spanid:"cb3d9a3d8a10dfae" x_b3_parentspanid:"-" +ÌÌ÷ç•ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏËþêšÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.272+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21448" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aa3c86e2-7e24-4122-6831-ef152836c557" response_time:0.002535911 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0336cb381ae6e1f7" x_b3_spanid:"0336cb381ae6e1f7" x_b3_parentspanid:"-" +ÍÂþêšÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôÇûíšÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.278+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e8940cf-16f6-470a-7ac7-44b61159860e" response_time:0.002908592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"61e4dd560603a69a" x_b3_spanid:"61e4dd560603a69a" x_b3_parentspanid:"-" +ø»ûíšÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ž¢›ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.388+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"32c38ccd-fe94-49eb-7197-66e767a30c0d" response_time:0.002708041 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0859716f1a759a10" x_b3_spanid:"0859716f1a759a10" x_b3_parentspanid:"-" +Ê”ž¢›ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚Ÿàý›ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.580+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22854" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53eec7c5-c3c0-4724-5008-bae7530cd883" response_time:0.002332112 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f17360b436081e5e" x_b3_spanid:"f17360b436081e5e" x_b3_parentspanid:"-" +éˆàý›ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ü£ÑåœÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.797+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22464" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf838a58-b56c-4550-5d7f-2a34e24b66ba" response_time:0.003970454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7bb8a6ff4f5fb693" x_b3_spanid:"7bb8a6ff4f5fb693" x_b3_parentspanid:"-" +’—ÑåœÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èȯ‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.873+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e36bf657-4190-486d-46f0-ac7ae4b19719" response_time:0.002859301 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da21e1a00a1c098c" x_b3_spanid:"da21e1a00a1c098c" x_b3_parentspanid:"-" +;¯‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Åι…žÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.133+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2ac200b-fe12-45fd-6bde-4aab08068e14" response_time:0.002694769 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2eb972c00ce6c4e" x_b3_spanid:"d2eb972c00ce6c4e" x_b3_parentspanid:"-" +Ëù…žÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éµþ¡ŸÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.461+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22862" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"520281dc-d0d4-42f8-458d-2400ef8e58fe" response_time:0.003243347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8801ca909a33d72b" x_b3_spanid:"8801ca909a33d72b" x_b3_parentspanid:"-" +Ùªþ¡ŸÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™øÕž ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:28.721+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17066" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"de33da35-1d4c-4136-61ee-154d54934446" response_time:0.00450912 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"22a68079afa95c1f" x_b3_spanid:"22a68079afa95c1f" x_b3_parentspanid:"-" +»ðÕž ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØžÒÖ ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.841+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8014a103-bbc4-4976-73ab-768e6af5ed5b" response_time:0.002258534 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"22105bedb0a0c174" x_b3_spanid:"22105bedb0a0c174" x_b3_parentspanid:"-" +½–ÒÖ ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡å¼’‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.524+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e668c01b-51d8-4d5a-7638-3175b068f447" response_time:0.002308283 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94788f4adfa6b473" x_b3_spanid:"94788f4adfa6b473" x_b3_parentspanid:"-" +‰Ö¼’‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ê߉ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.685+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05910183-48dc-4007-4d0a-8ae675b61c62" response_time:0.002729964 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0eed19a02ae28585" x_b3_spanid:"0eed19a02ae28585" x_b3_parentspanid:"-" +Ò¯ê߉ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Öóï‹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.051+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22854" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d00884fd-c285-4f31-6b93-8537feb5ae41" response_time:0.002318801 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"985cc8ee7d5cef42" x_b3_spanid:"985cc8ee7d5cef42" x_b3_parentspanid:"-" +‚ìï‹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åü‡÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.808+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"21aa78a4-0c50-4535-77bd-bc8f3764cc26" response_time:0.002374936 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78509871d0e1a800" x_b3_spanid:"78509871d0e1a800" x_b3_parentspanid:"-" +Žö‡÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì‚”ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.136+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21448" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64fba6c8-5190-47ff-7d9b-cc6b719de3f5" response_time:0.003269745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d48001ee14287756" x_b3_spanid:"d48001ee14287756" x_b3_parentspanid:"-" +ž…‚”ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à­Ü¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.227+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b473541a-fb69-4c2c-79b2-d725d987c0da" response_time:0.002357225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92bb4bdd9c0faf56" x_b3_spanid:"92bb4bdd9c0faf56" x_b3_parentspanid:"-" +«¦Ü¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ø¯¥¢ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:29.274+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25bebf3e-350c-4ae9-4bc4-fc0ee276de6b" response_time:0.002458154 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7df724a80ea75d02" x_b3_spanid:"7df724a80ea75d02" x_b3_parentspanid:"-" +À鯥¢ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®ø›ÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.518+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e760caa3-47ba-459c-43ae-226eb79edde4" response_time:0.003766989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f6571c8b1d1a8537" x_b3_spanid:"f6571c8b1d1a8537" x_b3_parentspanid:"-" +öì›ÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½Æ¥‘ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:24.708+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6166370-58dd-4360-7fa1-59a60a68cab4" response_time:0.00531907 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f05effda4e702f8" x_b3_spanid:"3f05effda4e702f8" x_b3_parentspanid:"-" +±³Æ¥‘ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Á¨¼’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.027+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2672fd2b-d78d-43f4-5981-aab4accf2fd9" response_time:0.002409951 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"871b7febbe7574a6" x_b3_spanid:"871b7febbe7574a6" x_b3_parentspanid:"-" +§•¨¼’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õÝÚÙ”ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.625+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42694f31-e095-4d80-58a6-fb0375dc1ae4" response_time:0.002579392 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d186587d8a8d6878" x_b3_spanid:"d186587d8a8d6878" x_b3_parentspanid:"-" +úÓÚÙ”ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßÛ´–ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.083+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21448" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"00c559b1-98ba-4c27-65a9-ee53f28e1bc1" response_time:0.003107376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"882f53b10e313a05" x_b3_spanid:"882f53b10e313a05" x_b3_parentspanid:"-" +£Ô´–ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀÊú·—ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.358+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21520" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f57f3cc-941f-4e46-530a-47a2298b398f" response_time:0.004937705 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b7989f40c5ff0e2" x_b3_spanid:"0b7989f40c5ff0e2" x_b3_parentspanid:"-" +‚¾ú·—ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÙÁɉ™ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.796+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22754" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4767b5f3-4ee3-42ad-404f-5e6578064e76" response_time:0.006285583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98d5d96363f35f4d" x_b3_spanid:"98d5d96363f35f4d" x_b3_parentspanid:"-" +ñ¹É‰™ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ȉçÚ™ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.968+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04832065-3e0f-4296-78b5-3c6d9aa65941" response_time:0.004131537 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36c12c8bbee17351" x_b3_spanid:"36c12c8bbee17351" x_b3_parentspanid:"-" +Á‚çÚ™ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ԌӰ¥ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.097+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5965cbff-52a4-4451-42cd-c36788d79cfa" response_time:0.008598573 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c92faab67584d70" x_b3_spanid:"7c92faab67584d70" x_b3_parentspanid:"-" +ÞÓ°¥ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰û…™­ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f87cbc55-5638-4cf7-732b-96a88d9bce13" response_time:0.014556693 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f67e20f0d47a07b1" x_b3_spanid:"f67e20f0d47a07b1" x_b3_parentspanid:"-" +ð…™­ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬œâÀ¯ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.820+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90584541-c424-4c21-7358-14c548f06bae" response_time:0.002995234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec3b34fe161e988f" x_b3_spanid:"ec3b34fe161e988f" x_b3_parentspanid:"-" +‘âÀ¯ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ›„Ö°ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.134+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f8b99f5d-5145-42fd-424a-a5f871e887ca" response_time:0.002811501 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7fedddc3356fba4c" x_b3_spanid:"7fedddc3356fba4c" x_b3_parentspanid:"-" +‘‘„Ö°ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«Ç€Á³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.893+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"506f40c2-49cf-482a-4b26-657d8904f32f" response_time:0.004991157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2dc7b826cba27dbf" x_b3_spanid:"2dc7b826cba27dbf" x_b3_parentspanid:"-" +Ï»€Á³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Îí— ´ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.092+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3a63cf74-1e25-473a-5c57-6d8af56fba92" response_time:0.005428252 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe60d71830f5c038" x_b3_spanid:"fe60d71830f5c038" x_b3_parentspanid:"-" +ææ— ´ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Éœ¢¯´ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.126+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7fa7ec35-1f40-44a3-5ad2-0c664fcbbd6d" response_time:0.002771796 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"491631618a61e09f" x_b3_spanid:"491631618a61e09f" x_b3_parentspanid:"-" +÷¢¯´ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëÿ•¼µÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.422+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4ab29ab8-1267-4f54-725d-fbb1bcace4b1" response_time:0.002585957 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b2e1f35d4e8e429a" x_b3_spanid:"b2e1f35d4e8e429a" x_b3_parentspanid:"-" +äô•¼µÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Äݲ¢¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.637+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28b7b267-c986-434b-7ddd-e653e81723c6" response_time:0.002103384 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d13342840aacfa63" x_b3_spanid:"d13342840aacfa63" x_b3_parentspanid:"-" +в¢¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 îÔ§¶ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:34.647+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74d8061a-3fa3-44cf-7c98-bc59719054e5" response_time:0.00257167 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4a76d4884edf77e6" x_b3_spanid:"4a76d4884edf77e6" x_b3_parentspanid:"-" +›äÔ§¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žä‡¿¶ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:34.697+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"23e06580-fe9b-491d-7564-eb4ce6584959" response_time:0.00224744 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ae9f026f308d98d" x_b3_spanid:"5ae9f026f308d98d" x_b3_parentspanid:"-" +ØÜ‡¿¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÒ ß·ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.033+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e61b845-03a6-488d-455d-46e610295865" response_time:0.002215801 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26975fb62e88d76c" x_b3_spanid:"26975fb62e88d76c" x_b3_parentspanid:"-" +¤Æ ß·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êÆˆÝ¸ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.296+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24e51846-3e6f-49b8-5bef-fa55a9b13146" response_time:0.002571239 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f3cdc41978d13a43" x_b3_spanid:"f3cdc41978d13a43" x_b3_parentspanid:"-" +¦»ˆÝ¸ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦â£ºÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.712+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6379488d-c1f4-4e6b-46fb-186c054dce5d" response_time:0.002986634 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06d972e999c040f6" x_b3_spanid:"06d972e999c040f6" x_b3_parentspanid:"-" +¤Ú£ºÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ·Í¨ºÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.722+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1eec27b0-d4bb-4062-6e60-0ce1ad37b933" response_time:0.003899776 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2fe780df7c832698" x_b3_spanid:"2fe780df7c832698" x_b3_parentspanid:"-" +£±Í¨ºÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÈÏÕºÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.817+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef02cfc9-4b7b-4ea3-495a-8f02ef81d2a1" response_time:0.002845985 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8fb7afe3589dab98" x_b3_spanid:"8fb7afe3589dab98" x_b3_parentspanid:"-" +òºÏÕºÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ç•먥ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.082+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22854" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e778e467-289f-49d1-577f-d0c72f65c05e" response_time:0.006812992 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"34b6a53151566ef1" x_b3_spanid:"34b6a53151566ef1" x_b3_parentspanid:"-" +½ë¨¥ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•¥¼™¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.860+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec0752ea-cd9d-429e-7288-b2f6d074a3d1" response_time:0.002405225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"47e02328de2d5d3d" x_b3_spanid:"47e02328de2d5d3d" x_b3_parentspanid:"-" +ÿš¼™¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥Æ±¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.910+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db9540b2-d3bc-405b-7025-bbb7f2410bc9" response_time:0.002644358 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9f8c8c3cda77eb4e" x_b3_spanid:"9f8c8c3cda77eb4e" x_b3_parentspanid:"-" +ОƱ¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´Ì³Ú¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.995+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22854" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"adf02032-ff14-4c81-7f46-2fe45ece4320" response_time:0.002843762 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aaf8e823d67968ff" x_b3_spanid:"aaf8e823d67968ff" x_b3_parentspanid:"-" +åÀ³Ú¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´’ËϩٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.241+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22464" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"221fe9fd-5692-4466-4d92-caee4edc15dd" response_time:0.002495002 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36c07763fb695736" x_b3_spanid:"36c07763fb695736" x_b3_parentspanid:"-" +Å„ËϩٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û¢ë´¬ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.989+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"741adf8a-dfa8-4a1c-5922-f6a9ebdd3589" response_time:0.004055407 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9a86ca46dad73bd2" x_b3_spanid:"9a86ca46dad73bd2" x_b3_parentspanid:"-" +îšë´¬ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßþ€–­ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.186+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61e08ab5-c225-45a0-6676-1f04462677be" response_time:0.011266693 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"49e59ebb6582cd44" x_b3_spanid:"49e59ebb6582cd44" x_b3_parentspanid:"-" +Øö€–­ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÊê­ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.371+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15924" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cef9f236-39d8-4fac-41e3-93e7f36399ae" response_time:0.003741541 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bcbe249baa679af5" x_b3_spanid:"bcbe249baa679af5" x_b3_parentspanid:"-" +öÉê­ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸÆž®ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"380e76c0-0646-4627-7681-6d4e3c2b9d89" response_time:0.007213749 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4e914ef0c4bf206" x_b3_spanid:"f4e914ef0c4bf206" x_b3_parentspanid:"-" +󵞮ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’•òæ°ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.169+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21448" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6e10b69-06be-4131-5caa-edb838f749bd" response_time:0.002429334 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17dfb6ac04f2c19b" x_b3_spanid:"17dfb6ac04f2c19b" x_b3_parentspanid:"-" +ÍŠòæ°ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôŸŠ¤³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.833+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"46451fb6-fdee-4a1c-7706-f8933f98b676" response_time:0.003784071 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff124c446766ec4d" x_b3_spanid:"ff124c446766ec4d" x_b3_parentspanid:"-" +Ñ˜Š¤³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žÒ²ü¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.973+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2640228e-b6e5-47a9-796b-4421e27c685b" response_time:0.002308566 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bc6831a9aced3101" x_b3_spanid:"bc6831a9aced3101" x_b3_parentspanid:"-" +ÓDzü¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶¸¢­ÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.343+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6e685bb8-c5ae-491f-5273-6f24add65c3e" response_time:0.002735743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c48bb0bcb1a87330" x_b3_spanid:"c48bb0bcb1a87330" x_b3_parentspanid:"-" +ñ¢­ÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈñÆÅÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3336f088-8939-4f95-617e-fc7cd56d6413" response_time:0.002691605 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f7f3482ee54ce63" x_b3_spanid:"8f7f3482ee54ce63" x_b3_parentspanid:"-" +îäÆÅÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ç¥ÁÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.594+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b46f2cc6-46ef-47d8-41cd-1bbf1904f24f" response_time:0.003218021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5b1403badf8f3b93" x_b3_spanid:"5b1403badf8f3b93" x_b3_parentspanid:"-" +†à¥ÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®æöÂÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b03c75d-f309-4cd7-5347-a3b81562ab0f" response_time:0.003722406 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3627fdfdf16b5881" x_b3_spanid:"3627fdfdf16b5881" x_b3_parentspanid:"-" +½ÜöÂÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨…‚ýٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.583+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a6eee5ac-cc62-48fa-7301-da90c26da6b1" response_time:0.003115186 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06e9550ce29683fa" x_b3_spanid:"06e9550ce29683fa" x_b3_parentspanid:"-" +»÷ýٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Áˆ‚ïÈÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.628+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf89dee9-d2d3-4819-66f7-1b4ccc4f3174" response_time:0.003228515 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"72d3254fea3b0a5d" x_b3_spanid:"72d3254fea3b0a5d" x_b3_parentspanid:"-" +îýïÈÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖݧŸÉÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.730+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3f6fecf-9cc8-4d55-41f0-79279e05a745" response_time:0.002401377 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48cc3b9ce0b6a104" x_b3_spanid:"48cc3b9ce0b6a104" x_b3_parentspanid:"-" +¥Ñ§ŸÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ü¨µáÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.219+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"41ba5eec-b9d3-45ef-421e-817922827319" response_time:0.002593302 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c65e14a476a4c63" x_b3_spanid:"2c65e14a476a4c63" x_b3_parentspanid:"-" +×ô¨µáÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïî´êáÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:46.330+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"014cb56a-bd73-431d-6d20-06733a38d9c5" response_time:0.00256211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"43d2246eefdd54c1" x_b3_spanid:"43d2246eefdd54c1" x_b3_parentspanid:"-" +³ã´êáÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýŽýêäÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:47.131+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"983a49d8-4590-4533-611c-31d46122fce7" response_time:0.00787162 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1783131b7b99d743" x_b3_spanid:"1783131b7b99d743" x_b3_parentspanid:"-" +¾‡ýêäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªÆÍ‰ëÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.811+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08c60a18-9543-4a00-775e-3a4d85963b0b" response_time:0.002715572 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"586e4880d9e878eb" x_b3_spanid:"586e4880d9e878eb" x_b3_parentspanid:"-" +à¹Í‰ëÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÙ¯«îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.686+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"81c02038-0976-4ed0-632d-bce7619408c9" response_time:0.003836306 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2439ed6b8ced44a1" x_b3_spanid:"2439ed6b8ced44a1" x_b3_parentspanid:"-" +ü̯«îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Я±áðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.338+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bdda9249-7b78-49ae-7eb0-013a838d57e9" response_time:0.002698098 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b1e858c4ad9e0f5" x_b3_spanid:"8b1e858c4ad9e0f5" x_b3_parentspanid:"-" +ܤ±áðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùº±õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.579+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f8d3f36a-ce95-4c20-54bd-29e4520b52df" response_time:0.002342043 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"908ef299bfaa5433" x_b3_spanid:"908ef299bfaa5433" x_b3_parentspanid:"-" +Ѷº±õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯Õö¤øÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.358+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35a0cb22-ad1c-4a99-6b3d-4e42a3d84f60" response_time:0.002410694 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6734c607d9bb4ab" x_b3_spanid:"e6734c607d9bb4ab" x_b3_parentspanid:"-" +ìÈö¤øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑõíœúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.879+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"58a1459f-9c44-448d-404d-9d614515b891" response_time:0.002185286 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5bc8aee7ad40e683" x_b3_spanid:"5bc8aee7ad40e683" x_b3_parentspanid:"-" +æéíœúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºžÀÕûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.265+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e64f980f-bba0-4cc0-6ba4-7616aca9a179" response_time:0.003006996 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f11f5ad99bf1eba" x_b3_spanid:"8f11f5ad99bf1eba" x_b3_parentspanid:"-" +Ù—ÀÕûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0൪ÓüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.527+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8fe647b-4be6-4664-449c-424f5cf35af6" response_time:0.005089763 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef35fe23eaa9adc0" x_b3_spanid:"ef35fe23eaa9adc0" x_b3_parentspanid:"-" +©ªÓüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0޹õªÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d34db143-5209-4f34-58c5-c1090df63c53" response_time:0.002522002 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8afdba3e9df53bdc" x_b3_spanid:"8afdba3e9df53bdc" x_b3_parentspanid:"-" +€­õªÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼’‹ášÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb3e9c50-2692-47c5-4508-3cf8e79e01ee" response_time:0.004106316 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8e373ee0f2936cda" x_b3_spanid:"8e373ee0f2936cda" x_b3_parentspanid:"-" +¬‡‹ášÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Çà ››ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.732+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2742514-8377-4a86-5817-498986e495ae" response_time:0.004088535 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dbfff9bac351dd41" x_b3_spanid:"dbfff9bac351dd41" x_b3_parentspanid:"-" +åÌ ››ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ŽÜµÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.325+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0e26b324-6671-43e2-674f-ba941bdc3035" response_time:0.002812232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0ef29be3d31250f" x_b3_spanid:"c0ef29be3d31250f" x_b3_parentspanid:"-" +à†ÜµÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑҕãڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.964+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"82786ed7-f0a9-40e2-67c7-13e7330e0dc5" response_time:0.003449119 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"135fe54c63bde38f" x_b3_spanid:"135fe54c63bde38f" x_b3_parentspanid:"-" +ǕãڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ¸Æß¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.292+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"720985f4-9659-4341-707a-2266fd60704f" response_time:0.003009735 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71a51e6648f6af19" x_b3_spanid:"71a51e6648f6af19" x_b3_parentspanid:"-" +’¬Æß¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ¼›˜¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.213+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f2dec09-d665-4e1e-6543-308d9608e8ce" response_time:0.006273125 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c55e798a44419d8e" x_b3_spanid:"c55e798a44419d8e" x_b3_parentspanid:"-" +…µ›˜¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æß•˨ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1db1809c-adb0-4bcd-54d3-117eb9c3d947" response_time:0.002659608 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a2be0c7b764e264" x_b3_spanid:"7a2be0c7b764e264" x_b3_parentspanid:"-" +·Ø•˨ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹ñŠÍ«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.133+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"adb54121-058d-4f8f-5a7f-079f83881ce9" response_time:0.002516078 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b58c8ec1a29418a0" x_b3_spanid:"b58c8ec1a29418a0" x_b3_parentspanid:"-" +úäŠÍ«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÔù߮ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.976+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc80def4-2090-4fa2-5df6-a9b5ba45c6c2" response_time:0.004002524 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9805c38d71fa1ed" x_b3_spanid:"e9805c38d71fa1ed" x_b3_parentspanid:"-" +žÌù߮ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“»øâ²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:08.057+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b46d6e2b-860b-4437-71ec-8a0e843c7661" response_time:0.003286428 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c317b1996a18bae4" x_b3_spanid:"c317b1996a18bae4" x_b3_parentspanid:"-" +Ê®øâ²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ûˆö§ªÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.427+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42324" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e62fb300-07f0-4448-5f2b-cfedf21f10d0" response_time:0.002531899 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c250f9c15330ea01" x_b3_spanid:"c250f9c15330ea01" x_b3_parentspanid:"-" +ûõ§ªÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÍÍä¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.384+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64847" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d88c0601-486f-4d52-60f1-c731ff047e2f" response_time:0.003859299 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0c88a60e92f84943" x_b3_spanid:"0c88a60e92f84943" x_b3_parentspanid:"-" +¥ÂÍä¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€Áíè¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64847" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"837c4d14-d959-4300-4de7-67cf2d5f84cd" response_time:0.003510056 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a27f970163a4c693" x_b3_spanid:"a27f970163a4c693" x_b3_parentspanid:"-" +“³íè¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ƒÝ¯ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.879+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42324" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec4940fd-749c-475b-6180-d46a0e13e984" response_time:0.003604043 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b379dc04c5974116" x_b3_spanid:"b379dc04c5974116" x_b3_parentspanid:"-" +¢ŽƒÝ¯ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®¤„ݽٜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.636+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba7541ff-474f-4137-46bd-d892720d9c12" response_time:0.00513462 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf1967734111665b" x_b3_spanid:"cf1967734111665b" x_b3_parentspanid:"-" +„ݽٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œþû³¾ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.821+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f3616a4-9924-4bd2-4055-3ed586bd98f1" response_time:0.00249931 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"64cae940203f858b" x_b3_spanid:"64cae940203f858b" x_b3_parentspanid:"-" +ƒóû³¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ךžÇ¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.861+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33a9babd-504e-4f9a-548b-3758e2efb301" response_time:0.002825832 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6a9a0c62050ad64" x_b3_spanid:"b6a9a0c62050ad64" x_b3_parentspanid:"-" +쒞ǾٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨®õؾٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.898+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"409d8a6b-8210-4c7e-50a7-2a1173682268" response_time:0.002545704 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4091efdf895da0d6" x_b3_spanid:"4091efdf895da0d6" x_b3_parentspanid:"-" +ª¥õؾٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°£°“¿ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.021+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14e1e3ba-43d9-470e-6a86-0f3ebcd539cb" response_time:0.002601834 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bc771e84dce197f" x_b3_spanid:"9bc771e84dce197f" x_b3_parentspanid:"-" +ð›°“¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ÔÌ®¿ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6e856d3b-5554-417c-5d1a-cd295807d2cf" response_time:0.002154418 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44e60819f4cf9355" x_b3_spanid:"44e60819f4cf9355" x_b3_parentspanid:"-" +öÈÌ®¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–Ĉ´¿ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.089+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8111220d-8071-483c-69c4-d4f414c734ae" response_time:0.002491592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18b3a9c09fefb025" x_b3_spanid:"18b3a9c09fefb025" x_b3_parentspanid:"-" +‰»ˆ´¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ͨÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.333+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a2d36ff-9dcd-4d76-618e-1aff1310d51f" response_time:0.002677675 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1f0b9d917393f9d" x_b3_spanid:"b1f0b9d917393f9d" x_b3_parentspanid:"-" +«‘¨ÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§©Í¬ÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.342+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2428ab7e-897c-4ab9-5d11-94518ed7a3e8" response_time:0.002834625 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"85661ab1261faf04" x_b3_spanid:"85661ab1261faf04" x_b3_parentspanid:"-" +’ͬÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ñ«ÚÂÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.975+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"836cf58e-3e10-49dc-62e1-5934c85958bd" response_time:0.002414442 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f6c7080b6768fd16" x_b3_spanid:"f6c7080b6768fd16" x_b3_parentspanid:"-" +íá«ÚÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êüŸ‹ÃÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.077+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9ad52046-d136-48aa-5cce-f506a20122af" response_time:0.002750903 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"158e5ffa3caee5c1" x_b3_spanid:"158e5ffa3caee5c1" x_b3_parentspanid:"-" +‘õŸ‹ÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0м¹ÃÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.089+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ac61def-4284-491b-4dfb-3a5c495db90c" response_time:0.00227174 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54de44d0a121ff3d" x_b3_spanid:"54de44d0a121ff3d" x_b3_parentspanid:"-" +±¹ÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ¼’ÑÃÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.224+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b66aa3e-4682-4ee3-5c3f-dd24a82cef70" response_time:0.002529103 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe5b33a638967d6a" x_b3_spanid:"fe5b33a638967d6a" x_b3_parentspanid:"-" +ø®’ÑÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ŠåÃÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.266+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5afbf8a1-16f6-458f-66ba-16c76212691c" response_time:0.002517658 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ee07be3ca53b81c2" x_b3_spanid:"ee07be3ca53b81c2" x_b3_parentspanid:"-" +òÿŽåÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ—ÖƒÄÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.330+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7900edb9-fb55-49d1-63ee-a4193ff266bd" response_time:0.002435996 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"126a3f4da82d1eef" x_b3_spanid:"126a3f4da82d1eef" x_b3_parentspanid:"-" +…ÖƒÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âä€ÌÆÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:39.018+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c6e8f24-7522-466a-74d1-11417689434a" response_time:0.00287631 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8cdc20bf6cf310a8" x_b3_spanid:"8cdc20bf6cf310a8" x_b3_parentspanid:"-" +ÝÖ€ÌÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹à»ÛÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.048+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"acc33f1e-c811-4b64-7c7e-d6fd9bb82e8b" response_time:0.005134304 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"757b2197d84ddf4c" x_b3_spanid:"757b2197d84ddf4c" x_b3_parentspanid:"-" +–Ö»ÛÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0׎­©ÉÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:39.750+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"116b4f43-d867-4024-5d19-ffa0b180b764" response_time:0.003495959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"50f118fa93f34a42" x_b3_spanid:"50f118fa93f34a42" x_b3_parentspanid:"-" +ð„­©ÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ã ÙÉÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:39.851+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e5d1d155-0e25-4560-5691-bd1e2b33f2b2" response_time:0.002951722 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc9a558ff14765a1" x_b3_spanid:"fc9a558ff14765a1" x_b3_parentspanid:"-" +Š’ÙÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„¦–£ÌÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:40.540+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"355f1d82-0f5a-4688-49ce-edfe572a23e5" response_time:0.006042701 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"640052d2f673093c" x_b3_spanid:"640052d2f673093c" x_b3_parentspanid:"-" +™œ–£ÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ɑƾÐÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:41.672+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"309af459-1ef6-40e9-7cd1-5a9dda101daa" response_time:0.005135762 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dec5055113e3a7ce" x_b3_spanid:"dec5055113e3a7ce" x_b3_parentspanid:"-" +ú‰Æ¾ÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡ãÁ™ÖÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.208+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"96a13b4b-8b45-4fd2-6478-7151a1a7576f" response_time:0.002487921 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"96dacdf05bf7aadd" x_b3_spanid:"96dacdf05bf7aadd" x_b3_parentspanid:"-" +šÕÁ™ÖÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨½—ËÖÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.306+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"525c4dc4-b5af-4ff6-574b-13526ec92cbc" response_time:0.007795079 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d2f0db0ba28bf69" x_b3_spanid:"6d2f0db0ba28bf69" x_b3_parentspanid:"-" +¾°—ËÖÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ§—›×ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:43.479+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"140c09df-accf-43da-4fea-93bfb2d8504e" response_time:0.003145955 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6756fb151492a05" x_b3_spanid:"a6756fb151492a05" x_b3_parentspanid:"-" +Ž —›×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕÍììÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.259+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63fc47c0-3760-443c-4b35-12b8679f1204" response_time:0.005237086 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc25e1eec946ded2" x_b3_spanid:"dc25e1eec946ded2" x_b3_parentspanid:"-" +ðÅììÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄÖÊŽßÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.600+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64847" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e6dc74cc-7182-4f10-5929-e6f6a2d8b5a2" response_time:0.002883298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"970b41655daca53f" x_b3_spanid:"970b41655daca53f" x_b3_parentspanid:"-" +ü¿ÊŽßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹˜®ßÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.667+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64847" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3dd2a1e-41b2-4f20-7fde-43545dd9166e" response_time:0.002836706 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d4b376893f13f54" x_b3_spanid:"4d4b376893f13f54" x_b3_parentspanid:"-" +åö—®ßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ãò–¾ßÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:45.700+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ebc97e3c-2485-4cb5-5a27-4d5a7fa0030b" response_time:0.002846089 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88e6c84b0b066388" x_b3_spanid:"88e6c84b0b066388" x_b3_parentspanid:"-" +Äâ–¾ßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óß½ÇàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.982+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64847" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"39056dcf-3d5a-4ac2-706e-7e32a6d1eac2" response_time:0.008931512 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc46726e8a0fa881" x_b3_spanid:"dc46726e8a0fa881" x_b3_parentspanid:"-" +ÿ×½ÇàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö”áÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:46.148+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c2c1439-2837-47b6-7c16-0a460efc11ff" response_time:0.003276173 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3541811aa6bff1e4" x_b3_spanid:"3541811aa6bff1e4" x_b3_parentspanid:"-" +Ü…”áÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„¬öáäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.115+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4ff30f3d-cf24-430a-591f-4b632302c6a0" response_time:0.005058723 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd5c01f2d6a912f2" x_b3_spanid:"dd5c01f2d6a912f2" x_b3_parentspanid:"-" +òžöáäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²ïãÚåÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.370+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"86607c7f-e695-4313-5356-566d0aa4ed36" response_time:0.003109527 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75ed980404062913" x_b3_spanid:"75ed980404062913" x_b3_parentspanid:"-" +ŠããÚåÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ°‚æåÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.391+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d8852a1-c5dd-41fd-6a74-0ee10067717d" response_time:0.006021437 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"401e979b0ead033e" x_b3_spanid:"401e979b0ead033e" x_b3_parentspanid:"-" +Π‚æåÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—êäÇæÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:47.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e520818a-e75f-4a75-5a24-1a5205a8534f" response_time:0.002902788 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"97158368c6d98b5d" x_b3_spanid:"97158368c6d98b5d" x_b3_parentspanid:"-" +ˆÝäÇæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÃÅôèÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:48.228+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b18aaef-e1f0-4e33-69a4-1c1463cd47aa" response_time:0.004508172 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1398ce196155975d" x_b3_spanid:"1398ce196155975d" x_b3_parentspanid:"-" +…¼ÅôèÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š²œ›éÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:48.311+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0daf1432-ca47-432d-7575-7565fddbe372" response_time:0.003046704 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6dfde2e80b9a4097" x_b3_spanid:"6dfde2e80b9a4097" x_b3_parentspanid:"-" +ˆ©œ›éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒØ„ÉêÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:48.674+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b097d07-6dcb-4da0-6bfd-3a04caacda18" response_time:0.004385232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3dd758a7e031438e" x_b3_spanid:"3dd758a7e031438e" x_b3_parentspanid:"-" +ØÊ„ÉêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³ÛÕÒêÙœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:16:48.694+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ed35db36-7684-496f-5f78-c6cf76424807" response_time:0.0041526 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b9325f5a85dc31db" x_b3_spanid:"b9325f5a85dc31db" x_b3_parentspanid:"-" +˜ÑÕÒêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ó¶ÇìÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.207+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aa979de9-8761-4f59-6cb5-eccb08314069" response_time:0.005141815 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f62ab3a6d27c202b" x_b3_spanid:"f62ab3a6d27c202b" x_b3_parentspanid:"-" +å¶ÇìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÝ¨ÔìÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.236+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"665d291c-2670-4c22-7c53-9ee55311c0ce" response_time:0.002658575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4bc5b51b8129bf1a" x_b3_spanid:"4bc5b51b8129bf1a" x_b3_parentspanid:"-" +ÈÒ¨ÔìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›¡šŠíÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.349+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9000775c-a2a8-4886-5d6a-dfdecfac3f6b" response_time:0.002969393 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d622b6a3f319b1d" x_b3_spanid:"2d622b6a3f319b1d" x_b3_parentspanid:"-" +º–šŠíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çÕ¤¤îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"feac9b5e-8d6c-4e91-5156-a544c2ccbc9f" response_time:0.004900341 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69d9b3dac8a8e878" x_b3_spanid:"69d9b3dac8a8e878" x_b3_parentspanid:"-" +•̤¤îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨‰ú®îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.693+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08954384-b1a6-4db4-74d3-4fce55a505e5" response_time:0.004814466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"697330b662177101" x_b3_spanid:"697330b662177101" x_b3_parentspanid:"-" +³ú®îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–àù³îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.704+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13bcca9f-f959-48de-4d8f-8ec32fa7043c" response_time:0.003936278 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c84b3312eb4adeaf" x_b3_spanid:"c84b3312eb4adeaf" x_b3_parentspanid:"-" +ÏÂù³îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò—ÎÕîÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.776+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"255d090a-4316-4a04-6e53-5c84e79a57fb" response_time:0.002352228 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"522511a4967bb981" x_b3_spanid:"522511a4967bb981" x_b3_parentspanid:"-" +‰ÎÕîÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åʰûïÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.124+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4190037-b538-42a7-48f8-e11417e495d5" response_time:0.002645543 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11a606bb3bb1071c" x_b3_spanid:"11a606bb3bb1071c" x_b3_parentspanid:"-" +›¿°ûïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…’ŽÅòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.815+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f165d91-a255-464b-60ff-a7e2e37187d6" response_time:0.002614073 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d26cac2c79bcdc6" x_b3_spanid:"6d26cac2c79bcdc6" x_b3_parentspanid:"-" +„ˆŽÅòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øé­ËóÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.097+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7272dd20-4797-42f4-78ba-6da694e9396e" response_time:0.00236932 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d445df8df7851b1d" x_b3_spanid:"d445df8df7851b1d" x_b3_parentspanid:"-" +Žâ­ËóÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®ªŸûùÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.808+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3dff2583-5aed-4088-47b9-9d4322b30be2" response_time:0.002452456 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d58a86c92cef8e6" x_b3_spanid:"3d58a86c92cef8e6" x_b3_parentspanid:"-" +õŸûùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô‚ŽÎüÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:53.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"26628b96-cb8c-43a9-5d77-94e7745bafeb" response_time:0.007943823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c19384874c0cd0a2" x_b3_spanid:"c19384874c0cd0a2" x_b3_parentspanid:"-" +™÷ÎüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€¯¡ÝüÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:53.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5ddeefb-c8a7-46c0-5e3e-c17e6b192b55" response_time:0.002699414 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a81db76252a77364" x_b3_spanid:"a81db76252a77364" x_b3_parentspanid:"-" +³§¡ÝüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÉ¬²ƒÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.338+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4e99435-906e-4bd6-5d09-0f9bf9239dc4" response_time:0.003265641 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"644454faa3eb500a" x_b3_spanid:"644454faa3eb500a" x_b3_parentspanid:"-" +…¹¬²ƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø¿ìÖƒÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.416+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aa294498-fe83-48cd-6cc5-e50868081bb1" response_time:0.002500855 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e431ba0f509013f5" x_b3_spanid:"e431ba0f509013f5" x_b3_parentspanid:"-" +·±ìÖƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁЬ®„ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1bde21e8-9c40-4905-53d7-862effed608f" response_time:0.002768552 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39c4207497df1555" x_b3_spanid:"39c4207497df1555" x_b3_parentspanid:"-" +‰ý«®„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãüýî„ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:55.734+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8edf55b0-2bcf-4a62-7dc3-291b19b00cbc" response_time:0.00298059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5d40f623d59591a" x_b3_spanid:"b5d40f623d59591a" x_b3_parentspanid:"-" +’ôýî„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žÚ覆ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.120+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c60f5f2f-3a53-4b55-64ab-9e9b24d2a39f" response_time:0.002715803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"68f73428308d0d5d" x_b3_spanid:"68f73428308d0d5d" x_b3_parentspanid:"-" +ÀÐ覆ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Ý°Á†ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.173+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"11e05ffb-365e-480d-4717-79cdc74c97c9" response_time:0.005825492 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd36ae410eec4194" x_b3_spanid:"cd36ae410eec4194" x_b3_parentspanid:"-" +½Ì°Á†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Üà¤×†ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.222+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d588c3f9-ba5d-44ff-5940-304535d2dac4" response_time:0.002629503 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cb9b3c6084fb9191" x_b3_spanid:"cb9b3c6084fb9191" x_b3_parentspanid:"-" +†Õ¤×†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0סܔ‡ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.350+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"39c4ab62-faaf-4ef1-42cb-28fdd7cbe99f" response_time:0.003115229 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5650ab8b65b3cd88" x_b3_spanid:"5650ab8b65b3cd88" x_b3_parentspanid:"-" +åÜ”‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œº±¯ˆÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.675+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0ea38a4-5b49-4cb9-558f-2092082e9651" response_time:0.002624533 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44894d1d496ecd1a" x_b3_spanid:"44894d1d496ecd1a" x_b3_parentspanid:"-" +Ñ®±¯ˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›‹ä‰ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.872+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e20f950a-7ed0-4a64-656e-e532c1e710e2" response_time:0.003358682 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d76f24beba6475cf" x_b3_spanid:"d76f24beba6475cf" x_b3_parentspanid:"-" +í€ä‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óë§›ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.975+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65e544ea-9c04-45d8-4b7e-e8c5cf10f549" response_time:0.002619412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e5c62aaff470f0e5" x_b3_spanid:"e5c62aaff470f0e5" x_b3_parentspanid:"-" +Üá§›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìöÝÃÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.060+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be7369ef-bc65-4214-4939-18f127f13688" response_time:0.002380483 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eff8bcf5707a053c" x_b3_spanid:"eff8bcf5707a053c" x_b3_parentspanid:"-" +ºäÝÃÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸‡¬èÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2477160-cd18-41a6-7a96-fd04573075cd" response_time:0.002446498 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a75f48da7783a6a" x_b3_spanid:"7a75f48da7783a6a" x_b3_parentspanid:"-" +éú«èÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öÃÚ¼ŽÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.313+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f7c7ec97-9e55-4e6c-4bde-c824ab413dc0" response_time:0.003284687 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10e0bf7157f236f4" x_b3_spanid:"10e0bf7157f236f4" x_b3_parentspanid:"-" +‘¼Ú¼ŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ƒÊñÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.693+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2248a09-cafd-4717-4ff7-a0d6ea09696f" response_time:0.002435544 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9f7062723abc7097" x_b3_spanid:"9f7062723abc7097" x_b3_parentspanid:"-" +‰ûÉñÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÅÿÏÇ’ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.403+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4acaa67b-60ea-4812-4876-ec6f0e12bcd4" response_time:0.009957172 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a65406f15e2bc3dd" x_b3_spanid:"a65406f15e2bc3dd" x_b3_parentspanid:"-" +ÉéÏÇ’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úà•¤”ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.872+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef65c0c4-58b7-4db6-4ceb-80f602b43f06" response_time:0.003040584 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd8c19f592d63fca" x_b3_spanid:"cd8c19f592d63fca" x_b3_parentspanid:"-" +ÒÑ•¤”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þÁ­Ä”ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.940+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"509ddc1b-0bcd-4a47-501d-ffc6196420f9" response_time:0.002637146 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9479a4b59c56a9b" x_b3_spanid:"a9479a4b59c56a9b" x_b3_parentspanid:"-" +ž°­Ä”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄÀôÚ”ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.986+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d829d2ae-314d-4a25-7079-aeb9346da943" response_time:0.003973663 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26435daae2fb0282" x_b3_spanid:"26435daae2fb0282" x_b3_parentspanid:"-" +¹µôÚ”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘‹È •ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.119+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3bfac41d-477b-48b3-4d50-36f39813866e" response_time:0.017712409 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4729836fe09acec" x_b3_spanid:"f4729836fe09acec" x_b3_parentspanid:"-" +ãÿÇ •ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó¬¦£•ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:00.138+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"23d6ad12-a746-40d7-4a2d-64f5e6ffb25b" response_time:0.00442406 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3feb6545b1b37f2" x_b3_spanid:"b3feb6545b1b37f2" x_b3_parentspanid:"-" +ª›¦£•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶Ä°è•ÚœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:17:00.284+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a41600c4-037c-45e3-4362-19eace4ab4af" response_time:0.0028402 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"df5864657c6309d6" x_b3_spanid:"df5864657c6309d6" x_b3_parentspanid:"-" +γ°è•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éè í–ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.563+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b0a1874a-416e-4a17-5840-50c28ba7f0eb" response_time:0.002676639 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26b2546b75e8601c" x_b3_spanid:"26b2546b75e8601c" x_b3_parentspanid:"-" +¼à í–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ӢΙڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.303+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4666de20-b2dd-46a6-6e6f-b5e0b542846c" response_time:0.002734996 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"200c9bc3eebd9e18" x_b3_spanid:"200c9bc3eebd9e18" x_b3_parentspanid:"-" +½Î™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰©šÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.494+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69dc315e-5004-4061-5235-3823ac8ecf54" response_time:0.002439021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bbb496249e891a3f" x_b3_spanid:"bbb496249e891a3f" x_b3_parentspanid:"-" +¿€©šÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ÊÊšÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.563+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"403cd904-ded9-4225-5adf-3435a183c6d9" response_time:0.003312781 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa311baa1074c5b9" x_b3_spanid:"fa311baa1074c5b9" x_b3_parentspanid:"-" +ƒŽÊÊšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Î݇›ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.688+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"00796343-37e0-45a0-4c16-ad83a4ea9b56" response_time:0.006558688 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"16f9b92e0c1d88e2" x_b3_spanid:"16f9b92e0c1d88e2" x_b3_parentspanid:"-" +ÛÂ݇›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»ÅöçÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.431+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7714415a-8a6e-4119-73f7-04f50a8be7e8" response_time:0.002901311 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cb24d48b8864045" x_b3_spanid:"1cb24d48b8864045" x_b3_parentspanid:"-" +¬¸öçÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Úï䞟ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.814+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b354a1db-d3a6-4347-4aaa-9e7657305968" response_time:0.002799654 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3acaa4d0f0c9a3ac" x_b3_spanid:"3acaa4d0f0c9a3ac" x_b3_parentspanid:"-" +„æäžŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊÙÞ¬ŸÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c92d99e6-421c-4c5d-556a-661efd06b0c8" response_time:0.002809716 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a53f79689d13bffc" x_b3_spanid:"a53f79689d13bffc" x_b3_parentspanid:"-" +ãÊÞ¬ŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý¹’ ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.048+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea0527be-2a81-4d50-6616-4a52420b38c7" response_time:0.010993598 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b4acedd53f31857" x_b3_spanid:"6b4acedd53f31857" x_b3_parentspanid:"-" +²°’ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”ôˆ¥ ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.092+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66970169-3f56-4465-7b03-d1e7b2ebc3cd" response_time:0.006842198 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f33a711b63510a09" x_b3_spanid:"f33a711b63510a09" x_b3_parentspanid:"-" +ë㈥ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´óå¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.579+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9537da82-93e5-4394-6841-7cc008e029e9" response_time:0.007285309 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9118bf0c13b973ea" x_b3_spanid:"9118bf0c13b973ea" x_b3_parentspanid:"-" +Õèå¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0É–ýƒ£ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.830+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"461c53c1-02c2-40e4-7ec7-82e150305b98" response_time:0.004718383 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"047c9e3620be17a6" x_b3_spanid:"047c9e3620be17a6" x_b3_parentspanid:"-" +ÄŒýƒ£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0쬬Ÿ£ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.886+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f250eb19-492a-452b-53e6-e8248b9beed4" response_time:0.005914523 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f85c60bccf1b6613" x_b3_spanid:"f85c60bccf1b6613" x_b3_parentspanid:"-" +‡Ÿ¬Ÿ£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ß‚Œ¤ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.116+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c9458e7a-75e3-40d6-4cb9-ab724e9233e7" response_time:0.003725119 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"24489389a6ac720a" x_b3_spanid:"24489389a6ac720a" x_b3_parentspanid:"-" +þÕ‚Œ¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«´¯Æ¤ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.239+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"923f54b7-c808-49b0-4010-64c0bb929560" response_time:0.002917033 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2194cc4282e4cde" x_b3_spanid:"d2194cc4282e4cde" x_b3_parentspanid:"-" +ª¯Æ¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿½»þ¦ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.894+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1d226140-0587-4274-5f16-fb5f7d708664" response_time:0.002816982 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79896b7435966981" x_b3_spanid:"79896b7435966981" x_b3_parentspanid:"-" +“¬»þ¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î•Í·ªÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.819+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1afb98a1-b333-48dc-7ad9-32efd585c44c" response_time:0.002339233 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"65738a4d7ffca92d" x_b3_spanid:"65738a4d7ffca92d" x_b3_parentspanid:"-" +׉ͷªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Öý·¥¬ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:06.318+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f15048b1-1343-42f6-63fb-93c1aeaefb4f" response_time:0.002610397 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4377c2f2b434bcd" x_b3_spanid:"e4377c2f2b434bcd" x_b3_parentspanid:"-" +œî·¥¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡Ž¶ð¬ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:06.475+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"22775b38-6c74-4c77-5d97-06853e8d500e" response_time:0.003282871 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"25d91d424c67eebd" x_b3_spanid:"25d91d424c67eebd" x_b3_parentspanid:"-" +îÿµð¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡«Û´­ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:06.616+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"39010279-13b8-43b9-51e1-b930e5d82cf3" response_time:0.005450629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce9f9576d89b0286" x_b3_spanid:"ce9f9576d89b0286" x_b3_parentspanid:"-" +ã Û´­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñܜȮڜÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:06.928+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f26bcae1-59e2-46bf-6458-20deb4c2f63a" response_time:0.00267429 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b63e0e40ca196a29" x_b3_spanid:"b63e0e40ca196a29" x_b3_parentspanid:"-" +×МȮڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0̃æ°ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.342+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"de08c9bc-94e4-4e34-4801-41e0473d5aa0" response_time:0.002629015 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8594bf96ee5a9c6" x_b3_spanid:"a8594bf96ee5a9c6" x_b3_parentspanid:"-" +‡óå°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Í¤Ü²ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:08.043+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d0781bc-3e11-4a2b-6d18-5b4f04c21293" response_time:0.002987279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"793fb638dd21b293" x_b3_spanid:"793fb638dd21b293" x_b3_parentspanid:"-" +ľ¤Ü²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜‡ÎÙîÑœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:14.897+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b9d42e9a-ccf0-48d6-58b3-59188523d8c9" response_time:0.012084124 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"53dbb9384cdb6579" x_b3_spanid:"53dbb9384cdb6579" x_b3_parentspanid:"-" +ƒ€ÎÙîÑœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†´ÐõÑœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:16.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:46333" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a69b796-2f9b-48d1-46e7-c5e07809eeb8" response_time:0.001742268 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5f5d9477d194c942" x_b3_spanid:"5f5d9477d194c942" x_b3_parentspanid:"-" +¨ú³ÐõÑœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ¹ð¡úÑœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:18.008+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3058e10-73a2-4196-6441-9f9626ffda5e" response_time:0.005063462 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"67f55d8e6c5cbd64" x_b3_spanid:"67f55d8e6c5cbd64" x_b3_parentspanid:"-" +›³ð¡úÑœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ý§‡þÑœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:12:19.029+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48809" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d8c404c-f3c8-464e-701c-932534929e23" response_time:0.00242629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b36cf858627d0b7b" x_b3_spanid:"b36cf858627d0b7b" x_b3_parentspanid:"-" +íð§‡þÑœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡ŒÖÝ€ÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:19.747+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:35939" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e1b919e1-76d2-4585-43ff-e6ced28699ef" response_time:0.002338373 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc45ad655b7bf5f8" x_b3_spanid:"dc45ad655b7bf5f8" x_b3_parentspanid:"-" +ýÖÝ€ÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý›áô„ÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:20.870+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44741" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"284daa58-c835-4b89-7f22-9edb2d8b3042" response_time:0.001987196 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a26a9cd733dfa74a" x_b3_spanid:"a26a9cd733dfa74a" x_b3_parentspanid:"-" +Ðáô„ÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Å î†ÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:21.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47741" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"95d9f9fa-db41-4602-576f-aae9ca35ae36" response_time:0.002026295 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f472b5ec4a4f09f0" x_b3_spanid:"f472b5ec4a4f09f0" x_b3_parentspanid:"-" +ø» î†ÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ–ÈûçÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:47.458+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:30603" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aadd180d-8686-4e1f-73d9-b14f92aa5205" response_time:0.002582058 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c0aed5a986c3f27" x_b3_spanid:"2c0aed5a986c3f27" x_b3_parentspanid:"-" +éŽÈûçÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø¿¢²èÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:47.574+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:30603" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9561e545-0dfc-485b-7840-be4ad15137ab" response_time:0.002033538 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d73b21f789b936cf" x_b3_spanid:"d73b21f789b936cf" x_b3_parentspanid:"-" +¸¢²èÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì­‰çèÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:47.684+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27871" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c89778b4-c80b-4c90-5121-a36e4ad85212" response_time:0.002264156 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b63e305c92d213ee" x_b3_spanid:"b63e305c92d213ee" x_b3_parentspanid:"-" +Ë¥‰çèÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÛÐÐëÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:48.442+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27871" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42deba0e-3d22-4f1d-6575-7e5cd094f6a8" response_time:0.002335511 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e8acdbc9c3fd56bf" x_b3_spanid:"e8acdbc9c3fd56bf" x_b3_parentspanid:"-" +‚ÐÐÐëÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨•¹‰ïÒœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:12:49.366+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:32561" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08d32de7-a49a-4a9e-5e8e-ccbc5f39bfd6" response_time:0.00279815 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7d23b5e70a87f28f" x_b3_spanid:"7d23b5e70a87f28f" x_b3_parentspanid:"-" +–¹‰ïÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ùÓ’ïÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:49.386+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:32561" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d42895ec-e380-445a-6e0b-e18e9762d997" response_time:0.002049128 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88af89599e844f5c" x_b3_spanid:"88af89599e844f5c" x_b3_parentspanid:"-" +©ñÓ’ïÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û“Ö¯ñÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:49.985+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:32567" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c5a312e-5e10-4d68-4ee4-8a9c39402b5b" response_time:0.001316406 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"538804606abe4f93" x_b3_spanid:"538804606abe4f93" x_b3_parentspanid:"-" +ê†Ö¯ñÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªè¥»ŠÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:56.719+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27871" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cfb98db5-9ee0-47fc-5a02-efa7eaad40fe" response_time:0.002521938 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bdd5d34130c07bb9" x_b3_spanid:"bdd5d34130c07bb9" x_b3_parentspanid:"-" +†á¥»ŠÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó©‡ÛŠÓœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:12:56.786+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:25939" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7703e0ad-2dbe-470b-5d20-711673817fd4" response_time:0.00182188 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f040f44c5c3a6e7d" x_b3_spanid:"f040f44c5c3a6e7d" x_b3_parentspanid:"-" +§¢‡ÛŠÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž“­”ŒÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:57.174+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27429" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0cc0607-f129-4da0-666a-a5533ddf0ce9" response_time:0.002451853 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d414bde07557d1c8" x_b3_spanid:"d414bde07557d1c8" x_b3_parentspanid:"-" +ŽŠ­”ŒÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎêÈýŽÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:57.932+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:30603" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac59e185-13d0-4e6b-5008-61d618028814" response_time:0.002195344 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3623808ed7be3817" x_b3_spanid:"3623808ed7be3817" x_b3_parentspanid:"-" +ñÞÈýŽÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ïô“ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:59.254+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:29671" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"16bcfab8-0556-4de2-40c1-2c325e8e9187" response_time:0.004520177 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"404f314842613992" x_b3_spanid:"404f314842613992" x_b3_parentspanid:"-" +ˆŽïô“ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šé™í˜ÓœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:13:00.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:32561" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d80475b1-de9b-4b33-6fd5-b892be60227c" response_time:0.00241215 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5d0c39db7638e69f" x_b3_spanid:"5d0c39db7638e69f" x_b3_parentspanid:"-" +’á™í˜ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£•ÝšӜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:01.029+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:30667" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a701634a-3315-49ae-6b1c-34d12dd8373a" response_time:0.002473765 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5544ffa43a0e6ca4" x_b3_spanid:"5544ffa43a0e6ca4" x_b3_parentspanid:"-" +¥ŠÝšӜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—â’ÝÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:01.888+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27875" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2b9abb4-0b8a-4a55-7d60-c4fb62b9fec8" response_time:0.004807603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c310d9f477525529" x_b3_spanid:"c310d9f477525529" x_b3_parentspanid:"-" +ý×’ÝÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ôø×¡ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:02.950+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:30667" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8f35b4b9-db47-4768-42f4-c2cbdedc3a97" response_time:0.005852506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ee60da486f38afe3" x_b3_spanid:"ee60da486f38afe3" x_b3_parentspanid:"-" +çíø×¡ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œ³¯ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:06.635+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21059" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bbf8b055-4f27-4a46-6245-cc3e7efe7936" response_time:0.001668951 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9db09c4683e84879" x_b3_spanid:"9db09c4683e84879" x_b3_parentspanid:"-" +¯ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íªï£²ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:07.408+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24213" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2e518bf-f584-4f33-4e10-58c42fac9fb2" response_time:0.001497192 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1e439241135eb12" x_b3_spanid:"b1e439241135eb12" x_b3_parentspanid:"-" +œžï£²ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’œÖÒ²ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:07.506+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20937" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49aa4be4-b034-4b27-5b6b-9425f1da0f50" response_time:0.001669644 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"32589299a0c48e79" x_b3_spanid:"32589299a0c48e79" x_b3_parentspanid:"-" +¹“ÖÒ²ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì¹ö²ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:07.581+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21523" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"531602a9-9c0c-402f-5c66-d65c0768ef41" response_time:0.001962655 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e7757d1b179f8ec" x_b3_spanid:"7e7757d1b179f8ec" x_b3_parentspanid:"-" +ùà¹ö²ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©„¿Ë¾ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:10.712+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c72d7d9-adcd-45b3-7936-51ce19b9a947" response_time:0.001688953 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94ed9a7d2db7a5b5" x_b3_spanid:"94ed9a7d2db7a5b5" x_b3_parentspanid:"-" +¶÷¾Ë¾ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†º³¼ÁÓœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:13:11.485+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20937" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad684afd-00da-41c7-670c-826e524e11c1" response_time:0.002576 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f72355d65cee8ca9" x_b3_spanid:"f72355d65cee8ca9" x_b3_parentspanid:"-" +‚°³¼ÁÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëœâæÂÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:11.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24357" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8aabb46-e254-4751-570a-52b69317572e" response_time:0.001936975 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0ff9933bcce4bba" x_b3_spanid:"a0ff9933bcce4bba" x_b3_parentspanid:"-" +÷•âæÂÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†•ÔêÃÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:12.118+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24357" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac5cc07b-b641-43d5-5470-d845183cf06e" response_time:0.003685938 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1fad2ec4b6203a5b" x_b3_spanid:"1fad2ec4b6203a5b" x_b3_parentspanid:"-" +ŽÔêÃÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÞýÕÈÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:13.416+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18501" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8c234fce-81f1-419e-58e5-58ed6dcb1c40" response_time:0.001962333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c49d4ef31e03f57" x_b3_spanid:"2c49d4ef31e03f57" x_b3_parentspanid:"-" +ÿðÕÈÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÞŒŸÊÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:13.840+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d30f7428-683a-4110-52b3-89ca4ce6ad3c" response_time:0.001799888 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3c8d0d72ee6068a5" x_b3_spanid:"3c8d0d72ee6068a5" x_b3_parentspanid:"-" +†ŸŒŸÊÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸Õ©ÄÞÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:19.284+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55070" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13199331-5399-41ad-5dbd-0c24f41903f4" response_time:0.004449667 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a863795ab4f2763" x_b3_spanid:"1a863795ab4f2763" x_b3_parentspanid:"-" +È©ÄÞÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÇªääÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:20.962+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57074" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f96f80a5-a388-4b1d-4a35-bd70926f7a5a" response_time:0.004537244 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd88f6b02e913c2a" x_b3_spanid:"bd88f6b02e913c2a" x_b3_parentspanid:"-" +黪ääÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ç†ÇÍæÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:21.453+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb083ce0-fe7e-496e-4c4e-8d134847102d" response_time:0.002756766 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be753fe39a78e70c" x_b3_spanid:"be753fe39a78e70c" x_b3_parentspanid:"-" +¼üÆÍæÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß´“ÜæÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:21.483+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77648927-f09f-40fc-5da1-59d50b9fd887" response_time:0.002944218 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da713f11522e5df7" x_b3_spanid:"da713f11522e5df7" x_b3_parentspanid:"-" +®¿’ÜæÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªö¶ çÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:21.628+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"152086d7-6c46-4103-658f-91603e9a27ee" response_time:0.001664393 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f25ffe3d816ce76" x_b3_spanid:"6f25ffe3d816ce76" x_b3_parentspanid:"-" +úé¶ çÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Я¨¤…ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:21.488+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33848" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"81d8386f-5072-4c73-422b-e60340537c6f" response_time:0.00198962 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4926dffe40eda6d4" x_b3_spanid:"4926dffe40eda6d4" x_b3_parentspanid:"-" +þ£¨¤…ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0——†ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.812+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7603862-bd6a-46cc-60a8-1684f0fa143a" response_time:0.008301301 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cba69d690e864be5" x_b3_spanid:"cba69d690e864be5" x_b3_parentspanid:"-" +‹†ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂÆÖ†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.861+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5ce108e5-4d7c-48e8-52f4-4035eac06ddb" response_time:0.001757155 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6dd888a4ff6c9c48" x_b3_spanid:"6dd888a4ff6c9c48" x_b3_parentspanid:"-" +чÆÖ†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò͇ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.110+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0913e63-e161-4a0e-5893-98c38a8d39b0" response_time:0.001512402 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c01c05cfd83fb994" x_b3_spanid:"c01c05cfd83fb994" x_b3_parentspanid:"-" +®†Í‡ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ד龑ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.764+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b89da2b4-d8c6-4d40-7b75-dca1d56ea850" response_time:0.002101028 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c894e9a74db7b23" x_b3_spanid:"7c894e9a74db7b23" x_b3_parentspanid:"-" +Æã㾑ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª„ŒÜ’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.093+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33964" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d45a2375-ff8a-4d9b-7347-80182f1ac938" response_time:0.002973796 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fbaa75e02ee7c06e" x_b3_spanid:"fbaa75e02ee7c06e" x_b3_parentspanid:"-" +òø‹Ü’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛµŠ¨ŸÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.472+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ce49db8-1491-47b2-4bfa-6140e228d541" response_time:0.004554509 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"040b39de839442cf" x_b3_spanid:"040b39de839442cf" x_b3_parentspanid:"-" +׮ЍŸÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆÚñêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.783+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21409" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"966e36f9-a9ba-4dba-7c08-34ec74514f65" response_time:0.001528143 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"47ec16105b191ec8" x_b3_spanid:"47ec16105b191ec8" x_b3_parentspanid:"-" +ƒÍñêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ÌÀŒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.122+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65dbb978-9789-40dd-7079-d5b141324d35" response_time:0.002373358 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a3ed643cd515280" x_b3_spanid:"1a3ed643cd515280" x_b3_parentspanid:"-" +òÀÀŒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„®û¢ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.169+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"46315b9a-7d51-499f-5f96-11a705890427" response_time:0.002036639 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b4e0232499889a4e" x_b3_spanid:"b4e0232499889a4e" x_b3_parentspanid:"-" +Ú¢û¢ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š³œîÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.327+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aea1abed-9c06-474f-7db4-3361157734b6" response_time:0.002108168 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa9dcd3aaf1e6d8e" x_b3_spanid:"aa9dcd3aaf1e6d8e" x_b3_parentspanid:"-" +×¥œîÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒÞɈ’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.920+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c500cd9a-1c1d-41e6-5ccd-ee3b9d3cbda1" response_time:0.001456899 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75c78633f4a0fa85" x_b3_spanid:"75c78633f4a0fa85" x_b3_parentspanid:"-" +ÔÑɈ’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€Öí¢’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.974+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f946c71-25f0-4e28-4aa2-db1ac7365201" response_time:0.002021408 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8251f92f81cae4fe" x_b3_spanid:"8251f92f81cae4fe" x_b3_parentspanid:"-" +ÆÊí¢’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úƒÊÍ—ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:26.404+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21409" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c31ede5a-b081-4513-4f88-e587d35bbbec" response_time:0.00360403 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff5c7f9c931aba1d" x_b3_spanid:"ff5c7f9c931aba1d" x_b3_parentspanid:"-" +´üÉÍ—ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ÉÎÚ™ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.970+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"daf8f42c-074c-444a-5187-4cd462c64bcd" response_time:0.002421499 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e1162d0748262aa" x_b3_spanid:"0e1162d0748262aa" x_b3_parentspanid:"-" +š¾ÎÚ™ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëü„½›ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d35e224c-9043-41c1-6b09-5b5d6749423a" response_time:0.002218715 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f31459437194ba02" x_b3_spanid:"f31459437194ba02" x_b3_parentspanid:"-" +‚ô„½›ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø¿ÍèœÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.805+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"544fcfcd-f59d-4692-4e9a-c8b57581d67c" response_time:0.001523846 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"196b1372c52d3ca1" x_b3_spanid:"196b1372c52d3ca1" x_b3_parentspanid:"-" +Ö²ÍèœÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈÉÕ¢ŸÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.463+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19059" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b52a8934-4d25-4436-7981-384040103af3" response_time:0.002587115 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a294489468196e8" x_b3_spanid:"1a294489468196e8" x_b3_parentspanid:"-" +ˆ²Õ¢ŸÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝÜä© ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.747+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6f5f7e2-f6e1-4b6f-454b-088d942ba81c" response_time:0.001526956 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4df8286daa2ac68" x_b3_spanid:"d4df8286daa2ac68" x_b3_parentspanid:"-" +¦Ñä© ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éɲ· ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.775+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1ba9ffcc-c64f-4046-7c44-b89c99afbe0d" response_time:0.001784743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58ef9b8455cadb04" x_b3_spanid:"58ef9b8455cadb04" x_b3_parentspanid:"-" +ú†¯· ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ä€ý”³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.800+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6492405f-e202-4479-6593-e5136124ebd7" response_time:0.005783514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5044f7b8adf153a2" x_b3_spanid:"5044f7b8adf153a2" x_b3_parentspanid:"-" +¸÷ü”³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡‘ÉĸٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.245+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06423707-3392-44a8-4026-412c74aa0d00" response_time:0.001810833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6800c39cb19b90b2" x_b3_spanid:"6800c39cb19b90b2" x_b3_parentspanid:"-" +ÈÉĸٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ‰¶¹¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.927+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21585" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"37c4f608-9c37-448f-5dff-ede70262278b" response_time:0.001603013 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b605386ee89ff01" x_b3_spanid:"9b605386ee89ff01" x_b3_parentspanid:"-" +îþµ¹¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çþÍЩٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.243+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3dc478d6-0336-42dc-487f-91ec47d73064" response_time:0.002575655 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d200f985f39677f" x_b3_spanid:"2d200f985f39677f" x_b3_parentspanid:"-" +ƒñÍЩٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Éù¡’¯ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"93de032f-e00b-4620-7261-d8d9a4f6971f" response_time:0.001995988 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"722ea95b77e39295" x_b3_spanid:"722ea95b77e39295" x_b3_parentspanid:"-" +‡þ ’¯ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ×èήٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"276b0f94-da83-4570-6464-7e61476da8d8" response_time:0.002722981 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bdc3e5b65e1f849b" x_b3_spanid:"bdc3e5b65e1f849b" x_b3_parentspanid:"-" +ªÌèήٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Š…¶‹°ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.976+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0822f61-edb5-4337-7b11-cfdf8bd07af5" response_time:0.003910663 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98199c910ef98aaa" x_b3_spanid:"98199c910ef98aaa" x_b3_parentspanid:"-" +žùµ‹°ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÑ·¯°ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cfb4e66c-1cdb-4baa-40f4-e5ee61d6e705" response_time:0.002011038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a97f7bc4469d14a" x_b3_spanid:"7a97f7bc4469d14a" x_b3_parentspanid:"-" +ûÆ·¯°ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰¸ô›²ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:33.546+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e1592ac-bac8-470d-5d7e-190ebd8986f5" response_time:0.00505416 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58fb953c52e9efb0" x_b3_spanid:"58fb953c52e9efb0" x_b3_parentspanid:"-" +Ö®ô›²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËÜž¥²ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.570+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"86749c38-55db-460b-65b4-dde0d6c9e7c2" response_time:0.001373906 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b49b0763ee97a399" x_b3_spanid:"b49b0763ee97a399" x_b3_parentspanid:"-" +®Ñž¥²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—¸¹Ë²ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.646+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4e75bbd-3534-4fbc-521c-813cf609c4dc" response_time:0.004814221 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a394ae986e9c7a78" x_b3_spanid:"a394ae986e9c7a78" x_b3_parentspanid:"-" +‘¬¹Ë²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ãœ¼²ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:33.616+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12d2ffee-3a0b-458d-73c0-b61e7ada3457" response_time:0.00312673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9277553c82ba71d4" x_b3_spanid:"9277553c82ba71d4" x_b3_parentspanid:"-" +ø×œ¼²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0߭ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.810+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f33bd071-6dea-423c-7bbe-348b545816f7" response_time:0.003435777 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"204b6a837fe24c65" x_b3_spanid:"204b6a837fe24c65" x_b3_parentspanid:"-" +ĦٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’‹Œû³ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:34.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"50e6998e-a0bc-4939-4010-0beafd89c141" response_time:0.00494952 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd116f0c5d9ab7ac" x_b3_spanid:"bd116f0c5d9ab7ac" x_b3_parentspanid:"-" +Öþ‹û³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý›«³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.848+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b7a8015-a7b6-4d19-51b0-8174bd1c9645" response_time:0.004283865 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2e9f5c0eaddba31" x_b3_spanid:"c2e9f5c0eaddba31" x_b3_parentspanid:"-" +Á¶›«³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äࣕµÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.338+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b1d4f2b-9d43-4679-70b8-b807c44649b5" response_time:0.005180298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b26cda6086a54101" x_b3_spanid:"b26cda6086a54101" x_b3_parentspanid:"-" +ù×£•µÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óàì×¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.749+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bb487f5-c9bd-44e8-43fe-e80eab5c451f" response_time:0.001485423 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"229f1f6f0e053fc3" x_b3_spanid:"229f1f6f0e053fc3" x_b3_parentspanid:"-" +¬Ùì×¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚ŸÐݺٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.833+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"518d00a8-4d4f-41f2-77f5-6b46fa1c1ee1" response_time:0.003682181 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"14cfc4cdc12313d6" x_b3_spanid:"14cfc4cdc12313d6" x_b3_parentspanid:"-" +«’ÐݺٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Àå’ùºÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.892+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3aa17ece-9d70-406e-534c-540642140eef" response_time:0.002020364 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"024ffb8dbd5141c3" x_b3_spanid:"024ffb8dbd5141c3" x_b3_parentspanid:"-" +ï×’ùºÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å÷棼ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"79c1b78a-3247-474b-683a-b58a0f23d9e0" response_time:0.001885868 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"acc9c7ffc59dc9f9" x_b3_spanid:"acc9c7ffc59dc9f9" x_b3_parentspanid:"-" +¬ë棼ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Åæ´ê¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.397+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"43df5708-e747-46a2-40f7-b6f881077b6f" response_time:0.003493385 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fac21ceea2db6fb6" x_b3_spanid:"fac21ceea2db6fb6" x_b3_parentspanid:"-" +°Ú´ê¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½åôä¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.385+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59477e70-696a-41c3-5c82-3280e881cd26" response_time:0.003717184 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ebd22935e6e577c7" x_b3_spanid:"ebd22935e6e577c7" x_b3_parentspanid:"-" +ãÛôä¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àöнٜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.609+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8c45b3c5-def5-4db4-50df-fa605ebcf818" response_time:0.00620059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"74a8187453cbfaf8" x_b3_spanid:"74a8187453cbfaf8" x_b3_parentspanid:"-" +ÎÖöнٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´Þâ¼¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.839+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"340ace33-ad73-4933-6bd3-0acb70d9599a" response_time:0.002363452 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"807a492df26dff8c" x_b3_spanid:"807a492df26dff8c" x_b3_parentspanid:"-" +Óâ¼¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”»ï·ÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.904+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5b6dd304-3664-4500-77b7-e63fbae20c9e" response_time:0.001545964 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2b2259bfdddbb51" x_b3_spanid:"d2b2259bfdddbb51" x_b3_parentspanid:"-" +ã±ï·ÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éûœÄÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.929+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"44a9b949-a161-4251-5776-3ecaf3972f38" response_time:0.001679688 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d6abf7edd5aba9e" x_b3_spanid:"4d6abf7edd5aba9e" x_b3_parentspanid:"-" +€ñœÄÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƬŒÐÃÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.222+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"29d15849-d453-4c66-4769-35d94908081e" response_time:0.002141598 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"35702fcbe3fb6c83" x_b3_spanid:"35702fcbe3fb6c83" x_b3_parentspanid:"-" +Õ—ŒÐÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦•¯„ÄÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.332+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7e5d56f-c4c6-4bad-7614-858b102165a0" response_time:0.001445673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7dacfc9a88ec9e2a" x_b3_spanid:"7dacfc9a88ec9e2a" x_b3_parentspanid:"-" +̇¯„ÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù¥ŠÐÄÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.491+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f91f2a5d-226b-4502-4ca6-478943d60613" response_time:0.00193039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"90c7f72f32845397" x_b3_spanid:"90c7f72f32845397" x_b3_parentspanid:"-" +윊ÐÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ãæ±õÇÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.375+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e7e8dc5-24b3-496a-4aa5-514b04a48f12" response_time:0.001449253 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d849059dd4d46c5d" x_b3_spanid:"d849059dd4d46c5d" x_b3_parentspanid:"-" +¹Ú±õÇÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì’‘ÈÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.433+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f494c26-3af7-4347-75e9-93f531106874" response_time:0.001778173 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9945498d3c792c22" x_b3_spanid:"9945498d3c792c22" x_b3_parentspanid:"-" +êò‘‘ÈÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éî’Æ×ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.571+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7a60d8a0-b5f3-466c-5509-11ddc41a9912" response_time:0.001353514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"adc0caeca8a21207" x_b3_spanid:"adc0caeca8a21207" x_b3_parentspanid:"-" +¨ã’Æ×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—¯€ØÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.693+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0638b94-9e3f-48ff-6e74-40171f8080b0" response_time:0.001569319 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc52c98a1df9c254" x_b3_spanid:"fc52c98a1df9c254" x_b3_parentspanid:"-" +Úˆ¯€ØÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ѵ®—ÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.546+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"539901fe-54cb-4ee9-6ee9-bcf7df14bafc" response_time:0.002023515 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef26bc31f975a590" x_b3_spanid:"ef26bc31f975a590" x_b3_parentspanid:"-" +«®®—ÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ¬»ìäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.134+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"519d73ff-e639-4871-4f09-1ddb6a6785d4" response_time:0.008448194 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b41a9c3138a0b2e4" x_b3_spanid:"b41a9c3138a0b2e4" x_b3_parentspanid:"-" +™¤»ìäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ˆºéæÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cd3f6121-2105-4891-5c5a-c8ad6d7c5fe1" response_time:0.002217422 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88f414dfd2fa276f" x_b3_spanid:"88f414dfd2fa276f" x_b3_parentspanid:"-" +瀺éæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•‹ÇÚéÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.443+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d4a5f50-e2fa-4e46-5540-5c922cb66c46" response_time:0.004080833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b49b39da23221175" x_b3_spanid:"b49b39da23221175" x_b3_parentspanid:"-" +¾€ÇÚéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àӵܘڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.065+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2c50f81-84bd-4893-7136-e1c7a0f96aa3" response_time:0.001784305 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe452b09951ff3f2" x_b3_spanid:"fe452b09951ff3f2" x_b3_parentspanid:"-" +ßǵܘڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å’­ÿ˜ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.139+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ab7b8f3-b19c-44d6-48fb-da3edabe449a" response_time:0.001715245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac64557d92de2349" x_b3_spanid:"ac64557d92de2349" x_b3_parentspanid:"-" +€‚­ÿ˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼âÓ­§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.994+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d03fca7-c44b-4a33-5d64-cfe01e72d262" response_time:0.001330983 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"570b8d0f51126824" x_b3_spanid:"570b8d0f51126824" x_b3_parentspanid:"-" +µÖÓ­§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ÍŽ¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.197+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27660857-868c-45ee-4edc-8260e092ce8a" response_time:0.001458783 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb75392da6686c0a" x_b3_spanid:"eb75392da6686c0a" x_b3_parentspanid:"-" +ÈÅŽ¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó³ó‰©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.456+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"36bee7a6-3a28-4a52-452c-5e206a6aadd7" response_time:0.001847906 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f5b20f70427a7b04" x_b3_spanid:"f5b20f70427a7b04" x_b3_parentspanid:"-" +á«ó‰©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”œÙö¬×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.410+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7ea915aa-d93e-4e3a-4213-0645485209bf" response_time:0.001961377 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc986f6f74aea421" x_b3_spanid:"cc986f6f74aea421" x_b3_parentspanid:"-" +‹Ùö¬×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚¹ÑݮלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.894+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2845547-4d41-415e-4d05-5af11ec5fdd5" response_time:0.001876619 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a90041e21412df6" x_b3_spanid:"6a90041e21412df6" x_b3_parentspanid:"-" +à²ÑݮלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ߎËþ±×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:24.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"57e70f05-23d7-45a0-7ce3-fd6a8aaffa0b" response_time:0.003952187 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7779266fcd2f532c" x_b3_spanid:"7779266fcd2f532c" x_b3_parentspanid:"-" +Ö‚Ëþ±×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦›°ç³×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:25.257+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b413c86-e7ef-43ca-6b34-4d1f2bf1e3dc" response_time:0.002133787 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a3e1e4071b89ef56" x_b3_spanid:"a3e1e4071b89ef56" x_b3_parentspanid:"-" +•ްç³×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µïø…µ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:25.586+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b7bae341-5569-4e30-48fe-87696e44ddc4" response_time:0.004787652 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe90d9be87f3689f" x_b3_spanid:"fe90d9be87f3689f" x_b3_parentspanid:"-" +—äø…µ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹Ùý‹µ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:25.602+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5e884b9-e2fe-498a-62bb-14f7058aa626" response_time:0.001520434 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10079acc9805014f" x_b3_spanid:"10079acc9805014f" x_b3_parentspanid:"-" +ÍÎý‹µ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ã桶לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:25.916+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"130e464f-8fdd-4c7d-5708-cfb64008f142" response_time:0.001660876 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ee967deed5de7295" x_b3_spanid:"ee967deed5de7295" x_b3_parentspanid:"-" +ÇÑæ¡¶×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ­»·×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.238+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e6db386a-640f-49a6-726f-f59aa91be19c" response_time:0.001771217 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d706db45ecd0b6b9" x_b3_spanid:"d706db45ecd0b6b9" x_b3_parentspanid:"-" +ºÑ­»·×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨û›Í·×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.276+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5528658e-c9bc-45d8-5aa3-3e97117982fe" response_time:0.001892588 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"177cf89627959e02" x_b3_spanid:"177cf89627959e02" x_b3_parentspanid:"-" +„î›Í·×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì¢ºâ¹×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.856+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63b6ff78-ccba-47be-7945-4919fd26b06b" response_time:0.002859642 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c2274d4b836f3d2" x_b3_spanid:"1c2274d4b836f3d2" x_b3_parentspanid:"-" +×—ºâ¹×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹äÃæº×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:27.133+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7c9871c3-f2c5-4cff-47f1-72f63c918669" response_time:0.002649401 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"21b989f88915002c" x_b3_spanid:"21b989f88915002c" x_b3_parentspanid:"-" +¼ØÃæº×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ßΟ»×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:27.254+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29276" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4cdafda-a251-40a0-4651-d4d0a4e38e45" response_time:0.001956436 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ead1c06d5cb1638e" x_b3_spanid:"ead1c06d5cb1638e" x_b3_parentspanid:"-" +„ØÎŸ»×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÌݺ»×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:27.311+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8a3e13c-d0b7-4e3c-4e1a-f912a66d3fb4" response_time:0.001404697 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"524cbc3ab28486d4" x_b3_spanid:"524cbc3ab28486d4" x_b3_parentspanid:"-" +ÄÄݺ»×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±¨–ó¼×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:27.695+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c670a03f-f0c5-4ad4-6ff5-f2eeee861a8e" response_time:0.004266337 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f8dfa402d23de3b" x_b3_spanid:"1f8dfa402d23de3b" x_b3_parentspanid:"-" +º–ó¼×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±”娾לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.074+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac69baee-b570-4afb-7bdf-d952fdd886db" response_time:0.006133222 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e301e39ffd096fbc" x_b3_spanid:"e301e39ffd096fbc" x_b3_parentspanid:"-" +ú‹å¨¾×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓÒŸ¬¾×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.083+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"636720c3-0fe5-4f15-7dc1-2ad6103dce04" response_time:0.004321593 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc7526da8b044169" x_b3_spanid:"fc7526da8b044169" x_b3_parentspanid:"-" +›ÇŸ¬¾×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž³¨ï¾×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.226+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0789f4f3-0ed9-462b-7228-79d117c3805e" response_time:0.001809322 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f52d6e326eea5eea" x_b3_spanid:"f52d6e326eea5eea" x_b3_parentspanid:"-" +¨©¨ï¾×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œÇš€¿×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.262+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c5ca873-a3b1-44d6-7a54-e247e578d2d5" response_time:0.001934861 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11ad32df93ca205d" x_b3_spanid:"11ad32df93ca205d" x_b3_parentspanid:"-" +羚€¿×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í´Ë›ÀלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.586+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31602" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2eefcd5f-d2c9-4bda-51a2-8f47c1494014" response_time:0.003251651 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ea42a7568a1be54b" x_b3_spanid:"ea42a7568a1be54b" x_b3_parentspanid:"-" +´¨Ë›ÀלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿äü¾ÂלÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:29.196+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ad68c6a-b158-4022-7ceb-b75e10dfef19" response_time:0.0042924 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd5930b5aa9de368" x_b3_spanid:"dd5930b5aa9de368" x_b3_parentspanid:"-" +øØü¾ÂלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹Ï†ÃÃלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:29.475+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6cba799-a2d8-4ddf-7145-7b0926c4d588" response_time:0.002307722 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"685dfc51d48870c4" x_b3_spanid:"685dfc51d48870c4" x_b3_parentspanid:"-" +±Ä†ÃÃלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Ï¨ ÄלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:29.671+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28054" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77d3c9f7-ae59-474f-56c8-aa1033e733db" response_time:0.001966626 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"614c1d4b29545863" x_b3_spanid:"614c1d4b29545863" x_b3_parentspanid:"-" +ÕǨ ÄלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ñòúÅלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:30.130+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3839a4bc-7947-428a-7d5f-3ebbf6cfc8e6" response_time:0.001968125 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"900a405329d31abb" x_b3_spanid:"900a405329d31abb" x_b3_parentspanid:"-" +èòúÅלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚…ÇלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:30.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29276" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a68679a3-37cf-46f1-7146-60a387118251" response_time:0.00220583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"66f9422bd58c47b4" x_b3_spanid:"66f9422bd58c47b4" x_b3_parentspanid:"-" +ˆ…ÇלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Èí—ÇלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:30.457+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31602" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"50d3807f-b48a-4355-5dc5-4eb3c7ca6755" response_time:0.003381559 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"912da25981803817" x_b3_spanid:"912da25981803817" x_b3_parentspanid:"-" +ý¾í—ÇלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ú»ŸÈלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:30.743+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be033d4c-c7d6-4c90-7da7-0066fd5e97d5" response_time:0.002265546 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3289194fec2f56da" x_b3_spanid:"3289194fec2f56da" x_b3_parentspanid:"-" +¼î»ŸÈלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÐÕ˜ÉלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:30.997+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24f768ae-d793-4b56-4f57-825f49fadf14" response_time:0.001846781 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eeaab0fa81d4a78f" x_b3_spanid:"eeaab0fa81d4a78f" x_b3_parentspanid:"-" +¢ÄÕ˜ÉלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄѱòÌלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:31.991+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24372945-1070-4f18-4bb6-d79f39e15adb" response_time:0.002025172 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4ee195636ff452c3" x_b3_spanid:"4ee195636ff452c3" x_b3_parentspanid:"-" +ƱòÌלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÛйÍלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.140+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d871fd90-2bed-4a05-720e-65cd135aad62" response_time:0.002197825 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4924010fc4d4204f" x_b3_spanid:"4924010fc4d4204f" x_b3_parentspanid:"-" +ÐÔйÍלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢„ÕÊÍלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.176+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1d929c16-1c6c-43fa-5571-732101f29c31" response_time:0.001613627 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a683dd879086b072" x_b3_spanid:"a683dd879086b072" x_b3_parentspanid:"-" +óüÔÊÍלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒªÍÎלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.450+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08f17d88-3fdf-47a8-4c44-b620ace80406" response_time:0.001813262 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"722e9c092f4cd1ef" x_b3_spanid:"722e9c092f4cd1ef" x_b3_parentspanid:"-" +¶ªÍÎלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö²¶íÎלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.517+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e761913-8ac4-4229-7792-073fbbc1531e" response_time:0.002271064 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cbe1b85f54a25541" x_b3_spanid:"cbe1b85f54a25541" x_b3_parentspanid:"-" +ä—¶íÎלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð·‘ÏלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.592+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"545860bb-e5e1-4c00-6cf8-1bb070089022" response_time:0.002365939 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc5f7a465a89aca3" x_b3_spanid:"fc5f7a465a89aca3" x_b3_parentspanid:"-" +ꪑÏלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÐ‰‰ÐלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.844+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c014582c-42fd-47b8-59e1-9dfab83b2d8d" response_time:0.001806099 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7081f723ce29a69" x_b3_spanid:"d7081f723ce29a69" x_b3_parentspanid:"-" +ùɉ‰ÐלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®‡ÞÄÐלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.969+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51821292-7a12-404c-517b-4ae09a769d0c" response_time:0.001766198 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6551c711cda696a" x_b3_spanid:"e6551c711cda696a" x_b3_parentspanid:"-" +þúÝÄÐלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­î»ÿÐלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.089+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b9472f1-9574-4e66-6b35-7d4787d06498" response_time:0.004561223 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d455863de5a1a184" x_b3_spanid:"d455863de5a1a184" x_b3_parentspanid:"-" +Åä»ÿÐלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ȳƒøÑלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.343+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31602" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18715ef6-51f6-4cac-567f-36c97137edd6" response_time:0.003805363 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ba41a286d65755ba" x_b3_spanid:"ba41a286d65755ba" x_b3_parentspanid:"-" +º«ƒøÑלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Èèó¦ÓלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.712+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58720" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d3808592-c15b-4b7d-5b21-e5dde1ef3352" response_time:0.001740494 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d020f53c096076a" x_b3_spanid:"3d020f53c096076a" x_b3_parentspanid:"-" +©àó¦ÓלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ¿»¥ÔלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.977+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36566" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7a9ddb39-c3f8-4b34-518e-d7dc40727a24" response_time:0.002168077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c591c07dce26aff" x_b3_spanid:"1c591c07dce26aff" x_b3_parentspanid:"-" +°»¥ÔלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šèëÉÔלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:34.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e68d31c5-4551-4867-7d54-7aed78356455" response_time:0.001753946 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b31268eff07691be" x_b3_spanid:"b31268eff07691be" x_b3_parentspanid:"-" +§ÜëÉÔלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ˆ‚ìÕלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:34.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31602" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0c36560-34e0-4bc9-5549-c71bfb3a731a" response_time:0.001989789 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8143bcbbb453478b" x_b3_spanid:"8143bcbbb453478b" x_b3_parentspanid:"-" +åüìÕלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Åã»þ×לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:34.969+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d5bd103-d45f-454e-552c-6ca6a64ada2f" response_time:0.002260824 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06362af0d4cba348" x_b3_spanid:"06362af0d4cba348" x_b3_parentspanid:"-" +÷Ö»þ×לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïˆË›ÚלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:35.567+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7f3125a4-bfcf-4f5c-4a10-c83a386f2393" response_time:0.001713035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d8a6f7c0e86fe396" x_b3_spanid:"d8a6f7c0e86fe396" x_b3_parentspanid:"-" +ÝË›ÚלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü„˜¤ÚלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:35.585+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08f0332c-0e0d-449b-5fd2-5545490a6dff" response_time:0.001739629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aad1f61184639256" x_b3_spanid:"aad1f61184639256" x_b3_parentspanid:"-" +Ÿú—¤ÚלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆšÒÌÝלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:36.475+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9ba62b3-1850-4150-4728-56dcef76b3dd" response_time:0.002248583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05a589b18031aa24" x_b3_spanid:"05a589b18031aa24" x_b3_parentspanid:"-" +ò‘ÒÌÝלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œšžÞלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:36.615+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f887aa03-1c18-45fe-4426-aa40884d512a" response_time:0.001654554 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2055b98e52a8727" x_b3_spanid:"e2055b98e52a8727" x_b3_parentspanid:"-" +ÁŽžÞלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏוÿßלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:37.111+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6876d2bf-d0df-408c-7b1c-0802f263c0fd" response_time:0.00882905 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"383e5154506d3c9a" x_b3_spanid:"383e5154506d3c9a" x_b3_parentspanid:"-" +§Ð•ÿßלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’¢ àלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:37.183+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24941279-54f0-43d7-5560-0abe4451334f" response_time:0.005878381 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45ad9a4277cbff1e" x_b3_spanid:"45ad9a4277cbff1e" x_b3_parentspanid:"-" +¸…¢ àלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0̦…²àלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:37.225+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58720" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42f405e7-bd10-47a1-72f2-4fbd2e31823d" response_time:0.001909129 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05b4e4109ef0f165" x_b3_spanid:"05b4e4109ef0f165" x_b3_parentspanid:"-" +㟅²àלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êóä¸àלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:37.236+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9112955c-7fe8-493d-7f51-698c7236b691" response_time:0.00454434 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"85c0d82d2a9cad11" x_b3_spanid:"85c0d82d2a9cad11" x_b3_parentspanid:"-" +ýèä¸àלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ر˜áלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:37.390+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36566" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"862e7048-2c1b-451c-499a-ba99218554da" response_time:0.002895198 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4d6c5b27b43ece6" x_b3_spanid:"c4d6c5b27b43ece6" x_b3_parentspanid:"-" +Í¥˜áלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²¯ìªáלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:37.477+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0fd1115e-c808-4db9-792d-dc5b405db6f3" response_time:0.002440772 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"56d37f1e8cc33923" x_b3_spanid:"56d37f1e8cc33923" x_b3_parentspanid:"-" +Ž¢ìªáלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïÃò¤ãלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:38.002+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02a9f18d-5dfc-4c60-6eb7-02a92c4fe9e5" response_time:0.002503418 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f520c149109c85d9" x_b3_spanid:"f520c149109c85d9" x_b3_parentspanid:"-" +µ¹ò¤ãלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼µëåãלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:38.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31602" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2009c6e2-1b71-45a9-7602-84ba0832f635" response_time:0.002963529 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"66c3417447f8e79b" x_b3_spanid:"66c3417447f8e79b" x_b3_parentspanid:"-" +å¬ëåãלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ê©¾¶äלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:38.308+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e956ca43-d5e5-48dd-5b08-3a2eec542d97" response_time:0.001399943 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a94f760ad4b36ce" x_b3_spanid:"7a94f760ad4b36ce" x_b3_parentspanid:"-" +¶¾¶äלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï‹ÿ„æ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:38.741+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56580" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5abe2539-2a4f-4acb-6079-f755766b214f" response_time:0.001566396 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e1502a1d397de2e" x_b3_spanid:"2e1502a1d397de2e" x_b3_parentspanid:"-" +¸þþ„æ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìæ…çלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:39.010+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8ef64ed-4867-48d7-5561-7109081df5cd" response_time:0.001357592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4b57fefb0cc4f0f0" x_b3_spanid:"4b57fefb0cc4f0f0" x_b3_parentspanid:"-" +Í×…çלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ì±îלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:40.982+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26161" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d33f547b-8f2c-48eb-7092-0096d78bfd42" response_time:0.001597143 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5be55cf5273b01d3" x_b3_spanid:"5be55cf5273b01d3" x_b3_parentspanid:"-" +Äå±îלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£¨üìðלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:41.643+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26043" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2cea9b5b-f4db-426d-780f-84b69f53d582" response_time:0.001984059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08f16761af53e57f" x_b3_spanid:"08f16761af53e57f" x_b3_parentspanid:"-" +¸ŽûìðלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊŒœµñלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:41.795+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d05563e1-5e46-4d5c-7593-88d2aef43b08" response_time:0.001282275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a682fd050665e460" x_b3_spanid:"a682fd050665e460" x_b3_parentspanid:"-" +…œµñלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°’ÎÿòלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:42.219+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26091" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"97dfd223-ddac-4da2-5062-4b13b5b81d04" response_time:0.00157347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8188709ac97a5a3" x_b3_spanid:"b8188709ac97a5a3" x_b3_parentspanid:"-" +ã…ÎÿòלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0б£êôלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:42.711+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"96ef6eeb-c12a-47ab-4972-8c0b37889799" response_time:0.002536686 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d6b6070d9684f59" x_b3_spanid:"3d6b6070d9684f59" x_b3_parentspanid:"-" +ؤ£êôלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕƒðöלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:43.261+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bea2d268-ed01-4937-42cd-17b60e9d1188" response_time:0.001386025 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6195a5704cee7f12" x_b3_spanid:"6195a5704cee7f12" x_b3_parentspanid:"-" +õô‚ðöלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û¯ïø×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:43.796+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26043" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4a98135c-014f-424b-70aa-9f2671e01d9b" response_time:0.001715156 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9c1f0cf888410fc8" x_b3_spanid:"9c1f0cf888410fc8" x_b3_parentspanid:"-" +¨ó¯ïø×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0è¾’½üלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.762+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56580" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5ec1e0ed-ee62-46ac-7a00-694076071e66" response_time:0.004259598 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d535f94d829c3633" x_b3_spanid:"d535f94d829c3633" x_b3_parentspanid:"-" +ï²’½üלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ÂÜÂüלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.774+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b51e206e-f156-4e13-7369-83a80fa96abf" response_time:0.003838694 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c603e69d288b4400" x_b3_spanid:"c603e69d288b4400" x_b3_parentspanid:"-" +‰»ÜÂüלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ•£ÑýלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.075+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"558b9771-f77d-40a5-485a-2b82e0bea922" response_time:0.001903535 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0121779e0c68524b" x_b3_spanid:"0121779e0c68524b" x_b3_parentspanid:"-" +”Ž£ÑýלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í‹ËÛÿלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.633+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57122" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b1ec4661-ed06-4aaf-4a8a-78058c3ded89" response_time:0.001876677 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b2ea3d5a22bbca5" x_b3_spanid:"9b2ea3d5a22bbca5" x_b3_parentspanid:"-" +ö€ËÛÿלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßºó€€ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.709+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58356" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"571541b9-e5c1-4827-555a-38c9ba9211f1" response_time:0.004568549 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ea5537dda075743a" x_b3_spanid:"ea5537dda075743a" x_b3_parentspanid:"-" +›±ó€€ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉÀ¬žìלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:40.405+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3e3c2527-4c1f-424e-5546-c066b83c055c" response_time:0.001397282 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc7d3a1fdd184ec2" x_b3_spanid:"cc7d3a1fdd184ec2" x_b3_parentspanid:"-" +¢¶¬žìלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÇý£íלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:40.685+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58358" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef787881-c3e1-4d36-61f2-eb1c63b22e3a" response_time:0.002010326 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78a4d611165089b8" x_b3_spanid:"78a4d611165089b8" x_b3_parentspanid:"-" +ˆ»ý£íלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™„©ÍíלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:40.771+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"beaf43a9-df9f-464a-4efd-ba5a3e83a87b" response_time:0.002082578 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1052c9e8d19dd09c" x_b3_spanid:"1052c9e8d19dd09c" x_b3_parentspanid:"-" +÷é¨ÍíלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’º—ÄîלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:41.020+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57122" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5fe9eb43-7c7b-493e-5cfd-39901553400a" response_time:0.002360828 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4ba710c4d089807c" x_b3_spanid:"4ba710c4d089807c" x_b3_parentspanid:"-" +š¯—ÄîלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«äžØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.012+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"57f35ede-4092-4350-4d7b-041bb9674c5f" response_time:0.002219699 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ede0a34f832d91d4" x_b3_spanid:"ede0a34f832d91d4" x_b3_parentspanid:"-" +çܞ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜Ä؆õלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:42.765+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:50228" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1c16444f-0309-4164-70cb-db3abd7bcb54" response_time:0.007892861 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b0ecb24009f2cdce" x_b3_spanid:"b0ecb24009f2cdce" x_b3_parentspanid:"-" +‡ºØ†õלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â‰Ú‚ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e64f4cad-8ef3-410f-7ee5-15977317d251" response_time:0.001916574 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69b549d7b45f1f99" x_b3_spanid:"69b549d7b45f1f99" x_b3_parentspanid:"-" +Ó…‰Ú‚ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒáȨ…ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26091" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14b2c48d-de08-46d2-65f7-d70920af0742" response_time:0.001442035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"749a0b175e7374e5" x_b3_spanid:"749a0b175e7374e5" x_b3_parentspanid:"-" +ëÕȨ…ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂïÈÅ…ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.198+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"67faa09a-5dc3-4994-5900-6ed67b272e9a" response_time:0.001982986 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c6a3523318bd7f7" x_b3_spanid:"7c6a3523318bd7f7" x_b3_parentspanid:"-" +–åÈÅ…ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùÿ½‰ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.255+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3d16797-389c-4a84-53c2-489a2227e470" response_time:0.001930747 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b81080939f68477" x_b3_spanid:"9b81080939f68477" x_b3_parentspanid:"-" +²íÿ½‰ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëùŸÑŠØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.562+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3dcb0fe7-8dff-46fd-6fe0-921904b6a96b" response_time:0.003942735 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4986fe91c582313" x_b3_spanid:"f4986fe91c582313" x_b3_parentspanid:"-" +ŒóŸÑŠØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œî—‘‹ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.699+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"165ac353-3a11-4291-7a15-64f3bac77e5d" response_time:0.001334422 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02022c09656063e2" x_b3_spanid:"02022c09656063e2" x_b3_parentspanid:"-" +žç—‘‹ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®Àç—ŽØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.518+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26161" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb10dffc-3339-4406-4003-cfd199e14f4d" response_time:0.001579855 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"04b07e423f12f500" x_b3_spanid:"04b07e423f12f500" x_b3_parentspanid:"-" +½´ç—ŽØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø¨Ò”ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.251+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26627" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"827dea00-aac7-4f5c-4e86-f546b1df1efe" response_time:0.001674527 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ba569d49e3db446" x_b3_spanid:"6ba569d49e3db446" x_b3_parentspanid:"-" +ïœÒ”ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€ùÖû–ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.874+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"98249414-179d-4b21-5128-25a3318d4839" response_time:0.002092674 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be718c578eda1dae" x_b3_spanid:"be718c578eda1dae" x_b3_parentspanid:"-" +ŠîÖû–ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À‹˜››ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:53.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26319" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0aceb04a-334a-479e-6e82-f078aae510c5" response_time:0.001554687 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b169fbc31b511829" x_b3_spanid:"b169fbc31b511829" x_b3_parentspanid:"-" +󃘛›ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢¼ò”ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:53.536+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26565" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a741b512-aca3-4ded-5c93-d407c3f99c90" response_time:0.003469059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3a3d66f4142e22d5" x_b3_spanid:"3a3d66f4142e22d5" x_b3_parentspanid:"-" +ɲò”ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”²ŠØØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:53.679+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24213" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5330c09a-aa0d-4580-4a98-1ac666799f5b" response_time:0.001875654 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd6d04b508e9d57d" x_b3_spanid:"bd6d04b508e9d57d" x_b3_parentspanid:"-" +ô§ŠØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì—”˜ŸØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.082+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26091" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3de2e2e7-381e-4fd7-78ad-6b08cffd1b03" response_time:0.001912062 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"46af36fb587fe0e7" x_b3_spanid:"46af36fb587fe0e7" x_b3_parentspanid:"-" +¸”˜ŸØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡âÔÆ¡ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.715+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8d1b8a12-f23f-43ab-4e22-d855b6bdba1c" response_time:0.002816219 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f99ba22465c3b0f" x_b3_spanid:"1f99ba22465c3b0f" x_b3_parentspanid:"-" +ÊÚÔÆ¡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž°Ê“¦ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.951+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5efe9841-ea34-4621-5769-bf185cf98fa2" response_time:0.002056575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a25f606cc5cab8b8" x_b3_spanid:"a25f606cc5cab8b8" x_b3_parentspanid:"-" +§Ê“¦ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÍæÍªØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:57.143+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b23a1e3b-0d14-405f-6657-c4eab0c35bd4" response_time:0.005330033 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a3d4f8713d540fb9" x_b3_spanid:"a3d4f8713d540fb9" x_b3_parentspanid:"-" +¾ÆæÍªØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ®‰ÔªØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:57.160+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69be1cca-1977-44c3-7c1b-89f4c38b0e3c" response_time:0.001984518 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17978273fda321e1" x_b3_spanid:"17978273fda321e1" x_b3_parentspanid:"-" +õ¥‰ÔªØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝÀ¦ç®ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:58.274+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24213" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"663c7961-8b66-47a3-4a4d-37cd36a7fe71" response_time:0.00192454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"72ec279b0ff1dc32" x_b3_spanid:"72ec279b0ff1dc32" x_b3_parentspanid:"-" +ñ·¦ç®ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õγٲ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.315+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26057" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a65ad55-6673-4422-5b79-0187dbfee0f0" response_time:0.005661173 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e379ab6e674d4751" x_b3_spanid:"e379ab6e674d4751" x_b3_parentspanid:"-" +¬Ä³Ù²ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œˆÕ·³ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.512+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7cb94db4-a3dc-415b-6b85-0ed10ef9bc76" response_time:0.006384072 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a0b6a6a77ab941f" x_b3_spanid:"5a0b6a6a77ab941f" x_b3_parentspanid:"-" +ÃýÔ·³ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘ÝàÛ´ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.857+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:37220" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb76de91-b268-418d-6a84-ae14ca9f4ac4" response_time:0.005814307 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd8c687beb09a515" x_b3_spanid:"bd8c687beb09a515" x_b3_parentspanid:"-" +‡ÎàÛ´ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó×¢Á•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.202+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"95d85755-c4c8-47df-57fe-6903fcd04d85" response_time:0.003122396 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"21d2accc2738367c" x_b3_spanid:"21d2accc2738367c" x_b3_parentspanid:"-" +—Ç Á•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þ»»à™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.342+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7c82218-b934-460e-65ca-2a94a8a44079" response_time:0.001922237 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eafedf74c9f960cb" x_b3_spanid:"eafedf74c9f960cb" x_b3_parentspanid:"-" +û­»à™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ÿ¶Ê¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f5ca37d-0760-44a7-6088-6c968590733d" response_time:0.001370049 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9871a41adad6009a" x_b3_spanid:"9871a41adad6009a" x_b3_parentspanid:"-" +ÿ÷¶Ê¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0씘ªڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.842+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5726c1e3-f5dd-4433-5b9a-d6a29b216b46" response_time:0.001980972 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"33456bbbfd417eca" x_b3_spanid:"33456bbbfd417eca" x_b3_parentspanid:"-" +¼˜ÂªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0œ‚õÝ”×›ÖBR + Exit status 1ÛóôÝ”×›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79* APP/PROC/WEB20jcf-cfapps-io2-diegor cell_2xl_z1z$94da9a41-fb12-4711-aa3e-b3fc2b2473a6‚ 10.10.147.127 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +cloud_controller0«…à¯Ñ‹œÖBß +¢Updated app with guid 6ff0a336-5527-401d-817f-2a900b7ffd79 ({"name"=>"java-main-application", "instances"=>1, "memory"=>1024, "stack_guid"=>"86205f38-84fc-4bc2-b2b8-af7f55669f04", "buildpack"=>"https://github.com/cloudfoundry/java-buildpack.git", "environment_json"=>"PRIVATE DATA HIDDEN"})ª…à¯Ñ‹œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*API22j cf-cfapps-io2rapi_z1z$82943554-a713-40c8-b5b2-7c85b6848cee‚ 10.10.17.12 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ò“ǮɜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:07:22.805+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6328" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc023490-edc5-413b-7f87-5b8ac045d0a2" response_time:0.007184731 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9922e3f1e12064cf" x_b3_spanid:"9922e3f1e12064cf" x_b3_parentspanid:"-" +Ýç“ǮɜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü윤»ÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:00.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29722" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"019fa426-b1e8-4dd4-4cba-4fd3c64354b4" response_time:0.006282002 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"607985130f491007" x_b3_spanid:"607985130f491007" x_b3_parentspanid:"-" +·Þœ¤»ÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0̸†û¾ÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:01.574+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6b84fd08-f889-4ff8-51e3-3a351c9bd463" response_time:0.002338552 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05c56e61834d7d83" x_b3_spanid:"05c56e61834d7d83" x_b3_parentspanid:"-" +뫆û¾ÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓŒý›¿ÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:01.642+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e3153af-ae69-40a1-7276-08e1c91123e9" response_time:0.003376516 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c442c3551144ec3" x_b3_spanid:"1c442c3551144ec3" x_b3_parentspanid:"-" +¤…ý›¿ÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»œ¢º¿ÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:01.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29698" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f643fbef-15a4-4308-78d9-105709968aed" response_time:0.006635216 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b94985631d7f82d6" x_b3_spanid:"b94985631d7f82d6" x_b3_parentspanid:"-" +Þ”¢º¿ÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ð¿ÅÀÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:01.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43747" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20b26b84-704f-4e15-7977-3d6ad797c04e" response_time:0.002452601 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a098b75029f8727c" x_b3_spanid:"a098b75029f8727c" x_b3_parentspanid:"-" +¬å¿ÅÀÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æŽÄ·ÂÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:02.506+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05fb720a-9675-4bd9-77d6-a9aca80bdb1e" response_time:0.002426506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7ef4ef618697e843" x_b3_spanid:"7ef4ef618697e843" x_b3_parentspanid:"-" +¢„Ä·ÂÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…Š„ÆÂÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:02.537+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ae9165c0-f04b-49b2-6470-f60978e2bcfb" response_time:0.002027887 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"369d108970bae650" x_b3_spanid:"369d108970bae650" x_b3_parentspanid:"-" +º‚„ÆÂÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ˆóºÃÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:02.782+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62e1e12b-fe30-4cdf-7a90-2bd5ca3703be" response_time:0.002306312 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38c85850daa09706" x_b3_spanid:"38c85850daa09706" x_b3_parentspanid:"-" +ºüòºÃÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ä¶ÉÄÃÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:02.802+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29142" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1cd4c6c6-adc8-48af-4220-01e4b7950ff4" response_time:0.002522667 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"064bef00dd986504" x_b3_spanid:"064bef00dd986504" x_b3_parentspanid:"-" +®ÉÄÃÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õÕÐÐÄÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:03.094+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1f50eeed-6b51-47d3-6e5f-f19c1a04f986" response_time:0.003337387 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c31b279db47ff873" x_b3_spanid:"c31b279db47ff873" x_b3_parentspanid:"-" +ðÈÐÐÄÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô…ÈõÅÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:03.438+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b9b1d78-9cb0-4c1a-4ffa-c68c92e39c13" response_time:0.005829256 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c83db7ec0654b6d2" x_b3_spanid:"c83db7ec0654b6d2" x_b3_parentspanid:"-" +÷ùÇõÅÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÂ‹‹ÆÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:03.486+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1174b4cd-1a88-43b9-7f91-82530d79bda0" response_time:0.003084556 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5d454ceb0199850c" x_b3_spanid:"5d454ceb0199850c" x_b3_parentspanid:"-" +Ò²‹‹ÆÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßËÕÇÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:03.911+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43853" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"883296cd-0207-4c64-5e3b-45be6d25505c" response_time:0.001687026 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75f7e5a39c9185e7" x_b3_spanid:"75f7e5a39c9185e7" x_b3_parentspanid:"-" +’ÀÕÇÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž¹þÕÈÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:04.181+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43747" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"166931be-df81-4840-4cd1-ca50a6d094be" response_time:0.001792439 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2a7d0395ab85e43f" x_b3_spanid:"2a7d0395ab85e43f" x_b3_parentspanid:"-" +Å«þÕÈÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±¿‘ÙÉÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:04.456+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:39299" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"366d00e9-40f7-4d43-72b7-3cb16754f4f1" response_time:0.002306194 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a10f7fca734f113f" x_b3_spanid:"a10f7fca734f113f" x_b3_parentspanid:"-" +€·‘ÙÉÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î½£ƒÌÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:05.079+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3504df3c-5208-485c-7e4e-fc67a11bc652" response_time:0.004307896 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88cb4a7eaa26e86e" x_b3_spanid:"88cb4a7eaa26e86e" x_b3_parentspanid:"-" +ª¶£ƒÌÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šÓý²ÌÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:05.181+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bef96aa9-5397-4061-6d76-792401af427b" response_time:0.001765298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70b5cd8131836399" x_b3_spanid:"70b5cd8131836399" x_b3_parentspanid:"-" +ÜÈý²ÌÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òÍÙÉÌÊœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:08:05.229+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51acf0e5-0471-441c-74c0-102e39869106" response_time:0.0016798 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff0a7cdd1f4db275" x_b3_spanid:"ff0a7cdd1f4db275" x_b3_parentspanid:"-" +áÅÙÉÌÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡¤®ÍÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:05.440+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29172" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3fc0e8af-5b26-4d0b-7d91-31932a9c63b2" response_time:0.00156976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b99d4ffb580d944" x_b3_spanid:"3b99d4ffb580d944" x_b3_parentspanid:"-" +¾„¤®ÍÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹“Â¥ÎÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:05.690+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27760" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e6456e8-5ec7-4350-78ee-5a11df1477a1" response_time:0.001900148 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3dcfa31d4b4fbecf" x_b3_spanid:"3dcfa31d4b4fbecf" x_b3_parentspanid:"-" +‚ŒÂ¥ÎÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷¸¦®ÎÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:05.707+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27760" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4a574737-53d4-4728-4780-93c1a03b4e41" response_time:0.002959636 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0df3968823acf9e6" x_b3_spanid:"0df3968823acf9e6" x_b3_parentspanid:"-" +¥®¦®ÎÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô°…õÎÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:05.856+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27760" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7e4a81d-4950-49a4-5843-66f5218a2399" response_time:0.002219619 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac965299f421ade9" x_b3_spanid:"ac965299f421ade9" x_b3_parentspanid:"-" +稅õÎÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†Úý·ÏÊœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:08:05.997+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59681029-ea24-43ca-6ceb-ee2166253e85" response_time:0.00191059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d79104c8ade319dc" x_b3_spanid:"d79104c8ade319dc" x_b3_parentspanid:"-" +‡Òý·ÏÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œÆ·ÄÐÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:06.292+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:39299" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab66d1af-f4bf-4efb-6fd9-89d329db7b77" response_time:0.001914205 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"424b56d22e6099a4" x_b3_spanid:"424b56d22e6099a4" x_b3_parentspanid:"-" +º¾·ÄÐÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚÐÿ–ÑÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:06.465+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42329" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7565198-b850-4cc9-4c5b-4673d22f984a" response_time:0.001646519 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a556d8a40301cb5f" x_b3_spanid:"a556d8a40301cb5f" x_b3_parentspanid:"-" +èÅÿ–ÑÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øü›ÎÑÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:06.580+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9938ff5e-d93a-4309-46c3-21e2e11daa25" response_time:0.002371486 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ad3be6a80f57a2f" x_b3_spanid:"5ad3be6a80f57a2f" x_b3_parentspanid:"-" +×ñ›ÎÑÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ¨ëßÑÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:06.618+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28298" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64e73396-5682-4068-476e-8e658ba0d3be" response_time:0.001763892 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b8055ea796a94bb" x_b3_spanid:"6b8055ea796a94bb" x_b3_parentspanid:"-" +ОëßÑÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹©ÈèÒÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:06.905+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45479" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"57408e21-7322-4d3b-663b-fcaa6e95c7e7" response_time:0.001534252 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dfc80bad314ca981" x_b3_spanid:"dfc80bad314ca981" x_b3_parentspanid:"-" +”žÈèÒÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áŸÈ¡ÔÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:07.292+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce9c8c16-020f-4106-48d0-ba058f8efc2f" response_time:0.001569929 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e84fe0d1ad68d05" x_b3_spanid:"0e84fe0d1ad68d05" x_b3_parentspanid:"-" +«”È¡ÔÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â‚ÓÿÕÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:07.758+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"932efdcf-fa60-4bf9-77da-45ced5186c9b" response_time:0.001999021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b7cd0fa30fefc23" x_b3_spanid:"9b7cd0fa30fefc23" x_b3_parentspanid:"-" +÷ÒÿÕÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡—ìŽØÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:08.327+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45479" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61fef936-ddd1-4704-6711-dbbb817c38b4" response_time:0.001584099 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa6d8313c7e7ae85" x_b3_spanid:"aa6d8313c7e7ae85" x_b3_parentspanid:"-" +ôŒìŽØÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ¾Ú²ØÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:08.402+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29222" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78494a1e-9a96-42b2-6301-8fcb8fb7aa74" response_time:0.001934696 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b26fa410204721bb" x_b3_spanid:"b26fa410204721bb" x_b3_parentspanid:"-" +ðµÚ²ØÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ѧôÙÚÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:09.021+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4c61888-1540-4fe9-564b-1b03bfa3bec7" response_time:0.001848887 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cef8f5601527ec8e" x_b3_spanid:"cef8f5601527ec8e" x_b3_parentspanid:"-" +€™ôÙÚÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ™×ýÚÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:09.096+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad86fe54-d320-410d-68c5-de59c543470d" response_time:0.001872709 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a74aee92c0599be4" x_b3_spanid:"a74aee92c0599be4" x_b3_parentspanid:"-" +éŒ×ýÚÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÉÉèÝÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:09.857+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29172" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62195b4f-7934-4d49-538f-3069fc27ea5a" response_time:0.002056793 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"34a41e23cfc70c8c" x_b3_spanid:"34a41e23cfc70c8c" x_b3_parentspanid:"-" +ë»ÉèÝÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ð…ßÞÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:10.105+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52a799ee-9024-489b-59f3-931dceefaa75" response_time:0.002650388 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da2de7384e3f749b" x_b3_spanid:"da2de7384e3f749b" x_b3_parentspanid:"-" +ÍÇ…ßÞÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•è€àÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:10.443+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29722" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ae0df14-6635-43f1-4d2b-11d8cf3e9104" response_time:0.002425187 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"07161604995aea09" x_b3_spanid:"07161604995aea09" x_b3_parentspanid:"-" +Šß€àÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0쥗„áÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:10.720+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ebc94548-ab49-4bc3-4a47-7ac6892ab9fa" response_time:0.002382037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1fadbad30c7022b7" x_b3_spanid:"1fadbad30c7022b7" x_b3_parentspanid:"-" +Ö—„áÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Îù±¼áÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:10.837+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29698" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"50f0b84b-83f8-4191-5595-2bc842b2b8dd" response_time:0.002789613 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"995f04d654afed65" x_b3_spanid:"995f04d654afed65" x_b3_parentspanid:"-" +áñ±¼áÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†£ÇËáÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:10.866+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8bb8f8f7-53d7-465f-64b3-f2ef93f08f5b" response_time:0.005643115 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7bfaf19779626089" x_b3_spanid:"7bfaf19779626089" x_b3_parentspanid:"-" +ÑœÇËáÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®’ÅóáÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:10.949+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44731" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0775f1f-60eb-443b-467a-4bcbbe897a80" response_time:0.006751933 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d7c1b74fddd66f1" x_b3_spanid:"3d7c1b74fddd66f1" x_b3_parentspanid:"-" +£‹ÅóáÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìͺÀâÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:11.115+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"879c7481-e5b0-49c1-750e-9d78b836c8c8" response_time:0.002180821 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b9748ef75f2076d8" x_b3_spanid:"b9748ef75f2076d8" x_b3_parentspanid:"-" +ªÆºÀâÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’íàËâÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:11.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29174" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fa3dc59e-27b9-400e-74be-1cc2cc384cb2" response_time:0.003853074 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a32a4115edcee85d" x_b3_spanid:"a32a4115edcee85d" x_b3_parentspanid:"-" +ùáàËâÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ìŵãÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:11.359+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27760" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"58d3f914-7195-4fbd-7539-c8d05429bea7" response_time:0.003257228 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ac53d3a8c64df25" x_b3_spanid:"1ac53d3a8c64df25" x_b3_parentspanid:"-" +ÚàŵãÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡Ä׊åÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:11.807+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44103" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e376a207-cc98-4b47-644a-41dcf6f3d124" response_time:0.002024292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"42ef4f5523ecfa86" x_b3_spanid:"42ef4f5523ecfa86" x_b3_parentspanid:"-" +·¸×ŠåÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…±¶›æÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:12.112+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7f139155-0fd8-45e7-5cc7-ea36a785ce5a" response_time:0.001530311 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e7661a131ff3b43" x_b3_spanid:"9e7661a131ff3b43" x_b3_parentspanid:"-" +þ¦¶›æÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ–ø¹æÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:12.175+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d58bf61-064d-429f-493d-1b52778d39ca" response_time:0.00190959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b9df3a6bdbba601" x_b3_spanid:"2b9df3a6bdbba601" x_b3_parentspanid:"-" +ÚŠø¹æÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åûÜÈçÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:12.475+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"67b41d28-e277-4484-5935-29e52371d6d5" response_time:0.001767826 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"73adc8b1c90f79b5" x_b3_spanid:"73adc8b1c90f79b5" x_b3_parentspanid:"-" +þóÜÈçÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º¿®ÐçÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:12.491+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45787" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"634a3d62-4d8b-450c-505d-01b630f6fcdc" response_time:0.001529938 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f051f055d637eeb" x_b3_spanid:"1f051f055d637eeb" x_b3_parentspanid:"-" +Ï·®ÐçÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú€Õ¡éÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:12.929+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b46518b-8ad9-4e13-6e24-4fb088b3d859" response_time:0.002235309 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dce4a5077d15a76c" x_b3_spanid:"dce4a5077d15a76c" x_b3_parentspanid:"-" +ÒøÔ¡éÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿÃÞñêÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:13.366+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27760" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8d7fd94-239b-4638-6552-99fb5b6aeb69" response_time:0.001741124 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f811e7dc475ea24" x_b3_spanid:"3f811e7dc475ea24" x_b3_parentspanid:"-" +Ö¯ÞñêÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±‹ÕÞìÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:13.863+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40343" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"26685511-e891-4c99-4780-dfc3bf220790" response_time:0.001985314 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"677ef8e424fba407" x_b3_spanid:"677ef8e424fba407" x_b3_parentspanid:"-" +¤ÕÞìÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î›’çìÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:13.879+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29698" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0bf68e67-f85e-40a2-7a6f-b7a0ea8c673e" response_time:0.003002952 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e96aa68fc55e81fb" x_b3_spanid:"e96aa68fc55e81fb" x_b3_parentspanid:"-" +¢”’çìÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀŸ«îÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:14.283+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29722" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a60b5716-4a0f-4108-4292-b614a4d3382f" response_time:0.010433944 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1c6f945ce3e4e11" x_b3_spanid:"b1c6f945ce3e4e11" x_b3_parentspanid:"-" +£–Ÿ«îÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»¢Â˜ïÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:14.520+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42329" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd27c221-c5b6-4f54-6d41-5b03037fb4b4" response_time:0.002610248 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c457724464089461" x_b3_spanid:"c457724464089461" x_b3_parentspanid:"-" +îšÂ˜ïÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷·È¦ïÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:14.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27760" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06e8f203-2a4f-440f-63d0-a1a7751c55c1" response_time:0.002156977 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc810ea71ed2f238" x_b3_spanid:"dc810ea71ed2f238" x_b3_parentspanid:"-" +›¯È¦ïÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö’ÞðÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:14.928+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0068ce42-af16-458c-582e-c3c63edccf41" response_time:0.009046831 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69be308a281a2ed4" x_b3_spanid:"69be308a281a2ed4" x_b3_parentspanid:"-" +’ÞðÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü§ñòñÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:15.247+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:46291" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e9311fa5-4a21-470a-44a0-edeedacddd81" response_time:0.002005511 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78eee396d71d90f4" x_b3_spanid:"78eee396d71d90f4" x_b3_parentspanid:"-" +ÏïðòñÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Å«âµóÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:15.655+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5aa89544-a594-4fd3-6930-976e5b968e4d" response_time:0.002457433 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cdae6b8ebe0e4d55" x_b3_spanid:"cdae6b8ebe0e4d55" x_b3_parentspanid:"-" +¹ âµóÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶ÀíÃõÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:16.214+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29698" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bc5ddbec-ecb6-4300-6469-914d3fb91993" response_time:0.010826806 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"510856ffc0fd18a0" x_b3_spanid:"510856ffc0fd18a0" x_b3_parentspanid:"-" +޶íÃõÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶ý˜ËõÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:16.219+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c426208e-b439-4a83-48be-5215400e8b91" response_time:0.020474714 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f15ac3dca32c7ad" x_b3_spanid:"4f15ac3dca32c7ad" x_b3_parentspanid:"-" +î˜ËõÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öª¼ÌõÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:16.232+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a2ac589-0fe8-42a3-62a5-710c59207c16" response_time:0.010637103 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8e14d32e906feac8" x_b3_spanid:"8e14d32e906feac8" x_b3_parentspanid:"-" +…¤¼ÌõÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊÉåö÷ÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:16.863+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29172" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec204fda-09c7-443e-7f30-eb0d68955669" response_time:0.005039648 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f26b94c59c2c9fd4" x_b3_spanid:"f26b94c59c2c9fd4" x_b3_parentspanid:"-" +€½åö÷ÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í…ñ÷ùÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:17.405+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29198" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5d8ab9c-16e1-4528-64d8-3070520ccc30" response_time:0.002389877 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d585fea96c5bf316" x_b3_spanid:"d585fea96c5bf316" x_b3_parentspanid:"-" +Ÿúð÷ùÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨ÚÞƒúÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:17.430+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29172" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e6362851-cbee-4fb9-692e-8c5533e37000" response_time:0.002390637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"35cada8be2f78b2f" x_b3_spanid:"35cada8be2f78b2f" x_b3_parentspanid:"-" +ÜÒÞƒúÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ—ç³ûÊœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:08:17.799+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43853" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a64c34e-8fc2-4d33-70d8-56c909e0313a" response_time:0.00182281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e88f49e2a9352cc1" x_b3_spanid:"e88f49e2a9352cc1" x_b3_parentspanid:"-" +—‹ç³ûÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤”ö½ûÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:17.818+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29622" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7cde549d-7ce3-46e0-5c1e-aeac951925ec" response_time:0.004191333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dfd053f5ecc2b444" x_b3_spanid:"dfd053f5ecc2b444" x_b3_parentspanid:"-" +­‡ö½ûÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÎúÁüÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:18.098+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44103" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"324073f8-8226-4e10-4125-76c4591f75cd" response_time:0.001910014 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6dc1e8011008275" x_b3_spanid:"e6dc1e8011008275" x_b3_parentspanid:"-" +¿ÇúÁüÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆõæÜüÊœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:18.153+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f11ecb9-0479-4757-5f66-b3832b802184" response_time:0.002366596 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"475af797aaeaff9e" x_b3_spanid:"475af797aaeaff9e" x_b3_parentspanid:"-" +¿êæÜüÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Ôû¤þÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:18.572+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45611" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"af697013-f713-40eb-6f9e-ba1e0939a6aa" response_time:0.003355071 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d578b3a2d38b476d" x_b3_spanid:"d578b3a2d38b476d" x_b3_parentspanid:"-" +»Ìû¤þÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ïŒøþÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:18.733+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43073" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f25509a-b98f-4036-62e8-4e2ccf993155" response_time:0.015989041 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31345783fb173b12" x_b3_spanid:"31345783fb173b12" x_b3_parentspanid:"-" +«çŒøþÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ê“ˆœÿÊœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:18.823+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cbd5a669-10af-4679-4ceb-5764e72b89d5" response_time:0.002233218 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f9b89304adc6235e" x_b3_spanid:"f9b89304adc6235e" x_b3_parentspanid:"-" +’†ˆœÿÊœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»Øµ‡€ËœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:19.047+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28298" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c23cf29b-4327-46ca-74ad-c725a945cc0e" response_time:0.003055449 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b01b7aa492a30646" x_b3_spanid:"b01b7aa492a30646" x_b3_parentspanid:"-" +Ô̵‡€ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0вš”€ËœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:19.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29174" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b53e1f51-ddaa-43f0-48bd-d932b75f358e" response_time:0.007203391 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b2a70411900907b" x_b3_spanid:"9b2a70411900907b" x_b3_parentspanid:"-" +ö§š”€ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý™‹ð€ËœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:19.268+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29142" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52fd0620-36fa-4637-7447-5695bdfece62" response_time:0.001909412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94138d93bc70f85b" x_b3_spanid:"94138d93bc70f85b" x_b3_parentspanid:"-" +«“‹ð€ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›À¶ËœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:19.303+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26682" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a1e3cff1-41a3-4ac2-40f7-b48887bc4a9d" response_time:0.003404235 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d888b4d5b6d64c9" x_b3_spanid:"0d888b4d5b6d64c9" x_b3_parentspanid:"-" +ßµ¶ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çŠïÝËœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:19.497+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29622" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7ade084-2573-435d-7047-412966f13130" response_time:0.003395305 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c3bfcf0c8f619f9" x_b3_spanid:"4c3bfcf0c8f619f9" x_b3_parentspanid:"-" +Ë€ïÝËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯÷çãƒËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:20.047+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5690e86d-92fa-48d6-7255-4af8cb9ddd65" response_time:0.002128567 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00e430b615cbf3c7" x_b3_spanid:"00e430b615cbf3c7" x_b3_parentspanid:"-" +‚ïçãƒËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›àÓëƒËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:20.063+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:45353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b78a075d-7b0f-4ddf-6abb-b6608d1cabbe" response_time:0.002587587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a19c9f964fa9e2b" x_b3_spanid:"7a19c9f964fa9e2b" x_b3_parentspanid:"-" +®ØÓëƒËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑÇìÞ„ËœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:08:20.305+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29622" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75111367-1a61-4540-5ae7-97b1907cde6f" response_time:0.002158004 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3afdffda8f6c4c30" x_b3_spanid:"3afdffda8f6c4c30" x_b3_parentspanid:"-" +ƸìÞ„ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åò‡È…ËœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:08:20.526+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:46277" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1aec29ea-9dfa-4243-4c99-e4d4d5da6b64" response_time:0.00195794 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b41122a5156cd06" x_b3_spanid:"9b41122a5156cd06" x_b3_parentspanid:"-" +âæ‡È…ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ñªæ…ËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:20.590+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:46277" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"020d7612-454e-41a8-4301-20e24859963c" response_time:0.002131536 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ad997e180eec97f" x_b3_spanid:"6ad997e180eec97f" x_b3_parentspanid:"-" +Îåªæ…ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Š¾Ï†ËœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:08:20.809+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29172" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90a506b7-94a3-4ad1-69d2-426f270f7515" response_time:0.0018797 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"052fe6f7eff12fc4" x_b3_spanid:"052fe6f7eff12fc4" x_b3_parentspanid:"-" +›´Ï†ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôœß‡ËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:21.111+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43747" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bad0456-1a35-42b1-4cfd-86f629a1376e" response_time:0.002012868 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5aaceba73a7d02bf" x_b3_spanid:"5aaceba73a7d02bf" x_b3_parentspanid:"-" +Ǖ߇˜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹îÛ›ýØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.314+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7793f68-3135-41f8-6188-332ebdf6a607" response_time:0.010383165 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44da1bdb95923dd7" x_b3_spanid:"44da1bdb95923dd7" x_b3_parentspanid:"-" +¨âÛ›ýØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ã”î«òØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:16.403+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30838" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"72f15771-6cc2-477a-4c8f-7530083c4888" response_time:0.00202965 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"281f6deae54d92a1" x_b3_spanid:"281f6deae54d92a1" x_b3_parentspanid:"-" +°ˆî«òØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›à•Ç÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.800+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c820fa50-409f-413a-5b82-3e8938f56751" response_time:0.004905987 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e20f1463a5bbb5c" x_b3_spanid:"2e20f1463a5bbb5c" x_b3_parentspanid:"-" +¾Ø•Ç÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•Åä‹‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.631+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6c87808-8357-4b40-7898-8913bf27b637" response_time:0.001463231 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"760baf64bd9639a4" x_b3_spanid:"760baf64bd9639a4" x_b3_parentspanid:"-" +ɻ䋂ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸ ƒ¨ƒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.959+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"996cccb4-6297-44c3-6aae-66154cf88413" response_time:0.001395784 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4de6616bf3b6f1f7" x_b3_spanid:"4de6616bf3b6f1f7" x_b3_parentspanid:"-" +è’ƒ¨ƒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ïœ»£„ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.217+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29708" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef0b02d5-b121-40d6-5e6e-e9ae00222c34" response_time:0.001914522 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4a3ce6535499f525" x_b3_spanid:"4a3ce6535499f525" x_b3_parentspanid:"-" +ê‘»£„ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªð¾÷„ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"230789de-e65d-44c9-76cf-0fa5d14b8574" response_time:0.001786952 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b0c22217f92f5121" x_b3_spanid:"b0c22217f92f5121" x_b3_parentspanid:"-" +³ä¾÷„ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œàÜÞ„ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:21.336+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"022b7700-e8b9-4156-564d-9ad64122ac8e" response_time:0.00741145 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78bc5e2aba8843cd" x_b3_spanid:"78bc5e2aba8843cd" x_b3_parentspanid:"-" +ÒÔÜÞ„ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í¹Çœ‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.546+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a3f7615-4c93-4a72-47f5-50202c353c26" response_time:0.001358079 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"609f59b6603b755f" x_b3_spanid:"609f59b6603b755f" x_b3_parentspanid:"-" +ª¯Çœ‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—«×ÍŠÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:22.917+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29708" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8c60049-3b9e-40ae-6e06-9a2c1dd7f30c" response_time:0.00167637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"139710d4af1deb8c" x_b3_spanid:"139710d4af1deb8c" x_b3_parentspanid:"-" +Ñ£×ÍŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÓëðŠÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:22.991+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bc9ad66a-b012-47a4-79ae-0bdfe9031dcb" response_time:0.0015234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eaf3bd69fcbb983a" x_b3_spanid:"eaf3bd69fcbb983a" x_b3_parentspanid:"-" +ÈÉëðŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Úâ·Ž’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.932+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f509b27-f15b-4f21-582c-03d3ee8dad3b" response_time:0.001484464 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a13fa2d116f0651f" x_b3_spanid:"a13fa2d116f0651f" x_b3_parentspanid:"-" +þÔ·Ž’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜŠ©Þ”ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.636+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29708" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f601da70-50e4-4b29-51dd-8547f39c1b46" response_time:0.001712995 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3841486dfcec6cc8" x_b3_spanid:"3841486dfcec6cc8" x_b3_parentspanid:"-" +Óþ¨Þ”ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢™¼ð–ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.209+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34514" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e1aed044-2f78-4624-51b9-810fe3533a65" response_time:0.003588408 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3861cde1be4e3764" x_b3_spanid:"3861cde1be4e3764" x_b3_parentspanid:"-" +ì¼ð–ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯Ö¬Á›ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:27.454+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49225698-89ce-4403-6984-bb3b2a1fe2fa" response_time:0.00160138 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cb181da4e053e5c" x_b3_spanid:"1cb181da4e053e5c" x_b3_parentspanid:"-" +ÜȬÁ›ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù¸³Ø›ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.503+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7be6ca1-9d9d-4f44-5a0b-44dc0eca1abe" response_time:0.001500688 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a057274becbeeb88" x_b3_spanid:"a057274becbeeb88" x_b3_parentspanid:"-" +­³Ø›ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ΠŽûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.112+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b3a3749-c6f1-4962-41e9-eb8ceec4c390" response_time:0.001694121 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fbac51998f47d209" x_b3_spanid:"fbac51998f47d209" x_b3_parentspanid:"-" +Ÿ•ŽûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìëÑŠžÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.145+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cddf4f4d-31fb-46bd-7e59-60c08bb4a355" response_time:0.001955885 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a059fdc20744fe7" x_b3_spanid:"5a059fdc20744fe7" x_b3_parentspanid:"-" +þâÑŠžÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ù¿Þ ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.857+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8eb715f6-5915-4b36-604c-705537a8d49a" response_time:0.001920857 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc0c776aa8365dc4" x_b3_spanid:"cc0c776aa8365dc4" x_b3_parentspanid:"-" +´ä¿Þ ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª‡ž¡ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.990+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9d66e74-de72-4108-6c3d-2481dbd9198f" response_time:0.002303869 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"16c0e956565e26b5" x_b3_spanid:"16c0e956565e26b5" x_b3_parentspanid:"-" +ŠÿŽž¡ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’éɈ‘ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.651+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34514" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8c1f48c-d494-4834-4d86-b2465d0e13a7" response_time:0.001581971 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e3179789c2e20d58" x_b3_spanid:"e3179789c2e20d58" x_b3_parentspanid:"-" +åÜɈ‘ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åÛÕµ¦ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8935d63-9aab-42f8-5107-c169686e5f7d" response_time:0.001904599 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4bfe55bbf9d3bad3" x_b3_spanid:"4bfe55bbf9d3bad3" x_b3_parentspanid:"-" +ÔÕµ¦ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢Óߨ§ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:30.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33964" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1a41504e-470a-4da9-66fd-9c28b1cc3a24" response_time:0.00206108 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d5340837a037dbc" x_b3_spanid:"1d5340837a037dbc" x_b3_parentspanid:"-" +¯Åߨ§ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒðŸþ§ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.802+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28058" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2daa4de-77f8-4303-52a6-e7b74b3da9e3" response_time:0.003204003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e14958dd784f2ce" x_b3_spanid:"1e14958dd784f2ce" x_b3_parentspanid:"-" +ŠâŸþ§ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùä„©ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.085+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35160" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7782c0c7-89cc-4cf1-669f-8dd1885a5fcd" response_time:0.001894889 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa12c0cb3b3f1eb4" x_b3_spanid:"aa12c0cb3b3f1eb4" x_b3_parentspanid:"-" +¢òã„©ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üܼҮٜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:32.585+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33848" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"58db237e-79a1-4519-43eb-4b528d758fad" response_time:0.00683933 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3ccbb1c6927e4f86" x_b3_spanid:"3ccbb1c6927e4f86" x_b3_parentspanid:"-" +¨Õ¼Ò®ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ퉿¹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e1e2cf6-a493-41c5-7ec6-697a635b0a1c" response_time:0.002041125 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d61bbf8b119817f4" x_b3_spanid:"d61bbf8b119817f4" x_b3_parentspanid:"-" +Þæ‰¿¹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·–¦‡ÇÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.141+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8271e960-a5b3-4be0-7b83-160ff082c42f" response_time:0.003643824 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a085dc73bce830d" x_b3_spanid:"1a085dc73bce830d" x_b3_parentspanid:"-" +ω¦‡ÇÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0É¥ ¦ÈÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.477+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"757b300d-bd2d-4bb1-416f-79f95e05b6ca" response_time:0.001864658 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cbdc17b860506df0" x_b3_spanid:"cbdc17b860506df0" x_b3_parentspanid:"-" +”• ¦ÈÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºäÉÑ´ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.199+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1db6444e-ca7d-40d0-7d31-a67ef94b7628" response_time:0.001815664 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da02a6fb983e93ab" x_b3_spanid:"da02a6fb983e93ab" x_b3_parentspanid:"-" +ÃÙÉÑ´ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒÕéÚ¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.755+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"71a29286-5e09-4aaa-420a-0439eb5ea77a" response_time:0.001959484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e5cbe86c46026ee" x_b3_spanid:"9e5cbe86c46026ee" x_b3_parentspanid:"-" +ìÍéÚ¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸÏµ¹ÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.054+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"817fdc3d-3fa5-4add-6de2-f39e306694a2" response_time:0.001632042 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc09b6ed79629c52" x_b3_spanid:"dc09b6ed79629c52" x_b3_parentspanid:"-" +Öõ¹ÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖݹÆÉÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:39.808+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"767b244f-7025-4fc7-727d-dcce2fa8a64e" response_time:0.00679072 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"22b570a4e4a1bea5" x_b3_spanid:"22b570a4e4a1bea5" x_b3_parentspanid:"-" +ØÖ¹ÆÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³Èë½ÌÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:40.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"37fc2d32-2ef7-4045-5632-eea47ac01b1b" response_time:0.002927254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"392e2a2089af34e8" x_b3_spanid:"392e2a2089af34e8" x_b3_parentspanid:"-" +²¼ë½ÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂÓåˆÎÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:41.024+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e35d4771-5b02-47d9-4a05-2248a31531fd" response_time:0.002940261 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b904000ea2fa627a" x_b3_spanid:"b904000ea2fa627a" x_b3_parentspanid:"-" +®†ÙˆÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŃÁ¸ÏÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"435234b3-8df7-479d-57e6-6dd53928494b" response_time:0.002233859 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39d6c03d402aae88" x_b3_spanid:"39d6c03d402aae88" x_b3_parentspanid:"-" +ÙöÀ¸ÏÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ïôöÏÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.525+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"280567c3-d9a8-4e6e-6de2-0f45b3c6ad6b" response_time:0.002067559 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"586703bac2ce7014" x_b3_spanid:"586703bac2ce7014" x_b3_parentspanid:"-" +ÁßôöÏÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ÓзÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.197+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e30c1ad-0a18-4ce8-468f-8599976d255d" response_time:0.002359231 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae1daccc1c4eee69" x_b3_spanid:"ae1daccc1c4eee69" x_b3_parentspanid:"-" +žÃзÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ÙØ»ÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.353+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19bdacb5-4965-4ea2-7f7b-2b87dee0246e" response_time:0.002299668 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6ef471130ad95d4" x_b3_spanid:"d6ef471130ad95d4" x_b3_parentspanid:"-" +ÊÐØ»ÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†ÂÏ´ÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.876+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b6967bc6-b645-4408-604f-37b91fbca9d6" response_time:0.001957881 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8fd95716a36cc260" x_b3_spanid:"8fd95716a36cc260" x_b3_parentspanid:"-" +ù¹Ï´ÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷¹ÆÖÜÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:44.945+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7c297a4-0d46-4f42-7760-ba7e5fea8c13" response_time:0.003715837 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc7f2aa4d6476405" x_b3_spanid:"fc7f2aa4d6476405" x_b3_parentspanid:"-" +ˆ¤ÆÖÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µê¦¦ÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.111+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ef2407a-8dab-4eb2-6fef-9bee9671160b" response_time:0.004534559 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5d6221da823fe88" x_b3_spanid:"b5d6221da823fe88" x_b3_parentspanid:"-" +®Þ¦¦ÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëð¡âßÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:45.777+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8672b4a-9e74-4d13-6bd3-c14a05d5417c" response_time:0.001690001 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58660b51c6d38483" x_b3_spanid:"58660b51c6d38483" x_b3_parentspanid:"-" +’å¡âßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ ®ÜñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.596+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04aeb64c-7134-44af-5590-109133340023" response_time:0.001621922 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aac2efc82022d843" x_b3_spanid:"aac2efc82022d843" x_b3_parentspanid:"-" +Ç“®ÜñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡“©õÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:51.538+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38d2d623-e921-4f4b-5968-580637ca3915" response_time:0.00184578 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e38f151566ad4152" x_b3_spanid:"e38f151566ad4152" x_b3_parentspanid:"-" +ꃩõÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨šç÷ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.229+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4dd44e38-150d-471b-5440-b4201ac06612" response_time:0.002752466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d3ff950f4c4ca98d" x_b3_spanid:"d3ff950f4c4ca98d" x_b3_parentspanid:"-" +Ä‹šç÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ϵ§™úÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.872+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0ec107e8-2c1f-46da-5192-ae645466cd96" response_time:0.001441896 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3bb5fca3a1794576" x_b3_spanid:"3bb5fca3a1794576" x_b3_parentspanid:"-" +õ¬§™úÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿¦ÃÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.838+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"539176bc-3aea-48a2-5083-86ef7b89ead2" response_time:0.002220675 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e73d93a1cc49ac6b" x_b3_spanid:"e73d93a1cc49ac6b" x_b3_parentspanid:"-" +Þ³¦ÃÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©‹å¥ƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.313+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a9b04ad-ed25-43c2-66bc-8daaadf8cffc" response_time:0.002091618 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6bc46f9c0816b42" x_b3_spanid:"a6bc46f9c0816b42" x_b3_parentspanid:"-" +û‚奃ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ÚáûˆÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:56.836+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a647e7b5-dcd7-4997-6626-fad74ef0bd82" response_time:0.00227338 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"55df4efb0b17698e" x_b3_spanid:"55df4efb0b17698e" x_b3_parentspanid:"-" +ØÎáûˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®‹êìŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.413+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"183a4917-804b-443e-7f42-7792af77db3d" response_time:0.004189443 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"50b6ff9381d19bbf" x_b3_spanid:"50b6ff9381d19bbf" x_b3_parentspanid:"-" +åûéìŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 Ç—š‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.047+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7399222b-f83c-492a-6d5e-76494ad91b02" response_time:0.002361495 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c73c96f0f640aea" x_b3_spanid:"4c73c96f0f640aea" x_b3_parentspanid:"-" +ò¼—š‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥êˆääÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.120+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d953d5e3-bbbe-4267-6b73-215368f0a19d" response_time:0.003753746 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"edadc61ebc2e7ea4" x_b3_spanid:"edadc61ebc2e7ea4" x_b3_parentspanid:"-" +¨ÜˆääÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²ÓÄŽìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.086+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c1bbdd8b-2a52-4e8f-6512-cbcfefad3229" response_time:0.006319465 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd1a6a1387cbdae6" x_b3_spanid:"bd1a6a1387cbdae6" x_b3_parentspanid:"-" +¦ÉÄŽìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªÃ– ìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.122+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62e5eec9-acd0-4a2b-4f2b-b3cdc0c80760" response_time:0.007873519 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05360397fe046592" x_b3_spanid:"05360397fe046592" x_b3_parentspanid:"-" +’¨– ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ࣨ…îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.608+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54a16fad-6ae6-46b8-5cd8-d1e63eeaa59f" response_time:0.001788832 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4120103b973ef55" x_b3_spanid:"c4120103b973ef55" x_b3_parentspanid:"-" +ɘ¨…îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ÔڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.938+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a49a7ded-49ea-4b8d-548e-35c766f7a7ec" response_time:0.002455357 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9dcba5053a5818c4" x_b3_spanid:"9dcba5053a5818c4" x_b3_parentspanid:"-" +…ÔڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—õŸ–ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.400+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"830f1824-5165-48c4-6aaa-29e892ff7bff" response_time:0.001533105 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d077b19c4548e472" x_b3_spanid:"d077b19c4548e472" x_b3_parentspanid:"-" +ú韖ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢žã»–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.460+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"933add55-dbe5-4e3c-6b58-97916e8b6d66" response_time:0.001933863 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d77d72d8fb521acc" x_b3_spanid:"d77d72d8fb521acc" x_b3_parentspanid:"-" +Š”ã»–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö×ð——ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.653+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1ea93705-53cd-449c-5c8c-532c8e80d193" response_time:0.002231078 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3ed7fceae7f65a23" x_b3_spanid:"3ed7fceae7f65a23" x_b3_parentspanid:"-" +…Èð——ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬˜Ò¯—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.703+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f189a161-d0f7-4d24-59d8-9b021bec19be" response_time:0.001927555 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"149e229de614fd0e" x_b3_spanid:"149e229de614fd0e" x_b3_parentspanid:"-" +ÙŠÒ¯—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·“£Ê—ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.759+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e654041f-b27c-4c1a-40fd-add3faf8f57d" response_time:0.001801258 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0975383923aa4770" x_b3_spanid:"0975383923aa4770" x_b3_parentspanid:"-" +Àƒ£Ê—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öæ„î—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.830+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3d8f44e-5961-4118-7503-998fc9660cea" response_time:0.005462936 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bc5da0cdce4e7f56" x_b3_spanid:"bc5da0cdce4e7f56" x_b3_parentspanid:"-" +èׄî—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ÁÂȘڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d84ef378-3c40-4796-6ac4-4806819e0b86" response_time:0.00237558 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b86280bc321ca07" x_b3_spanid:"0b86280bc321ca07" x_b3_parentspanid:"-" +ްÂȘڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§Ä¦Î™ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.301+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51afa35b-6ca9-46ba-595e-4e12083b2c2f" response_time:0.004454371 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"89f81771fbfd4b22" x_b3_spanid:"89f81771fbfd4b22" x_b3_parentspanid:"-" +¥·¦Î™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—¦ãؘڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.057+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"da8edfa7-4b5b-460f-7a83-e5aa1ff62a10" response_time:0.002996532 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"724c90b56061cb6f" x_b3_spanid:"724c90b56061cb6f" x_b3_parentspanid:"-" +•ãØ˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªû溙ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6897aad2-5bdb-480e-575a-51d195b701aa" response_time:0.00213102 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79a9412488ef5a36" x_b3_spanid:"79a9412488ef5a36" x_b3_parentspanid:"-" +¹ï溙ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºª¿¨šÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.493+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e15afe3b-0537-4ed9-573e-442d9a63ba9b" response_time:0.001733371 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"baa8ca750858440d" x_b3_spanid:"baa8ca750858440d" x_b3_parentspanid:"-" +Ô¿¨šÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™õä™›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.730+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"901fbc47-168f-488d-63be-6a75e6ce8ea5" response_time:0.002544232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f5b3ddaa7abb832c" x_b3_spanid:"f5b3ddaa7abb832c" x_b3_parentspanid:"-" +öää™›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶È¤œÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.022+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc37f08f-9cbf-4900-7e1a-5e8ccb52fd38" response_time:0.001990572 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7ec2c9482ad4a335" x_b3_spanid:"7ec2c9482ad4a335" x_b3_parentspanid:"-" +ÃóǤœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ä±ìœÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.173+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cad18b06-0211-40f6-41da-c57ff3a486d2" response_time:0.001672242 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eab8994e7d682f89" x_b3_spanid:"eab8994e7d682f89" x_b3_parentspanid:"-" +°Õ±ìœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âºýûžÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.742+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6940e635-fffa-4e82-44e7-9feeb0a5728a" response_time:0.002172055 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f3e07f0c049488f" x_b3_spanid:"4f3e07f0c049488f" x_b3_parentspanid:"-" +ˆ®ýûžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÝ‰ÆŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.897+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"813a0840-6bee-465a-619a-786d62e59a72" response_time:0.002168123 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd88e85d8441b6aa" x_b3_spanid:"fd88e85d8441b6aa" x_b3_parentspanid:"-" +÷̉ƟڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Öа® ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.116+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ca569bf1-584a-4a1c-5231-6537bdcdd3fe" response_time:0.002119432 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de9e14d2501d0b2b" x_b3_spanid:"de9e14d2501d0b2b" x_b3_parentspanid:"-" +ªÃ°® ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·‚¢´¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"947b6bbf-910e-4ee0-45d7-0be3b04b6efd" response_time:0.006393064 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4df81da0ae4851a3" x_b3_spanid:"4df81da0ae4851a3" x_b3_parentspanid:"-" +áõ¡´¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À³Ãº£ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.946+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56579248-9a3d-4106-6f86-2b6d9866b9d9" response_time:0.00243785 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fac24961ce4f9ab5" x_b3_spanid:"fac24961ce4f9ab5" x_b3_parentspanid:"-" +»¥Ãº£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…½¯´¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.471+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2aa10081-7f7d-4a71-7a11-ad254f19cbcc" response_time:0.002218364 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d5ade00f84f456b4" x_b3_spanid:"d5ade00f84f456b4" x_b3_parentspanid:"-" +ë´¯´¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó¸¹×¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.536+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac8b22cf-0617-4e2e-5492-440f1659a0a0" response_time:0.009841433 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f56f5cdf480888f5" x_b3_spanid:"f56f5cdf480888f5" x_b3_parentspanid:"-" +ð£¹×¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ±Ÿê¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.852+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0193b308-b71d-4ff6-6243-36c50122565b" response_time:0.001899988 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cecac786af1c100c" x_b3_spanid:"cecac786af1c100c" x_b3_parentspanid:"-" +ؤŸê¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Р¾„§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.907+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0171f02c-5812-42d4-6fb2-70a4233483cd" response_time:0.001907769 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"053102ce00edc94e" x_b3_spanid:"053102ce00edc94e" x_b3_parentspanid:"-" +¨Œ¾„§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËÎÙž§ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.962+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17431" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"41fe14bc-85be-45b6-52df-45e00e45422d" response_time:0.00261479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27bbe3fd9be087c1" x_b3_spanid:"27bbe3fd9be087c1" x_b3_parentspanid:"-" +‚ÆÙž§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠþÌë§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.123+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e058688d-1436-46f3-489c-12e3efef477b" response_time:0.002513183 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38725a10f5890ee5" x_b3_spanid:"38725a10f5890ee5" x_b3_parentspanid:"-" +´ìÌë§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í¿×ô§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.143+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aebbe0a7-317e-45d0-4104-52294a3f2994" response_time:0.001572538 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"052b43dd0d85e8a2" x_b3_spanid:"052b43dd0d85e8a2" x_b3_parentspanid:"-" +â¶×ô§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßé뮨ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.265+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ed5ad007-1665-4088-65a8-85019e747702" response_time:0.001813406 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"35052dce82c93747" x_b3_spanid:"35052dce82c93747" x_b3_parentspanid:"-" +êÛ뮨ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ“€ƒ©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.441+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f10c77ab-0dbf-40f2-66f6-ff6129ca97be" response_time:0.002214109 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"345f2d6ee6bfed11" x_b3_spanid:"345f2d6ee6bfed11" x_b3_parentspanid:"-" +¶…€ƒ©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ë¹Ž©ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.466+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66d7d702-aca5-47d5-76e2-522169b9aa92" response_time:0.00155023 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a2ce44029a6344b7" x_b3_spanid:"a2ce44029a6344b7" x_b3_parentspanid:"-" +„ß¹Ž©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Äœ°­©ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.530+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"21c431b4-597e-4585-428b-807bab46e0ee" response_time:0.001423583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71803e6ed590a7a3" x_b3_spanid:"71803e6ed590a7a3" x_b3_parentspanid:"-" +ŽŽ°­©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó·áâ«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.179+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18171" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1fb7b1a1-0e5e-489c-4d7e-a4b52005d637" response_time:0.002021882 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4513532c90b9b39d" x_b3_spanid:"4513532c90b9b39d" x_b3_parentspanid:"-" +†¯áâ«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹†Ü¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.432+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18270941-6959-4aef-4189-9eff35c9b535" response_time:0.003160368 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"93eae1d60f0935b2" x_b3_spanid:"93eae1d60f0935b2" x_b3_parentspanid:"-" +ä†Ü¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãóÑ£­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.581+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bbd07791-d574-4de5-7c5d-1b4d563ba0cd" response_time:0.004042485 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f76dd05b9a0fbff0" x_b3_spanid:"f76dd05b9a0fbff0" x_b3_parentspanid:"-" +•ãÑ£­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0퀚²­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.614+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"307ec027-61c5-41cf-5e48-c53aa86e9465" response_time:0.001694815 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"42842d09b0d6b7a6" x_b3_spanid:"42842d09b0d6b7a6" x_b3_parentspanid:"-" +£î™²­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Äéòš®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.832+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18171" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56523cb2-6c6e-418a-44de-7a6b23cfd8f9" response_time:0.003052023 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00f048bfa4748954" x_b3_spanid:"00f048bfa4748954" x_b3_parentspanid:"-" +‚Èòš®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù¬êɮڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.930+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"098d02c8-38c9-4ba0-7e41-107aaf87dc9c" response_time:0.004239112 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"386f8a8ed3bea15a" x_b3_spanid:"386f8a8ed3bea15a" x_b3_parentspanid:"-" +¿êɮڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëíÐÿ®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.043+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18171" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3c431a3-e498-4e34-49eb-b704b28956f4" response_time:0.003131893 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6bea5b44aa1e874a" x_b3_spanid:"6bea5b44aa1e874a" x_b3_parentspanid:"-" +ÂäÐÿ®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶’‹°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.346+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8779331-e5cc-456b-4495-bafd83f46881" response_time:0.001540622 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"feb72c03a9d9e2b6" x_b3_spanid:"feb72c03a9d9e2b6" x_b3_parentspanid:"-" +Ÿ…‹°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ŬÁ°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.451+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a08f7e5-cf95-4fef-45e4-986fc63465a1" response_time:0.001394694 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1fae3f13f9db0dd3" x_b3_spanid:"1fae3f13f9db0dd3" x_b3_parentspanid:"-" +Ó¼¬Á°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢žš±ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.585+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42338f42-2f2a-4c9d-64ac-27af26b5de30" response_time:0.00189268 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e4f333e73197c37" x_b3_spanid:"2e4f333e73197c37" x_b3_parentspanid:"-" +—‹š±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍöÒβڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:08.014+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f4adb6e-ec55-494f-4d4f-95b7283deca4" response_time:0.003343228 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"85e487517098e794" x_b3_spanid:"85e487517098e794" x_b3_parentspanid:"-" +‘èÒβڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø·ˆˆšÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9a2a8b7-2490-43c5-7bf2-46bd222da431" response_time:0.006522385 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"712fd0b1b99e3dfb" x_b3_spanid:"712fd0b1b99e3dfb" x_b3_parentspanid:"-" +Ý­ˆˆšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªàžµšÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.520+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"92b0aa75-4386-430e-41cb-640067d047d7" response_time:0.001908547 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"20a5586215c20cc4" x_b3_spanid:"20a5586215c20cc4" x_b3_parentspanid:"-" +ÔÕžµšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡Ùµï‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.719+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7cf2b2ac-07a4-4c25-7ec7-dff623d3aa11" response_time:0.001287785 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ea7455e433108560" x_b3_spanid:"ea7455e433108560" x_b3_parentspanid:"-" +Í͵ï‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†øÍŠÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.917+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"11f559aa-f2d3-452e-63ee-bd72e7ec1973" response_time:0.001731062 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b338b3c3d0b508ae" x_b3_spanid:"b338b3c3d0b508ae" x_b3_parentspanid:"-" +–ŽøÍŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÝ¹ø‹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.274+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"750cac4a-47a0-4fd4-5818-d6ff1497ec95" response_time:0.002125194 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4967d028bdd02e2f" x_b3_spanid:"4967d028bdd02e2f" x_b3_parentspanid:"-" +òйø‹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûú³åŽÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:24.040+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb068e6a-ea30-400c-4df1-8a08c51677bd" response_time:0.00184354 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00b87e5741f2595e" x_b3_spanid:"00b87e5741f2595e" x_b3_parentspanid:"-" +î³åŽÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«º÷îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.328+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7e5fe15-a25b-4c2c-5426-dbeec8dda742" response_time:0.002500735 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f95e51d9029ade6c" x_b3_spanid:"f95e51d9029ade6c" x_b3_parentspanid:"-" +µ®÷îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þµÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.396+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8d801fa-6165-4fbe-7eb3-86a9fcd81738" response_time:0.001539551 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c2682632fdcff48" x_b3_spanid:"6c2682632fdcff48" x_b3_parentspanid:"-" +Ù¥ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïÛѹٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.484+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"662e3af0-296a-4acd-6673-b38fb39f8580" response_time:0.002725812 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8631509d2af5a87" x_b3_spanid:"a8631509d2af5a87" x_b3_parentspanid:"-" +ÍÐѹٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ìÙÁÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb2f366c-0253-4e72-7127-9581f4d69d88" response_time:0.002121597 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd0c3fd77024620d" x_b3_spanid:"dd0c3fd77024620d" x_b3_parentspanid:"-" +úäÙÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œ‹ô­‘ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.725+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"af2dc6f8-cfaf-4b02-6853-3f24abc9cb09" response_time:0.005898248 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8cac1255284520c3" x_b3_spanid:"8cac1255284520c3" x_b3_parentspanid:"-" +‚ÿó­‘ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÏް‘ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.733+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"196924ad-864e-42fa-4aa3-3c4d62e7a35d" response_time:0.002149205 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75f3ffeb090a59cc" x_b3_spanid:"75f3ffeb090a59cc" x_b3_parentspanid:"-" +€¢°‘ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÆî»’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.027+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f003f51c-2d21-4a24-60d4-be560124f20b" response_time:0.001803854 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"23dcc22112102c6f" x_b3_spanid:"23dcc22112102c6f" x_b3_parentspanid:"-" +Š¿î»’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨¶ßð’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d320f60-0e8d-4bc5-7066-653a8e8773c9" response_time:0.002516094 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31d8984600b7a61a" x_b3_spanid:"31d8984600b7a61a" x_b3_parentspanid:"-" +üªßð’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôᔉ•ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.725+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36566" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fa03dc48-d5d0-4bfa-43ec-1c78f89a9ee1" response_time:0.002213746 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71e72621965b62ed" x_b3_spanid:"71e72621965b62ed" x_b3_parentspanid:"-" +‹Û”‰•ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0꼆ò•ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.945+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6486d007-a1cb-4e67-6da7-68cd0ab34228" response_time:0.002095475 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"49bb140e0e690ae6" x_b3_spanid:"49bb140e0e690ae6" x_b3_parentspanid:"-" +ö²†ò•ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»¬‹ô–ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.217+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5df59858-a42a-4bc1-4570-5884312874ac" response_time:0.003557353 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb308018d4a72de7" x_b3_spanid:"bb308018d4a72de7" x_b3_parentspanid:"-" +Ô¢‹ô–ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶¦¾ƒ™ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.786+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29276" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e38db8c4-cfa0-447c-6063-682e16671b13" response_time:0.002894441 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10b723f608b59d80" x_b3_spanid:"10b723f608b59d80" x_b3_parentspanid:"-" +Šš¾ƒ™ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Ÿ¸’šÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.087+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fce7bccd-b759-4762-6fd7-2991a034badf" response_time:0.001918452 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dbd5e5ee10e94a7e" x_b3_spanid:"dbd5e5ee10e94a7e" x_b3_parentspanid:"-" +Γ¸’šÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»³—šÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.098+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4fc19764-1a99-4ced-5457-bbb015e912a8" response_time:0.001830584 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1381edd65f253d7" x_b3_spanid:"b1381edd65f253d7" x_b3_parentspanid:"-" +¼ú²—šÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼££šÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.123+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28054" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70f600f5-b9a0-467b-6468-d3936e57651b" response_time:0.001525771 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd3a0ddb05f4d001" x_b3_spanid:"cd3a0ddb05f4d001" x_b3_parentspanid:"-" +õ°££šÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú«çè›ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.537+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36526" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"046bd813-4613-45fc-5b83-05c6f1a98321" response_time:0.001365739 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a2232cf37f2bb9e" x_b3_spanid:"6a2232cf37f2bb9e" x_b3_parentspanid:"-" +¸¡çè›ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀËÈýœÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:27.848+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9673481c-f3a9-47e4-75d8-0414d850ae13" response_time:0.0024856 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd98034c45909d54" x_b3_spanid:"dd98034c45909d54" x_b3_parentspanid:"-" +»ÃÈýœÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ßöªŸÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.479+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6dcf3a5c-93b7-469e-6afd-7fa501106273" response_time:0.003247592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"47aeb21779ee27a4" x_b3_spanid:"47aeb21779ee27a4" x_b3_parentspanid:"-" +ÿÒöªŸÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿´±¯¥ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.099+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9873480c-d9df-49e0-78b3-78f8b39f10d1" response_time:0.003169469 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f364a4835c768a28" x_b3_spanid:"f364a4835c768a28" x_b3_parentspanid:"-" +ö«±¯¥ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëú¼à§ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.739+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5fe73ec8-06d9-4324-4165-23caebaa1e1d" response_time:0.003052303 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"faae6f9f4f5f2b1b" x_b3_spanid:"faae6f9f4f5f2b1b" x_b3_parentspanid:"-" +Ìí¼à§ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ùô…ê¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.027+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9e03dd17-93e9-4c46-431e-214ed4c0b6fe" response_time:0.003739554 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a45f552afcb7b1d3" x_b3_spanid:"a45f552afcb7b1d3" x_b3_parentspanid:"-" +óè…ê¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤›Æþ¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.072+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a970299c-c33e-49b5-5ba2-d7cab3a8902b" response_time:0.002143362 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9ed31fdad8a102c" x_b3_spanid:"a9ed31fdad8a102c" x_b3_parentspanid:"-" +Ö‘Æþ¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Ã᫪ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33230" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06ab4dd6-56bb-450f-6682-f334c839e705" response_time:0.002405109 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d5454da46915e1e" x_b3_spanid:"9d5454da46915e1e" x_b3_parentspanid:"-" +ƹ᫪ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”²û¤«ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.690+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28054" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"519545e6-d4a4-458b-7e50-137a2f0638d0" response_time:0.001745871 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29e25c5225e2079f" x_b3_spanid:"29e25c5225e2079f" x_b3_parentspanid:"-" +Õªû¤«ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼âá™­ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.202+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"009729d3-2e6e-4c14-462c-6f9c13d7a420" response_time:0.002543095 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9034118ae2b9c5f" x_b3_spanid:"a9034118ae2b9c5f" x_b3_parentspanid:"-" +°Ùá™­ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÃȹٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.521+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20ef59fd-7c54-4999-42fb-72076d6dad01" response_time:0.001562527 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a91148464c75480" x_b3_spanid:"1a91148464c75480" x_b3_parentspanid:"-" +¼¶È¹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ò‚Ò»ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.079+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ed42b462-f454-4dba-74f6-d9814cef58e6" response_time:0.002128733 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88a9d3aa67bbe0f9" x_b3_spanid:"88a9d3aa67bbe0f9" x_b3_parentspanid:"-" +·ç‚Ò»ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹„º‰½ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.463+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33422" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a55b75b5-9243-4b20-760c-221981845269" response_time:0.002801708 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9cf0744939a687c4" x_b3_spanid:"9cf0744939a687c4" x_b3_parentspanid:"-" +±û¹‰½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÂ¦ÅÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be97f7ce-946e-4fcb-6b19-b9f541e7eb33" response_time:0.003378613 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52fc65e1f1b965ea" x_b3_spanid:"52fc65e1f1b965ea" x_b3_parentspanid:"-" +»¦ÅÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜéÝÖÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.037+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d794e3d2-6ee5-4179-44a9-0b1d823c2a2e" response_time:0.006012959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f922c3cc399d04b0" x_b3_spanid:"f922c3cc399d04b0" x_b3_parentspanid:"-" +€àÝÖÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šè‰«½ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.534+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77cec154-dbd2-494c-649f-1b1fc0b83214" response_time:0.001626833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5da28e8609a19cd7" x_b3_spanid:"5da28e8609a19cd7" x_b3_parentspanid:"-" +»á‰«½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹íÕý¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.976+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f04a43c-2a08-43b6-63d6-6d690555111d" response_time:0.001427469 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38df3a33f2b0385b" x_b3_spanid:"38df3a33f2b0385b" x_b3_parentspanid:"-" +—ÜÕý¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷è¾ö¿ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.229+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a1e6ea4-24eb-4242-55aa-faa4e390c7d2" response_time:0.00168514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cb47baa846c152de" x_b3_spanid:"cb47baa846c152de" x_b3_parentspanid:"-" +–à¾ö¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô–§ÃÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.390+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70179629-55ff-4657-5e12-950d1eaddf81" response_time:0.001721067 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5de0b86c1b3b2b8e" x_b3_spanid:"5de0b86c1b3b2b8e" x_b3_parentspanid:"-" +ÒŠ§ÃÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö »ÎÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.414+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a035ee1-0358-4693-6240-da8dff694a33" response_time:0.001619501 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a8b3de8e0f56000" x_b3_spanid:"6a8b3de8e0f56000" x_b3_parentspanid:"-" +™»ÎÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿§í´ÁÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.627+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7aa9d62b-7e2f-4a45-4900-bc5627eed6b3" response_time:0.003095977 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3c2bb64c55b1391" x_b3_spanid:"b3c2bb64c55b1391" x_b3_parentspanid:"-" +Èí´ÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0֪ɈÂÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.804+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66de1085-0742-4d33-6693-620041247298" response_time:0.00165844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ebd8b5c86169e635" x_b3_spanid:"ebd8b5c86169e635" x_b3_parentspanid:"-" +̚ɈÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àßÒ«ÄÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.412+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe7ce062-1ae8-4336-6c24-53229b3fddfb" response_time:0.004096946 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6dfe7977fd288191" x_b3_spanid:"6dfe7977fd288191" x_b3_parentspanid:"-" +èÏÒ«ÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û§êßÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.134+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"840ae58a-01ca-4acf-7eba-25dae334fd6a" response_time:0.001788402 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d889ae99ad120e8" x_b3_spanid:"9d889ae99ad120e8" x_b3_parentspanid:"-" +ÏïéßÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ÞߣÈÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.469+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0bfcfb3-b086-4c4d-46ee-8ab7a099bc58" response_time:0.003851056 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a5570b5286075c2" x_b3_spanid:"5a5570b5286075c2" x_b3_parentspanid:"-" +ÏߣÈÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³«ÔÎÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.040+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee175b92-6c86-4722-74ab-7b94017fc17f" response_time:0.001742319 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5453076cebc3235d" x_b3_spanid:"5453076cebc3235d" x_b3_parentspanid:"-" +ÈœÔÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄþýèÏÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.496+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8d6943d4-9861-4583-69f6-2f62d8e596ac" response_time:0.001665458 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"108a092a64de0654" x_b3_spanid:"108a092a64de0654" x_b3_parentspanid:"-" +ÑóýèÏÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ÉùÑÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.066+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d9258ddd-33fd-448a-4dfb-8e986fc14aee" response_time:0.002389401 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"815538b3cc154313" x_b3_spanid:"815538b3cc154313" x_b3_parentspanid:"-" +—»ùÑÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛûðÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.318+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e5ecfd5f-828c-4d47-6034-48b3e03883c1" response_time:0.001465192 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"24bc628bcfefd164" x_b3_spanid:"24bc628bcfefd164" x_b3_parentspanid:"-" +ÁÑûðÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´°Ò…ÓÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.362+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b7e17634-b9d1-4271-476b-b35caabae7da" response_time:0.001444036 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"814822fcda71a434" x_b3_spanid:"814822fcda71a434" x_b3_parentspanid:"-" +Ô¤Ò…ÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ïñ½œÓÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.409+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ee05e99-1e9e-4b87-5213-847e0fcb5ad2" response_time:0.001463747 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8e4b655e1c5d283c" x_b3_spanid:"8e4b655e1c5d283c" x_b3_parentspanid:"-" +šê½œÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ýÜÖÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.349+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21751" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba9fb2c6-57ad-4655-7865-afc44071f7fa" response_time:0.002511484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7b5e23fd9db84f1" x_b3_spanid:"a7b5e23fd9db84f1" x_b3_parentspanid:"-" +½ÿüÜÖÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÙóùØÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.948+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57074" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d369c40-2520-4677-4828-4d45cc057fc0" response_time:0.001634444 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31a7aaf5da92e561" x_b3_spanid:"31a7aaf5da92e561" x_b3_parentspanid:"-" +†ÑóùØÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂÚæ€ÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.498+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"88687a48-36fd-42ef-6187-05c08d46d7b2" response_time:0.002312659 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6735e2d40305fa5c" x_b3_spanid:"6735e2d40305fa5c" x_b3_parentspanid:"-" +õÓæ€ÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Íô¸æÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.708+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57074" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ea36949-1c31-4807-7bfc-977f46f4e11f" response_time:0.005316675 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"99dcfa511ec04e07" x_b3_spanid:"99dcfa511ec04e07" x_b3_parentspanid:"-" +»ç¸æÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êà±ÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.868+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"258fa80f-0ff1-44d3-4afc-a5cb08756a4f" response_time:0.003447283 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b2d01d2529f7c413" x_b3_spanid:"b2d01d2529f7c413" x_b3_parentspanid:"-" +Èáà±ÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öÒ¸¾ãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.775+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e96859a1-d838-4905-7c4a-d8a28751c76c" response_time:0.002540998 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e89acfeae5b9e8fd" x_b3_spanid:"e89acfeae5b9e8fd" x_b3_parentspanid:"-" +†É¸¾ãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýû¢ÍãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.803+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ccf9cad0-8fc4-469a-7d51-0972b68e5274" response_time:0.005778705 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48a57cfed65b5ef3" x_b3_spanid:"48a57cfed65b5ef3" x_b3_parentspanid:"-" +óô¢ÍãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’æÛºæÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.572+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21821" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5b84e43f-19ab-463c-407f-e5d046610961" response_time:0.002258479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"43ee5f4dbfbef4c4" x_b3_spanid:"43ee5f4dbfbef4c4" x_b3_parentspanid:"-" +õÞÛºæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´÷ÜçæÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.667+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7076c26a-3c91-4e2b-6fbf-a28c8c918c26" response_time:0.001685235 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ec354b1ebd9cd24" x_b3_spanid:"5ec354b1ebd9cd24" x_b3_parentspanid:"-" +òëÜçæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛÅ€èçÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.932+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b6d29b56-dd97-466e-42f3-2bac81b13c2b" response_time:0.006196115 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"303f2d5a6808cd87" x_b3_spanid:"303f2d5a6808cd87" x_b3_parentspanid:"-" +¶¶€èçÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§ƒ™˜èÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.036+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"760cd936-2690-4e29-4011-7703fd9ead0f" response_time:0.003579644 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5502605000f2f775" x_b3_spanid:"5502605000f2f775" x_b3_parentspanid:"-" +Äõ˜˜èÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—§ºýèÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.248+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57074" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65cda4ac-1b80-41a4-626f-91ddb1616e38" response_time:0.003436702 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb459075761ddbe9" x_b3_spanid:"fb459075761ddbe9" x_b3_parentspanid:"-" +œó¹ýèÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œÔ¯ûéÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e343b949-6cb7-49c8-75a6-19e3b4cb9cc6" response_time:0.002178819 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"675636faef7c3d6e" x_b3_spanid:"675636faef7c3d6e" x_b3_parentspanid:"-" +ÖʯûéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃðÜÕêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.704+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15ec3581-51ca-4755-7ce0-d3bfc0e4e870" response_time:0.001497724 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ed5913ba8286b876" x_b3_spanid:"ed5913ba8286b876" x_b3_parentspanid:"-" +ÞçÜÕêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ŠÍ…ÎÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.019+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"23dbd41e-3e11-4f38-6bd3-9bd1a0fa57bd" response_time:0.001925001 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"944eac8a7549b6f8" x_b3_spanid:"944eac8a7549b6f8" x_b3_parentspanid:"-" +œûÌ…ÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äö´ãÏÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.485+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"140abccb-9242-400d-7f33-47f59f52cb38" response_time:0.001536205 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6c0d37de2226a1b" x_b3_spanid:"c6c0d37de2226a1b" x_b3_parentspanid:"-" +öê´ãÏÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 Îú¡ÐÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:41.615+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2c57e857-9fe7-4268-6d2f-e7c6b6c3d125" response_time:0.0020126 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fc30d5d9c877af4" x_b3_spanid:"4fc30d5d9c877af4" x_b3_parentspanid:"-" +àÃú¡ÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆŒÊ¤ÐÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.619+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8cd57890-8ee9-4700-77bc-8e06bb1731c2" response_time:0.004265483 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69602b46ec16a8ee" x_b3_spanid:"69602b46ec16a8ee" x_b3_parentspanid:"-" +ʂʤÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏääÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.085+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d9c1ada1-6d65-4345-4bfe-f7f3aed8e8cf" response_time:0.001834635 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45027ab340d07b24" x_b3_spanid:"45027ab340d07b24" x_b3_parentspanid:"-" +µÏäÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ů€ùÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.335+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab4f234a-402d-4867-6189-3646c48334ad" response_time:0.001578223 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f7f294fa3a2c6199" x_b3_spanid:"f7f294fa3a2c6199" x_b3_parentspanid:"-" +ߟúøÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑÍÝáìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"792bfdb3-b661-485c-68b6-9bf1eafe9911" response_time:0.002719797 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b071e9271a262e52" x_b3_spanid:"b071e9271a262e52" x_b3_parentspanid:"-" +ÍÄÝáìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àï§®õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.574+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6632152c-f6b2-4a03-5030-620ccd2da9ea" response_time:0.001478185 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ca218fa0b371d39f" x_b3_spanid:"ca218fa0b371d39f" x_b3_parentspanid:"-" +½â§®õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žÂ×—öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.795+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3272dc5e-f454-4540-6f97-8cd71b9d6969" response_time:0.001684208 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7ae32471aa3b1534" x_b3_spanid:"7ae32471aa3b1534" x_b3_parentspanid:"-" +¶¯×—öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù¹¨§öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.827+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e675e60-777a-4166-57f2-71a02df5e2e7" response_time:0.001890222 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98e0d1e80ca8a8b7" x_b3_spanid:"98e0d1e80ca8a8b7" x_b3_parentspanid:"-" +¢±¨§öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸÏ¡ÂøÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ba7e684-f4b9-4f2b-50ce-335d6ac05238" response_time:0.001524603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"945696bc68b722ae" x_b3_spanid:"945696bc68b722ae" x_b3_parentspanid:"-" +šÈ¡ÂøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ã¹±ÞùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.748+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9978b88c-cb84-4729-4663-2e7e12ab6e3f" response_time:0.001607757 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d12feae177e33282" x_b3_spanid:"d12feae177e33282" x_b3_parentspanid:"-" +’†±ÞùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëÜßÕúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1606e596-acd0-4144-622c-8db898ec130b" response_time:0.002329058 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b155d53bba3f168f" x_b3_spanid:"b155d53bba3f168f" x_b3_parentspanid:"-" +¬ÏßÕúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž™¡¹ýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.739+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d2c5e03-c59f-486a-7c54-88ab468f1790" response_time:0.006212606 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d5a1ac7a1cbdc931" x_b3_spanid:"d5a1ac7a1cbdc931" x_b3_parentspanid:"-" +Ÿ’¡¹ýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0é¢üÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1c925df9-687c-4d52-7523-917b61fddb71" response_time:0.001978497 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52cea814b127cfa8" x_b3_spanid:"52cea814b127cfa8" x_b3_parentspanid:"-" +±¹¢üÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ä—èéÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.914+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18c25016-e3e7-46f4-47c9-395a481ab4bb" response_time:0.007028592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a41c1ae072579392" x_b3_spanid:"a41c1ae072579392" x_b3_parentspanid:"-" + ŠèéÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ¡º¤‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.043+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"024b0428-c858-42e5-7777-5b23cc2f1f5a" response_time:0.001464433 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aba2f68db1848792" x_b3_spanid:"aba2f68db1848792" x_b3_parentspanid:"-" +™˜º¤‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸§é ìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.123+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21821" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba97b9d5-82b3-4617-57cb-5387eb847165" response_time:0.007986077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"973486082e6d8583" x_b3_spanid:"973486082e6d8583" x_b3_parentspanid:"-" +È›é ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡Ü½¸íÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.447+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe7ddf48-eaeb-4a7a-6bec-bae2b674f209" response_time:0.002337823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e37fddd561bef218" x_b3_spanid:"e37fddd561bef218" x_b3_parentspanid:"-" +àѽ¸íÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ¡”†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.082+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e41a9fba-43cb-40a7-6eb9-b95878dd2212" response_time:0.002252599 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1fd0ddbaff73b61c" x_b3_spanid:"1fd0ddbaff73b61c" x_b3_parentspanid:"-" +¼–¡”†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úâÖ“ˆÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.614+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df9ad540-a4bb-45e3-7a31-b34f70b31add" response_time:0.005959006 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c67664c603f40551" x_b3_spanid:"c67664c603f40551" x_b3_parentspanid:"-" +ÓÖÖ“ˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0á™æ–ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.967+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6b3b79f5-e0a3-4d2c-65f3-53aa3ffdfbad" response_time:0.00143328 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c23525e27170a32d" x_b3_spanid:"c23525e27170a32d" x_b3_parentspanid:"-" +›‹æ–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0檲¶ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.032+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e5be08f6-841d-4a94-4ee3-708d1237a785" response_time:0.002155311 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9eb0e8bfd4b10022" x_b3_spanid:"9eb0e8bfd4b10022" x_b3_parentspanid:"-" +Äš²¶ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸éÄÔÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.096+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63c4ed10-ff90-49a9-7e22-3ec8a71fbe90" response_time:0.001508208 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad488d5a20b57935" x_b3_spanid:"ad488d5a20b57935" x_b3_parentspanid:"-" +öáÄÔÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ìªÐÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.891+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c28879d-3247-4801-4cbb-dabac1158071" response_time:0.00320341 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2cc7c8ed509704c" x_b3_spanid:"e2cc7c8ed509704c" x_b3_parentspanid:"-" +ÎÞªÐÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À¨ÇýÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.986+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a8cf608-e248-4a4c-5f56-54c1e6a50144" response_time:0.00313017 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2bcb7269d177290" x_b3_spanid:"c2bcb7269d177290" x_b3_parentspanid:"-" +Û›ÇýÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûÁ»ü’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.521+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb43f95a-daf6-4341-5000-eb779d4b3b10" response_time:0.003165219 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd4e5c6676e41f1b" x_b3_spanid:"cd4e5c6676e41f1b" x_b3_parentspanid:"-" +̶»ü’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñÙ³…¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.054+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3a25e744-2d48-474d-7ac9-0204e9909c19" response_time:0.004833858 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac1947b722afb3aa" x_b3_spanid:"ac1947b722afb3aa" x_b3_parentspanid:"-" +ŽÎ³…¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àéü˜¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.098+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2030fe4-8187-4bf9-796c-0335c6d209e0" response_time:0.001487721 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e77346fcd13d3a4b" x_b3_spanid:"e77346fcd13d3a4b" x_b3_parentspanid:"-" +Öâü˜¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ½«¢°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.385+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d054228-fd21-47fe-762e-b8b3ecb00c74" response_time:0.002340883 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e82983bf1be682b4" x_b3_spanid:"e82983bf1be682b4" x_b3_parentspanid:"-" +ʲ«¢°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Îä·Ý±ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.779+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dd4d6e43-ffa6-43cb-4092-74795694ab08" response_time:0.00161958 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"917a6a832b285831" x_b3_spanid:"917a6a832b285831" x_b3_parentspanid:"-" +âٷݱڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨ûÕ™›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.730+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"989a6bd7-36c0-49f5-64e4-e4f5cea15ee4" response_time:0.002626639 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9ebded579fea2b0c" x_b3_spanid:"9ebded579fea2b0c" x_b3_parentspanid:"-" +ÅîÕ™›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šË™–ŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.797+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60322b46-83d7-427c-5879-de34842b6895" response_time:0.001668202 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"870bf8d888c4b935" x_b3_spanid:"870bf8d888c4b935" x_b3_parentspanid:"-" +€»™–ŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“‹ªŸÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.837+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9cd826a-d9af-4909-4c1e-0035aa22640e" response_time:0.00413104 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"033e155afead78fb" x_b3_spanid:"033e155afead78fb" x_b3_parentspanid:"-" +¥Š‹ªŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×΀ëŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.975+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59646" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"79c1e156-1794-4a03-7ff5-ad7c31b16975" response_time:0.001742895 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b398e86437b4e675" x_b3_spanid:"b398e86437b4e675" x_b3_parentspanid:"-" +óÀëŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î¦Ô¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.462+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2365471-52e5-4868-41ea-bc5e6d483a2d" response_time:0.003610907 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"23bfc1eb18b86970" x_b3_spanid:"23bfc1eb18b86970" x_b3_parentspanid:"-" +ĦԡڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦¢˜¬ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:14.491+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aba2208b-f36f-4337-60af-b2d7d879870b" response_time:0.003145085 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc9fb67eb8fd46ab" x_b3_spanid:"fc9fb67eb8fd46ab" x_b3_parentspanid:"-" +怢˜¬ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ˆÿˆ­ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:14.727+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7181b7c4-f7c7-4956-6a46-abaf9ee4b6d9" response_time:0.004159061 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0122cf1d6e235cea" x_b3_spanid:"0122cf1d6e235cea" x_b3_parentspanid:"-" +Çúþˆ­ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó»¶«­ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:14.797+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42324" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14bf6661-fdcd-448a-7826-9be2c73f1bbf" response_time:0.006311313 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f2d021f89ff47992" x_b3_spanid:"f2d021f89ff47992" x_b3_parentspanid:"-" +ì³¶«­ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ¹ð­ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:14.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a3a57eca-d6c8-4b3d-60f2-555d84440d02" response_time:0.003828659 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c03c4bbf36b37677" x_b3_spanid:"c03c4bbf36b37677" x_b3_parentspanid:"-" +Ý”¹ð­ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨¤¤”®ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:15.016+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45164" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"849885c8-20ee-4219-5922-a2d03a4a8afc" response_time:0.006537136 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70d8ffb2624d0e07" x_b3_spanid:"70d8ffb2624d0e07" x_b3_parentspanid:"-" +Æœ¤”®ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 Œ¥®ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:15.051+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43862" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25d553bd-f779-4c2a-69ff-a341fdbc45bf" response_time:0.00671673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8558093a80a89b04" x_b3_spanid:"8558093a80a89b04" x_b3_parentspanid:"-" +®ó‹¥®ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ¹‡¯ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:15.261+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52580" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f07c1624-b34a-4c2c-7d45-fa8bac2f3cdb" response_time:0.002942447 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4bed6bd1c99d7dc" x_b3_spanid:"c4bed6bd1c99d7dc" x_b3_parentspanid:"-" +›ƒ¹‡¯ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍÝÀ˯՜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:15.401+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ecf2663-fe47-4c14-7ec1-f1c68846a07d" response_time:0.006265717 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb431c0831d7a518" x_b3_spanid:"eb431c0831d7a518" x_b3_parentspanid:"-" +‚ÏÀ˯՜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð”‹ß°ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:15.705+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:40852" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"febea405-e5aa-4690-4dde-688fad3155f3" response_time:0.011890642 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"37a15496f7eb9f49" x_b3_spanid:"37a15496f7eb9f49" x_b3_parentspanid:"-" +Þ‰‹ß°ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à­å’´ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:16.625+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"edcb78be-a244-4ffc-4dc7-3b5fef8399e9" response_time:0.00500289 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7459a8fbffe3732f" x_b3_spanid:"7459a8fbffe3732f" x_b3_parentspanid:"-" +ê¡å’´ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åöŒºÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:18.224+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53280" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35a188e9-76ad-497d-5e1e-9dcd2a756ba0" response_time:0.003078403 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ac7690552ce1859" x_b3_spanid:"0ac7690552ce1859" x_b3_parentspanid:"-" +Çꌺ՜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å¥Â¡»ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:18.533+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e1fca6d8-9227-4e37-5564-8a412ac62d95" response_time:0.007013351 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b14d08b005e88eb8" x_b3_spanid:"b14d08b005e88eb8" x_b3_parentspanid:"-" +òšÂ¡»ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹Õ¹Â¿ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:19.680+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f22352f-2395-4747-75d6-8690d825bc2a" response_time:0.003129073 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fba2703e3011c39" x_b3_spanid:"4fba2703e3011c39" x_b3_parentspanid:"-" +ˆÉ¹Â¿ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘ ÒÁÀÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:19.945+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f71c44aa-1e1b-4924-52d9-f8591b0bfb95" response_time:0.004765148 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10d25f6f793b31e2" x_b3_spanid:"10d25f6f793b31e2" x_b3_parentspanid:"-" +ê’ÒÁÀÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú–·¡ÂÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.413+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53280" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d8ac7726-21cd-4488-6b39-da19999f665d" response_time:0.005716496 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69b9e95dd314b370" x_b3_spanid:"69b9e95dd314b370" x_b3_parentspanid:"-" +…·¡ÂÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šŽ˜ÛÅÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:21.342+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"99f6afb4-c934-4922-5b90-51ba6e7dd3ca" response_time:0.003759161 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e67c579c21e4d5e" x_b3_spanid:"1e67c579c21e4d5e" x_b3_parentspanid:"-" +¬˜ÛÅÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡Ô…ýלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.914+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10428" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"967cacf1-8918-4a8d-52e3-058b0c7db095" response_time:0.002798073 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bc8227bf8679b8ca" x_b3_spanid:"bc8227bf8679b8ca" x_b3_parentspanid:"-" +«Æ…ýלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”…—îÿלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.664+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10428" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10d773ee-0f9e-411a-4934-e038f8e78cc3" response_time:0.009754436 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9f15af007197fc22" x_b3_spanid:"9f15af007197fc22" x_b3_parentspanid:"-" +­ý–îÿלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃÚž¡„ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.852+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ccd64006-229f-40d6-4755-76dba9bb93e4" response_time:0.002730391 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26e97e8b1056a8fa" x_b3_spanid:"26e97e8b1056a8fa" x_b3_parentspanid:"-" +þΞ¡„ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®Øúò†ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:47.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4236" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02c303ce-ced1-4f78-533f-458a526255a6" response_time:0.002252417 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"91c3c7dc7e639fee" x_b3_spanid:"91c3c7dc7e639fee" x_b3_parentspanid:"-" +‡Îúò†ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤€Ë¹‡ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.705+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10534" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33607bdf-4141-497f-7b3d-b073ffff56ee" response_time:0.005825399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5fecc38b74cc292c" x_b3_spanid:"5fecc38b74cc292c" x_b3_parentspanid:"-" +õʹ‡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓƒÕï‡ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.822+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd980b34-1c17-4daa-5d24-47dc969f9ff6" response_time:0.003135129 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7da32dbb090d1c3f" x_b3_spanid:"7da32dbb090d1c3f" x_b3_parentspanid:"-" +ø÷Ôï‡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ôô¨ìˆØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:48.084+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9c539f8b-f1db-42c2-74cc-e925e873f3fd" response_time:0.002309651 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e355bd90f32d1835" x_b3_spanid:"e355bd90f32d1835" x_b3_parentspanid:"-" +©è¨ìˆØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÙÊ‹¢‰ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.196+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10428" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"68148c3b-a27d-45e0-4530-0c392953404e" response_time:0.002813784 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a3361f78230bde39" x_b3_spanid:"a3361f78230bde39" x_b3_parentspanid:"-" +÷À‹¢‰ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íÂ´ŽØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:49.576+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6260" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7b5c622-e55e-4e46-51ac-6202be82be15" response_time:0.003235121 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"82bd4172522528d4" x_b3_spanid:"82bd4172522528d4" x_b3_parentspanid:"-" +ÑäÂ´ŽØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯óüøžØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:11530" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"afe019d8-33a3-4faa-6f5a-30be7279849c" response_time:0.002876281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02fb29188a736643" x_b3_spanid:"02fb29188a736643" x_b3_parentspanid:"-" +÷ëüøžØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß©­ ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:54.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4236" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6d9c0c7-dca6-4366-76b2-e66299100936" response_time:0.003374842 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"01e09d74d03f92ec" x_b3_spanid:"01e09d74d03f92ec" x_b3_parentspanid:"-" +ÛÍ©­ ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0á ˜À¥ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.776+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"026bd813-e9f6-459e-4b06-98209b735b18" response_time:0.002580416 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19a26ba4c81988aa" x_b3_spanid:"19a26ba4c81988aa" x_b3_parentspanid:"-" +â’˜À¥ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍÄÐͪ؜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:57.142+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3594" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ed757994-69e3-4106-7529-983fe76e3d3a" response_time:0.006659853 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e8113658d143165" x_b3_spanid:"1e8113658d143165" x_b3_parentspanid:"-" +Ô¼Ðͪ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ÍÚ½µØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:00.059+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c30072e-56e8-4c8c-6d63-cc4d50d571a6" response_time:0.009008317 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"456155e0f8c851f4" x_b3_spanid:"456155e0f8c851f4" x_b3_parentspanid:"-" +øÀÚ½µØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ެÁø¶ØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:00.457+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:7207" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cce10e3e-5e53-4e92-5290-290578e17d7f" response_time:0.002350242 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1151416886d484a9" x_b3_spanid:"1151416886d484a9" x_b3_parentspanid:"-" +å¡Áø¶ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šŽ”÷ÀØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.138+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62789" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a76b5927-3f0c-4138-6445-ce45ca338030" response_time:0.002789376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4a879729324fe0f" x_b3_spanid:"f4a879729324fe0f" x_b3_parentspanid:"-" +éû“÷ÀØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÚöøÀØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.142+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62789" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13744347-64dc-4fee-724e-b755dbeebcad" response_time:0.002649745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c147f70d50d47219" x_b3_spanid:"c147f70d50d47219" x_b3_parentspanid:"-" +¢ÎöøÀØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òû•ÄØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.006+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61649" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b1b67c2f-cfc4-46d6-42a7-1c43cab3434e" response_time:0.003008082 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e504a84aeef1018b" x_b3_spanid:"e504a84aeef1018b" x_b3_parentspanid:"-" +¢ê•ÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î·ú£ÅØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.305+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12909" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3cd252a-4d29-405f-6c1a-ce9320181c3d" response_time:0.003704959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fef51436cc778d64" x_b3_spanid:"fef51436cc778d64" x_b3_parentspanid:"-" +̬ú£ÅØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤Ü¦…ÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.779+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63913" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"101114fb-e85e-418a-7cb8-ebc84297dc43" response_time:0.002856341 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"55bb43a532220bc6" x_b3_spanid:"55bb43a532220bc6" x_b3_parentspanid:"-" +®Ó¦…ÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕÔµ¹ÈØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.156+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce8fc88c-890f-481d-66f2-dfe3259c1ceb" response_time:0.002796254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"985df4e9a565fe94" x_b3_spanid:"985df4e9a565fe94" x_b3_parentspanid:"-" +â̵¹ÈØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºëÉðÉØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.540+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12993" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35bd64e8-332c-4ee9-40ab-42009413607e" response_time:0.003014543 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bfd6f34c30143ed" x_b3_spanid:"9bfd6f34c30143ed" x_b3_parentspanid:"-" +­äÉðÉØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨äÉÊØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.606+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10809" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c8477ea-af73-4373-55da-ea9d98e0b2b1" response_time:0.004458591 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c2f84e6a6d38926" x_b3_spanid:"8c2f84e6a6d38926" x_b3_parentspanid:"-" +ÏÜÉÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿Á–ÊØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.620+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12959" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0c9b7ef4-fa77-4c12-74ef-df04df23471f" response_time:0.002691515 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"774772ce4900ecba" x_b3_spanid:"774772ce4900ecba" x_b3_parentspanid:"-" +­¸Á–ÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ƒ¼©ÊØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.660+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10809" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dcdcd3a9-7580-4bfa-42cb-13a281375b04" response_time:0.002259619 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af29dc9c47f1598a" x_b3_spanid:"af29dc9c47f1598a" x_b3_parentspanid:"-" +ªü»©ÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÉÚçÊØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:05.791+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10591" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ea29e8d-7d54-4cc3-6039-11eab3eb466f" response_time:0.00248619 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa4845f8320db614" x_b3_spanid:"fa4845f8320db614" x_b3_parentspanid:"-" +û¾ÚçÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼¹§÷ËØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.092+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10073" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aaa4ff0f-78c2-45a3-614d-71bfb7b1e42a" response_time:0.002539498 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b64ef906bfd37fc" x_b3_spanid:"1b64ef906bfd37fc" x_b3_parentspanid:"-" +ϯ§÷ËØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™áÌØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:06.167+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91b9d95a-60cb-433d-42ad-b4999dfd70e8" response_time:0.00636658 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0c5c23942143cd7c" x_b3_spanid:"0c5c23942143cd7c" x_b3_parentspanid:"-" +¾ÚÌØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ëƒ“ÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.417+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61649" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cff4d2e9-222d-4386-54f2-2fb1a166480d" response_time:0.003454254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29334c2cbb775b1b" x_b3_spanid:"29334c2cbb775b1b" x_b3_parentspanid:"-" +¼äƒ“ÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0븣ŽÍØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:06.407+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10591" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7bff4b4f-d076-4741-4b49-7c1909345634" response_time:0.00350156 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd65d3643ebe70ad" x_b3_spanid:"cd65d3643ebe70ad" x_b3_parentspanid:"-" +ú¯£ŽÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈÏêÈÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.530+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61647" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6fcce0a-fb82-4fc8-4eb6-eec7811c1006" response_time:0.003677082 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0de3fec0e9d463b" x_b3_spanid:"d0de3fec0e9d463b" x_b3_parentspanid:"-" +¬ÂêÈÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯íüãÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.588+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12959" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"485a6c19-ba02-4254-72fc-c69fee7d4fbb" response_time:0.002370025 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fbc02eb866b93efb" x_b3_spanid:"fbc02eb866b93efb" x_b3_parentspanid:"-" +¹äüãÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥éƒóÎØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.886+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10591" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"534a5d87-f2c7-4c9e-7768-bd4c6b86b74a" response_time:0.004654802 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"01eb26ca6129799c" x_b3_spanid:"01eb26ca6129799c" x_b3_parentspanid:"-" +ô܃óÎØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒªÙÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12419" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8275861-54e1-43bf-7a3a-d00ce352a025" response_time:0.002466136 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"80c270136bde3cec" x_b3_spanid:"80c270136bde3cec" x_b3_parentspanid:"-" +Ì¢ÙÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘µÒáÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.120+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12993" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df36ab7a-3016-42d6-495e-b8f105b0a568" response_time:0.002353324 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c56944f8237f8fd7" x_b3_spanid:"c56944f8237f8fd7" x_b3_parentspanid:"-" +«ÒáÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚™˜«ÐØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.274+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62789" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d87c1e1-9995-4479-7955-4b70af7fc623" response_time:0.002633524 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52079d511e933352" x_b3_spanid:"52079d511e933352" x_b3_parentspanid:"-" +茘«ÐØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü“˜ÞÐØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:07.381+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:7215" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"259444d5-db79-43f1-6744-dc119ac1d4c5" response_time:0.002835822 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e9afb0be39605a4" x_b3_spanid:"2e9afb0be39605a4" x_b3_parentspanid:"-" +ȉ˜ÞÐØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ú¸–ÑØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.499+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10073" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ca0db695-1a3c-415c-5820-81f95d69b053" response_time:0.003201106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f8f9fd78d812a66" x_b3_spanid:"2f8f9fd78d812a66" x_b3_parentspanid:"-" +¥ð¸–ÑØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿô„ÉÑØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.605+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62789" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"826401f4-98bc-41eb-66a3-54db90a42150" response_time:0.002861264 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1505e9b441d9aeb5" x_b3_spanid:"1505e9b441d9aeb5" x_b3_parentspanid:"-" +™í„ÉÑØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íº§ÒØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.802+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63913" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"89840095-640e-4e9d-6a83-f85ebf53bcdc" response_time:0.002940245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"973a94c6c416a1b7" x_b3_spanid:"973a94c6c416a1b7" x_b3_parentspanid:"-" +«§ÒØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕŒÅ­ÕØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.621+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63917" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18446025-7282-4502-4b7c-5a344d9b56e7" response_time:0.002963971 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"57f12d21482c51ab" x_b3_spanid:"57f12d21482c51ab" x_b3_parentspanid:"-" +ñ„Å­ÕØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âä†ËÕØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.682+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7b30bf1-6b3d-45a0-46f3-7f50df1f5f31" response_time:0.003963522 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29e7c4c780d9e36e" x_b3_spanid:"29e7c4c780d9e36e" x_b3_parentspanid:"-" +ÉÚ†ËÕØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–Ò¬ÎÖØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.958+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8fcb97f3-3e8f-48e2-5d72-9a826b97c0e6" response_time:0.003575266 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"57519f0d830e5273" x_b3_spanid:"57519f0d830e5273" x_b3_parentspanid:"-" +±Å¬ÎÖØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÔÐðÖØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.031+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f872f97-f799-4a85-698e-491d081d5a46" response_time:0.002556991 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"161ebcadc0a0fa74" x_b3_spanid:"161ebcadc0a0fa74" x_b3_parentspanid:"-" +ÈÐðÖØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø¨ëÒØØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.505+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61649" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e832e14d-d440-44a1-7458-3d12814946fa" response_time:0.002650264 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5f266f09d5eecf4" x_b3_spanid:"a5f266f09d5eecf4" x_b3_parentspanid:"-" +Ì ëÒØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ÕÆåØØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:09.544+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61649" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"707166af-e182-46bb-483c-ab837865df1d" response_time:0.00255221 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7d83d06649a0d904" x_b3_spanid:"7d83d06649a0d904" x_b3_parentspanid:"-" +±ÍÆåØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’µ˜¨ÙØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.683+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63917" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c018cea7-c3ec-447d-7cfb-51f1e19090b6" response_time:0.003024319 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bbcf5039c73e41d7" x_b3_spanid:"bbcf5039c73e41d7" x_b3_parentspanid:"-" +Ò§˜¨ÙØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùâÚëÛØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:10.359+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:56287" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0a3ea5c-e44a-4452-78a4-21df01263f78" response_time:0.00542147 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0f67268137c94e2" x_b3_spanid:"c0f67268137c94e2" x_b3_parentspanid:"-" +·ØÚëÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûÂèçÜØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.623+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3628" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6505808-0e82-4297-60f9-da79ba9fd182" response_time:0.002681298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4f9c4615f2a248f" x_b3_spanid:"e4f9c4615f2a248f" x_b3_parentspanid:"-" +··èçÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãëßÿÜØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10504" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b1a6faf-9146-4446-5bdd-056b5441ae57" response_time:0.005709646 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa7320a71baaa0dc" x_b3_spanid:"aa7320a71baaa0dc" x_b3_parentspanid:"-" +ààßÿÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËŒèâÝØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.876+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56738" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"09bac790-3863-4ae1-7fe3-dbafdc0a74e6" response_time:0.006966186 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb1d29cbde207a0c" x_b3_spanid:"fb1d29cbde207a0c" x_b3_parentspanid:"-" +ÂÿçâÝØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ÙÁÝÞØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:11.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5390" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c459490f-797c-45ea-563b-da534b120880" response_time:0.003190617 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ca8c7c924c9846f" x_b3_spanid:"6ca8c7c924c9846f" x_b3_parentspanid:"-" +òÎÁÝÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îù•šßØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.265+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ea05f4a-343a-4f5c-4e98-6b408251600e" response_time:0.002843885 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0ca4141aeb8ce3d" x_b3_spanid:"c0ca4141aeb8ce3d" x_b3_parentspanid:"-" +Ÿî•šßØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€…‚¡áØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.816+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"500501f6-034a-44ec-7f12-439fa208099b" response_time:0.002788055 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3995197dbe0e4206" x_b3_spanid:"3995197dbe0e4206" x_b3_parentspanid:"-" +›þ¡áØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þö°ãØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.386+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24c0e3df-0f09-483e-549e-bd48269027fd" response_time:0.002697908 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad638bcd23c88a08" x_b3_spanid:"ad638bcd23c88a08" x_b3_parentspanid:"-" +à‰ö°ãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èŒåÇãØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:12.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3628" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a6c6c876-8e72-4b25-6e91-89a99f3eb256" response_time:0.002476483 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"99b644c7c837715a" x_b3_spanid:"99b644c7c837715a" x_b3_parentspanid:"-" +¾…åÇãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 Ä©‘æØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.126+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:11530" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db8547e4-1ae0-4ded-7bdf-1e9c04424c43" response_time:0.002391158 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da5115336294ff5d" x_b3_spanid:"da5115336294ff5d" x_b3_parentspanid:"-" +뼩‘æØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ä…óÀæØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.225+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"72420d56-dd47-4749-506c-bfcfebd0bba8" response_time:0.003129772 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da53a2fbb5cce273" x_b3_spanid:"da53a2fbb5cce273" x_b3_parentspanid:"-" +¸ýòÀæØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èÔåØæØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.276+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4c0ce8d-5935-445b-6f57-a3b79bae81b9" response_time:0.002494263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38f2f5fdcd041991" x_b3_spanid:"38f2f5fdcd041991" x_b3_parentspanid:"-" +ÙÌåØæØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³ØÐ¾èØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:13.757+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8700" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d4c900d-28bf-4b5e-5e4c-83e8a2c1c569" response_time:0.003281183 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8e7c5d93ccade05" x_b3_spanid:"b8e7c5d93ccade05" x_b3_parentspanid:"-" +¦ËÐ¾èØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îïç¾éØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.024+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:49642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad9db813-7bac-4bc6-6e1c-4fdaa34f1fbe" response_time:0.004950975 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ca8c227aa8c556b" x_b3_spanid:"2ca8c227aa8c556b" x_b3_parentspanid:"-" +Çãç¾éØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›Á¾ÑêØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:14.334+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b0afedbc-2edd-4202-4fca-d65fe3020263" response_time:0.00258172 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4792c264414d6082" x_b3_spanid:"4792c264414d6082" x_b3_parentspanid:"-" +¾¹¾ÑêØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òßÅÖêØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.344+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15aba493-9bdc-4f26-7c14-3cb214528cea" response_time:0.002719823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6af41e518503796" x_b3_spanid:"b6af41e518503796" x_b3_parentspanid:"-" +ÍØÅÖêØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×·ª’ìØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:14.738+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5f7998e-1045-43d4-5e75-39dbc3ac4cba" response_time:0.0027749 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e44a04555ed1579" x_b3_spanid:"5e44a04555ed1579" x_b3_parentspanid:"-" +¢ªª’ìØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô¤™îØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.289+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14def4ee-1237-408b-65c1-9d54976b5c9d" response_time:0.002698683 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c916d16cb18ba96" x_b3_spanid:"2c916d16cb18ba96" x_b3_parentspanid:"-" +÷œ™îØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼¶—¡îØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.306+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0cc282c-910f-424c-6ddc-23428e3f8a9d" response_time:0.002884741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"169c47df337129ae" x_b3_spanid:"169c47df337129ae" x_b3_parentspanid:"-" +Àª—¡îØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úéöˆñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.061+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"58cad8d3-1f09-40ef-55ea-6ba95a5a6bb5" response_time:0.002564433 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95a911f82e21e7d7" x_b3_spanid:"95a911f82e21e7d7" x_b3_parentspanid:"-" +¶ÝöˆñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘½Ì’ñØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:16.081+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"97d58181-7c6b-471c-7375-8481793a13a3" response_time:0.00255933 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06617ad6856a0867" x_b3_spanid:"06617ad6856a0867" x_b3_parentspanid:"-" +¦°Ì’ñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔŽ‚ëñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.266+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a3d9e273-c8d5-4369-4119-dfd06e38b29b" response_time:0.002708263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e5b96e2823c59cd4" x_b3_spanid:"e5b96e2823c59cd4" x_b3_parentspanid:"-" +Œ‡‚ëñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë­£¤óØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:16.654+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5390" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b258cb93-f7a1-4f47-6224-a6a3a5e1e2d4" response_time:0.003989696 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2a3415267c787e20" x_b3_spanid:"2a3415267c787e20" x_b3_parentspanid:"-" +“¤£¤óØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ñ»óØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fa9677f2-3160-470e-7b7a-fc27de79b305" response_time:0.004836405 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"986754d55b7cd4b3" x_b3_spanid:"986754d55b7cd4b3" x_b3_parentspanid:"-" +ûôð»óØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓÕÑÜôØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9cd4b8c7-5042-47a6-643b-093682f090d7" response_time:0.003200001 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4102f0dc203c009b" x_b3_spanid:"4102f0dc203c009b" x_b3_parentspanid:"-" +ËÊÑÜôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œãêôØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:17.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8c29c1cf-3439-4cd9-5e1d-788e5f03288a" response_time:0.00397487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da76ca2c8fa3ea9e" x_b3_spanid:"da76ca2c8fa3ea9e" x_b3_parentspanid:"-" +Ð…ãêôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž‹¿ŸöØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.450+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56738" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f780d840-8f2b-491c-51c9-e85d5909ce97" response_time:0.003272286 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"880c68ed4b15a1f1" x_b3_spanid:"880c68ed4b15a1f1" x_b3_parentspanid:"-" +µƒ¿ŸöØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÙ©žöØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.448+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"044bda4d-8be7-4771-43e3-0098adff86bc" response_time:0.002568466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c695af41d238ceb8" x_b3_spanid:"c695af41d238ceb8" x_b3_parentspanid:"-" +®Î©žöØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»Ü¾ºöØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53180" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"30e3b77e-ba6e-498f-43ed-66cc913ef42f" response_time:0.007023993 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8ab51c6e2634059" x_b3_spanid:"a8ab51c6e2634059" x_b3_parentspanid:"-" +ÒÔ¾ºöØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûÚÄåøØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.134+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b84f45e1-9cfc-492e-5a23-c2c6a7c63a60" response_time:0.002918163 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b05f2274cce8fe4" x_b3_spanid:"9b05f2274cce8fe4" x_b3_parentspanid:"-" +˜ÎÄåøØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÆò×ùØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.374+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e93ddef7-8860-4405-4586-2b1c646a1b78" response_time:0.002569119 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1eeab2f16082b6df" x_b3_spanid:"1eeab2f16082b6df" x_b3_parentspanid:"-" +•ºò×ùØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ£×úØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.520+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14b1e95d-f9c8-4ddb-5bc4-ac6c8c121a81" response_time:0.002662211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"074e9f2fc7c27d75" x_b3_spanid:"074e9f2fc7c27d75" x_b3_parentspanid:"-" +§–×úØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªÞÊúúØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.715+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ced9be4-c3e7-4696-6823-16d7b0bc8cb3" response_time:0.002982806 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d9739c979fe8121f" x_b3_spanid:"d9739c979fe8121f" x_b3_parentspanid:"-" +¬ÖÊúúØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì¥¢€ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.140+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3cfffc2e-55e1-4e8d-73ed-14f24556618a" response_time:0.003044695 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95946cc0ce5c51aa" x_b3_spanid:"95946cc0ce5c51aa" x_b3_parentspanid:"-" +ý˜¢€ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼„ĂٜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:20.342+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5390" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a822888-6869-4c0b-4223-6ca309b9ed9b" response_time:0.002799609 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2e413383e3f2ceb" x_b3_spanid:"e2e413383e3f2ceb" x_b3_parentspanid:"-" +¿üÂٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤¿ìé€ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.290+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74c9ad70-1cb9-4537-6e8e-d37c804f0999" response_time:0.002954071 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c63d7e7291c8225" x_b3_spanid:"7c63d7e7291c8225" x_b3_parentspanid:"-" +…·ìé€ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…®¢ò‚ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:20.845+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2056e4d-d569-4b59-5b9d-8c02a10839d4" response_time:0.002365155 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ea1774e09ae44f0f" x_b3_spanid:"ea1774e09ae44f0f" x_b3_parentspanid:"-" +Ϧ¢ò‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åœ÷ًלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:14.490+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2496" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15d87202-a59f-4699-6a32-588935de0716" response_time:0.002859868 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19c312014deeffe9" x_b3_spanid:"19c312014deeffe9" x_b3_parentspanid:"-" +ä÷ًלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸õ—ÕלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:15.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2942" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c41309e-f418-448a-4477-15a016d5409a" response_time:0.004923454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"331ab1b9ef572498" x_b3_spanid:"331ab1b9ef572498" x_b3_parentspanid:"-" +žé—ÕלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›þì¹×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:15.765+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3242" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e37956e-b9fd-41e6-4f80-047a57e2c661" response_time:0.002661122 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c9094014ca1e16a" x_b3_spanid:"5c9094014ca1e16a" x_b3_parentspanid:"-" +‡ñì¹×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ҤۓלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:16.637+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"46a7abb5-48c0-4b06-56d1-df8d1dc2b8d2" response_time:0.006528438 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f1b33dc720f542c7" x_b3_spanid:"f1b33dc720f542c7" x_b3_parentspanid:"-" +ôƤۓלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò‚ѕלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:17.155+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1044" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d11223b9-4ef3-4a0f-4c8d-d6666c85888a" response_time:0.004184153 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"46889f363e6045e3" x_b3_spanid:"46889f363e6045e3" x_b3_parentspanid:"-" +É©‚ѕלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—º’ɖלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.407+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4d7a8c8-1708-43f6-5f6f-809a3d647498" response_time:0.003131078 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f54029c0ae26739" x_b3_spanid:"6f54029c0ae26739" x_b3_parentspanid:"-" +ᬒɖלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥¨À¼›×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:18.722+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3242" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c68fd6cb-f9c0-4834-50b0-fc9493beddaf" response_time:0.004616755 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c95a6fc11ad3fcbb" x_b3_spanid:"c95a6fc11ad3fcbb" x_b3_parentspanid:"-" +‚ŸÀ¼›×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â̎қלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:18.766+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f80386b7-8c77-48ac-5d99-73e65407a164" response_time:0.005534209 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36d5068288a73f87" x_b3_spanid:"36d5068288a73f87" x_b3_parentspanid:"-" +óÀŽÒ›×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²ûºèלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:39.390+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32396" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8aa664df-14a9-43db-77c2-dd990cebf0c5" response_time:0.002638278 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4e03a375d18701d" x_b3_spanid:"f4e03a375d18701d" x_b3_parentspanid:"-" +¶¤ûºèלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆŠŸÂÈØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.175+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cabcc1ef-f44f-4321-7816-c778904cea4d" response_time:0.002405583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"32851748aa3c0329" x_b3_spanid:"32851748aa3c0329" x_b3_parentspanid:"-" +¤‚ŸÂÈØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶’¢ôÎØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.890+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2c50ff31-8c84-41ee-6493-a0a82625b04f" response_time:0.003669749 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4a9973fb296dc9a8" x_b3_spanid:"4a9973fb296dc9a8" x_b3_parentspanid:"-" +Ö„¢ôÎØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†Ý‹”ÒØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.763+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63913" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"677810bc-aa1d-4ee1-7de0-5bc22b6798fb" response_time:0.002558317 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"576f6aef961ed420" x_b3_spanid:"576f6aef961ed420" x_b3_parentspanid:"-" +£Ò‹”ÒØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€ñäÛØØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.524+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61649" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a8d5bec-71ed-4cda-44b4-d2438c110624" response_time:0.002353532 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7c65e730bae61d5" x_b3_spanid:"c7c65e730bae61d5" x_b3_parentspanid:"-" +ßéäÛØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€”›ÚØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.925+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61649" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0ca1a96c-fc92-4153-5a74-8c0ff0011b6e" response_time:0.002512923 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d23f65d1e63bc18b" x_b3_spanid:"d23f65d1e63bc18b" x_b3_parentspanid:"-" +ƒŒ›ÚØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š½ñŒÜØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.429+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44919" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba03c999-d240-4b4a-5004-667e94557f35" response_time:0.005949003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11847c154341471e" x_b3_spanid:"11847c154341471e" x_b3_parentspanid:"-" +Ñ­ñŒÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0㲑ªÞØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.030+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22464" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e5ecd36-263b-4d84-6132-a01077859119" response_time:0.002602035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f6b185995b7612a" x_b3_spanid:"4f6b185995b7612a" x_b3_parentspanid:"-" +¡¨‘ªÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ÎÉÏߨœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.377+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be99fa8d-fa32-4438-6dd9-12e065430c6c" response_time:0.002285381 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9858a859711a503e" x_b3_spanid:"9858a859711a503e" x_b3_parentspanid:"-" +‚ÀÉÏߨœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þÍš†àØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.489+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16072" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6a372800-7579-44cd-664f-42c1468dc3ed" response_time:0.005373631 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e8086613c66cc79" x_b3_spanid:"9e8086613c66cc79" x_b3_parentspanid:"-" +´Âš†àØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜–‚«âØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.103+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4072c3c-faac-4404-6676-aa1cebce2de6" response_time:0.005605948 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad4a57c1f85a004e" x_b3_spanid:"ad4a57c1f85a004e" x_b3_parentspanid:"-" +ÉŽ‚«âØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ΛÊÿâØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.283+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22464" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6c9aeec-e65f-42c7-6657-7228f0ae124e" response_time:0.002847813 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"35f2795a61b8d00e" x_b3_spanid:"35f2795a61b8d00e" x_b3_parentspanid:"-" +äÊÿâØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö±Í¡åØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.891+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56738" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abf65e9f-1070-487f-74cc-dec243558d3a" response_time:0.003080361 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bf35ae6608eefa98" x_b3_spanid:"bf35ae6608eefa98" x_b3_parentspanid:"-" +ã¡Í¡åØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë˜¤ÝæØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.285+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"71c2d95e-abc2-48e5-477a-6711c190a3c0" response_time:0.002239167 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"89afc33b0b412190" x_b3_spanid:"89afc33b0b412190" x_b3_parentspanid:"-" +­¤ÝæØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò“¬¬ìØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.793+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"312c686a-9eab-42d7-5b30-315be0e8bcfd" response_time:0.002246493 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8515eb75ad525642" x_b3_spanid:"8515eb75ad525642" x_b3_parentspanid:"-" +½Š¬¬ìØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹…ѦðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.855+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a31a0376-185d-4c67-4c78-1a1893af0119" response_time:0.002539059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8ad0f97dea0ca22b" x_b3_spanid:"8ad0f97dea0ca22b" x_b3_parentspanid:"-" +÷ùЦðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß°„®ñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.139+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3848f5f-9f40-4047-448f-c6e42161c862" response_time:0.002477205 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc0bb004990799ab" x_b3_spanid:"fc0bb004990799ab" x_b3_parentspanid:"-" +¾¦„®ñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïÖÉÐñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.211+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f192390-cc73-4d72-7238-189872860414" response_time:0.002746607 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"077943a7cbb23dc2" x_b3_spanid:"077943a7cbb23dc2" x_b3_parentspanid:"-" +¤ÏÉÐñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸Ø‰‘õØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.149+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22862" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7b5a254-954c-41d6-6d60-2855d9a04c10" response_time:0.004985151 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc703b297e148a51" x_b3_spanid:"dc703b297e148a51" x_b3_parentspanid:"-" +Åщ‘õØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†à°öØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.485+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20652" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"358dc0c6-f49f-4748-4186-27e0e2422235" response_time:0.002594315 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f022eee8d1a27aff" x_b3_spanid:"f022eee8d1a27aff" x_b3_parentspanid:"-" +³Ù°öØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0㪾¼÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.778+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:49642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7868da86-9121-4e9f-6169-1c38f2a57230" response_time:0.003653261 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a21965d78144b311" x_b3_spanid:"a21965d78144b311" x_b3_parentspanid:"-" +—Ÿ¾¼÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬…ß¿úØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:18.592+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d25aa78b-8c54-4023-5bbf-3d709eafcbcb" response_time:0.00262406 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69b5524b9dbcf1fb" x_b3_spanid:"69b5524b9dbcf1fb" x_b3_parentspanid:"-" +ÁýÞ¿úØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚µíûØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.755+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f28cfeee-268e-4077-53cf-2ed36b556521" response_time:0.002594211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"93aa8235fb40a9a9" x_b3_spanid:"93aa8235fb40a9a9" x_b3_parentspanid:"-" +ªíûØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×̓óüØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.215+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"86bb8a31-d2ba-4b3e-5531-12db7d9b4d5d" response_time:0.023703575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de753d96e9f6a13f" x_b3_spanid:"de753d96e9f6a13f" x_b3_parentspanid:"-" +¯øýòüØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉÃá¡ýØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.333+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"376e3f32-bc7a-49c5-5a89-622aaf9e0abc" response_time:0.004049948 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c286c41ba8dcfd0" x_b3_spanid:"8c286c41ba8dcfd0" x_b3_parentspanid:"-" +ò·á¡ýØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜›¨ËþØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.690+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55862" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53d65542-9197-4366-6def-46749cfa0580" response_time:0.002705166 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"006f4ef708f2ad8f" x_b3_spanid:"006f4ef708f2ad8f" x_b3_parentspanid:"-" +ø¨ËþØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯Ž‹äþØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.741+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16072" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"af76c9ab-7e9e-4d54-60df-b07ad977848f" response_time:0.002911928 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c092d8e4f4206f0" x_b3_spanid:"7c092d8e4f4206f0" x_b3_parentspanid:"-" +“üŠäþØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ιŒÍÿØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.960+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2fd5e68-7ce9-4acf-422a-14ff26ebe2ad" response_time:0.004468606 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a3a76290c01ad73" x_b3_spanid:"1a3a76290c01ad73" x_b3_parentspanid:"-" +á­ŒÍÿØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û¾Ù¤‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.682+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"46e03b46-d346-43ac-4939-f83f962f0fb0" response_time:0.002481762 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2de4ed3641a9cf60" x_b3_spanid:"2de4ed3641a9cf60" x_b3_parentspanid:"-" +Ä´Ù¤‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žºƒ­‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.700+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21520" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"206b2122-8684-4584-4716-42d90538793a" response_time:0.002377486 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0aee99c164895c01" x_b3_spanid:"0aee99c164895c01" x_b3_parentspanid:"-" +û«ƒ­‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑΡðƒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.109+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"16c2cb32-464e-4e66-4ef7-f81d31ae7abc" response_time:0.003410309 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e3a10328ffaae63d" x_b3_spanid:"e3a10328ffaae63d" x_b3_parentspanid:"-" +ƒÁ¡ðƒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àÄ•¼„ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.269+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c28174c2-326d-47ba-5e9e-268d322265fe" response_time:0.002489474 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"868b70f8a0eb595a" x_b3_spanid:"868b70f8a0eb595a" x_b3_parentspanid:"-" +θ•¼„ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å‘£…ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.478+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"900271ec-430e-4ab0-59d1-5a6f412c6dfd" response_time:0.009815273 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"47e1e2d42d249f51" x_b3_spanid:"47e1e2d42d249f51" x_b3_parentspanid:"-" +“ƒÂ£…ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­­¥¼†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.791+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16072" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12823e30-a72d-4a6c-49a7-fadb270bd8bd" response_time:0.010026275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8a659aad18a6a635" x_b3_spanid:"8a659aad18a6a635" x_b3_parentspanid:"-" +⚥¼†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬œ³ÌêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.679+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b35f238-6f1a-466f-4dd7-5afe175c446c" response_time:0.007052517 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0aa220a1cce49d77" x_b3_spanid:"0aa220a1cce49d77" x_b3_parentspanid:"-" +‚³ÌêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ïɸ«íÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd61adc7-a8db-4e41-739c-60bcc02b6c92" response_time:0.002787424 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1a59a8046098e7b" x_b3_spanid:"a1a59a8046098e7b" x_b3_parentspanid:"-" +øÁ¸«íÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘ÕíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.494+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6a1ff715-568a-4a0f-4682-a061785d087f" response_time:0.015606485 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"311c723f8a366f6d" x_b3_spanid:"311c723f8a366f6d" x_b3_parentspanid:"-" +È®‘ÕíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ê›ù˜ðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.166+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02064c06-f25b-49dc-557f-d3996203a3be" response_time:0.021690398 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9758e4c675dc62a8" x_b3_spanid:"9758e4c675dc62a8" x_b3_parentspanid:"-" +Õ‹ù˜ðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0챨æðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.348+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8aa9546b-edf6-4d24-6262-b56707ae8d40" response_time:0.002656236 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bef7cb552e0f244d" x_b3_spanid:"bef7cb552e0f244d" x_b3_parentspanid:"-" +¼¤¨æðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»¡øòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.923+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90535d9c-1914-4aac-5554-bd4b79890d88" response_time:0.002313928 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7beba003f146d9f6" x_b3_spanid:"7beba003f146d9f6" x_b3_parentspanid:"-" +²³¡øòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Âä¦ÐôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.375+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a08cfcf4-14d3-46f7-487e-77a9bfb0ae11" response_time:0.003109892 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af4eee750982757c" x_b3_spanid:"af4eee750982757c" x_b3_parentspanid:"-" +½Û¦ÐôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˪ƒ‘õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.511+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0e9e0b3-0395-46cd-71a5-fb8416b47a99" response_time:0.002467204 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"220e34a674b43c4d" x_b3_spanid:"220e34a674b43c4d" x_b3_parentspanid:"-" +ðƒ‘õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îšüÒùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.723+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77d29044-9735-4879-78af-55627f456054" response_time:0.002488202 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc08d5c48a4ccdee" x_b3_spanid:"cc08d5c48a4ccdee" x_b3_parentspanid:"-" +Ó‹üÒùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý…ðùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.784+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"00a7d8fd-7f91-40b2-678c-2d9bb051ef47" response_time:0.002406106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4da130a848561e2" x_b3_spanid:"c4da130a848561e2" x_b3_parentspanid:"-" +ƒ„…ðùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý—ÝÁúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.956+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d32cf02-1b75-4571-614c-d28569ab7a65" response_time:0.002524654 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d98fcc510d680e7" x_b3_spanid:"4d98fcc510d680e7" x_b3_parentspanid:"-" +³ˆÝÁúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó ßÌüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.511+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3453339b-74ad-4078-5137-476380854297" response_time:0.007553946 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30db0a9da0d3c1bb" x_b3_spanid:"30db0a9da0d3c1bb" x_b3_parentspanid:"-" +Ô—ßÌüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ùë‘èüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.572+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dfe5ba88-89c6-42fb-783e-f34f2925f410" response_time:0.003106987 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a559917b7591ec7" x_b3_spanid:"5a559917b7591ec7" x_b3_parentspanid:"-" +¹à‘èüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËÖÉÏ€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.595+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"47e47f41-9b18-4603-47d5-cab3b17fa887" response_time:0.002594542 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c57fa4800f696c3c" x_b3_spanid:"c57fa4800f696c3c" x_b3_parentspanid:"-" +ŒÏÉÏ€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÊÃãÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.905+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"081d486d-cc6b-444c-6207-6b4da9e711aa" response_time:0.002645021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0843ec2aa0ad5a34" x_b3_spanid:"0843ec2aa0ad5a34" x_b3_parentspanid:"-" +§¿ÃãÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–èùû‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.225+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea2afc06-8fe8-4705-5618-d58510436625" response_time:0.002717053 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"046586932a7a5bbc" x_b3_spanid:"046586932a7a5bbc" x_b3_parentspanid:"-" +µÜùû‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ø§‚†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70f91f9e-ee68-4d34-7fd1-a0717586a630" response_time:0.005159803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"abca487a8accd638" x_b3_spanid:"abca487a8accd638" x_b3_parentspanid:"-" +Úé§‚†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ºœ‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.366+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d36712c-e837-4bc3-447d-0fdb6b01984d" response_time:0.003135524 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8845f6727c73e2fc" x_b3_spanid:"8845f6727c73e2fc" x_b3_parentspanid:"-" +Ç«œ‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö‡»ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.773+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"af5f5a85-ce26-42e2-5665-5e95e3abc1ad" response_time:0.002739732 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d08c2116e4e4ba5" x_b3_spanid:"1d08c2116e4e4ba5" x_b3_parentspanid:"-" +•‡‡»ŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤êÇÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.064+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5711af4d-4e4f-4e64-6316-908384eedcc2" response_time:0.005716598 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4a2e09867e95d069" x_b3_spanid:"4a2e09867e95d069" x_b3_parentspanid:"-" +úàÇÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”Æ­üÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.178+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"73718d4b-c759-43e2-7ba2-e596a9e3bd28" response_time:0.002860673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18749f65c34a320f" x_b3_spanid:"18749f65c34a320f" x_b3_parentspanid:"-" +žµ­üÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸´ÌõŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.433+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b7532e6-86b8-4092-71e9-e6ac6b0575c9" response_time:0.002606997 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a776da70f3fbe58" x_b3_spanid:"5a776da70f3fbe58" x_b3_parentspanid:"-" +‡©ÌõŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò†Ã¼ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"949b52e1-1768-401b-7666-f9cc05d5cc81" response_time:0.002402537 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0339e346ca2acb31" x_b3_spanid:"0339e346ca2acb31" x_b3_parentspanid:"-" +šøÂ¼ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆàÿÌÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.617+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5fd406b-5aef-4ab4-6b90-f4ee4dd703da" response_time:0.002372066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0276e8a53189c814" x_b3_spanid:"0276e8a53189c814" x_b3_parentspanid:"-" +öÔÿÌÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈóöêÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.679+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7dc96be5-7a8f-477c-4f8b-e8b7c4caf69f" response_time:0.002534585 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"db48771ac5dc47ad" x_b3_spanid:"db48771ac5dc47ad" x_b3_parentspanid:"-" +òêöêÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ïÃñ“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.763+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74660c73-81e7-419a-607b-7059c1ab7564" response_time:0.006271177 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9401171876e066dd" x_b3_spanid:"9401171876e066dd" x_b3_parentspanid:"-" +ÃãÃñ“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºï͔ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.954+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a91258c1-82fe-4976-5638-51712655ab09" response_time:0.008908538 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fbc96212cfe661a1" x_b3_spanid:"fbc96212cfe661a1" x_b3_parentspanid:"-" +×ÿî͔ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ¿ŒÜ”ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.989+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"153c5976-e2aa-41c3-6fdd-5e538a0dcdbe" response_time:0.004182432 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b80ca5148b85594d" x_b3_spanid:"b80ca5148b85594d" x_b3_parentspanid:"-" +Ù´ŒÜ”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0É‹«ö”ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.043+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"854069f3-c9cb-4227-632a-c15020bbf1d3" response_time:0.005033245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f435e3e009b1874" x_b3_spanid:"4f435e3e009b1874" x_b3_parentspanid:"-" +¦€«ö”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»úµ–ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d35fe989-336f-413f-585f-483ba027184a" response_time:0.003175971 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a88cc51af64f8dad" x_b3_spanid:"a88cc51af64f8dad" x_b3_parentspanid:"-" +Ïžúµ–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜½À§—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.685+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12418" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6cb48913-3957-4415-5477-9d1e6d22e1be" response_time:0.002874438 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"86dc525ed398e4d4" x_b3_spanid:"86dc525ed398e4d4" x_b3_parentspanid:"-" +¨´À§—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘º¬ó—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.844+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12418" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"95135f6e-d3f1-4707-547e-80d0ea1e6009" response_time:0.002614205 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd9e6875c0af29e9" x_b3_spanid:"dd9e6875c0af29e9" x_b3_parentspanid:"-" +殬ó—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åçã™ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.347+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"98681321-d41f-4f58-530a-d7b1575b8e7f" response_time:0.002331995 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f40ac33528175730" x_b3_spanid:"f40ac33528175730" x_b3_parentspanid:"-" +«Ûã™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Lj”ŸšÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.470+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f3f362b-fbf0-45b4-5d13-7238cb68cd96" response_time:0.005992709 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dbb0f869398595e8" x_b3_spanid:"dbb0f869398595e8" x_b3_parentspanid:"-" +çÿ“ŸšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó³†³›ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.783+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7d5f9be-45ca-4515-763f-ed73d9c4f3bb" response_time:0.002839989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e6278a6d15eb96e" x_b3_spanid:"9e6278a6d15eb96e" x_b3_parentspanid:"-" + ¨†³›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ݰÏÒ›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.849+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c721b431-240e-424f-50fd-c68aff807730" response_time:0.002899166 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9cdbf76770b15398" x_b3_spanid:"9cdbf76770b15398" x_b3_parentspanid:"-" +Õ¢ÏÒ›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍÌÇÀœÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.079+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b8b8391-17bc-4986-5158-7b1c0c6f1e9c" response_time:0.002943963 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0bacef6acb99a15b" x_b3_spanid:"0bacef6acb99a15b" x_b3_parentspanid:"-" +ûÁÇÀœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡Ó§ÐœÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.112+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5a5830c-2723-4e07-6f71-c244da4717b3" response_time:0.003470724 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c5f3c9ff28d7ba7c" x_b3_spanid:"c5f3c9ff28d7ba7c" x_b3_parentspanid:"-" +¯Ä§ÐœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’äÙÅÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.357+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e8cb815-5aba-4614-4a4e-89b1791e895a" response_time:0.004453038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f425d82e8b7e15e9" x_b3_spanid:"f425d82e8b7e15e9" x_b3_parentspanid:"-" +ÕÛÙÅÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 áç÷ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.463+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a5212d2-ac65-4376-6b7c-c292e917b483" response_time:0.003567345 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"990dc1da6569b233" x_b3_spanid:"990dc1da6569b233" x_b3_parentspanid:"-" +®Õç÷ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œ±ñàžÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.684+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"849d29a7-f5ef-47a7-44ca-68558496218b" response_time:0.003538914 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6dfb2ffe66eae70a" x_b3_spanid:"6dfb2ffe66eae70a" x_b3_parentspanid:"-" +Ì¢ñàžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–¿žŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.752+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3251220b-dd7f-4bfe-656b-d039e164285a" response_time:0.002884342 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63da8be1dc4506dd" x_b3_spanid:"63da8be1dc4506dd" x_b3_parentspanid:"-" +˸žŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•ŽÛÞ¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.485+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f93a14d5-459d-4747-7b8a-c4b0b3dccdf3" response_time:0.002985473 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c64e319656a5715" x_b3_spanid:"8c64e319656a5715" x_b3_parentspanid:"-" +´ýÚÞ¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûúÖ„¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.560+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12484" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"76e778b1-dde4-4fea-407b-8e788e419eb4" response_time:0.007016837 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a50e296858c05a6a" x_b3_spanid:"a50e296858c05a6a" x_b3_parentspanid:"-" +³æÖ„¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßš«º¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.677+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64cb7bae-4801-487a-5fb1-d37247f6dec3" response_time:0.003492804 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"182717a3d96a99c1" x_b3_spanid:"182717a3d96a99c1" x_b3_parentspanid:"-" +ðŽ«º¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0𥃼¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.666+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62b58178-f46a-434f-5be1-99ca5e3f2cab" response_time:0.017458173 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f33cc64ca9246b3" x_b3_spanid:"3f33cc64ca9246b3" x_b3_parentspanid:"-" +Ê’ƒ¼¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾Ø«ß£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"140926fa-eed2-4d88-75de-53c16e59a60a" response_time:0.003002385 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f709cdbfbbb8044" x_b3_spanid:"6f709cdbfbbb8044" x_b3_parentspanid:"-" +¦Ë«ß£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊÀãѤڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3e484a66-4bc6-4d1e-64ea-e922ee7d3a31" response_time:0.003554656 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bcee256f687ec2dc" x_b3_spanid:"bcee256f687ec2dc" x_b3_parentspanid:"-" +ѵãѤڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ ™ ¦ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad4d782d-bd45-44f5-43c7-fbbe5f982636" response_time:0.002568094 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c9a5df8f624d16a" x_b3_spanid:"6c9a5df8f624d16a" x_b3_parentspanid:"-" +´—™ ¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Áõ˜§ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.929+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"85845e45-74ee-4e6c-5af8-e5b01f404569" response_time:0.002453295 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"34f7ad2a3c49cf86" x_b3_spanid:"34f7ad2a3c49cf86" x_b3_parentspanid:"-" +§ê˜§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šÝ÷šªÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.759+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"775c43ce-910f-413f-4a51-8e59a4d3470d" response_time:0.002276664 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4e4a4d8c76644c7" x_b3_spanid:"c4e4a4d8c76644c7" x_b3_parentspanid:"-" +ýÑ÷šªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÅÔ„¬ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:06.249+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b1d53224-da6f-4e1d-5f2c-6e81b306760d" response_time:0.002582979 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac27629d16b3bcf2" x_b3_spanid:"ac27629d16b3bcf2" x_b3_parentspanid:"-" +§¼Ô„¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘–Ū­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.597+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12484" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8500dcee-e5c5-4bcb-40fa-3dc0b628db24" response_time:0.002475304 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"668793d114bd51a0" x_b3_spanid:"668793d114bd51a0" x_b3_parentspanid:"-" +›Åª­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ‰Ò¤®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.850+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12484" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b77ff302-64a3-4794-630c-8af333d83586" response_time:0.005367621 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff1ada71fe6ccfb7" x_b3_spanid:"ff1ada71fe6ccfb7" x_b3_parentspanid:"-" +²‚Ò¤®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í‘„¦±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.661+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04ea89f2-3bd3-426a-45b4-65a952b458e1" response_time:0.003321282 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e20fa33411154381" x_b3_spanid:"e20fa33411154381" x_b3_parentspanid:"-" +ˇ„¦±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆëÉü±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e13c6893-cedf-4b25-72b2-7fc94325774c" response_time:0.002369066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"84d70e74b0a22527" x_b3_spanid:"84d70e74b0a22527" x_b3_parentspanid:"-" +ðáÉü±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦©Â²ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.989+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"44eac7f1-7d85-4a4f-78bc-7e3c44ae88f0" response_time:0.003026746 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31be5556a85418f5" x_b3_spanid:"31be5556a85418f5" x_b3_parentspanid:"-" +‚ž©Â²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ ƒ‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7f069c4f-a72a-40a3-52a6-cef7bc6fed82" response_time:0.001635618 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44f71755514da5ef" x_b3_spanid:"44f71755514da5ef" x_b3_parentspanid:"-" +ö‹ƒ‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0ÅûŸí‘ ›ÖB[ +Successfully created container‘ïŸí‘ ›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegorcell_z2z$ea1de0b9-1969-44d4-8c29-a5711d8c08ae‚ 10.10.148.97 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0”ÂØïŸ ›ÖBd +'Starting health monitoring of container†³ØïŸ ›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegorcell_z2z$ea1de0b9-1969-44d4-8c29-a5711d8c08ae‚ 10.10.148.97 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0똺  ›ÖBJ + Exit status 0äߘº  ›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegorcell_z2z$ea1de0b9-1969-44d4-8c29-a5711d8c08ae‚ 10.10.148.97 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0žÌÜÇ·…œÖBO +Creating container§ÁÜÇ·…œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0權Ϲ…œÖB[ +Successfully created container©ŠÏ¹…œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0þ€”ýÂ…œÖBð +ªCannot calculate JVM memory configuration: There is insufficient memory remaining for heap. Memory limit 512M is less than allocated memory 685904K (-XX:ReservedCodeCacheSize=240M, -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=103991K, -XX:CompressedClassSpaceSize=18713K, -Xss1M * 300 threads)­ê“ýÂ…œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79* APP/PROC/WEB20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0©ã”þÂ…œÖBR + Exit status 1ùÖ”þÂ…œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79* APP/PROC/WEB20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0æþ¬ŒÃ…œÖBJ + Exit status 0Û﬌ÅœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾©—ޱМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:24.182+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14567" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42238baf-483c-485e-45bb-0a88a9fa4872" response_time:0.002201913 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b19fea425479d51a" x_b3_spanid:"b19fea425479d51a" x_b3_parentspanid:"-" +¶š—ޱМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸Ý§ì±ÐœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:24.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17957" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"772cd997-9f1b-44df-7174-bccd6fec2987" response_time:0.0023321 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e765d52843030f7" x_b3_spanid:"2e765d52843030f7" x_b3_parentspanid:"-" +ŒÐ§ì±ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ܦ®–²ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:24.300+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14567" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02a7d304-3231-4920-4a57-facd95e43365" response_time:0.001810245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0f9de7851c26a02" x_b3_spanid:"d0f9de7851c26a02" x_b3_parentspanid:"-" +ù‘®–²ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âžÚª·ÐœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:25.685+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf9a4f0d-3d5a-48ef-5a90-f71c5a705cfa" response_time:0.00194412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b6eb96b3b71a677" x_b3_spanid:"9b6eb96b3b71a677" x_b3_parentspanid:"-" +¤’Úª·ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öÍýǷМÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:25.746+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17473" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c23bab68-e367-401c-7cd8-782faba0e656" response_time:0.0019474 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d51e01b380a9f858" x_b3_spanid:"d51e01b380a9f858" x_b3_parentspanid:"-" +ÏÁýǷМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯¬¼Ü·ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:25.790+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14567" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ae91bfb8-fdfc-4d69-578c-cc3863da7810" response_time:0.001758874 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9fe89d9a1f8fe927" x_b3_spanid:"9fe89d9a1f8fe927" x_b3_parentspanid:"-" +³¥¼Ü·ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó™îڸМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:26.055+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18351" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9fa22791-ae1c-4750-5729-01eea3691607" response_time:0.001819033 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95f9628febbd7ca7" x_b3_spanid:"95f9628febbd7ca7" x_b3_parentspanid:"-" +¾’îڸМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ…˜½»ÐœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:26.795+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18351" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1eb04d5c-3f9b-4519-6794-eb0d9e36c4b4" response_time:0.00407511 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"09d049c7b75e9d61" x_b3_spanid:"09d049c7b75e9d61" x_b3_parentspanid:"-" +Ýø—½»ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó¬…¬¾ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:27.566+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17957" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4cf57c03-5721-417d-7f6f-67fed5fb4286" response_time:0.002454272 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cce054193f68c24a" x_b3_spanid:"cce054193f68c24a" x_b3_parentspanid:"-" +­¤…¬¾ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏÞ žÂМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:28.611+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15709" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42af35f1-0304-4ef0-6eb9-00db9c02175a" response_time:0.002383281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4b9cc3622bf8cd06" x_b3_spanid:"4b9cc3622bf8cd06" x_b3_parentspanid:"-" +¼Ô žÂМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÌÔ‡ùÃМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:29.071+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17473" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6b89c46-3514-4bfa-631e-5496838059eb" response_time:0.001553646 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"16f7ec97c778daad" x_b3_spanid:"16f7ec97c778daad" x_b3_parentspanid:"-" +ÁLJùÃМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þƒÖÄМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:29.112+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17473" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"17da160f-46ef-438f-7325-0861291a7662" response_time:0.003468449 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ffc7b783f7f703b6" x_b3_spanid:"ffc7b783f7f703b6" x_b3_parentspanid:"-" +ÂøÕÄМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ØúŽÉМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:30.458+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7a2163b6-5509-4f4a-640b-c19632efb83f" response_time:0.002395026 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b13bf2acb3bdaf6" x_b3_spanid:"6b13bf2acb3bdaf6" x_b3_parentspanid:"-" +øÐúŽÉМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›°ÉМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:30.524+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0dda60f2-8d12-423c-5483-bf2a3e244f1d" response_time:0.006200754 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f196e5248255f6d" x_b3_spanid:"2f196e5248255f6d" x_b3_parentspanid:"-" +°ÉМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝÛ“ÊМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:30.737+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17473" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b32f1ade-4357-48ba-71ef-d29d3169aaa2" response_time:0.001965562 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"344caad2fa1eade2" x_b3_spanid:"344caad2fa1eade2" x_b3_parentspanid:"-" +ÊÍÛ“ÊМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0LJ›žÌМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:31.291+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"31438ba2-6c34-4d24-74c7-d86bb961495a" response_time:0.007333482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a3f71a249c2f783e" x_b3_spanid:"a3f71a249c2f783e" x_b3_parentspanid:"-" +±ûšžÌМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ó®ÎÌМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:31.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e9fd4fa1-66dd-4812-6bc4-1254f37025ce" response_time:0.005327668 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7f7b2f481b3db170" x_b3_spanid:"7f7b2f481b3db170" x_b3_parentspanid:"-" +¯ä®ÎÌМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãÆ¾×ÌМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:31.416+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7dd8cb40-a795-4e74-693f-69da2f545de4" response_time:0.001824908 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e5b38cb45c1c9b25" x_b3_spanid:"e5b38cb45c1c9b25" x_b3_parentspanid:"-" +Ž¿¾×ÌМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³ÜÝÿÌМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:31.500+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17473" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e44c0e99-2e61-4989-580a-28a4d87e94c8" response_time:0.003023951 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad70e2fd8dff62e5" x_b3_spanid:"ad70e2fd8dff62e5" x_b3_parentspanid:"-" +ñÕÝÿÌМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹„±ŒÍМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:31.524+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17473" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d01d6906-eb5a-4354-5f07-dbd53810fc6b" response_time:0.005063922 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5b7ca77bb86b0c31" x_b3_spanid:"5b7ca77bb86b0c31" x_b3_parentspanid:"-" +Ïø°ŒÍМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ùîìÒМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:33.071+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18135" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4271c4f9-2d37-43f1-5eb9-1c362ba3524a" response_time:0.002272549 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2dc71c3e670a0b2e" x_b3_spanid:"2dc71c3e670a0b2e" x_b3_parentspanid:"-" +—ñîìÒМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜Û³³ÙМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:34.829+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18729" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f237fb8-c0c7-4752-4f7d-958d99133343" response_time:0.00266046 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9ba9ad6f2d4eb4c3" x_b3_spanid:"9ba9ad6f2d4eb4c3" x_b3_parentspanid:"-" +çÒ³³ÙМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0é˺‹ÜМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:35.548+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16301" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"700c928c-9176-4da7-50ff-399f27c5314b" response_time:0.005931371 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9033bca9aa2020ab" x_b3_spanid:"9033bca9aa2020ab" x_b3_parentspanid:"-" +ý½º‹ÜМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ö¨ïÜМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:35.760+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18729" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0635d766-c8e3-42e6-7c1e-db20b3592ff4" response_time:0.003431088 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1e9689fc2b7baf5" x_b3_spanid:"a1e9689fc2b7baf5" x_b3_parentspanid:"-" +Ëî¨ïÜМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ĦœûÝМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:36.055+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15709" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6722fbef-7e7d-4e19-65df-f662ecb7ea5a" response_time:0.001632038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"367fc28d1a46a3d6" x_b3_spanid:"367fc28d1a46a3d6" x_b3_parentspanid:"-" +÷›œûÝМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øð÷¨áМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:36.950+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16301" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"caf13c65-9d4a-4620-6459-def672794d69" response_time:0.007710619 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec1a972d83460296" x_b3_spanid:"ec1a972d83460296" x_b3_parentspanid:"-" +Ûä÷¨áМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë§ÏáМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.035+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8d5c748-11bc-43da-5458-7f8383f64e5f" response_time:0.002647977 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f894383abea43ce" x_b3_spanid:"3f894383abea43ce" x_b3_parentspanid:"-" +ÝÃŒÏáМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž®ã¤âМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:37.214+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3fadc27c-d13f-4212-6c61-0e3b747dbfcd" response_time:0.00353062 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38ba95de6376ce75" x_b3_spanid:"38ba95de6376ce75" x_b3_parentspanid:"-" +êŒã¤âМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ûß¹÷âМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.388+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6898061c-de5e-4f97-77de-a02313e216d2" response_time:0.003069425 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ceca888ee45eba38" x_b3_spanid:"ceca888ee45eba38" x_b3_parentspanid:"-" +õÔ¹÷âМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 çò¾ãМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.539+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15585" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b42a8ce-6ded-4e6f-51bf-99cd200f8011" response_time:0.001910234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"15d30fdb4e3a4d84" x_b3_spanid:"15d30fdb4e3a4d84" x_b3_parentspanid:"-" +‘ßò¾ãМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý†°ãæÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:38.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16301" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cce0e661-2bca-4349-5590-73a7b455c686" response_time:0.003640848 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f65ae5fa83d25b4" x_b3_spanid:"1f65ae5fa83d25b4" x_b3_parentspanid:"-" +Äø¯ãæÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º†øöæÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:38.461+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15585" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"669ebc9d-2e9b-40b4-56e2-81ba1edb1c29" response_time:0.002025565 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f7fcc21a30c49a4a" x_b3_spanid:"f7fcc21a30c49a4a" x_b3_parentspanid:"-" +×ú÷öæÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éµ²ïçМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:38.711+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16301" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b4fbd8a-d99f-4033-5bab-89e5600d8ef8" response_time:0.00459945 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"272ac320b68ae2b8" x_b3_spanid:"272ac320b68ae2b8" x_b3_parentspanid:"-" +ª²ïçМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿¤âÐíМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:40.254+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53bbe04b-0095-41e9-5964-05e61cadff48" response_time:0.00805484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"996ba2ab582a65fe" x_b3_spanid:"996ba2ab582a65fe" x_b3_parentspanid:"-" +˜âÐíМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù¯ÿíМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:40.358+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77ee981a-7c06-4804-7620-12bfcd1f6150" response_time:0.002361501 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1fc3e1f14b70fcd6" x_b3_spanid:"1fc3e1f14b70fcd6" x_b3_parentspanid:"-" +¯ö®ÿíМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À„ý—òМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:41.484+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06175248-98e9-41ed-7093-0251c3dd2323" response_time:0.001755443 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"111ad562d43e47f8" x_b3_spanid:"111ad562d43e47f8" x_b3_parentspanid:"-" +ôùü—òМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ü…€”õМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.278+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15577" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea6b0752-28e0-44f3-5336-0628bbf965e1" response_time:0.004350257 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"614ad24cf2429122" x_b3_spanid:"614ad24cf2429122" x_b3_parentspanid:"-" +Žúÿ“õМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ÝìÄúМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:43.725+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15577" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b92597b5-714c-4a63-7378-99dc2ec79e8b" response_time:0.001812137 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3ac6dced8a94d0d6" x_b3_spanid:"3ac6dced8a94d0d6" x_b3_parentspanid:"-" +òÏìÄúМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª¯àªüМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.206+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15067" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"21d03319-837a-40e5-640e-75dbf1efa30d" response_time:0.003260998 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"07875ae12eee0b67" x_b3_spanid:"07875ae12eee0b67" x_b3_parentspanid:"-" +ΤàªüМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óàºÿМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:45.046+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15585" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5487b693-d30c-4c48-4174-c040d85ccc91" response_time:0.001729714 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fee8595aab48591b" x_b3_spanid:"fee8595aab48591b" x_b3_parentspanid:"-" +÷†àºÿМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿Œ…›ƒÑœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:46.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18807" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"faf9e0a7-d69b-421b-7a0c-f6587824f252" response_time:0.002031331 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce7ec647fbbb1f18" x_b3_spanid:"ce7ec647fbbb1f18" x_b3_parentspanid:"-" +Þÿ„›ƒÑœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËŒ€×‡ÑœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:47.253+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc5c8a49-4bca-4159-6086-da14362ede7c" response_time:0.001777845 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c94aafd082ff685a" x_b3_spanid:"c94aafd082ff685a" x_b3_parentspanid:"-" +ـׇќÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÇ·ò‡ÑœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:47.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18729" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1199dd76-7585-4c4e-4e6e-d9dcbf078851" response_time:0.001897913 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d387efb3012c720" x_b3_spanid:"3d387efb3012c720" x_b3_parentspanid:"-" +Õ¾·ò‡ÑœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“ëס ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.010+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:11141" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12507bdd-3ae3-40c3-75a3-d8eca8d75b13" response_time:0.002096785 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cdb8eab3ab616d26" x_b3_spanid:"cdb8eab3ab616d26" x_b3_parentspanid:"-" +Ûßס ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ω¹õ¬×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.408+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6e442c9d-6a59-46c6-6f8d-5becd9b63680" response_time:0.001628192 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95381c3aa6ec45df" x_b3_spanid:"95381c3aa6ec45df" x_b3_parentspanid:"-" +õü¸õ¬×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÔ¥˜­×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.481+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33368" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8081aeaa-82bc-4734-4982-3c770131e303" response_time:0.001703557 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"744d961d8b0a38dd" x_b3_spanid:"744d961d8b0a38dd" x_b3_parentspanid:"-" +µÈ¥˜­×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0쿮לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.831+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bc73fb9c-aa7f-4b06-508c-5dbfc823bb83" response_time:0.002121893 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cd686f4f116492c" x_b3_spanid:"1cd686f4f116492c" x_b3_parentspanid:"-" +Å¿®×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ίÁ”°×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:24.278+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33848" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7fe6c338-f63d-4f39-5d54-aac47857b26f" response_time:0.001771931 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78cdc95631c49bda" x_b3_spanid:"78cdc95631c49bda" x_b3_parentspanid:"-" +½üÀ”°×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨½ò¹±×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:24.625+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52a3dda4-38da-4c38-7339-e00a34c8a480" response_time:0.00187187 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f24830608c7968fa" x_b3_spanid:"f24830608c7968fa" x_b3_parentspanid:"-" +ì°ò¹±×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òæÁý±×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:24.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d8ec8d7e-bd7c-4ccd-7ff5-fad82cdd509c" response_time:0.001578185 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"12f1526623439532" x_b3_spanid:"12f1526623439532" x_b3_parentspanid:"-" +•ÜÁý±×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü’ú®¶×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:25.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28058" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e496558d-5951-4958-7458-a0fbbeb8ecc4" response_time:0.001493206 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"04d0ea86acb0a4f7" x_b3_spanid:"04d0ea86acb0a4f7" x_b3_parentspanid:"-" +Í‹ú®¶×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ôò·×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.141+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"93428d34-3c97-44c2-5a66-283e3b0b13b9" response_time:0.002597527 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b08e649eb967394" x_b3_spanid:"6b08e649eb967394" x_b3_parentspanid:"-" +íê·×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ‰”ܹלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.844+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cd1b0916-17e4-4237-5b8a-589dc720a156" response_time:0.001635148 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3abca861fcc9b5d9" x_b3_spanid:"3abca861fcc9b5d9" x_b3_parentspanid:"-" +íÿ“ܹלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àÙÄé¹×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.872+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3320f50-0b6f-4e64-550d-cd948d286273" response_time:0.001657999 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0ec282f7564ca7c" x_b3_spanid:"e0ec282f7564ca7c" x_b3_parentspanid:"-" +«ÑÄé¹×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶òŠ¢º×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:26.991+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33848" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8298e6d3-663e-4879-462c-11163c250e5d" response_time:0.001776199 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"405dbd9e4f369ae4" x_b3_spanid:"405dbd9e4f369ae4" x_b3_parentspanid:"-" +ó犢º×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ä¡Åº×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:27.064+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6de05dbb-e124-4ab3-5ded-c336d9291a99" response_time:0.002042454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c64c3c2366897e24" x_b3_spanid:"c64c3c2366897e24" x_b3_parentspanid:"-" +ðءźלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ·Ä¿×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.405+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7fe4e0d-ef2f-424c-71b7-a14771254f09" response_time:0.001979626 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce8bd0eda69a041b" x_b3_spanid:"ce8bd0eda69a041b" x_b3_parentspanid:"-" +£Þ·Ä¿×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥õ†ÝÃלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:29.530+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c3a5fe7-bce2-4f0b-548c-369b2ac6628f" response_time:0.002045257 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"add00adf62e74f86" x_b3_spanid:"add00adf62e74f86" x_b3_parentspanid:"-" +Ìç†ÝÃלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³ºÿÛÄלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:29.789+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1973359e-7784-4a10-6e65-584836ea80b0" response_time:0.008970181 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8d50ad98154ab460" x_b3_spanid:"8d50ad98154ab460" x_b3_parentspanid:"-" +°®ÿÛÄלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉÛòÌלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:31.782+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba59786b-22c0-4d13-54e8-bb9b987f3099" response_time:0.005848818 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"13a40ef16ed3d63e" x_b3_spanid:"13a40ef16ed3d63e" x_b3_parentspanid:"-" +ŸÎòÌלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛÝ‹ÏÌלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:31.916+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3545851a-a1b8-4738-7b83-b51070f71f56" response_time:0.002412823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0624b20b7acafcbb" x_b3_spanid:"0624b20b7acafcbb" x_b3_parentspanid:"-" +¨Ð‹ÏÌלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ§±–ÍלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.066+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33964" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e60c7f13-fb06-40d6-6193-9c27a3c6c135" response_time:0.001800828 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a490478c2501c5e" x_b3_spanid:"5a490478c2501c5e" x_b3_parentspanid:"-" +ýž±–ÍלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôÙÈËÎלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"adfe201f-e6f0-46db-60a6-a8543d751a65" response_time:0.002547504 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"023d8fa26df6dec4" x_b3_spanid:"023d8fa26df6dec4" x_b3_parentspanid:"-" +üÍÈËÎלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çþ‚‰ÐלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.844+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1fd873c6-bbc1-469d-61dc-318f59d8b840" response_time:0.001447244 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ee4d054ee22309b4" x_b3_spanid:"ee4d054ee22309b4" x_b3_parentspanid:"-" +àö‚‰ÐלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ꂈ«ÔלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.988+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dfa26d06-2425-48a9-4c82-40fbd228c86f" response_time:0.002532488 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a902fcaa1592e6d9" x_b3_spanid:"a902fcaa1592e6d9" x_b3_parentspanid:"-" +Ò÷‡«ÔלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²äÆËÖלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:34.592+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cbfa51b2-bc32-4921-6c00-c5edcf41ccc8" response_time:0.003927529 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a84d8f73e969c329" x_b3_spanid:"a84d8f73e969c329" x_b3_parentspanid:"-" +ÊØÆËÖלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹¹óÍÞלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:36.746+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28058" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77f62941-da50-48e3-6ac5-56f39a59748f" response_time:0.001623468 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5f83b6b6e43698ca" x_b3_spanid:"5f83b6b6e43698ca" x_b3_parentspanid:"-" +Ç«óÍÞלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÛø¦àלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:37.201+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0e37c67-a100-43dd-5028-2e777184108e" response_time:0.001900405 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dbac9d9ee53a30d6" x_b3_spanid:"dbac9d9ee53a30d6" x_b3_parentspanid:"-" +ùÎø¦àלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëôÛ¶àלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:37.232+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2bffa33-bbdc-4249-61b6-3854e6007d4a" response_time:0.004748849 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4050830f1e719024" x_b3_spanid:"4050830f1e719024" x_b3_parentspanid:"-" +ÖêÛ¶àלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ“˜àáלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:37.590+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"55fc9b70-e83c-43e7-5427-5ceb38aebfc0" response_time:0.00205279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4f0408589eff41c" x_b3_spanid:"e4f0408589eff41c" x_b3_parentspanid:"-" +û†˜àáלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½Õæ»ãלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:38.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eeb239e5-bfcb-4c5e-7cfb-02e924f33831" response_time:0.002006157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"50eb45977ffae3f6" x_b3_spanid:"50eb45977ffae3f6" x_b3_parentspanid:"-" +˜Ææ»ãלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šä¹ºèלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:39.389+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a187e01a-660a-4cb7-5ecc-1b7538b41bb2" response_time:0.002750248 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e1f122b0e41c614" x_b3_spanid:"5e1f122b0e41c614" x_b3_parentspanid:"-" +ߨ¹ºèלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—±„ÎðלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:41.578+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e44b224-6d10-4882-5891-b3e99d55b728" response_time:0.002013985 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9920d170293e6820" x_b3_spanid:"9920d170293e6820" x_b3_parentspanid:"-" +ᤄÎðלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”¾´çµÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16531" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60987e1c-eeaf-4421-77ff-aeafd8b2e2b8" response_time:0.001884864 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1be20ca581ae9c5" x_b3_spanid:"b1be20ca581ae9c5" x_b3_parentspanid:"-" +ʬ´çµÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’¡–¶ÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:34.612+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f2d9132-b821-4d1a-53df-414cf6bdaebb" response_time:0.00142888 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d89df6c304e289d" x_b3_spanid:"4d89df6c304e289d" x_b3_parentspanid:"-" +‡–¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤‡›‚·ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.838+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64ef4fa8-2572-412c-4019-ab4009674bd1" response_time:0.001732077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e66f21f53e21fec" x_b3_spanid:"9e66f21f53e21fec" x_b3_parentspanid:"-" +§÷š‚·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶â ·ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:34.895+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2237ec74-e80e-487e-4e9a-3e959b41dcf7" response_time:0.001833461 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4ca0c40c93754afb" x_b3_spanid:"4ca0c40c93754afb" x_b3_parentspanid:"-" +†Ù ·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™°Ë·ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.896+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"797e3070-dab4-4997-4cc5-728992612ac6" response_time:0.001651358 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6fe6b0f9c5996ea" x_b3_spanid:"d6fe6b0f9c5996ea" x_b3_parentspanid:"-" +ɧ˷ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù³ªª·ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:34.922+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b0b8cab-b116-412d-7b03-299c49c5121f" response_time:0.002216681 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"904e3885e8504bcf" x_b3_spanid:"904e3885e8504bcf" x_b3_parentspanid:"-" +ü§ªª·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²Íï·ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:35.068+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a596584e-b3e6-42fe-6c62-ced1a489b7de" response_time:0.001388562 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c09f184278ea149" x_b3_spanid:"6c09f184278ea149" x_b3_parentspanid:"-" +‚•Íï·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈÈõþ·ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:35.100+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3b6c776e-3dc5-4d0b-7e83-84754a172425" response_time:0.001408692 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2ab4f1c410e56fe" x_b3_spanid:"d2ab4f1c410e56fe" x_b3_parentspanid:"-" +ú¼õþ·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üø¦—¸ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:35.151+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df5c2424-af62-49de-4b87-ca50bf6e9485" response_time:0.001784999 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6472daaa0e7c5cce" x_b3_spanid:"6472daaa0e7c5cce" x_b3_parentspanid:"-" +´ì¦—¸ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜÚÏŹٜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:35.516+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7fe1b21a-a582-4c47-74c6-06b858662da5" response_time:0.00209158 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f08d8876ec1cd48c" x_b3_spanid:"f08d8876ec1cd48c" x_b3_parentspanid:"-" +ÐÎÏŹٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Íý½ŒºÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:35.665+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e395c64b-fed8-462a-622c-69bda4116e0a" response_time:0.001492484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f450353624e9040" x_b3_spanid:"3f450353624e9040" x_b3_parentspanid:"-" +üõ½ŒºÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»¡¼À»ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.042+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8f15022-a7f5-4881-485f-6b438b01c94e" response_time:0.002125049 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8630d140b1a6cfe2" x_b3_spanid:"8630d140b1a6cfe2" x_b3_parentspanid:"-" +‚™¼À»ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹ãÁƻٜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.055+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf932449-9938-405c-4e5d-14c10486a677" response_time:0.001575712 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6bccf43fec4f711" x_b3_spanid:"d6bccf43fec4f711" x_b3_parentspanid:"-" +áÚÁƻٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±çÖª¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b12d402-df6d-4ce7-6c6c-29ecdb1280e2" response_time:0.002331015 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"66f7465046265e0d" x_b3_spanid:"66f7465046265e0d" x_b3_parentspanid:"-" +ìÞÖª¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷¡šÊ¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.328+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce30da6e-ec28-42db-583c-53fa3f7d056d" response_time:0.004475277 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0801e88040e022e6" x_b3_spanid:"0801e88040e022e6" x_b3_parentspanid:"-" +ö™šÊ¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´É²Ú¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.364+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4d007fa-968e-45d9-5f05-a3cea1200b5f" response_time:0.002353215 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c213762a49a704c" x_b3_spanid:"4c213762a49a704c" x_b3_parentspanid:"-" +Õõ±Ú¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†Àßþ¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.439+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"26304ebc-ed4e-46bf-6dec-263dae57fb73" response_time:0.003945014 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c54a69af2a1ad68d" x_b3_spanid:"c54a69af2a1ad68d" x_b3_parentspanid:"-" +ç±ßþ¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çïí®½ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.541+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c50ee035-8003-4b1c-789a-c5b6c408b122" response_time:0.00301466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3fbcfc78e6a87ac" x_b3_spanid:"b3fbcfc78e6a87ac" x_b3_parentspanid:"-" +žçí®½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áîÎÕ½ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.620+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1fb37ec4-eb5d-4394-65be-c4aa881372e0" response_time:0.005626427 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"61406d949a2db6a2" x_b3_spanid:"61406d949a2db6a2" x_b3_parentspanid:"-" +ŽæÎÕ½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÑšê½ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.667+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb622222-a19c-4b92-68df-2f343015abb1" response_time:0.001622948 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"66acba53c59a38b1" x_b3_spanid:"66acba53c59a38b1" x_b3_parentspanid:"-" +èÄšê½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö¾ä—¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.760+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb8f3028-17db-4d0b-6713-0af42f06b646" response_time:0.004443608 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dba7d9e8f593b603" x_b3_spanid:"dba7d9e8f593b603" x_b3_parentspanid:"-" +À±ä—¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ê£ž¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.776+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"beffeb2d-5ec0-42b5-5770-314cdee93860" response_time:0.001446897 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb2b8795438ff09d" x_b3_spanid:"fb2b8795438ff09d" x_b3_parentspanid:"-" +¹Û£ž¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý£ñ¾ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.853+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c74690a2-1430-4ecf-6704-6675cdf046ba" response_time:0.001845426 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b4034424d7c3e182" x_b3_spanid:"b4034424d7c3e182" x_b3_parentspanid:"-" +Ζñ¾ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öã·Ò¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.886+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a89e599e-e913-44a1-592d-c75a9d471256" response_time:0.001347915 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f953a33f353a5fc9" x_b3_spanid:"f953a33f353a5fc9" x_b3_parentspanid:"-" +ä×·Ò¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ð¯Ö¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.894+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c194f69b-724a-4a75-74d6-3aa2e53823d9" response_time:0.001307687 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88f0d05e65aff915" x_b3_spanid:"88f0d05e65aff915" x_b3_parentspanid:"-" +Èܯ־ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò©Åî¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9fd275f6-76d5-4ffc-47db-e055563550b0" response_time:0.002091025 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d40a23f38606193" x_b3_spanid:"2d40a23f38606193" x_b3_parentspanid:"-" +Åî¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìäó‚¿ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.987+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"39dc655a-1067-426a-61a4-b23d4f8393c3" response_time:0.001461558 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"642c370a4559967c" x_b3_spanid:"642c370a4559967c" x_b3_parentspanid:"-" +æ×ó‚¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û麸¿ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.100+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc3581de-f36a-422f-7b51-6c5d58a43285" response_time:0.00134304 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ee75fa515d5f1305" x_b3_spanid:"ee75fa515d5f1305" x_b3_parentspanid:"-" +“ߺ¸¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´½ Ú¿ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.170+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"37da9542-ce31-4a89-5122-a93fe2b74b9e" response_time:0.001448428 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ba16a2d0b303857" x_b3_spanid:"0ba16a2d0b303857" x_b3_parentspanid:"-" +ß² Ú¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Òßö‚ÁÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.524+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"087d8b04-2c6a-4965-40f0-f087a80dbaa6" response_time:0.001779904 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb659b42fbedffca" x_b3_spanid:"eb659b42fbedffca" x_b3_parentspanid:"-" +Û×ö‚ÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üƨÁÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.602+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87c15376-9ac3-48ea-61cc-35c0be066cf7" response_time:0.00206125 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8a481088c02dee4" x_b3_spanid:"b8a481088c02dee4" x_b3_parentspanid:"-" +éèÆ¨ÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ€ŠÐÁÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.684+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4ad8982-2215-45e1-6415-779172f367ea" response_time:0.003745346 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"791677c048ab3639" x_b3_spanid:"791677c048ab3639" x_b3_parentspanid:"-" +£ò‰ÐÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êþŽ‚ÂÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.791+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"385e7b3e-59d3-44b3-57b1-c35fa73a61de" response_time:0.00173091 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5b1a91d8115424e8" x_b3_spanid:"5b1a91d8115424e8" x_b3_parentspanid:"-" +äðŽ‚ÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ш¾ÌÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.947+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d9c5f45-34f3-4c0d-5a29-3e8bfb7f7caf" response_time:0.001495351 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e3de251797487140" x_b3_spanid:"e3de251797487140" x_b3_parentspanid:"-" +’›¾ÌÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘×ÏÒÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.960+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6977c9ba-a2be-4e8c-7570-102d9815c2e8" response_time:0.001602656 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac19e3870cead9f1" x_b3_spanid:"ac19e3870cead9f1" x_b3_parentspanid:"-" +ŒËÏÒÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æöœ•ÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.904+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2d64e1c-1ac6-4acb-4453-3395530d5240" response_time:0.001875134 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aed395fa9b844bf3" x_b3_spanid:"aed395fa9b844bf3" x_b3_parentspanid:"-" +†èœ•ÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œý ˜ÇÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.179+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"17ef05d6-e73e-4005-69ab-660fc6cef87a" response_time:0.001795727 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c48f1a24dcde5225" x_b3_spanid:"c48f1a24dcde5225" x_b3_parentspanid:"-" +´ñ ˜ÇÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Îôƒ«ÉÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.755+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e354c473-ac2b-4836-6890-f253eb1c8a52" response_time:0.001788527 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7fc756f93e0dabc0" x_b3_spanid:"7fc756f93e0dabc0" x_b3_parentspanid:"-" +¢ìƒ«ÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½¼žËÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.265+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1901aa1b-4c45-4334-7694-00908ad13c55" response_time:0.001485326 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d18305d17ee63519" x_b3_spanid:"d18305d17ee63519" x_b3_parentspanid:"-" +ñ´žËÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëŽÒÎÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:41.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f37d5c44-217b-4405-6e72-76ebdae22e20" response_time:0.001447516 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06eea6779092489a" x_b3_spanid:"06eea6779092489a" x_b3_parentspanid:"-" +ÞÒÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò«¯ÎÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:41.107+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c64d34f2-1a69-4836-56cb-554c9bb14dbc" response_time:0.001802386 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb97980d3ac0ebd0" x_b3_spanid:"eb97980d3ac0ebd0" x_b3_parentspanid:"-" +°¦«¯ÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»–´ÊÐÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:41.697+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b3f8af8-5cbe-4333-4a2a-96bd4901a01f" response_time:0.00466798 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b27eb28abe56fe4e" x_b3_spanid:"b27eb28abe56fe4e" x_b3_parentspanid:"-" +€‰´ÊÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁâÆŸÓÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.416+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"195bcd5d-4fd5-4079-7242-74aa78985ee1" response_time:0.001360519 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b9f56f530cc1606b" x_b3_spanid:"b9f56f530cc1606b" x_b3_parentspanid:"-" +½ÓÆŸÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ°ƒÔÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:42.626+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"967bf5c9-4d03-4169-4bd6-dab63107306a" response_time:0.00129583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d707a9932d48b0b" x_b3_spanid:"6d707a9932d48b0b" x_b3_parentspanid:"-" +¯ü¯ƒÔÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßããîÔÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:42.850+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e485347-a319-484d-6195-133ddfd63a8b" response_time:0.001913123 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19d700aaebd47f7a" x_b3_spanid:"19d700aaebd47f7a" x_b3_parentspanid:"-" +±ÛãîÔÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Š·ÀœÕÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:42.943+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"edca2395-a930-441f-5c9a-8d81081c331a" response_time:0.004958061 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"01168305021b84bc" x_b3_spanid:"01168305021b84bc" x_b3_parentspanid:"-" +¸ªÀœÕÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßôÊ«×ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.515+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3fa884b2-4ff3-459a-53c7-90024b66a27c" response_time:0.001753903 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2d057b5d865d3fc" x_b3_spanid:"c2d057b5d865d3fc" x_b3_parentspanid:"-" +³ìÊ«×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñÝãƒÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.236+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b24909ca-8ea7-4759-5199-22320aba1124" response_time:0.001959496 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7011afc43791af5b" x_b3_spanid:"7011afc43791af5b" x_b3_parentspanid:"-" +£ÏãƒÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š¸”éÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.715+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8eab58e-4d6d-4c2f-77d0-b3753f42e8be" response_time:0.004264255 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc6b37fca415c8ff" x_b3_spanid:"dc6b37fca415c8ff" x_b3_parentspanid:"-" +©«”éÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òíñûÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.296+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8acb9519-1c08-4b34-6234-7a917aeaf78a" response_time:0.999434077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e25668f843c722c7" x_b3_spanid:"e25668f843c722c7" x_b3_parentspanid:"-" +òàñûÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þà»ñÞÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:45.540+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb2f8b1d-4508-4d4c-605e-e6791bba1403" response_time:0.001665909 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8847e42a09aa25ed" x_b3_spanid:"8847e42a09aa25ed" x_b3_parentspanid:"-" +Ø»ñÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥³©îàÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:46.071+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd3c8917-c3d8-4099-4990-d40f299d76a3" response_time:0.001838477 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"158e35dcabddc0d7" x_b3_spanid:"158e35dcabddc0d7" x_b3_parentspanid:"-" +ߦ©îàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µýÛËâÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.533+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25b9e222-069c-4097-45a1-f3c81fcfcf18" response_time:0.003542727 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bed938d2d7ff982e" x_b3_spanid:"bed938d2d7ff982e" x_b3_parentspanid:"-" +£ðÛËâÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³Ã˜ãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2addc6d-439d-4ae0-7c51-d37d17057ba0" response_time:0.001919857 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"16c0377a8c0c7b22" x_b3_spanid:"16c0377a8c0c7b22" x_b3_parentspanid:"-" +ȩØãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýäµÒãÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:46.817+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77fb5464-ea2d-48d1-7dc6-9c0a24b4e653" response_time:0.002207246 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"67b6703d63a92fec" x_b3_spanid:"67b6703d63a92fec" x_b3_parentspanid:"-" +‚×µÒãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô«ÛÎãÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:46.807+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b0020481-aeb6-4167-75e1-c1026c112cae" response_time:0.00482839 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cde9dadba19f1a4" x_b3_spanid:"1cde9dadba19f1a4" x_b3_parentspanid:"-" +„¡ÛÎãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æØ ­çÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.813+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fcad7357-7d58-483e-55bd-f5b6cdc39881" response_time:0.001706161 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"84f76c1b08d6f217" x_b3_spanid:"84f76c1b08d6f217" x_b3_parentspanid:"-" +ÚÌ ­çÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ý„ÆçÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.865+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61263f9a-04d6-4cdd-7b09-d50f172ff8cf" response_time:0.001536967 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa65a9cf7c8012dd" x_b3_spanid:"aa65a9cf7c8012dd" x_b3_parentspanid:"-" +™ö„ÆçÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÝ’¹èÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.107+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"da544133-8707-4937-5af2-db80b02e4dc6" response_time:0.001721709 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c972a6bfbf54d94" x_b3_spanid:"5c972a6bfbf54d94" x_b3_parentspanid:"-" +…Ò’¹èÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚÊî„éÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21821" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef97bb75-295c-4fbf-7735-68342269bf8c" response_time:0.004218466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bfa7f048f7af6418" x_b3_spanid:"bfa7f048f7af6418" x_b3_parentspanid:"-" +ƒÂî„éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨ˆ•”êÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.563+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"acea047c-7c98-43f4-6f1a-95789e480c62" response_time:0.004197645 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"331c313ee9016d86" x_b3_spanid:"331c313ee9016d86" x_b3_parentspanid:"-" +†ù””êÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í®þÒêÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:48.695+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a74dba9f-119c-48a5-7777-4b0a06c6101e" response_time:0.00424138 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2a067961cf636fb7" x_b3_spanid:"2a067961cf636fb7" x_b3_parentspanid:"-" +Á¢þÒêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘÷‚™ëÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.845+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6b9337de-b49a-49f1-52cd-ca4761cf1163" response_time:0.001626856 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d2df4d106c07342" x_b3_spanid:"0d2df4d106c07342" x_b3_parentspanid:"-" +¿â‚™ëÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´¦¯¤ÐÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.618+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08278660-34dc-4c33-7338-292a76ced996" response_time:0.004391745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f1ee540d0384bb05" x_b3_spanid:"f1ee540d0384bb05" x_b3_parentspanid:"-" +‰™¯¤ÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ØÆ“ÐÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.583+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3bc1807-158f-4e63-437c-1688225fef63" response_time:0.004221491 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d95acad3a6b6cf8" x_b3_spanid:"2d95acad3a6b6cf8" x_b3_parentspanid:"-" +þËÆ“ÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚‰´ÐÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.652+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"960dee83-cd15-49df-7bff-f05259be5375" response_time:0.002927944 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c868c528286eb866" x_b3_spanid:"c868c528286eb866" x_b3_parentspanid:"-" +«ƒ‰´ÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çÕÎåÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.295+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6b85a11e-40a8-4ad1-7930-fc42a1866947" response_time:0.001459504 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"146dcfd5123213da" x_b3_spanid:"146dcfd5123213da" x_b3_parentspanid:"-" +ÓÊÎåÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔøðõïÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.113+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6581db4a-8071-4883-42d7-7ef5bdc76150" response_time:0.001789172 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e6985ec2eca6936" x_b3_spanid:"0e6985ec2eca6936" x_b3_parentspanid:"-" +ÂêðõïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹îÉ¥ôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.286+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a867c55-ccf9-4ee6-4b7f-3bf9cf67e59a" response_time:0.002269803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"53c7dc384c22233a" x_b3_spanid:"53c7dc384c22233a" x_b3_parentspanid:"-" +³óÈ¥ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ ÏÉôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.362+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7f875b75-1f11-405e-61b4-3e19904652bb" response_time:0.001967197 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"485101998db681e0" x_b3_spanid:"485101998db681e0" x_b3_parentspanid:"-" +®ŽÏÉôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µå’öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.784+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"518cb769-8a19-4311-732d-91592f817e38" response_time:0.002012423 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2973eb495b721a6c" x_b3_spanid:"2973eb495b721a6c" x_b3_parentspanid:"-" +Ó¨å’öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ƒÝàöÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.947+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cd22e70d-37c0-4cbb-672c-c9056fd5496e" response_time:0.002260486 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"351f5150317e7f87" x_b3_spanid:"351f5150317e7f87" x_b3_parentspanid:"-" +êóÜàöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨¤•²÷ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.119+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b79d4e81-3397-4d3c-6bc1-5ee97f977874" response_time:0.001643217 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59ccabbbc6969e30" x_b3_spanid:"59ccabbbc6969e30" x_b3_parentspanid:"-" +ª••²÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð•èúøÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.539+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19e5baf8-957b-4a99-502f-5540a7326c9c" response_time:0.001610485 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06c90165b0756089" x_b3_spanid:"06c90165b0756089" x_b3_parentspanid:"-" +êƒèúøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù¿¢ûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.159+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f5286e9-06e6-4d80-4001-8e2e8963d7a6" response_time:0.001996215 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5969052982b81898" x_b3_spanid:"5969052982b81898" x_b3_parentspanid:"-" +´î¿¢ûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ†ßžÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.224+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5156260b-ab58-4d7d-7286-81aa0dbb9bb8" response_time:0.003329498 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dcb06d353495797a" x_b3_spanid:"dcb06d353495797a" x_b3_parentspanid:"-" +ŽûÞžÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÇÁ¬¸ÿÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.278+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"26b7ad08-aedb-4d78-6dd6-b9cb56fde3c2" response_time:0.002850357 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9011a89e66ea4a5a" x_b3_spanid:"9011a89e66ea4a5a" x_b3_parentspanid:"-" +’¸¬¸ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢Ê®¢‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.025+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"155e4d37-a832-4a63-5dd1-a4f70419b9d3" response_time:0.015172211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cca37c4934782b4" x_b3_spanid:"1cca37c4934782b4" x_b3_parentspanid:"-" +©´®¢‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±¸º¬ìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.153+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21821" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ecc3e18f-06b2-4531-74e8-43bcbef744a9" response_time:0.002076596 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27163da451512897" x_b3_spanid:"27163da451512897" x_b3_parentspanid:"-" +À­º¬ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í¯ÿ¶ìÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.172+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21821" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78206f4e-e585-4a72-6c37-098b5337076e" response_time:0.00544927 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70b22c8eb7452141" x_b3_spanid:"70b22c8eb7452141" x_b3_parentspanid:"-" +€¤ÿ¶ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øãùÉíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.478+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7514d30-a4a2-4585-6f58-05d39252be89" response_time:0.007300985 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"35c4697ca35d8169" x_b3_spanid:"35c4697ca35d8169" x_b3_parentspanid:"-" +Í×ùÉíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“®ó®îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.695+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21821" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ae2d943-c8f3-4999-7a93-e043375473d5" response_time:0.002073479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94ba2001fe7867b4" x_b3_spanid:"94ba2001fe7867b4" x_b3_parentspanid:"-" +çŸó®îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å–ìîÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.824+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"37d6a9d7-71ad-4c5d-4ae1-c602f1d191db" response_time:0.001608106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc6b90cffa5cef71" x_b3_spanid:"dc6b90cffa5cef71" x_b3_parentspanid:"-" +×õ•ìîÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üï›ÿŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.917+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"526f0541-6b3f-4c96-72b1-fab921d32927" response_time:0.001712656 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78c340c595a92863" x_b3_spanid:"78c340c595a92863" x_b3_parentspanid:"-" +å›ÿŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð®Ð¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.989+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c502f2ee-67cb-40a5-67da-b48239746d2f" response_time:0.001763292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"afd272b53899ffa2" x_b3_spanid:"afd272b53899ffa2" x_b3_parentspanid:"-" +³¡Ð¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô·ýŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.450+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63ee8106-d2a5-4839-62a5-f55c497a7b39" response_time:0.002008464 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be416340805974a3" x_b3_spanid:"be416340805974a3" x_b3_parentspanid:"-" +òì·ýŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0߃†ÛÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.647+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb16ec14-bd0d-4527-6ca5-295f6d5687ed" response_time:0.001616274 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6800658489648772" x_b3_spanid:"6800658489648772" x_b3_parentspanid:"-" +ìû…ÛÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü¶“’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.301+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8471855f-020c-4508-4aae-61c16e374ea5" response_time:0.002240642 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44c042502801facd" x_b3_spanid:"44c042502801facd" x_b3_parentspanid:"-" +ú¯¶“’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈÊ¿æ•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.280+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8edaafe1-7917-4093-513a-bf0b2551fef6" response_time:0.003269114 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f933d1c600f08461" x_b3_spanid:"f933d1c600f08461" x_b3_parentspanid:"-" +µÜ¾æ•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ÑÿÆ–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.483+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10059ca3-238c-4689-4ba7-34c5f35ebfec" response_time:0.002161588 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"925e2ebd429498be" x_b3_spanid:"925e2ebd429498be" x_b3_parentspanid:"-" +´ÁÿÆ–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Íœ§´—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.713+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15939" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12b0ef54-e7fb-436e-4a0d-33d78e5843cb" response_time:0.001590154 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d9ca328f18e99fa" x_b3_spanid:"2d9ca328f18e99fa" x_b3_parentspanid:"-" +Ü”§´—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í´ß œÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.013+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe1c77e9-5e5a-4bb0-4aa4-e1170e6b8e94" response_time:0.002695023 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"55e355f337fe0771" x_b3_spanid:"55e355f337fe0771" x_b3_parentspanid:"-" +ž¬ß œÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0↧üŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.011+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80066868-7151-4c14-43b4-ca81d853c5cf" response_time:0.002006907 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30b71e31e2e7712a" x_b3_spanid:"30b71e31e2e7712a" x_b3_parentspanid:"-" +ÿþ¦üŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ª¤¥ ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.094+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04793101-a844-44cb-7932-4d43de90e033" response_time:0.005518293 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c56426de6ab509db" x_b3_spanid:"c56426de6ab509db" x_b3_parentspanid:"-" +¨¤¥ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šß§¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.369+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"222b102a-c76a-4a92-6465-26557063c5d2" response_time:0.003878963 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"429ad7dcf3586dfe" x_b3_spanid:"429ad7dcf3586dfe" x_b3_parentspanid:"-" +žúÞ§¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Å嘣ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.873+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"980137bc-e890-4b50-6c47-8b1383225c1d" response_time:0.004765452 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"15bf333ccc015fa0" x_b3_spanid:"15bf333ccc015fa0" x_b3_parentspanid:"-" +½¹å˜£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ɟ͉¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.377+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"785a9cc2-b83b-4dc1-63ed-b0104380eb17" response_time:0.005777269 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7894e43e65a46584" x_b3_spanid:"7894e43e65a46584" x_b3_parentspanid:"-" +ó‘͉¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”¡²ò¦ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.870+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c895669f-fa79-48b3-76ef-ffeec2e0dea5" response_time:0.00168314 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cdb8c5883feae7ba" x_b3_spanid:"cdb8c5883feae7ba" x_b3_parentspanid:"-" +–²ò¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ŠøÏ£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.991+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b1ab638-a716-48fb-5c25-4636861d56c9" response_time:0.002346414 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02804321774829b6" x_b3_spanid:"02804321774829b6" x_b3_parentspanid:"-" +Ûú÷Ï£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì߃ò¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.600+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74863102-e291-469e-7fa8-2cb1a5ffbe6e" response_time:0.002080024 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8cb5126c976682df" x_b3_spanid:"8cb5126c976682df" x_b3_parentspanid:"-" +ÜÔƒò¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0çìÌǃ››ÖBu +9 Loaded Classes: 15348, Threads: 300, JAVA_OPTS: ''ßÒÌǃ››Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*STG20jcf-cfapps-io2-diegorcell_z2z$77d4b7ae-54d5-4b84-b920-e77845fd05cb‚ 10.10.148.57 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0ßø¡Óƒ››ÖBØ +›-----> Downloading Jvmkill Agent 1.4.0_RELEASE from https://java-buildpack.cloudfoundry.org/jvmkill/trusty/x86_64/jvmkill-1.4.0_RELEASE.so (found in cache)Ýâ¡Óƒ››Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*STG20jcf-cfapps-io2-diegorcell_z2z$77d4b7ae-54d5-4b84-b920-e77845fd05cb‚ 10.10.148.57 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0Þ‰£Á²››ÖBI + Exit status 0êü¢Á²››Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*STG20jcf-cfapps-io2-diegorcell_z2z$77d4b7ae-54d5-4b84-b920-e77845fd05cb‚ 10.10.148.57 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0ˆ¾Á²››ÖBg ++Uploading droplet, build artifacts cache...Êú½Á²››Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*STG20jcf-cfapps-io2-diegorcell_z2z$77d4b7ae-54d5-4b84-b920-e77845fd05cb‚ 10.10.148.57 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0ÒîôŸ¶››ÖB` +$Uploaded build artifacts cache (45M)‹âôŸ¶››Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*STG20jcf-cfapps-io2-diegorcell_z2z$77d4b7ae-54d5-4b84-b920-e77845fd05cb‚ 10.10.148.57 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0µ‰®©¤›ÖBQ +Destroying containerÇú­©¤›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegorcell_z2z$c7106e65-8540-487d-a324-4baa9994d298‚ 10.10.148.83 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0÷ÖŸ¢šó›ÖBO +Creating containerÆÅŸ¢šó›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0ø€Àü›ó›ÖB[ +Successfully created containerëö¿ü›ó›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0–®ÞϤó›ÖBd +'Starting health monitoring of container¤ÞϤó›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0Ûœàø¤ó›ÖBÊ +„Cannot calculate memory: insufficient memory remaining for heap. Memory limit 512M < allocated memory 685904K (-XX:ReservedCodeCacheSize=240M, -XX:MaxDirectMemorySize=10M, -XX:MaxMetaspaceSize=103991K, -XX:CompressedClassSpaceSize=18713K, -Xss1M * 300 threads)«‰àø¤ó›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79* APP/PROC/WEB20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0üûéù¤ó›ÖBR + Exit status 1Òìéù¤ó›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79* APP/PROC/WEB20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +rep0¾ÙˆŠ¥ó›ÖBQ +Destroying containerëÎˆŠ¥ó›Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*CELL20jcf-cfapps-io2-diegor cell_2xl_z2z$6bdc6152-302d-490a-99e7-4305283d6142‚ 10.10.148.106 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýö´ÿ‹ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:40.207+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10534" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"211d25f9-66ee-4832-5a56-f8ea3d391544" response_time:0.004784059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c73192b77a3c0a0" x_b3_spanid:"7c73192b77a3c0a0" x_b3_parentspanid:"-" +¹ì´ÿ‹ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þΟ°¶ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:00.298+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32382" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4741c12-da00-48c6-6876-1108ce67ff7c" response_time:0.009511616 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1aa4e3d3e3f09c5d" x_b3_spanid:"1aa4e3d3e3f09c5d" x_b3_parentspanid:"-" +ŒÂŸ°¶ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´¯šÊ¶ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:00.359+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6afac2e-2472-4306-53aa-3c0db9afb731" response_time:0.00348124 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5b40901784f2c09c" x_b3_spanid:"5b40901784f2c09c" x_b3_parentspanid:"-" +Á£šÊ¶ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢­Ÿ·ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:00.538+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48148" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c4d5d35-d11e-475a-6fc5-62d430c4860d" response_time:0.003269794 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b5e1612a67b7ff5" x_b3_spanid:"3b5e1612a67b7ff5" x_b3_parentspanid:"-" +Ì”­Ÿ·ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦£¹­·ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:00.568+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48148" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3639c62-9fb7-4e27-7ff9-ca443b81d572" response_time:0.003093984 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ff5122a59e9f744" x_b3_spanid:"6ff5122a59e9f744" x_b3_parentspanid:"-" +¢˜¹­·ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨Ýžì¼ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.040+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"225d9a84-8b34-4a88-6030-6411cc99b928" response_time:0.004659465 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"808fdfb4f89500ed" x_b3_spanid:"808fdfb4f89500ed" x_b3_parentspanid:"-" +ëÔžì¼ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž…ñ¼ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47462" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a3ce9f3-93f1-40c3-7d7d-810fdf71e549" response_time:0.004752644 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8ed555f12ea6420b" x_b3_spanid:"8ed555f12ea6420b" x_b3_parentspanid:"-" +‹ùñ¼ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½Ê–޽؜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.281+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47462" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba45e6cb-ca19-4e5d-4221-2cfc577e5a00" response_time:0.002719643 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e82c069d9a60d1a7" x_b3_spanid:"e82c069d9a60d1a7" x_b3_parentspanid:"-" +âÁ–޽؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Øå²Î¾ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.516+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:46566" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c09feb70-13e5-45e9-60ef-bc3872fd328b" response_time:0.002597741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"21ae88940e42e95c" x_b3_spanid:"21ae88940e42e95c" x_b3_parentspanid:"-" +þֲξ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€Ôß³¿ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.726+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d0b1ac8-77b0-4fdc-7822-a987afaf2b05" response_time:0.004875336 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e37c3666c423801" x_b3_spanid:"5e37c3666c423801" x_b3_parentspanid:"-" +ÉÊß³¿ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÔƒóÁØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.397+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bf4865b-9962-4a0a-6eb5-269a1293d9d5" response_time:0.004061019 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2c13d701730e34c" x_b3_spanid:"d2c13d701730e34c" x_b3_parentspanid:"-" +µÊƒóÁØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜÕ±ìÂØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.650+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5850e4d-e07c-4521-62ac-cd6891117233" response_time:0.005708835 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a16fb987b3115ea" x_b3_spanid:"6a16fb987b3115ea" x_b3_parentspanid:"-" +ÕʱìÂØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽŒ˜¤ÃØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.770+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51194" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f0db6325-5fcb-434b-5659-c0d72103050b" response_time:0.002774048 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"28b080fc824ea6a5" x_b3_spanid:"28b080fc824ea6a5" x_b3_parentspanid:"-" +Úú—¤ÃØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Žü†»ÃØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:03.817+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51194" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a50b3bb6-28d1-4516-4765-efd38fb3da78" response_time:0.00334063 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef0251eebbb2590f" x_b3_spanid:"ef0251eebbb2590f" x_b3_parentspanid:"-" +æï†»ÃØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë·îÃØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:03.925+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48514" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78ec9739-1c57-4403-652a-033df4e8bc61" response_time:0.00293819 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e138e102a6ad1aa" x_b3_spanid:"6e138e102a6ad1aa" x_b3_parentspanid:"-" +£à·îÃØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃŒ±·ÄØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fbfc8dad-5914-4d0f-6e0d-064e9f9eee44" response_time:0.003080901 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44a87e8755fad79a" x_b3_spanid:"44a87e8755fad79a" x_b3_parentspanid:"-" +ìý°·ÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶©æìÄØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b84b894-22e2-41cf-4977-3881b99e4059" response_time:0.004027915 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52ecd34eab09b505" x_b3_spanid:"52ecd34eab09b505" x_b3_parentspanid:"-" +”æìÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘¬‰ûÄØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:04.220+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf0cd4fd-e8a3-4834-7237-b8afb8d879d9" response_time:0.00360482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7363ea68c8f6d7e7" x_b3_spanid:"7363ea68c8f6d7e7" x_b3_parentspanid:"-" +Ÿ‰ûÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æñ×ŽÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.798+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15042daf-54ea-4d11-41d4-aaa4989da921" response_time:0.003078523 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d4458c3f846ff68" x_b3_spanid:"3d4458c3f846ff68" x_b3_parentspanid:"-" +îà×ŽÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°¼óÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.009+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df723874-de1f-43b7-42b0-690d77aa01b1" response_time:0.002821985 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45c0f82e97c8e255" x_b3_spanid:"45c0f82e97c8e255" x_b3_parentspanid:"-" +еóÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íĵûÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.025+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3da7fb67-d866-4095-7bff-782df52a661a" response_time:0.003781685 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"869e3a1e3cf1c6ce" x_b3_spanid:"869e3a1e3cf1c6ce" x_b3_parentspanid:"-" +±¼µûÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ”ê›ÈØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.094+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe3cda7b-a346-4ad4-4ffb-d2a335d9958c" response_time:0.002732817 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eefb3c44a131aa6c" x_b3_spanid:"eefb3c44a131aa6c" x_b3_parentspanid:"-" +Јê›ÈØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Åê›ŽÉØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:05.334+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48148" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7ba29c27-f821-4bfb-4aa4-f1030d607028" response_time:0.00270429 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31df1ec8ee9cbdaa" x_b3_spanid:"31df1ec8ee9cbdaa" x_b3_parentspanid:"-" +Öß›ŽÉØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±¢ñéÉØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.527+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9247c249-7378-44f5-781e-10a52fb57e19" response_time:0.002727011 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb13a5779d428951" x_b3_spanid:"eb13a5779d428951" x_b3_parentspanid:"-" +ÿšñéÉØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²±ÔÊØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.750+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8af6c057-415a-4d7f-7348-264929e8fd37" response_time:0.002737652 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ff6d2f3a2b03a22" x_b3_spanid:"0ff6d2f3a2b03a22" x_b3_parentspanid:"-" +Õ§±ÔÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ç»¤ËØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.917+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fa536ac9-c97e-40fe-59db-f20fadc56cad" response_time:0.003101069 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5daa4e474a6e6467" x_b3_spanid:"5daa4e474a6e6467" x_b3_parentspanid:"-" +¢Ý»¤ËØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†éÂËØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.982+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51320" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7a1a8492-ed58-439a-5369-98dac2b908d7" response_time:0.002594355 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c2679ecadb7cfa1" x_b3_spanid:"7c2679ecadb7cfa1" x_b3_parentspanid:"-" +¡üèÂËØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«¸ŸÒËØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.014+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"777d96cc-687a-4cb4-4c3a-a3701f010c59" response_time:0.002533211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d25c59317c6e0fe6" x_b3_spanid:"d25c59317c6e0fe6" x_b3_parentspanid:"-" +Á­ŸÒËØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õûçÿÌØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.378+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ff45312-898a-44ac-4364-0cd425afb459" response_time:0.002702466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d135a6e645ed510c" x_b3_spanid:"d135a6e645ed510c" x_b3_parentspanid:"-" +äêçÿÌØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Žì¶øÎØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.897+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35e5c38a-a2bb-485e-6d14-b176322514f6" response_time:0.005263488 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4ebfd7e155d73b4" x_b3_spanid:"e4ebfd7e155d73b4" x_b3_parentspanid:"-" +ùá¶øÎØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œÙñ™ÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.970+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a402c1cb-9137-4203-6dc6-5cf176ebd13b" response_time:0.002435654 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"15a9705054ab8291" x_b3_spanid:"15a9705054ab8291" x_b3_parentspanid:"-" +äËñ™ÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï«å«ÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.006+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d7df892-9cf6-4189-614a-1d553c1dbfe0" response_time:0.003283446 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1722de21ea2601f" x_b3_spanid:"a1722de21ea2601f" x_b3_parentspanid:"-" +Ô¤å«ÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ü¹¸ÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.034+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d32d01ad-20e0-4148-723d-8d6492873d97" response_time:0.002370402 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7602249331f2fb4" x_b3_spanid:"d7602249331f2fb4" x_b3_parentspanid:"-" +›ð¹¸ÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ÌÞ¸ÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.034+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fffcec95-5e58-4553-6852-0b270e7d817e" response_time:0.002788522 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d08819e206a0cfbd" x_b3_spanid:"d08819e206a0cfbd" x_b3_parentspanid:"-" +ÄÁÞ¸ÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ÙÀ¿ÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.049+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0902e368-682a-482c-4411-004005e9ece0" response_time:0.002397873 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d421564bb98619d3" x_b3_spanid:"d421564bb98619d3" x_b3_parentspanid:"-" +ãÎÀ¿ÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î´ ÂÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.054+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6a4c1a5e-3972-422b-7a80-388a628d6da2" response_time:0.002334121 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ced3cebba57c4579" x_b3_spanid:"ced3cebba57c4579" x_b3_parentspanid:"-" +±­ ÂÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0б‹ÓØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.010+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51194" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c34f7aef-6e11-4726-46df-7d350729fcff" response_time:0.005559314 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"413547a6aead7d34" x_b3_spanid:"413547a6aead7d34" x_b3_parentspanid:"-" +‹†±‹ÓØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ê¹ñÔØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.495+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"36d41708-60a8-478e-6e52-864946c9408d" response_time:0.002794639 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"81886294af478460" x_b3_spanid:"81886294af478460" x_b3_parentspanid:"-" +ðݹñÔØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜܒרœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.101+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49694" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3deeb9b-b2cc-41a1-46b7-f8ce39cb0c39" response_time:0.003324812 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf24569cb99c0f10" x_b3_spanid:"cf24569cb99c0f10" x_b3_parentspanid:"-" +ÿÐܒרœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äØÌñרœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:09.301+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51320" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc51512f-22d7-4541-7414-1778ff29409e" response_time:0.00238621 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00d35b0a220875aa" x_b3_spanid:"00d35b0a220875aa" x_b3_parentspanid:"-" +ÙÎÌñרœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸÆÐðÙØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.836+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3805e6b-b601-4331-5e9f-92bb046e9733" response_time:0.002578354 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c06d11d454bc6895" x_b3_spanid:"c06d11d454bc6895" x_b3_parentspanid:"-" +ÿÐðÙØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜úå¿ÚØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.002+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51320" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe3da4bf-ccd8-4122-6b3b-1acac0fedfd4" response_time:0.002203925 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"158cba5206896083" x_b3_spanid:"158cba5206896083" x_b3_parentspanid:"-" +Íðå¿ÚØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖŸëãÚØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.075+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a66a9003-fe8f-4a90-710e-e37d5ebf2a20" response_time:0.004860397 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b1d4c5a735d96be" x_b3_spanid:"8b1d4c5a735d96be" x_b3_parentspanid:"-" +ŒëãÚØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÃÞÛØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.139+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b27a0a6-0a4c-46cc-580d-bd7c7d76670e" response_time:0.003928034 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c47c1503ff14afd0" x_b3_spanid:"c47c1503ff14afd0" x_b3_parentspanid:"-" +î»ÞÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªçü„ÛØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.147+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4f9dbe3-41ab-40f7-40ca-587c6299bcbd" response_time:0.002732262 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e7f95a221bbef84b" x_b3_spanid:"e7f95a221bbef84b" x_b3_parentspanid:"-" +™Úü„ÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸‘´¶ÛØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.251+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78f4d326-62b6-47e1-4528-e772ecb91ae1" response_time:0.002450753 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c762671b76466cc5" x_b3_spanid:"c762671b76466cc5" x_b3_parentspanid:"-" +¼‡´¶ÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈžŽ¿ÛØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.269+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44830" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"81381f42-885e-4e90-428a-0b67b6e7a636" response_time:0.002297246 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8a269658f51c7cba" x_b3_spanid:"8a269658f51c7cba" x_b3_parentspanid:"-" +䓎¿ÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äáíïÛØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:10.368+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aedf3d65-3d1b-410b-6048-58d5139428b6" response_time:0.00563995 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17ab1e3ff4d83bb7" x_b3_spanid:"17ab1e3ff4d83bb7" x_b3_parentspanid:"-" +ÓÕíïÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ë»»óÛØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.379+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1bf68a9-7f86-47e8-69fd-bb3b6aca0fa4" response_time:0.002515835 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"edfde423af820182" x_b3_spanid:"edfde423af820182" x_b3_parentspanid:"-" +Ê­»óÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉïÜØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.436+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:51262" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91cdced6-ac0c-4991-5030-f2d1b59ad19f" response_time:0.006636034 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"668b69aae03b2801" x_b3_spanid:"668b69aae03b2801" x_b3_parentspanid:"-" +›€ïÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïˆÇ´ÜØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.515+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b611a3c-1337-4223-6b7e-1640c38594dc" response_time:0.002910211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd895aef6ff24f99" x_b3_spanid:"cd895aef6ff24f99" x_b3_parentspanid:"-" +üÇ´ÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ííâÝØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:10.877+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33214" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"99734b87-5a63-4f82-4692-62d3c0f64505" response_time:0.0067739 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3818eb12728ba699" x_b3_spanid:"3818eb12728ba699" x_b3_parentspanid:"-" +ÑáíâÝØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Å–ŽÞØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.971+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f04e015-2951-4002-7016-3e020dac28ea" response_time:0.002874693 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a06a56df4d9b3d3b" x_b3_spanid:"a06a56df4d9b3d3b" x_b3_parentspanid:"-" +¦ŒŽÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ȃãÞØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.149+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"83f07cde-0e0b-4ee7-43cb-1d6a233e3a66" response_time:0.003399506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"033e2ce34a7ce5c6" x_b3_spanid:"033e2ce34a7ce5c6" x_b3_parentspanid:"-" +¹ƒãÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ…·ÑߨœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.380+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f577cb93-ba1e-4b3d-7ed2-bd77b2fe3c45" response_time:0.003815784 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0876110acd5cebd9" x_b3_spanid:"0876110acd5cebd9" x_b3_parentspanid:"-" +¶ù¶ÑߨœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üÌø–àØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.526+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3c6c25f-44a6-4624-4006-a3dbb2cd9f42" response_time:0.002983971 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b16ad13e91c5911d" x_b3_spanid:"b16ad13e91c5911d" x_b3_parentspanid:"-" +‡Áø–àØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥Æ©½àØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.607+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25224" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4aa4294e-ecc7-4ed0-7191-6f44d28906d8" response_time:0.003004201 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac2aca9a37d4cc55" x_b3_spanid:"ac2aca9a37d4cc55" x_b3_parentspanid:"-" +‡¾©½àØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶è©ÛàØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"efe76b0e-a86f-492c-4f36-c7904d3e2013" response_time:0.002612924 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a75fc9ddb34adabc" x_b3_spanid:"a75fc9ddb34adabc" x_b3_parentspanid:"-" +§Ü©ÛàØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßÀæÿãØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.552+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c14ecced-e37c-4f6d-63aa-10ac72749438" response_time:0.002223766 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e2a734a6ea9f513" x_b3_spanid:"2e2a734a6ea9f513" x_b3_parentspanid:"-" +Ê´æÿãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜÜ ±äØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.654+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ac61eb2-9395-49bf-45f8-702773695dd1" response_time:0.004509354 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b22de5c8c0eefaf1" x_b3_spanid:"b22de5c8c0eefaf1" x_b3_parentspanid:"-" +°Ô ±äØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö¿ÕñäØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:12.786+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1ba5cc9e-0c2f-4e09-6bfb-cf2f18d996e6" response_time:0.00774201 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d4baee471962bc2" x_b3_spanid:"0d4baee471962bc2" x_b3_parentspanid:"-" +¶²ÕñäØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýó©çØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25224" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"682db141-29c8-4f4b-6026-f6ee29e6ea17" response_time:0.002646715 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5f29947662b6651a" x_b3_spanid:"5f29947662b6651a" x_b3_parentspanid:"-" +Àë©çØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž–ß¾éØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.024+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87ff5dbd-e074-430d-5fa2-708a1249f72e" response_time:0.004551731 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f325fcd20a0ec35b" x_b3_spanid:"f325fcd20a0ec35b" x_b3_parentspanid:"-" +¶ß¾éØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0쩊ôéØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:14.138+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d1cfa676-8724-43fd-71f3-53afb5fb688e" response_time:0.00304528 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c3f0ac0080c04ff" x_b3_spanid:"4c3f0ac0080c04ff" x_b3_parentspanid:"-" +¢ŠôéØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»ŸÚ®êØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.260+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26524" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0c49ebb9-3a7c-47d8-7f19-93e396f09e4a" response_time:0.003196441 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b40a58c4540052e" x_b3_spanid:"3b40a58c4540052e" x_b3_parentspanid:"-" +Ÿ•Ú®êØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ®®ÖëØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.613+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"586a9192-e8a5-4934-7242-59761372d0d7" response_time:0.002426301 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54fba31e67c87fea" x_b3_spanid:"54fba31e67c87fea" x_b3_parentspanid:"-" +™£®ÖëØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û²€¡îØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.306+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26700" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3a0c4185-6147-4ecb-6380-b77e97dd211a" response_time:0.002547965 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41797ee4fad15fea" x_b3_spanid:"41797ee4fad15fea" x_b3_parentspanid:"-" +î§€¡îØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³¤Ó×îØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.420+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a06ba018-514f-4fac-7e06-60332d28e2a7" response_time:0.002887991 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7f09c3b008752cae" x_b3_spanid:"7f09c3b008752cae" x_b3_parentspanid:"-" +ÈœÓ×îØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Áˆ§ðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.855+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e19be154-a8d0-42fc-57f8-d15d8975bc29" response_time:0.003135355 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"575443962fb6af0a" x_b3_spanid:"575443962fb6af0a" x_b3_parentspanid:"-" +®µˆ§ðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁõœÌðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.933+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a5cd7223-a7e5-4fab-6c41-ad8785fbc1ab" response_time:0.002662025 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bfff3d5ee300cb42" x_b3_spanid:"bfff3d5ee300cb42" x_b3_parentspanid:"-" +ôíœÌðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊÓˆÑñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"29899a56-0cbc-4af9-5bf7-c72ef686617f" response_time:0.002857693 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b9e805c4c146c4d3" x_b3_spanid:"b9e805c4c146c4d3" x_b3_parentspanid:"-" +ƒÇˆÑñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»®ŒÖñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.222+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d250ccc5-1d94-4184-578c-059f8d80f877" response_time:0.003645127 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"262afdb2a55fa572" x_b3_spanid:"262afdb2a55fa572" x_b3_parentspanid:"-" +좌ÖñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ÝÇòØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:16.461+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32396" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10eba16c-68c6-453d-422a-8f89c50e49e7" response_time:0.00272042 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a4ba726802488f7d" x_b3_spanid:"a4ba726802488f7d" x_b3_parentspanid:"-" +Ÿ˜ÝÇòØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐÛ™ÞõØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.312+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33214" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"94fac3bf-5e20-4963-54fd-29d545a3eec0" response_time:0.003916213 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b6ffa7cc7196cc4" x_b3_spanid:"3b6ffa7cc7196cc4" x_b3_parentspanid:"-" +ÒÍ™ÞõØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ìÞöØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25224" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a8edb47b-7b00-4171-7bba-d938a944461c" response_time:0.003651551 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d27839db7b263441" x_b3_spanid:"d27839db7b263441" x_b3_parentspanid:"-" +Ó÷ëÞöØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òÿóúöØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.641+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c18d280-ddb6-423e-6b06-16d5427245f3" response_time:0.003320437 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"058c13266b6e0f82" x_b3_spanid:"058c13266b6e0f82" x_b3_parentspanid:"-" +³óóúöØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°´šˆ÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"621f10e8-b360-4d2e-793a-98c11c486200" response_time:0.002657637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c63d9dd52a4d726f" x_b3_spanid:"c63d9dd52a4d726f" x_b3_parentspanid:"-" +´ªšˆ÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±œ¯÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.751+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0aea92d9-5eca-4567-7068-76d72b7cc789" response_time:0.002689743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd329edc0df681d4" x_b3_spanid:"bd329edc0df681d4" x_b3_parentspanid:"-" +É”¯÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öàôÍøØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:18.084+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32036" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5ddfe53a-65de-4361-6257-49c0b6026d79" response_time:0.00294933 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e1a11b2bff3d47b5" x_b3_spanid:"e1a11b2bff3d47b5" x_b3_parentspanid:"-" + ØôÍøØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ŒõÛøØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.114+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"534b79e7-9c59-4b83-5a3d-87ae38333593" response_time:0.002810221 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0619c4810cb5fc11" x_b3_spanid:"0619c4810cb5fc11" x_b3_parentspanid:"-" +ìõÛøØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²å‡õùØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:18.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32396" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54c95b14-0142-4302-74b4-c825a12e0c2e" response_time:0.00284299 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"24ac53f52d64647a" x_b3_spanid:"24ac53f52d64647a" x_b3_parentspanid:"-" +áׇõùØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„»‡ÐúØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.626+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf493367-cc68-4ffe-6fb2-c5cfcb270406" response_time:0.002408487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7927f40d1f913801" x_b3_spanid:"7927f40d1f913801" x_b3_parentspanid:"-" +¦®‡ÐúØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ê«ÕŽûØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.756+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8bc0b101-cd42-40a4-6c8c-2ad53b524dc3" response_time:0.003805851 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"82dee6512342b645" x_b3_spanid:"82dee6512342b645" x_b3_parentspanid:"-" +õ£ÕŽûØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êúÔ¸üØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:19.113+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32036" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d855a86-cd74-4c66-5fb1-e72a24e028c9" response_time:0.0031954 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d5e84b54bdc6b3b" x_b3_spanid:"4d5e84b54bdc6b3b" x_b3_parentspanid:"-" +¬îÔ¸üØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôÓ· üØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.059+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32036" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6402bb6c-91fc-4d26-6347-2b84da6c0218" response_time:0.006057336 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4bdb1f69f2e084f5" x_b3_spanid:"4bdb1f69f2e084f5" x_b3_parentspanid:"-" +µÈ· üØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž«ãÕüØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.169+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d0e676b-a713-4c93-6884-901d1785d779" response_time:0.007857819 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29198d60bb264cbb" x_b3_spanid:"29198d60bb264cbb" x_b3_parentspanid:"-" +Æ£ãÕüØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª˜¦¾þØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.658+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"060f84e3-723d-45b0-4cc8-b6545f6c3deb" response_time:0.007299407 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb6e2b72908a2228" x_b3_spanid:"bb6e2b72908a2228" x_b3_parentspanid:"-" +ñЦ¾þØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0è«ÿ©ÿØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.888+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"859a2a8b-5106-4401-68c4-ed9feef9f2a3" response_time:0.003039538 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eaf6d3eac9d47828" x_b3_spanid:"eaf6d3eac9d47828" x_b3_parentspanid:"-" +”Ÿÿ©ÿØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îýƒ«‹ÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:40.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dd5d16f5-1ef9-44bf-67af-6639ef5160ba" response_time:0.01193035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1df2a7fe7841218c" x_b3_spanid:"1df2a7fe7841218c" x_b3_parentspanid:"-" +ß‹ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ÈǪ̃לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:22.247+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc4f4e4e-14af-4bd5-46ca-6657a4243ae3" response_time:0.002914293 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f006a4542ab39769" x_b3_spanid:"f006a4542ab39769" x_b3_parentspanid:"-" +ˆ¼Ǫ̃לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾Æî³ÌÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:57.498+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dba8c0cc-ecf1-435c-7e2b-cdaf1c9f7704" response_time:0.003358656 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"155238c0fb24ec39" x_b3_spanid:"155238c0fb24ec39" x_b3_parentspanid:"-" +˾î³ÌÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥”âÌÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:57.596+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55608" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2da5317a-88eb-45fb-4692-27c951394395" response_time:0.003014082 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6964fe09c146373c" x_b3_spanid:"6964fe09c146373c" x_b3_parentspanid:"-" +¹âÌÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò¡à©ÎÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:50086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b5dd8f7-d9b3-4ba2-5f0b-8cd6449842ce" response_time:0.002410327 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3565c95e21251c4c" x_b3_spanid:"3565c95e21251c4c" x_b3_parentspanid:"-" +ë™à©ÎÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªö´ØÎÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.113+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ffa10a84-9450-4632-4e92-ffe87a7b2e6a" response_time:0.002695529 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7851b137a01f1eda" x_b3_spanid:"7851b137a01f1eda" x_b3_parentspanid:"-" +Ÿï´ØÎÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô«ªÐÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:50086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d2d2525b-54ef-4aef-793e-7b8dd9c75c7e" response_time:0.005809865 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4532265679b58d22" x_b3_spanid:"4532265679b58d22" x_b3_parentspanid:"-" +É«ªÐÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ØÓÑÐÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.635+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0de58c9a-ff05-434d-75da-cbe8f842aa81" response_time:0.003007195 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9a0d7255775396d5" x_b3_spanid:"9a0d7255775396d5" x_b3_parentspanid:"-" +‰ËÓÑÐÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àÕ ÑÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.801+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59375233-d253-45f2-5c01-fac36a84e49b" response_time:0.002992052 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36c54c08a79357dd" x_b3_spanid:"36c54c08a79357dd" x_b3_parentspanid:"-" +܇ՠÑÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼—ÿ’ÕÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:59.845+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55608" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e35e3d59-d5d2-4300-4eb8-c8e727866898" response_time:0.003767994 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5366753efbcb5e7d" x_b3_spanid:"5366753efbcb5e7d" x_b3_parentspanid:"-" +«ÿ’ÕÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÑã­ÖÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:00.169+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fa9374c0-fdc6-4f9d-75fa-4e20a407b303" response_time:0.004019734 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a3fed38fc575a75" x_b3_spanid:"6a3fed38fc575a75" x_b3_parentspanid:"-" +ËÉã­ÖÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Êϼ²ÛÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:01.522+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:15142" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e077a17-0521-42d3-505b-ede148a0e2ff" response_time:0.003105593 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f75204d8c0d30dd2" x_b3_spanid:"f75204d8c0d30dd2" x_b3_parentspanid:"-" +¯µ¼²ÛÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤›¶ÛÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:01.530+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:15142" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"363c3cf4-74b8-4be4-680b-dbfcb4a87339" response_time:0.003122785 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0bcf5516186aa5b6" x_b3_spanid:"0bcf5516186aa5b6" x_b3_parentspanid:"-" +ƒ‚›¶ÛÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–¾»àÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:02.883+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ba7b148-ed60-4141-7e39-ab008d685213" response_time:0.003200637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"42cd077b05acd35a" x_b3_spanid:"42cd077b05acd35a" x_b3_parentspanid:"-" +çø½»àÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚèúìàÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:02.985+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b13b3e38-562f-4bff-49c8-eca81a495efe" response_time:0.005147721 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dcf53afe4a9b293b" x_b3_spanid:"dcf53afe4a9b293b" x_b3_parentspanid:"-" +ÆÜúìàÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²Æ¢áÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.100+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60127" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"03cf8567-4830-4cb0-76c6-2335ea56a759" response_time:0.002682041 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41d814b2f0061939" x_b3_spanid:"41d814b2f0061939" x_b3_parentspanid:"-" +¡¥Æ¢áÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý¿é£áÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.103+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61255" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9eb29ba-9917-40a5-5615-7ad884e0ed5c" response_time:0.002500019 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"674fcbb573dcb362" x_b3_spanid:"674fcbb573dcb362" x_b3_parentspanid:"-" +‡²é£áÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êâÒ¯áÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.127+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:18312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06456b5c-ee1f-4c0d-66d1-7381a10f1322" response_time:0.002928352 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"880321729187d0a5" x_b3_spanid:"880321729187d0a5" x_b3_parentspanid:"-" +ŠÚÒ¯áÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“¼œÍáÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f2e384c-2494-4e27-7f0e-6b808607a307" response_time:0.002868542 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"046da68d8f98ca34" x_b3_spanid:"046da68d8f98ca34" x_b3_parentspanid:"-" +ä°œÍáÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´£ŠöâÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:03.543+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:59303" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4785189-2585-423d-696e-7317118a9ddc" response_time:0.00293224 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94737e8f5caeafb6" x_b3_spanid:"94737e8f5caeafb6" x_b3_parentspanid:"-" +㕊öâÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†½úâÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.552+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:56287" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d49e7f6-8006-4f7a-7ec3-6cd306b98b39" response_time:0.002764506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fdc2725fa6bf0fb1" x_b3_spanid:"fdc2725fa6bf0fb1" x_b3_parentspanid:"-" +ݰúâÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»·÷ÚãÖœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:15:03.748+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"feb5d82e-9946-43b0-7852-dac0f7123cb7" response_time:0.0100752 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"671188efc1ae5940" x_b3_spanid:"671188efc1ae5940" x_b3_parentspanid:"-" +‘°÷ÚãÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ɇ©ìãÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.790+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f0cc31c1-2f08-46bc-4ee2-503923779b0b" response_time:0.003738037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"87fbd63bad6fbdf0" x_b3_spanid:"87fbd63bad6fbdf0" x_b3_parentspanid:"-" +ºþ¨ìãÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜ßã£åÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.175+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:16996" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34215e23-9ece-41ec-6051-ff786b1b6b91" response_time:0.003774485 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"22e3ac9be2b7208d" x_b3_spanid:"22e3ac9be2b7208d" x_b3_parentspanid:"-" +Òã£åÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®À½„æÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.379+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:56287" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c74fc7b4-a15d-4519-7546-14d8ededd400" response_time:0.002955359 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8d1257a4ec1366fd" x_b3_spanid:"8d1257a4ec1366fd" x_b3_parentspanid:"-" +븽„æÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñë éæÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.588+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10fb2d5e-8aae-458b-4c04-306140ddedd8" response_time:0.005452899 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7a121dedaba792e" x_b3_spanid:"c7a121dedaba792e" x_b3_parentspanid:"-" +òä éæÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù§…ŒçÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:04.661+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19948" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ffcf71e-acac-41a3-5e11-85bab92473f6" response_time:0.00527053 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6334f637aa5a77fb" x_b3_spanid:"6334f637aa5a77fb" x_b3_parentspanid:"-" +Ò˜…ŒçÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÇÎØ³çÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.746+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"541ce6de-425b-4e9a-4e14-696cc5d202d5" response_time:0.003459631 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da7940789e3d1f56" x_b3_spanid:"da7940789e3d1f56" x_b3_parentspanid:"-" +»ÇسçÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Š£ðÆçÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.777+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e31bda7-4148-4e89-7d07-4a45dc62c51d" response_time:0.012873065 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ceb34867d20806d6" x_b3_spanid:"ceb34867d20806d6" x_b3_parentspanid:"-" +£—ðÆçÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª¢€îçÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.862+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9837cb91-17d0-4b72-7c17-250abf352177" response_time:0.009795856 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a20c13a06349e136" x_b3_spanid:"a20c13a06349e136" x_b3_parentspanid:"-" +£˜€îçÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ßý”ëÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:05.752+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19812" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec374807-9093-4963-40a0-deb1ea41c6f4" response_time:0.006657403 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5be910f9fa96f789" x_b3_spanid:"5be910f9fa96f789" x_b3_parentspanid:"-" +þÔý”ëÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥¯‚—ìÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:06.028+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"977daf43-f09f-4a27-7049-7158b3f395d9" response_time:0.003622972 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"054b684be0fd33a2" x_b3_spanid:"054b684be0fd33a2" x_b3_parentspanid:"-" +„¤‚—ìÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾›—ÙîÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:06.703+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:18472" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77ffe561-a275-47dd-5447-8a6fae36586b" response_time:0.003414681 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c707ac18ffeff521" x_b3_spanid:"c707ac18ffeff521" x_b3_parentspanid:"-" +¸’—ÙîÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú…ΠïÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:06.854+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a686dc44-44ed-4d26-42db-57bc69f80a1c" response_time:0.002844185 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2925f498420f6de6" x_b3_spanid:"2925f498420f6de6" x_b3_parentspanid:"-" +þúÍ ïÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éàžáðÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.256+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aef65dda-1a92-4651-72c3-b94f4a0dedbd" response_time:0.004795811 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0efc6a80a4037db" x_b3_spanid:"e0efc6a80a4037db" x_b3_parentspanid:"-" +ÍØžáðÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½úÔåðÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.265+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e6d04a7-924d-4c40-64bc-7ccf4bfa34da" response_time:0.004625877 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0e8489d522a39c3" x_b3_spanid:"a0e8489d522a39c3" x_b3_parentspanid:"-" +ŸîÔåðÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÍîðÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.284+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7669a325-8380-43d1-55eb-d612f41bbc0f" response_time:0.004462114 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31f64d71fa7eaca3" x_b3_spanid:"31f64d71fa7eaca3" x_b3_parentspanid:"-" +ŽÑÍîðÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐÙÒ²ñÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.428+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19982" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c303052b-8727-461b-49ab-18747809065d" response_time:0.003108617 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d8b1cf4ef71c6c0" x_b3_spanid:"9d8b1cf4ef71c6c0" x_b3_parentspanid:"-" +ÊÐÒ²ñÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öëŽöÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:64131" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec60139d-59ef-40e6-524b-23acf08f1f4c" response_time:0.002883791 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e02de7c6ee395e62" x_b3_spanid:"e02de7c6ee395e62" x_b3_parentspanid:"-" +†ëŽöÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž˜ÂÂøÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:09.340+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"71db9f06-29f8-4656-5d12-916c8990d6ef" response_time:0.003311545 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1747e4b6b8ff1299" x_b3_spanid:"1747e4b6b8ff1299" x_b3_parentspanid:"-" +ËÂÂøÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÔÏùÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:09.634+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:15860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"717c767f-8acd-455c-6e40-062d59e4dc74" response_time:0.00400337 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a83734c951625d94" x_b3_spanid:"a83734c951625d94" x_b3_parentspanid:"-" +òËÏùÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö¢¾ÒûÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.179+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3ede74a-a202-47a8-60c4-17cfef010cba" response_time:0.003068179 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"242319df3129d5e5" x_b3_spanid:"242319df3129d5e5" x_b3_parentspanid:"-" +ê—¾ÒûÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0鮹ÆýÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.689+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"43042dab-4d3e-49e9-6d24-f8d5fd2af604" response_time:0.004810842 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"66a25575d923d042" x_b3_spanid:"66a25575d923d042" x_b3_parentspanid:"-" +פ¹ÆýÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ×¢ÿÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:11.083+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19812" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"16e1dfbe-c981-4266-608b-6477ec8cfcc1" response_time:0.002673942 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b357e8591331cc52" x_b3_spanid:"b357e8591331cc52" x_b3_parentspanid:"-" +ÔË¢ÿÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤‹¡Ú‹×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.491+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0d8336e-80b8-4134-736c-f4746c089210" response_time:0.002788718 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69441539c6722fdf" x_b3_spanid:"69441539c6722fdf" x_b3_parentspanid:"-" +˜¿ Ú‹×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñÝû¹×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.960+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41672" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74d95107-2d1f-42d3-42c3-a114f64d4b6d" response_time:0.003343587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8126e1e8b1c0c709" x_b3_spanid:"8126e1e8b1c0c709" x_b3_parentspanid:"-" +˜Ëû¹×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À¬Ñî“לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.681+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46268" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf0d56f2-700f-465f-4c3d-829bd7c446a4" response_time:0.002864002 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cff00c792388f33a" x_b3_spanid:"cff00c792388f33a" x_b3_parentspanid:"-" +‘ŸÑî“לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ááÊî˜×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46268" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a4625a2-8de4-4c28-6afc-212df2a5c9e3" response_time:0.003074873 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"deb62d594a2ba21f" x_b3_spanid:"deb62d594a2ba21f" x_b3_parentspanid:"-" +ïÖÊî˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©±…ª×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:22.634+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28088" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7588d501-6628-4312-778f-7fcf29040325" response_time:0.003496234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a069cfaf6e933188" x_b3_spanid:"a069cfaf6e933188" x_b3_parentspanid:"-" +䂱…ª×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼ß¿êµ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:25.799+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32380" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eec9149b-3714-4bb4-70cd-6fb91a6b478e" response_time:0.002933596 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78e010381598bfb3" x_b3_spanid:"78e010381598bfb3" x_b3_parentspanid:"-" +ÙÔ¿êµ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼ñø¿¼×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:27.588+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4e8d857-d08d-435c-64cc-a9763c579cdd" response_time:0.003694232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd7cb90dfb6547a0" x_b3_spanid:"cd7cb90dfb6547a0" x_b3_parentspanid:"-" +¹æø¿¼×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÑ¥ð¿×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.496+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea5ee6e8-6924-497b-46eb-b9e6f0ede12f" response_time:0.002786127 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"517e4102e1d5ce34" x_b3_spanid:"517e4102e1d5ce34" x_b3_parentspanid:"-" +©Å¥ð¿×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0͓׺ÀלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.651+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"af5d8c57-989d-4b07-629b-d36ae7112056" response_time:0.003632231 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17ec283a3a322123" x_b3_spanid:"17ec283a3a322123" x_b3_parentspanid:"-" +ø„׺ÀלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÛ¸“ÁלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:28.836+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"839a366a-e8ea-4c1b-6c00-7a39cf1afc5e" response_time:0.004773796 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e1030f3b2b621fa" x_b3_spanid:"1e1030f3b2b621fa" x_b3_parentspanid:"-" +¾Ï¸“ÁלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°¥¨Í«×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32380" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5deb81b-15de-4a27-57b3-b6524928a9fc" response_time:0.003062892 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0608d2b8178f1b1" x_b3_spanid:"d0608d2b8178f1b1" x_b3_parentspanid:"-" +ä¨Í«×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëðڬלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.349+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10c0b8b4-211b-4308-77da-bd5181e13caa" response_time:0.002708142 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17bec55236b54aa5" x_b3_spanid:"17bec55236b54aa5" x_b3_parentspanid:"-" +öèڬלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñéúú¬×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.418+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"16cba469-5c7c-468f-4cf0-93f19f1f63cc" response_time:0.002558482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f62b4faa8d10dff" x_b3_spanid:"1f62b4faa8d10dff" x_b3_parentspanid:"-" +«âúú¬×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÝü®×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87b30094-5e3b-4f60-7483-209a371ea610" response_time:0.008126019 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9c5b5523d2adc01c" x_b3_spanid:"9c5b5523d2adc01c" x_b3_parentspanid:"-" +ÊÎü®×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÍüĮלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:23.836+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26700" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b4298f1-a17f-41c7-53ae-d7d857463d83" response_time:0.008699117 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c993842bd7e74439" x_b3_spanid:"c993842bd7e74439" x_b3_parentspanid:"-" +ôÂüĮלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùȬ²°×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:24.340+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9da5a6d8-edd2-4eea-584d-4653d816ffae" response_time:0.002629885 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4806cbe49b998ec" x_b3_spanid:"d4806cbe49b998ec" x_b3_parentspanid:"-" +¬²°×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿô³ƒ±×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:24.509+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e96e95af-0ef1-4e73-7ae3-cedb8d65e01f" response_time:0.002767587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02f60552b6f60204" x_b3_spanid:"02f60552b6f60204" x_b3_parentspanid:"-" +í賃±×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑËÛÕÌלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:31.929+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d94cbd02-e2a1-45a4-4de1-b40dcc2859cf" response_time:0.003160328 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ac4e185656a5265" x_b3_spanid:"5ac4e185656a5265" x_b3_parentspanid:"-" +ÙÀÛÕÌלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚ʾ¯ÍלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:32.116+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f38ac64c-fdce-43de-6949-9e809c644826" response_time:0.004869935 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e01fbb16844ba67" x_b3_spanid:"6e01fbb16844ba67" x_b3_parentspanid:"-" +Ÿº¾¯ÍלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏÇ•úÑלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.344+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7ba5134-7c7c-46da-5409-466d0ad5979d" response_time:0.007366581 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a4ea9a979ef9555b" x_b3_spanid:"a4ea9a979ef9555b" x_b3_parentspanid:"-" +µ»•úÑלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ê¯å‡ÒלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:33.376+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8953fa70-9458-4fab-7c33-a9011247afe4" response_time:0.00391126 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98ce2e43904bde9e" x_b3_spanid:"98ce2e43904bde9e" x_b3_parentspanid:"-" +ɤå‡ÒלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·‘ܶÒלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:33.475+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26802" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fdb3dc28-2c0e-440c-6b0a-43234ccc46a5" response_time:0.003121059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"190feb685c1f1c2b" x_b3_spanid:"190feb685c1f1c2b" x_b3_parentspanid:"-" +ñ„ܶÒלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Âæ³ÕÔלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:34.077+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5850d21-9a7a-4237-5427-2deffeecfc71" response_time:0.002371006 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b7dddbfbe1efe4f6" x_b3_spanid:"b7dddbfbe1efe4f6" x_b3_parentspanid:"-" +ËݳÕÔלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚëÏÌÕלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:34.327+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"767ac5ff-8922-46a6-46a0-a2abe52478ae" response_time:0.00269375 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"559ad45231aac0df" x_b3_spanid:"559ad45231aac0df" x_b3_parentspanid:"-" +óãÏÌÕלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü±¤£ÖלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:34.508+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e02c6eb9-7403-48b2-7966-b8ecde0e2cf3" response_time:0.003012554 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d59f7f26e163fe9e" x_b3_spanid:"d59f7f26e163fe9e" x_b3_parentspanid:"-" +÷š¤£ÖלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Öç¾üØ×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:35.232+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"932805e5-dcdf-4948-46c6-df40e9151015" response_time:0.00314768 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c688e80c55676fe" x_b3_spanid:"8c688e80c55676fe" x_b3_parentspanid:"-" +à¾üØ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÍ÷§ÚלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:35.591+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3e218a63-a3e6-4967-6a26-5cb19989855f" response_time:0.003177369 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c27540daa8667aff" x_b3_spanid:"c27540daa8667aff" x_b3_parentspanid:"-" +ðÁ÷§ÚלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú•—»ÃלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:29.458+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"40836e58-f920-4471-7a19-79e84590f595" response_time:0.002949546 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"066da31b279853ff" x_b3_spanid:"066da31b279853ff" x_b3_parentspanid:"-" +úˆ—»ÃלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0𞵋ÅלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:29.894+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32382" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2278c7f9-487b-4f36-525a-c626f15e699e" response_time:0.004075778 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9fe0da06f7f0d2ff" x_b3_spanid:"9fe0da06f7f0d2ff" x_b3_parentspanid:"-" +Ž”µ‹ÅלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”òÆåÆ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:30.353+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac97b8cd-b94f-430c-7f74-de73e8c042d0" response_time:0.002675735 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f5b0a5284821b37" x_b3_spanid:"2f5b0a5284821b37" x_b3_parentspanid:"-" +áçÆåÆ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«—áìÊלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:31.441+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f7d44a06-a71f-44d1-4510-bf7b1a5c3943" response_time:0.002792731 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7dfda1e4ed3071a0" x_b3_spanid:"7dfda1e4ed3071a0" x_b3_parentspanid:"-" +…ŽáìÊלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ÕÌœËלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:31.540+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26310" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3ea0507-fe5c-447d-701d-4a4b0bd757b3" response_time:0.004377969 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ed27509c268dbe73" x_b3_spanid:"ed27509c268dbe73" x_b3_parentspanid:"-" +òÉÌœËלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0娮åלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:38.558+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd241450-16b4-45df-5793-c41be9c20776" response_time:0.002789086 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ffe9883c4a1ced02" x_b3_spanid:"ffe9883c4a1ced02" x_b3_parentspanid:"-" +½„¨®åלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§­¶¾çלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:39.128+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33050" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7bb7c522-61cd-4143-7ec1-b7e39dd07e25" response_time:0.002831847 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"74636b3ecc427125" x_b3_spanid:"74636b3ecc427125" x_b3_parentspanid:"-" +©Ÿ¶¾çלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€å›£èלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:39.340+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"71bf6d3a-706a-49b6-4bc6-59f54f198951" response_time:0.002670249 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b21f907106ba48b4" x_b3_spanid:"b21f907106ba48b4" x_b3_parentspanid:"-" +Ú›£èלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡¦±µÃØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.806+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20704" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"50f27faa-e0df-40e0-60ef-9cbd369c08ec" response_time:0.002557518 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0c03edbdf9b4fbea" x_b3_spanid:"0c03edbdf9b4fbea" x_b3_parentspanid:"-" +Й±µÃØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ÄÓÍÄØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.122+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20730" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7445444-e855-416d-556e-a87707d68ec4" response_time:0.005800359 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5073d4e8b4067247" x_b3_spanid:"5073d4e8b4067247" x_b3_parentspanid:"-" +­½ÓÍÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»÷¡ƒÅØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.238+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20730" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b1ec1bbd-6c7f-4804-7037-712d7e8df728" response_time:0.002644488 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0cf38f3efcd4b34d" x_b3_spanid:"0cf38f3efcd4b34d" x_b3_parentspanid:"-" +ßì¡ƒÅØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èó¯ÇØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:04.868+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"72be1148-1de5-48fe-60ab-43969711e83b" response_time:0.00253579 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fdc16b58d7ca043d" x_b3_spanid:"fdc16b58d7ca043d" x_b3_parentspanid:"-" +ÒÜó¯ÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èËÿ‹ÊØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.598+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19982" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7b0164a-6238-42ba-51bc-191975b8fa54" response_time:0.002814955 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94c887843ac28158" x_b3_spanid:"94c887843ac28158" x_b3_parentspanid:"-" +§Äÿ‹ÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áõÞ¤ÎØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19982" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d76d4ddd-0e9b-4938-4a23-0b0f83a520f5" response_time:0.002269747 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6db81e7e9bf5edb" x_b3_spanid:"a6db81e7e9bf5edb" x_b3_parentspanid:"-" +ºíÞ¤ÎØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£íµÂÐØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:18472" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4fd70b3f-8b44-4601-7cdc-df5c25baec4c" response_time:0.002248083 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e2feb5ae3725784" x_b3_spanid:"3e2feb5ae3725784" x_b3_parentspanid:"-" +„áµÂÐØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ü¢ÑÖÐØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:07.365+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:14084" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb90e7ab-5d74-4bdb-5703-c7e53167b653" response_time:0.00263046 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fb8eb59c2b860b7" x_b3_spanid:"4fb8eb59c2b860b7" x_b3_parentspanid:"-" +‰—ÑÖÐØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿÿ¤äÐØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:14084" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cbf40839-e331-43c3-69f3-9e15651d3535" response_time:0.003178015 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"405510ddbe589ccb" x_b3_spanid:"405510ddbe589ccb" x_b3_parentspanid:"-" +¾ö¤äÐØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª§œôÜØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.649+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba98a058-3a40-4f64-790c-627ab141889a" response_time:0.002362295 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"716b25b469726c17" x_b3_spanid:"716b25b469726c17" x_b3_parentspanid:"-" +霜ôÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃûÙ™ÞØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.996+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6b7db28b-7667-4a06-513f-55093f6e5323" response_time:0.002314947 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e91cfd4c20609dd" x_b3_spanid:"3e91cfd4c20609dd" x_b3_parentspanid:"-" +ŸïÙ™ÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß—Ï¯ÞØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"addd7440-b0cb-45da-506a-4850846429fe" response_time:0.002776733 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"77f02e88e498f25f" x_b3_spanid:"77f02e88e498f25f" x_b3_parentspanid:"-" +ÁÏ¯ÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û×ÊŠàØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.498+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2245d19-3795-471c-467a-bbb1c1841338" response_time:0.005421894 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b9c8503c7a82fbf" x_b3_spanid:"1b9c8503c7a82fbf" x_b3_parentspanid:"-" +œÍÊŠàØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öÙñžãØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.349+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45490" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b6b038fc-2f51-4929-4c64-ebe3f39c94f7" response_time:0.002302235 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8488fed61bd7d44" x_b3_spanid:"c8488fed61bd7d44" x_b3_parentspanid:"-" +®ÏñžãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý¸âûæØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.347+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56f418ca-2649-40f0-6ae1-afaa3ac09eb1" response_time:0.004079052 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa1401d7d645abcd" x_b3_spanid:"aa1401d7d645abcd" x_b3_parentspanid:"-" +ˆ¯âûæØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ùõ•éØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.934+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47182" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1d792139-a6bf-4ba7-7185-dc295abaedd9" response_time:0.009189995 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2fa704283bed227" x_b3_spanid:"d2fa704283bed227" x_b3_parentspanid:"-" +ùëõ•éØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ¤àÞéØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.090+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47182" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bb6a5c99-a8ea-414f-66f6-214c59c2c036" response_time:0.006017839 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f831c2e4dd6a5353" x_b3_spanid:"f831c2e4dd6a5353" x_b3_parentspanid:"-" +ŸšàÞéØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«æþÍìØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.863+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:40852" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"298cb7bc-5fb6-44d5-538c-563c99fdd9ce" response_time:0.002614129 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0f3fa15dadd0c3b8" x_b3_spanid:"0f3fa15dadd0c3b8" x_b3_parentspanid:"-" +ÜßþÍìØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ð‘ÅïØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.651+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b326ec07-96af-42bc-42d9-28975c148ab2" response_time:0.002161911 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"40d509c51c1e138c" x_b3_spanid:"40d509c51c1e138c" x_b3_parentspanid:"-" +Ò”‘ÅïØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãÝìŠñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.063+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c3d4b7a-4606-484e-69f2-9dd065729d20" response_time:0.003986823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"87feb77ec78dcdb0" x_b3_spanid:"87feb77ec78dcdb0" x_b3_parentspanid:"-" +ëÒìŠñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 äŒØ÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.835+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a5b963f8-f46c-4b32-4e34-cb021be73904" response_time:0.004794609 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e93611c8f7307db" x_b3_spanid:"7e93611c8f7307db" x_b3_parentspanid:"-" +ÔÖŒØ÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åÙœºøØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.043+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46268" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80cd51d9-b3df-4d07-6267-033970d37fd1" response_time:0.002516333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38ed76825d0f9cdb" x_b3_spanid:"38ed76825d0f9cdb" x_b3_parentspanid:"-" +òÑœºøØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ©õ‡ûØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.743+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44212" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52a62734-1982-4694-41c4-08cd37583f8e" response_time:0.002407495 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac51a8d20441cab8" x_b3_spanid:"ac51a8d20441cab8" x_b3_parentspanid:"-" +È¡õ‡ûØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âËêלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:15.865+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16177" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5378cc9f-186b-4fbe-4f26-e387bffbe11c" response_time:0.005209466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bcdf61783d89f58d" x_b3_spanid:"bcdf61783d89f58d" x_b3_parentspanid:"-" +ÜõÊêלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«¥·…‘לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:15.923+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:11141" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7d2ddd3-5865-4334-6d89-3582a9ed5511" response_time:0.003295803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"490939e369324171" x_b3_spanid:"490939e369324171" x_b3_parentspanid:"-" +󜷅‘לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ宦’לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:16.259+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bfc1b3b8-58b2-4c94-5902-3381c7c06887" response_time:0.004718137 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48afdac3fe50b2c8" x_b3_spanid:"48afdac3fe50b2c8" x_b3_parentspanid:"-" +¨Ø®¦’לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚËΓלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.511+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"17c383aa-f873-4241-4329-6aafe51203f8" response_time:0.003569748 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"65fb82a71c7ffc42" x_b3_spanid:"65fb82a71c7ffc42" x_b3_parentspanid:"-" +ÁÃΓלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ô’ƒ“לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.456+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:11141" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0f09133-5345-41ad-7bf4-bfbbbfad1541" response_time:0.002120371 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9d691c43088b094" x_b3_spanid:"e9d691c43088b094" x_b3_parentspanid:"-" +èê’ƒ“לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Î¥Ô±“לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0dbc8bd-a972-41db-4dfe-cbf444994720" response_time:0.005744048 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d640bbf3f85aba31" x_b3_spanid:"d640bbf3f85aba31" x_b3_parentspanid:"-" +ƒ›Ô±“לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óÛÅ͓לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.609+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58038" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d1c1af8e-f68f-446d-7c9d-2811832ef57e" response_time:0.005780138 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58a8158983338686" x_b3_spanid:"58a8158983338686" x_b3_parentspanid:"-" +üÍÅ͓לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0䑊ñ“לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:16.686+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e96b3de8-9897-45a8-4f2f-b67bc741cd3d" response_time:0.002916252 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06cb3c64f6276e9f" x_b3_spanid:"06cb3c64f6276e9f" x_b3_parentspanid:"-" +‰Šñ“לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ùàö“לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.698+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57356" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87c951e1-2a23-4437-5d14-4192a2048cc8" response_time:0.003090881 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63ff39866c13dbfc" x_b3_spanid:"63ff39866c13dbfc" x_b3_parentspanid:"-" +áÐàö“לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“ƒ¢ú“לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:16.706+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3a3cae53-2966-47d4-7141-826a7fb911a3" response_time:0.00200539 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b04e23fff6cda50" x_b3_spanid:"2b04e23fff6cda50" x_b3_parentspanid:"-" +ˆú¡ú“לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ܞ蠔לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.787+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16179" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"30af9921-1817-4911-78b3-e4b229f82045" response_time:0.002166708 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e733e4f885d06d93" x_b3_spanid:"e733e4f885d06d93" x_b3_parentspanid:"-" +Å蠔לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø­¢·”לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.833+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14849" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4f02eea-5818-42c4-4d5d-8447981b50d4" response_time:0.002899925 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d748b191bcb83415" x_b3_spanid:"d748b191bcb83415" x_b3_parentspanid:"-" +䙢·”לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ÿíâ”לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.924+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16179" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3a64d177-9f08-41b0-4383-944e947f6131" response_time:0.003518622 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"68f658ecfd30ccd7" x_b3_spanid:"68f658ecfd30ccd7" x_b3_parentspanid:"-" +Àîíâ”לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í­¾‡˜×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:17.808+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59160fb7-9431-4e55-5f03-10c523419f38" response_time:0.002227021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"915d662a0a9598ad" x_b3_spanid:"915d662a0a9598ad" x_b3_parentspanid:"-" +œ¾‡˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•ÊñŠ˜×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:17.815+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d50ba3b5-47be-4b17-530a-69e02e5e4585" response_time:0.001683009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"777d548a211d392b" x_b3_spanid:"777d548a211d392b" x_b3_parentspanid:"-" +¦½ñŠ˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñž¶˜×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.905+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16177" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"238172ca-cb41-4838-598d-1a33f2f52269" response_time:0.002877486 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e601ba6b3e919f5e" x_b3_spanid:"e601ba6b3e919f5e" x_b3_parentspanid:"-" +û·ž¶˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦‚í¾˜×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.925+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16177" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7852a239-8571-4772-7db3-262259781da1" response_time:0.001369904 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8c3014906ff2a3b" x_b3_spanid:"f8c3014906ff2a3b" x_b3_parentspanid:"-" +÷쾘לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®Úç™×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.278+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52600" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8240f248-fcf3-4324-4619-5fc85c4474a6" response_time:0.002135082 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71fd908be049fd83" x_b3_spanid:"71fd908be049fd83" x_b3_parentspanid:"-" +¼’Úç™×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ÷ˆš×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.348+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16555" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6931ef22-8e42-42c5-60f3-901f7a76c5c0" response_time:0.001805389 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f5b77192a97bc40" x_b3_spanid:"1f5b77192a97bc40" x_b3_parentspanid:"-" +Éööˆš×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ìÕڜלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.055+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d52d6257-6327-4eaa-40e4-b854b40d18b2" response_time:0.003460423 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0f6a7c4a20b8fb8a" x_b3_spanid:"0f6a7c4a20b8fb8a" x_b3_parentspanid:"-" +©áÕڜלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ٟלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.199+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b9ce5176-fcee-49d4-568c-5b08ca8502ce" response_time:0.002698992 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f79a87a38d52f565" x_b3_spanid:"f79a87a38d52f565" x_b3_parentspanid:"-" +‘ϟלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”óלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.729+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15833" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf9036e4-0092-49c7-5487-8574caed1d4d" response_time:0.002566399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fcf344bf059a689" x_b3_spanid:"4fcf344bf059a689" x_b3_parentspanid:"-" +ñáלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï±õöž×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.643+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15713" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f429a6a6-7964-4695-4f11-af98bbd97200" response_time:0.011672423 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"483b8f00985a4555" x_b3_spanid:"483b8f00985a4555" x_b3_parentspanid:"-" +¦õöž×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û¦­¸Ÿ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.786+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16555" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dd819750-83ff-4aac-596e-801f62d4a2c0" response_time:0.004912273 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ee89208effed880b" x_b3_spanid:"ee89208effed880b" x_b3_parentspanid:"-" +‡™­¸Ÿ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®ŒÏÿŸ×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:19.939+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f334f913-9b88-4ff1-5f9d-bef2e7234552" response_time:0.002129244 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"60e185ab33a2019d" x_b3_spanid:"60e185ab33a2019d" x_b3_parentspanid:"-" +¶ÿÎÿŸ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý§‹„ ×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:19.945+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3b02bfbc-2981-41fc-6f6c-11785b80f278" response_time:0.005383476 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75d28c77936fda92" x_b3_spanid:"75d28c77936fda92" x_b3_parentspanid:"-" +Å™‹„ ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïÊРלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.942+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52600" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"72f18901-987a-4a85-5222-8a2e71eb6426" response_time:0.002504958 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0fb19f5212ac7e93" x_b3_spanid:"0fb19f5212ac7e93" x_b3_parentspanid:"-" +õ¼Ð ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í®˜ù ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.187+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"142bcae0-c6c9-4968-74b6-df7d3a74123d" response_time:0.009034529 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3a0f0a42e9728f43" x_b3_spanid:"3a0f0a42e9728f43" x_b3_parentspanid:"-" +¤˜ù ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ðêٜ̓ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.038+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26043" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75ab045f-bdc6-4284-7ab1-35b0049d4332" response_time:0.002020538 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"60a07f4b423a195e" x_b3_spanid:"60a07f4b423a195e" x_b3_parentspanid:"-" +¿äêٜ̓Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÓÔ¿„ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.276+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26057" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9add9d77-a964-4f46-5ee3-3abdd6d07fc4" response_time:0.002118516 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48083654b3150b7c" x_b3_spanid:"48083654b3150b7c" x_b3_parentspanid:"-" +¢»Ô¿„ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïØ¼Ä‡ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.089+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24213" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a35b306a-38d1-470b-6959-0805b5229aca" response_time:0.004777142 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36b7810f5f9c6f9c" x_b3_spanid:"36b7810f5f9c6f9c" x_b3_parentspanid:"-" +μćٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÜŠÖˆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.397+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26043" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"96af1a29-6066-4df8-7fa2-ea56fdd6bdbe" response_time:0.001920649 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bf7607dcc2c4009d" x_b3_spanid:"bf7607dcc2c4009d" x_b3_parentspanid:"-" +¢ÐŠÖˆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³Ó…‰ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:22.496+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"083dbd1e-e61f-4bf7-7b48-3daf1e675b60" response_time:0.00227731 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c579603a54e67534" x_b3_spanid:"c579603a54e67534" x_b3_parentspanid:"-" +Å…‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð³»—‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.535+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e63f85c4-081e-4f2c-5c59-f048bf0e89af" response_time:0.001500652 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4efdd2342fa2d9cf" x_b3_spanid:"4efdd2342fa2d9cf" x_b3_parentspanid:"-" +«©»—‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ç»éٜ̉ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.647+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df899cf4-791d-40e8-6307-682e8d839307" response_time:0.001701967 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8dc5046e94b08ff" x_b3_spanid:"b8dc5046e94b08ff" x_b3_parentspanid:"-" +ܰéٜ̉Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÛö¿ŠÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.888+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e27353a2-97dc-4f25-51d0-263b9d05150c" response_time:0.001561715 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ecef6ea79c415c15" x_b3_spanid:"ecef6ea79c415c15" x_b3_parentspanid:"-" +ÉÎö¿ŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í„ôÒŠÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.928+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2d92334-3d4b-4018-586b-00cce582add1" response_time:0.001544953 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"37fee2584e3e32e8" x_b3_spanid:"37fee2584e3e32e8" x_b3_parentspanid:"-" +ÄøóÒŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡õ¤˜‹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.073+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d614e98c-f6eb-4830-6a89-eac0c1d8bf2c" response_time:0.002021377 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"01715e51623fbe44" x_b3_spanid:"01715e51623fbe44" x_b3_parentspanid:"-" +Šé¤˜‹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ÖÔî‹ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.255+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26319" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"028c564f-9562-495c-771a-9fa28e835196" response_time:0.001492636 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dcd126304add735e" x_b3_spanid:"dcd126304add735e" x_b3_parentspanid:"-" +ùÊÔî‹ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ÃíðŒÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:23.528+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26319" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"81e17106-3ca1-4a9e-42af-6cb9bff708ee" response_time:0.00145775 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"064a78ca44b76bf9" x_b3_spanid:"064a78ca44b76bf9" x_b3_parentspanid:"-" +“¸íðŒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ“û®ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:23.658+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0289fc7c-4c69-4b46-4033-ef1ecedbe246" response_time:0.00161481 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1276953ceb631e60" x_b3_spanid:"1276953ceb631e60" x_b3_parentspanid:"-" +¼‡û®ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—²Ñ·ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.676+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ce5ae18-8ba9-4555-7731-96dc941d532d" response_time:0.001525696 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9a88a6874bea9e2b" x_b3_spanid:"9a88a6874bea9e2b" x_b3_parentspanid:"-" +¸£Ñ·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0é˜äÁŽÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:23.966+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b47fac0-0f33-45a2-4d81-9dedef5e4248" response_time:0.001689464 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a2cc37f2b3a7653e" x_b3_spanid:"a2cc37f2b3a7653e" x_b3_parentspanid:"-" +ÇŽäÁŽÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†˜¡µÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.207+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25439" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac8aa7e0-78a1-4219-45bd-00c7e0258dcf" response_time:0.001932919 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"28a02de4386244c4" x_b3_spanid:"28a02de4386244c4" x_b3_parentspanid:"-" +Å¡µÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éí£ÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.512+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f2b8e702-aa42-4148-63f5-47e737f92dfe" response_time:0.001499104 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ced43f30b45a7bc4" x_b3_spanid:"ced43f30b45a7bc4" x_b3_parentspanid:"-" +Àæ£ÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒº¾£‘ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"053d8875-712c-4263-448f-ab32461ff03f" response_time:0.007229168 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a2f6893120dd4a64" x_b3_spanid:"a2f6893120dd4a64" x_b3_parentspanid:"-" +‰¯¾£‘ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àÍìë‘ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:24.859+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab31e2da-3930-4a42-6dbb-8d1e7c16db35" response_time:0.00180581 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54a1d4858ed0755e" x_b3_spanid:"54a1d4858ed0755e" x_b3_parentspanid:"-" +›¿ìë‘ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼™¹——ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.283+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26057" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d3343460-3a99-4d79-67b4-2f9783c03d3d" response_time:0.011191554 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d59847d7237202a4" x_b3_spanid:"d59847d7237202a4" x_b3_parentspanid:"-" +Ì‘¹——ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝðÛ¹˜ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.633+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26319" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"972fb56a-17eb-4d03-68b3-808529236c7c" response_time:0.001886333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f3f1a1202e8c8a6b" x_b3_spanid:"f3f1a1202e8c8a6b" x_b3_parentspanid:"-" +ØÛÛ¹˜ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔŠ¥ý˜ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1a5d15ae-12cc-4865-6d8e-b343bedf7379" response_time:0.009672099 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef54db9e5636164d" x_b3_spanid:"ef54db9e5636164d" x_b3_parentspanid:"-" +œþ¤ý˜ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦È…”žÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.165+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26091" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0d909e1-217c-469e-65b0-26d36f82a788" response_time:0.001685454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"951afc83c514208e" x_b3_spanid:"951afc83c514208e" x_b3_parentspanid:"-" +ƒÁ…”žÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ ×ŸŸÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:28.456+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf669692-b8b0-4d09-6f10-bfcba9c06d3b" response_time:0.00282357 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59b29918aaec115e" x_b3_spanid:"59b29918aaec115e" x_b3_parentspanid:"-" +ΘןŸÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùÒ颟ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.457+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25439" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a6ec5417-d1bd-467a-5cb5-48cdff7ef569" response_time:0.008389241 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c9efee632e7f1e31" x_b3_spanid:"c9efee632e7f1e31" x_b3_parentspanid:"-" +¹Ê颟ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐÉÍú ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.911+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1368b9dd-eee0-4a0f-442e-9d4006206d63" response_time:0.007272921 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d18e24aa30b155a7" x_b3_spanid:"d18e24aa30b155a7" x_b3_parentspanid:"-" +á¾Íú ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òî·–¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.854+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26319" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e08bbb2a-6b91-405e-53a5-f5747ce442bc" response_time:0.001398315 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d48684d61d9b830b" x_b3_spanid:"d48684d61d9b830b" x_b3_parentspanid:"-" +ðã·–¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶š“²¨ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.912+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25923" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"964a90ec-d0de-491c-4458-92eb0bc91b1f" response_time:0.001567721 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae318f9ae7a55f85" x_b3_spanid:"ae318f9ae7a55f85" x_b3_parentspanid:"-" +À““²¨ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³¢Üí©ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.305+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26319" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7880f1aa-4fd5-4b05-4fa2-2c6331fc1631" response_time:0.002013869 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52f43a1edcdd1591" x_b3_spanid:"52f43a1edcdd1591" x_b3_parentspanid:"-" +ñšÜí©ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›Õ˜¹«ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.732+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17431" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b47592dd-d7c3-4a55-4cc1-2d1eea69928b" response_time:0.001632407 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5771e6f31ca67f4c" x_b3_spanid:"5771e6f31ca67f4c" x_b3_parentspanid:"-" +Ýʘ¹«ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Á·¼Ú«ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.801+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8591a469-0cb7-43a4-7550-828c964d606c" response_time:0.002395267 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b4c8ccf9fcd6f8ed" x_b3_spanid:"b4c8ccf9fcd6f8ed" x_b3_parentspanid:"-" +Ī¼Ú«ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºó´ä«ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.822+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"993a1dcf-766a-472f-6a8e-459d7834a65e" response_time:0.002328034 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f60cdbe73129daeb" x_b3_spanid:"f60cdbe73129daeb" x_b3_parentspanid:"-" +€ì´ä«ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0秊®¬ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.977+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"842c5f77-89f0-42bf-6341-7e0d7bfb6a7e" response_time:0.002312156 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec71c1cd515bcf19" x_b3_spanid:"ec71c1cd515bcf19" x_b3_parentspanid:"-" +ÿš•®¬ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“‘àŒ­ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.176+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52e44274-58c0-47a7-5a57-a53677ee025a" response_time:0.001981101 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e6aeedda86aa00e" x_b3_spanid:"5e6aeedda86aa00e" x_b3_parentspanid:"-" +²‰àŒ­ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãôç¯ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.748+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d133002-7a31-4089-7939-ccb9522095cc" response_time:0.002474415 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b302e968d7599e2" x_b3_spanid:"8b302e968d7599e2" x_b3_parentspanid:"-" +ªèç¯ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ…ÉȯٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.837+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25439" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4bce748-24a2-4779-6118-765ed6fdb3c6" response_time:0.002947575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc3507639021b500" x_b3_spanid:"fc3507639021b500" x_b3_parentspanid:"-" +•þÈȯٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡Àêü²ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.753+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26057" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7c353343-a50b-4781-697c-a9ae5c7b719d" response_time:0.001771832 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b911bab69db2879" x_b3_spanid:"0b911bab69db2879" x_b3_parentspanid:"-" +œ²êü²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Üýûÿ³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.028+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05a8811f-4019-4ef0-7451-dfeb1ef61a39" response_time:0.001730107 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b35a0e93d76557ae" x_b3_spanid:"b35a0e93d76557ae" x_b3_parentspanid:"-" +óûÿ³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ÉïǻٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.057+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"83784709-5921-4eca-503d-0c51914dcf01" response_time:0.002115816 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e01d27821b3c8261" x_b3_spanid:"e01d27821b3c8261" x_b3_parentspanid:"-" +ÂïǻٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œþÙÆéÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.403+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b90d9b24-b04a-46b7-4c19-9d74dad7b727" response_time:0.001909713 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd86de2f70ea18b4" x_b3_spanid:"dd86de2f70ea18b4" x_b3_parentspanid:"-" +Š÷ÙÆéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý¢ÏÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.084+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26565" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a766b7e-13f4-4c7f-71c8-f52a16caacba" response_time:0.001582608 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f77ae5d195afcf8" x_b3_spanid:"6f77ae5d195afcf8" x_b3_parentspanid:"-" +¤›ÏÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄìÔÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.621+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26057" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27528dfc-1c48-42f4-5a73-eb8b314d9dcd" response_time:0.001361362 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9779bd2fab5c75e2" x_b3_spanid:"9779bd2fab5c75e2" x_b3_parentspanid:"-" +¸åÔÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•¿·ÎÕÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:43.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26565" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ff642dcc-9331-43e9-5172-1911c481a29b" response_time:0.00235359 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d05aed8a84fb5831" x_b3_spanid:"d05aed8a84fb5831" x_b3_parentspanid:"-" +‰±·ÎÕÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚݉ãäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.118+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7651fb61-3a94-4cdb-69e2-6e25c80a54e9" response_time:0.004406128 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8741baf430eabf21" x_b3_spanid:"8741baf430eabf21" x_b3_parentspanid:"-" +ìщãäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ùº¶ë‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.192+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"93dde378-c4b3-40eb-62cf-e4c754ea2770" response_time:0.001549561 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e1ff78071599a871" x_b3_spanid:"e1ff78071599a871" x_b3_parentspanid:"-" +Û²¶ë‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½”˜´„ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.612+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ccb8e86c-88fe-4a97-43aa-9853fce09f74" response_time:0.001706298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b342c6a27d548738" x_b3_spanid:"b342c6a27d548738" x_b3_parentspanid:"-" +¼‰˜´„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò–•€†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.039+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d8652eb-4631-47f7-49f5-4f2749970d83" response_time:0.002951309 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e7d06d89ccb302aa" x_b3_spanid:"e7d06d89ccb302aa" x_b3_parentspanid:"-" +óþ”€†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ìœ„¼îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.723+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6fa2c900-a39c-409d-4c1c-67418b84710c" response_time:0.002449864 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7fdcae93e5b84e00" x_b3_spanid:"7fdcae93e5b84e00" x_b3_parentspanid:"-" +³’„¼îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€éàôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.240+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8efc54dd-c2ee-445a-7390-a6c67739711e" response_time:0.004935388 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0d59d9827d81621" x_b3_spanid:"a0d59d9827d81621" x_b3_parentspanid:"-" +°ÚàôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿Õ–ÏôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.374+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78abc7c9-aa34-477a-4408-13600c9c6670" response_time:0.001954038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d72c1d1207d8886" x_b3_spanid:"9d72c1d1207d8886" x_b3_parentspanid:"-" +²É–ÏôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0цïúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.052+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"faf79376-bab3-4149-6e6e-8f933b6efc3b" response_time:0.001363232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b08f4023cc0e3d5f" x_b3_spanid:"b08f4023cc0e3d5f" x_b3_parentspanid:"-" +Šˆ†ïúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰¡ýŒûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.114+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"455a4010-8d26-435a-7712-abf4696626ea" response_time:0.001874489 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29f28cde32b60cc1" x_b3_spanid:"29f28cde32b60cc1" x_b3_parentspanid:"-" +´”ýŒûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öóÏõûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.333+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a59989f5-e7e7-494e-50c1-60b059b941bb" response_time:0.002792571 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad446fc863ce0321" x_b3_spanid:"ad446fc863ce0321" x_b3_parentspanid:"-" +ðëÏõûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ѻ…þÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.903+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb3eaf20-c2c1-45cb-4fc0-d3f52132b0cc" response_time:0.001981617 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5750c204f10bcb37" x_b3_spanid:"5750c204f10bcb37" x_b3_parentspanid:"-" +½±…þÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ˆøÉþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.047+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bfffafbc-eed2-4758-5a18-aae80d08d9e3" response_time:0.002440498 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e7137d5c999821a7" x_b3_spanid:"e7137d5c999821a7" x_b3_parentspanid:"-" +èÿ÷ÉþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ã…¡‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.036+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d9360ab0-f0bc-4f06-6b18-5289073f7b98" response_time:0.001536254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e50f791e1c4ff459" x_b3_spanid:"e50f791e1c4ff459" x_b3_parentspanid:"-" +øØ…¡‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôÎÅÕ™ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:01.315+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0e7aed6-8ddd-4e78-7ae1-fd27521ac3bc" response_time:0.0057553 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e0b01bf8a8211be" x_b3_spanid:"6e0b01bf8a8211be" x_b3_parentspanid:"-" +µÂÅÕ™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ӜѥڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.292+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a64b0b5-b22e-4f62-5d3b-53c6f58cbea6" response_time:0.002137968 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b0337b448af610b3" x_b3_spanid:"b0337b448af610b3" x_b3_parentspanid:"-" +¯‘Ñ¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ܪڕ ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.065+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a60f067-cdba-4d6b-7bbe-1547d9dc5d17" response_time:0.001669143 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d368df6e67493feb" x_b3_spanid:"d368df6e67493feb" x_b3_parentspanid:"-" +Οڕ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0;Ÿç ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.233+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"22dad5a3-b0c3-4e19-432d-5c9214f72f52" response_time:0.004087618 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e5a49df95058c42" x_b3_spanid:"7e5a49df95058c42" x_b3_parentspanid:"-" +Ë´Ÿç ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁÔ½­¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.381+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc72e350-c163-4c2a-4c4a-ad42906ef41f" response_time:0.003836424 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d5caf21201faba2" x_b3_spanid:"1d5caf21201faba2" x_b3_parentspanid:"-" +ÿƽ­¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô´ó©¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.718+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b9e80896-ca5f-41b4-66c5-f87d6adf43a5" response_time:0.001683688 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44798575b1e2794b" x_b3_spanid:"44798575b1e2794b" x_b3_parentspanid:"-" +ƒ­ó©¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚Žá³¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.738+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22057" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"71b3d5df-d3d7-4d6d-51e2-dd6c2222650e" response_time:0.001875315 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb08c1dab8f32904" x_b3_spanid:"bb08c1dab8f32904" x_b3_parentspanid:"-" +‚€á³¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷™’§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.900+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee460258-ac47-48ba-4ea4-2c02202c7879" response_time:0.001802612 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ed376bac09643b0" x_b3_spanid:"0ed376bac09643b0" x_b3_parentspanid:"-" +Ü’§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»™Üÿ¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.897+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0ed7cf5c-d23f-44bb-5a6a-88bb0169e8f0" response_time:0.002071421 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e77245834ae8aab3" x_b3_spanid:"e77245834ae8aab3" x_b3_parentspanid:"-" +ë‘Üÿ¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È£ó¢ªÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.777+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"756cdd91-fd32-4569-764d-6133194c255b" response_time:0.00159868 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad865d6ebd5cba6c" x_b3_spanid:"ad865d6ebd5cba6c" x_b3_parentspanid:"-" +Á—ó¢ªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý®Ä®¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.338+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"170c976b-5e9c-4bd9-511d-d21ad65529e6" response_time:0.001318003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ceebf41caa3374d" x_b3_spanid:"1ceebf41caa3374d" x_b3_parentspanid:"-" +ޣĮ¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜÅ⦭ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.590+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb765b5d-9dcc-476a-47a0-d1a04923ccda" response_time:0.001546384 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"742b57daa64e0e8f" x_b3_spanid:"742b57daa64e0e8f" x_b3_parentspanid:"-" +û¹â¦­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´úÿÔ¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.224+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0c466f0-85a4-4cf4-5e00-a95124c64ba6" response_time:0.001865106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d17e0697d11d8e20" x_b3_spanid:"d17e0697d11d8e20" x_b3_parentspanid:"-" +–ïÿÔ¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û¸‚ç¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.262+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c561da1d-5366-452b-7b09-cd9f0aa20c5a" response_time:0.001369133 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c1b777789bf4f32" x_b3_spanid:"6c1b777789bf4f32" x_b3_parentspanid:"-" +¹®‚ç¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù¬ÿ£±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.658+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"854e3212-03e9-4b8a-6b5e-941c04e3edb8" response_time:0.001904551 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0b62f257ebd8713" x_b3_spanid:"d0b62f257ebd8713" x_b3_parentspanid:"-" +µ£ÿ£±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïýó©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.676+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b70e8c7b-d541-472c-5c70-43f52eab84fe" response_time:0.002066765 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ddde4043b7a416b9" x_b3_spanid:"ddde4043b7a416b9" x_b3_parentspanid:"-" +÷ó©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ°–äÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:03.362+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a67a0ec-50cf-4901-651b-7ca2f0ced403" response_time:0.002509911 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae8a95edd7281910" x_b3_spanid:"ae8a95edd7281910" x_b3_parentspanid:"-" +¡ú¯–äÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ׄþ÷åÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:03.834+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64985" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b24b7628-0f50-4891-6a62-0fe68b6f478b" response_time:0.003051201 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f17de6ecee5a1f68" x_b3_spanid:"f17de6ecee5a1f68" x_b3_parentspanid:"-" +Íòý÷åÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æ‚ýÊêÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:05.082+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"93fc1a98-84ba-4ace-713d-b09325156cfb" response_time:0.002803461 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d5e52c64e7345315" x_b3_spanid:"d5e52c64e7345315" x_b3_parentspanid:"-" +ûüÊêÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·éÄÅëÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:05.340+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:23843" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee5aeae4-71cd-4a82-5e39-8329be312a45" response_time:0.002663666 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"04eeffb98d249902" x_b3_spanid:"04eeffb98d249902" x_b3_parentspanid:"-" +ÛÚÄÅëÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È­“ìÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:05.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:23843" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dbc101f4-afd3-483c-5e78-a897508b852f" response_time:0.002990201 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2a9da12ae3fb677" x_b3_spanid:"e2a9da12ae3fb677" x_b3_parentspanid:"-" +‚ü¬“ìÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛïóÒíÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:05.902+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20879" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f8fa0e1a-5d7f-4708-57e3-6f64b4ca7de2" response_time:0.004236589 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f90ba2e90b20b2f3" x_b3_spanid:"f90ba2e90b20b2f3" x_b3_parentspanid:"-" +¡ãóÒíÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«éšâðÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:06.741+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20517" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38381f28-c4c9-48e1-7ee9-87a5025784f3" response_time:0.003725138 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd49334ad50bb036" x_b3_spanid:"bd49334ad50bb036" x_b3_parentspanid:"-" +êàšâðÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷þŸóÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:07.408+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20879" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8f2eba79-be2b-4eab-408c-243ebbf57c2a" response_time:0.00293919 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9fd49722eac6d71" x_b3_spanid:"a9fd49722eac6d71" x_b3_parentspanid:"-" +´üŸóÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢´š¹øÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:08.803+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20879" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"adcde3f8-1881-4dd5-6926-1047b5aa0aae" response_time:0.003331395 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd097a9b366eeee1" x_b3_spanid:"fd097a9b366eeee1" x_b3_parentspanid:"-" +ÇŸš¹øÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ä¶ã¢ûÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:09.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20879" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59349a0e-f9a5-41dc-7a02-dfb7b6a769c3" response_time:0.002891114 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8000e529c19a69e4" x_b3_spanid:"8000e529c19a69e4" x_b3_parentspanid:"-" +Чã¢ûÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦è³åºÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:09.692+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26310" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c902149-d884-4a3f-7776-b112dbeb3549" response_time:0.002902005 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d95a3cbdb5efe06a" x_b3_spanid:"d95a3cbdb5efe06a" x_b3_parentspanid:"-" +ëÚ³åºÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Â÷Žî¿ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:11.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29322" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc877abe-c44e-42fd-5a20-7a04494d4c06" response_time:0.004899303 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18eb5b77c87c75dd" x_b3_spanid:"18eb5b77c87c75dd" x_b3_parentspanid:"-" +•íŽî¿ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â÷ˆÐÂÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:11.795+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"81a82cc9-edd6-4b87-717c-22e5998bfd21" response_time:0.002372741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5a7ffea98e334f2" x_b3_spanid:"b5a7ffea98e334f2" x_b3_parentspanid:"-" +÷çˆÐÂÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”¼ÍäÄÓœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:13:12.361+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26310" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c2072ed-ef8b-4900-7f4d-0e1cc6921c46" response_time:0.0149703 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7f03d9d26989f65b" x_b3_spanid:"7f03d9d26989f65b" x_b3_parentspanid:"-" +‰³ÍäÄÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Æî…ËÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:14.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"da1f0706-f3da-4a94-7727-6a850bb681b1" response_time:0.004607343 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5478fd9e8fc94f7b" x_b3_spanid:"5478fd9e8fc94f7b" x_b3_parentspanid:"-" +Ǻî…ËÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿô„·ÎÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:14.963+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31494" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f4bfd03-34e8-4b9b-5b77-6adde6c071a8" response_time:0.003083744 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"353e10fe2232c55d" x_b3_spanid:"353e10fe2232c55d" x_b3_parentspanid:"-" +óæ„·ÎÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÎÇÒÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:16.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34acbb27-5cf1-4674-6acd-9277ded1850f" response_time:0.005022571 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06c24a0ce1e5ffe0" x_b3_spanid:"06c24a0ce1e5ffe0" x_b3_parentspanid:"-" +­úÍÇÒÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÖÛ§ØÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:17.616+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29322" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6c68115-4878-45ec-4125-9ea5d7bd42ec" response_time:0.002657793 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7827bf52509f4489" x_b3_spanid:"7827bf52509f4489" x_b3_parentspanid:"-" +²ÏÛ§ØÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àŽÆ‹ÛÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:18.356+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26310" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b94f4ea0-2531-41af-6fef-b32d605d4aa8" response_time:0.008195869 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69a3b7cdb4f4090b" x_b3_spanid:"69a3b7cdb4f4090b" x_b3_parentspanid:"-" +¢…Æ‹ÛÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Žâ‡àÝÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:19.069+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29966" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e355347-7fd2-4f63-7dc2-b026de746347" response_time:0.009197164 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a462c2d3671ff5ec" x_b3_spanid:"a462c2d3671ff5ec" x_b3_parentspanid:"-" +”ׇàÝÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°çªÔÞÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:19.319+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29872" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2616dd10-b284-4f2f-7aa3-d66ab7b00ced" response_time:0.003691109 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8d20737e60a959f6" x_b3_spanid:"8d20737e60a959f6" x_b3_parentspanid:"-" +ïÚªÔÞÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼ðØÕßÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:19.588+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26524" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2aea6704-a427-4d87-7842-b88f7f5fca94" response_time:0.006215401 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e3fb4deabd43218e" x_b3_spanid:"e3fb4deabd43218e" x_b3_parentspanid:"-" +íæØÕßÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾³‹ŠâÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:20.238+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29922" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51ecceb4-a529-4fba-47ad-7cc61f5a3d1f" response_time:0.002826471 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"43f8d34175627151" x_b3_spanid:"43f8d34175627151" x_b3_parentspanid:"-" +­©‹ŠâÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ϼû»ÐÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:49.867+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0c263bc5-5a59-4456-43ba-1d7506063a42" response_time:0.005759489 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9c1b19795ecae32" x_b3_spanid:"a9c1b19795ecae32" x_b3_parentspanid:"-" +úµû»ÐÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êãÑÚÐÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:49.932+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f871e3a8-fe32-4d61-775f-eb9b3d40da87" response_time:0.005138443 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"369e597f671362f3" x_b3_spanid:"369e597f671362f3" x_b3_parentspanid:"-" +’ÝÑÚÐÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™´€ÿÐÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:50.011+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17452" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"26458f5d-0ae0-435e-40d5-4100891e0451" response_time:0.002558415 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b988f3d1c13990c" x_b3_spanid:"2b988f3d1c13990c" x_b3_parentspanid:"-" +­¬€ÿÐÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—þ¶øÑÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:50.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"271cd55e-c184-4074-5906-ef055e71d719" response_time:0.005649198 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d3aea2343f1d72c4" x_b3_spanid:"d3aea2343f1d72c4" x_b3_parentspanid:"-" +šò¶øÑÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º¼ˆôÓÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:50.792+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19168" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08b533a7-c91d-43cf-4ce3-041fa40900f4" response_time:0.004125891 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd7b1dfc817d15ab" x_b3_spanid:"bd7b1dfc817d15ab" x_b3_parentspanid:"-" +ﱈôÓÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßïòËÔÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:50.974+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17060" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b0627eb-ef6d-44c5-535f-4a67fe07d904" response_time:0.005848489 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39cd33cea363410e" x_b3_spanid:"39cd33cea363410e" x_b3_parentspanid:"-" +•èòËÔÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÙ²´ÕÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:51.193+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21048" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"68ec0482-a577-42d3-479b-c3acd40ce78d" response_time:0.005954314 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7243d4de1baf656c" x_b3_spanid:"7243d4de1baf656c" x_b3_parentspanid:"-" +£Ë²´ÕÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ¬áÎ×ÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:51.787+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"efe02cf4-615e-4c7f-7465-4bc3d7b38cf5" response_time:0.004171307 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f955af1e4b3c2c7" x_b3_spanid:"4f955af1e4b3c2c7" x_b3_parentspanid:"-" +ÏòàÎ×ÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â–͵ÜÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:53.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21048" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e9ccc42-2bac-42ad-659c-8b26615c8faa" response_time:0.002646128 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7d5299035de86e4" x_b3_spanid:"c7d5299035de86e4" x_b3_parentspanid:"-" +ºŠÍµÜÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×€†ùßÔœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:54.025+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20652" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8db413c6-1c71-49e4-7632-f383855bac45" response_time:0.00293026 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18223a2866e9084a" x_b3_spanid:"18223a2866e9084a" x_b3_parentspanid:"-" +‚ò…ùßÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù‘š°àÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:54.140+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"feeab595-356e-4cc9-5f79-75a58a413336" response_time:0.003302763 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a135b53ed7e76e22" x_b3_spanid:"a135b53ed7e76e22" x_b3_parentspanid:"-" +Œ‡™°àÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºÏš¹áÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:54.428+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20652" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12637268-ffcb-4ee3-52c0-bcb6ca447d42" response_time:0.002732824 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a1bb511d233ee93" x_b3_spanid:"7a1bb511d233ee93" x_b3_parentspanid:"-" +¥Äš¹áÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×µÁóæÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:55.893+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13a95ed0-bab7-4183-5a14-b40aee1492e8" response_time:0.002141877 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b81e2f632e885447" x_b3_spanid:"b81e2f632e885447" x_b3_parentspanid:"-" +‚¯ÁóæÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹¾òÎçÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:56.084+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20652" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"448f3775-3304-4444-54c7-52935206e808" response_time:0.002902455 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"46e1b924ef8af646" x_b3_spanid:"46e1b924ef8af646" x_b3_parentspanid:"-" +سòÎçÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ’¬èÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:56.279+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"79b2642a-4a2f-4a5e-52f1-0f78146342ee" response_time:0.003097305 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"619752c52d1ae45b" x_b3_spanid:"619752c52d1ae45b" x_b3_parentspanid:"-" + ‹¬èÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÙÚ—¢îÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:57.869+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf45c100-546f-4956-7dfa-f6bd98cd9b93" response_time:0.002654377 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf072d54bef2ab34" x_b3_spanid:"cf072d54bef2ab34" x_b3_parentspanid:"-" +ÅÓ—¢îÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§ÍŸÊïÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:58.221+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21048" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1574d671-ec68-4a42-5fb6-83b01c11a515" response_time:0.003462172 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fede45811166c6d8" x_b3_spanid:"fede45811166c6d8" x_b3_parentspanid:"-" +ºÅŸÊïÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²‚€âðÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:58.540+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21520" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"99e3e802-0b79-4d8b-7925-43e897e37aac" response_time:0.002504515 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"151d5942a47c3fbd" x_b3_spanid:"151d5942a47c3fbd" x_b3_parentspanid:"-" +ÙúÿáðÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úÄÁòÔœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:59.009+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21048" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54f57a18-29e2-4e0c-5acf-dd9e8b4e7201" response_time:0.00281161 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"920328030e762b87" x_b3_spanid:"920328030e762b87" x_b3_parentspanid:"-" +©‘ÄÁòÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0覊ª÷ÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:00.299+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b866e48a-0d11-4593-7a0c-01c62e82a320" response_time:0.005857091 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d73b64c5ee8e338" x_b3_spanid:"2d73b64c5ee8e338" x_b3_parentspanid:"-" +ØŸŠª÷ÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼ðèÁúÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:01.153+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"feccbb1f-4258-4fad-4fad-b0630f762f7b" response_time:0.007066893 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd0099399150a5d5" x_b3_spanid:"dd0099399150a5d5" x_b3_parentspanid:"-" +ÝèÁúÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·ñ¿ðúÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:01.247+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17060" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3cbc7ae8-73a3-41a4-4c32-3748423415ef" response_time:0.010244479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1cc541750a52e23" x_b3_spanid:"a1cc541750a52e23" x_b3_parentspanid:"-" +šç¿ðúÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ûá´ÿÔœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:02.469+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17060" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1149958-40d0-45a7-6ecb-8cc7daf1ef72" response_time:0.00398242 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"74e2a8d09e9afe3c" x_b3_spanid:"74e2a8d09e9afe3c" x_b3_parentspanid:"-" +­Õ´ÿÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·¸¨’ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:02.936+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8c5178ba-73e6-477c-5f66-f404c239e42e" response_time:0.002942629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7f8001c9e19e441" x_b3_spanid:"c7f8001c9e19e441" x_b3_parentspanid:"-" +檨’ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“µÛ¯ƒÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:03.533+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a82ebaec-cc5c-44d3-63d6-d527fd0a9ead" response_time:0.004715158 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38aa4d8c24bc3958" x_b3_spanid:"38aa4d8c24bc3958" x_b3_parentspanid:"-" +ϩۯƒÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›¹ññ…ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:04.210+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21410" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3f83bbde-adec-428c-7d43-1cd52c686683" response_time:0.003133902 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8085cc2b70ec609" x_b3_spanid:"b8085cc2b70ec609" x_b3_parentspanid:"-" +ç±ññ…ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úŽôƉ՜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:05.193+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2cbb6098-1933-4ce2-5ee0-2fb64850b83d" response_time:0.004098752 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b66ecba4d820900a" x_b3_spanid:"b66ecba4d820900a" x_b3_parentspanid:"-" +ψôƉ՜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§¾úÆŽÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:06.537+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6bb1d49-30b4-4c2d-731d-5db67276762c" response_time:0.002544259 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef449940c84d6dc3" x_b3_spanid:"ef449940c84d6dc3" x_b3_parentspanid:"-" +µúÆŽÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´¿®†ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:06.669+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63a4d305-39b4-4a12-7013-7edfb7dac2cd" response_time:0.002823005 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"edf67e9f838f1214" x_b3_spanid:"edf67e9f838f1214" x_b3_parentspanid:"-" +δ®†ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ó‚ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:06.690+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"22991c02-2550-405a-626e-67f9c57e113a" response_time:0.002641549 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4d8e67aa3e6671f" x_b3_spanid:"d4d8e67aa3e6671f" x_b3_parentspanid:"-" +¼ë‚ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›÷ö¶ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:06.770+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d84a61f-8094-43d1-5923-4bcc124bc1d4" response_time:0.003266883 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c41e2904220f385d" x_b3_spanid:"c41e2904220f385d" x_b3_parentspanid:"-" +Îëö¶ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çØâêÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:06.880+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17170" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77d64dce-de7f-45ad-5def-0463c606acf4" response_time:0.003021054 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"173aa9755dda4713" x_b3_spanid:"173aa9755dda4713" x_b3_parentspanid:"-" +ÄÑâêÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÒ’ƒÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:06.926+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b55fa5b4-7c07-4b3c-76bb-9a3cd49793e1" response_time:0.007401884 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"57465b03562948cb" x_b3_spanid:"57465b03562948cb" x_b3_parentspanid:"-" +©Ê’ƒÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§Â¤¦’ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:07.542+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a1f25401-0a5b-4a97-4fab-6620a5c58f6e" response_time:0.002693929 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9667628f14697428" x_b3_spanid:"9667628f14697428" x_b3_parentspanid:"-" +⺤¦’ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤¹Šõ“ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:07.976+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91e27335-86fb-4ced-4c12-5fcfbf68308c" response_time:0.002381849 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"25273c7447aab727" x_b3_spanid:"25273c7447aab727" x_b3_parentspanid:"-" +ý±Šõ“ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íæòè”ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:08.219+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17170" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5a6db32-a669-48df-7f44-4088e2d74e0e" response_time:0.002220696 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dbc066fcdeee7fd7" x_b3_spanid:"dbc066fcdeee7fd7" x_b3_parentspanid:"-" + Ùòè”ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…¸õ³–ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:08.644+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f307b18b-9c0a-4776-7add-d5d7074510f9" response_time:0.002582337 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9c6c14d93c3669d4" x_b3_spanid:"9c6c14d93c3669d4" x_b3_parentspanid:"-" +αõ³–ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù‚Ùâ—ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:09.010+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19168" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0dd140f-986e-40cb-43c7-83118e18ee8e" response_time:0.002835479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bf4a3db624fd0765" x_b3_spanid:"bf4a3db624fd0765" x_b3_parentspanid:"-" +¤ùØâ—ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸²¥Ž˜ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:09.102+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"325a8188-8330-4b06-5e5d-4127d68d08db" response_time:0.00308986 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0772e97fbb5e029f" x_b3_spanid:"0772e97fbb5e029f" x_b3_parentspanid:"-" +¼ª¥Ž˜ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù¿Úߘ՜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:09.272+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e2fe380-971c-440c-7179-c4c23c461493" response_time:0.003443279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"46235fba1b7bd9b5" x_b3_spanid:"46235fba1b7bd9b5" x_b3_parentspanid:"-" +¦²Úߘ՜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëÆ¡Ë™ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:09.498+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abf1aa60-077d-4fb1-4b32-b25c0e834468" response_time:0.002873553 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79db6f4e4999739b" x_b3_spanid:"79db6f4e4999739b" x_b3_parentspanid:"-" +︡˙՜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃÈÁÓÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:40.654+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5390" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b0e85559-29a1-4083-70b9-2041e8962a06" response_time:0.002513299 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d1c27dbd28295bca" x_b3_spanid:"d1c27dbd28295bca" x_b3_parentspanid:"-" +ªºÁÓÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0צⲎלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:15.213+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d2488391-0cd2-4104-6599-15dd7ccfba0c" response_time:0.003627155 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4aab5d5b1358b2b6" x_b3_spanid:"4aab5d5b1358b2b6" x_b3_parentspanid:"-" +™â²Ž×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þ™’ŒלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.322+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"171030f0-4eba-44f7-655a-989246b0af2e" response_time:0.006549705 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7ba1e23bda345284" x_b3_spanid:"7ba1e23bda345284" x_b3_parentspanid:"-" +ĉ’ŒלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÏ耕לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:16.988+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"29f274d2-9df2-460e-7481-91e6cc5dbf35" response_time:0.003039801 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8e57f3bfdbdb9f5" x_b3_spanid:"b8e57f3bfdbdb9f5" x_b3_parentspanid:"-" +ÌÃ耕לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀÈ໕לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:17.110+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1044" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20e7c7e0-fad1-49ef-4b37-ebceec482f32" response_time:0.004247365 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1613991538c7ed91" x_b3_spanid:"1613991538c7ed91" x_b3_parentspanid:"-" +­Á໕לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€†¤ÿ•לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.253+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b74545d-59fb-4148-5f8c-253dd0aca340" response_time:0.002956263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4380925c4c19ec45" x_b3_spanid:"4380925c4c19ec45" x_b3_parentspanid:"-" +¯þ£ÿ•לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·Æ¡Í™×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.209+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"808dff73-b7e0-4df6-7eba-2fb9807c54f5" response_time:0.014880987 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d9be98a240af47f" x_b3_spanid:"2d9be98a240af47f" x_b3_parentspanid:"-" +´±¡Í™×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÂþž×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:19.462+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1600" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65f0329b-f291-4bbc-6b3f-0570ece7ad49" response_time:0.005899684 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c243193ee227e1b" x_b3_spanid:"5c243193ee227e1b" x_b3_parentspanid:"-" +û®þž×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂÓޠלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:20.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3598" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"98882255-84dc-4db2-4f73-411ae9dd652c" response_time:0.003616017 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79e7765f9406871f" x_b3_spanid:"79e7765f9406871f" x_b3_parentspanid:"-" +«’ÓޠלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ìÍš£×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.798+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a78f2b6f-a48a-4f4e-636e-5f15db8aaccd" response_time:0.004376395 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00ac7d807d2663f6" x_b3_spanid:"00ac7d807d2663f6" x_b3_parentspanid:"-" +éÛÍš£×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äúΧ£×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.828+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10f58fc4-5419-427c-69f5-f18712e15812" response_time:0.002256299 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"794aecddc182a9d7" x_b3_spanid:"794aecddc182a9d7" x_b3_parentspanid:"-" +âíΧ£×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ëýۦלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:21.742+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4098" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b7804335-7457-4d8a-4d70-6dd85f2ab6fb" response_time:0.003460203 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a407c6a5cd6df3c" x_b3_spanid:"0a407c6a5cd6df3c" x_b3_parentspanid:"-" +­ÝýۦלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú貘¨×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:22.136+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3242" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"85d532ed-abe8-4e52-4dae-205587a5d5a7" response_time:0.004437909 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0a51fea8ae6de53" x_b3_spanid:"c0a51fea8ae6de53" x_b3_parentspanid:"-" +Œ‚²˜¨×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§Û‰¹éÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:48.374+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75520204-8e43-448e-6717-269c0e04c95e" response_time:0.00252373 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb7143c2cba9b60e" x_b3_spanid:"eb7143c2cba9b60e" x_b3_parentspanid:"-" +óÒ‰¹éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï‚§‚úÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.823+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52f9bca2-8ae4-408a-5f44-ad3c482063e9" response_time:0.002377876 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"902546e3061e2fef" x_b3_spanid:"902546e3061e2fef" x_b3_parentspanid:"-" +Òú¦‚úÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚ÎŽ·úÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.933+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5b1b0db1-454c-4b94-6767-67ae3226424b" response_time:0.002646615 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d28e84dfbc0d1ee" x_b3_spanid:"6d28e84dfbc0d1ee" x_b3_parentspanid:"-" +‘ÆŽ·úÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒØ††ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.051+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a64ed79-6247-44e6-5b2f-97d05e555dc1" response_time:0.004273613 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0f9490937098df19" x_b3_spanid:"0f9490937098df19" x_b3_parentspanid:"-" +ù׆†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸„Ìš‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.901+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6bd20a69-168a-4414-5e29-ad24e50c2f77" response_time:0.002098559 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa3173d6525eeda4" x_b3_spanid:"fa3173d6525eeda4" x_b3_parentspanid:"-" +‡øËš‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁÌÿ¹‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.966+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"223519ac-7cae-499f-6465-47bf36fd303c" response_time:0.002279292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"03f11a266c8dbfd7" x_b3_spanid:"03f11a266c8dbfd7" x_b3_parentspanid:"-" +¢Âÿ¹‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ¹­ÍŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.275+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dfe1c773-5e65-47f2-40ea-a8bd614d5125" response_time:0.002218225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4cc4784043307ad0" x_b3_spanid:"4cc4784043307ad0" x_b3_parentspanid:"-" +Õ±­ÍŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æèÈŋڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.527+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d0a9cd2-f80a-48de-5551-9f5b7ef9b03c" response_time:0.002442354 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"321f4664fda0be13" x_b3_spanid:"321f4664fda0be13" x_b3_parentspanid:"-" +ôÜÈŋڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎÃєڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.964+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15bad91f-729f-4e14-6f96-c0b15a565dd2" response_time:0.005011483 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"977cceba0e6859b8" x_b3_spanid:"977cceba0e6859b8" x_b3_parentspanid:"-" +ǷєڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³Íàá”ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.999+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"058fc6d5-b3d5-4b97-7d53-73d1cad14ef2" response_time:0.005610523 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"232268576eabd33d" x_b3_spanid:"232268576eabd33d" x_b3_parentspanid:"-" +ÿ¿àá”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0è‹÷§˜ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.954+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5182daed-7411-47e8-68af-205d4eb5ab5d" response_time:0.002823946 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"092fc872fc436c71" x_b3_spanid:"092fc872fc436c71" x_b3_parentspanid:"-" +¼üö§˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÙä¶šÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.522+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f163cea-6e71-4457-4c2f-ac79f3744078" response_time:0.002832131 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88a824c5029bfb79" x_b3_spanid:"88a824c5029bfb79" x_b3_parentspanid:"-" +–Íä¶šÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·Íí½›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.804+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"68ccb7dc-f699-4b1d-5537-026ef82967dc" response_time:0.003900396 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb7888da9f2f89d2" x_b3_spanid:"eb7888da9f2f89d2" x_b3_parentspanid:"-" +Ô¿í½›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³×Ðü›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.934+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"edab9255-7d93-41db-4af9-1c0c03c975cf" response_time:0.005910678 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88894a43dac1950e" x_b3_spanid:"88894a43dac1950e" x_b3_parentspanid:"-" +¬ÍÐü›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýêä÷ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.459+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ae8067b7-eba4-4ef2-43f9-d10fb7e14c7d" response_time:0.00733751 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1172397603e24ad6" x_b3_spanid:"1172397603e24ad6" x_b3_parentspanid:"-" +ÍÝä÷ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûæÔüÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.473+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b127045-b651-4f74-717c-14763ea16e6e" response_time:0.003765576 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79b61a298acbbe27" x_b3_spanid:"79b61a298acbbe27" x_b3_parentspanid:"-" +‡ßÔüÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿”´žÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.590+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"94b38a42-86aa-430f-73e3-e0099cec68f3" response_time:0.002799741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce93865bf3399173" x_b3_spanid:"ce93865bf3399173" x_b3_parentspanid:"-" +ÙŒ´žÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÉ…± ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.121+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8104a58-928a-4d54-6918-0f38abdec17e" response_time:0.00234263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"33e1896f888e707f" x_b3_spanid:"33e1896f888e707f" x_b3_parentspanid:"-" +×½…± ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú䨤¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.362+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38ee4084-c3e7-4b2d-4d1f-dd9e68941001" response_time:0.003172686 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4a7be4250c01ed5" x_b3_spanid:"f4a7be4250c01ed5" x_b3_parentspanid:"-" +ŸÒ¨¤¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥…Ç«¥ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.452+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"742fad67-83af-4e97-69c3-d7d449aa0372" response_time:0.00235044 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb5c74eddeeb6c88" x_b3_spanid:"eb5c74eddeeb6c88" x_b3_parentspanid:"-" +öÆ«¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿Î•¿«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.104+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aac471a7-4d2b-4a28-7cd5-140ee9af7b82" response_time:0.002359564 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8dadec2a0fc11488" x_b3_spanid:"8dadec2a0fc11488" x_b3_parentspanid:"-" +ëÅ•¿«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ã¡²­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.613+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f0e018dc-bab3-4b76-6611-19c432ceb4ee" response_time:0.002944888 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cad28b62ae4478bf" x_b3_spanid:"cad28b62ae4478bf" x_b3_parentspanid:"-" +œ×¡²­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ÏÙ±ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.718+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"327c9677-cd3c-4b0c-7335-c97401cad1cc" response_time:0.006408348 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eda607b7b252e408" x_b3_spanid:"eda607b7b252e408" x_b3_parentspanid:"-" +ªÂÙ±ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô¸¹›×ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:43.481+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0c9ae9af-9af6-4dca-6a4d-dd5828177cb0" response_time:0.00200899 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6c9b84702778d82" x_b3_spanid:"a6c9b84702778d82" x_b3_parentspanid:"-" +­ª¹›×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Öº«µ×ÙœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:16:43.535+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bb5102e7-d269-4658-697c-bb61faadcc62" response_time:0.001658 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c49a8e6decfea76" x_b3_spanid:"5c49a8e6decfea76" x_b3_parentspanid:"-" +ů«µ×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Òòͺ×ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.546+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4cc35d6b-fbb1-44e6-7ffd-f1726d62ed81" response_time:0.001922431 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de8d24862e3d31d6" x_b3_spanid:"de8d24862e3d31d6" x_b3_parentspanid:"-" +€î̺×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“£¨â×ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.630+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3614d40-a827-4463-5425-2e5fabb34d07" response_time:0.001368682 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"322a91841d3ceb57" x_b3_spanid:"322a91841d3ceb57" x_b3_parentspanid:"-" +­•¨â×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ±ýþ×ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.689+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc18dd18-c934-4452-470d-d63251d91b95" response_time:0.001837898 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c6f9b3251d49f3c" x_b3_spanid:"8c6f9b3251d49f3c" x_b3_parentspanid:"-" +Ô¦ýþ×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òôË«ØÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.783+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a37252b-193d-489a-6202-cfb66585fe15" response_time:0.001723201 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"23dafd7c051974f2" x_b3_spanid:"23dafd7c051974f2" x_b3_parentspanid:"-" +äË«ØÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0««ÛØØÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.876+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"744034d5-0dc4-47e8-7150-847e66727255" response_time:0.003343089 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad1c3d9209bab332" x_b3_spanid:"ad1c3d9209bab332" x_b3_parentspanid:"-" +›ŽÛØØÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ§³¦ÙÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:44.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"30e567e9-3e8b-4fda-430b-9e4490e065d2" response_time:0.00152825 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"206da1abece20757" x_b3_spanid:"206da1abece20757" x_b3_parentspanid:"-" +¹›³¦ÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÿضÙÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:44.075+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db0315fe-589e-41c7-6893-019da1acc5fb" response_time:0.001798251 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"897b8cf98dddbf98" x_b3_spanid:"897b8cf98dddbf98" x_b3_parentspanid:"-" +™öضÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€´÷ÛÙÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:44.153+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34aa64f0-1410-4027-6763-8dc74b7f7ab2" response_time:0.001612552 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d1bf622cd969afa" x_b3_spanid:"9d1bf622cd969afa" x_b3_parentspanid:"-" +Œª÷ÛÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ…ÉÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"800aae81-541b-412a-6fa2-56a47d62f272" response_time:0.001851437 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"73e78216817aa92d" x_b3_spanid:"73e78216817aa92d" x_b3_parentspanid:"-" +ÓùÉÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×Öâ·ÛÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:44.614+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19254430-22ab-4aea-5945-a4f5052a9e60" response_time:0.001804662 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6455c37ede6a5f47" x_b3_spanid:"6455c37ede6a5f47" x_b3_parentspanid:"-" +ÀÎâ·ÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ÜÿÅÛÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:44.644+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"81f13d58-2fb2-484b-58dc-0c45678f4e8b" response_time:0.00174777 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1898cfa43e1bd9e" x_b3_spanid:"b1898cfa43e1bd9e" x_b3_parentspanid:"-" +ÍÔÿÅÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹§Ò‹ÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.779+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d8866270-7824-43e5-4135-3cb8f80a11d3" response_time:0.012561587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18c3556085b69216" x_b3_spanid:"18c3556085b69216" x_b3_parentspanid:"-" +â™Ò‹ÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ƀ©ûÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.024+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13de8a88-c126-4f24-51d3-d39b7ba39ea1" response_time:0.002162809 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06cdab21c607abc9" x_b3_spanid:"06cdab21c607abc9" x_b3_parentspanid:"-" +Øö¨ûÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ЧåŠÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8fd2d10f-6dcc-4aab-76f1-d25b59d10f01" response_time:0.005360016 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc19636f108acaaa" x_b3_spanid:"dc19636f108acaaa" x_b3_parentspanid:"-" +¶žåŠÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²Þ±çÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.249+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6fa8d130-2f82-4cc6-5ac5-5df2c4d123e4" response_time:0.003636396 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cfc3a8403846ea3d" x_b3_spanid:"cfc3a8403846ea3d" x_b3_parentspanid:"-" +“ѱçÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š ßƒÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad372424-5243-471c-45b9-0f6245f791ae" response_time:0.002182824 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7b8f791a459df605" x_b3_spanid:"7b8f791a459df605" x_b3_parentspanid:"-" +â“߃ÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ÖñäÞÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:45.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c767fc17-afcf-4152-6a43-c9c4ebd3b431" response_time:0.002342737 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8397d5d694a06bc" x_b3_spanid:"a8397d5d694a06bc" x_b3_parentspanid:"-" +°ÊñäÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ºÆÿÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.569+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6692478-7475-4110-7434-1e7b8f5d2e8b" response_time:0.002132959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cac8ae17dce85790" x_b3_spanid:"cac8ae17dce85790" x_b3_parentspanid:"-" +̯ÆÿÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ­¥‰ßÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.590+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7981b086-92df-47a3-736e-3095c108a7a9" response_time:0.002109073 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4d8d6b7fc88399a" x_b3_spanid:"e4d8d6b7fc88399a" x_b3_parentspanid:"-" +Þ£¥‰ßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐáçŠãÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:46.667+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a16c9429-66df-48bf-6432-3f59cec101fd" response_time:0.001963112 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5bc10ad364a33955" x_b3_spanid:"5bc10ad364a33955" x_b3_parentspanid:"-" +¡•çŠãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÓŒˆãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.661+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e87494e-68cc-4e5a-6cad-582215f50a41" response_time:0.002121021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0c30822ee62150af" x_b3_spanid:"0c30822ee62150af" x_b3_parentspanid:"-" +€ÌŒˆãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üåôããÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.852+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80117955-3c08-4865-63da-337c167ef637" response_time:0.003288164 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7c4576b72606c93" x_b3_spanid:"c7c4576b72606c93" x_b3_parentspanid:"-" +¡ÜôããÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËäéâäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.118+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4a4b5a8-3ec8-4881-70d4-885f8a36f505" response_time:0.004268588 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"818e4223208e022f" x_b3_spanid:"818e4223208e022f" x_b3_parentspanid:"-" +‹ÞéâäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ÉÌêäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.130+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"99e70653-5f4b-4837-559c-56ad43bc3a49" response_time:0.008505977 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"62e73f6fe9d0bb64" x_b3_spanid:"62e73f6fe9d0bb64" x_b3_parentspanid:"-" +ï¾ÌêäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âõßèäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.131+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"602d9339-49a1-4c06-6cf7-6c139088ba4e" response_time:0.003753665 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ea5453f62bf5529" x_b3_spanid:"2ea5453f62bf5529" x_b3_parentspanid:"-" +˜èßèäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚¬Ô æÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.518+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1425038d-c4ce-4671-7c58-b14a28dbce13" response_time:0.001990828 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7dd14dea047b9ad" x_b3_spanid:"c7dd14dea047b9ad" x_b3_parentspanid:"-" +À Ô æÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±±¢½æÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.577+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"629ae50b-e824-41d1-729a-9205b8815a80" response_time:0.002923563 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b73e8892b10bc98" x_b3_spanid:"8b73e8892b10bc98" x_b3_parentspanid:"-" + ¢½æÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø ÈºæÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.572+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1338c3fe-1651-478b-7af3-946741ad5283" response_time:0.002212916 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"708b0b307ec3a6db" x_b3_spanid:"708b0b307ec3a6db" x_b3_parentspanid:"-" +ʖȺæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½çšÑçÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.886+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db7d5378-7c12-42f9-4cc7-81bb52ff1ad0" response_time:0.004109137 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c3e052cc9977b190" x_b3_spanid:"c3e052cc9977b190" x_b3_parentspanid:"-" +ÓÚšÑçÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßÕèÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:47.988+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"348bc2de-1a02-4e46-64c8-b1df169c2eb6" response_time:0.00410584 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd5e1a04efc09b6f" x_b3_spanid:"bd5e1a04efc09b6f" x_b3_parentspanid:"-" +ÕÒèÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æêâ“èÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.026+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"76751013-eaa1-45bd-6b4a-120e689ec7f1" response_time:0.003575265 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c600b07c0c18a1d8" x_b3_spanid:"c600b07c0c18a1d8" x_b3_parentspanid:"-" +öÞâ“èÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï¬êºèÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.104+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e5049cc4-ca47-4197-4253-d7f65ad08eff" response_time:0.008110787 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"363d5ba6cb23a901" x_b3_spanid:"363d5ba6cb23a901" x_b3_parentspanid:"-" +è•êºèÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û˜ÛùéÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.510+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4d6fa064-5a88-40f7-7e43-6f0e3466bb26" response_time:0.002663392 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e28587cc73611f0f" x_b3_spanid:"e28587cc73611f0f" x_b3_parentspanid:"-" +Å‹ÛùéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šê…¤êÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.598+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"433f54b6-fe0d-46b2-60f0-e6d96cb4a8ee" response_time:0.002945042 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9c8d7cd7d1c8ae22" x_b3_spanid:"9c8d7cd7d1c8ae22" x_b3_parentspanid:"-" +îá…¤êÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ü–›ÙêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.710+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fbfba698-e175-4164-5b9c-97bb1cb997bb" response_time:0.002558319 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7667263a5309abc7" x_b3_spanid:"7667263a5309abc7" x_b3_parentspanid:"-" +Õ‹›ÙêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Úã“ÏÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.316+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7671149-2d15-40e5-768c-8c441cd080e5" response_time:0.002546176 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e318d23ae9e79b0" x_b3_spanid:"3e318d23ae9e79b0" x_b3_parentspanid:"-" +ØÒã“ÏÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„êÓ®ÐÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.642+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d5971a7-993b-4071-6a99-c9265aa026fc" response_time:0.002331263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e746bdf13fea900a" x_b3_spanid:"e746bdf13fea900a" x_b3_parentspanid:"-" +êÝÓ®ÐÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆþηîÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.714+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12edb217-8ffc-488b-6be1-eacd54065bf0" response_time:0.001925179 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c071e38a48139941" x_b3_spanid:"c071e38a48139941" x_b3_parentspanid:"-" +ÝîηîÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïÉÍšïÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.921+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90c2099d-cf32-4fce-6342-7475cd6adb2d" response_time:0.002637993 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d2a48a7eb44cf5d" x_b3_spanid:"2d2a48a7eb44cf5d" x_b3_parentspanid:"-" +˸͚ïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘¨‘­ïÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.960+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0c9c555-5c5c-4367-4b38-d603572484d3" response_time:0.001994928 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7f8b08a4976a4df1" x_b3_spanid:"7f8b08a4976a4df1" x_b3_parentspanid:"-" + ’‘­ïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³–ýÈðÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.284+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d66987f2-cdf8-4441-7a4e-e983be8f93f4" response_time:0.004483362 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c8e759dea502eed" x_b3_spanid:"6c8e759dea502eed" x_b3_parentspanid:"-" +¼†ýÈðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘‘Á¥ñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.482+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e16fa7b-2265-4be1-7871-2c436457ab87" response_time:0.001549638 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b481e7748bc401ff" x_b3_spanid:"b481e7748bc401ff" x_b3_parentspanid:"-" +©‰Á¥ñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õׯ°ôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"67a60760-0d40-438c-7bbf-51834a1f768f" response_time:0.001579922 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5df2bd6e6eaf7eff" x_b3_spanid:"5df2bd6e6eaf7eff" x_b3_parentspanid:"-" +ÑÎÆ°ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×÷·ÔôÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.385+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"72bf3bdc-bb56-4122-6943-30a07aad703f" response_time:0.00188568 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"468f9596b1d29bd8" x_b3_spanid:"468f9596b1d29bd8" x_b3_parentspanid:"-" +°î·ÔôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ›—éôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.428+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f568002d-c6c3-4c00-70cb-60c85035c732" response_time:0.002531772 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08cd33161c12e766" x_b3_spanid:"08cd33161c12e766" x_b3_parentspanid:"-" +³—éôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š‰•×õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.659+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ed1ce7ac-3d31-47d6-5e44-a99091efee7c" response_time:0.001786344 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e15f236856dda652" x_b3_spanid:"e15f236856dda652" x_b3_parentspanid:"-" +êû”×õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëõÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.701+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"584027ad-92df-4d9a-4bec-1e73888fb017" response_time:0.002713792 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ff6f9ee118aa03a" x_b3_spanid:"0ff6f9ee118aa03a" x_b3_parentspanid:"-" +öï±ëõÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡Â÷âöÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.952+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aa1e7a08-3edd-4d3c-633b-94c3c397488f" response_time:0.002205026 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19dfb589f950faef" x_b3_spanid:"19dfb589f950faef" x_b3_parentspanid:"-" +ð³÷âöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ä÷³ˆøÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.300+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87d4fc52-4aad-453c-68eb-fdbdcf91c5d5" response_time:0.001453072 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0c4edb1c93c0f11" x_b3_spanid:"c0c4edb1c93c0f11" x_b3_parentspanid:"-" +ÚﳈøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ª÷·²øÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.388+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"acf7fa96-8268-42d5-5e83-61c81cde7720" response_time:0.001567032 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8ed2dad71f5f69eb" x_b3_spanid:"8ed2dad71f5f69eb" x_b3_parentspanid:"-" +¹ù¶²øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚÒ¤ÀøÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.416+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cad03e5c-d8b5-469a-67c6-4353d0378838" response_time:0.001727501 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79924c4ea3454a76" x_b3_spanid:"79924c4ea3454a76" x_b3_parentspanid:"-" +ÿȤÀøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º¶Â´ùÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.660+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cee6d8fe-0873-4ec2-5bc7-0bd555c60e3c" response_time:0.001580207 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a2fe350ea965cdf8" x_b3_spanid:"a2fe350ea965cdf8" x_b3_parentspanid:"-" +¶ªÂ´ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†çΤûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.164+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a18c823b-e17d-4ab2-6670-a86ed07aa73c" response_time:0.001696879 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"700adafaa2a0621e" x_b3_spanid:"700adafaa2a0621e" x_b3_parentspanid:"-" +à‹Í¤ûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Ì§ŸüÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:53.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2585336-ae74-4f25-6bf7-ff5fe17323b3" response_time:0.001753181 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b2e0394a1a141d9e" x_b3_spanid:"b2e0394a1a141d9e" x_b3_parentspanid:"-" +ˆÄ§ŸüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þò«ÏüÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:53.518+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78207b04-d852-417b-6635-7a4f17bec2a2" response_time:0.005295034 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"358a091d85f9382c" x_b3_spanid:"358a091d85f9382c" x_b3_parentspanid:"-" +²è«ÏüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êǃ¡ÿÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.228+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f4652fa6-fb6a-47e8-6d14-dcce0334ba95" response_time:0.003714502 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b526cdf65ea9b586" x_b3_spanid:"b526cdf65ea9b586" x_b3_parentspanid:"-" +¯½ƒ¡ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß±ÏþÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.962+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2521e29c-a698-4c1c-48b3-f361e9acec32" response_time:0.003168875 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"62522f1f6279eddf" x_b3_spanid:"62522f1f6279eddf" x_b3_parentspanid:"-" +œ¦ÏþÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ӸݙƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.288+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84929820-4466-4b72-648e-835225332510" response_time:0.002352664 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08b4d0dc5998ee93" x_b3_spanid:"08b4d0dc5998ee93" x_b3_parentspanid:"-" +Š¬Ý™ƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÙâúÙƒÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.424+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"091d70a4-743b-4dfd-6914-367007600e70" response_time:0.001274665 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a32c843e47fd8e21" x_b3_spanid:"a32c843e47fd8e21" x_b3_parentspanid:"-" +Î×úÙƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ¡ˆ„ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.520+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1864f48c-fb63-4d25-634c-48c52ea21196" response_time:0.001666347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"743e96343d37bfec" x_b3_spanid:"743e96343d37bfec" x_b3_parentspanid:"-" +ª’ˆ„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ›ô¡„ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.574+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a46e95eb-1aea-482b-6b4f-14f207ab37ea" response_time:0.001590028 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5451e21368bfdd33" x_b3_spanid:"5451e21368bfdd33" x_b3_parentspanid:"-" +ìŽô¡„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„¦¹û„ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.762+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eec020f8-5cd7-49b7-7ef4-7d83d6eaffdc" response_time:0.001549636 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"34822f3606465150" x_b3_spanid:"34822f3606465150" x_b3_parentspanid:"-" +º¹û„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãºäˆ…ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.790+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02935ca9-88af-4faf-5223-52592251fbe7" response_time:0.001646039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"51cc2df87382fa0c" x_b3_spanid:"51cc2df87382fa0c" x_b3_parentspanid:"-" +¬äˆ…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø˜î¶…ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.887+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c441eac1-dc46-4036-43c9-9a76f6ad1845" response_time:0.001573897 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b3f7a72967cf2dc" x_b3_spanid:"6b3f7a72967cf2dc" x_b3_parentspanid:"-" +÷î¶…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0柅†ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.049+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b7fec9cd-e75d-425b-7be1-e4714667db04" response_time:0.002987428 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b82d2562b9902f5" x_b3_spanid:"0b82d2562b9902f5" x_b3_parentspanid:"-" +±ÚŸ…†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡˜´š‡ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.363+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6bc5384a-2429-4277-6fe6-74044374fb45" response_time:0.002214976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8244b0b2c34260d1" x_b3_spanid:"8244b0b2c34260d1" x_b3_parentspanid:"-" +ŸŠ´š‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êůÈڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.718+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e58efa03-2599-4168-5183-cbf22e752da8" response_time:0.001922038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98f756ee9bc3ed40" x_b3_spanid:"98f756ee9bc3ed40" x_b3_parentspanid:"-" +€³¯ÃˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íáç­ŠÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:57.210+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"038ad2b2-124f-4348-623d-1a7bbf041ae7" response_time:0.00150686 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10133e4dcf893592" x_b3_spanid:"10133e4dcf893592" x_b3_parentspanid:"-" +ÎÓç­ŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œ‘‰ã‹ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.590+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"55d7499a-8d60-42e6-599d-6bb633f6c1df" response_time:0.001605575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5df0da1047353858" x_b3_spanid:"5df0da1047353858" x_b3_parentspanid:"-" +¸‚‰ã‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…û‰‘ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:57.955+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a9311d4-8baa-45af-4071-154ac4eebdbd" response_time:0.00134302 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5228e7c03dd7def3" x_b3_spanid:"5228e7c03dd7def3" x_b3_parentspanid:"-" +õ쉑ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬’Å‚ŽÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.193+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0129853-99cf-4c2d-6078-89447532aa8a" response_time:0.001459065 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5bda6635c45924ef" x_b3_spanid:"5bda6635c45924ef" x_b3_parentspanid:"-" +¦…Å‚ŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓýÎ¥ŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.266+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4f29008-65ca-4a7d-55ac-ca627c9f3883" response_time:0.001583592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2eaddc90e39392df" x_b3_spanid:"2eaddc90e39392df" x_b3_parentspanid:"-" +ãîÎ¥ŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ï ¿ŽÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.320+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5070e873-29b1-4ed2-4df6-b40340c54721" response_time:0.001805478 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6312937a5164ce7d" x_b3_spanid:"6312937a5164ce7d" x_b3_parentspanid:"-" +ÞÝ ¿ŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú“иڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2ea6acf-8bb0-4799-66cd-024b9b0efb3d" response_time:0.001452979 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4e1d9c5d1bce13f1" x_b3_spanid:"4e1d9c5d1bce13f1" x_b3_parentspanid:"-" +ŊиڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óµµí‘ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.215+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"17bef725-d909-4121-549f-89f3ea71417f" response_time:0.00819858 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d58f6146704a544" x_b3_spanid:"1d58f6146704a544" x_b3_parentspanid:"-" +†»²í‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–¯ÖË’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"edcf5deb-2749-476e-4707-21deadfc1779" response_time:0.002496134 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18e067d0770e077f" x_b3_spanid:"18e067d0770e077f" x_b3_parentspanid:"-" +”ŸÖË’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áºÄÁ’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6825fe53-de87-4a8c-571b-6368fbaace50" response_time:0.006281902 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8653587d23cece6f" x_b3_spanid:"8653587d23cece6f" x_b3_parentspanid:"-" +«­ÄÁ’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï’à„“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.538+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6630c980-2cba-4ccd-4c52-8fad80405ca4" response_time:0.003124297 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2897d17e4e6d705e" x_b3_spanid:"2897d17e4e6d705e" x_b3_parentspanid:"-" +ß‚à„“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†¨“•“ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.569+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d60e58f6-b16e-446e-73c9-da302b17f1b7" response_time:0.00649611 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4a0c43882492f48d" x_b3_spanid:"4a0c43882492f48d" x_b3_parentspanid:"-" +´š“•“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ý”ê¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.388+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf4265e5-5965-4df0-64fb-a98e140b9701" response_time:0.002954015 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"642a0ab619fc3955" x_b3_spanid:"642a0ab619fc3955" x_b3_parentspanid:"-" +ö”ê¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆßªÖ¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22029" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba349910-656c-4dd1-6cbf-d976ab33836c" response_time:0.003932761 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6869a8553bbcb1de" x_b3_spanid:"6869a8553bbcb1de" x_b3_parentspanid:"-" +êת֬ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ´©œ¯ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.105+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad3bb31c-398c-4fd7-4b9f-b94fa4964358" response_time:0.00189855 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"443be946e1974850" x_b3_spanid:"443be946e1974850" x_b3_parentspanid:"-" +›¨œ¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Å”âê¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.270+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"46724c0c-e53c-495d-7b5d-1ec7176219e5" response_time:0.001626748 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b05eae3f2196e3c" x_b3_spanid:"0b05eae3f2196e3c" x_b3_parentspanid:"-" +Άâê¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íêȱڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.586+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"925cf468-74a6-4b4c-6b9c-cde7bea3b075" response_time:0.001386668 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59b3413310037b12" x_b3_spanid:"59b3413310037b12" x_b3_parentspanid:"-" +àâȱڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0΃µ²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.963+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22001" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51e80e02-6153-4040-4d0a-3e1f16743744" response_time:0.001464208 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b198da2230cea60c" x_b3_spanid:"b198da2230cea60c" x_b3_parentspanid:"-" +Úùœµ²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìû«Ì²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:08.010+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66a47704-cdbf-4ba3-6524-583ab930d576" response_time:0.002691888 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b5a7608d6e3b802" x_b3_spanid:"1b5a7608d6e3b802" x_b3_parentspanid:"-" +Ñô«Ì²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ÆÒ…£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.835+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf6a3676-1268-4eb1-4c89-34f6fcb8cf91" response_time:0.003279003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"983f2cd077a253d2" x_b3_spanid:"983f2cd077a253d2" x_b3_parentspanid:"-" +ã¾Ò…£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ɽ—‰¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.111+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"26dd6496-813d-4da2-70a2-e0d411678d8d" response_time:0.002767943 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"273a7035a120fc44" x_b3_spanid:"273a7035a120fc44" x_b3_parentspanid:"-" +·µ—‰¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ²Òå£ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.038+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8de465f6-504e-4fef-47e9-b7542ce41354" response_time:0.00161534 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8aadc76f7df8e12c" x_b3_spanid:"8aadc76f7df8e12c" x_b3_parentspanid:"-" +æ¦Òå£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý±«®¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"043d17f9-1e3f-47ad-7890-eef48a84483a" response_time:0.001899549 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3297e2dfd3aec671" x_b3_spanid:"3297e2dfd3aec671" x_b3_parentspanid:"-" +Æ©«®¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ш»Ê¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c60b209-de7c-41d8-741b-f5fff1f2e7bd" response_time:0.001470848 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"125e9357139ef771" x_b3_spanid:"125e9357139ef771" x_b3_parentspanid:"-" +²›»Ê¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ÎÊÒ¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.340+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"683aea0a-5d61-42d3-5682-4fb4a38e623f" response_time:0.001324863 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d0dccaf184b8896" x_b3_spanid:"0d0dccaf184b8896" x_b3_parentspanid:"-" +›ÂÊÒ¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùš˜©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.486+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9ce89b58-af77-4e30-7c3e-4256b07cbf05" response_time:0.001789895 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3c712ce177471865" x_b3_spanid:"3c712ce177471865" x_b3_parentspanid:"-" +Ññš˜©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûÒãȩڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.588+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"494db40e-27bc-4a04-4530-a83bb06c7942" response_time:0.001418701 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7a3309873aaaaa1" x_b3_spanid:"a7a3309873aaaaa1" x_b3_parentspanid:"-" +òËãȩڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à†‘ªÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.740+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53c01407-5c12-49e3-6c39-993614a607df" response_time:0.001518251 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be0e116a33fd63c3" x_b3_spanid:"be0e116a33fd63c3" x_b3_parentspanid:"-" +˜üœ‘ªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û «ÏªÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.870+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"406d8312-9770-47c0-7bd3-1e594410d7ff" response_time:0.00133822 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb011f1e0c449428" x_b3_spanid:"bb011f1e0c449428" x_b3_parentspanid:"-" +È™«ÏªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó‘‹ø©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.686+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e13a5ac1-09c5-482f-512a-736eb9b81cb8" response_time:0.002969957 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92ee1666c776645d" x_b3_spanid:"92ee1666c776645d" x_b3_parentspanid:"-" +ÿ±‡ø©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þºõêڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.846+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"95d14bd9-d283-4b97-7cd2-1ecc747c005d" response_time:0.001689612 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e825003ea87f6dc" x_b3_spanid:"6e825003ea87f6dc" x_b3_parentspanid:"-" +ü©õêڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0㺧ŠÙÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:43.978+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"30533b01-372b-4a59-42ab-7a17b535ccce" response_time:0.00555255 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de12dbce924b584f" x_b3_spanid:"de12dbce924b584f" x_b3_parentspanid:"-" +έ§ŠÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ï¹ÙÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.079+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ff1be8a8-3b8d-4dc0-6117-5ea501e5eed6" response_time:0.004171306 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a535797c0219ac0b" x_b3_spanid:"a535797c0219ac0b" x_b3_parentspanid:"-" +Çï¹ÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„óûêÙÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.183+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20bb3c85-fa13-4e2f-658e-b837208c2a5b" response_time:0.003155792 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3da9136b3f3c05eb" x_b3_spanid:"3da9136b3f3c05eb" x_b3_parentspanid:"-" +®çûêÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™å¬‚ÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.232+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3bdaf81b-e6f8-40c4-652e-eb44ce96a5a2" response_time:0.003615214 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bf51918e189d4749" x_b3_spanid:"bf51918e189d4749" x_b3_parentspanid:"-" +‹Þ¬‚ÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý §ÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4a53563-62dc-43a4-76e6-6319a6157f4f" response_time:0.003085415 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7030c0d7db0dae25" x_b3_spanid:"7030c0d7db0dae25" x_b3_parentspanid:"-" +ôó §ÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õÄçÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2342c7d-c126-495f-5900-42e41b46db8b" response_time:0.003007044 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b53e95d68e88bf9a" x_b3_spanid:"b53e95d68e88bf9a" x_b3_parentspanid:"-" +̸çÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†‹Ã°ÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.328+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a62196d6-bd74-42b0-5361-70aac7735e11" response_time:0.004152568 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"37502fe84fa4eb69" x_b3_spanid:"37502fe84fa4eb69" x_b3_parentspanid:"-" +ú‚ðÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í´ù£ÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.571+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"714e4005-8cca-4830-440b-7df73c8f70a0" response_time:0.002990003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d54127f36c2955f1" x_b3_spanid:"d54127f36c2955f1" x_b3_parentspanid:"-" +²©ù£ÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁÏã«ÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.587+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28e330ef-2f93-4172-4aa9-06d45a3023f1" response_time:0.003214806 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a021b90f54293a1b" x_b3_spanid:"a021b90f54293a1b" x_b3_parentspanid:"-" +ãÆã«ÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø÷þ±ÛÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:44.601+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb9a9d8b-c169-4aec-706b-b28334f2f53f" response_time:0.00278735 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59b4cb8b615f4f64" x_b3_spanid:"59b4cb8b615f4f64" x_b3_parentspanid:"-" +±íþ±ÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…‹èüÛÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.751+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"07bdf442-708a-4438-4d6e-1a90dfe84174" response_time:0.009879026 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac1ef2830e07d1b2" x_b3_spanid:"ac1ef2830e07d1b2" x_b3_parentspanid:"-" +‚€èüÛÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉùLjÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.780+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"988e9aaa-ffea-4c88-6ea1-9da922090c31" response_time:0.005463624 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e809ad2cf7eeb888" x_b3_spanid:"e809ad2cf7eeb888" x_b3_parentspanid:"-" +›ðLjÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø¡Î²ÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.869+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a319ed5-ee3f-4e40-5d8d-314dc3c9af8f" response_time:0.003974716 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e04650d69910e918" x_b3_spanid:"e04650d69910e918" x_b3_parentspanid:"-" +͘βÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºÁÄÉÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.915+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b6441c6-9f71-44b0-7279-20e0f862860a" response_time:0.006845441 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd54abf82ec85944" x_b3_spanid:"dd54abf82ec85944" x_b3_parentspanid:"-" +Ç´ÄÉÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚öÄ•ÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75289b43-8b39-4b19-5895-b4ec8f8c8d90" response_time:0.002900852 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b0ebe9ee5eec892" x_b3_spanid:"8b0ebe9ee5eec892" x_b3_parentspanid:"-" +÷ëÄ•ÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ŽðçÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.247+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60982ef0-ee32-41b4-4241-c070c8ebbd8d" response_time:0.006421998 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8b2d9f4b9583794" x_b3_spanid:"b8b2d9f4b9583794" x_b3_parentspanid:"-" +„…ðçÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨ñ¡íÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.260+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d95dbbb4-a319-4330-4b75-5d37c7a63fb3" response_time:0.004508424 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c33824648d9e3462" x_b3_spanid:"c33824648d9e3462" x_b3_parentspanid:"-" +µ›¡íÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕŽÿÝÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.299+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ebe67a5d-aaf9-4642-6930-49b24c1910ac" response_time:0.003029596 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a8a8c354c019cee" x_b3_spanid:"1a8a8c354c019cee" x_b3_parentspanid:"-" +˜‡ÿÝÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢µ¤ÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.359+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7277194-19ec-472c-6968-b829916dceb1" response_time:0.006566886 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f03914fbe87043a2" x_b3_spanid:"f03914fbe87043a2" x_b3_parentspanid:"-" +«¤ÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÀƒ§ÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.379+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64790dca-6f43-476d-470b-5b7d2820ac68" response_time:0.006547174 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9dce96d350d733f8" x_b3_spanid:"9dce96d350d733f8" x_b3_parentspanid:"-" +̸ƒ§ÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÄ©§ÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.379+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02d35f88-27ce-414c-44d3-5251f564efc4" response_time:0.008035003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"df8cd4d8fe936009" x_b3_spanid:"df8cd4d8fe936009" x_b3_parentspanid:"-" +ú½©§ÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ“¨±ÞÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:45.401+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4736b9d3-7680-4ef9-5046-176671c89bc8" response_time:0.00614672 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d893110fe0c6d079" x_b3_spanid:"d893110fe0c6d079" x_b3_parentspanid:"-" +†¨±ÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÝѱÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.401+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56ece65b-23be-46cf-55db-48dc0a0b65cf" response_time:0.007392292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"998b99300e5ed32f" x_b3_spanid:"998b99300e5ed32f" x_b3_parentspanid:"-" +ºÒѱÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯¼ð¶ÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.416+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7611f62-388b-4136-7b70-c9a9ca2fa7eb" response_time:0.003423799 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"763aaf886f9a2531" x_b3_spanid:"763aaf886f9a2531" x_b3_parentspanid:"-" +ú±ð¶ÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å §ÎÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.465+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1c0af7ec-a72d-4943-4656-ca62a2bfa11d" response_time:0.003152727 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c21b6d9d9725ef08" x_b3_spanid:"c21b6d9d9725ef08" x_b3_parentspanid:"-" +é”§ÎÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ؾÍòÞÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.542+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bcf9b3ad-d7c4-4e28-7372-9369730dc15a" response_time:0.002609222 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"495585e4396f213f" x_b3_spanid:"495585e4396f213f" x_b3_parentspanid:"-" +é±ÍòÞÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ù“¥ßÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.648+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"57f69689-78ac-4d07-575a-b550a2f98629" response_time:0.002606112 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec523d9f7ced1b2e" x_b3_spanid:"ec523d9f7ced1b2e" x_b3_parentspanid:"-" +Çñ“¥ßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”Ñ—àÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:45.887+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aee22618-7061-4614-4f03-ed22b9e85906" response_time:0.00283085 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bc7819c7f826c11f" x_b3_spanid:"bc7819c7f826c11f" x_b3_parentspanid:"-" +¨Ä—àÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ©²šàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.893+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a48f22f7-3668-415a-4a11-dcc03346e1e6" response_time:0.002874193 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"521e9247d7014183" x_b3_spanid:"521e9247d7014183" x_b3_parentspanid:"-" +‘²šàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûþÇÇàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.987+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bcb7155-6bfd-42ca-555f-cd8eb725a135" response_time:0.003524611 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36e6c03b025d0273" x_b3_spanid:"36e6c03b025d0273" x_b3_parentspanid:"-" +½óÇÇàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ã͉×àÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.020+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df023088-96d9-4f34-65f0-4c95900ab813" response_time:0.003153117 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6288eabe0c65e1b7" x_b3_spanid:"6288eabe0c65e1b7" x_b3_parentspanid:"-" +¿Á‰×àÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒÎ™ßàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.035+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f81a0dbc-d7e0-45ad-5dcb-3c342b11ea9c" response_time:0.006056265 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f01b391c7ef468b1" x_b3_spanid:"f01b391c7ef468b1" x_b3_parentspanid:"-" +£Á™ßàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0׫„žáÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.170+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5bad1270-211a-4e76-7b3d-1d8860a50b5e" response_time:0.002885953 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"addbfbd35b8ec01c" x_b3_spanid:"addbfbd35b8ec01c" x_b3_parentspanid:"-" +±Ÿ„žáÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓÆ °áÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.208+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7258e710-88c4-4000-5695-6b07c44260f3" response_time:0.003036564 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7ce56354e5c2683b" x_b3_spanid:"7ce56354e5c2683b" x_b3_parentspanid:"-" +¶¼ °áÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï ŸâÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.439+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4013e2da-b4e5-4c6e-4351-8b5bbcc9a524" response_time:0.004480303 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"522514fc78cbb4f8" x_b3_spanid:"522514fc78cbb4f8" x_b3_parentspanid:"-" +Ý– ŸâÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÜøáâÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.580+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a133d247-0b61-429e-6b45-97dff27b6214" response_time:0.003477345 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3df85dd38e164d8" x_b3_spanid:"b3df85dd38e164d8" x_b3_parentspanid:"-" +ß¾øáâÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÙÏ›ãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.701+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ac6b528f-d14a-4fac-6e10-63236d3a8810" response_time:0.002751061 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bd62d99c4635a0a2" x_b3_spanid:"bd62d99c4635a0a2" x_b3_parentspanid:"-" +¡ÍÏ›ãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öÛ…ëäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.130+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d563ecf-5520-43fb-5c2e-c7fa3215deaf" response_time:0.009607912 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ca57abe177dcaf0" x_b3_spanid:"2ca57abe177dcaf0" x_b3_parentspanid:"-" +îÐ…ëäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®Å¯²åÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.283+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e06dc691-2d76-4097-4eff-0bffadbe4f93" response_time:0.005726223 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f3a8d5c3afbafea" x_b3_spanid:"3f3a8d5c3afbafea" x_b3_parentspanid:"-" +³º¯²åÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷©…èåÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.395+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5de6d0ab-1a6c-4565-5a56-6620de48d076" response_time:0.006157225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63416adb94e1d1c2" x_b3_spanid:"63416adb94e1d1c2" x_b3_parentspanid:"-" +Ã…èåÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ùæ°çÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:47.819+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91624598-eaa2-444a-4e72-ae2eac2a6757" response_time:0.00336534 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5806763b7508bf8a" x_b3_spanid:"5806763b7508bf8a" x_b3_parentspanid:"-" +¡ëæ°çÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µüÕ©éÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.340+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d389de6-1827-4911-59f2-9e7a13b63947" response_time:0.004312828 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"46c7df300d7e8a24" x_b3_spanid:"46c7df300d7e8a24" x_b3_parentspanid:"-" +ÿñÕ©éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Á׿ÀéÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.389+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"162c8df1-c2e1-4e1f-4a7f-a6de6b4e20ae" response_time:0.003726279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fde43e751a2afaf1" x_b3_spanid:"fde43e751a2afaf1" x_b3_parentspanid:"-" +¢ÊæÀéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ǬàˆìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.076+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d85f121b-b27a-40d4-5c82-451cbf61718e" response_time:0.004103425 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"193cf1c7878de389" x_b3_spanid:"193cf1c7878de389" x_b3_parentspanid:"-" +ǒ߈ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓÉ·ŽìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.087+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15b96b21-6b44-4f6e-6581-1d7f85fb6425" response_time:0.005262959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c503226bc2e4524" x_b3_spanid:"6c503226bc2e4524" x_b3_parentspanid:"-" +Ó½·ŽìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÒãšíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.383+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"930bf7bd-6048-4cc7-4008-fef1fea3cd85" response_time:0.003370262 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9218f29cf0acfb29" x_b3_spanid:"9218f29cf0acfb29" x_b3_parentspanid:"-" +þÉãšíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºúÜÎíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.491+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04ff9375-0ef7-40f8-7e53-21734c8854b4" response_time:0.004788135 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"93ec6bc54b892a91" x_b3_spanid:"93ec6bc54b892a91" x_b3_parentspanid:"-" +™óÜÎíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž¶¼¹îÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.717+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b4bd4c4-5c53-4506-529d-9257d10b13ba" response_time:0.002880646 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5bec9be53d623a92" x_b3_spanid:"5bec9be53d623a92" x_b3_parentspanid:"-" +˜¬¼¹îÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁãöïÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.114+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3bd5f5b-2a80-4b8b-7b6a-0acffbb9decd" response_time:0.002859616 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92b092be5e7dfaa4" x_b3_spanid:"92b092be5e7dfaa4" x_b3_parentspanid:"-" +ÖºãöïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’Ù¾ðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb38d77c-1ae0-4d39-4431-62e49765fe7f" response_time:0.003758071 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4b46fb304a8ce124" x_b3_spanid:"4b46fb304a8ce124" x_b3_parentspanid:"-" +íðؾðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓÆ¹ÍðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.296+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"138554e1-4f3a-46f7-7e68-dc65cfa45393" response_time:0.002699675 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44b9fe8fbf881f8b" x_b3_spanid:"44b9fe8fbf881f8b" x_b3_parentspanid:"-" +¯¹¹ÍðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆãåàðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.336+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1604cfb0-d8bc-44a2-79f1-bd553849b070" response_time:0.003190037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa2cd6fc333f5560" x_b3_spanid:"aa2cd6fc333f5560" x_b3_parentspanid:"-" +µÖåàðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—•·ñðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.371+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2268443e-3890-43ff-78fb-817f85a49aad" response_time:0.002789085 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"76f77fe95c99f271" x_b3_spanid:"76f77fe95c99f271" x_b3_parentspanid:"-" +­Œ·ñðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úåÄÈòÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.822+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a85983b-a6c2-4c9e-4f94-8eb5c4f4a14d" response_time:0.00331623 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af1ccd7bf1bc7535" x_b3_spanid:"af1ccd7bf1bc7535" x_b3_parentspanid:"-" +ŒÛÄÈòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ãáßòÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.871+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0127f5da-b06d-4194-7102-120dd548a65e" response_time:0.00285873 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4e95ee5e453e2065" x_b3_spanid:"4e95ee5e453e2065" x_b3_parentspanid:"-" +úÛáßòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚’âãòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.879+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5729f73a-2726-47d8-4609-71388e6dcc9f" response_time:0.002641436 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"85988d082438990b" x_b3_spanid:"85988d082438990b" x_b3_parentspanid:"-" +ã‰âãòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øåð•ôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.249+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b017cd1f-4c2e-43dc-74d8-024005766fe0" response_time:0.007033717 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a7d136efa24695a" x_b3_spanid:"6a7d136efa24695a" x_b3_parentspanid:"-" +ñØð•ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œýæ´õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.586+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c6ee4853-0878-469a-6105-ae893b6ab589" response_time:0.002638187 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"890a3fc8fc93ce4d" x_b3_spanid:"890a3fc8fc93ce4d" x_b3_parentspanid:"-" +õðæ´õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãûÝ‚öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.748+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b0fe234-3936-4972-4bb2-36b9418e79fa" response_time:0.004202177 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f3346ed529b5eb87" x_b3_spanid:"f3346ed529b5eb87" x_b3_parentspanid:"-" +ÍìÝ‚öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ïŽëöÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.969+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7be9fa61-371a-43fa-5b8b-b56b0f2031bb" response_time:0.002534291 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7033864af7e0a3d" x_b3_spanid:"d7033864af7e0a3d" x_b3_parentspanid:"-" +…åŽëöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€‚Љ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.032+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bbc96f34-0878-434f-7cd4-658cfe4592fd" response_time:0.002435309 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fbcad8902fe13ea7" x_b3_spanid:"fbcad8902fe13ea7" x_b3_parentspanid:"-" +åö‰‰÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ùˆŽ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.042+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7dacb5c-bb15-4634-422d-13d674c754f2" response_time:0.002335597 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"25db9f41d4b2361d" x_b3_spanid:"25db9f41d4b2361d" x_b3_parentspanid:"-" +þðˆŽ÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶˜§í÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.238+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28f84afc-73bb-418f-4ea3-42925de3511b" response_time:0.006617263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e45cecec2a52ba32" x_b3_spanid:"e45cecec2a52ba32" x_b3_parentspanid:"-" +Ћ§í÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÇåÃúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.959+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a576822-11b4-4880-6a91-ff08d9634617" response_time:0.003454219 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e474eabd24df227" x_b3_spanid:"7e474eabd24df227" x_b3_parentspanid:"-" +ò¿åÃúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æß•–üÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.400+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc64710a-7db9-4774-40d3-4aec4d313a62" response_time:0.003633096 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c760556c87cb271" x_b3_spanid:"2c760556c87cb271" x_b3_parentspanid:"-" +´Ó•–üÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÙÑÓüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.529+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78d60e1e-d45f-436a-4d6b-c0bc55ea5b09" response_time:0.003921962 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c95bee967523b076" x_b3_spanid:"c95bee967523b076" x_b3_parentspanid:"-" +„ÍÑÓüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶˜¥„ÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.166+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51e62da5-ef21-49ab-72ae-99cf3205a76d" response_time:0.005877797 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08e850bc5ef75924" x_b3_spanid:"08e850bc5ef75924" x_b3_parentspanid:"-" +•¥„ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”‚Ù±ÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2bbcbd0e-52ed-48be-45b1-6b88ba9ef0bf" response_time:0.002390518 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"814aff984912195c" x_b3_spanid:"814aff984912195c" x_b3_parentspanid:"-" +‡óرÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–‹ýæÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.375+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"733389a5-1821-4430-583c-d357d3f93ef2" response_time:0.003593254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31863cef2a0f2d05" x_b3_spanid:"31863cef2a0f2d05" x_b3_parentspanid:"-" +†ûüæÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ê¶ã†€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.442+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7417465f-10e4-4642-6ca6-745fe951e020" response_time:0.002701337 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fa4a895151ce1d3" x_b3_spanid:"4fa4a895151ce1d3" x_b3_parentspanid:"-" +¹©ã†€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Óø®€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.489+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ac34b7d-c3b4-4a1e-4658-a0f804d1648b" response_time:0.003423671 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"74114954cfca3c46" x_b3_spanid:"74114954cfca3c46" x_b3_parentspanid:"-" +óð®€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºžˆ¸€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.544+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"575a3939-e7d0-40ba-5581-4c684fef7022" response_time:0.004476579 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a05c9e757ea29601" x_b3_spanid:"a05c9e757ea29601" x_b3_parentspanid:"-" +Ý’ˆ¸€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0« •Þ€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.624+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"72104beb-1f8c-4059-7caa-3cdcb76d89c1" response_time:0.004108084 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c797d4dee5ed1457" x_b3_spanid:"c797d4dee5ed1457" x_b3_parentspanid:"-" +ƒ”•Þ€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×Ô½€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.698+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"281e3d54-90f7-4871-6a71-d9614299d1d6" response_time:0.002427958 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a92dee986ddf5877" x_b3_spanid:"a92dee986ddf5877" x_b3_parentspanid:"-" +ŽÍ½€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ë©Ý×ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.881+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"611d3456-1da4-40c9-4a5b-1651e2a2194e" response_time:0.002585077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f62ab69cdcba593" x_b3_spanid:"8f62ab69cdcba593" x_b3_parentspanid:"-" +Ó Ý×ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£þÜþÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.962+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc9e17cc-b7fb-46fe-7942-8e0b3cd31614" response_time:0.003419454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c82226611e897a8" x_b3_spanid:"6c82226611e897a8" x_b3_parentspanid:"-" +öÜþÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍÓςڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.130+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3601540b-90a0-4739-52a0-d1ad981c82fa" response_time:0.00486454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7335c8b97bd1db1a" x_b3_spanid:"7335c8b97bd1db1a" x_b3_parentspanid:"-" +Å…ÓςڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Àâ±ó‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.207+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3a3938e-be8c-4f0e-6eac-f09ff9641158" response_time:0.002698591 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eed1007af77992a5" x_b3_spanid:"eed1007af77992a5" x_b3_parentspanid:"-" +ÒÕ±ó‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ñ§”ƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.276+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e40b59d0-3c94-4eee-677e-685baff63d69" response_time:0.002853978 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c3e5ec8f0a2333f" x_b3_spanid:"4c3e5ec8f0a2333f" x_b3_parentspanid:"-" +Šç§”ƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ÏÔº„ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.624+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2cd8e75c-95d2-4964-4f63-8deee4c710db" response_time:0.00308613 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b864de3eee48f234" x_b3_spanid:"b864de3eee48f234" x_b3_parentspanid:"-" +™½Ôº„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ä˜Àè†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.257+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20e74ca0-2497-4e32-59dc-6c9fda6ce8fd" response_time:0.003533491 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3533009688a624b7" x_b3_spanid:"3533009688a624b7" x_b3_parentspanid:"-" +»‹Àè†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô´õø†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.293+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1ab1a58a-99fc-42c3-672d-a89154a90fd3" response_time:0.002536329 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"263808c0311498e2" x_b3_spanid:"263808c0311498e2" x_b3_parentspanid:"-" +…­õø†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ÷õ—‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.894+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4171680f-3db7-44aa-72d7-a6fbb32df5cb" response_time:0.002897684 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2fadad044622544" x_b3_spanid:"e2fadad044622544" x_b3_parentspanid:"-" +ºéõ—‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶Ÿí‡‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.395+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"991790df-0868-42cb-4f84-47587ed009d7" response_time:0.004683256 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f25a3013fb7d4f70" x_b3_spanid:"f25a3013fb7d4f70" x_b3_parentspanid:"-" +ð”퇋ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ټњ‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.436+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c4b0226-26bb-459b-7e31-6388507ef4f0" response_time:0.003405843 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2df8f6ee8314d837" x_b3_spanid:"2df8f6ee8314d837" x_b3_parentspanid:"-" +°±Ñš‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Åîú¨‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.467+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20fa9a4e-aa40-4cac-75c8-876a448a9fe5" response_time:0.002677855 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8877faf943a3389" x_b3_spanid:"f8877faf943a3389" x_b3_parentspanid:"-" +›çú¨‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëð…Á‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.517+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b00f428-deb6-4164-5208-a5619d4b41d8" response_time:0.003411339 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2036f5924bd7ecb5" x_b3_spanid:"2036f5924bd7ecb5" x_b3_parentspanid:"-" +ãå…Á‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èðì‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"21789269-1034-4c8c-5051-13d2b1070ff1" response_time:0.002302107 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f938504bf6123f50" x_b3_spanid:"f938504bf6123f50" x_b3_parentspanid:"-" +ÀÛðì‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãçèŒÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.869+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"545c7a06-8d6c-4bf5-6dd9-8257cbc7e3a8" response_time:0.00264274 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ddcfae1cac8e1504" x_b3_spanid:"ddcfae1cac8e1504" x_b3_parentspanid:"-" +ËÙçèŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œï¾‡ŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.202+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"854170d6-153f-4a46-6b96-099dcf7d2ed8" response_time:0.002395494 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9a0cf2b08b8794b4" x_b3_spanid:"9a0cf2b08b8794b4" x_b3_parentspanid:"-" +í⾇ŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ÊšÖÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.635+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c1ccb4a4-978e-40c0-4319-54eac5664f9d" response_time:0.002626676 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0b3b6089c2ad1a0" x_b3_spanid:"e0b3b6089c2ad1a0" x_b3_parentspanid:"-" +¿¾šÖÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈÖž‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.056+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8b3f9e54-22bd-4d96-4640-db22fe8c33e3" response_time:0.002975043 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3fe9d913eaa1604b" x_b3_spanid:"3fe9d913eaa1604b" x_b3_parentspanid:"-" +ì‚Öž‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìöý­‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.087+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e69702a-5684-426b-71a0-00efdfe5cc3c" response_time:0.003637005 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e741b976c793089e" x_b3_spanid:"e741b976c793089e" x_b3_parentspanid:"-" +‚êý­‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½¹î‘ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.221+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b81a2caf-72c0-418f-6fc9-bae7cd91bea8" response_time:0.00454359 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"57c8f0823bb724e8" x_b3_spanid:"57c8f0823bb724e8" x_b3_parentspanid:"-" +µõ¸î‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸¿„û‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.246+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0505e522-78e4-486e-41b2-46cf70613234" response_time:0.005836838 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"53cbe469e751c214" x_b3_spanid:"53cbe469e751c214" x_b3_parentspanid:"-" +š¨„û‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ²í’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.320+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b33746f-b404-462e-634a-670a3e4dac8b" response_time:0.005640871 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c20a7996a5926da" x_b3_spanid:"4c20a7996a5926da" x_b3_parentspanid:"-" +ö£í’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò«Á†•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.076+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc5ebe0b-cc3c-4490-6765-1039588e3615" response_time:0.005999603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"756b60798614dfc2" x_b3_spanid:"756b60798614dfc2" x_b3_parentspanid:"-" +ÛÁ†•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³Œäù’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62d72dc6-07b5-48e9-7d0f-7bd3dd75e7cf" response_time:0.004846267 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"285f5e025071870f" x_b3_spanid:"285f5e025071870f" x_b3_parentspanid:"-" +ìýãù’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹èÔ“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.704+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"de14702b-fa56-4f79-5663-1f44d2f67aec" response_time:0.004583079 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9890fb12849ee17e" x_b3_spanid:"9890fb12849ee17e" x_b3_parentspanid:"-" +«èÔ“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Å£ã¾ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.345+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abe192f3-ed6f-4c2f-44f9-6b50219b4f24" response_time:0.002323233 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"61b6c0649bd357af" x_b3_spanid:"61b6c0649bd357af" x_b3_parentspanid:"-" +ê™ã¾ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù¬ÐßÅØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.431+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50119" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9851e296-24fe-4421-593c-7ce8135bdc87" response_time:0.003186475 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c550ee29711a6b39" x_b3_spanid:"c550ee29711a6b39" x_b3_parentspanid:"-" +ï¥ÐßÅØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÙ³“ÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.809+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50119" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62d5f0a5-d75c-4286-6e64-1947808c1bd8" response_time:0.002024191 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa43adb81e778b76" x_b3_spanid:"fa43adb81e778b76" x_b3_parentspanid:"-" +åͳ“ÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ÚžÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.832+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50119" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9d9f4a6-3f5f-4962-58cc-8134d1e1ff90" response_time:0.002266095 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8886cf30e52997b" x_b3_spanid:"c8886cf30e52997b" x_b3_parentspanid:"-" +ŸùÙžÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãÂâÞÇØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.968+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33495" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bafa2010-25b9-4373-711e-a06571c8433c" response_time:0.001556603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"142a3c98ed3b10ea" x_b3_spanid:"142a3c98ed3b10ea" x_b3_parentspanid:"-" +˜¼âÞÇØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©–ËµÈØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.149+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50067" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b831fe79-31c1-4651-622e-6f454ce1d2af" response_time:0.001798578 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c75a94e4a20b642f" x_b3_spanid:"c75a94e4a20b642f" x_b3_parentspanid:"-" +˜ÀÉµÈØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦‹¬ïÈØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.270+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43869" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7fa39b1a-9eb9-49fc-6ec9-fdccb15a0f71" response_time:0.002121131 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5bcbd22f49a3fa24" x_b3_spanid:"5bcbd22f49a3fa24" x_b3_parentspanid:"-" +–û«ïÈØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊýöôÈØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.282+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27615" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b9c8b0d8-f8a5-4369-7e74-60f42db79fc8" response_time:0.001806876 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7d62b8a31827ceeb" x_b3_spanid:"7d62b8a31827ceeb" x_b3_parentspanid:"-" +ÙóöôÈØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄÜÂÉØœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:16:05.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27615" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f27a9080-78ac-44e5-6138-96b3d5c3a59f" response_time:0.0018118 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e2bfcd050d46491" x_b3_spanid:"7e2bfcd050d46491" x_b3_parentspanid:"-" +¦ÑÂÉØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºþÆÊØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.577+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33495" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0e3df00b-3f7a-45bd-787e-c200afcbb169" response_time:0.001871336 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5f4f6fd56fb99dc4" x_b3_spanid:"5f4f6fd56fb99dc4" x_b3_parentspanid:"-" +ÆóÆÊØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãá’æËØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.056+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:32111" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee95f77b-3cab-46a1-46bf-4b8a5d66a71e" response_time:0.002403863 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c2ab6acd798a28e" x_b3_spanid:"2c2ab6acd798a28e" x_b3_parentspanid:"-" +´Ø’æËØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ã„ÞøÌØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.363+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33461" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0db4684f-46ed-413f-6b6b-c72bed9fdcb2" response_time:0.002703564 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92fd954d75da08f3" x_b3_spanid:"92fd954d75da08f3" x_b3_parentspanid:"-" +±øÝøÌØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ɦÒÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.442+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:39299" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"588c0b2c-0d06-461d-65bd-9cf012ca10a0" response_time:0.001597896 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6fe9193e536693b" x_b3_spanid:"c6fe9193e536693b" x_b3_parentspanid:"-" +ŸžÒÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…Öô¤ÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.456+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43751" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"387b7be3-dab5-4702-6d4f-84bcba7667b4" response_time:0.001835507 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"311c87ac87e672ae" x_b3_spanid:"311c87ac87e672ae" x_b3_parentspanid:"-" +ÐÉô¤ÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ¿òçÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.598+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27429" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"283e2543-25f0-493c-6f5f-bcf3a1650965" response_time:0.001334581 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5147e5106c9f1fc6" x_b3_spanid:"5147e5106c9f1fc6" x_b3_parentspanid:"-" +¸òçÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â»ÉóÎØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.888+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33591" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d6a0ee4-8f46-43e2-7226-f854daa823e0" response_time:0.003561923 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cbf4896c8b312ee2" x_b3_spanid:"cbf4896c8b312ee2" x_b3_parentspanid:"-" +ó³ÉóÎØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Þà´ÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.026+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27429" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a50fb678-d5b6-49c4-5674-44e3d31160b3" response_time:0.002068358 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11df07e452c5f8e7" x_b3_spanid:"11df07e452c5f8e7" x_b3_parentspanid:"-" +ïÖà´ÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ŠØýÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.179+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:39299" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7fc2985-0173-4b87-6494-48509a5fe125" response_time:0.001939353 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"310b89d1f3d5e27f" x_b3_spanid:"310b89d1f3d5e27f" x_b3_parentspanid:"-" +Ýý×ýÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Õü¦ÓØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.067+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33605" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5087c85b-1eb4-415c-77a7-0c8cc125237d" response_time:0.006139745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"114776f580252963" x_b3_spanid:"114776f580252963" x_b3_parentspanid:"-" +ÙÅû¦ÓØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤æÑÕØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.529+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43173" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b1a0aed-571b-452b-6ae5-1cc2c7dd7b71" response_time:0.002624739 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"68ea76bee0478383" x_b3_spanid:"68ea76bee0478383" x_b3_parentspanid:"-" +ƒ×ÑÕØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óçË¶ÕØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.641+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33591" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf096c45-8c95-42bd-57e9-f5dc206881ca" response_time:0.002269402 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d1dd8542daa9252c" x_b3_spanid:"d1dd8542daa9252c" x_b3_parentspanid:"-" +†àË¶ÕØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú‚Æ×ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.211+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33431" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4cdc1faa-4b7b-45ea-7c98-bcc2b245c127" response_time:0.001304817 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98c64b5e687a0964" x_b3_spanid:"98c64b5e687a0964" x_b3_parentspanid:"-" +’‰‚Æ×ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®èØØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.365+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33605" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"441302ec-b683-4a29-664e-308c1f75c079" response_time:0.002270447 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ecc7da32bee136a" x_b3_spanid:"2ecc7da32bee136a" x_b3_parentspanid:"-" +• èØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í×µÅØØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:09.478+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:33495" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"603524be-652b-4e6d-570b-592967bd93be" response_time:0.00179691 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8ac482f37d42968a" x_b3_spanid:"8ac482f37d42968a" x_b3_parentspanid:"-" +ˆÐµÅØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚ßÝðÚØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:10.104+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:50119" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e680e8a-e3f5-4ec3-5cff-5788c1325760" response_time:0.00240649 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff1a5e249f2974fb" x_b3_spanid:"ff1a5e249f2974fb" x_b3_parentspanid:"-" +§ÕÝðÚØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö±ììÜØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.633+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27016243-767c-4ac7-6b43-dae844da2ef7" response_time:0.00243539 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"578fcc8b7b4f9fcd" x_b3_spanid:"578fcc8b7b4f9fcd" x_b3_parentspanid:"-" +ì¤ììÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èá…ýÝØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.936+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb67d742-db22-4289-6751-8cd7941039e8" response_time:0.002192037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af1a586f71d2e154" x_b3_spanid:"af1a586f71d2e154" x_b3_parentspanid:"-" +»Ø…ýÝØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºœ²¤ßØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.287+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0ba9378b-a966-4d87-60a8-c640a95536e9" response_time:0.001973751 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ed3ce0abbf040ce" x_b3_spanid:"5ed3ce0abbf040ce" x_b3_parentspanid:"-" +ô”²¤ßØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈÕ•ãØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:12.319+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"694f0a2c-d406-45c9-634a-f284bda677ee" response_time:0.00167788 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce5f1b940dd715ee" x_b3_spanid:"ce5f1b940dd715ee" x_b3_parentspanid:"-" +êÌ•ãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ôìãØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38e86075-c28e-41ad-6cc5-b5437a052489" response_time:0.002184786 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"33ea715a070542d6" x_b3_spanid:"33ea715a070542d6" x_b3_parentspanid:"-" +ß²ôìãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ˆàïæØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.325+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fef47743-0a40-47d7-4769-6e138ad5c7bc" response_time:0.001276012 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8d1cf19fb198424" x_b3_spanid:"f8d1cf19fb198424" x_b3_parentspanid:"-" +â€àïæØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ȩ·µêØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.276+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2049b873-ecdf-4fa6-7247-4d8510bdb3aa" response_time:0.001904974 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29cca28e13a5c0e7" x_b3_spanid:"29cca28e13a5c0e7" x_b3_parentspanid:"-" +î ·µêØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“Ü©ïêØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.398+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"032687b7-38f9-49bc-41cd-a449370cb7f9" response_time:0.001474376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc0d154e1cdc4d15" x_b3_spanid:"cc0d154e1cdc4d15" x_b3_parentspanid:"-" +âÔ©ïêØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ã‚»§ìØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:14.783+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a98150c7-a15d-4abe-663d-403c424ed2f0" response_time:0.00243347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58ad3679e840c565" x_b3_spanid:"58ad3679e840c565" x_b3_parentspanid:"-" +­úº§ìØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜ÌßÜìØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:14.895+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34514" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9fb84834-8dac-431f-7683-811aaa411c5e" response_time:0.002066673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6e13fbc905d55d7" x_b3_spanid:"b6e13fbc905d55d7" x_b3_parentspanid:"-" +ÓÀßÜìØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0磚¯íØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:15.068+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87f8a47c-f384-4073-7bc7-3131bddc5ddf" response_time:0.00170252 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7500ad240d92c62" x_b3_spanid:"c7500ad240d92c62" x_b3_parentspanid:"-" +Äœš¯íØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²ÇóíØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2983d2cf-a419-4562-417f-f1ea50bb53f8" response_time:0.001595473 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"452ae765a5b8d78e" x_b3_spanid:"452ae765a5b8d78e" x_b3_parentspanid:"-" +“ÇóíØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ÷ë²ïØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.612+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26091" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"29ac1255-9e12-4840-7faa-c685ba072ba1" response_time:0.002052106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"980654fccda54db0" x_b3_spanid:"980654fccda54db0" x_b3_parentspanid:"-" +‰ìë²ïØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂÞšæïØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.718+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49555290-9e7c-496f-7b9f-0f7b4d1c9cb5" response_time:0.004566162 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1d74a1cc94af95e" x_b3_spanid:"b1d74a1cc94af95e" x_b3_parentspanid:"-" +÷ÓšæïØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì¬ËŽðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.805+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb594719-dd47-477d-6420-4ca3b3a0c141" response_time:0.002239445 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a61c76d1d47f5275" x_b3_spanid:"a61c76d1d47f5275" x_b3_parentspanid:"-" +“ ËŽðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0嫃›òØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.367+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"750484c8-d95f-44a5-79c7-42dfc53453c3" response_time:0.002963554 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"13dd99ed6ea14603" x_b3_spanid:"13dd99ed6ea14603" x_b3_parentspanid:"-" +® ƒ›òØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾Ä¬½óØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.707+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6323df8f-afa2-4260-542f-998766ed2941" response_time:0.003605679 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c762b553e8df45cd" x_b3_spanid:"c762b553e8df45cd" x_b3_parentspanid:"-" +À¼¬½óØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑÜèóØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:16.793+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"875efa6e-d511-47bc-6217-91c9b213c919" response_time:0.00812346 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5130633693fe5bee" x_b3_spanid:"5130633693fe5bee" x_b3_parentspanid:"-" +˜úÛèóØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»Æ¾ÄôØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.991+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"192b201e-08e8-4833-693e-7c78d34256a8" response_time:0.002597833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6cafe983aeb53e3c" x_b3_spanid:"6cafe983aeb53e3c" x_b3_parentspanid:"-" +о¾ÄôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ‹½ÕôØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.027+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33964" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d19e8e8b-4188-4a2e-6558-01f63d0451dc" response_time:0.002278113 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"202b857de8e303ce" x_b3_spanid:"202b857de8e303ce" x_b3_parentspanid:"-" +­ÿ¼ÕôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýðµàôØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"270b5ecc-cb18-4379-4c5e-18be7a5c8eea" response_time:0.001698682 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b79f38cbe977cc34" x_b3_spanid:"b79f38cbe977cc34" x_b3_parentspanid:"-" +ßéµàôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍàßßõØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.317+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25047" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5579c39b-86ef-44aa-7f2f-7e861af4cc9b" response_time:0.002206622 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"585e46d9349f5a54" x_b3_spanid:"585e46d9349f5a54" x_b3_parentspanid:"-" + ÙßßõØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ìõ¤ýöØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.647+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08c1a20f-1c6f-4370-6173-3e3ff3332cd5" response_time:0.002248987 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e23e9d4e49c6fbac" x_b3_spanid:"e23e9d4e49c6fbac" x_b3_parentspanid:"-" +Ýç¤ýöØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š´ËŠ÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.676+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34514" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"faad15c5-b6d6-4dd3-460f-2e69fd2afe16" response_time:0.001681238 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe482137f0e21b67" x_b3_spanid:"fe482137f0e21b67" x_b3_parentspanid:"-" +„©ËŠ÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôÕ¨øØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.924+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"895fc7f0-15ac-48e7-631b-a73376a48b59" response_time:0.002041094 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"722661c62161c33d" x_b3_spanid:"722661c62161c33d" x_b3_parentspanid:"-" +†Î¨øØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëš‘øØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.957+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25439" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea2f75d2-7c8a-419c-445b-34836d303977" response_time:0.002363939 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a72e33a64fd9f04" x_b3_spanid:"6a72e33a64fd9f04" x_b3_parentspanid:"-" +օ𑸨œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ÜŸüØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e88401eb-3422-48ce-5121-7c839a1f98c6" response_time:0.010413908 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fcae9d48b629e136" x_b3_spanid:"fcae9d48b629e136" x_b3_parentspanid:"-" +¯ÜŸüØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÂéþØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.752+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22961" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2a2c7df-423d-4658-6cc7-08842b6d31b2" response_time:0.003433888 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30de31014efd141d" x_b3_spanid:"30de31014efd141d" x_b3_parentspanid:"-" +³ÆÂéþØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÇËå¼ÿØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.929+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3e24a7c3-1535-4c36-5201-f24f37f8d1d3" response_time:0.001589116 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2ab9e6691d46f67" x_b3_spanid:"c2ab9e6691d46f67" x_b3_parentspanid:"-" +Å¿å¼ÿØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™ä¡¯€ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:20.169+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25631" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9c7da331-cf26-4ad1-4fb7-7279b2a6c307" response_time:0.00155792 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c73822d7bc883904" x_b3_spanid:"c73822d7bc883904" x_b3_parentspanid:"-" +˜Ù¡¯€ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò°–°ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.436+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25923" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b6834f15-67dc-450d-6671-dd409df0ef0e" response_time:0.005165539 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"532b7246d83d08cd" x_b3_spanid:"532b7246d83d08cd" x_b3_parentspanid:"-" +·©–°ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äì»Þ‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.805+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"851b61bc-5eae-4bed-4706-7a1ea636b3ce" response_time:0.001629765 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"962a498f50f2c0e4" x_b3_spanid:"962a498f50f2c0e4" x_b3_parentspanid:"-" +íä»Þ‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›÷´ç‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.823+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19705" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64f34dc4-d084-47ef-772d-22c751e8835e" response_time:0.001461141 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa5a182933a9fd78" x_b3_spanid:"fa5a182933a9fd78" x_b3_parentspanid:"-" +°ð´ç‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ùê쌃ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.902+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34514" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f114f981-036f-4168-7275-d560b2688aad" response_time:0.001353919 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"131d46af4086526c" x_b3_spanid:"131d46af4086526c" x_b3_parentspanid:"-" +â쌃ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûµ¾¡ƒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.945+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20199" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2bbf211f-ebb6-4da1-45e0-9356a028c172" response_time:0.001373004 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5fb263103153b38" x_b3_spanid:"a5fb263103153b38" x_b3_parentspanid:"-" +«¾¡ƒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûîËÿ†ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.948+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f30fd84e-4c93-498d-6568-95b7baff00ab" response_time:0.001459523 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95e5abfc97e76e5b" x_b3_spanid:"95e5abfc97e76e5b" x_b3_parentspanid:"-" +®ãËÿ†ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™¡âŠÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.816+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19709" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"92d3bcde-32e5-433a-40ea-9781b002744a" response_time:0.001831976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"acf9e12340571fb7" x_b3_spanid:"acf9e12340571fb7" x_b3_parentspanid:"-" +“šâŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô‚ñµ’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.014+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f2ada789-b3ac-42da-64ad-1992082d488b" response_time:0.001520714 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6dc3989affa6c0e" x_b3_spanid:"e6dc3989affa6c0e" x_b3_parentspanid:"-" +œûðµ’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â–çÿ’ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.168+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2ed2986-bf24-4d2c-7f12-579e4759ea24" response_time:0.002499969 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cd6eb2d30069aa5" x_b3_spanid:"1cd6eb2d30069aa5" x_b3_parentspanid:"-" +ô‡çÿ’ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ª¦Û”ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:25.630+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c1c8691e-c07d-49ad-7249-3f0d7832a402" response_time:0.001485435 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"47cff8e58f8edc6e" x_b3_spanid:"47cff8e58f8edc6e" x_b3_parentspanid:"-" +Üœ¦Û”ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿¤ñÓ«ÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:31.788+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d91c3d8b-9d84-46d0-7c2d-a09676320147" response_time:0.0020864 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00f5fe37f42fea06" x_b3_spanid:"00f5fe37f42fea06" x_b3_parentspanid:"-" +Ú™ñÓ«ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯’±Â¯ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:32.824+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21751" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e8eab65-ac17-4c04-5364-9e797be0de36" response_time:0.002392598 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9bba27da85b3af0" x_b3_spanid:"a9bba27da85b3af0" x_b3_parentspanid:"-" +·†±Â¯ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸á¨½²ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.620+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c9fd8b1a-fb6c-4b2e-79d6-c4e015259a3d" response_time:0.001576725 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02210025044e174c" x_b3_spanid:"02210025044e174c" x_b3_parentspanid:"-" +–Ô¨½²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒº¸Ì²ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.652+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"834df62f-e357-4fb0-77ff-a141c604a5ce" response_time:0.001418413 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c17e569a0f98848b" x_b3_spanid:"c17e569a0f98848b" x_b3_parentspanid:"-" +‹¯¸Ì²ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÍ•š³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.814+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"892d8952-c676-406f-4653-22e5acb2750d" response_time:0.001919715 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2e72dd9a8ccf030" x_b3_spanid:"c2e72dd9a8ccf030" x_b3_parentspanid:"-" +£Â•š³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Â׉¼³ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:33.882+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a31f107d-1c60-4cc6-523a-23f45ff45e97" response_time:0.004583873 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad1479c9956db720" x_b3_spanid:"ad1479c9956db720" x_b3_parentspanid:"-" +¼Â‰¼³ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0››ŠÇµÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c34fd694-bf46-4ff2-5aff-9b7f952e3a92" response_time:0.001539911 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0557549cb80e0ab4" x_b3_spanid:"0557549cb80e0ab4" x_b3_parentspanid:"-" +‘“ŠÇµÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û§ý¦¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.647+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dab13f29-c7a7-48b9-60d6-a6370ac64659" response_time:0.001270482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b123d7f041adbe2b" x_b3_spanid:"b123d7f041adbe2b" x_b3_parentspanid:"-" +µ ý¦¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·ªã¨¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.649+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b9102c59-09aa-4d0c-4b2e-bed6fc2f3b32" response_time:0.003135604 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf2cd5784a64c131" x_b3_spanid:"cf2cd5784a64c131" x_b3_parentspanid:"-" +  ã¨¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´©«¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.656+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0c1fcd1-a185-4d44-7d29-717b757a33a4" response_time:0.002031891 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c518c261cf94ac1a" x_b3_spanid:"c518c261cf94ac1a" x_b3_parentspanid:"-" +¿€©«¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È¢ˆ¯¶ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.664+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d660f863-a4c4-42e9-7fe2-40dc2072b7b2" response_time:0.001387764 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd0629df9957a380" x_b3_spanid:"fd0629df9957a380" x_b3_parentspanid:"-" +À–ˆ¯¶ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»ñ´¨·ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.918+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fcc3189b-3c8c-4730-7e7d-a615f12c55b3" response_time:0.001880475 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a64883ba567a725" x_b3_spanid:"1a64883ba567a725" x_b3_parentspanid:"-" +«ä´¨·ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö슺ٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.661+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a00882e-9686-4795-7ae5-bafbde3aede5" response_time:0.002234751 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd8ce4b58b7131ce" x_b3_spanid:"fd8ce4b58b7131ce" x_b3_parentspanid:"-" +ԇ슺ٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•ßÚ×¼ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.357+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c84a001b-a73e-4472-40f7-580b7ff326d5" response_time:0.004619104 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94200bcd417fc717" x_b3_spanid:"94200bcd417fc717" x_b3_parentspanid:"-" +±ÕÚ×¼ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚©·§½ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.527+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"37e04747-abf5-4de6-59e4-910a17f0d5b6" response_time:0.001829382 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c708a3b5a306a80" x_b3_spanid:"7c708a3b5a306a80" x_b3_parentspanid:"-" +«œ·§½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ŧµ½ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:36.554+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27b2296a-a8fe-490e-4a3b-c078696bb438" response_time:0.00362217 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b9f23cc068efc3c" x_b3_spanid:"6b9f23cc068efc3c" x_b3_parentspanid:"-" +ò¶§µ½ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Òþ˜œ¿ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.040+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a83eed0-a3f4-487f-760d-e6a7d8909d60" response_time:0.001363437 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94f9812853cf1899" x_b3_spanid:"94f9812853cf1899" x_b3_parentspanid:"-" +îõ˜œ¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï¶Ý‰ÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.270+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69013990-460b-43cc-7a62-7509eaf49bb2" response_time:0.001581388 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e4b98610b5b8c2a" x_b3_spanid:"9e4b98610b5b8c2a" x_b3_parentspanid:"-" +î¬Ý‰ÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝÀžÀÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.380+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4edd132d-0ec9-45d3-6279-61056b02b28d" response_time:0.001939658 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7f70cdd6634a3b51" x_b3_spanid:"7f70cdd6634a3b51" x_b3_parentspanid:"-" +á²Å¾ÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éú¡ÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.854+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1634699a-7817-4816-5bb3-61db635bc5a8" response_time:0.005250888 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de1491d78a1bca58" x_b3_spanid:"de1491d78a1bca58" x_b3_parentspanid:"-" +³œú¡ÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›òÉþ˜ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:26.774+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a89f95d9-26ea-4d0e-7ed9-6d731b5e6854" response_time:0.004803426 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc3d542c7cca288f" x_b3_spanid:"cc3d542c7cca288f" x_b3_parentspanid:"-" +˜ëÉþ˜ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºžŽò™ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:27.019+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0fae0fe-8baf-4963-41b2-129ce7a29804" response_time:0.001847762 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2071d8befcfc2c7c" x_b3_spanid:"2071d8befcfc2c7c" x_b3_parentspanid:"-" +Ù‘Žò™ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªÓ¼åœÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:27.798+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7f7ca6a-62ca-41f9-486f-aa50a601e3e8" response_time:0.00255944 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c4f96f65cb85bc7" x_b3_spanid:"4c4f96f65cb85bc7" x_b3_parentspanid:"-" +ðǼåœÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›¤Ñž ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.723+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cab3b5eb-8a35-40dd-4d25-eb4db36f2eae" response_time:0.002709149 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06a2ca70f1b1008f" x_b3_spanid:"06a2ca70f1b1008f" x_b3_parentspanid:"-" +òšÑž ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø›ÿ݈ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.773+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c16e78bc-9501-4fa0-5560-438b8ef3a934" response_time:0.002279217 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c74840fc2c7db907" x_b3_spanid:"c74840fc2c7db907" x_b3_parentspanid:"-" +½’ÿ݈ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î«ôŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.221+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb35d4d9-e3b0-41f3-5335-be88a6474d6f" response_time:0.001474437 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59582da74a244f07" x_b3_spanid:"59582da74a244f07" x_b3_parentspanid:"-" +“ôŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ߘåêÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.680+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0512f4e-5c1f-4977-5b2b-ad559743580e" response_time:0.001473168 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6200becc7626dff2" x_b3_spanid:"6200becc7626dff2" x_b3_parentspanid:"-" +”‘åêÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ê¥øúÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.713+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8dd282d2-add1-4d0e-64e1-14440f5b796f" response_time:0.001809416 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"65d2b56065a8dd94" x_b3_spanid:"65d2b56065a8dd94" x_b3_parentspanid:"-" +ž—øúÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðøñÞ“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.727+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a951a50d-dddf-480f-5269-aecd5c6bb074" response_time:0.003374366 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d5e70133b2c480d" x_b3_spanid:"4d5e70133b2c480d" x_b3_parentspanid:"-" +ÖññÞ“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÜž¿–ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.468+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13bebbe1-b69c-487b-42e1-22cca17e1157" response_time:0.00151321 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"16afc1153e12d050" x_b3_spanid:"16afc1153e12d050" x_b3_parentspanid:"-" +ƒÌž¿–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»õˆšÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5fd61d50-6c19-4aff-4098-31665ffd92ae" response_time:0.006625435 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a86377cea7e34f4" x_b3_spanid:"0a86377cea7e34f4" x_b3_parentspanid:"-" +ŽÙˆšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”ÓÊšÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6299f0b0-16b9-405a-5360-9cd6fe244635" response_time:0.00525455 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b42519c08d6e103" x_b3_spanid:"8b42519c08d6e103" x_b3_parentspanid:"-" +çÓÊšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥õ²®›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.772+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c8cdc3b-3019-4eca-56f2-a3112c274c2d" response_time:0.004322736 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11f761cb0bdf98f6" x_b3_spanid:"11f761cb0bdf98f6" x_b3_parentspanid:"-" +»ç²®›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëåµ¾›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.808+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad6abeff-3979-4a23-5793-ef4445ece67d" response_time:0.002071375 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de2ebbb857b53dd9" x_b3_spanid:"de2ebbb857b53dd9" x_b3_parentspanid:"-" +”Öµ¾›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Á¨Þ›¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.299+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18063" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2c2cbd7-d81d-41ab-788d-d365c3d7e73f" response_time:0.001451357 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"706bd233787d184b" x_b3_spanid:"706bd233787d184b" x_b3_parentspanid:"-" +ݘޛ¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÀŠàšÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.605+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ad641c0-0b09-4d75-52cc-aaefbfdf6859" response_time:0.006756603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70b3046651490f42" x_b3_spanid:"70b3046651490f42" x_b3_parentspanid:"-" +ø·ŠàšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³ÒÙìÞΜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:10:27.573+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7926" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54ec7262-38ac-4f52-6a74-ec9bce7d9c8a" response_time:0.002373849 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78bd0b8beb09d2d3" x_b3_spanid:"78bd0b8beb09d2d3" x_b3_parentspanid:"-" +ÐÆÙìÞΜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹Ÿ¤ÃêלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:39.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f4e195fd-2fb1-4091-4c6f-35d164a5ea58" response_time:0.002885009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31fcacd9087186d4" x_b3_spanid:"31fcacd9087186d4" x_b3_parentspanid:"-" +Ø—¤ÃêלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÙâ·ïלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:41.259+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1044" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0022fafa-90c3-4227-5cf0-c3bf4c11a750" response_time:0.006245153 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31a43466580173f2" x_b3_spanid:"31a43466580173f2" x_b3_parentspanid:"-" +‰Ïâ·ïלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý­±ÿóלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:42.486+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ab2a47b-8339-4fb0-47eb-8c7b0c05d4ee" response_time:0.003208822 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b15d277d724ed3b7" x_b3_spanid:"b15d277d724ed3b7" x_b3_parentspanid:"-" +êǰÿóלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’‹û×ôלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:42.665+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4098" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"caec0ce0-eba0-45c0-4115-6bea5fc3cdd6" response_time:0.009447889 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4bf9e44f21ce5c63" x_b3_spanid:"4bf9e44f21ce5c63" x_b3_parentspanid:"-" +Éþú×ôלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ãÏÀöלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:43.159+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2790" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0b15e7b-1020-45da-742b-b15d5a6a6464" response_time:0.003374538 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69a5595811863fb8" x_b3_spanid:"69a5595811863fb8" x_b3_parentspanid:"-" +ÄÛÏÀöלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËÛ‹õöלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:43.270+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2790" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f06e21b9-cfc6-4476-54c5-e602c56901c8" response_time:0.002200455 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ceaa560bea73349c" x_b3_spanid:"ceaa560bea73349c" x_b3_parentspanid:"-" +’ЋõöלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·òÂ÷ûלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.616+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c9dc01af-8561-4455-6a06-581f21a4d99b" response_time:0.003936066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cbf6580fa28fdf88" x_b3_spanid:"cbf6580fa28fdf88" x_b3_parentspanid:"-" +ŽæÂ÷ûלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹Äå¤þלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:45.248+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4616" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb6b5803-1df1-4656-5ce9-d0a355a6f98e" response_time:0.003475974 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6c6f558bbea6ec9" x_b3_spanid:"a6c6f558bbea6ec9" x_b3_parentspanid:"-" +×·å¤þלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿©ƒü…ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:47.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d19a9571-b7f0-4a6e-7203-7b8d622f2c00" response_time:0.003299611 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af243c9667f8f536" x_b3_spanid:"af243c9667f8f536" x_b3_parentspanid:"-" +Õžƒü…ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…¬õð†ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:47.557+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2790" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f050f643-e009-411d-7ac4-3c8efbb804c4" response_time:0.002297114 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29976e05d8f6efb8" x_b3_spanid:"29976e05d8f6efb8" x_b3_parentspanid:"-" +„£õð†ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ð¦ŠØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64847" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9c4d84d2-c345-403c-6405-d984cd71fb33" response_time:0.003023465 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"565f9fb0684c1623" x_b3_spanid:"565f9fb0684c1623" x_b3_parentspanid:"-" +†¦ŠØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§Æ¦ŠØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:48.473+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a8ca0a21-de51-460d-6456-40c83200f2ce" response_time:0.003265629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ceeffa97a8b68732" x_b3_spanid:"ceeffa97a8b68732" x_b3_parentspanid:"-" +þ„Æ¦ŠØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø¶ŠŒØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:48.949+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2942" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5435fb3-23af-4f40-7308-3a0302e9875a" response_time:0.005733872 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"519fbcd180a6c837" x_b3_spanid:"519fbcd180a6c837" x_b3_parentspanid:"-" +ã¶ŠŒØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯±Ð²ØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:49.836+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3242" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6bd8db16-eae4-46df-6834-aca7346b8cfb" response_time:0.00767292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"363770ca3bdded2f" x_b3_spanid:"363770ca3bdded2f" x_b3_parentspanid:"-" +¯§Ð²ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›Ùá´ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:49.846+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3242" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5e390c7-26c5-4136-713b-c3531b9a1975" response_time:0.002559205 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c5831d41bc01d06" x_b3_spanid:"4c5831d41bc01d06" x_b3_parentspanid:"-" +›Îá´ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0蠳؜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:50.109+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2798da6c-a5bf-4ac2-415e-1868c1216721" response_time:0.004609923 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"094656844c98a6ad" x_b3_spanid:"094656844c98a6ad" x_b3_parentspanid:"-" +š‡ ³ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áôÈ»’ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.664+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba134609-ee30-4db1-4ed0-27e420913684" response_time:0.003800308 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"09fee417d403491a" x_b3_spanid:"09fee417d403491a" x_b3_parentspanid:"-" +‡çÈ»’ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0њŇ•ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:51.362+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"920da1bb-845a-4ffb-50d8-483626f9e466" response_time:0.002313118 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7d646e046eeb2ffa" x_b3_spanid:"7d646e046eeb2ffa" x_b3_parentspanid:"-" +ƒÅ‡•ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Âüì¹–ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.736+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3da027a-9621-42fb-728f-ece9274fd2dd" response_time:0.002393839 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"484cc62055fd5e21" x_b3_spanid:"484cc62055fd5e21" x_b3_parentspanid:"-" +óðì¹–ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆÞÄþ—ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:52.142+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3a5e081-62fe-4592-76af-89f43f99450b" response_time:0.009031514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5179c6096fc5b2e" x_b3_spanid:"b5179c6096fc5b2e" x_b3_parentspanid:"-" +ÒÓÄþ—ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0é‰Ï‹˜ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:52.174+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b174008f-613c-4b27-740e-f5f731fa3a22" response_time:0.003717866 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"451bbd009db153ca" x_b3_spanid:"451bbd009db153ca" x_b3_parentspanid:"-" +¢þ΋˜ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó‹ƒŸ™ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:52.485+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"92aeea5e-60b9-48f4-47e0-d75877779fe1" response_time:0.002284469 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8213142cea81e26" x_b3_spanid:"c8213142cea81e26" x_b3_parentspanid:"-" +«ƒƒŸ™ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Ç’µ™ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:52.531+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fef3ddf6-b7fe-4248-71e7-a7b223d010e1" response_time:0.002782726 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4605f300ce58ae9e" x_b3_spanid:"4605f300ce58ae9e" x_b3_parentspanid:"-" +©½’µ™ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ш›ÌšØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:52.847+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61e655ea-9cbc-4348-523c-c54da90fd691" response_time:0.003146147 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5114a0232779fc66" x_b3_spanid:"5114a0232779fc66" x_b3_parentspanid:"-" +´š›ÌšØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò¼ÎýšØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:52.951+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60899" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"11703cd1-8cd9-43d4-50fb-19151764717b" response_time:0.003045013 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d9c4c1ef1b51d46a" x_b3_spanid:"d9c4c1ef1b51d46a" x_b3_parentspanid:"-" +ͳÎýšØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×£ãØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:53.556+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4616" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4249a89-fdd4-492a-5e57-6923add41eb5" response_time:0.002782104 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"973c87f30a968cbc" x_b3_spanid:"973c87f30a968cbc" x_b3_parentspanid:"-" +à›ãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄÕåÁžØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:53.898+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18c6f127-16b6-41ae-75fe-8eeed32cdc30" response_time:0.004195391 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08de7645a248d3cb" x_b3_spanid:"08de7645a248d3cb" x_b3_parentspanid:"-" +ìÎåÁžØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì«ûøŸØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:54.284+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2790" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d1949812-8346-4ce3-68cc-fb486ad021e9" response_time:0.002505616 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bf8d513ab1594149" x_b3_spanid:"bf8d513ab1594149" x_b3_parentspanid:"-" +¥¤ûøŸØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃÔΚ؜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:54.710+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7136caf9-8af4-48ed-715a-2ab2c6cf8d1a" response_time:0.00557505 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ffb9a53acdafe48" x_b3_spanid:"0ffb9a53acdafe48" x_b3_parentspanid:"-" +³ÌΚ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Ô ¢ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.903+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2db76108-5a4a-40a4-5d36-9e115f2a7bab" response_time:0.002512113 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70021c36f5d7de0e" x_b3_spanid:"70021c36f5d7de0e" x_b3_parentspanid:"-" +ñÚŽ ¢ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×·ÑТ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.004+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4454a5f0-ce10-4368-44b9-6e85054d47bf" response_time:0.003097052 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d45d8769f8ddf9dc" x_b3_spanid:"d45d8769f8ddf9dc" x_b3_parentspanid:"-" +Ó¯ÑТ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ÏŒß¢ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.034+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"510b1ec9-817f-4ac6-69eb-8689631c5f62" response_time:0.003186409 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a295be73852c84e6" x_b3_spanid:"a295be73852c84e6" x_b3_parentspanid:"-" +ÈŌߢ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ𬻧؜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:56.302+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e694d10-bf78-487a-78fd-da586571d69f" response_time:0.002657623 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bbfbb52c58280b0d" x_b3_spanid:"bbfbb52c58280b0d" x_b3_parentspanid:"-" +×謻§ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”¤¸™¨ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.499+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"03e50c75-e53c-4a5f-62d5-49a0e59ca15e" response_time:0.003313649 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29357954331d7a93" x_b3_spanid:"29357954331d7a93" x_b3_parentspanid:"-" +•œ¸™¨ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÃèù¨ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.701+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64129" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b91e776f-59af-4631-5602-54a613639137" response_time:0.003774803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a615bb50f9488eb6" x_b3_spanid:"a615bb50f9488eb6" x_b3_parentspanid:"-" +ȸèù¨ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œÝ§‚°ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:58.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2942" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"637d3855-21ed-4917-563b-9d13a40b627b" response_time:0.002329956 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6996929e2c586178" x_b3_spanid:"6996929e2c586178" x_b3_parentspanid:"-" +ßѧ‚°ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž§ÖÒ°ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:58.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2942" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4b90528-0a49-4088-7831-1c6aa6508416" response_time:0.002697895 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3a91ed529a7b80a6" x_b3_spanid:"3a91ed529a7b80a6" x_b3_parentspanid:"-" +£™ÖÒ°ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸âíÞ÷לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:43.492+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a032a97f-4ef2-41b3-5a95-30dcd1b3c30a" response_time:0.002910858 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bec35f4f800f4d3b" x_b3_spanid:"bec35f4f800f4d3b" x_b3_parentspanid:"-" +ÚÚíÞ÷לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚Ô™æø×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:43.776+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55608" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"769fcfab-1fcf-4946-61dc-9cbb909f4332" response_time:0.002407436 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8827517925fd662a" x_b3_spanid:"8827517925fd662a" x_b3_parentspanid:"-" +áË™æø×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼þ¯€ùלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:43.831+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55608" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c55b3fc5-54b6-4b49-4b6b-fd6031d361ce" response_time:0.002648047 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c5fd0893839d0a99" x_b3_spanid:"c5fd0893839d0a99" x_b3_parentspanid:"-" +óö¯€ùלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º¬ùלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:43.922+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56278" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ba38b6e-96a1-49d2-683b-4e39e9d0897e" response_time:0.002825824 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"44ab531e05fa62a7" x_b3_spanid:"44ab531e05fa62a7" x_b3_parentspanid:"-" +Ó¬¬ùלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒݦªùלÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:43.909+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1044" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a93a587-de3f-44dd-7cd8-cbccd6ff5c74" response_time:0.01251983 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"db58f5f5d23f0390" x_b3_spanid:"db58f5f5d23f0390" x_b3_parentspanid:"-" +ÃЦªùלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0סƒŒúלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.123+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69667bdc-4701-48cc-5769-e8edefe82d93" response_time:0.003155252 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8bde6e5f7476f12c" x_b3_spanid:"8bde6e5f7476f12c" x_b3_parentspanid:"-" +Ê—ƒŒúלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬åðšúלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.154+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:64129" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f914d755-9522-44bd-6df0-08688b472613" response_time:0.003071639 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54149e8aa1d17821" x_b3_spanid:"54149e8aa1d17821" x_b3_parentspanid:"-" +’ÙðšúלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š‚²ÎúלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.262+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd85082b-73c9-4b99-6f80-fad5b6d7aaad" response_time:0.002808891 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8281d2426c0318f" x_b3_spanid:"c8281d2426c0318f" x_b3_parentspanid:"-" +¿ú±ÎúלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žï¿óúלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.341+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"32d355e2-1c79-4f9b-40d4-7095e32b7b64" response_time:0.002526164 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6df0ab5e596fc71" x_b3_spanid:"c6df0ab5e596fc71" x_b3_parentspanid:"-" +Ñæ¿óúלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿÅÎýúלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.360+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7a0cb65-2468-4fcf-55ef-557e41985ea3" response_time:0.004090104 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"080c9be0ef2a98d5" x_b3_spanid:"080c9be0ef2a98d5" x_b3_parentspanid:"-" +¼»ÎýúלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷‡ã¨ûלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.452+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee4b6010-3b2c-4216-5a91-9914cfa0638b" response_time:0.003010331 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8c34a64f6abb932" x_b3_spanid:"c8c34a64f6abb932" x_b3_parentspanid:"-" +…€ã¨ûלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…À“´ûלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.471+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53180" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1a6fa70c-41ea-41a7-6466-b50220366034" response_time:0.007715835 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1274dfff4e9709c9" x_b3_spanid:"1274dfff4e9709c9" x_b3_parentspanid:"-" +‚´“´ûלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™ìôäûלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.578+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c2bc1a6-c5ae-49c0-6e0c-b9594f2a0ba9" response_time:0.003030605 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce93c6f70dbb3432" x_b3_spanid:"ce93c6f70dbb3432" x_b3_parentspanid:"-" +ìáôäûלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€ýµ™üלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.688+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a64cf384-f040-428b-5e01-5bcb2396e295" response_time:0.002788734 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f6badb2324ec1429" x_b3_spanid:"f6badb2324ec1429" x_b3_parentspanid:"-" +Ñõµ™üלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÛøÖüלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.814+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e56bf53f-9928-4c8b-5f89-6bf176078e75" response_time:0.006368647 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d1523aca65eb8fd" x_b3_spanid:"3d1523aca65eb8fd" x_b3_parentspanid:"-" +ÏøÖüלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûŸòáüלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.840+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3093c20-5019-4df6-74de-10708609b326" response_time:0.002999732 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff002763b148a400" x_b3_spanid:"ff002763b148a400" x_b3_parentspanid:"-" +Ô•òáüלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ÚˆëüלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:44.858+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c9c5eaa1-cfd3-4956-6a85-4eafc2d042a0" response_time:0.004045826 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af3451b250524c93" x_b3_spanid:"af3451b250524c93" x_b3_parentspanid:"-" +àÒˆëüלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ Ï»ýלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6368de5-fbaa-498a-66a2-a9b11f3b1df4" response_time:0.008400808 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6fcdf9463364b11d" x_b3_spanid:"6fcdf9463364b11d" x_b3_parentspanid:"-" +÷˜Ï»ýלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ¤×ÈýלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.056+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06c3c64a-611d-47f6-5d79-355cf0814bbe" response_time:0.003015923 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5cb1dae93e584ebb" x_b3_spanid:"5cb1dae93e584ebb" x_b3_parentspanid:"-" +¥œ×ÈýלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„—øëÿלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:45.659+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abe83284-fc36-4811-422f-bd7143b9ba6b" response_time:0.009895653 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27ea7afb36481145" x_b3_spanid:"27ea7afb36481145" x_b3_parentspanid:"-" +ôˆøëÿלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÝÍ–€ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.755+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"334bc140-d0d6-4d4d-4271-13f79a1371c0" response_time:0.004171186 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6724328b876bbde" x_b3_spanid:"d6724328b876bbde" x_b3_parentspanid:"-" +™ÏÍ–€ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êɾ€ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:45.836+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2b3c13c-c364-4d7d-6274-f284203edf60" response_time:0.007010457 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c3bc7a7841ac239" x_b3_spanid:"8c3bc7a7841ac239" x_b3_parentspanid:"-" +òÁ¾€ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨¢³ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.010+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53180" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"285a7434-b5ab-40e9-6952-314514d6349c" response_time:0.004360666 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e96daac059c92f74" x_b3_spanid:"e96daac059c92f74" x_b3_parentspanid:"-" +ôš³ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø·œÏØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:46.142+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d28798d9-e9eb-4a74-663d-ff7ca18d4e33" response_time:0.003332532 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"907db51e0113f0ef" x_b3_spanid:"907db51e0113f0ef" x_b3_parentspanid:"-" +ϯœÏØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µýโ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.366+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"95e682f8-e212-496d-4935-37174e85d537" response_time:0.003120321 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc0bd2e97a388e33" x_b3_spanid:"cc0bd2e97a388e33" x_b3_parentspanid:"-" +Éóโ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜°§ƒØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:46.595+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69168f52-9b4b-4cb1-6aa2-9f2f95472835" response_time:0.00368349 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52870f932f637603" x_b3_spanid:"52870f932f637603" x_b3_parentspanid:"-" +Ç §ƒØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓۊɃ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.667+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59de7883-1792-41f0-5d14-50cee5406e59" response_time:0.002913806 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ddb3412dad665d1a" x_b3_spanid:"ddb3412dad665d1a" x_b3_parentspanid:"-" +ԊɃ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ݱ™¼„ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:46.909+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a19ac2ed-6024-472f-5a84-1a36c8e6b600" response_time:0.00251304 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"135ee1fd74d496c8" x_b3_spanid:"135ee1fd74d496c8" x_b3_parentspanid:"-" +Щ™¼„ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’¶ÔÒ„ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:46.956+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52496123-6634-4243-71bc-6a46bc37bb5c" response_time:0.002640195 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2708c999a70eeff" x_b3_spanid:"c2708c999a70eeff" x_b3_parentspanid:"-" +ªÔÒ„ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•ªäÃ…ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:47.193+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"47d90c5b-ebc4-4a88-4694-f4838e953043" response_time:0.002326922 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4b8294c0b053a34a" x_b3_spanid:"4b8294c0b053a34a" x_b3_parentspanid:"-" +¶¡äÃ…ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü–؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.401+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"400d92b2-b5ab-4957-5671-4d2f382edb4d" response_time:0.002707859 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a52dbbe374c642e9" x_b3_spanid:"a52dbbe374c642e9" x_b3_parentspanid:"-" +ߋ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÍ·‡ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:47.701+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e7bfe7c-e752-4364-4fb5-052d21348699" response_time:0.006334808 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fbcd653f77250e41" x_b3_spanid:"fbcd653f77250e41" x_b3_parentspanid:"-" +÷„Í·‡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨¬ì®ˆØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.954+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dfb2f3b1-69d8-4a40-4672-620311a02ea7" response_time:0.002876332 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fcea55cf2c64c33e" x_b3_spanid:"fcea55cf2c64c33e" x_b3_parentspanid:"-" +Ĥ쮈؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ى؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.312+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c1a812c2-8655-445b-6349-b15c88fc819e" response_time:0.002821416 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c26c505c2641929f" x_b3_spanid:"c26c505c2641929f" x_b3_parentspanid:"-" +⎱ى؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÊ„á‰ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.328+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51ff8e9a-fdbf-4471-714f-00ec564c1c6e" response_time:0.002923453 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6a9a7cf3dd05530" x_b3_spanid:"c6a9a7cf3dd05530" x_b3_parentspanid:"-" +ì¹„á‰ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°¡Ô­ŠØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.489+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56278" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f22c52fd-afb9-4771-6854-a79b1fdfadcc" response_time:0.002571313 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b963017b7e6e3abe" x_b3_spanid:"b963017b7e6e3abe" x_b3_parentspanid:"-" +£’Ô­ŠØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áþŽ‹ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.692+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2f6a2e45-540e-40de-791c-c63e1fe3b891" response_time:0.003488774 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"61d40f9d984c1353" x_b3_spanid:"61d40f9d984c1353" x_b3_parentspanid:"-" +ûùýŽ‹ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Àü«©‹ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.744+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b3bb942-8935-4c72-67fa-235724f09410" response_time:0.007029113 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ccc1220344a9bf7" x_b3_spanid:"5ccc1220344a9bf7" x_b3_parentspanid:"-" +Ëï«©‹ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òç̋؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.817+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"771141e5-5262-4ad0-5a71-b470e243aa94" response_time:0.006367236 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"50e32d00a86cf3eb" x_b3_spanid:"50e32d00a86cf3eb" x_b3_parentspanid:"-" +¾ß̋؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðö䩌؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55936" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad06d6bc-5edd-46fb-6467-9ff03cbb35c5" response_time:0.005781344 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4e42f16c15dab678" x_b3_spanid:"4e42f16c15dab678" x_b3_parentspanid:"-" + ì䩌؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢Žÿʌ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.087+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"685f8fec-0e80-4a59-6dcb-a64de99c3d3d" response_time:0.003152247 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"42083c6e0a9a6bbf" x_b3_spanid:"42083c6e0a9a6bbf" x_b3_parentspanid:"-" +Ü…ÿʌ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒú€ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.198+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55936" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3cea210-e911-49d5-5dc1-f6146204c696" response_time:0.005374635 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f5f77818179e301" x_b3_spanid:"6f5f77818179e301" x_b3_parentspanid:"-" +Ýóù€ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âãó™ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:49.252+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2adcfac-8dd3-4bb6-45a7-f743886193ab" response_time:0.00345713 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"990fc27267ed6fa0" x_b3_spanid:"990fc27267ed6fa0" x_b3_parentspanid:"-" +¯Üó™ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ÷ÔÌØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.357+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e135e2d-1b75-4a56-6e9b-fbe6e953cd18" response_time:0.004573936 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c312cf9d07cc9dd" x_b3_spanid:"1c312cf9d07cc9dd" x_b3_parentspanid:"-" +ëÔÌØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ù£ÍØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.357+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"354f6d13-6096-4d4a-6a49-00a867bcc98f" response_time:0.006356281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2680d5ce60e1b6b" x_b3_spanid:"e2680d5ce60e1b6b" x_b3_parentspanid:"-" +ƒñ£ÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý®œÞØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c672cd4f-2465-4f06-4a53-f20d2a5f4db8" response_time:0.005917332 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"778d31455bfd3f5e" x_b3_spanid:"778d31455bfd3f5e" x_b3_parentspanid:"-" +è¦œÞØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Áü´áØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:49.396+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0fb8d988-e563-4dbf-786b-b7ca10a57720" response_time:0.009224031 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26e9272a8548772a" x_b3_spanid:"26e9272a8548772a" x_b3_parentspanid:"-" +ôî´áØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0””ºñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.436+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e49a771f-5dfc-4495-4b24-4c6b0f6bbac5" response_time:0.002851474 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ca8c62fb37359643" x_b3_spanid:"ca8c62fb37359643" x_b3_parentspanid:"-" +ûˆºñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ¯¸üØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.452+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2837a0b1-6503-4c8a-68f2-5d0d3e4bdf50" response_time:0.009556191 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5b50e6baf06876ae" x_b3_spanid:"5b50e6baf06876ae" x_b3_parentspanid:"-" +Û¤¸üØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îý°ÄŽØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55936" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8721d844-01c0-4685-7936-c032234d1a77" response_time:0.003394384 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4305e6fcc240c1bd" x_b3_spanid:"4305e6fcc240c1bd" x_b3_parentspanid:"-" +Îó°ÄŽØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þøæŸØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.802+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0147052-0879-434e-634f-be6be25d4e5f" response_time:0.002747749 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"15b65a4be117d17f" x_b3_spanid:"15b65a4be117d17f" x_b3_parentspanid:"-" +ñìæŸØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂåÏñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.240+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db752a6e-ca3b-4bf7-74f9-ea86a611a834" response_time:0.004361874 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ffad922725e811f3" x_b3_spanid:"ffad922725e811f3" x_b3_parentspanid:"-" +Ž×ÏñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ѧ˩‘ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:50.347+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2790" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9aff782f-de47-4445-70ba-1e5a84fef9fc" response_time:0.015262678 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b1606f10656c1d83" x_b3_spanid:"b1606f10656c1d83" x_b3_parentspanid:"-" +êË©‘ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ƒÒö‘ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.517+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"910c5781-3bc0-4f00-6a9d-6737e29f0dc8" response_time:0.006346414 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a2292cdf886e049a" x_b3_spanid:"a2292cdf886e049a" x_b3_parentspanid:"-" +ÈûÑö‘ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ÍÁ’ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.569+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d79938d6-9b10-474c-6875-88d10bfa7c94" response_time:0.002538124 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d3657d045104c4f1" x_b3_spanid:"d3657d045104c4f1" x_b3_parentspanid:"-" +‡ÄÁ’ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³‘ü¢“ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:50.882+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:2790" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2678a596-7760-469c-6991-85f84e9dc39b" response_time:0.003136262 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a346156e8052805" x_b3_spanid:"5a346156e8052805" x_b3_parentspanid:"-" +çƒü¢“ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ…””ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.114+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0006ed1d-852f-4b2f-757d-e932970dea33" response_time:0.008304416 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6483b1c7c5f330fa" x_b3_spanid:"6483b1c7c5f330fa" x_b3_parentspanid:"-" +„ô…””ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯°Æ²•ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.452+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e68fd265-d0ae-4a2e-70bf-4b8eb31787a4" response_time:0.002755726 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc72cee5067883c5" x_b3_spanid:"fc72cee5067883c5" x_b3_parentspanid:"-" +ΩƲ•ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÂÕã–ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.819+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55896" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0d67190-2a0a-442b-6d13-a33046dfd54b" response_time:0.006650936 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2bdc32bef0ee54a8" x_b3_spanid:"2bdc32bef0ee54a8" x_b3_parentspanid:"-" +Í·Õã–ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ºæ–ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.828+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:60877" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"238d11a5-8525-4848-43bd-0e944cefb487" response_time:0.003016928 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"334c8ef81a36619a" x_b3_spanid:"334c8ef81a36619a" x_b3_parentspanid:"-" +Ù²æ–ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿÆŠšØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:52.710+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10c6b14d-71b2-4657-4a93-eb3721eb8b39" response_time:0.002964969 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f47a22962616ed0a" x_b3_spanid:"f47a22962616ed0a" x_b3_parentspanid:"-" +×þÅŠšØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—›ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:53.065+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"44fa681d-a3dc-44d2-575c-d3e07d058978" response_time:0.003162196 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"38c11585e9588400" x_b3_spanid:"38c11585e9588400" x_b3_parentspanid:"-" +‘矴›ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0䜷–ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:53.539+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"696fa9e6-d01d-4fd3-61f2-d5a33d1c3012" response_time:0.004467598 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"638cd1c9cd8bb599" x_b3_spanid:"638cd1c9cd8bb599" x_b3_parentspanid:"-" +ª•·–ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùµþèžØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:53.980+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6206ae46-dcd8-4df6-7812-14ca9a3d8152" response_time:0.004243963 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ea5e5532c0f2df9" x_b3_spanid:"2ea5e5532c0f2df9" x_b3_parentspanid:"-" +¯©þèžØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à³Ì‰ŸØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"41da45d4-dd17-4b26-5dd7-d0f1f10e9f85" response_time:0.002593025 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"000b7164424a22f2" x_b3_spanid:"000b7164424a22f2" x_b3_parentspanid:"-" +ڪ̉ŸØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸ÜµŽŸØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.060+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74ab6da1-1154-48dd-4349-1b4ccc1e04f3" response_time:0.002959983 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4424853bc376bbd" x_b3_spanid:"c4424853bc376bbd" x_b3_parentspanid:"-" +ÁÑµŽŸØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿÝíɡ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.720+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52776" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf1b3c2b-6065-48ae-52dd-2d61a1f51bea" response_time:0.004500603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"df92547c5d40038c" x_b3_spanid:"df92547c5d40038c" x_b3_parentspanid:"-" +æÒíɡ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ê£øÝ¡ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:54.762+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce10ddc7-2e97-42c3-5793-644498334e22" response_time:0.004373309 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"25aaa40b3b644682" x_b3_spanid:"25aaa40b3b644682" x_b3_parentspanid:"-" +°—øÝ¡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´û– £ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.172+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e01454cb-8a62-440d-51cc-fd2c1410dcbc" response_time:0.002406225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"87304dc4280a154d" x_b3_spanid:"87304dc4280a154d" x_b3_parentspanid:"-" +¥ð– £ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎçŽë£ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.329+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e837b52-0052-4718-47e0-290ecc452c4d" response_time:0.002689663 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"343c71e53aa79662" x_b3_spanid:"343c71e53aa79662" x_b3_parentspanid:"-" +ÉàŽë£ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ßú¢¤ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53180" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"043c1dc9-a6ac-491b-54e4-b53ba2af20b3" response_time:0.002638353 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"341674a96d660587" x_b3_spanid:"341674a96d660587" x_b3_parentspanid:"-" +îÑú¢¤ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ£­¤ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:55.466+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c61cda4-2f14-4370-4069-6072995b49c2" response_time:0.003985012 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3ec2cde84baef8a0" x_b3_spanid:"3ec2cde84baef8a0" x_b3_parentspanid:"-" +ší£­¤ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûܪĦ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6873114-e7fc-4807-6609-2bdb7b5fb95c" response_time:0.002430652 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"214970f3fb02a3b4" x_b3_spanid:"214970f3fb02a3b4" x_b3_parentspanid:"-" +àҪĦ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý¡˜§ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.228+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1222469-ae4c-4db1-772b-5b47430ede34" response_time:0.003653104 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c708dba349ad78a7" x_b3_spanid:"c708dba349ad78a7" x_b3_parentspanid:"-" +­…¡˜§ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨ƒÄ§ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.239+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55862" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e1cb6fa2-ee7d-4d88-7865-c13f233c4982" response_time:0.003061276 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ca8c76a9f163604" x_b3_spanid:"1ca8c76a9f163604" x_b3_parentspanid:"-" +ïûç؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëÏÈÆ§ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.324+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bdd3fa7a-11c3-47f8-7894-9244d8a9a203" response_time:0.004029733 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dada24099292d971" x_b3_spanid:"dada24099292d971" x_b3_parentspanid:"-" +ôÁÈÆ§ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤«Šÿ§ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:49642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7eae66ca-737b-46bc-7c4a-d74149b749af" response_time:0.003054939 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e6f2502c52f743a" x_b3_spanid:"1e6f2502c52f743a" x_b3_parentspanid:"-" +颊ÿ§ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰’šü¨ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:56.706+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f45d138-7d61-4683-6245-5b2acd15b49d" response_time:0.003780406 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1fafb4b6d1ea193a" x_b3_spanid:"1fafb4b6d1ea193a" x_b3_parentspanid:"-" +Æ„šü¨ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0© ù«ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:57.506+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe1d58ee-2267-40dd-6910-32d8f8d97ac3" response_time:0.002465105 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02ff932291efb96b" x_b3_spanid:"02ff932291efb96b" x_b3_parentspanid:"-" +»”ù«ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œü̬؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:57.680+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:49642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"85bd188e-23d8-4a2a-44e3-63142f5be0af" response_time:0.002524116 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ba57fe3f620e86cc" x_b3_spanid:"ba57fe3f620e86cc" x_b3_parentspanid:"-" +Ýî̬؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÞñѺ­ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:57.912+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3f98314-35a5-4197-669d-d153cd561d71" response_time:0.002247689 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6e8cbe776bbb260" x_b3_spanid:"c6e8cbe776bbb260" x_b3_parentspanid:"-" +ÌêѺ­ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ùï®ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.156+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8704f896-99b8-444b-7198-d18c00b79b62" response_time:0.003398537 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6ab77849243923a" x_b3_spanid:"d6ab77849243923a" x_b3_parentspanid:"-" +†òï®ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Ó‰ê®ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.279+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56278" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1749d6d7-7e3a-450d-426c-5d3adc0c5459" response_time:0.003040332 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fae69190cbac86a" x_b3_spanid:"4fae69190cbac86a" x_b3_parentspanid:"-" + Ì‰ê®ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄÔšï¯ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.559+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47000" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0600aff8-9281-4364-74e5-5155dec8dc09" response_time:0.002621269 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"711989555fe6bd36" x_b3_spanid:"711989555fe6bd36" x_b3_parentspanid:"-" +·Ìšï¯ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú¼šû¯ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.583+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"824588e2-a05d-464d-7217-77b8591c8997" response_time:0.003225198 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ce4183eaf0b4273" x_b3_spanid:"5ce4183eaf0b4273" x_b3_parentspanid:"-" +Óµšû¯ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ…È‚°ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8774176a-1163-41f7-7e30-befd6301bd4b" response_time:0.002982254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c10182b54104b559" x_b3_spanid:"c10182b54104b559" x_b3_parentspanid:"-" +”üÇ‚°ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­Ð†í°ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.823+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a0b951d-d81c-4f14-59fe-d949bec99426" response_time:0.002348412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c3982dc1839f91b" x_b3_spanid:"2c3982dc1839f91b" x_b3_parentspanid:"-" +ÐÁ†í°ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žÃÿ¾±ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.994+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52768" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"83f2c4ff-d953-4891-6e5f-6e91333e47ec" response_time:0.003050123 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5659c1775f8d5b53" x_b3_spanid:"5659c1775f8d5b53" x_b3_parentspanid:"-" +Ѹÿ¾±ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íݣܲ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:49642" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"07cd7e2b-6d5b-4682-50ea-e4c8e77a9f9d" response_time:0.003617439 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe6df844a08e8cde" x_b3_spanid:"fe6df844a08e8cde" x_b3_parentspanid:"-" +‡Ï£Ü²ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùèé´ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54ab1c55-bb5d-453f-443c-72e2742a2082" response_time:0.002807018 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6820ce75f89ed27e" x_b3_spanid:"6820ce75f89ed27e" x_b3_parentspanid:"-" +ŠÝé´ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ¯ªµØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:59.936+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:50086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a85f2c32-31a8-4cd6-5e38-0556d4e62b2f" response_time:0.00500435 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98798e07116b0614" x_b3_spanid:"98798e07116b0614" x_b3_parentspanid:"-" +ë ªµØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†”ÆÉ¶ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:00.358+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7a005fcb-29e2-4b69-62ec-474e5d79473f" response_time:0.003511672 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4505c023f4af6c39" x_b3_spanid:"4505c023f4af6c39" x_b3_parentspanid:"-" +¿‹ÆÉ¶ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çÆ½À¶ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:00.339+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04e26832-ad22-41bc-748d-caf2644b76d4" response_time:0.002756387 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08757322db2f53cb" x_b3_spanid:"08757322db2f53cb" x_b3_parentspanid:"-" +÷º½À¶ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èÏà§¶ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:00.287+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e7425e8-295c-4fe2-6bf8-bb555b65df48" response_time:0.003669152 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"feab0c86dafee6d6" x_b3_spanid:"feab0c86dafee6d6" x_b3_parentspanid:"-" +ËÃà§¶ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ذ€­·ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:00.567+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63837" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f8614d15-177f-42d9-48c7-7d0213b2abde" response_time:0.002957832 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"febcc514cf51e212" x_b3_spanid:"febcc514cf51e212" x_b3_parentspanid:"-" +À¤€­·ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛÕ˜•¹ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:01.052+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"85507efe-2b81-47fe-6477-883376e804c3" response_time:0.004598973 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"688d10b0c1d2a5ef" x_b3_spanid:"688d10b0c1d2a5ef" x_b3_parentspanid:"-" +€É˜•¹ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0СÙݻ؜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:01.741+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7ad36c63-011f-4524-45ae-41c687e25c31" response_time:0.004234352 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa27568aab3ace2e" x_b3_spanid:"fa27568aab3ace2e" x_b3_parentspanid:"-" +…”Ùݻ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ˜ì¼¾ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.479+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4a14399-b681-452f-4961-bc6d5a2a700b" response_time:0.002650578 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"684363962ecc635d" x_b3_spanid:"684363962ecc635d" x_b3_parentspanid:"-" +ߊ켾؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ߨêËÁØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60127" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4025ea45-8e16-44b5-7a35-4701a5b0cdff" response_time:0.008361066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ef96e4412bcb4c4" x_b3_spanid:"5ef96e4412bcb4c4" x_b3_parentspanid:"-" +ª¡êËÁØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘þÀͲڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:08.013+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"94d7d843-cd96-45a1-4883-ba9cbb1490a1" response_time:0.002445091 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7b76f1aad5d5f7c" x_b3_spanid:"a7b76f1aad5d5f7c" x_b3_parentspanid:"-" +ÜóÀͲڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0몤âÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:07.130+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4076ce98-3c0b-48cb-7efb-9fe120cb15f1" response_time:0.003203702 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"28d3ca1aa081ded1" x_b3_spanid:"28d3ca1aa081ded1" x_b3_parentspanid:"-" +ñž¤âÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’™Ñ¾’ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:07.593+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4236" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4dba96d2-c151-4cca-7bce-32276ade988c" response_time:0.002433566 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f444c2d49076f00a" x_b3_spanid:"f444c2d49076f00a" x_b3_parentspanid:"-" +„’Ѿ’ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÛ‰à“ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:07.930+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6096" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f646dca2-ecd0-4b60-6536-56e4439748d6" response_time:0.004015885 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce094e70008e6fa9" x_b3_spanid:"ce094e70008e6fa9" x_b3_parentspanid:"-" +ÊÔ‰à“ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ãý·Ô•ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:08.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7152" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3692389-c18c-4faa-5d4a-9d7850e70177" response_time:0.002865191 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ddd7b3c70c02523d" x_b3_spanid:"ddd7b3c70c02523d" x_b3_parentspanid:"-" +«ö·Ô•ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°¨óó–ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:08.778+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5390" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab4d1727-876f-4cd7-7863-5c0cf4766de7" response_time:0.002388098 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da82491f4715c09c" x_b3_spanid:"da82491f4715c09c" x_b3_parentspanid:"-" +ÌŸóó–ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ÿËð¦ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:13.066+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:7900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b04591c7-1329-4b25-5ddc-cbf61477fac0" response_time:0.002609014 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f1a3ccd8a26e45a" x_b3_spanid:"1f1a3ccd8a26e45a" x_b3_parentspanid:"-" +öòËð¦ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÌÝšù§ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:13.350+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4553cfea-1544-477e-496b-3b6e01d09d06" response_time:0.005484422 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c7d36f94add7075e" x_b3_spanid:"c7d36f94add7075e" x_b3_parentspanid:"-" +®Ñšù§ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§õ枬՜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:14.505+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:25224" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d705935-1e22-4adf-5b44-91d4bc7c126c" response_time:0.003114741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0f1795a0d7e7ab25" x_b3_spanid:"0f1795a0d7e7ab25" x_b3_parentspanid:"-" +èéæž¬ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í„Õ€£ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:12.026+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a3e27f5-4869-43f7-5c3c-d5ea028bac83" response_time:0.002384994 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd1e6b85ea626c10" x_b3_spanid:"fd1e6b85ea626c10" x_b3_parentspanid:"-" +ºøÔ€£ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦Å¯ß¶ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:17.321+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5372" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d784a3ec-30b4-4e7c-529e-b60e93ebeb2e" response_time:0.006294914 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9521716543ddecc" x_b3_spanid:"e9521716543ddecc" x_b3_parentspanid:"-" +Ƽ¯ß¶ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾¿Ñ½·ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:17.522+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5372" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"68e8728b-ccd9-4023-5360-aa2b8f451a8e" response_time:0.003218305 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"04508a877da1f498" x_b3_spanid:"04508a877da1f498" x_b3_parentspanid:"-" +â±Ñ½·ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú·ÌÉ·ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:17.546+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5372" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f48d63c5-68a0-4c97-4e39-9480d75dac3d" response_time:0.004703095 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f9ad5edab4031ebc" x_b3_spanid:"f9ad5edab4031ebc" x_b3_parentspanid:"-" +…©ÌÉ·ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0޽ì¯ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:15.459+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d56cc27-a029-427a-61de-882f921ec7ef" response_time:0.017304271 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a34e76c345be8885" x_b3_spanid:"a34e76c345be8885" x_b3_parentspanid:"-" +±ƒ½ì¯ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡§ß…°ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:15.527+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee287bb5-d7f8-401d-63eb-b57d9ac15035" response_time:0.002570401 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"439453fd65a062d5" x_b3_spanid:"439453fd65a062d5" x_b3_parentspanid:"-" +°ß…°ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëªæÀ¼ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:18.871+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e489af3a-59ca-4f14-4776-c45b8dde5592" response_time:0.003587968 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b72e8743488c619" x_b3_spanid:"2b72e8743488c619" x_b3_parentspanid:"-" +ºŸæÀ¼ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í÷¦Ð¼ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:18.901+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bb0f987-f72f-4e43-6bc2-347e3cff3faf" response_time:0.005973113 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a67f036993d72f95" x_b3_spanid:"a67f036993d72f95" x_b3_parentspanid:"-" +×ë¦Ð¼ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âûÙº½ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:19.127+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10874" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1a96a43b-1147-4d5c-781b-49a0a8845963" response_time:0.003000348 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b9e076efa56e3750" x_b3_spanid:"b9e076efa56e3750" x_b3_parentspanid:"-" +¥îÙº½ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨œ½¾ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:19.272+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3959e9f6-5bf4-4e61-52f0-f991995b6b87" response_time:0.005913782 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"83fc212da2f66c00" x_b3_spanid:"83fc212da2f66c00" x_b3_parentspanid:"-" +˜½¾ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æ”­®¿ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:19.615+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69730224-13fd-48f6-7f8e-47f3d7017f82" response_time:0.025204469 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ffd8b5e16776c46" x_b3_spanid:"2ffd8b5e16776c46" x_b3_parentspanid:"-" +‰­®¿ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ѳ˜œ¿ÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:19.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32396" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1392824c-e6a0-4326-75d0-2b7a4cc2724a" response_time:0.003689643 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"565b50541e652ecd" x_b3_spanid:"565b50541e652ecd" x_b3_parentspanid:"-" +£¨˜œ¿ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´“ÍòÀÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.048+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26700" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"93bb094f-48dc-48b1-5d42-3d57a5ff1999" response_time:0.004698989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c4af1592c50c95f" x_b3_spanid:"1c4af1592c50c95f" x_b3_parentspanid:"-" +á†ÍòÀÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”ȘÝÁÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.267+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32382" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be4d4ff3-644d-4557-4a0d-6c41e47171af" response_time:0.009010473 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71becb39d95374fd" x_b3_spanid:"71becb39d95374fd" x_b3_parentspanid:"-" +õ¹˜ÝÁÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿¹»…ÂÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.357+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26310" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27834058-2bd4-4fdb-40fb-0cfb777ffce1" response_time:0.003282623 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4db498e980fd2061" x_b3_spanid:"4db498e980fd2061" x_b3_parentspanid:"-" +ׯ»…ÂÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þý¨îÂÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.577+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10542" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90c9ed98-cad8-429a-5643-222989ec25d2" response_time:0.003555958 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48c236e80ccd879b" x_b3_spanid:"48c236e80ccd879b" x_b3_parentspanid:"-" +æò¨îÂÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úŸõüÃÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.877+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28534" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b1e339be-de22-4a1c-5d1a-64605fa3b62d" response_time:0.002790059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f7e18b4769bab734" x_b3_spanid:"f7e18b4769bab734" x_b3_parentspanid:"-" +û“õüÃÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒŸ‚’ÅÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:21.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10874" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f465be9-f978-4b64-7eb0-a00233b25330" response_time:0.003031261 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e8420ccff604e63e" x_b3_spanid:"e8420ccff604e63e" x_b3_parentspanid:"-" +Ý”‚’ÅÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æ£åéÅÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:21.372+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29576" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ca592c58-1bcb-4ab0-78c0-dc116f429508" response_time:0.004181801 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f8a4dd3a1d52992" x_b3_spanid:"8f8a4dd3a1d52992" x_b3_parentspanid:"-" +ñ˜åéÅÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šÌ«›ÃÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.672+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32382" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c40d1b2b-a9f9-4cb0-5583-3bd75a3ae091" response_time:0.002966926 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"344c640ad2919e00" x_b3_spanid:"344c640ad2919e00" x_b3_parentspanid:"-" +íÄ«›ÃÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³—€¨ÃÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.697+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26700" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab150623-7334-46c1-77bb-b4f7c4817968" response_time:0.004045698 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e504ff605b48c50b" x_b3_spanid:"e504ff605b48c50b" x_b3_parentspanid:"-" +ω€¨ÃÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ•‘º°ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:49.995+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16072" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"094fa96f-e7a7-4d1c-5e2c-e2b8aa3e9c4e" response_time:0.003715028 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9173741d3b4522d8" x_b3_spanid:"9173741d3b4522d8" x_b3_parentspanid:"-" +Š‘º°ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çûå°ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:50.085+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7927a006-5305-460f-45a1-023b325a4ff9" response_time:0.005688196 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a1ff483f52392c2" x_b3_spanid:"0a1ff483f52392c2" x_b3_parentspanid:"-" +ÐÛûå°ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–Œ²å¶ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:51.697+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17170" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9853c81-6d6a-40ec-7922-09602a7dc707" response_time:0.003255853 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"13bc9c2126c96098" x_b3_spanid:"13bc9c2126c96098" x_b3_parentspanid:"-" +©‚²å¶ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®ž²þ·ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:52.016+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21448" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19f98047-3836-45c5-7202-fabe2f74749b" response_time:0.004719111 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18a36c56400ab8a9" x_b3_spanid:"18a36c56400ab8a9" x_b3_parentspanid:"-" +¢–²þ·ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ†›¸ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:52.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bff148b2-c620-401d-64a5-8c93105ed92d" response_time:0.002952457 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7d257322abcfa9d" x_b3_spanid:"d7d257322abcfa9d" x_b3_parentspanid:"-" +ÈÒ†›¸ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ú⺻֜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:52.950+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b41c592d-b3d8-4fc5-7647-6a528c7e1cb2" response_time:0.002563972 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"40b7546adae8471a" x_b3_spanid:"40b7546adae8471a" x_b3_parentspanid:"-" +êî⺻֜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Êžø‘¼ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:53.133+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21520" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"41038a05-ec0b-43c9-639c-a25ef14e2422" response_time:0.002435989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10c76ed4564b7847" x_b3_spanid:"10c76ed4564b7847" x_b3_parentspanid:"-" +Þ—ø‘¼ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âýצ¼ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:53.177+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"68a3e6ec-44ec-4e35-5770-affcb636fd11" response_time:0.002513338 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cb44bd6b97e74d32" x_b3_spanid:"cb44bd6b97e74d32" x_b3_parentspanid:"-" +“÷צ¼ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬äÒù¼ÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:53.351+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"102a8eca-5067-4323-4faf-2286b3a781f9" response_time:0.00251761 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"004738d383cda0e4" x_b3_spanid:"004738d383cda0e4" x_b3_parentspanid:"-" +áÝÒù¼ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æ‚êö½ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:53.613+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b1e2d0f-9845-40b0-44e6-ac73a4b6eed5" response_time:0.002662157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac30322e87511982" x_b3_spanid:"ac30322e87511982" x_b3_parentspanid:"-" +ƒûéö½ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ä׋¾ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:53.657+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e6de4315-684f-4abd-64fc-66cda4f4b38c" response_time:0.002565527 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"189cb4c54742f347" x_b3_spanid:"189cb4c54742f347" x_b3_parentspanid:"-" +°Ø×‹¾ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔôÆ”ÂÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:54.747+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16072" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e63f571f-8b0f-492e-5c9b-609d8453fe62" response_time:0.0052745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"81afa027adf0e3c5" x_b3_spanid:"81afa027adf0e3c5" x_b3_parentspanid:"-" +˜¨Æ”ÂÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È¿• ÃÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:55.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53318" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb55d7e7-06d3-4aa5-71f7-98d5d56b5653" response_time:0.003714959 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"78cc4ea8038998db" x_b3_spanid:"78cc4ea8038998db" x_b3_parentspanid:"-" +®• ÃÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ä´¼ÅÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:55.633+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21410" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a87c8eea-2a6d-4a8c-7300-f7b8a8d2adaf" response_time:0.007252994 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9eca2d867c35282" x_b3_spanid:"e9eca2d867c35282" x_b3_parentspanid:"-" +†Ù´¼ÅÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ÑÐÐÇÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:56.217+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a1935272-e9fa-4f01-52bf-65e1e8759c3a" response_time:0.002600192 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a26f8ff312c20d38" x_b3_spanid:"a26f8ff312c20d38" x_b3_parentspanid:"-" +¬ÉÐÐÇÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁñäžÈÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:56.381+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62364e6e-d71c-489e-53eb-f3ed98253fd4" response_time:0.002676323 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d072b20fec263641" x_b3_spanid:"d072b20fec263641" x_b3_parentspanid:"-" +­êäžÈÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œé¼ƒÉÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:56.592+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55608" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75b36289-58d9-4be4-41ae-d1b7647ecdf5" response_time:0.00319333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7988aea09c319dee" x_b3_spanid:"7988aea09c319dee" x_b3_parentspanid:"-" +“ݼƒÉÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œÖ¥Ç¹ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:52.436+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6723f208-28dd-406f-68fa-94e4d4c21953" response_time:0.006681696 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8dbf66c814edf443" x_b3_spanid:"8dbf66c814edf443" x_b3_parentspanid:"-" +¯Ï¥Ç¹ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­…¤ÌÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:57.465+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63477a4b-eb2b-4c0c-4e37-85097dd1c379" response_time:0.004296221 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d430ed4f0d7730ef" x_b3_spanid:"d430ed4f0d7730ef" x_b3_parentspanid:"-" +™úޤÌÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒžÂ€ÎÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:57.928+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21410" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"da23e60b-9f45-4e91-748b-062627685856" response_time:0.002539446 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e271028d30ec084" x_b3_spanid:"3e271028d30ec084" x_b3_parentspanid:"-" +ñ’€ÎÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³ê˜ìÎÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.153+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17378" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3081424-94aa-42e7-67ec-bf6ea5e767bd" response_time:0.003379465 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd6efa67bd190e71" x_b3_spanid:"dd6efa67bd190e71" x_b3_parentspanid:"-" +úâ˜ìÎÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“£×±ÐÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:58.568+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7c7e433f-c145-4c65-6d52-6584f4311681" response_time:0.003341897 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da023ee3acef324a" x_b3_spanid:"da023ee3acef324a" x_b3_parentspanid:"-" + ›×±ÐÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛäôôËÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:57.367+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"143efd49-1c2a-4111-78d5-3bd64d6ccab3" response_time:0.002778335 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc0074831034fa2f" x_b3_spanid:"dc0074831034fa2f" x_b3_parentspanid:"-" +ÞØôôËÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹ÅÔÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:59.597+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52716" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cd0ec8f6-693b-4d1f-41fd-35de058ae3d1" response_time:0.005241578 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"101aa7eaa5fabd71" x_b3_spanid:"101aa7eaa5fabd71" x_b3_parentspanid:"-" +¾·ÔÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•ÅóúÔÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:59.794+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bc8cde9f-16bf-425e-5c7a-ed01b7e491f1" response_time:0.004447184 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa410a994f60eaa5" x_b3_spanid:"fa410a994f60eaa5" x_b3_parentspanid:"-" +“ºóúÔÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò©‡ØÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:00.626+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55936" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e29c0e36-7197-43d4-5ce1-f64c908077dc" response_time:0.003433401 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8155bffbfd8e7489" x_b3_spanid:"8155bffbfd8e7489" x_b3_parentspanid:"-" +Ù…©‡ØÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0å‹€ÚÖÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:00.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c9c6420-3d2a-4f16-48bc-06128ff9772f" response_time:0.00358568 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7345e7c8b8bccb2b" x_b3_spanid:"7345e7c8b8bccb2b" x_b3_parentspanid:"-" +΄€ÚÖÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬áÂŒ×ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:00.369+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21448" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8d4eb213-9063-4350-6d14-75faea80caec" response_time:0.002967636 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"797901dada706d41" x_b3_spanid:"797901dada706d41" x_b3_parentspanid:"-" +ÙÂŒ×ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢Ûýÿ×ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:00.611+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6aa301de-009f-4f24-715b-9b740fa70696" response_time:0.003040037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d54ad36a0f69a914" x_b3_spanid:"d54ad36a0f69a914" x_b3_parentspanid:"-" +°Óýÿ×ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óƒ÷×ßÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:02.674+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:41819" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6e2871a-5ff5-49e1-6301-3dc2d7cb3bb0" response_time:0.003587338 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be0fe563bc66e372" x_b3_spanid:"be0fe563bc66e372" x_b3_parentspanid:"-" +ßéõ×ßÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ስ¥âÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.374+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44919" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e751d24-975d-4cfb-637f-f1ad0442323e" response_time:0.003490678 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af7c925639e3ccb3" x_b3_spanid:"af7c925639e3ccb3" x_b3_parentspanid:"-" +£µ¥âÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý⫆ãÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.574+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a2d4ab7-1da7-4293-419e-a0e8e6899c7a" response_time:0.005846651 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d19c425cca9d49eb" x_b3_spanid:"d19c425cca9d49eb" x_b3_parentspanid:"-" +ÖÒ«†ãÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž‹à²ãÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.670+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42147" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"31309735-133c-472d-4552-fef79eda8f76" response_time:0.003981434 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"14b0d4d684c539f2" x_b3_spanid:"14b0d4d684c539f2" x_b3_parentspanid:"-" +â‚à²ãÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§šÅÈãÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.711+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bd88b2d8-8219-418b-6888-abc6ee48313c" response_time:0.008635328 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f387025367f21ee" x_b3_spanid:"4f387025367f21ee" x_b3_parentspanid:"-" +òŽÅÈãÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýØ­”äÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.875+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44919" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4344536-ac0e-4119-4216-5adc5628b7c3" response_time:0.003657673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cdc9cd73c1fd972b" x_b3_spanid:"cdc9cd73c1fd972b" x_b3_parentspanid:"-" +¤Ñ­”äÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†Ÿë¡äÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:03.901+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:42147" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2671c3da-a22a-497c-4b2d-956de09a5948" response_time:0.005245313 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8a791d81f9a5956e" x_b3_spanid:"8a791d81f9a5956e" x_b3_parentspanid:"-" +¨”ë¡äÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ÉÆ‚æÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.373+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:56287" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ff6f3334-b546-4fc0-75eb-7eac25f391e6" response_time:0.005001399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3ab659a70245e3e" x_b3_spanid:"b3ab659a70245e3e" x_b3_parentspanid:"-" +ù½Æ‚æÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Çø´ÒéÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:05.346+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61197" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f7e5dfd-0d0e-409d-5806-757f48068c66" response_time:0.004309563 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fb347b76bf7f6c4" x_b3_spanid:"4fb347b76bf7f6c4" x_b3_parentspanid:"-" +ï´ÒéÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÒÿìíÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:06.477+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40573" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6726ca64-15fb-4ebf-6ac3-6aecc969ff8c" response_time:0.002854549 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e45f5ac5a01fbec" x_b3_spanid:"7e45f5ac5a01fbec" x_b3_parentspanid:"-" +”ÅÿìíÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀŒÆ‰îÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:06.536+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40573" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0e6e8d5-fbf2-4a83-4540-f3be3b6cf3d4" response_time:0.004317558 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d863a29778bf9445" x_b3_spanid:"d863a29778bf9445" x_b3_parentspanid:"-" +†…ƉîÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«›©õïÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.031+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d1a9b48-a3e4-4105-6e44-38cda5359a39" response_time:0.003696545 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dbca6b97cbc244c0" x_b3_spanid:"dbca6b97cbc244c0" x_b3_parentspanid:"-" +ê©õïÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬‚ÑãðÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.262+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40573" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc070c48-c07c-46a2-616b-9400ae12c60c" response_time:0.003931307 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"190ecb4bd5962a94" x_b3_spanid:"190ecb4bd5962a94" x_b3_parentspanid:"-" +îùÐãðÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìšï˜óÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.911+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43747" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3e4e102d-222a-4eb2-72b6-1579d0bf66da" response_time:0.003471452 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cb9d6b9d8b06e562" x_b3_spanid:"cb9d6b9d8b06e562" x_b3_parentspanid:"-" +Ò“ï˜óÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü좱ôÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.231+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60113" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84fad060-55cf-4fa9-56d4-8733ab720425" response_time:0.002507128 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ca75d39aec81ab89" x_b3_spanid:"ca75d39aec81ab89" x_b3_parentspanid:"-" +¸à¢±ôÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒûÏôÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.296+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:64131" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12ea019c-82f4-4ffc-4ccf-1cb64791492d" response_time:0.002327042 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54d2de84633bc3b1" x_b3_spanid:"54d2de84633bc3b1" x_b3_parentspanid:"-" +î€ûÏôÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛÑΗõÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:41129" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"346d4ce6-17d7-43f5-68da-909c27d0b76b" response_time:0.002489806 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9af47c1755addb84" x_b3_spanid:"9af47c1755addb84" x_b3_parentspanid:"-" +ÞÂΗõÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄÐàº÷ÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:09.057+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43747" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9c926e4e-1784-4d8e-7d40-6f247e672316" response_time:0.002494301 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"68dad174d909b256" x_b3_spanid:"68dad174d909b256" x_b3_parentspanid:"-" +˜Æàº÷ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Éžƒ€ûÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.003+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60980" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7970633-7840-46d7-43ef-125b336507f6" response_time:0.007003964 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8804c9f3bd375bae" x_b3_spanid:"8804c9f3bd375bae" x_b3_parentspanid:"-" +Ø–ƒ€ûÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üÞº•üÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.321+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:44805" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b34d8542-888d-43ea-56ec-2292da56c253" response_time:0.002350034 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0154a0658399df4" x_b3_spanid:"e0154a0658399df4" x_b3_parentspanid:"-" +ÃÕº•üÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áþêØçÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:04.824+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:63955" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0576d797-ff73-4810-6c93-a642667f1180" response_time:0.003028135 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2966f92388e46d7e" x_b3_spanid:"2966f92388e46d7e" x_b3_parentspanid:"-" +€óêØçÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ‚¶€×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.462+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"161cf6df-6342-4541-7c35-73fbf1621dbd" response_time:0.002713142 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec630d6940de7afb" x_b3_spanid:"ec630d6940de7afb" x_b3_parentspanid:"-" +²•‚¶€×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔñØÄ€×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.493+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"045474a1-1ad4-42f9-75bb-42507c82947b" response_time:0.002451629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4d457fb1dd36649" x_b3_spanid:"d4d457fb1dd36649" x_b3_parentspanid:"-" +¾æØÄ€×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“•ŽÉ€×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55936" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05e912b2-d2e3-4f7d-6e85-bfeb5386698a" response_time:0.002586415 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"371ab163a5836d46" x_b3_spanid:"371ab163a5836d46" x_b3_parentspanid:"-" +™ŽÉ€×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³±Û‡‚לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.902+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53180" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c8e4abc-19c4-4a11-5cf9-e60cc3a05a36" response_time:0.002823679 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af1ceb41d83a074b" x_b3_spanid:"af1ceb41d83a074b" x_b3_parentspanid:"-" +ç¥Û‡‚לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×´Úàƒ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:12.357+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21644" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc0b5916-a183-405f-5bb6-e44c6a85cce5" response_time:0.002496587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd92b8a0369dda69" x_b3_spanid:"cd92b8a0369dda69" x_b3_parentspanid:"-" +—¨Úàƒ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÞ²î„לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:12.650+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1fe88819-4e1b-466e-76c1-9b17e56c088f" response_time:0.006371795 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"07906f62b80087b7" x_b3_spanid:"07906f62b80087b7" x_b3_parentspanid:"-" +µÒ²î„לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒËÓ¹†×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.080+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22026" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"849dc1f1-e1ea-43e3-640f-7b2f24d755da" response_time:0.003214712 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b6e0adcf34ac0a4" x_b3_spanid:"3b6e0adcf34ac0a4" x_b3_parentspanid:"-" +í¾Ó¹†×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ܦ“æ’לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20652" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a60cf508-fa4e-4e39-6b14-7e53141afb16" response_time:0.003468317 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"50a838eae3dad361" x_b3_spanid:"50a838eae3dad361" x_b3_parentspanid:"-" +®Ÿ“æ’לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ÇÕå”לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.928+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10eda0b7-d79e-4bd5-6c83-313cd2b79861" response_time:0.005378756 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ebd9973d09c47dd" x_b3_spanid:"6ebd9973d09c47dd" x_b3_parentspanid:"-" +¾½Õå”לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±úç›×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:19.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21450" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"efceab7c-4d80-406f-79ff-5b51099714de" response_time:0.00565039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0210855f8ace43ad" x_b3_spanid:"0210855f8ace43ad" x_b3_parentspanid:"-" +ûñç›×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï ö„ ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.949+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cd57fb3c-7c55-4446-56dd-96ff3eb023cf" response_time:0.003185482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f5bc7c0e93a94e7" x_b3_spanid:"8f5bc7c0e93a94e7" x_b3_parentspanid:"-" +É’ö„ ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹‡†„¡×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:20.214+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19340" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"deaa71cb-4617-46b8-4a5b-69718c167ebe" response_time:0.00503027 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c60347e804667ba" x_b3_spanid:"5c60347e804667ba" x_b3_parentspanid:"-" +Œþ…„¡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡çú­ùÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.645+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90635af2-e453-4543-5db2-5cb7e484e1de" response_time:0.00290718 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dcedb0acee09a329" x_b3_spanid:"dcedb0acee09a329" x_b3_parentspanid:"-" +Ýú­ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷‰¥ëÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.868+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"48a902c2-3a90-42ab-6449-846ced57aaff" response_time:0.003653676 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"85b3b842b54585ba" x_b3_spanid:"85b3b842b54585ba" x_b3_parentspanid:"-" +ò»‰¥ëÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ÛåíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.541+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3b64d89e-a1fb-443e-6305-03af62bb0351" response_time:0.003358894 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"818c670252fd944a" x_b3_spanid:"818c670252fd944a" x_b3_parentspanid:"-" +÷¨ÛåíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØŒÂû•ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.324+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9521582-58d6-4acd-6112-afe35ca87771" response_time:0.00270724 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af1cb5ad272a16ec" x_b3_spanid:"af1cb5ad272a16ec" x_b3_parentspanid:"-" +’Âû•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í©œî–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.565+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b530c5e4-a136-4d93-5217-3f078540d3fd" response_time:0.002446351 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b5f89bd4b30e350" x_b3_spanid:"1b5f89bd4b30e350" x_b3_parentspanid:"-" +로î–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½¢ÕΗڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.766+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"63971aee-3182-47d1-782d-c93057e2a91b" response_time:0.004231319 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"552bc9203c49f0d1" x_b3_spanid:"552bc9203c49f0d1" x_b3_parentspanid:"-" +“˜ÕΗڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý´Ì ¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.352+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51bb0dea-8b3c-4d54-5557-65beb6407a37" response_time:0.005865469 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e89a0b05f60fc93" x_b3_spanid:"1e89a0b05f60fc93" x_b3_parentspanid:"-" +ä¨Ì ¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ç©éÓ¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.221+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dcab69ea-43db-4fa5-4a49-c5c16bed4199" response_time:0.002533793 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a67fc45e930e3f35" x_b3_spanid:"a67fc45e930e3f35" x_b3_parentspanid:"-" +¿žéÓ¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦§“«±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.671+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d3cd097-1803-4e9f-546f-77c90d60e7bf" response_time:0.003470264 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5a3314d7c4ce8fb" x_b3_spanid:"b5a3314d7c4ce8fb" x_b3_parentspanid:"-" +‰“«±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Ơϑ˜ÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:23.760+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40573" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2207d9f-89be-4ae9-5146-d5adea811b3b" response_time:0.004199555 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a249de11bd0292f" x_b3_spanid:"1a249de11bd0292f" x_b3_parentspanid:"-" +¼ Ï‘ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú×Öµ’ËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:23.977+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:37295" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1a928671-b258-4291-54b0-f438ae545ba5" response_time:0.002556417 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bef2b0d945d94be6" x_b3_spanid:"bef2b0d945d94be6" x_b3_parentspanid:"-" +âÎÖµ’ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃñÖý•ËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:24.933+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40235" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3f1a37cb-7035-419f-731c-b9e6adac967c" response_time:0.002255514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9fe3766f24327875" x_b3_spanid:"9fe3766f24327875" x_b3_parentspanid:"-" +ÀæÖý•ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š©ð¯—ËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:25.306+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:40548" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"07866385-3a00-437e-5b1e-060aa5286e9f" response_time:0.002911059 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92765fd068258db3" x_b3_spanid:"92765fd068258db3" x_b3_parentspanid:"-" +±Ÿð¯—ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒê†„˜ËœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:08:25.483+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:38003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8122b4f1-a815-415b-4ecf-2f7e666eb0fa" response_time:0.002783355 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c5bbc08534f4e6c" x_b3_spanid:"4c5bbc08534f4e6c" x_b3_parentspanid:"-" +Ùㆄ˜ËœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø·ñœ¬ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:22.703+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43842" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"983c4a80-6c96-4c30-6693-023b59740af2" response_time:0.002754976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be9d16ec33761b76" x_b3_spanid:"be9d16ec33761b76" x_b3_parentspanid:"-" +Û¯ñœ¬ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëö…÷­ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:23.161+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44070" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d4c4771-a9a1-478e-4e8e-b748ee4785fd" response_time:0.002310087 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7fd7df58bbba0f39" x_b3_spanid:"7fd7df58bbba0f39" x_b3_parentspanid:"-" +öî…÷­ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þË£˜®ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:23.230+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee8144db-3c1a-4399-49b9-40d32e57c718" response_time:0.002452851 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"906353abc168a326" x_b3_spanid:"906353abc168a326" x_b3_parentspanid:"-" +Å£˜®ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚²Ò̮МÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:23.339+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d8882291-ac56-4b45-56df-5e67ef75e3c4" response_time:0.002857896 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a59949be0f5de032" x_b3_spanid:"a59949be0f5de032" x_b3_parentspanid:"-" +Ô¨Ò̮МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õΊݮМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:23.373+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1620134c-3907-4174-60cf-29e04f571259" response_time:0.003997841 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad374ec532896000" x_b3_spanid:"ad374ec532896000" x_b3_parentspanid:"-" +ãÆŠÝ®ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²å°Ð¯ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:23.616+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6566f6e-427f-4d06-794b-a338d4f68715" response_time:0.002664704 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dcd72c8f1101db4e" x_b3_spanid:"dcd72c8f1101db4e" x_b3_parentspanid:"-" +ðڰЯМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0䯙¼±ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:24.111+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44070" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1f9a201c-3109-44ac-7d31-0397b56c51d5" response_time:0.002447342 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"37eba02f93129db9" x_b3_spanid:"37eba02f93129db9" x_b3_parentspanid:"-" +ƽ™¼±ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—Ž°Ù´ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:24.977+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44070" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5da1551-43b9-4886-625f-f45c7fa48bfd" response_time:0.002514216 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"93cbbef9d65e3e25" x_b3_spanid:"93cbbef9d65e3e25" x_b3_parentspanid:"-" +˜ƒ°Ù´ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘‰¯µÐœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:25.086+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f428b491-3822-4a83-4672-811abd5bc637" response_time:0.00248016 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"12bacb058e40072d" x_b3_spanid:"12bacb058e40072d" x_b3_parentspanid:"-" +ˆÿ®µÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰¨¢†¸ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:25.876+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ebb0c066-d88d-4a4c-72ff-1c287572a1bb" response_time:0.003083134 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da273b7b268f0abc" x_b3_spanid:"da273b7b268f0abc" x_b3_parentspanid:"-" +Ô¢†¸ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žØ¤Ä¹ÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:26.274+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42440" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77e2ac43-1c96-4f97-4eb9-963019d0f838" response_time:0.004039431 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11622679015f9950" x_b3_spanid:"11622679015f9950" x_b3_parentspanid:"-" +ùФĹМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û¾®¶½ÐœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:27.320+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43842" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"455b097c-e875-45d1-6d89-369ccb6b9958" response_time:0.00223599 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"03785591a8adf8c3" x_b3_spanid:"03785591a8adf8c3" x_b3_parentspanid:"-" +²®¶½ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôõӽМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:27.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43842" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d449ec1e-41eb-4bcc-53e4-1cbec6f7bbed" response_time:0.002252473 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b4628f3677a194a8" x_b3_spanid:"b4628f3677a194a8" x_b3_parentspanid:"-" +‡„õӽМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0릧 ÂМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:28.616+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2930f06d-779e-4681-528b-3b1fb4935169" response_time:0.002230763 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"81d0d924aa6a3e82" x_b3_spanid:"81d0d924aa6a3e82" x_b3_parentspanid:"-" +šš§ ÂМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ïþ´ÐÂМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:28.716+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41446" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dfccf249-9bb8-45f6-47c0-37594ee60ffc" response_time:0.00275661 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e822ca1a7657974" x_b3_spanid:"6e822ca1a7657974" x_b3_parentspanid:"-" +³÷´ÐÂМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™×ΤÃМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:28.891+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c93717e-aba7-4da1-54c8-342fda176c27" response_time:0.00406813 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a42e487731f604d" x_b3_spanid:"5a42e487731f604d" x_b3_parentspanid:"-" +¾ÇΤÃМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ’¼ÄМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:29.117+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"98a24235-15b9-4c75-675c-047b41bb7ffc" response_time:0.004607129 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bae936b53b5f71cc" x_b3_spanid:"bae936b53b5f71cc" x_b3_parentspanid:"-" +Ž‹¼ÄМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»Ï»†ÅМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:29.366+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41446" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1714e231-3259-4f3a-5281-a994877866f3" response_time:0.003000841 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8c775338473c1a4" x_b3_spanid:"a8c775338473c1a4" x_b3_parentspanid:"-" +‘û†ÅМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºÙˆõÅМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:29.595+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44070" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"48ce874c-ea60-40f2-425a-6357da1d4a90" response_time:0.00593448 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"743943a154da344f" x_b3_spanid:"743943a154da344f" x_b3_parentspanid:"-" +êψõÅМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒéØÃÆÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:29.761+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44326" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"820b5537-2982-4f20-622b-0186d010eb07" response_time:0.004909526 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5311fbe6ee268c89" x_b3_spanid:"5311fbe6ee268c89" x_b3_parentspanid:"-" +ñÚØÃÆÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÔÀ¸ÇМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:30.001+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc4abda6-6dda-40fc-4b18-20d8f013f18a" response_time:0.010237872 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"23463bc57d1d3f68" x_b3_spanid:"23463bc57d1d3f68" x_b3_parentspanid:"-" +ÇÌÀ¸ÇМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÀ“„ÊМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:30.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44326" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ecbf00e-239e-4d8a-407e-ddcd3a8cef3a" response_time:0.004076723 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a379fb8b8ff8e3a7" x_b3_spanid:"a379fb8b8ff8e3a7" x_b3_parentspanid:"-" +¤¹“„ÊМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸ÀœÌМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:31.258+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28dd90be-096d-40fc-76af-7d32893f36d4" response_time:0.004389821 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e5889eebbc2f6fa2" x_b3_spanid:"e5889eebbc2f6fa2" x_b3_parentspanid:"-" +“´œÌМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ˜ÊõÎМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:32.001+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25fd68f0-689f-48ae-484e-d2297561a70d" response_time:0.017221276 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ea9bad76345e28cd" x_b3_spanid:"ea9bad76345e28cd" x_b3_parentspanid:"-" +”…ÊõÎМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß·þÆÐМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:32.454+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"40328de6-fc73-4257-6871-3187892b7934" response_time:0.003128258 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"840654414b7812fe" x_b3_spanid:"840654414b7812fe" x_b3_parentspanid:"-" +æ¬þÆÐМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0á’¸ ÑМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:32.641+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43842" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75327cda-2acc-41ba-6265-c15074ef2f49" response_time:0.004145552 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d454ff259007a41a" x_b3_spanid:"d454ff259007a41a" x_b3_parentspanid:"-" +û‰¸ ÑМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÐèµÑМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:32.685+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43842" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d2de113-6058-43ac-4cdd-b2a3a68f008f" response_time:0.004997571 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4cbd45ccc6aec824" x_b3_spanid:"4cbd45ccc6aec824" x_b3_parentspanid:"-" +¬ÃèµÑМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³¬›÷ÒМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:33.092+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43842" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b86edba4-c9b8-4f31-4f3f-f7052b811d4c" response_time:0.002918039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c5ad83f3fc179349" x_b3_spanid:"c5ad83f3fc179349" x_b3_parentspanid:"-" +Ù¤›÷ÒМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó¶ïë×МÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:34.406+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87f4f513-c07a-43a0-7330-121d12755d4b" response_time:0.007505976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d118ba1f2da44a3" x_b3_spanid:"2d118ba1f2da44a3" x_b3_parentspanid:"-" +í«ïë×МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢»¦î×МÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:34.407+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44326" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4e1ffb8-8f22-4b89-7f55-58b8f6701987" response_time:0.011703298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"487cb1d04eb639f4" x_b3_spanid:"487cb1d04eb639f4" x_b3_parentspanid:"-" +¯£¦î×МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÿôœØÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:34.514+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"380c3e04-3204-443e-6adc-c479054a805c" response_time:0.002883976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1005b60298de70d3" x_b3_spanid:"1005b60298de70d3" x_b3_parentspanid:"-" +»øôœØÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡„þžÜМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:35.592+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44364" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38940bd4-dc4b-412e-4cbb-d2dc563a179f" response_time:0.002757993 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70fe975df269baaf" x_b3_spanid:"70fe975df269baaf" x_b3_parentspanid:"-" +§ùýžÜМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ǰÛÞМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:36.255+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41660" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3fa20ac6-d9d9-43de-59cf-96c9fcf72472" response_time:0.002898512 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"961c2e8e334e288f" x_b3_spanid:"961c2e8e334e288f" x_b3_parentspanid:"-" +—°ÛÞМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²û¢™ãМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.457+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43814" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c271cd12-882e-47f4-6add-72ecabf769a0" response_time:0.004418502 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5057a7171f56b4de" x_b3_spanid:"5057a7171f56b4de" x_b3_parentspanid:"-" +«ð¢™ãМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êœÝãМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.598+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43814" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b0c756d6-1b5a-4425-75d7-47efffe26647" response_time:0.005352009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10e04ede6c4f0051" x_b3_spanid:"10e04ede6c4f0051" x_b3_parentspanid:"-" +ìŒÝãМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ѹð™äМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.728+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6bb31a11-0d5e-4a09-5c73-c8e639281776" response_time:0.002866782 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bfcbdd1314afb905" x_b3_spanid:"bfcbdd1314afb905" x_b3_parentspanid:"-" +´ªð™äМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁÅ¡ÅäМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:37.817+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44326" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27fafd99-512f-4113-67d7-fe6b3d575ee6" response_time:0.005184025 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5dbaf559cc0c27de" x_b3_spanid:"5dbaf559cc0c27de" x_b3_parentspanid:"-" +ó¾¡ÅäМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú°ÎùåМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:38.198+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43814" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"403eb622-7240-4daa-4d10-d16be2a13f1c" response_time:0.00296823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9013b30b38a58114" x_b3_spanid:"9013b30b38a58114" x_b3_parentspanid:"-" +ë¦ÎùåМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Œ§ÍæÐœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:38.373+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"866c7206-3d69-4ceb-4f73-4b87fae35610" response_time:0.003415512 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f36ac5fc5d06a885" x_b3_spanid:"f36ac5fc5d06a885" x_b3_parentspanid:"-" +’ÿ¦ÍæÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ч®öçМÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:38.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea3aec55-d545-4823-5c88-fa7c30da7fe6" response_time:0.00685494 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59a09c8ef9e05782" x_b3_spanid:"59a09c8ef9e05782" x_b3_parentspanid:"-" +Œ€®öçМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈŠûüëМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:39.815+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44092" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bfe4c4a-9944-4f15-570a-790d4eb134a1" response_time:0.003460389 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bae9c2a0c9520718" x_b3_spanid:"bae9c2a0c9520718" x_b3_parentspanid:"-" +ÄþúüëМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àá¹íМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:40.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5aae2546-cc2d-4de1-52dd-bdf058b56d82" response_time:0.002519587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d659dc4c4ec81708" x_b3_spanid:"d659dc4c4ec81708" x_b3_parentspanid:"-" +Ö–á¹íМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûð«ÖïМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:40.809+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:39034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20919e60-53d0-4359-73e0-0b938b7e4e49" response_time:0.002428027 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b851985c9c5acad" x_b3_spanid:"9b851985c9c5acad" x_b3_parentspanid:"-" +Ùå«ÖïМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ÊÌÏðМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:41.063+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:39034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04fd7473-5df2-4efc-6402-4cc3db20a1df" response_time:0.002653507 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3d384555b77ccdd" x_b3_spanid:"b3d384555b77ccdd" x_b3_parentspanid:"-" +ÁÃÌÏðМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ”ñíòМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:41.659+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43814" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1723b29b-6235-41d9-658e-3c34d76ff1f8" response_time:0.006288798 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e083a9a015078fda" x_b3_spanid:"e083a9a015078fda" x_b3_parentspanid:"-" +ÅŒñíòМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªÚ”ôМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.012+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44092" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d025824b-0b8a-4cb8-755f-b3f05d84fe98" response_time:0.003037667 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fb5b957a71d1530" x_b3_spanid:"4fb5b957a71d1530" x_b3_parentspanid:"-" +æóÙ”ôМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Œ¹™ôМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.022+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42326" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d8917226-c9de-4501-6d5b-9957935989be" response_time:0.003411914 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd7e7e4522db14d0" x_b3_spanid:"cd7e7e4522db14d0" x_b3_parentspanid:"-" +ûô¸™ôМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒüޝôМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.068+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43864" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"174206fa-4079-46c7-5daf-9100e6cc9443" response_time:0.002732415 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ebf7d2f76766a474" x_b3_spanid:"ebf7d2f76766a474" x_b3_parentspanid:"-" +¾™Ž¯ôМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’‰Ž¤õМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.314+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43814" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0698fef-dc6e-438a-5c38-b7c3402ff63d" response_time:0.002240719 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"abfb9bd28c1f9be0" x_b3_spanid:"abfb9bd28c1f9be0" x_b3_parentspanid:"-" +Øï¤õМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÛÂ˯öМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.606+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a483d5c-dd3b-4cc5-5b11-206c425b67f1" response_time:0.003174315 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8fedf181bcf93944" x_b3_spanid:"8fedf181bcf93944" x_b3_parentspanid:"-" +±»Ë¯öМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0貯÷МÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:42.874+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a57f444e-3163-4f80-6e66-504b054bb26f" response_time:0.002647302 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"455281f6ba118313" x_b3_spanid:"455281f6ba118313" x_b3_parentspanid:"-" +Ჯ÷МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›¯ÏúùМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:43.568+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44070" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a190bac4-b5d4-444e-6db7-9b8a77fb1167" response_time:0.003269694 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9389eb732a88962d" x_b3_spanid:"9389eb732a88962d" x_b3_parentspanid:"-" +ì¤ÏúùМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ŽñÈüМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.269+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44326" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54e50465-1bf9-4b59-5193-45e39fbdb58e" response_time:0.002922014 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6318904e5c12a3b5" x_b3_spanid:"6318904e5c12a3b5" x_b3_parentspanid:"-" +ã†ñÈüМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•ñÞ½ýМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.514+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43946" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf3895be-605f-41a9-4730-3af6cfb32417" response_time:0.003197755 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce082e6c6fd631ad" x_b3_spanid:"ce082e6c6fd631ad" x_b3_parentspanid:"-" +¿éÞ½ýМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«è²ÃýМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.526+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43946" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1ea65a77-feac-4476-45d3-a52221acacf3" response_time:0.003621976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f28d0e61f062e92c" x_b3_spanid:"f28d0e61f062e92c" x_b3_parentspanid:"-" +‚Þ²ÃýМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§¤ÌýМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.545+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:43946" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"666b7e97-3d86-460f-51cc-58666dda2816" response_time:0.002847164 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9bd09984a32a549" x_b3_spanid:"e9bd09984a32a549" x_b3_parentspanid:"-" +’¤ÌýМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÄúçýМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.601+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44210" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2420a807-a3a9-426b-62d9-7e2c0fd86f23" response_time:0.004960872 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39a2c21d312dae57" x_b3_spanid:"39a2c21d312dae57" x_b3_parentspanid:"-" +˜°úçýМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›Ð“®þМÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:44.747+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44210" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ef8c3f4-4bc1-4b00-4f7d-aae8633a5fe9" response_time:0.005765007 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ade53d4c0b22ba6" x_b3_spanid:"6ade53d4c0b22ba6" x_b3_parentspanid:"-" +Æ“®þМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ÓíÞßÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:45.249+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62963" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0d25d1a-08e1-44bc-5657-750809ab1cf0" response_time:0.003768466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec877ad34f66181c" x_b3_spanid:"ec877ad34f66181c" x_b3_parentspanid:"-" +¸ÇíÞßÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªžè÷ãÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:46.375+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"908c48a7-b083-41cd-551d-e09ad234f273" response_time:0.004576277 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a31f362b5f67eb3" x_b3_spanid:"6a31f362b5f67eb3" x_b3_parentspanid:"-" +îè÷ãÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”âËùæÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:47.185+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84ed3408-e44a-438a-61c6-9cf72d6bcd99" response_time:0.003108049 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa2828fd2a1790c7" x_b3_spanid:"aa2828fd2a1790c7" x_b3_parentspanid:"-" +ÄÒËùæÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀÞá©èÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:47.555+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60127" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53acdcd0-f3b1-4048-768f-44395e87f873" response_time:0.002620745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bc90dc36ea8337ae" x_b3_spanid:"bc90dc36ea8337ae" x_b3_parentspanid:"-" +µ×á©èÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï¡ÉËñÒœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:12:50.042+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6f313bd-0134-40f6-497b-2c149c4fa4c4" response_time:0.00239245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8cfa5e3bc4953d18" x_b3_spanid:"8cfa5e3bc4953d18" x_b3_parentspanid:"-" +¨•ÉËñÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óã¯ÿñÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:50.151+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62789" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"994c54db-c1cf-456c-6d00-3776bd99791b" response_time:0.002399165 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d8a15b231515aa3" x_b3_spanid:"0d8a15b231515aa3" x_b3_parentspanid:"-" +·Ý¯ÿñÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑÆø†óÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:50.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60113" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02a33b39-af35-432f-4114-fef9686131c7" response_time:0.002388245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3347f2dbb7b78cd9" x_b3_spanid:"3347f2dbb7b78cd9" x_b3_parentspanid:"-" +º½ø†óÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†êˆÖôÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:50.869+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61647" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7fc270cf-dce3-40a8-439a-0b3203efef95" response_time:0.002629462 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e369afd781c86f40" x_b3_spanid:"e369afd781c86f40" x_b3_parentspanid:"-" +ÜÞˆÖôÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–…úÕöÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:51.406+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b81d7ebb-0dba-481e-40e6-8087fa735bff" response_time:0.002556893 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"facdcd2fab85a176" x_b3_spanid:"facdcd2fab85a176" x_b3_parentspanid:"-" +¸ùùÕöÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓÒØžúÒœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:52.364+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61255" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66e63c16-0c8d-40c1-7a22-661f34cf527a" response_time:0.002607844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98f814685bfc2adf" x_b3_spanid:"98f814685bfc2adf" x_b3_parentspanid:"-" +ÄËØžúÒœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ƒÇšÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:54.231+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61255" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ccb61d9-e364-4000-5cc6-9a23211d645d" response_time:0.005514007 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b2a1548561f2d24" x_b3_spanid:"2b2a1548561f2d24" x_b3_parentspanid:"-" +ÃøÆšÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù“¯þÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:54.441+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f042d826-ee4e-432d-4ba8-710a4814b9b8" response_time:0.005056425 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ceaae3ddee59871" x_b3_spanid:"6ceaae3ddee59871" x_b3_parentspanid:"-" +ƒˆ¯þÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Üçñá‰ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:56.532+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60895" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69f485f8-e57b-48a7-7541-618bc49d334c" response_time:0.002225484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b2ab631466e3f9f" x_b3_spanid:"9b2ab631466e3f9f" x_b3_parentspanid:"-" +²ßñá‰ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾Úì·ŠÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:56.712+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:59367" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6af81752-21d2-47b7-6fd9-d462d3d56a2f" response_time:0.002599847 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f6f1a01f5123eb89" x_b3_spanid:"f6f1a01f5123eb89" x_b3_parentspanid:"-" +õÐì·ŠÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú«ýÓœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:12:57.662+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:59353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4fc09cd5-f141-4283-7471-b72a88752bbc" response_time:0.00299334 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1be416b2d2775c0f" x_b3_spanid:"1be416b2d2775c0f" x_b3_parentspanid:"-" +›Ê«ýÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±‰©¦ŽÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:57.747+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:59353" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9104ff17-f9e2-4534-4d43-506d3f1f5685" response_time:0.003861789 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"76dd8198d54bda67" x_b3_spanid:"76dd8198d54bda67" x_b3_parentspanid:"-" +çý¨¦ŽÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò…ŽòŽÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:57.908+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:62789" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a09d59fa-dae0-4c5c-46b7-43a9451313c5" response_time:0.002638332 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"67bc3fb8bc9efb0d" x_b3_spanid:"67bc3fb8bc9efb0d" x_b3_parentspanid:"-" +ŒþòŽÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜ŠÛ»‘ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:12:58.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60127" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"989182cb-6c83-436a-5659-f700d579ac8c" response_time:0.002710506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6759b181cee5643" x_b3_spanid:"d6759b181cee5643" x_b3_parentspanid:"-" +ŽƒÛ»‘ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ûšæ˜ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:00.567+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:56073" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49385ffc-c20d-463d-5823-6f9eb18b0735" response_time:0.002947603 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9932268cd970e10f" x_b3_spanid:"9932268cd970e10f" x_b3_parentspanid:"-" +Êïšæ˜ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑÆ¨—›ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:01.205+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:61647" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e02e642c-01e6-4bbd-48ab-3726c5ee0ddb" response_time:0.004412002 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4e57bb9290b7ce2" x_b3_spanid:"e4e57bb9290b7ce2" x_b3_parentspanid:"-" +’À¨—›ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·ʑŸÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:02.267+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:59303" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1723e8d6-0b3d-4c9f-6fe2-eaa59c5efa31" response_time:0.003712857 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ab70161e1ae57da" x_b3_spanid:"2ab70161e1ae57da" x_b3_parentspanid:"-" +¢°Ê‘ŸÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒè‰þ¡ÓœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:13:03.033+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:60895" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ede46748-bb1d-4658-7bd6-527d0a69c5b3" response_time:0.002850479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8ab46b90b368ef40" x_b3_spanid:"8ab46b90b368ef40" x_b3_parentspanid:"-" +Ò߉þ¡ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×µâá£ÓœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:03.509+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:50198" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f8a5b5bd-65d4-4849-66bf-a846e2c024df" response_time:0.004059346 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39512085df42e95c" x_b3_spanid:"39512085df42e95c" x_b3_parentspanid:"-" +ªâá£ÓœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø”‡óÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.874+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:15860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a9b5db0-c2f0-4ae9-5502-85253a21f795" response_time:0.002571573 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"84df625deb822250" x_b3_spanid:"84df625deb822250" x_b3_parentspanid:"-" +»Œ‡óÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ½æóóÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.102+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7689c426-8b26-42bb-7f3e-1b0da0b8d4f3" response_time:0.002890011 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d7baee2f85cf4dd" x_b3_spanid:"0d7baee2f85cf4dd" x_b3_parentspanid:"-" +¯±æóóÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ³ì›öÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.723+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:19812" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5861ce8-08a5-4058-4016-2034da3c3b97" response_time:0.002957571 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6492c5060709b2a" x_b3_spanid:"e6492c5060709b2a" x_b3_parentspanid:"-" +¡¬ì›öÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ªœåøÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:09.413+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2df8fed-2faa-4c7f-5d18-8a002b0d4951" response_time:0.003454348 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"62814bdfe67fedf7" x_b3_spanid:"62814bdfe67fedf7" x_b3_parentspanid:"-" +ØœœåøÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“äÛŒûÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.033+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:18312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d9f17003-2923-447c-61b4-bc9d9113b06c" response_time:0.002971683 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"14e4fac4125e6106" x_b3_spanid:"14e4fac4125e6106" x_b3_parentspanid:"-" +ÜÜÛŒûÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼ÞŽ´€×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.458+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41672" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b78d4b3-d36d-4ce6-567b-8c2cdf36aab7" response_time:0.002889475 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff5eb0876ddd496c" x_b3_spanid:"ff5eb0876ddd496c" x_b3_parentspanid:"-" +Á׎´€×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûûdz‚לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.994+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:38866" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"00d19d4a-3798-45f5-71d7-42a2b4f75ce0" response_time:0.002801781 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e76aa4dc494b0d3d" x_b3_spanid:"e76aa4dc494b0d3d" x_b3_parentspanid:"-" +±ðdz‚לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬û¸‘Š×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45722" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4d5d432c-16e3-48b3-681d-8257974cbcc2" response_time:0.002417039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"307df82eed03c355" x_b3_spanid:"307df82eed03c355" x_b3_parentspanid:"-" +ƒó¸‘Š×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Ú¿íלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:15.068+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:41672" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a3442eb1-3bf9-4fdb-6952-7b242623bccd" response_time:0.002997035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"701e152c7e4611e8" x_b3_spanid:"701e152c7e4611e8" x_b3_parentspanid:"-" +ùÒ¿íלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”óƒ‘לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:15.918+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:40508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d92f293-fa2e-464d-476b-178ea9769703" response_time:0.005017136 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc0550b7acc6b626" x_b3_spanid:"cc0550b7acc6b626" x_b3_parentspanid:"-" +¾‚óƒ‘לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±‰—¼—לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:17.650+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:39154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a910e37c-3219-450d-4f61-6362b017ed80" response_time:0.00239295 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af81a914d4eee948" x_b3_spanid:"af81a914d4eee948" x_b3_parentspanid:"-" +ð€—¼—לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚—…èœ×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:19.083+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:44252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4dbc3cd-90c8-4672-7310-bc5a74095756" response_time:0.00299228 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4ffb8692d038211" x_b3_spanid:"f4ffb8692d038211" x_b3_parentspanid:"-" +Ò‡…èœ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§ø¥ÆŸ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.817+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46108" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e09a034-fed4-4e0e-6027-fe80210efe17" response_time:0.003835637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fce9198c22de64a8" x_b3_spanid:"fce9198c22de64a8" x_b3_parentspanid:"-" +¨í¥ÆŸ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’´”™©×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:22.407+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:62709" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69101b49-7c7d-4b02-536b-132fb39545d7" response_time:0.003054287 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45322ce0ba5101e1" x_b3_spanid:"45322ce0ba5101e1" x_b3_parentspanid:"-" +˜§”™©×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÓôæÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.692+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2828d9fa-bcec-4dad-6456-388d68ef5f0c" response_time:0.003055247 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f05bc085f1ed023b" x_b3_spanid:"f05bc085f1ed023b" x_b3_parentspanid:"-" +šÆôæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ýüÿæÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.716+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"579edada-7aad-4570-7ca9-2a0ba33f5d64" response_time:0.003813386 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6df74358469388f" x_b3_spanid:"d6df74358469388f" x_b3_parentspanid:"-" +ÐöüÿæÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ÏÓÆçÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.864+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef30e363-a908-4b73-6258-7d14b5956be9" response_time:0.003982266 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9da63bd43cd30898" x_b3_spanid:"9da63bd43cd30898" x_b3_parentspanid:"-" +®ÃÓÆçÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÛ¿ŠÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d6d0688-7498-4719-739e-7d27270e804f" response_time:0.002640064 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"07496fb46f22502c" x_b3_spanid:"07496fb46f22502c" x_b3_parentspanid:"-" +ÉÓ¿ŠÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òÖá¢ÚÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.301+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"88f5fdab-b5cf-4beb-4511-7d4ab620471a" response_time:0.002568814 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c4cb5d09864dcfd" x_b3_spanid:"7c4cb5d09864dcfd" x_b3_parentspanid:"-" +ýËá¢ÚÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜Œ”²ËÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.306+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c08b8f8-0c05-42a8-48f8-1b4ebe928f43" response_time:0.002601003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a2cef3da256ea9c" x_b3_spanid:"0a2cef3da256ea9c" x_b3_parentspanid:"-" +À‚”²ËÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©ýÛµÍÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.851+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b7e4ff5-8d1b-449d-75a1-3cb9049d3ee9" response_time:0.002347969 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"60bc989cd782f85c" x_b3_spanid:"60bc989cd782f85c" x_b3_parentspanid:"-" +ÉòÛµÍÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åâÀ°ÓÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.450+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56e6396d-ef1c-4a60-7031-df875ad2092e" response_time:0.002726997 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a59f43ba5263b38" x_b3_spanid:"1a59f43ba5263b38" x_b3_parentspanid:"-" +ë×À°ÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìà§ÔÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.700+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7302f160-f4a7-42db-4464-3d527e888cd8" response_time:0.002268077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de2689c35314a58e" x_b3_spanid:"de2689c35314a58e" x_b3_parentspanid:"-" +âÖ§ÔÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ë¢œšÔÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.672+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02db6a1b-4b68-4ce9-654c-1b01fa94f652" response_time:0.002575579 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f160281836a23561" x_b3_spanid:"f160281836a23561" x_b3_parentspanid:"-" +Ç—œšÔÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼½ÕÔÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.782+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"306dc652-167c-4198-779d-6e938fe939cd" response_time:0.016074267 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"391b18c880b9caf4" x_b3_spanid:"391b18c880b9caf4" x_b3_parentspanid:"-" +Ä«ÕÔÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ëÄìÓÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:42.576+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b4fd73d-2806-4176-7560-1bc65cfc72dc" response_time:0.00283145 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"874fb7c2005e9937" x_b3_spanid:"874fb7c2005e9937" x_b3_parentspanid:"-" +šâÄìÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ûѱ‚àÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77b6d99e-94b2-4459-40e8-356b887cafc5" response_time:0.002907924 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef495572ae7dd189" x_b3_spanid:"ef495572ae7dd189" x_b3_parentspanid:"-" +™Å±‚àÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÐ¡àÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.909+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24c12404-1e23-4029-64aa-1d80e955c3f4" response_time:0.002688392 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00cdc37b3bff6b83" x_b3_spanid:"00cdc37b3bff6b83" x_b3_parentspanid:"-" +½ðСàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý·ú©àÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.924+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"85c9819a-2bc3-496d-763e-3a93395ef251" response_time:0.004773759 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d219600e0eb66f92" x_b3_spanid:"d219600e0eb66f92" x_b3_parentspanid:"-" +ήú©àÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Š´ØÄàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.981+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5bb309ce-70af-472a-5814-ebaa4c228a6d" response_time:0.004432914 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cae5bf5f30761187" x_b3_spanid:"cae5bf5f30761187" x_b3_parentspanid:"-" +½§ØÄàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·Ê˜ÚàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.027+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04d8f973-6de4-4ddb-48eb-e87be2fa00f3" response_time:0.002730637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"663015d13213842a" x_b3_spanid:"663015d13213842a" x_b3_parentspanid:"-" +£¼˜ÚàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ßÕåàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.052+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"992b7468-4896-431c-7808-32bb47805ac8" response_time:0.002575274 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c12b72cb3b1ebbe4" x_b3_spanid:"c12b72cb3b1ebbe4" x_b3_parentspanid:"-" +ŸÒÕåàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀÆÿãàÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.048+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cead0e2f-031e-42f8-7868-c444d678b290" response_time:0.002627847 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2fc861ec5ce16b2d" x_b3_spanid:"2fc861ec5ce16b2d" x_b3_parentspanid:"-" +ï¿ÿãàÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýþ ÎâÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.538+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78eb732c-3ad5-452f-5168-eff137a31d41" response_time:0.003987423 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b686e82efc2fe687" x_b3_spanid:"b686e82efc2fe687" x_b3_parentspanid:"-" +ëð ÎâÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó ÒâÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.547+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0cf02380-209e-47fa-7b6e-dee674724672" response_time:0.002891776 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e15b6b09177316f2" x_b3_spanid:"e15b6b09177316f2" x_b3_parentspanid:"-" +üÅ ÒâÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô œ‰ãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.660+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"652e3ed0-9d69-450a-4366-efdf0f55210d" response_time:0.005345037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec07bd7705a72ba5" x_b3_spanid:"ec07bd7705a72ba5" x_b3_parentspanid:"-" +Ó’œ‰ãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù®ÞªãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.731+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be83a731-36dc-4d7b-6fd2-d091d5a91722" response_time:0.004687562 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a240ae7b6e18954f" x_b3_spanid:"a240ae7b6e18954f" x_b3_parentspanid:"-" +°¥ÞªãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œì”ÎãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.805+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e775e98c-76e9-4a8b-7889-db90f4c3260a" response_time:0.004835071 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5cfde646a64feaaf" x_b3_spanid:"5cfde646a64feaaf" x_b3_parentspanid:"-" +ƒå”ÎãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åäàãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.812+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3269bc92-f1b5-46af-4390-dab96896eba8" response_time:0.037547922 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ed247e0219aa7c9c" x_b3_spanid:"ed247e0219aa7c9c" x_b3_parentspanid:"-" +Œ…äàãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùŒþâãÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.851+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"40ac1c44-16dd-40ec-4478-6344c6801f90" response_time:0.002871771 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0695e8ad99baf52" x_b3_spanid:"a0695e8ad99baf52" x_b3_parentspanid:"-" +•…þâãÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çœç½äÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.040+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49b626af-21a4-4767-41f4-59b8f74711c8" response_time:0.003981174 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b5e960b05a3f80a" x_b3_spanid:"6b5e960b05a3f80a" x_b3_parentspanid:"-" +•ç½äÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷€×§úÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.899+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28b70e74-bdcc-4a73-74c8-b2346e11353c" response_time:0.004937663 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"36c9c267c4da39e2" x_b3_spanid:"36c9c267c4da39e2" x_b3_parentspanid:"-" +÷Ö§úÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾íŤúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.889+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ff4e97ea-c403-42ab-4230-6d8d6c2a7a09" response_time:0.008380355 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5525f71d74850979" x_b3_spanid:"5525f71d74850979" x_b3_parentspanid:"-" +§æÅ¤úÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÙæØëúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.042+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"29c6067d-4846-4f9c-7dd6-be69d2066fcc" response_time:0.003687648 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6e34fb0a696a2b2" x_b3_spanid:"b6e34fb0a696a2b2" x_b3_parentspanid:"-" +ªàØëúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û‚…ÌûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.245+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5ba868f-c927-4b3f-52b8-f3ebd4335f49" response_time:0.003071279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e1f9e403e23d525e" x_b3_spanid:"e1f9e403e23d525e" x_b3_parentspanid:"-" +×õ„ÌûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”¢ð’üÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc55bf88-5f32-4036-63b9-0041c6f7a6be" response_time:0.002990707 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5f5eb30fa7246988" x_b3_spanid:"5f5eb30fa7246988" x_b3_parentspanid:"-" +îšð’üÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ާôüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.599+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3030c94-d8b0-4bea-57ae-b327802dd8d3" response_time:0.002491102 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"568b3d8345f2e2ab" x_b3_spanid:"568b3d8345f2e2ab" x_b3_parentspanid:"-" +†ˆ§ôüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷öÛ´ýÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:53.733+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c9afddd9-5922-4a7c-5691-9bef672896bb" response_time:0.00327713 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"750d098c14c25978" x_b3_spanid:"750d098c14c25978" x_b3_parentspanid:"-" + êÛ´ýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›§ê—þÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.941+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"086911e3-42c9-419d-6aa3-3cb341c7e7b1" response_time:0.002969398 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"539986e3dd805e37" x_b3_spanid:"539986e3dd805e37" x_b3_parentspanid:"-" +„ ê—þÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0É£×êþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.115+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e59a1e9-23ee-483a-7a11-161aefcf644a" response_time:0.002757582 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a3286e0568eff339" x_b3_spanid:"a3286e0568eff339" x_b3_parentspanid:"-" +â˜×êþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øê¸”ÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.203+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3829eb9a-8f1b-41bf-6bc7-afc912fb2d85" response_time:0.002272684 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd699e7c611c8e98" x_b3_spanid:"fd699e7c611c8e98" x_b3_parentspanid:"-" +î㸔ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß¼ÚåÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.370+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22856" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42dcfcf4-4805-49c9-499d-982895d8b9b7" response_time:0.002845463 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c747883439307af7" x_b3_spanid:"c747883439307af7" x_b3_parentspanid:"-" +†Õ¼ÚåÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þþ±ãåÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.389+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ce08541-c955-41fd-7840-f4ae49a981fc" response_time:0.003075116 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d669885e857b3d6" x_b3_spanid:"1d669885e857b3d6" x_b3_parentspanid:"-" +’ó±ãåÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øž–àÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.898+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60942474-c573-4943-5c3b-f51cdb352394" response_time:0.002620245 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5aacc1b49889a3fd" x_b3_spanid:"5aacc1b49889a3fd" x_b3_parentspanid:"-" +É—–àÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™ëïÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.928+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9f85d3d4-b50e-4d05-707f-d756d785eef6" response_time:0.004201135 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05de17397f340ebb" x_b3_spanid:"05de17397f340ebb" x_b3_parentspanid:"-" +ËâïÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°×‡²‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"288ecc30-a3ae-4561-67d2-6eb3fcf54737" response_time:0.002919259 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9ee3d5348771f01b" x_b3_spanid:"9ee3d5348771f01b" x_b3_parentspanid:"-" +úʇ²‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îðóȂڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.118+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"786515a4-c2c9-4216-53a4-0aeeb3decfc6" response_time:0.002415542 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"920d909660009139" x_b3_spanid:"920d909660009139" x_b3_parentspanid:"-" +öéóȂڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓŽüÖ‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.144+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"845122a8-1ff6-4346-49c3-5dfe17a62686" response_time:0.006473687 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7b3ea2595b557c23" x_b3_spanid:"7b3ea2595b557c23" x_b3_parentspanid:"-" +„…üÖ‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤²‡šëÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.846+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75845d03-54b5-442e-79e0-10a0e58c4d83" response_time:0.002586502 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0ff24bea34fd86c" x_b3_spanid:"e0ff24bea34fd86c" x_b3_parentspanid:"-" +꧇šëÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—å·¿ìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.192+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65675612-cfba-45f3-73c4-1b6f3b824b1c" response_time:0.003699079 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3975af736788e85e" x_b3_spanid:"3975af736788e85e" x_b3_parentspanid:"-" +ƒÞ·¿ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËåÞÉìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"17da9229-ae90-4f8c-5cda-a491b6bf209d" response_time:0.005217157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3024b5ef5077e17d" x_b3_spanid:"3024b5ef5077e17d" x_b3_parentspanid:"-" +¶ÙÞÉìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦âº¿ïÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9462798d-66c3-4b84-6305-bf835baa905e" response_time:0.003021342 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"757bc173557aba64" x_b3_spanid:"757bc173557aba64" x_b3_parentspanid:"-" +¤Õº¿ïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ïÓõÖïÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.047+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"092c3a94-bb18-4c95-728d-20835b8d8271" response_time:0.002512301 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b35110d13cf776ae" x_b3_spanid:"b35110d13cf776ae" x_b3_parentspanid:"-" +ÇÈõÖïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó‚°ãïÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:50.073+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e159a1cf-fe85-4882-61bd-02a49125e3b5" response_time:0.0027017 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0eb8bfd529c0634a" x_b3_spanid:"0eb8bfd529c0634a" x_b3_parentspanid:"-" +Òõ¯ãïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²¸ÊÝñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.598+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30346" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b1fca3c6-ec3c-4658-5c8c-fddb3a0a6e75" response_time:0.002606585 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b4f6d139fa17b647" x_b3_spanid:"b4f6d139fa17b647" x_b3_parentspanid:"-" +бÊÝñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼ÃŒ­óÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.033+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"249edbc5-5583-4c6e-491c-9428b321289e" response_time:0.002385272 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41a662547d5daf25" x_b3_spanid:"41a662547d5daf25" x_b3_parentspanid:"-" +Œ»Œ­óÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ٷ²óÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.044+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"82503c12-da52-4895-77b6-21fc7c6608d2" response_time:0.002756963 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"384dff9872915c14" x_b3_spanid:"384dff9872915c14" x_b3_parentspanid:"-" +ϯ²óÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì˜îµóÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.051+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a6e071cc-3e69-44cd-7867-252d46b8c78a" response_time:0.002789076 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9d041ed2bfd1dbb" x_b3_spanid:"a9d041ed2bfd1dbb" x_b3_parentspanid:"-" +—îµóÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®ңôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.282+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3bce292-10c9-4f6d-7421-ae745768b9e5" response_time:0.002789412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"84f945dbdfd61bfe" x_b3_spanid:"84f945dbdfd61bfe" x_b3_parentspanid:"-" +™¤Ò£ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï÷²§õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.558+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9c7ddff-d03a-468c-4e73-6977af6ca423" response_time:0.002937085 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a228e08e4477d45" x_b3_spanid:"0a228e08e4477d45" x_b3_parentspanid:"-" +®ð²§õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý厜öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.803+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70bf1958-8e14-480b-73ae-e8ebe1d5a295" response_time:0.002663283 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"db7c8ebd73cedc2c" x_b3_spanid:"db7c8ebd73cedc2c" x_b3_parentspanid:"-" +¦ÞŽœöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óÈØõ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.256+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a8a2fd26-25c3-45fd-5f33-81c22ff28fc7" response_time:0.005449613 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5507336358039e78" x_b3_spanid:"5507336358039e78" x_b3_parentspanid:"-" +¾ÂØõ÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ߙİڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.825+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"150ffb2d-5d69-4b06-703f-ecec8b308a68" response_time:0.002741411 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"113a7b14ad5c8b31" x_b3_spanid:"113a7b14ad5c8b31" x_b3_parentspanid:"-" +ؒİڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ù§á³‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.100+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c01bf7fc-4f62-431b-677f-c38161d8410e" response_time:0.002557147 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54cfd0efb4d8f5b6" x_b3_spanid:"54cfd0efb4d8f5b6" x_b3_parentspanid:"-" +Κ᳑ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëóþȑڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.145+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5a0909d-6241-4a81-5ac1-a9c07f4c7b07" response_time:0.002863249 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be3e0dab088168fb" x_b3_spanid:"be3e0dab088168fb" x_b3_parentspanid:"-" +ŠçþȑڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤¼‹§‡ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.390+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56021e98-4a39-4dd0-7eb0-7c3b1e7c3fc3" response_time:0.00224849 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0eb6d9394077486a" x_b3_spanid:"0eb6d9394077486a" x_b3_parentspanid:"-" +´±‹§‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ¬¸¦…ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.851+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"106b22b9-6fa1-47e2-492a-59a2bdd9a54b" response_time:0.002704574 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2978f41bb1914434" x_b3_spanid:"2978f41bb1914434" x_b3_parentspanid:"-" +쥸¦…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†Ëƒ†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.044+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3b8b52e4-4e43-4980-574c-293ff97a6efa" response_time:0.004152101 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4d04d8bf83dd629" x_b3_spanid:"f4d04d8bf83dd629" x_b3_parentspanid:"-" +½Àƒ†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏËãÓ†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.215+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2bb84cb-7465-4099-5af9-8db3a64357cf" response_time:0.002249476 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"43a65ff74d5990a1" x_b3_spanid:"43a65ff74d5990a1" x_b3_parentspanid:"-" +ÒÄãÓ†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0تȼ†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.166+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3f566bdc-282a-4b96-43d2-95c351eb0ce8" response_time:0.002914409 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"136722334c7274ed" x_b3_spanid:"136722334c7274ed" x_b3_parentspanid:"-" +¢£È¼†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù¤“‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.348+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"36612774-4605-465c-6088-88ef54adc5c4" response_time:0.002759235 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f77576a50b4a92d" x_b3_spanid:"3f77576a50b4a92d" x_b3_parentspanid:"-" +¾Í¤“‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âðá‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.587+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a243d0f2-e0f6-4ba7-496b-3d9329134b47" response_time:0.002111321 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7129d9b4eed5419" x_b3_spanid:"d7129d9b4eed5419" x_b3_parentspanid:"-" +„×ðá‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚÈ›’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.321+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8db5755-d48c-42f6-6315-2be7ff0330de" response_time:0.002881729 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7d98c19a0f295716" x_b3_spanid:"7d98c19a0f295716" x_b3_parentspanid:"-" +ý½›’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èø³›ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.707+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b74a3df-300f-4f3b-487e-fd06a920df39" response_time:0.002644855 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2adeec713bff53a4" x_b3_spanid:"2adeec713bff53a4" x_b3_parentspanid:"-" +Ùë³›ŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õێ̌ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.809+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1de5c2f-c1cf-4f3c-63bc-3fc595454d54" response_time:0.002625834 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"829d69668c152177" x_b3_spanid:"829d69668c152177" x_b3_parentspanid:"-" +áю̌ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐÛÔŽÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.216+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fbb60255-ec70-4624-74f6-707df46b9775" response_time:0.00212111 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"558efaae1813389c" x_b3_spanid:"558efaae1813389c" x_b3_parentspanid:"-" +ÃÎÔŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ˆÎ‰“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.546+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61188d96-69a9-42ec-6f43-9c3a5b4bd7d5" response_time:0.005116281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a195bf1175e8a903" x_b3_spanid:"a195bf1175e8a903" x_b3_parentspanid:"-" +Îþ͉“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0棇¶“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.641+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8dba9117-49a0-47d5-786a-ea57fff4015e" response_time:0.003873751 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc79823dc512a912" x_b3_spanid:"cc79823dc512a912" x_b3_parentspanid:"-" +»—‡¶“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùãÉɓڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.677+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b36ba0c-0e3e-45e9-62c6-ef6b047cf19a" response_time:0.008252845 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf005eee1a9bcdb0" x_b3_spanid:"cf005eee1a9bcdb0" x_b3_parentspanid:"-" +íÜÉɓڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž§ºŽ•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.091+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"76477840-4276-4a0a-7e1c-f32e9f76d507" response_time:0.007622206 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c09d86124afe50d6" x_b3_spanid:"c09d86124afe50d6" x_b3_parentspanid:"-" +í›ºŽ•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚ÞÂÕڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.205+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"57c09831-29b0-4648-67ce-440503cda525" response_time:0.00505275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6de267f9eeda024" x_b3_spanid:"c6de267f9eeda024" x_b3_parentspanid:"-" +éÖÂÕڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Ö¡¼–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.461+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c7156ea-b2a6-4fb2-68e0-9a6364ec030d" response_time:0.002394499 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b046e5db17c7c4f" x_b3_spanid:"2b046e5db17c7c4f" x_b3_parentspanid:"-" +öÏ¡¼–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÿÍ–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.495+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10b013d0-9b37-43d7-4935-7923f17c4eb4" response_time:0.005137187 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dfc7c31bb35fb2e6" x_b3_spanid:"dfc7c31bb35fb2e6" x_b3_parentspanid:"-" +­ÜÿÍ–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡åÆ‘˜ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.907+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2dbfb86f-8e6e-4aef-64b9-5a7140beb824" response_time:0.003220064 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d5a6fd262cb732a" x_b3_spanid:"0d5a6fd262cb732a" x_b3_parentspanid:"-" +õÞÆ‘˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ©´™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.248+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a07d9117-620c-4bab-63c5-f4bdfb0c705b" response_time:0.003146952 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bc83368791a6eac" x_b3_spanid:"9bc83368791a6eac" x_b3_parentspanid:"-" +ˆ÷´™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–Ëàì™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.367+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"32da7855-8574-4aff-4c42-0da7cffffd26" response_time:0.002954665 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30a7d4b3ea7fbfa4" x_b3_spanid:"30a7d4b3ea7fbfa4" x_b3_parentspanid:"-" +µ¼àì™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™¹ŒœÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.971+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a4549b7a-bcf1-4575-723a-9b4289a4f16b" response_time:0.002699017 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94ebfcc62b531d39" x_b3_spanid:"94ebfcc62b531d39" x_b3_parentspanid:"-" +¾¹ŒœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°«ô¿œÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1af65b15-b70f-4956-52a2-318a5740255b" response_time:0.002925035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c59173708b0329d" x_b3_spanid:"8c59173708b0329d" x_b3_parentspanid:"-" +Œòó¿œÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–选ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.232+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70bb3130-8409-47a8-51b7-bfd6dd513178" response_time:0.002642287 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"975a046e781b2a0d" x_b3_spanid:"975a046e781b2a0d" x_b3_parentspanid:"-" +ãÛ€‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0——¸ÕÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.392+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"afadd2ca-616a-4846-6a0c-603f7608b0b4" response_time:0.002823455 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"40faf9845d3387dc" x_b3_spanid:"40faf9845d3387dc" x_b3_parentspanid:"-" +·‹¸ÕÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍéÖ¦¢ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.636+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f87dc866-68b0-4007-6c28-ff801461662f" response_time:0.00247151 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d8868029dad9dd7" x_b3_spanid:"6d8868029dad9dd7" x_b3_parentspanid:"-" +ìÝÖ¦¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êõ£Ø£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.008+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33a73ec8-b5e7-43f8-5e40-0c76a48a3ef4" response_time:0.002860105 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27fc9b32df86a734" x_b3_spanid:"27fc9b32df86a734" x_b3_parentspanid:"-" +¿í£Ø£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†ï×¥ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.410+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a86eeef6-7e3a-4505-471a-a7ed61da81fe" response_time:0.00248065 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"796a837a4b2958fb" x_b3_spanid:"796a837a4b2958fb" x_b3_parentspanid:"-" +èã×¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï«íÔ¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.531+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75871ae2-f1e6-4823-6011-5fab0465387d" response_time:0.010242812 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"440e350a7bb1a34f" x_b3_spanid:"440e350a7bb1a34f" x_b3_parentspanid:"-" +µ£íÔ¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öþðߥڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.562+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"504c2e5a-3797-4ab2-4d25-261e866eaa81" response_time:0.002412851 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17f09ff164a7aee7" x_b3_spanid:"17f09ff164a7aee7" x_b3_parentspanid:"-" +œóðߥڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ÂÒɦڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.782+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"266332ae-00cc-4562-62ca-7fa7dbdb2ae6" response_time:0.004022732 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aac7b588ddc7fe0c" x_b3_spanid:"aac7b588ddc7fe0c" x_b3_parentspanid:"-" +¤¹ÒɦڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÊª©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.522+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6495c364-1c08-4e12-46bd-1864d40cf36b" response_time:0.002650351 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f4daf92c93a86e2b" x_b3_spanid:"f4daf92c93a86e2b" x_b3_parentspanid:"-" +²ª©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©’˜«¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.330+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee353d48-566d-414d-7895-90004aa45baf" response_time:0.002462442 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7e2d38cb85d756c4" x_b3_spanid:"7e2d38cb85d756c4" x_b3_parentspanid:"-" +£†˜«¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÒ®¿¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.372+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15296d11-c5f4-4403-44dc-258a3d83dce4" response_time:0.002842711 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e1e613b05fee08b4" x_b3_spanid:"e1e613b05fee08b4" x_b3_parentspanid:"-" +ÿÇ®¿¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à˜‰¿¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.372+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e0bf5cb-f378-45d9-67d1-ffa5fbb303a1" response_time:0.002591068 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8ad4e1cb0ef9815" x_b3_spanid:"f8ad4e1cb0ef9815" x_b3_parentspanid:"-" +û‰¿¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨·„¶­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.620+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a8078896-1cc5-434d-798c-39a1ab7fc775" response_time:0.003481674 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9a317c690fbaceb6" x_b3_spanid:"9a317c690fbaceb6" x_b3_parentspanid:"-" +𬄶­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹Û¥‚±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.587+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"44420012-576f-4cbe-5e9b-046de7637cf0" response_time:0.002337551 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"613799c18b75357c" x_b3_spanid:"613799c18b75357c" x_b3_parentspanid:"-" +ÍÓ¥‚±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°Õ´Â±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.718+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7bae7062-b302-4439-637b-b9e5379c5f08" response_time:0.005628844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"938abf56db7499d2" x_b3_spanid:"938abf56db7499d2" x_b3_parentspanid:"-" +ŒÏ´Â±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨«áܲڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:08.045+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cff90ca2-7867-46d9-6842-f5de0cb187aa" response_time:0.002358961 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0ec55b2521d6114" x_b3_spanid:"e0ec55b2521d6114" x_b3_parentspanid:"-" +ð áܲڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0組ć؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.731+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d8e0ef7-8d23-4534-57bb-39311657326b" response_time:0.001927382 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb05ecaa7f5c9198" x_b3_spanid:"bb05ecaa7f5c9198" x_b3_parentspanid:"-" +ƒ¯„ć؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆÑ羇؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:47.720+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56580" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c4a85e6f-c6f1-4347-5aff-2dc019e07cba" response_time:0.002239748 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e857cd6620d3d76" x_b3_spanid:"3e857cd6620d3d76" x_b3_parentspanid:"-" +ÄÆç¾‡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘Á¿ùŠØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.649+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58358" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77f2f974-04d6-4408-71ab-cad36fcbedfe" response_time:0.002009585 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8d0243bc5310e7b7" x_b3_spanid:"8d0243bc5310e7b7" x_b3_parentspanid:"-" +⳿ùŠØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï±×ˋ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:48.815+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57122" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0555b086-2755-4e53-793d-08b4d4864512" response_time:0.008052149 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e7792f2194281029" x_b3_spanid:"e7792f2194281029" x_b3_parentspanid:"-" +ö—×ˋ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šûœ‡ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:49.751+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bae109f6-28b1-4eec-7cdb-19e33a78cd2f" response_time:0.001998484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"42ef2022dbed7b97" x_b3_spanid:"42ef2022dbed7b97" x_b3_parentspanid:"-" +—ôœ‡ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎÍÑïØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.239+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58358" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3eb162f7-ded9-406c-4c6b-1d246d3d7cef" response_time:0.001720519 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"83321baa47301d5b" x_b3_spanid:"83321baa47301d5b" x_b3_parentspanid:"-" +­ÄÑïØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶‹Íõ‘ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.516+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56580" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f20d101d-0bd2-4670-7902-b3f56df89ba0" response_time:0.005235666 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f209c6caadb8761" x_b3_spanid:"2f209c6caadb8761" x_b3_parentspanid:"-" +Œ€Íõ‘ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î×±‘ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:50.374+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"30faa857-c0f3-420f-5a03-1fb71aa4f0d4" response_time:0.005023041 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d974e1fcba48ca6a" x_b3_spanid:"d974e1fcba48ca6a" x_b3_parentspanid:"-" +èã×±‘ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô´«Ü“ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.000+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58288" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3af3661-1db5-471d-6aaa-515429d8d6fa" response_time:0.005226869 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e42194a796acad2" x_b3_spanid:"3e42194a796acad2" x_b3_parentspanid:"-" +Š­«Ü“ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˸ު”ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:51.168+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"73fa1245-7826-4f2f-5e0c-690d8a208cb4" response_time:0.001824608 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"901237a72b88d9fe" x_b3_spanid:"901237a72b88d9fe" x_b3_parentspanid:"-" +‰°Þª”ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÕ¡””ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:51.113+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7ddeb0c5-14ce-4202-4d58-e515fc8d54bf" response_time:0.01004516 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6f3af152abc3866e" x_b3_spanid:"6f3af152abc3866e" x_b3_parentspanid:"-" +äÈ¡””ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íÃ…€®ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:58.058+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"22542d81-fc7b-4560-685a-789c719a912c" response_time:0.00174368 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f85f4875c829ebb" x_b3_spanid:"1f85f4875c829ebb" x_b3_parentspanid:"-" +á²…€®ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ß™¡®ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:58.127+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57356" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9417c9f2-6d0c-4095-4ce1-b532653ec5df" response_time:0.001879099 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ab2ea4d66c66e14d" x_b3_spanid:"ab2ea4d66c66e14d" x_b3_parentspanid:"-" +âÕ™¡®ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íûŒº®ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:58.179+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc3b9ed6-a2c7-481b-60c6-7fe37ac870b9" response_time:0.00281673 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06d661d922d0e932" x_b3_spanid:"06d661d922d0e932" x_b3_parentspanid:"-" +ªðŒº®ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—õ€²ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.131+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6eb02a57-0fc5-4ed9-51be-b014a40e3975" response_time:0.003222343 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"76107bb5f837d429" x_b3_spanid:"76107bb5f837d429" x_b3_parentspanid:"-" +ö䀲؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ƥ‘Ͳ؜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.292+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c04f627-99f2-456c-6c54-88da19a0ad57" response_time:0.003137275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d9e8e117e0b0ea51" x_b3_spanid:"d9e8e117e0b0ea51" x_b3_parentspanid:"-" +ꙑͲ؜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”©Ž³ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.420+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e9080cf3-cd55-4fa4-5b74-f503a2ff1b99" response_time:0.011297937 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2edce7e18564f348" x_b3_spanid:"2edce7e18564f348" x_b3_parentspanid:"-" +áƒ©Ž³ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ»¤´ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5ce74518-4ec7-4976-71e6-74b2f3b01be5" response_time:0.002229215 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7710a3696c4f9b3c" x_b3_spanid:"7710a3696c4f9b3c" x_b3_parentspanid:"-" +ߨ¤´ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍÎþ¡´ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:59.739+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58038" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4016e78a-792c-400d-5587-1bb2f74f26ed" response_time:0.002026397 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"379891b436291464" x_b3_spanid:"379891b436291464" x_b3_parentspanid:"-" +ø½þ¡´ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬É¹©¼ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:01.900+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:11249" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"41cf95cc-0826-4291-4e2c-aa5753578b97" response_time:0.004021634 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"460a4af6ad2332bd" x_b3_spanid:"460a4af6ad2332bd" x_b3_parentspanid:"-" +£Â¹©¼ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þæ’Š¾ØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:02.372+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:9247" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ff788b6b-a52c-4adc-7cbc-c7311b3e25e9" response_time:0.003512185 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"512d6723bee17f62" x_b3_spanid:"512d6723bee17f62" x_b3_parentspanid:"-" +¯ß’Š¾ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú⽺¾ØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:02.474+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:9247" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b8ee4f1-3f89-4820-5c81-f688f69bf156" response_time:0.003173294 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c11334e2ba18426c" x_b3_spanid:"c11334e2ba18426c" x_b3_parentspanid:"-" +ŽÕ½º¾ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÞëÔ¿ØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:02.653+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10609" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba23a4c1-4d99-4d88-7422-b112e15ab84e" response_time:0.00252305 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec886a1c890bcbe7" x_b3_spanid:"ec886a1c890bcbe7" x_b3_parentspanid:"-" +óßÔ¿ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ÷Ì÷¿ØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:02.872+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:14373" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea1f8bbf-878b-48c2-784f-5f3f8f205092" response_time:0.002070978 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c3a618566a88044" x_b3_spanid:"5c3a618566a88044" x_b3_parentspanid:"-" +ðëÌ÷¿ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜î‹þÀØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:03.151+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8171" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bfb1bf17-2a67-4d00-7393-85635dff6556" response_time:0.004532174 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af940e0fd505b2a0" x_b3_spanid:"af940e0fd505b2a0" x_b3_parentspanid:"-" +îà‹þÀØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â©• ÁØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.225+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:13767" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"03d70ed9-c274-46a9-62fa-98a9416160cd" response_time:0.001979612 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75288134f4237eb0" x_b3_spanid:"75288134f4237eb0" x_b3_parentspanid:"-" +½ž• ÁØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬˜¹ÄÂØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.569+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:14471" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e527555-4f9b-4094-4103-be42b0a78447" response_time:0.002613955 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"144deba573a6046d" x_b3_spanid:"144deba573a6046d" x_b3_parentspanid:"-" +‚‹¹ÄÂØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Íà„ÏÃØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:03.858+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:14373" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"45b1205a-27fd-4d31-73be-6ffe9e11b258" response_time:0.004542898 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"25feac789ad95b33" x_b3_spanid:"25feac789ad95b33" x_b3_parentspanid:"-" +ŽÔ„ÏÃØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ´ËÐÄØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:04.131+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8171" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e7c6213e-0ac8-4ff7-5dce-d75a23af1bc5" response_time:0.002491284 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f67c16005c764aac" x_b3_spanid:"f67c16005c764aac" x_b3_parentspanid:"-" +š¬ËÐÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œå’èÄØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.180+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:13901" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e645028a-07bb-43c1-680a-1757bcbd8856" response_time:0.003112567 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f3b3008524d5894a" x_b3_spanid:"f3b3008524d5894a" x_b3_parentspanid:"-" +äÝ’èÄØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚Ú¼†ÅØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:04.244+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:13901" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"158e64f1-984f-43e4-55fb-ff4dc2a39483" response_time:0.003353073 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1140880f090fded7" x_b3_spanid:"1140880f090fded7" x_b3_parentspanid:"-" +ôм†ÅØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü½ÆÐÉØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:05.474+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10609" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a7572d9-1885-415c-50de-fc4ceb6ea1eb" response_time:0.001748708 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"76850a9eafee2e33" x_b3_spanid:"76850a9eafee2e33" x_b3_parentspanid:"-" +×±ÆÐÉØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€îÞ¦ÌØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:06.192+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:9787" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"40e17797-5e5d-4814-7c73-527cc44e4835" response_time:0.001573039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eef278fff442d6e9" x_b3_spanid:"eef278fff442d6e9" x_b3_parentspanid:"-" +‹æÞ¦ÌØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0톧ïÍØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:06.613+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10609" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35992d0d-2f8b-4788-571c-8cdab3e74c75" response_time:0.001636114 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9cabca4240268d42" x_b3_spanid:"9cabca4240268d42" x_b3_parentspanid:"-" +äû¦ïÍØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“£‰‚ÒØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.726+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:13311" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10a16d43-ea76-41e9-474e-a6ff6d18ff91" response_time:0.001494724 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d9d3d68706ae4a8" x_b3_spanid:"3d9d3d68706ae4a8" x_b3_parentspanid:"-" +핉‚ÒØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Ü–üÒØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:07.979+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:14373" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2dd7b0b7-1988-4704-671e-7c7cfa8b9857" response_time:0.004512722 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b7cb021dead6d0f" x_b3_spanid:"0b7cb021dead6d0f" x_b3_parentspanid:"-" +‹Î–üÒØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØôÁÊÔØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:08.414+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8171" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8d7caa25-a2f2-48a1-7f68-f9cca07c94f4" response_time:0.002091333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6988d714c8517e4d" x_b3_spanid:"6988d714c8517e4d" x_b3_parentspanid:"-" +üåÁÊÔØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄûìªÖØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:08.883+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10609" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1255e50-dfcb-4f62-44f4-ca8eeba83438" response_time:0.004036383 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"067b7cc54fcfbda4" x_b3_spanid:"067b7cc54fcfbda4" x_b3_parentspanid:"-" +¡ïìªÖØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏïÇØØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.481+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10609" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"657c1719-c21b-48cb-72d9-f4fa2a8e329e" response_time:0.001696036 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"85ef086e107b3ca1" x_b3_spanid:"85ef086e107b3ca1" x_b3_parentspanid:"-" +ÐâÇØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù“¸âØØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:09.538+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12997" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e3f24fa-fbcd-4d90-5998-4231654b2d20" response_time:0.00201948 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26f370f40885e603" x_b3_spanid:"26f370f40885e603" x_b3_parentspanid:"-" +ߌ¸âØØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ†¿ËÙØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:09.759+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:13311" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8842309-cb87-43d2-7061-2eddc2856995" response_time:0.002027411 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb278e53477fc91a" x_b3_spanid:"fb278e53477fc91a" x_b3_parentspanid:"-" +ƒ€¿ËÙØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ¼òÛØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:10.200+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:11249" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"64c75282-a65a-4733-4fbe-9eb7d54656b9" response_time:0.002072347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c1e20ef02eeb4ab7" x_b3_spanid:"c1e20ef02eeb4ab7" x_b3_parentspanid:"-" +®±òÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ×áÙÛØœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:10.325+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:11249" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dd058f63-97ef-460c-61a1-c3de73879620" response_time:0.00205872 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ba0f1dad7c8e34ab" x_b3_spanid:"ba0f1dad7c8e34ab" x_b3_parentspanid:"-" +ÙÌáÙÛØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õÕ‡ÐÜØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.573+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"89e0041d-3948-4ccc-4120-cc21d63c91b2" response_time:0.001828952 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e7d104c21d477ca1" x_b3_spanid:"e7d104c21d477ca1" x_b3_parentspanid:"-" +ŠÅ‡ÐÜØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ×…ÝØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.686+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19059" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba652b41-31e9-4374-6808-099631daa976" response_time:0.001699876 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75888641742d19d7" x_b3_spanid:"75888641742d19d7" x_b3_parentspanid:"-" +‚÷Ö…ÝØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý–ÌÊÝØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:10.830+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21329" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0875544-ffb9-4a3f-69b4-a9d72d7aa966" response_time:0.001892694 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"76f78a5ea0ebe646" x_b3_spanid:"76f78a5ea0ebe646" x_b3_parentspanid:"-" +æŠÌÊÝØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õ®…˜ßØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.261+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21333" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f099a028-bc20-47d6-4be9-9ff9ec7746e9" response_time:0.002158659 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0ba68ee735153ef" x_b3_spanid:"d0ba68ee735153ef" x_b3_parentspanid:"-" +ñ¢…˜ßØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øƒÍߨœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.371+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a340a05-c97b-4014-78cf-bb81f9ffb813" response_time:0.004081819 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"faf71eff1d1e836e" x_b3_spanid:"faf71eff1d1e836e" x_b3_parentspanid:"-" +Ÿ÷œÍߨœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎùŒ®àØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.575+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66481bcb-dc2e-4195-6f82-7009572fa1c0" response_time:0.002748566 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"be6c7057aeb5f5bc" x_b3_spanid:"be6c7057aeb5f5bc" x_b3_parentspanid:"-" +ŽíŒ®àØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ƒæÑàØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.651+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"29634103-aa04-42db-5006-35b5757b9bea" response_time:0.001644035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58932ba3461954d5" x_b3_spanid:"58932ba3461954d5" x_b3_parentspanid:"-" +ÈøåÑàØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýô‡ÙáØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:11.934+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"73b1f6bb-77b1-48fc-48c7-c23c64cfc4e8" response_time:0.002533995 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b716720e2e7eb8a" x_b3_spanid:"3b716720e2e7eb8a" x_b3_parentspanid:"-" +ºç‡ÙáØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’éï¢âØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.089+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38d54c70-2e00-4513-61ac-ddf5dcdff13f" response_time:0.001981967 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"188baa9d9e0ef077" x_b3_spanid:"188baa9d9e0ef077" x_b3_parentspanid:"-" +Ôáï¢âØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’àïâØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:12.251+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6653e699-8572-431e-53f0-6276c2d830da" response_time:0.00150422 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c37406471c41efc4" x_b3_spanid:"c37406471c41efc4" x_b3_parentspanid:"-" +·ˆàïâØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šŸë÷ãØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.536+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19ad257a-86b4-47a4-7afe-4623a2fb15e2" response_time:0.001391031 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"07fa2f0987689868" x_b3_spanid:"07fa2f0987689868" x_b3_parentspanid:"-" +¿©æ÷ãØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñýû‹äØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.578+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87e556ea-de19-4150-76d4-94db2f358c68" response_time:0.001693655 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5d80deeccd780a02" x_b3_spanid:"5d80deeccd780a02" x_b3_parentspanid:"-" +´òû‹äØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ʊ‡¡äØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.622+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4ca81b57-8f19-4db9-7b00-a253f8c546f4" response_time:0.002320735 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a375b74ad9d17258" x_b3_spanid:"a375b74ad9d17258" x_b3_parentspanid:"-" +›¥‡¡äØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ꩇ»åØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:12.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21585" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e11ce50d-71c5-4ffc-6275-18a1aec8a56d" response_time:0.003401231 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"65896aff3ba05f90" x_b3_spanid:"65896aff3ba05f90" x_b3_parentspanid:"-" +òž‡»åØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ËÜÈæØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.240+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"533d178e-0645-4cb9-4e62-5ef6a8b308c5" response_time:0.003236446 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0eff498f83cc061e" x_b3_spanid:"0eff498f83cc061e" x_b3_parentspanid:"-" +ÈÒÈæØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öæ›ÛçØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee2dc26e-d406-4d0f-6da0-9d4df8268004" response_time:0.001721225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e58f29ec936dc855" x_b3_spanid:"e58f29ec936dc855" x_b3_parentspanid:"-" +í×›ÛçØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯†Þ™èØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.681+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"975c0ccc-cd5e-42a5-6ef2-11d906cef969" response_time:0.001947461 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f373914b1fc49497" x_b3_spanid:"f373914b1fc49497" x_b3_parentspanid:"-" +ÐúÝ™èØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0и¹ØèØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.812+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19059" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"74dbfc2c-d8ba-430f-442b-4c9d9a2d7e87" response_time:0.002486234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45432e1c0d08cc2a" x_b3_spanid:"45432e1c0d08cc2a" x_b3_parentspanid:"-" +®­¹ØèØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ¬ˆ‡éØœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:16:13.910+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3483bd3-60a3-4e3c-4d5e-0341c0ef6052" response_time:0.002289 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a9ece8b9438f8579" x_b3_spanid:"a9ece8b9438f8579" x_b3_parentspanid:"-" +§þ‡‡éØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í‘ÖŽéØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:13.926+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d2a3bf1-a28e-4358-5d91-2d4487b347c9" response_time:0.002076974 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00224ce182c335b5" x_b3_spanid:"00224ce182c335b5" x_b3_parentspanid:"-" +ö…ÖŽéØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›¿ÑèîØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.457+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c68f9bd6-3911-4487-591e-3c3fbabe6ef3" response_time:0.002094701 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"942d822427efb0dc" x_b3_spanid:"942d822427efb0dc" x_b3_parentspanid:"-" +¥³ÑèîØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ°õ¡ðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.846+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e32a89cb-6ac4-4a82-7696-0262c86da180" response_time:0.001747552 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5806fd9200d53412" x_b3_spanid:"5806fd9200d53412" x_b3_parentspanid:"-" +ì¦õ¡ðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«´Î°ðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.876+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21409" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2b7ebf6-2304-472c-6ff3-6704506103a2" response_time:0.001807802 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"86a372165fda8d01" x_b3_spanid:"86a372165fda8d01" x_b3_parentspanid:"-" +á§Î°ðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ͳãÈðØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:15.927+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14509" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4ce69ee-0e43-41e7-47b6-c725400f7873" response_time:0.002119746 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"413bafd46c12d064" x_b3_spanid:"413bafd46c12d064" x_b3_parentspanid:"-" +ЫãÈðØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Å좆ñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.055+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"809c138e-74c1-4d44-6977-a9ac4f7e9231" response_time:0.002407173 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5a4e37d307349a1" x_b3_spanid:"b5a4e37d307349a1" x_b3_parentspanid:"-" +þߢ†ñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„³®¢ñØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.113+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60f81cdc-3c29-49a2-4b6a-55d96f2376d4" response_time:0.003351815 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70ccd5810b42fbe0" x_b3_spanid:"70ccd5810b42fbe0" x_b3_parentspanid:"-" +®¦®¢ñØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýͳ²òØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:16.417+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ef06e6b-6177-40b2-4f3d-db2a7699490a" response_time:0.00196005 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d70c277a402e481d" x_b3_spanid:"d70c277a402e481d" x_b3_parentspanid:"-" +Ðij²òØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù ©ÚòØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.501+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e56490aa-2b1b-4370-50a4-843ef141a9cb" response_time:0.001422528 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"98044e8b1c320d09" x_b3_spanid:"98044e8b1c320d09" x_b3_parentspanid:"-" +”©ÚòØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û…å€ôØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:16.847+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e69e5654-ca32-4202-7bad-013a04c40f2b" response_time:0.004762927 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f78b86a2716a8e57" x_b3_spanid:"f78b86a2716a8e57" x_b3_parentspanid:"-" +žûä€ôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ÊÑÊôØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.000+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21279" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9ea31794-a5c0-4724-6a46-6cae079f1573" response_time:0.006222292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"adcedb81b4419269" x_b3_spanid:"adcedb81b4419269" x_b3_parentspanid:"-" +ØÂÑÊôØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯–΂õØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.122+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21333" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eebb2ea3-7849-43af-7106-4c9588f80f68" response_time:0.002303804 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"325ee3c4f2280f3a" x_b3_spanid:"325ee3c4f2280f3a" x_b3_parentspanid:"-" +ċ΂õØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®Ê§ÚõØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.305+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aaaf4ec0-6728-48ac-707f-e9b6c3a0a80b" response_time:0.002563569 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"888985f1943a551a" x_b3_spanid:"888985f1943a551a" x_b3_parentspanid:"-" +°Â§ÚõØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùÖ¶¬öØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:17.472+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4a41c76a-56af-476f-4914-301832754351" response_time:0.00775753 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0a0f851c51eae4b" x_b3_spanid:"e0a0f851c51eae4b" x_b3_parentspanid:"-" +áʶ¬öØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚÞß«÷ØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.745+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1181860f-bd62-43f1-5f3b-1e83c111209b" response_time:0.002094746 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b191b8f33f57505" x_b3_spanid:"1b191b8f33f57505" x_b3_parentspanid:"-" +©Òß«÷ØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æóñ‚øØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.926+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"acc98f5b-d81d-4799-5f61-c92a638bcd1e" response_time:0.003596411 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0eef07a45c3fbb65" x_b3_spanid:"0eef07a45c3fbb65" x_b3_parentspanid:"-" +ãçñ‚øØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô÷”¡øØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:17.990+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a3877a29-3036-4bf3-59b4-32e2df5ddef4" response_time:0.003300332 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f0d8aba63b56a527" x_b3_spanid:"f0d8aba63b56a527" x_b3_parentspanid:"-" +Í딡øØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡ŠáÈùØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.343+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19709" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9850d4f-25b8-47cf-5d1c-b6e962def484" response_time:0.002121634 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a841e7445be13388" x_b3_spanid:"a841e7445be13388" x_b3_parentspanid:"-" +É‚áÈùØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýµŸúØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:18.493+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19709" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b951dd1d-852d-437e-6b6e-51070b95e075" response_time:0.001993399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"befacbd952881b51" x_b3_spanid:"befacbd952881b51" x_b3_parentspanid:"-" +„ªŸúØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Žûº×üØœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:19.177+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df5c67d8-2004-447f-78b7-945118cf8504" response_time:0.003808791 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"888028ffe969f069" x_b3_spanid:"888028ffe969f069" x_b3_parentspanid:"-" +·ðº×üØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ´ñ±ÿØœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:19.905+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19059" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1505c664-c451-409a-7d87-7dd147f937c2" response_time:0.00259214 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a142ed7cd3ae7218" x_b3_spanid:"a142ed7cd3ae7218" x_b3_parentspanid:"-" +¾¨ñ±ÿØœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º´Ù–ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.383+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21331" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4754ea86-8772-45dd-5204-a1ee82863840" response_time:0.004467502 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5e0200691a584c8" x_b3_spanid:"a5e0200691a584c8" x_b3_parentspanid:"-" +٩ٖٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ЃÍÙ‚ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.794+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"495ff9ce-7968-46ba-6d7f-c546dc8b9718" response_time:0.001589266 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"62f8953eeaddd838" x_b3_spanid:"62f8953eeaddd838" x_b3_parentspanid:"-" +üÌÙ‚ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬îƯƒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:20.975+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21585" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e968dc18-8eed-48d7-41a9-b763a28ba416" response_time:0.001239772 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f783f32d5aa5b1ef" x_b3_spanid:"f783f32d5aa5b1ef" x_b3_parentspanid:"-" +¥æÆ¯ƒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â¨ÿȃٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:21.028+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f79c775b-c2fe-4653-5092-789a7d25b2c5" response_time:0.001404606 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2cc05f0624920641" x_b3_spanid:"2cc05f0624920641" x_b3_parentspanid:"-" +‡žÿȃٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ÚÊ ¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.355+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e543d056-88ce-4acf-48e9-0e4d2ff54ea6" response_time:0.002299771 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4a71a9ca5a042e3" x_b3_spanid:"e4a71a9ca5a042e3" x_b3_parentspanid:"-" +ÅÍÊ ¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ïû‚è¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.505+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e6b2823-f16b-435a-4c0d-34c155040af5" response_time:0.002580117 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f00d44e832879c8d" x_b3_spanid:"f00d44e832879c8d" x_b3_parentspanid:"-" +Íï‚è¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þÙ‰¢ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:03.573+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb5c6b9c-2fea-4230-6755-573b839e2ab5" response_time:0.0032919 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"630b782125914d45" x_b3_spanid:"630b782125914d45" x_b3_parentspanid:"-" +Ílj¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öäê¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.778+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17239" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"039e9d4e-0c71-4f38-4d61-f899883939f7" response_time:0.002066637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c58e11dfce58adf9" x_b3_spanid:"c58e11dfce58adf9" x_b3_parentspanid:"-" +ÞÛê¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Âê£ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.964+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3b00440-e91d-4315-7fb3-0223bd908c92" response_time:0.001928834 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3df5585d8558ed72" x_b3_spanid:"3df5585d8558ed72" x_b3_parentspanid:"-" +Äøé£ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úþûý¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.892+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c975b67a-47af-4ee3-6e4c-ef732ee75ee3" response_time:0.003177998 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"548e42f6ec26382f" x_b3_spanid:"548e42f6ec26382f" x_b3_parentspanid:"-" +…ïûý¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øï控ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.929+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17225" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"73f94215-a63a-4f0b-63ac-df9415d37378" response_time:0.00217176 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"20ddf0ab856b36fb" x_b3_spanid:"20ddf0ab856b36fb" x_b3_parentspanid:"-" +ßáæŽ§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ì¦Í¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.329+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9bc29374-8058-4327-52a2-025795e7328c" response_time:0.001372889 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"402ed2538817d054" x_b3_spanid:"402ed2538817d054" x_b3_parentspanid:"-" +øÜ¦Í¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÏ¨ø©ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.687+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"23383aa9-f30f-4efb-7406-90cf9ab5da67" response_time:0.002002649 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"81403f042c190f36" x_b3_spanid:"81403f042c190f36" x_b3_parentspanid:"-" +רø©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°øÕØ­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.695+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18153" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"af0306f6-c24e-4eb5-5d33-18c7f0c086f9" response_time:0.001436224 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f1597319942a07c2" x_b3_spanid:"f1597319942a07c2" x_b3_parentspanid:"-" +‘ìÕØ­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃüÝ™°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.368+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:18175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08020ebd-227f-4e66-6393-e0514e587268" response_time:0.001536157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fae22afa8d469c59" x_b3_spanid:"fae22afa8d469c59" x_b3_parentspanid:"-" +èîÝ™°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Ä£æ§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.112+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee7503ef-81a4-441f-6271-97a60abcffe3" response_time:0.001909422 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c54ea5b21a086e50" x_b3_spanid:"c54ea5b21a086e50" x_b3_parentspanid:"-" +‡»£æ§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Âý§Ä¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"559da7ce-d2d9-434e-48b0-43c5a57a3267" response_time:0.001461802 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"419e99dc4ba83deb" x_b3_spanid:"419e99dc4ba83deb" x_b3_parentspanid:"-" +Ëõ§Ä¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼òÔòÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.770+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49605" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8514eecb-87e4-4f50-77b9-bfd331e248b4" response_time:0.001967138 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c94b3f10ecc8c71b" x_b3_spanid:"c94b3f10ecc8c71b" x_b3_parentspanid:"-" +˜´òÔòÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…š‘«óÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:07.950+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27752" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"060df003-ac94-41ce-6213-f3b7a98e5104" response_time:0.002164811 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92d562ee6756e992" x_b3_spanid:"92d562ee6756e992" x_b3_parentspanid:"-" +Ó™«óÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠËö¼ôÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.257+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49053" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a9ad99e-4db2-4915-72fb-94daa6debad8" response_time:0.001499478 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30aa6c98c355803b" x_b3_spanid:"30aa6c98c355803b" x_b3_parentspanid:"-" +ÐÃö¼ôÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ΚíÊôÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.286+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49053" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf6624b1-efea-4323-54f2-d406dfc41186" response_time:0.001825302 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"135b677946d6f455" x_b3_spanid:"135b677946d6f455" x_b3_parentspanid:"-" +ÔŒíÊôÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßíÿøôÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:08.381+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2daa328-13f9-4516-6e10-382e2f810308" response_time:0.00323611 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"466972808aff0887" x_b3_spanid:"466972808aff0887" x_b3_parentspanid:"-" +½æÿøôÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þ¤æöÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.877+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49605" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6367ab3e-40f5-4e7f-698f-6f9010bb980a" response_time:0.004383125 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e29fa0a693a97411" x_b3_spanid:"e29fa0a693a97411" x_b3_parentspanid:"-" +‡¤æöÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óø•§ÜÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:01.764+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0dbb5d05-5063-4d14-7d39-2eec29e63740" response_time:0.005804369 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3eb75108939ded2b" x_b3_spanid:"3eb75108939ded2b" x_b3_parentspanid:"-" +Ûæ•§ÜÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®¶ÛÜÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:01.877+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48963" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60b507af-29ac-418e-6717-19bc92ab2449" response_time:0.002876917 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f2b9d1cafb28ab45" x_b3_spanid:"f2b9d1cafb28ab45" x_b3_parentspanid:"-" +Ù¶ÛÜÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥”ß÷ÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:08.993+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27752" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14b4e09f-a87a-4e54-6a40-b5383fd2616d" response_time:0.005133508 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3347a7359c576b4d" x_b3_spanid:"3347a7359c576b4d" x_b3_parentspanid:"-" +©‹ß÷ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ‘¤­øÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:09.297+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:24620" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"994466eb-6a71-489c-5f14-7465df86fba2" response_time:0.001732282 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"87781885f6132780" x_b3_spanid:"87781885f6132780" x_b3_parentspanid:"-" +Ĥ­øÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö»„£ùÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:09.543+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:47897" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0fc4d430-a574-47e0-6729-2b5e03e59564" response_time:0.00255645 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"90f1d928e29a4253" x_b3_spanid:"90f1d928e29a4253" x_b3_parentspanid:"-" +в„£ùÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÅÛÆâûÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.215+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:27436" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e31f1e46-994c-4e7c-53fc-760f48769bbf" response_time:0.001629727 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d446f4ce0e169453" x_b3_spanid:"d446f4ce0e169453" x_b3_parentspanid:"-" +ƒÌÆâûÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ–¼îûÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.238+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:43751" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3211e7e6-e2bd-46e6-77a5-6669947bc0c0" response_time:0.002650909 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6306f1fdb3026ad" x_b3_spanid:"b6306f1fdb3026ad" x_b3_parentspanid:"-" +ú›»îûÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëÏÂÏýÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.710+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:13507" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08880145-047a-421a-46ba-785b8d7c8977" response_time:0.002973446 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b7a2d5300361cb54" x_b3_spanid:"b7a2d5300361cb54" x_b3_parentspanid:"-" +ªÃÂÏýÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˾”ÄýÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.687+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:35939" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25813c13-37bf-44d0-75ef-328d90827d8c" response_time:0.002434862 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"daee77bde35d0e39" x_b3_spanid:"daee77bde35d0e39" x_b3_parentspanid:"-" +”³”ÄýÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿø¨ËýÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:35939" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2cf10043-c0f9-494f-629e-76b36126e6e3" response_time:0.002086329 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"53d23b7da526c954" x_b3_spanid:"53d23b7da526c954" x_b3_parentspanid:"-" +”ì¨ËýÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘ÐÂæýÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.758+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:48563" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"618579d5-fdc5-4ab1-6e11-ce8242cd9b13" response_time:0.003346978 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bf8c01214f78f888" x_b3_spanid:"bf8c01214f78f888" x_b3_parentspanid:"-" +ÛÇÂæýÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ïö‚þÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.819+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49605" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"398b8e14-4dac-43ce-6cd1-1fe9bca13cf2" response_time:0.001907678 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79ed99f57afdd136" x_b3_spanid:"79ed99f57afdd136" x_b3_parentspanid:"-" +öâö‚þÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ѷ„‘þÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:10.849+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:25106" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25374c05-c072-4f30-6440-88ad6f74275d" response_time:0.001887134 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a626b56ed1dda068" x_b3_spanid:"a626b56ed1dda068" x_b3_parentspanid:"-" +ݸƒ‘þÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì¢å¸þÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:10.932+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10659" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bb790b08-443e-4e08-756f-28198ec0aa56" response_time:0.00233049 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"efc0006b5a97bf22" x_b3_spanid:"efc0006b5a97bf22" x_b3_parentspanid:"-" +€–å¸þÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒòì¶ÿÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:11.196+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:22406" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3448f5f-daa6-44c3-4106-93dd72e2f20e" response_time:0.002722167 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd96c216049e895f" x_b3_spanid:"cd96c216049e895f" x_b3_parentspanid:"-" +„êì¶ÿÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï žÏÿÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:11.244+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49605" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e7bf0173-7e49-4f68-5319-5b4d2dff3479" response_time:0.005635339 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c1fc60b6b73278de" x_b3_spanid:"c1fc60b6b73278de" x_b3_parentspanid:"-" +µ‘žÏÿÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶þÃ×ÿÖœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:15:11.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:20880" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"68314560-6616-40db-7cb5-18166c140832" response_time:0.00261213 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"185c1166f5867991" x_b3_spanid:"185c1166f5867991" x_b3_parentspanid:"-" +†õÃ×ÿÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º¶ÐŀלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.494+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ddae4af6-75ef-4d42-6723-8a50df8c5ed1" response_time:0.003297286 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9cc6ba7b768aa4f6" x_b3_spanid:"9cc6ba7b768aa4f6" x_b3_parentspanid:"-" +Ç®ÐŀלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ¢î®×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.716+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28058" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"360c85fd-bf4a-4a3c-55a3-02c033f53062" response_time:0.002055347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ea95571437286ba8" x_b3_spanid:"ea95571437286ba8" x_b3_parentspanid:"-" +œ–î®×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðѳ‚לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:11.921+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33252137-8fe9-406f-4666-7acdfaba9891" response_time:0.001547706 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f01eff5cfe0c64d7" x_b3_spanid:"f01eff5cfe0c64d7" x_b3_parentspanid:"-" +—ȳ‚לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š‘þ‚לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:12.151+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58280" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"27eb150c-0992-436b-7efb-450a0ed2a8e0" response_time:0.001955338 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"713492afe359df00" x_b3_spanid:"713492afe359df00" x_b3_parentspanid:"-" +‘þ‚לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñË÷œ„לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:12.483+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee46dc03-7a42-4936-6ce5-46aaf4d8e55c" response_time:0.003413362 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7801435a684dba08" x_b3_spanid:"7801435a684dba08" x_b3_parentspanid:"-" +–Ä÷œ„לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æñ·«„לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:12.515+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e6e26ece-c793-4ace-6df7-c51b5c4ab73b" response_time:0.002000743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e776f574bcdd66d0" x_b3_spanid:"e776f574bcdd66d0" x_b3_parentspanid:"-" +å·«„לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”÷’…לÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:12.731+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58356" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d5689e8-2f8a-4c3e-4418-66b17bfea8a9" response_time:0.00159817 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bed7a64fb2890271" x_b3_spanid:"bed7a64fb2890271" x_b3_parentspanid:"-" +×蒅לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎÿÒ¢…לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:12.765+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9213f217-115a-4d0d-57cc-872fb6ea4c0a" response_time:0.001844613 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f329c426778d351c" x_b3_spanid:"f329c426778d351c" x_b3_parentspanid:"-" +îñÒ¢…לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È–Ÿž†×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.022+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"917698b3-f338-4d0f-5629-3a03b985de4b" response_time:0.003834993 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c5a7704ab7e85236" x_b3_spanid:"c5a7704ab7e85236" x_b3_parentspanid:"-" +³½žž†×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªôœß†×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.160+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6f84a2d9-44a2-4ea2-4058-d42737da98cb" response_time:0.002200731 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7bda59f7e5574f7e" x_b3_spanid:"7bda59f7e5574f7e" x_b3_parentspanid:"-" +§éœß†×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜¸Á†‡×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.243+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4ccfc363-fb75-4908-4f60-e67fdb96a4a2" response_time:0.001767107 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7bc8a916dafdd9f3" x_b3_spanid:"7bc8a916dafdd9f3" x_b3_parentspanid:"-" +è°Á†‡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þê·Ó‡×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.404+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30838" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c8201a3-bf40-4198-74fb-6bce91cae79c" response_time:0.001801867 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"faec1612684154e5" x_b3_spanid:"faec1612684154e5" x_b3_parentspanid:"-" +‰Ü·Ó‡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÈ£µˆ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.608+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9ae2033-1d61-4ae5-753d-a5dac9415c14" response_time:0.002539211 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8a5b92eec0624a1" x_b3_spanid:"c8a5b92eec0624a1" x_b3_parentspanid:"-" +绣µˆ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÞŒ¦Áˆ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:13.633+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58356" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c9f975b7-48db-4ca8-79ff-df72f7b1af17" response_time:0.003493621 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a71160eb3d11056a" x_b3_spanid:"a71160eb3d11056a" x_b3_parentspanid:"-" +€ƒ¦Áˆ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î„çŠ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58482" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ab331a3-8ac8-4502-562b-44fd318ffa63" response_time:0.001837275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ff6ab38ba22580bc" x_b3_spanid:"ff6ab38ba22580bc" x_b3_parentspanid:"-" +’ôƒçŠ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üÝõìŠ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28058" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aafc120c-2b4d-4ea1-6847-9af9c0219c24" response_time:0.001501023 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"416145c3686f1e8f" x_b3_spanid:"416145c3686f1e8f" x_b3_parentspanid:"-" +ÉÖõìŠ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁëÅ݋לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.499+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65e4ddca-62ef-423b-77f7-e54e04283939" response_time:0.001670972 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75dab482b7a24f84" x_b3_spanid:"75dab482b7a24f84" x_b3_parentspanid:"-" +õãÅ݋לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘”®Œ×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:14.660+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"760fd630-091e-4dc5-4e0a-b607ffd8253c" response_time:0.00959218 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c8e4aba0bdfb52c7" x_b3_spanid:"c8e4aba0bdfb52c7" x_b3_parentspanid:"-" +Ƈ”®Œ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢º…ðŒ×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:14.805+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52600" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4242d9e6-b463-49cb-582e-7219c73dc3f3" response_time:0.00248586 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"335f0c86bac2153b" x_b3_spanid:"335f0c86bac2153b" x_b3_parentspanid:"-" +µ³…ðŒ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔôŒ€×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.835+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33964" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a5dbdee-499f-4b5a-71d7-f3a9fdcb1d06" response_time:0.006156224 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"182be13ed2182f54" x_b3_spanid:"182be13ed2182f54" x_b3_parentspanid:"-" +âæŒ€×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ƒØ”לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.882+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19055" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90cb669b-9b04-4842-719e-03f4eda372fc" response_time:0.002468355 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"791541246fadef78" x_b3_spanid:"791541246fadef78" x_b3_parentspanid:"-" +¤õהלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾…þÇלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:14.988+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"486fbd61-6cab-450d-4f01-a00a8d02d1b8" response_time:0.004157281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7932729c15640738" x_b3_spanid:"7932729c15640738" x_b3_parentspanid:"-" +¥øýÇלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸ˆ³ÓלÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:15.014+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fd9543a3-e9bb-4a58-4b80-4a76bcf9c3f1" response_time:0.00222307 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4acebe9bda3c646c" x_b3_spanid:"4acebe9bda3c646c" x_b3_parentspanid:"-" +ãû²ÓלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’¦Ä´øÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:09.313+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:49907" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9330e81f-b264-4816-7b2a-2208f4ce9f5c" response_time:0.001920976 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7ad7cac204cfe62d" x_b3_spanid:"7ad7cac204cfe62d" x_b3_parentspanid:"-" +‹ŸÄ´øÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æ“ú¸‘לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.032+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58358" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f7d6acab-df3f-41ec-5486-b228fd0d58f5" response_time:0.002333755 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ca94850531266a53" x_b3_spanid:"ca94850531266a53" x_b3_parentspanid:"-" +”‰ú¸‘לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0寪ӑלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.086+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15665" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"344d7ccd-38de-4bb0-51e6-079dd81ad639" response_time:0.003377009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb709d72d415fd33" x_b3_spanid:"fb709d72d415fd33" x_b3_parentspanid:"-" +꠪ӑלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šæÀБלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61652b8d-b90c-474f-6af5-6a2a950881dc" response_time:0.005699831 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4dd58ac9c4c521c" x_b3_spanid:"e4dd58ac9c4c521c" x_b3_parentspanid:"-" +ñÛÀБלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü°ƒ’לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.213+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e09826a6-503b-43c8-7559-1b231322ffc5" response_time:0.004512878 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"327ca1cf25999f92" x_b3_spanid:"327ca1cf25999f92" x_b3_parentspanid:"-" +ÿ¤‚’לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÄÝ»”לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"800ed26b-4a9c-4d25-5f8c-79deac7ceba3" response_time:0.002839938 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ddab35ed9b77ef9" x_b3_spanid:"5ddab35ed9b77ef9" x_b3_parentspanid:"-" +§µÝ»”לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·ùþï”לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:16.952+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05d71e57-ae03-461e-4fad-abc4b5ff8810" response_time:0.003535117 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2271b6c8da83787a" x_b3_spanid:"2271b6c8da83787a" x_b3_parentspanid:"-" +´ëþï”לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0陖לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.307+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2517d1a8-eccd-4a89-7b1c-10929c2f5b9f" response_time:0.002849994 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4dca785c084c6941" x_b3_spanid:"4dca785c084c6941" x_b3_parentspanid:"-" +¼‹™–לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÀŠœ–לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.315+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e40f7f3-1e57-41e6-4803-f649d9a39225" response_time:0.001450547 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cb173f159241ddd2" x_b3_spanid:"cb173f159241ddd2" x_b3_parentspanid:"-" +Ð¹Šœ–לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åÄÎý—לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.783+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30986" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce25d12b-993f-4bff-5f5e-9cec56a6f274" response_time:0.006308554 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e298d378a4d3bece" x_b3_spanid:"e298d378a4d3bece" x_b3_parentspanid:"-" +é½Îý—לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿´ò²˜×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:17.899+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20447" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6f130f92-4045-49ed-5c53-89b027ff9e33" response_time:0.001867839 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63db32cee479d2af" x_b3_spanid:"63db32cee479d2af" x_b3_parentspanid:"-" +À©ò²˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßܯû˜×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:18.051+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9987" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aa5b7148-e9f3-49b4-444c-9a48c3f4cd2f" response_time:0.001802847 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95466baafb754100" x_b3_spanid:"95466baafb754100" x_b3_parentspanid:"-" +Ö¯û˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºåîô˜×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.038+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"25953bfc-d14c-4411-7e3d-492374579aea" response_time:0.001469624 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"811717c0589da5a8" x_b3_spanid:"811717c0589da5a8" x_b3_parentspanid:"-" +ÍÞîô˜×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ð³—š×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.378+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d11e00a2-3aa0-4aea-6756-d3ca9719309b" response_time:0.001688344 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a42f777d6d2bd88b" x_b3_spanid:"a42f777d6d2bd88b" x_b3_parentspanid:"-" +Šè³—š×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý¿üªš×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.417+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30986" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a2a16f24-6ac4-4867-5be6-5607c07c999a" response_time:0.004003583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"500d66ddbd6c69e6" x_b3_spanid:"500d66ddbd6c69e6" x_b3_parentspanid:"-" +Æ´üªš×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ÀäޛלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.793+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58280" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3ddb1ba-f3f1-4fe9-6d30-80dafc443fa2" response_time:0.004939284 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef5d8eab1f79f0fa" x_b3_spanid:"ef5d8eab1f79f0fa" x_b3_parentspanid:"-" +ɹäޛלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ³é€œ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.867+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a1868eaf-bd06-4df9-4d8b-ae00d45c0100" response_time:0.002377612 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2449b581b0f32e45" x_b3_spanid:"2449b581b0f32e45" x_b3_parentspanid:"-" +–£é€œ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“퉖œ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:18.912+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33922" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7d1f2407-048d-4acc-6d17-765b9674b387" response_time:0.001835157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2edf5c93c8dfb56c" x_b3_spanid:"2edf5c93c8dfb56c" x_b3_parentspanid:"-" +Äቖœ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í·ËלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.293+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a1bbbcc0-638c-435c-7506-c7fed821ba40" response_time:0.001859508 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f69e8be8f42b6895" x_b3_spanid:"f69e8be8f42b6895" x_b3_parentspanid:"-" +μ·ËלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÁÉÒלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:19.306+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cb675601-f0f5-46da-524d-14b8d182d600" response_time:0.003298863 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9cf0acbf2947f4a3" x_b3_spanid:"9cf0acbf2947f4a3" x_b3_parentspanid:"-" +ý³ÉÒלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±¼ò ×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.179+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0fd4f835-b7d6-42d9-6881-7c6c4af283be" response_time:0.002615614 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"def439d11a28c492" x_b3_spanid:"def439d11a28c492" x_b3_parentspanid:"-" +†‡¼ò ×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º„³¡×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.208+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b6746e3a-f224-4291-4207-a41fab61ba5a" response_time:0.004992181 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de744e81a912841e" x_b3_spanid:"de744e81a912841e" x_b3_parentspanid:"-" +ëü²¡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ààРלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.109+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"926801c4-31a5-44a8-7cdf-1593e44c1f57" response_time:0.002461491 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3772f1e84271f597" x_b3_spanid:"3772f1e84271f597" x_b3_parentspanid:"-" +üØàРלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þñÞç¡×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.426+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"55f74469-6683-4e11-594a-ccc135186ff6" response_time:0.001984522 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27c2153c9e1da534" x_b3_spanid:"27c2153c9e1da534" x_b3_parentspanid:"-" +ÖêÞç¡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þÎ…÷¡×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.458+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34154" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e7e552de-a4ed-4601-6863-e088499215fb" response_time:0.001549276 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"68eb61fb7ff055d9" x_b3_spanid:"68eb61fb7ff055d9" x_b3_parentspanid:"-" +Ã…÷¡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þÍ¡לÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.347+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19055" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc2351ee-ccd4-4e18-6a51-72227ed02f07" response_time:0.001705537 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a86a4aeef63cee57" x_b3_spanid:"a86a4aeef63cee57" x_b3_parentspanid:"-" +¢Ä¡לÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÀø¡×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.461+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13831" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d4a5b73f-9b8b-40f6-7cf4-8d5bbdafadeb" response_time:0.001726741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8413b171a984a28" x_b3_spanid:"a8413b171a984a28" x_b3_parentspanid:"-" +¸ÇÀø¡×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ƶ‘À¤×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:21.148+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab4f1beb-4d68-44cc-6c25-46127aa62e6b" response_time:0.001667106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"671ea055ecd6a16c" x_b3_spanid:"671ea055ecd6a16c" x_b3_parentspanid:"-" +ôª‘À¤×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·§ô–¥×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:21.329+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20463" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a61feffe-a562-401e-601e-21e4f40ecc3b" response_time:0.00237366 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"14404762099eccc4" x_b3_spanid:"14404762099eccc4" x_b3_parentspanid:"-" +òšô–¥×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý°õì§×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:22.042+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:30798" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a11280ed-3936-4e9f-43b4-30ff867d2ab4" response_time:0.007411123 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dce7c5914ae90f3f" x_b3_spanid:"dce7c5914ae90f3f" x_b3_parentspanid:"-" +™‚õì§×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò¨±Ì¨×œÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:15:22.248+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"429c7c3c-7632-47f5-4a8e-18d0f6b09f30" response_time:0.00170121 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2184f0933795e56f" x_b3_spanid:"2184f0933795e56f" x_b3_parentspanid:"-" +·±Ì¨×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼™‘ШלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:22.255+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b971d8f8-1517-4680-79a0-fc11864564eb" response_time:0.002380515 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aaaf59133dc8e9e8" x_b3_spanid:"aaaf59133dc8e9e8" x_b3_parentspanid:"-" +‰‘ШלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼‚Áª©×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:22.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20969" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"47e04248-cdb4-4543-6d7b-671f987a4d1a" response_time:0.003033024 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fcc19e7a319c98d8" x_b3_spanid:"fcc19e7a319c98d8" x_b3_parentspanid:"-" +úóÀª©×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­òˆÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:22.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c45e32bf-f91c-40ca-4074-956e8ab4f3be" response_time:0.002312611 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e632e27391641a6c" x_b3_spanid:"e632e27391641a6c" x_b3_parentspanid:"-" +»âˆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢§û‡‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17745" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9660b175-adfc-4658-76d0-89220a0a2c06" response_time:0.002016625 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1f7a69eadfdcdad" x_b3_spanid:"a1f7a69eadfdcdad" x_b3_parentspanid:"-" +ó˜û‡‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Åá«‹‰ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:22.508+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17745" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be5ac065-9213-44b3-7cc3-707da93ac8e8" response_time:0.002600522 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3fe61590dc6abf9d" x_b3_spanid:"3fe61590dc6abf9d" x_b3_parentspanid:"-" +–Ñ«‹‰ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ×ÅîŠÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:22.986+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"afa553d8-6af3-4ab5-6b11-ec12406159bb" response_time:0.001338109 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c973d418dc36061" x_b3_spanid:"6c973d418dc36061" x_b3_parentspanid:"-" +èÉÅîŠÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÇðÕÇÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.244+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bcd377ea-510d-4f51-5860-c41726b54f61" response_time:0.003756508 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c128504557db9629" x_b3_spanid:"c128504557db9629" x_b3_parentspanid:"-" +çÕÇÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶¹²Å‘ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:24.779+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17543" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35dfdff9-97ea-485c-6890-7c094f726d67" response_time:0.001360275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30d2038147d0865d" x_b3_spanid:"30d2038147d0865d" x_b3_parentspanid:"-" +맲őٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìÖû¶–ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:26.089+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"319eecd0-2994-4280-4a63-208e63eee693" response_time:0.002842284 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2952c7e5a8b4ef63" x_b3_spanid:"2952c7e5a8b4ef63" x_b3_parentspanid:"-" +þÎû¶–ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óºè  ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:28.727+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17543" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6e3d4b17-c3be-4b08-5c3f-7fc7bdc8868c" response_time:0.002916436 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b5a2c11a174cee7" x_b3_spanid:"1b5a2c11a174cee7" x_b3_parentspanid:"-" +Í­è  ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“‹®É§ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:30.692+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17453" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"546b4614-54e3-4433-5ee9-17f913980a99" response_time:0.001970402 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00dbad872ef99657" x_b3_spanid:"00dbad872ef99657" x_b3_parentspanid:"-" +¢ý­É§ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ă–°ªÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:31.445+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"75604f77-d369-4c69-62c5-d60cded1ae08" response_time:0.001576691 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18be5b8e48748f67" x_b3_spanid:"18be5b8e48748f67" x_b3_parentspanid:"-" +Ÿ÷•°ªÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì£ûµÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:34.359+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4aa654c-43ad-4b36-43c1-8cefa6ef7ce4" response_time:0.002308553 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d410abc015a35047" x_b3_spanid:"d410abc015a35047" x_b3_parentspanid:"-" +ˆ–ûµÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë¦Û¾µÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:34.428+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1f053790-47cc-41f3-75ff-b12180cf20bb" response_time:0.001771723 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4ffa8b1a63720a60" x_b3_spanid:"4ffa8b1a63720a60" x_b3_parentspanid:"-" +ü™Û¾µÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.844+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a74366fd-d4bb-42c6-6dc6-12bd1c4587ac" response_time:0.002818313 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75d9cacbd5bbe0b4" x_b3_spanid:"75d9cacbd5bbe0b4" x_b3_parentspanid:"-" +¼å®¿¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åÆïͿٜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.144+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53d3e780-c901-4420-5c31-916a287e4223" response_time:0.001817463 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"99d0e9bf0e32e174" x_b3_spanid:"99d0e9bf0e32e174" x_b3_parentspanid:"-" +‰¶ïͿٜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èÒ‹÷ÀÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.499+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"812ddd70-1b8f-409e-54cb-c1b6e8802a9c" response_time:0.001655621 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6202fe1a7822e7df" x_b3_spanid:"6202fe1a7822e7df" x_b3_parentspanid:"-" +ÿÊ‹÷ÀÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï…‡ÖÁÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.698+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6e6e0991-2b1d-4f98-4e81-6bd574cc3b50" response_time:0.001743363 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4a46794725582e2" x_b3_spanid:"d4a46794725582e2" x_b3_parentspanid:"-" +Àø†ÖÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÄä­ÄÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5a2f590-55d2-405e-4adf-42e6bb73429a" response_time:0.001869336 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d4424a80628f67a" x_b3_spanid:"9d4424a80628f67a" x_b3_parentspanid:"-" +§·ä­ÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†–›‡ÅÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:38.606+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"31641d8e-5c43-41bc-5a07-bac6d7b58fa0" response_time:0.001845708 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6bd97f1b33851c8a" x_b3_spanid:"6bd97f1b33851c8a" x_b3_parentspanid:"-" +ÁŒ›‡ÅÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜â†ÀÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.994+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b7a68dd-9589-4572-60bd-cd2b34f4c9f8" response_time:0.001992942 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2d03fd40b9dd2710" x_b3_spanid:"2d03fd40b9dd2710" x_b3_parentspanid:"-" +·Æ…ÀÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òÍæÄÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.004+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"55f604d1-2cd0-4cec-7556-f3c30e5c03b2" response_time:0.001536521 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8eacdf0bfdd3fb26" x_b3_spanid:"8eacdf0bfdd3fb26" x_b3_parentspanid:"-" +ùÀæÄÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º§ƒÉÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.013+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16953" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4a9aa27f-a598-401a-6623-1786c3fc639c" response_time:0.001809729 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b9bec562a3048bd8" x_b3_spanid:"b9bec562a3048bd8" x_b3_parentspanid:"-" +ššƒÉÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0И¦ÀþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.025+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dba40e47-eb2a-4d88-7257-84744f7bf1b2" response_time:0.003906387 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f55ddf8c3a8e69cc" x_b3_spanid:"f55ddf8c3a8e69cc" x_b3_parentspanid:"-" +¼¦ÀþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÒ—ÖþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.072+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53c779e2-1c17-4502-7fc9-1ac5ac046317" response_time:0.002890487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"477e4138e296cfd9" x_b3_spanid:"477e4138e296cfd9" x_b3_parentspanid:"-" +Ç×ÖþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬îÞõþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c7be50ef-1bdc-4da1-4b48-2a3619770a2d" response_time:0.003818857 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e151f4479bd7a32" x_b3_spanid:"0e151f4479bd7a32" x_b3_parentspanid:"-" +ðàÞõþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À“¡ä€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.640+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19093" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f004c6fe-14f5-4de3-5294-2e693236b0f2" response_time:0.001627024 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e343f58e4faeb8f7" x_b3_spanid:"e343f58e4faeb8f7" x_b3_parentspanid:"-" +Ç€¡ä€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Öž–ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.723+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7db8551-df59-4ccf-6059-c2841d98d355" response_time:0.001763955 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b8224303f0d5e0c" x_b3_spanid:"8b8224303f0d5e0c" x_b3_parentspanid:"-" +§”–ŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈͲ‘ƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.267+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e60cd15-e87c-407f-4bdc-59841087960f" response_time:0.005759939 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"282dd9cac44e8b19" x_b3_spanid:"282dd9cac44e8b19" x_b3_parentspanid:"-" +÷¿²‘ƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨–ÎØ‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.152+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ea220ad-32e3-4c7e-426d-70d3a8a3f9e4" response_time:0.001936573 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19fcb1c6b5dc4aa4" x_b3_spanid:"19fcb1c6b5dc4aa4" x_b3_parentspanid:"-" +â‰Î؂ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½¥˜¨„ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.585+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0399a6c-827d-4a14-765b-ad64c047303c" response_time:0.004116982 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58f1bb6c75b11bea" x_b3_spanid:"58f1bb6c75b11bea" x_b3_parentspanid:"-" +š™˜¨„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÛ°‰…ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.791+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6e98f7db-8b83-4fd1-4348-eb195307e9ac" response_time:0.001495162 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d706f0979211630" x_b3_spanid:"1d706f0979211630" x_b3_parentspanid:"-" +ÿϰ‰…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õø·†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.150+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"594f3e5a-bf86-4b09-763b-1ec09efa420a" response_time:0.009032386 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"441966d7968cf3aa" x_b3_spanid:"441966d7968cf3aa" x_b3_parentspanid:"-" +¦åø·†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ÞßΆڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.204+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aae4aa82-a2a0-4fb8-5d31-a79fbf95c999" response_time:0.002417607 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c5125d0cf3dae5a" x_b3_spanid:"1c5125d0cf3dae5a" x_b3_parentspanid:"-" +°ÐßΆڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý‹¬¥‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.387+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1dccae64-6906-4a90-7e18-f75c5a660347" response_time:0.001433376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a77b488ce9eb4ef0" x_b3_spanid:"a77b488ce9eb4ef0" x_b3_parentspanid:"-" +Èÿ«¥‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦´Ì—‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.895+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69eb675b-743a-47bb-638f-e38e0204c644" response_time:0.001496629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1a680b94d473c16" x_b3_spanid:"a1a680b94d473c16" x_b3_parentspanid:"-" +õªÌ—‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…Åš´‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.955+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35384" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8474a3e-04d1-41e2-6482-1d58bfbe3c4b" response_time:0.001777907 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3c531cac5a120220" x_b3_spanid:"3c531cac5a120220" x_b3_parentspanid:"-" +»¸š´‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý¡—щڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27317" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"100290c0-4c0a-4427-4279-89e4cdbc71c4" response_time:0.001697244 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a61fab768117fd3" x_b3_spanid:"0a61fab768117fd3" x_b3_parentspanid:"-" +‰›—щڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹®Š×‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.565+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59927d41-fd7d-41ab-5c82-ce6c8b49f101" response_time:0.001450882 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f7140dc1ad470c0" x_b3_spanid:"2f7140dc1ad470c0" x_b3_parentspanid:"-" +•¦Š×‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ…ªÄìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.201+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba90831c-4db2-4ad5-71c6-ca5f1d475e3c" response_time:0.004476662 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4ed5fb01ed31d55f" x_b3_spanid:"4ed5fb01ed31d55f" x_b3_parentspanid:"-" +Üû©ÄìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ñ–ˆŒñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.428+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d3c6e590-23ec-441d-71de-02fbc6cdbb7e" response_time:0.001533757 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0775775be6f5f20f" x_b3_spanid:"0775775be6f5f20f" x_b3_parentspanid:"-" +¹ˆŒñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Б»œòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.731+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1b3e3aec-00a6-4ce5-697f-c83e1519199d" response_time:0.001603594 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3152ab16bba8b243" x_b3_spanid:"3152ab16bba8b243" x_b3_parentspanid:"-" +ý†»œòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö®ÖñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.583+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0859a84-1191-47e0-6ae9-7e82c0d9992b" response_time:0.002042883 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9c22d1e245d3e8ee" x_b3_spanid:"9c22d1e245d3e8ee" x_b3_parentspanid:"-" +¡Ë®ÖñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹óƒÌñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.562+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3d910c8-7832-4a17-597f-c45d4ba82a95" response_time:0.001903226 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9501e9bda919593f" x_b3_spanid:"9501e9bda919593f" x_b3_parentspanid:"-" +»èƒÌñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕŒý’òÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.711+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"da5b3617-56ae-4f5b-43b9-f1904c0d9c38" response_time:0.001673895 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c4368bf1a5ec344f" x_b3_spanid:"c4368bf1a5ec344f" x_b3_parentspanid:"-" +£€ý’òÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æžÊ­òÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26085" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"00c3df56-1312-4417-705f-fab0e73ecef8" response_time:0.001759743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"083d3a7ad518162d" x_b3_spanid:"083d3a7ad518162d" x_b3_parentspanid:"-" +ï’Ê­òÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ï£ü¢ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4198dbcc-c212-45c7-53fc-29985945ff07" response_time:0.001546611 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"835ecba996a64828" x_b3_spanid:"835ecba996a64828" x_b3_parentspanid:"-" +Õœü¢ŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð¤…áôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.412+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"769823f5-5bda-428c-7c1c-1398d9ee8d5a" response_time:0.001542654 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7583610ef0b129d5" x_b3_spanid:"7583610ef0b129d5" x_b3_parentspanid:"-" +ÿœ…áôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ï¨ú‚÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.020+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2adb685-2546-4ba3-49d2-f9c3f8e7f8e3" response_time:0.001330616 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6630c75a0d74565" x_b3_spanid:"a6630c75a0d74565" x_b3_parentspanid:"-" +÷›ú‚÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0䑯¡÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.083+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a47d739b-8be3-4f2e-6870-b4c36b68f6f6" response_time:0.001888189 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"298a2ef1c7435efa" x_b3_spanid:"298a2ef1c7435efa" x_b3_parentspanid:"-" +µ‡¯¡÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯¶ìÌ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.175+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0994f77a-2d6d-481c-5f1e-8aef161148f0" response_time:0.001446156 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af3eb6eb6b1883a6" x_b3_spanid:"af3eb6eb6b1883a6" x_b3_parentspanid:"-" +à«ìÌ÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÒú×øÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.466+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f756246-f695-41ca-4d82-78cef70481ea" response_time:0.001460068 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d1e0e56603e0d476" x_b3_spanid:"d1e0e56603e0d476" x_b3_parentspanid:"-" +­Æú×øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±Ã–ùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.597+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bbd63911-16de-4d2d-7cbc-266467fccbd5" response_time:0.001400379 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0c59dc063d1ee2d" x_b3_spanid:"d0c59dc063d1ee2d" x_b3_parentspanid:"-" +›·–ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ÿæÜúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.013+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9dc5de99-eea9-4a3d-6164-f78219f0e4b2" response_time:0.001967625 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8172ec9fdab8e74" x_b3_spanid:"b8172ec9fdab8e74" x_b3_parentspanid:"-" +ÌòæÜúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©©¡êúÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:53.034+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c843985d-a762-4c43-7245-870847709de0" response_time:0.00908433 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7c6dbd010f88ebe" x_b3_spanid:"a7c6dbd010f88ebe" x_b3_parentspanid:"-" +” ¡êúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÔæŒüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c45b3ff-1f2b-4a36-64b6-5ffcc5c1258b" response_time:0.002071352 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4bd0ba2aafccd32" x_b3_spanid:"e4bd0ba2aafccd32" x_b3_parentspanid:"-" +ñÌæŒüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0㜷òýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.864+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"03fd0b46-d78f-4e12-67f2-5a984fa844d5" response_time:0.001606068 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"703b87679a576fd2" x_b3_spanid:"703b87679a576fd2" x_b3_parentspanid:"-" +ηòýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ü¦ÊûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.239+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8bf82f5b-de19-40bf-7ac5-05fd2026f500" response_time:0.005425046 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d16c4f89d9297472" x_b3_spanid:"d16c4f89d9297472" x_b3_parentspanid:"-" +»ï¦ÊûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ߌýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.647+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"01451180-8f13-4c89-765e-63fb82b17f21" response_time:0.005066621 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4dcb9c48f940911f" x_b3_spanid:"4dcb9c48f940911f" x_b3_parentspanid:"-" +¦©ßŒýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„»Œ—þÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.941+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb6e197e-be39-42fa-5153-a2045807280b" response_time:0.001467288 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a350e9eabd6f2ff2" x_b3_spanid:"a350e9eabd6f2ff2" x_b3_parentspanid:"-" +õ¯Œ—þÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ¼›¶þÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.005+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a76fad2a-d64e-423d-59c1-17f79daa136e" response_time:0.002524501 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7cfe05a67ed6203b" x_b3_spanid:"7cfe05a67ed6203b" x_b3_parentspanid:"-" +ù³›¶þÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àÕé‹ÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.186+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:24911" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"215b13ef-7679-4366-47e1-4f41a63f5731" response_time:0.001598453 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7164b553163cfc4b" x_b3_spanid:"7164b553163cfc4b" x_b3_parentspanid:"-" +‚Êé‹ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·¬™•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.742+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6f076805-871f-4ad4-639f-e43540198c04" response_time:0.001645661 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1464897951b7b9b4" x_b3_spanid:"1464897951b7b9b4" x_b3_parentspanid:"-" +“¦™•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªïº¿‚ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.098+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9b5ac7e-55aa-4292-5b09-bca2bee81b2b" response_time:0.00250757 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59135cbe9ef19086" x_b3_spanid:"59135cbe9ef19086" x_b3_parentspanid:"-" +â线‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤Ø²¢ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.526+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35384" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3e107c44-7d2c-47e9-42ec-f4d41fe3d0dd" response_time:0.00353479 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8600ecace16b62e7" x_b3_spanid:"8600ecace16b62e7" x_b3_parentspanid:"-" +õDz¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û”â¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.532+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8be3f7dc-67ae-4f01-45af-9a6971304659" response_time:0.002311864 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8f288f142b7b045" x_b3_spanid:"f8f288f142b7b045" x_b3_parentspanid:"-" +Ó‰â¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñפëÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.681+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20441" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fcb89683-90c3-4dae-76fc-4f6ae909126c" response_time:0.001618298 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f43e7a1f3eb7a408" x_b3_spanid:"f43e7a1f3eb7a408" x_b3_parentspanid:"-" +¾Ð¤ëÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œœÚŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.755+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c552a0bb-aa8e-4107-6f7c-75496828d876" response_time:0.001965007 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c32e8b5c63ce5b8" x_b3_spanid:"2c32e8b5c63ce5b8" x_b3_parentspanid:"-" +âŽÚŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ÅíÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.954+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19449" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b993d33-9ecf-427c-6322-5e7f040bb16d" response_time:0.002054152 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7885c3eef0e6155" x_b3_spanid:"d7885c3eef0e6155" x_b3_parentspanid:"-" +½®ÅíÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸÉ©ÏÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.890+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ccea2a84-8b56-4d95-44c4-7737c92bbac4" response_time:0.002418833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b6a157201e636b7" x_b3_spanid:"8b6a157201e636b7" x_b3_parentspanid:"-" +Ž©ÏÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†›Ÿã’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.466+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e8cd6e7-5862-4bc2-4e2b-595720146680" response_time:0.002025683 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd80b3f2ea3192f6" x_b3_spanid:"fd80b3f2ea3192f6" x_b3_parentspanid:"-" +ᑟã’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žï™•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.119+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21323" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c692b822-7763-4321-7dac-9128ffd43752" response_time:0.003130844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"372219be08883a46" x_b3_spanid:"372219be08883a46" x_b3_parentspanid:"-" +©öڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áòá–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.540+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:21407" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e538685c-e907-4c80-51aa-0fbc166d776a" response_time:0.001694987 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f1d142135a2a6690" x_b3_spanid:"f1d142135a2a6690" x_b3_parentspanid:"-" +–Õòá–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ð¦âÆ—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.750+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5da4ace4-3c81-43a1-7730-f1f5600eb2e6" response_time:0.002984464 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb31b31bad2bc52c" x_b3_spanid:"fb31b31bad2bc52c" x_b3_parentspanid:"-" +›ï߯—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²œœ™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.199+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c1d03b4-7788-4ff4-4fd6-c72bb2bd5aa6" response_time:0.002171368 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8fbcacacc89fe4c9" x_b3_spanid:"8fbcacacc89fe4c9" x_b3_parentspanid:"-" +²ªœœ™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄNj›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.699+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4910b76-23e3-4766-572b-33369dbf0e17" response_time:0.003446492 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f0e2fd0fe7e91c3a" x_b3_spanid:"f0e2fd0fe7e91c3a" x_b3_parentspanid:"-" +ª÷Æ‹›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âüúÓ›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.852+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b5a0be9-96b3-4f62-7c85-f5322e45a2fa" response_time:0.002527747 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19f7ff59d70ad735" x_b3_spanid:"19f7ff59d70ad735" x_b3_parentspanid:"-" +¦ðúÓ›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿžºîœÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.177+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"73b77682-5157-40ea-7c3d-3b8bd0cf7b49" response_time:0.001777311 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41d71b82fffecb04" x_b3_spanid:"41d71b82fffecb04" x_b3_parentspanid:"-" +´“ºîœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€֘ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0627883a-82cc-4718-5bed-08c0eabe5019" response_time:0.002707672 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d0beab02a76dd143" x_b3_spanid:"d0beab02a76dd143" x_b3_parentspanid:"-" +ÉùÕ˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ࡪ¯ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.311+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34ffc450-36fe-43a6-64b5-185292d0a735" response_time:0.00367164 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0eec2b36d87acb28" x_b3_spanid:"0eec2b36d87acb28" x_b3_parentspanid:"-" +¬šª¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 å£”žÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.523+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dee270f0-62d5-4ad8-4960-d54bacbb8e60" response_time:0.003093744 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c3849eebd1726848" x_b3_spanid:"c3849eebd1726848" x_b3_parentspanid:"-" +µØ£”žÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.788+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84121332-c96d-4fa2-70df-7504acab9147" response_time:0.003020947 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4b4927d326d1770" x_b3_spanid:"e4b4927d326d1770" x_b3_parentspanid:"-" +ƒ÷¨’ŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À†Õƒ¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0492e88-00b3-4023-50ca-bef03326a7da" response_time:0.004130177 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a817e0351217de5d" x_b3_spanid:"a817e0351217de5d" x_b3_parentspanid:"-" +Ý÷Ôƒ¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óŠŠ¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.573+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee77237a-ba3c-47a1-4500-bcfc09b282e2" response_time:0.006151428 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0c4ab9f776ed8c55" x_b3_spanid:"0c4ab9f776ed8c55" x_b3_parentspanid:"-" +¹ÿŽŠ¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢‘¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69e48a80-13f5-4b88-41b5-624c27f7df52" response_time:0.008584408 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf2136de9af4332c" x_b3_spanid:"cf2136de9af4332c" x_b3_parentspanid:"-" +¶…‘¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²£ÀÇ¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.705+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"545da1c9-ba19-4ec5-4a1f-44d3b8243cc2" response_time:0.002617773 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ffbb21cba5a7fa57" x_b3_spanid:"ffbb21cba5a7fa57" x_b3_parentspanid:"-" +‚›ÀÇ¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ᯣڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.825+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3f4d222d-cb2f-42da-588b-19589066e5a2" response_time:0.004307522 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0648c0c0659085d8" x_b3_spanid:"0648c0c0659085d8" x_b3_parentspanid:"-" +ク£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©…“£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.861+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b7b2d0d5-bc83-452f-687a-bad95934e3f7" response_time:0.004852377 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0658f00a129fe2e9" x_b3_spanid:"0658f00a129fe2e9" x_b3_parentspanid:"-" +Ø÷“£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÏû´£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.935+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5311ae11-926a-45db-562f-09443474c05a" response_time:0.002041279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5742e47a36041452" x_b3_spanid:"5742e47a36041452" x_b3_parentspanid:"-" +ºÃû´£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»·…Ö£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.005+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef57ce10-5616-4bd7-77ec-ef26e090bbfd" response_time:0.001643835 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7f699cab254d5af2" x_b3_spanid:"7f699cab254d5af2" x_b3_parentspanid:"-" +­¯…Ö£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ûÞ¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.128+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5ed9b0e4-654a-43e1-72d2-6538961cbde9" response_time:0.001891204 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27bc76f3f01c521e" x_b3_spanid:"27bc76f3f01c521e" x_b3_parentspanid:"-" +ÊóÞ¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ¡Öî¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.325+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20823" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2816358d-ebae-4465-6b08-157d5f93ef9a" response_time:0.002114031 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cda034ffdb8896a2" x_b3_spanid:"cda034ffdb8896a2" x_b3_parentspanid:"-" +¸™Öî¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨åíÒ¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.534+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7acbf8c-2356-4252-59a5-61cf2f42798c" response_time:0.002370375 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"80c646802d5c15b6" x_b3_spanid:"80c646802d5c15b6" x_b3_parentspanid:"-" +×ÛíÒ¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šð¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.692+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a34def7a-4a92-4b29-7949-3809650f9f09" response_time:0.002001496 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"96cb045d08615e7f" x_b3_spanid:"96cb045d08615e7f" x_b3_parentspanid:"-" +œÿï¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔøõĦڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.774+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22003" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"247f49bb-3c2a-4318-636c-6a84228cf7e0" response_time:0.00221931 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"639b501c3c5d3d0b" x_b3_spanid:"639b501c3c5d3d0b" x_b3_parentspanid:"-" +ŽíõĦڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´ûƦڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.778+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e0107546-690e-4721-4774-94e6330f3fa9" response_time:0.002785662 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b765e51d16697ba" x_b3_spanid:"0b765e51d16697ba" x_b3_parentspanid:"-" +ÞùúƦڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š†ýѦڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.797+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"678689d5-a121-4680-7639-1b9f329388f0" response_time:0.006599175 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"33c8aa9971a4e7c9" x_b3_spanid:"33c8aa9971a4e7c9" x_b3_parentspanid:"-" +äøüѦڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õéù›§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.957+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bb769f5a-d0a0-43bb-522c-4840f70b8168" response_time:0.001992482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac4f8da1506dad20" x_b3_spanid:"ac4f8da1506dad20" x_b3_parentspanid:"-" +Þù›§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ñä®§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.996+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22005" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"327e0071-d131-4005-7a6c-1aa15db6445c" response_time:0.001669344 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef836dbf6bef11b8" x_b3_spanid:"ef836dbf6bef11b8" x_b3_parentspanid:"-" +çä®§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªŽËó§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.141+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"430f3c49-3c5e-4a2e-7d44-16c3cd778cea" response_time:0.001556935 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b7eca5508b878ea1" x_b3_spanid:"b7eca5508b878ea1" x_b3_parentspanid:"-" +¥‡Ëó§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ýÈϪڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.870+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22031" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"490cf918-c1af-44ed-6994-1e0fdc397701" response_time:0.001548693 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5941c27f56f286b3" x_b3_spanid:"5941c27f56f286b3" x_b3_parentspanid:"-" +™†ÈϪڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üÊû®«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.071+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a45977d-9778-4f82-6fb3-2be34846e23c" response_time:0.001488825 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31be98912b6a3444" x_b3_spanid:"31be98912b6a3444" x_b3_parentspanid:"-" +Œ²û®«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’™…ú«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.228+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"435561ef-ab16-423a-6c52-0e49801f18e1" response_time:0.001651918 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6eb99c6b0a8fa39e" x_b3_spanid:"6eb99c6b0a8fa39e" x_b3_parentspanid:"-" +±Œ…ú«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶Ð·Ç­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.659+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3beabd27-bd17-43e5-6a67-0504c1916340" response_time:0.001830869 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"06a1e5617c7789a6" x_b3_spanid:"06a1e5617c7789a6" x_b3_parentspanid:"-" +•È·Ç­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 Åòá­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.714+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ecaefbec-eac7-4ec7-54d8-2bcb228ba109" response_time:0.001595131 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6374647d65307b9" x_b3_spanid:"b6374647d65307b9" x_b3_parentspanid:"-" +¾òá­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬¢óñ­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.748+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"452d7b5c-afbc-484f-68d6-891fadbc5123" response_time:0.001658647 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31c437da3cfc6112" x_b3_spanid:"31c437da3cfc6112" x_b3_parentspanid:"-" +Ϙóñ­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÖ˜ ®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.845+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f9f2cebb-5e1e-481c-650e-8e8abf949598" response_time:0.001943347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"891dd86a37db716d" x_b3_spanid:"891dd86a37db716d" x_b3_parentspanid:"-" +Ƙ ®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íÁ瑩ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.859+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35478" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49ceb542-45cd-4073-40a9-e6a515cf7c4b" response_time:0.001931035 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b984b6d3449619b4" x_b3_spanid:"b984b6d3449619b4" x_b3_parentspanid:"-" +Ĵ瑩ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ǹ‘´®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.887+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"46f3eb6b-4d68-462a-44d4-181281652899" response_time:0.001315665 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a65fac3fcacb4ee" x_b3_spanid:"6a65fac3fcacb4ee" x_b3_parentspanid:"-" +®­‘´®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ô„¬ý®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.039+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22081" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35d9b2dd-d7ca-4b75-46e8-deaf8ef8c6a1" response_time:0.002774203 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6bd421f711abd30" x_b3_spanid:"e6bd421f711abd30" x_b3_parentspanid:"-" +¼û«ý®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çýâú®ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.033+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27327" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"03e56440-e126-4e1d-462c-fd4df2728d1d" response_time:0.00375074 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2c5c323c4fd5d99" x_b3_spanid:"e2c5c323c4fd5d99" x_b3_parentspanid:"-" +©öâú®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀâѯڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.217+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"699a18b8-44f4-4b58-4935-f18739c31936" response_time:0.002196009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"79b2657bd2c0bead" x_b3_spanid:"79b2657bd2c0bead" x_b3_parentspanid:"-" +÷†áѯڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”ÿ®°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.413+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:26086" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0d181580-fab0-4e07-791d-e209cb9439a6" response_time:0.001494323 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a96da247315c74da" x_b3_spanid:"a96da247315c74da" x_b3_parentspanid:"-" +·‡ÿ®°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äö€Ò°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.486+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0e8a0f9a-c887-44bc-643a-a607d81d9db1" response_time:0.001378073 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f50e4f028423a3d2" x_b3_spanid:"f50e4f028423a3d2" x_b3_parentspanid:"-" +äí€Ò°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”˜àô°ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.559+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db3ec12a-cbb7-4fcb-619c-8ee781fa5634" response_time:0.00176967 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d2f10a3fa0fd3aa" x_b3_spanid:"6d2f10a3fa0fd3aa" x_b3_parentspanid:"-" +ºàô°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ó†±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.595+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3ccd1ec-066f-49c6-7df6-8b83d106f700" response_time:0.002064081 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7b69821fe27bec19" x_b3_spanid:"7b69821fe27bec19" x_b3_parentspanid:"-" +Ì醱ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þ«‘ȱڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.733+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22001" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e5d8ce78-e75c-40d1-62ab-449ba22677f5" response_time:0.002416899 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8fe9b88ed669ae4e" x_b3_spanid:"8fe9b88ed669ae4e" x_b3_parentspanid:"-" +֩ȱڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òŒ„ü±ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:07.843+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22001" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2ce25f74-9c36-4d71-76a4-ce15d5882ef6" response_time:0.0014064 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"64085c0c3d79a641" x_b3_spanid:"64085c0c3d79a641" x_b3_parentspanid:"-" +½ÿƒü±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤¼¯‡²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.867+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35384" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5802f30f-f970-4503-7fc0-b2a0980c4b0b" response_time:0.001266488 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41eb57b3d9e3bd48" x_b3_spanid:"41eb57b3d9e3bd48" x_b3_parentspanid:"-" +û³¯‡²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Í×™²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.905+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05abdcfa-00bd-41ad-6310-9048de474af2" response_time:0.001682017 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"de9bbe745af7c320" x_b3_spanid:"de9bbe745af7c320" x_b3_parentspanid:"-" +ÆÀ×™²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³Ëö–²ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.899+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22001" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"48c6c6de-686f-41c3-4d28-eaed46587f47" response_time:0.00141803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a289ea77ea5ace5" x_b3_spanid:"7a289ea77ea5ace5" x_b3_parentspanid:"-" +ùÃö–²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òŒß¢²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.923+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:36562" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12d4edde-e122-4411-68db-a00d84b8f557" response_time:0.001985009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e1ba8650945e9d68" x_b3_spanid:"e1ba8650945e9d68" x_b3_parentspanid:"-" +ˆÏÞ¢²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z1z$229a5a99-3bd6-49b6-82a9-a3033a21d052‚ +10.10.17.2 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß¾úјڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.043+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:23459" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d12084cb-e881-4705-4346-22d96127cbd7" response_time:0.001797587 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"87b3fcf117cb9909" x_b3_spanid:"87b3fcf117cb9909" x_b3_parentspanid:"-" +¢³úјڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z1z$afe7ee56-96b7-45ab-8dad-a6211ad7aaa1‚ 10.10.17.11 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸‚Ÿ©»ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:35.993+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1298f305-c490-4448-7d4b-6b795db5a1c3" response_time:0.002834393 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0f3c2f0c6df28571" x_b3_spanid:"0f3c2f0c6df28571" x_b3_parentspanid:"-" +îùž©»ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ðô¶¹»ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f5c29a23-e042-4952-769f-8917c3aec0d4" response_time:0.006037022 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54656e75b75b422d" x_b3_spanid:"54656e75b75b422d" x_b3_parentspanid:"-" +íè¶¹»ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹²¯À»ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8b019a3-176a-4837-733e-32fbff88691b" response_time:0.002796957 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45458a71519a3069" x_b3_spanid:"45458a71519a3069" x_b3_parentspanid:"-" +¦¨¯À»ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ᾂ¾ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.714+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cd956d38-9790-420c-6379-0f9dc5491806" response_time:0.002638412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a786f66a503b1466" x_b3_spanid:"a786f66a503b1466" x_b3_parentspanid:"-" +ÿ°‚¾ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹å€¿ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:36.982+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"180da7b7-7754-4246-605b-0af5fb48c0b9" response_time:0.002200736 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29195a73d8d44210" x_b3_spanid:"29195a73d8d44210" x_b3_parentspanid:"-" +€å€¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êͪã¿ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c59c3e00-df39-4567-46b1-a08daf43aa7b" response_time:0.002231844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d1456404b75190a" x_b3_spanid:"0d1456404b75190a" x_b3_parentspanid:"-" +ÃÆªã¿ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤¸ÌØÁÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b7f17813-eac5-4115-5700-0aaf988ca4e2" response_time:0.00354786 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8755f231f1b8da5" x_b3_spanid:"a8755f231f1b8da5" x_b3_parentspanid:"-" +É°ÌØÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­†ýãÁÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"875196f9-16ea-4a3b-7e2c-58bb0d7bffe7" response_time:0.004335876 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b5cbb7dc086ab992" x_b3_spanid:"b5cbb7dc086ab992" x_b3_parentspanid:"-" +»ôüãÁÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Î÷åÂÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:37.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14b59bd7-4f94-408e-659b-aa93a2997217" response_time:0.00263196 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf28a1d55eb2c25c" x_b3_spanid:"cf28a1d55eb2c25c" x_b3_parentspanid:"-" +ḷåÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©íÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.014+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8660dfe6-6a41-4bf6-5c99-83df5250caa1" response_time:0.002939503 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c3647c3b2115e59" x_b3_spanid:"6c3647c3b2115e59" x_b3_parentspanid:"-" +ç†íÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Šâë‘ÃÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.090+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32334" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e39bbdb-ff45-4494-7562-18ed8e37ab1b" response_time:0.003994968 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef052949f67776ab" x_b3_spanid:"ef052949f67776ab" x_b3_parentspanid:"-" +»¦ê‘ÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼¡ŸìÃÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.281+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42546034-7e29-41df-7ec5-9742d7e0406d" response_time:0.002497362 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3710fe42a559ec81" x_b3_spanid:"3710fe42a559ec81" x_b3_parentspanid:"-" +Ï–ŸìÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãÖêóÃÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.297+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54be1c64-4abf-4e1b-6964-a5fc5b0e6a98" response_time:0.002506468 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ab4066fe4800eadd" x_b3_spanid:"ab4066fe4800eadd" x_b3_parentspanid:"-" +¥ÌêóÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÆúÃÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.311+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c300ec5e-3ec2-4dfe-6fed-d97f154ed923" response_time:0.002458734 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d1d1198d94e11db" x_b3_spanid:"3d1d1198d94e11db" x_b3_parentspanid:"-" +ËÊÆúÃÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÙ€ÐÄÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.490+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33226" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5d936af-2d73-4926-57ec-b293f5d5c203" response_time:0.002970077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29080a01a6c0394c" x_b3_spanid:"29080a01a6c0394c" x_b3_parentspanid:"-" +ÂÍ€ÐÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—þöÛÅÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.779+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05e0aae4-04fe-4d4a-6ea3-ac197023ac08" response_time:0.006660833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4fb5a9fee0d567d4" x_b3_spanid:"4fb5a9fee0d567d4" x_b3_parentspanid:"-" +þñöÛÅÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŠÈ‘‰ÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.878+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"773208fb-4268-4349-488f-4929bec0d25c" response_time:0.002939303 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cd8e1587aa15d379" x_b3_spanid:"cd8e1587aa15d379" x_b3_parentspanid:"-" +§½‘‰ÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÕšÖÆÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.039+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31892" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4150bd7b-c7db-4c76-4ab9-29e93f53f2ba" response_time:0.003153653 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6513227dfc28a89" x_b3_spanid:"a6513227dfc28a89" x_b3_parentspanid:"-" +ì…šÖÆÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÛ†´ÇÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.236+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb63c30d-762c-4b21-5fb3-9fec6e4a0055" response_time:0.003353703 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"941bdff2f1e15073" x_b3_spanid:"941bdff2f1e15073" x_b3_parentspanid:"-" +ÙÒ†´ÇÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îìÏÉÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.694+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0cef6e09-a7a2-4c89-7162-57b4888d3dd3" response_time:0.005469221 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"84a4520891f0d81e" x_b3_spanid:"84a4520891f0d81e" x_b3_parentspanid:"-" +°áÏÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ųå‘ÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.967+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b89f84a-7a5d-46fd-4b01-691eb3fb9d6d" response_time:0.005579367 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8c4b1f671916ab4d" x_b3_spanid:"8c4b1f671916ab4d" x_b3_parentspanid:"-" +ÿ¥å‘ÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸžÁ”ÎÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7aff0096-dd53-42be-600c-f4b1755489a9" response_time:0.002491604 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a090de2d98821f3" x_b3_spanid:"0a090de2d98821f3" x_b3_parentspanid:"-" +¢“Á”ÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ô‰ëÓÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.573+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2c7b9c9-24e8-4c9b-5a2f-c3c0ddc8febe" response_time:0.002573765 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3c9ac727ba7517f9" x_b3_spanid:"3c9ac727ba7517f9" x_b3_parentspanid:"-" +­†‰ëÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒËü›âÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.434+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"211e9c00-2ffe-4a55-5297-9d38fd5019ec" response_time:0.002354416 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f7bdc29b7889b5c" x_b3_spanid:"3f7bdc29b7889b5c" x_b3_parentspanid:"-" +ɼü›âÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¼‡ÇùíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"43ad6db5-2e17-46c5-4a1e-633f6fdd7f6f" response_time:0.003540198 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4c2f9be08c2be84" x_b3_spanid:"d4c2f9be08c2be84" x_b3_parentspanid:"-" +†ûÆùíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§Ï’´ðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.243+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4dd9419e-7fe2-4e99-6fb9-18fa5cacc56e" response_time:0.002460131 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bbd0f201386b2fff" x_b3_spanid:"bbd0f201386b2fff" x_b3_parentspanid:"-" +×¾’´ðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âችðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.261+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4a37a44b-8e75-40c3-48c3-3b2ef8a699d1" response_time:0.003046844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5bd7361ab5d67b43" x_b3_spanid:"5bd7361ab5d67b43" x_b3_parentspanid:"-" +ÐÔ‰½ðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦­ÚÄðÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.277+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10920" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e610b8a-ac69-424d-5c84-d7abcec1b6e5" response_time:0.00288813 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad345a4b444b09b1" x_b3_spanid:"ad345a4b444b09b1" x_b3_parentspanid:"-" +žœÚÄðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÞÝ×ôòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.913+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d7c970c-6014-426d-7ed6-27e10d973af7" response_time:0.004329188 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6c3d4af8176ad63a" x_b3_spanid:"6c3d4af8176ad63a" x_b3_parentspanid:"-" +éÖ×ôòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ƽ’ÄóÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.082+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f4c178ea-2f77-404c-72c7-91c4b8c5cba4" response_time:0.00251644 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9f2068e560a7dd41" x_b3_spanid:"9f2068e560a7dd41" x_b3_parentspanid:"-" +È®’ÄóÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´—éôôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.452+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"67f16b83-f557-48f0-62ab-cccf2678d420" response_time:0.002409188 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"163a25ff34e7c1fe" x_b3_spanid:"163a25ff34e7c1fe" x_b3_parentspanid:"-" +Ø‹éôôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ¬· öÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.812+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19b5a2f9-b77f-4011-5330-881c786aee24" response_time:0.00242907 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f7217f4a711c21f4" x_b3_spanid:"f7217f4a711c21f4" x_b3_parentspanid:"-" +–¤· öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒš©øÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.367+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f94eaf8-724c-401e-442f-90618d2c8902" response_time:0.002374348 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c103c9b62d771857" x_b3_spanid:"c103c9b62d771857" x_b3_parentspanid:"-" +à©øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„Œå§ùÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.632+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c0368bf3-c9a3-4fef-5538-0e0dff7c8ec7" response_time:0.00359728 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6185e97223c4e851" x_b3_spanid:"6185e97223c4e851" x_b3_parentspanid:"-" +‘„å§ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ÷è•úÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.864+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d5fedf3-7b0f-46de-4abb-b64b2b16b08f" response_time:0.002073543 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8099cbe6238528a5" x_b3_spanid:"8099cbe6238528a5" x_b3_parentspanid:"-" +Ÿèè•úÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ¾ðÁûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.224+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c62b8da9-8f4a-49be-6c95-2bbf59ed7f3b" response_time:0.002799721 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e8f27b5a0250fec3" x_b3_spanid:"e8f27b5a0250fec3" x_b3_parentspanid:"-" +®¯ðÁûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°±†ÖûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.266+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e38f3bb5-7cf8-4ec2-68d0-a65f54004a43" response_time:0.003408679 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d8a3856c0377fcee" x_b3_spanid:"d8a3856c0377fcee" x_b3_parentspanid:"-" +쥆ÖûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãÛ–‘üÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.391+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"47bd2cc6-16e3-45ad-5e3d-f77e5c3d8513" response_time:0.002646079 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"10827edd8c770ffe" x_b3_spanid:"10827edd8c770ffe" x_b3_parentspanid:"-" +ðЖ‘üÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·Ø¥¹þÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.008+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b82223e-4ead-4813-588c-725e50a76150" response_time:0.006202234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"75f68bdd7a9d11f1" x_b3_spanid:"75f68bdd7a9d11f1" x_b3_parentspanid:"-" +šÌ¥¹þÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çß³ÿþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.155+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"16d4f3f7-a3f7-41db-61ac-59e19c684c5a" response_time:0.006567476 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41f1d8c42844ad82" x_b3_spanid:"41f1d8c42844ad82" x_b3_parentspanid:"-" +¦Ò³ÿþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðû¼–ÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.207+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fe8a2f11-690d-4667-4b89-4cd8f3ff04a3" response_time:0.002429291 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e2a5b82fff46a6d" x_b3_spanid:"9e2a5b82fff46a6d" x_b3_parentspanid:"-" +¸í¼–ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú×ÄŸ€ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.494+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b88972a-fa37-4613-772b-f22200e825d0" response_time:0.00261633 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4eaea1ba3c11ba13" x_b3_spanid:"4eaea1ba3c11ba13" x_b3_parentspanid:"-" +•ÎÄŸ€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Ïì­€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.524+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"39d33cd7-ce5c-450b-5a97-95c392c231e8" response_time:0.002802399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"859f42c81886d3a4" x_b3_spanid:"859f42c81886d3a4" x_b3_parentspanid:"-" +‹Äì­€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾†üÀ€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"89e9c93e-58eb-4d32-67f7-6709d3b86b67" response_time:0.005715967 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"141222839c9b41f2" x_b3_spanid:"141222839c9b41f2" x_b3_parentspanid:"-" +ÖýûÀ€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†ì‰è€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.646+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10750" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28df1a3d-eb07-42b8-51f5-d6fa4a42b675" response_time:0.002624093 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b0d5da42335f6fda" x_b3_spanid:"b0d5da42335f6fda" x_b3_parentspanid:"-" +ô݉è€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄŽØùÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.952+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"369f1f43-c684-45ba-58b3-821e7931bd13" response_time:0.002605604 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3256c80de1144663" x_b3_spanid:"3256c80de1144663" x_b3_parentspanid:"-" +š‡ØùÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²ö®¬‚ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.058+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c39d4d3a-de9f-432f-6302-c44dfeb8daac" response_time:0.00288719 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d26f5d5b47b7a0d5" x_b3_spanid:"d26f5d5b47b7a0d5" x_b3_parentspanid:"-" +â뮬‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±…´Æ‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.112+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5e472d0e-3b45-4680-5e69-8935cd1ab9ad" response_time:0.003085741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3ed13dae35da1a1" x_b3_spanid:"b3ed13dae35da1a1" x_b3_parentspanid:"-" +áù³Æ‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬åØì‚ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4298dd34-2689-4fc8-6342-29f6f5bf3817" response_time:0.006847575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2713c85cffc54f8e" x_b3_spanid:"2713c85cffc54f8e" x_b3_parentspanid:"-" +êÚØì‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üޤüƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.495+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d750869c-2731-4462-675b-fb2ce6961764" response_time:0.002286817 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"747257ed50c913ec" x_b3_spanid:"747257ed50c913ec" x_b3_parentspanid:"-" +¥†¤üƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Í”ù„ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.756+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b3bd4742-9fc2-4c57-6da7-d61e5056c569" response_time:0.00247133 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5c982a9ae1b70aad" x_b3_spanid:"5c982a9ae1b70aad" x_b3_parentspanid:"-" +‚Ôù„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à‚§¥…ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.848+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"51056382-3585-488e-501c-6eb146ee5906" response_time:0.002924841 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"071a0be87a8c8882" x_b3_spanid:"071a0be87a8c8882" x_b3_parentspanid:"-" +œñ¦¥…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ºÉ†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.192+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e24d290-e4be-4561-7d1e-f6116ea1c7ad" response_time:0.002735914 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ad665701f6e8be1" x_b3_spanid:"6ad665701f6e8be1" x_b3_parentspanid:"-" +ù²É†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0é’ –‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.354+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f329283c-e852-44b7-4bbd-7afbe26f7ade" response_time:0.002970445 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"207d3f0e0d7c3b74" x_b3_spanid:"207d3f0e0d7c3b74" x_b3_parentspanid:"-" +µ… –‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýíú‡ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:56.563+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10234" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"414a73a4-0524-4442-6f82-977aa020cdf0" response_time:0.0031146 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"30a3b003360d68ea" x_b3_spanid:"30a3b003360d68ea" x_b3_parentspanid:"-" +ÄÞú‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½Â×ü‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.106+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b80c47ff-9660-4cfc-7359-0c345d4f3b61" response_time:0.002788558 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9fe9590fcef32f9e" x_b3_spanid:"9fe9590fcef32f9e" x_b3_parentspanid:"-" +Õº×ü‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•Ì÷¤ŠÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:57.190+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"216b06c4-4813-4514-4a37-c1c8ddb9475f" response_time:0.0028244 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f58113cc45054b79" x_b3_spanid:"f58113cc45054b79" x_b3_parentspanid:"-" +€À÷¤ŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·¬ºÆŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.261+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1c98148c-2184-4434-5d3e-a61a96340611" response_time:0.002198241 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"24f1a309f93e1e41" x_b3_spanid:"24f1a309f93e1e41" x_b3_parentspanid:"-" +ŸºÆŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒÙˆÿ‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.648+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10500" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0dc102dd-7715-4246-530e-c071907fa52a" response_time:0.002486301 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ddd72c7d5f8ea0e4" x_b3_spanid:"ddd72c7d5f8ea0e4" x_b3_parentspanid:"-" +•Јÿ‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åשȌڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.801+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8d1ea4f-a834-42e5-5064-ae0864bde58f" response_time:0.002875605 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48ef2a319d9c8ff7" x_b3_spanid:"48ef2a319d9c8ff7" x_b3_parentspanid:"-" +”ѩȌڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—à∎ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.205+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"de51cb0c-27ce-4712-7c6e-62a63190226c" response_time:0.002267449 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6bd1267697a7e8e" x_b3_spanid:"a6bd1267697a7e8e" x_b3_parentspanid:"-" +’Õ∎ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þ’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.516+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a7f8d0f6-72da-455d-68c9-794d596a31b7" response_time:0.002914056 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5e99f1a2cf29c7f" x_b3_spanid:"a5e99f1a2cf29c7f" x_b3_parentspanid:"-" +äð’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“‹¹§ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.806+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aef44164-3627-475d-7a34-4a843c2674de" response_time:0.00262499 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b29846b09f69568d" x_b3_spanid:"b29846b09f69568d" x_b3_parentspanid:"-" +ƒþ¸§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™·žÅ’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.405+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42f5a0a8-9030-48c8-6048-d22bc0e03929" response_time:0.002803656 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eece8295a57bca42" x_b3_spanid:"eece8295a57bca42" x_b3_parentspanid:"-" +ùªžÅ’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨Ì±×’ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.443+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abb480db-1608-43cb-5641-de5be15a5f24" response_time:0.002899336 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b2d3706a744dd4a9" x_b3_spanid:"b2d3706a744dd4a9" x_b3_parentspanid:"-" +¿À±×’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñçøÈ“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.678+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dd86cad4-5327-4cb0-5fad-1bbdb2e68f7f" response_time:0.005667424 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"093bb4c7c206f0a5" x_b3_spanid:"093bb4c7c206f0a5" x_b3_parentspanid:"-" +¥ÜøÈ“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú‚¿¤“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.603+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"124ecec2-0de8-4a3d-4005-538a6a0ae98e" response_time:0.004358398 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"46a7ec71215bd47d" x_b3_spanid:"46a7ec71215bd47d" x_b3_parentspanid:"-" +Ö뾤“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿íßÛ•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.257+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5dd4d52-00cc-45ae-63c2-58027b5ce4eb" response_time:0.003168833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6553a08cd3fc872a" x_b3_spanid:"6553a08cd3fc872a" x_b3_parentspanid:"-" +øÞßÛ•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õÇœš–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.389+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f8badb3-59c3-49c1-7662-d7690225d37d" response_time:0.002759666 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8017602720311774" x_b3_spanid:"8017602720311774" x_b3_parentspanid:"-" +Š»œš–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡°Ž„—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.607+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10536" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80032381-f8a2-4654-75f8-1117ff7ac52d" response_time:0.006503372 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"aa26d1b3d10936da" x_b3_spanid:"aa26d1b3d10936da" x_b3_parentspanid:"-" +¼§Ž„—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ᣋ´—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.712+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c8a00b21-19a9-494c-57ab-aa1aff195341" response_time:0.002549725 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d432142b78ca129e" x_b3_spanid:"d432142b78ca129e" x_b3_parentspanid:"-" +µ›‹´—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂïÞ—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.801+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12418" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d0f9f3d-dc60-4ec7-65f1-8259a494ce44" response_time:0.002646021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"70a6d032fe30ca05" x_b3_spanid:"70a6d032fe30ca05" x_b3_parentspanid:"-" +؈ïÞ—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð½†ê—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.822+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12418" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91fbcdb1-aecc-43a0-5857-627a2c335f96" response_time:0.005385655 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59b7134af52eb6e9" x_b3_spanid:"59b7134af52eb6e9" x_b3_parentspanid:"-" +¶°†ê—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ת‘ç˜ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.086+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"55d016fb-7fe1-4287-4361-0ceb646644a0" response_time:0.003166461 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c77f5d63bd2f250" x_b3_spanid:"1c77f5d63bd2f250" x_b3_parentspanid:"-" +Æ‘ç˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ùœ€™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.139+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1b95595-ed0d-4af3-4807-5c714572c21b" response_time:0.002786187 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6202651be71b7104" x_b3_spanid:"6202651be71b7104" x_b3_parentspanid:"-" +ñœ€™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªóõ»™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a848ffc-593e-440f-61ad-1418c40c4c46" response_time:0.004180629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7095a2c4a78f3d3" x_b3_spanid:"a7095a2c4a78f3d3" x_b3_parentspanid:"-" +Âáõ»™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢áþú™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4c84d27-2a39-4fdd-4361-9ec430449040" response_time:0.006248386 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b66937f25198a56c" x_b3_spanid:"b66937f25198a56c" x_b3_parentspanid:"-" +€Óþú™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚±È½šÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.537+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3bd54a58-ef8e-409f-4ac3-21dcf42a312b" response_time:0.002756769 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9426d1af2e701bda" x_b3_spanid:"9426d1af2e701bda" x_b3_parentspanid:"-" +†¦È½šÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üàÎîšÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.639+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12150" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4158ee88-9806-47b8-70b5-8fc79f6ca986" response_time:0.002796219 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8dbde9a0c5ac952a" x_b3_spanid:"8dbde9a0c5ac952a" x_b3_parentspanid:"-" +­ØÎîšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žÊ¹ù›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.931+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5fbe7f8e-22dd-4923-4985-8f03b8944850" response_time:0.002614399 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6584e8a43740459b" x_b3_spanid:"6584e8a43740459b" x_b3_parentspanid:"-" +…»¹ù›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ó…åœÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.156+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e278d5ae-ea2a-46c6-6c8e-b047bf12da79" response_time:0.00264338 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f5648b71fec47e38" x_b3_spanid:"f5648b71fec47e38" x_b3_parentspanid:"-" +Ëæ…åœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚòöÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.459+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d20b54c-6359-4891-6b92-6bf0de31838c" response_time:0.005894445 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"323212d4ee090016" x_b3_spanid:"323212d4ee090016" x_b3_parentspanid:"-" +½…òöÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ûšâŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.949+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12494" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05b909b4-0642-4b6b-5b82-a4e99540781a" response_time:0.009629474 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"26d77c828cc70994" x_b3_spanid:"26d77c828cc70994" x_b3_parentspanid:"-" +˜îšâŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öºâ£ ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.090+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb5e4907-7fb0-40cb-5619-8f83e51406a6" response_time:0.005933224 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e3aadc92b60fcab9" x_b3_spanid:"e3aadc92b60fcab9" x_b3_parentspanid:"-" +ϯ⣠ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜­¦¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.366+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1287f611-d45c-4276-46a1-77c31e3e8961" response_time:0.003703376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"801110abca4b1f8b" x_b3_spanid:"801110abca4b1f8b" x_b3_parentspanid:"-" +©Ž­¦¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×á‰Ð¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.453+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10e6c6b9-eeee-49df-4df3-2576eab84ab7" response_time:0.003744719 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bab2b99b01319881" x_b3_spanid:"bab2b99b01319881" x_b3_parentspanid:"-" +ר‰Ð¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡æŸì£ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91972995-06c3-40fe-46fe-c47ce8dd2f45" response_time:0.00299518 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"72afafc1988907ae" x_b3_spanid:"72afafc1988907ae" x_b3_parentspanid:"-" +õ‚žì£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þ€¬¹¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.211+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f37483d-d82d-4f9a-491d-1ca7aabff405" response_time:0.003565468 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e43ec5f7530d2e23" x_b3_spanid:"e43ec5f7530d2e23" x_b3_parentspanid:"-" +Ñø«¹¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡Ú´Ü¤ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.286+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:6252" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0363f591-314b-47af-5303-86e76b554b8d" response_time:0.002577615 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9d65823959424b7d" x_b3_spanid:"9d65823959424b7d" x_b3_parentspanid:"-" +±Î´Ü¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜°™·¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.476+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f4b0c594-b3f5-4175-5e69-5a0e9a488f2e" response_time:0.002857882 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d0996e9fed8b362" x_b3_spanid:"1d0996e9fed8b362" x_b3_parentspanid:"-" +®¨™·¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂÇÙã¦ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.837+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12484" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24e9ca68-d204-401f-7fd9-c160cbd8e9d2" response_time:0.00308674 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7269bec5edb50365" x_b3_spanid:"7269bec5edb50365" x_b3_parentspanid:"-" +£ºÙã¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‘˜â…©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"61a7f3e5-6a41-4a90-63c5-4a8da8fe4c5a" response_time:0.002569506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a3cb43e36f6f3ea" x_b3_spanid:"7a3cb43e36f6f3ea" x_b3_parentspanid:"-" +ï‹â…©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ΕÁ©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.571+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12420" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0c3a3829-87a0-479f-6ea8-fc4a205935d3" response_time:0.002458215 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9207597854172b9a" x_b3_spanid:"9207597854172b9a" x_b3_parentspanid:"-" +˜¿•Á©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚£Áø©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.686+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7433a99c-b01a-462d-6cbf-73ced325f42b" response_time:0.003457802 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4da8883cc38d0b18" x_b3_spanid:"4da8883cc38d0b18" x_b3_parentspanid:"-" +®˜Áø©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀãÐéªÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.924+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3b0b0e4b-2220-4848-4e4e-0ed2ed1c085f" response_time:0.002476176 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f53131b5c5a2f294" x_b3_spanid:"f53131b5c5a2f294" x_b3_parentspanid:"-" +¨ÖÐéªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°îë§­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.591+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20a972c6-eb91-4a5f-7bce-d2b54ac63793" response_time:0.002601893 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b594c129792f9140" x_b3_spanid:"b594c129792f9140" x_b3_parentspanid:"-" +èãë§­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁËô¿­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.642+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12484" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec194714-2e0e-4d3b-5fec-d9e1646c6619" response_time:0.002506209 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f55986887da481f" x_b3_spanid:"1f55986887da481f" x_b3_parentspanid:"-" +”Äô¿­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹îóÛ®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.968+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d2b0ad93-1293-49da-651c-511de1c01f9e" response_time:0.003412098 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bb0b1aac46029f3" x_b3_spanid:"9bb0b1aac46029f3" x_b3_parentspanid:"-" +‰àóÛ®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖØÃ³°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.421+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"885524af-7266-4b93-5178-3442f62cb3ef" response_time:0.002397664 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cef51b4c5ec3cc1a" x_b3_spanid:"cef51b4c5ec3cc1a" x_b3_parentspanid:"-" +¸Íó°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…€È°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.464+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12492" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6a38fad7-ffcc-4acc-5211-33623ecbbb11" response_time:0.002498225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"872e7ce22774fbda" x_b3_spanid:"872e7ce22774fbda" x_b3_parentspanid:"-" +‡ûÿǰڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öù”¡ÎœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:10:10.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10777" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5fcc9458-ce9c-4d2e-6737-7c95dd305ee9" response_time:0.001540236 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"383ac491822a9cff" x_b3_spanid:"383ac491822a9cff" x_b3_parentspanid:"-" +â씡ΜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”­¸¤­ÎœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:10:14.268+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:9787" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1eb99f4b-42d9-48f8-6819-dd45b2eb7617" response_time:0.001952106 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e5826baa5003ea70" x_b3_spanid:"e5826baa5003ea70" x_b3_parentspanid:"-" +Ö¥¸¤­ÎœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎޮίΜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:10:14.889+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10659" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33e593d1-d498-40e8-7026-a74497740681" response_time:0.005398092 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"08c587116821cef5" x_b3_spanid:"08c587116821cef5" x_b3_parentspanid:"-" +ŠÓ®Î¯ÎœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²˜øÞ³ÎœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:10:16.000+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:10433" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20a580cc-3b6b-4d8f-6b10-781a77e0d454" response_time:0.003217065 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6acd8fde6cc70c6b" x_b3_spanid:"6acd8fde6cc70c6b" x_b3_parentspanid:"-" +š‹øÞ³ÎœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆÙ£·¹ÎœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:17.529+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13107" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cde5e83e-20e8-42de-44c4-0600d586a6bc" response_time:0.001648498 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7631d8c82fb4cb93" x_b3_spanid:"7631d8c82fb4cb93" x_b3_parentspanid:"-" +«Ñ£·¹ÎœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ­šå½ÎœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:18.699+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17479" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34209f07-9c12-436d-7c80-26444c5a8b38" response_time:0.001490645 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"032499410162d5d8" x_b3_spanid:"032499410162d5d8" x_b3_parentspanid:"-" +Æ šå½ÎœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÇÉèØÄΜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:20.552+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17491" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"849a1883-686c-487f-561c-601a67f2df74" response_time:0.002036077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2421f22329f00abb" x_b3_spanid:"2421f22329f00abb" x_b3_parentspanid:"-" +™»èØÄΜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ýœ‹˜ÅΜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:20.685+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17475" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8f83790f-2c92-401c-4f82-4994b3fe1e4c" response_time:0.002078651 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5d9252f53c65692c" x_b3_spanid:"5d9252f53c65692c" x_b3_parentspanid:"-" +Ì•‹˜ÅΜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬ª×©ÈΜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:21.526+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13725" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"48ccece0-fdf3-4393-50d4-cbbc7c8bdb39" response_time:0.002505513 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"edc10814633d44ff" x_b3_spanid:"edc10814633d44ff" x_b3_parentspanid:"-" +Žœ×©ÈΜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëÊΜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:22.200+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17491" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91ccc30c-8793-4075-4911-07cd8089f318" response_time:0.003375275 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae9e68aab96613b0" x_b3_spanid:"ae9e68aab96613b0" x_b3_parentspanid:"-" +‰€¨ëÊΜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z1z$9ca8a6a0-c77a-4220-a871-e5b35e85cc39‚ +10.10.17.8 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®çÕ­öÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:00.040+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5cc0f5a6-f01d-4339-47ff-030fe3156613" response_time:0.003675297 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"621226b01e4d50a7" x_b3_spanid:"621226b01e4d50a7" x_b3_parentspanid:"-" +ˆÖÕ­öÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´æ¨ùÆÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:21.674+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"587239a7-d715-40dd-4362-c3579f6a2d22" response_time:0.002501241 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8a2deb8b7d5fd6b5" x_b3_spanid:"8a2deb8b7d5fd6b5" x_b3_parentspanid:"-" +ÀÛ¨ùÆÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žï“ݠלÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.127+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16555" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b086a86b-86d5-471e-7834-52158da805d7" response_time:0.009687871 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"440fdd6b6bb4af18" x_b3_spanid:"440fdd6b6bb4af18" x_b3_parentspanid:"-" +¤Ö“ݠלÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­Û¢½¢×œÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:15:20.603+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:13499" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"92ac2646-a6bf-4fc1-5ce7-f75c4e7f8332" response_time:0.003625021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec89c5ad33f35773" x_b3_spanid:"ec89c5ad33f35773" x_b3_parentspanid:"-" +Т½¢×œÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßÖððÈÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:39.633+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f240c40a-8633-4e82-6334-680524fcccc0" response_time:0.00205412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c896d51989ad0a41" x_b3_spanid:"c896d51989ad0a41" x_b3_parentspanid:"-" +ªÉððÈÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±…À×ÂÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:37.969+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:56738" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0522848-3bde-4c1e-7332-1b47077f39e3" response_time:0.002320281 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5f46d31523e47f70" x_b3_spanid:"5f46d31523e47f70" x_b3_parentspanid:"-" +±ú¿×ÂÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§ˆ¯ËÄÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.480+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"668984c5-2b17-4deb-78ad-01808d10ef6c" response_time:0.002498703 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"563c52d5134c0951" x_b3_spanid:"563c52d5134c0951" x_b3_parentspanid:"-" +§û®ËÄÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”êæïÅÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:38.818+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d2a28b6e-c916-40a2-6389-396b06fae15c" response_time:0.010144398 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"131e3caf943e0321" x_b3_spanid:"131e3caf943e0321" x_b3_parentspanid:"-" +¸ÞæïÅÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ኵÆÇÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.275+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a33253c8-5908-40cd-76c7-3b9769ae55d1" response_time:0.002985132 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7616e2e7a720e4a" x_b3_spanid:"a7616e2e7a720e4a" x_b3_parentspanid:"-" +Ýþ´ÆÇÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡ê¨ßÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:45.656+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee648c43-82a7-49be-5fb1-2a1bc773b23a" response_time:0.002460116 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d3c6e2af246747ae" x_b3_spanid:"d3c6e2af246747ae" x_b3_parentspanid:"-" +Ë—ê¨ßÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶ô£áÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.141+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33691719-e960-45d8-7f3c-02a22546f683" response_time:0.002655626 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"72fc49792d8dc132" x_b3_spanid:"72fc49792d8dc132" x_b3_parentspanid:"-" +ûì£áÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ӟ˒áÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.146+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8332b072-5ea4-419d-57e9-fb58833fdfaa" response_time:0.002544574 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1334d218cd3b4ce" x_b3_spanid:"a1334d218cd3b4ce" x_b3_parentspanid:"-" +Ÿ•Ë’áÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…Ïý—áÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.156+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4556db3b-006b-4cb8-5ed7-29f7cd9a7c13" response_time:0.003908457 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"42b6d5b674cfbe54" x_b3_spanid:"42b6d5b674cfbe54" x_b3_parentspanid:"-" +ÐÈý—áÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªÐ›²áÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf30fa17-8b78-43bb-5da8-e82c24fba763" response_time:0.002328989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"706057b3fb187d9b" x_b3_spanid:"706057b3fb187d9b" x_b3_parentspanid:"-" + Ä›²áÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºŽŠ£âÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:46.445+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:47182" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06f139f5-1e7b-47a0-6071-00e9ba33782a" response_time:0.006590514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5299308cf5be561" x_b3_spanid:"a5299308cf5be561" x_b3_parentspanid:"-" +Ãÿ‰£âÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£üÈåäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.123+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"277d7ab5-53ed-4a04-55b6-a63f3abff4ea" response_time:0.004918647 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5fe74d4c8ffbd71" x_b3_spanid:"a5fe74d4c8ffbd71" x_b3_parentspanid:"-" +ãôÈåäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹÷§çÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.801+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"55e06493-1023-4f16-4a0d-3b73cbe9d4aa" response_time:0.003128263 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bed08499330d759f" x_b3_spanid:"bed08499330d759f" x_b3_parentspanid:"-" +ö­÷§çÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™Äé÷èÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.236+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3adf1b15-348c-4c3f-4e22-96c0a9074fee" response_time:0.003812002 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d7be764c0655e08f" x_b3_spanid:"d7be764c0655e08f" x_b3_parentspanid:"-" +Ù¼é÷èÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìøç©éÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.341+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5bdebd9a-b3a9-400b-4c00-bca071647875" response_time:0.003720662 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f075ecf76c4b6588" x_b3_spanid:"f075ecf76c4b6588" x_b3_parentspanid:"-" +ªîç©éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0è¶¹êÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.642+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d8d88d27-359a-4128-62d4-c4675acc8771" response_time:0.002568722 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2de361267ca6931" x_b3_spanid:"c2de361267ca6931" x_b3_parentspanid:"-" +¶«¹êÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿÓ–‹ñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.425+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a3009e7b-c18d-44b2-4278-21fe6d433a1e" response_time:0.002772226 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf0ae49884212ddc" x_b3_spanid:"cf0ae49884212ddc" x_b3_parentspanid:"-" +çÌ–‹ñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÃŽà•ñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.448+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"755b0381-2e22-48a7-4453-a878eddcfe15" response_time:0.002472662 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"752d79bb0fc32f72" x_b3_spanid:"752d79bb0fc32f72" x_b3_parentspanid:"-" +î†à•ñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒŸð–ôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4b680dcd-a981-4037-5e42-4f13d94962f9" response_time:0.007240497 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4da84003459cde5c" x_b3_spanid:"4da84003459cde5c" x_b3_parentspanid:"-" +ã”ð–ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡×ï•öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.790+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6380f050-040c-467a-7396-64294d285831" response_time:0.002641369 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bcb2380b4f323559" x_b3_spanid:"bcb2380b4f323559" x_b3_parentspanid:"-" +€Æï•öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•³šìøÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.508+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0aba9c12-6c93-46fb-6013-7ab20642014c" response_time:0.002307247 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"902406fd2db770aa" x_b3_spanid:"902406fd2db770aa" x_b3_parentspanid:"-" +þ§šìøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆê„ÂùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.688+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7dd25156-69a8-4446-44a7-50bb1e5d33ba" response_time:0.002461765 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ddc1c5a522939556" x_b3_spanid:"ddc1c5a522939556" x_b3_parentspanid:"-" +ÅÞ„ÂùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ÍëÎúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.982+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f1e60ef2-08d3-4171-4646-e4ac8dcc09b3" response_time:0.004005153 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0b11b8ef00db80e" x_b3_spanid:"a0b11b8ef00db80e" x_b3_parentspanid:"-" +÷ÄëÎúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Â’ê»ûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.212+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4bf40a52-9976-4577-785a-3e8090e13879" response_time:0.002631394 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2571551a0b2c5d4f" x_b3_spanid:"2571551a0b2c5d4f" x_b3_parentspanid:"-" +•Šê»ûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®¨Û¨þÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.972+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fbf555d3-b69e-42fd-7a80-bf18fd3690fc" response_time:0.007427853 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c91bf8a2651bd47b" x_b3_spanid:"c91bf8a2651bd47b" x_b3_parentspanid:"-" +µ“Û¨þÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éçýÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.423+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"635cc8c7-fa04-4ab5-731c-57b342d55b01" response_time:0.002914721 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9f3d178c157c8d10" x_b3_spanid:"9f3d178c157c8d10" x_b3_parentspanid:"-" +•°çýÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«¼ª€ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.463+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"14239bff-45d7-440f-6821-41f3ca6d00bc" response_time:0.00259583 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8810f85f3a1b46f1" x_b3_spanid:"8810f85f3a1b46f1" x_b3_parentspanid:"-" +ô³ª€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î𥞀ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.492+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"233442d1-bead-4c1a-5ee9-b9fc64b68091" response_time:0.00289005 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eda18fbc039ed9b5" x_b3_spanid:"eda18fbc039ed9b5" x_b3_parentspanid:"-" +Û奞€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æ×Ëã€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.637+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"06afafd9-3bb2-40ac-7977-2e89018947a4" response_time:0.002653391 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f49a13cfec7be27" x_b3_spanid:"2f49a13cfec7be27" x_b3_parentspanid:"-" +ÒËËã€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“âäµ…ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.884+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc8b0272-4215-432e-6290-6fcff0a51ac8" response_time:0.002289696 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb99bec027f77e80" x_b3_spanid:"eb99bec027f77e80" x_b3_parentspanid:"-" +œÛäµ…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì…å‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.879+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34d99b61-e7f4-4de9-6aaa-e1bba067eae7" response_time:0.002958722 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"048e881d9bfcfd7c" x_b3_spanid:"048e881d9bfcfd7c" x_b3_parentspanid:"-" +£ûä‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶–úè‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.065+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eec5afa1-0a66-43db-7387-8c98c5d83e4a" response_time:0.002425341 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e42025dfff152a0e" x_b3_spanid:"e42025dfff152a0e" x_b3_parentspanid:"-" +™úè‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’Ð’‰‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.400+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bb72aa0a-a78b-4a7e-47bb-c0f5b2543a3c" response_time:0.002805777 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1f9f2ee919058ea8" x_b3_spanid:"1f9f2ee919058ea8" x_b3_parentspanid:"-" +¸Á’‰‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0á¹Ð–ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.697+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"387e3a98-a7ca-41c2-59cd-445be0c83c74" response_time:0.002328921 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"58f8bbc2f227695b" x_b3_spanid:"58f8bbc2f227695b" x_b3_parentspanid:"-" +ĮЖŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äùöŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.898+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4bb9dc8-ebc0-43e0-46a3-61fff1ec003a" response_time:0.002332209 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc8de7322a64ba94" x_b3_spanid:"fc8de7322a64ba94" x_b3_parentspanid:"-" +½¹öŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷቎ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.189+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"430a3042-7165-4181-7f84-597f95798bf2" response_time:0.002650802 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0200cb9d6d660aad" x_b3_spanid:"0200cb9d6d660aad" x_b3_parentspanid:"-" +û׉ŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Т‚ŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.476+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4dccb4bc-5691-42a9-700f-93148af1d22e" response_time:0.002440898 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b770149078ca8d11" x_b3_spanid:"b770149078ca8d11" x_b3_parentspanid:"-" +¬›‚ŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢ÃúŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.745+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c38d5630-2cd0-4603-49d6-489e50b07389" response_time:0.003485871 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"043e9cf621a9af3a" x_b3_spanid:"043e9cf621a9af3a" x_b3_parentspanid:"-" +—¼úŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²«¢‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.063+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"49e4a3f1-2a34-4419-5819-234197bfec17" response_time:0.002919952 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bcccca929a77729" x_b3_spanid:"9bcccca929a77729" x_b3_parentspanid:"-" +Ž ¢‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñòŽ®‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.088+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"16d9991b-016f-476a-762b-7b5c1410895d" response_time:0.002963403 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0faacf038ba7614" x_b3_spanid:"c0faacf038ba7614" x_b3_parentspanid:"-" +Ö玮‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ï°û”ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.053+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"45e890e1-0041-4093-4799-5d1507d6ba51" response_time:0.005289306 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b3039d9746f1c690" x_b3_spanid:"b3039d9746f1c690" x_b3_parentspanid:"-" +Èä°û”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷Ò°ë•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.291+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18fc9846-3b81-4c26-4fe2-f5a1e132ce47" response_time:0.002382375 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a1417a498f109df" x_b3_spanid:"6a1417a498f109df" x_b3_parentspanid:"-" +òưë•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãýÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.248+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"17e58e4a-2a46-4cd6-4995-d26d105a406c" response_time:0.003360236 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31aa820a9474239c" x_b3_spanid:"31aa820a9474239c" x_b3_parentspanid:"-" +£ÕýÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ìñ‰¹ŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.869+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a7887af-8cb0-4176-5dab-6a52492ba1a3" response_time:0.002667061 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a1e0c950338a9b14" x_b3_spanid:"a1e0c950338a9b14" x_b3_parentspanid:"-" +ö剹ŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾•çߥڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"42a95f0e-3cc9-463d-4a7c-ebaa85030c05" response_time:0.00256304 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d5c98d7dcc52cc84" x_b3_spanid:"d5c98d7dcc52cc84" x_b3_parentspanid:"-" +î‰çߥڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰ú’þ¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.625+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"422589ec-e1c3-4c37-4c3f-9d998bea0c6b" response_time:0.002886355 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b69c1f4a11e088c4" x_b3_spanid:"b69c1f4a11e088c4" x_b3_parentspanid:"-" +Ÿð’þ¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­üÑ §ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:04.964+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c5a091fe-9a11-45bb-5c16-f994b0269e6d" response_time:0.004250904 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"92bd8412b06296db" x_b3_spanid:"92bd8412b06296db" x_b3_parentspanid:"-" +ŽñÑ §ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ×Ŭ¨ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.259+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b18f8c3a-69d4-4af7-7e33-25bed095a6f4" response_time:0.002699108 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2d23323707dc7d3" x_b3_spanid:"d2d23323707dc7d3" x_b3_parentspanid:"-" +ÃÌŬ¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ýµå¨ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.378+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"866e3542-8a2f-4b53-5da3-7933aed803c2" response_time:0.003367374 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e718fef6309fae0a" x_b3_spanid:"e718fef6309fae0a" x_b3_parentspanid:"-" +²õµå¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0üòóàªÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.906+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"24ac8585-6544-4960-6255-59bfc2b56af0" response_time:0.002494601 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"31fe1cfc11426afb" x_b3_spanid:"31fe1cfc11426afb" x_b3_parentspanid:"-" +ÿêóàªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…ßÔ«ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:06.147+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7257d0c0-858b-4b84-5951-d44a5d33d68e" response_time:0.00254815 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63da973d2419b966" x_b3_spanid:"63da973d2419b966" x_b3_parentspanid:"-" +ÅÏÔ«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šŽ™½¬ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:06.367+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"afe65cd8-46e4-4454-4e7d-668f495e3108" response_time:0.003104973 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9556146c441fec88" x_b3_spanid:"9556146c441fec88" x_b3_parentspanid:"-" +¨…™½¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ħ’ù¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.493+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70781a88-daca-46b7-4c71-93ef7a27ae55" response_time:0.003064186 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2b151a185a632f7" x_b3_spanid:"e2b151a185a632f7" x_b3_parentspanid:"-" +¹ž’ù¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µûØ¥­ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:06.587+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"53c1bb12-f8d5-4e0a-5e16-fc223ecfd365" response_time:0.00275741 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d29744a02b2f5498" x_b3_spanid:"d29744a02b2f5498" x_b3_parentspanid:"-" +˜ïØ¥­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š¼ò¥®ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:06.855+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1f98e19b-1a29-4472-7b46-cb830020927f" response_time:0.003869759 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e1f2728cbc6a110" x_b3_spanid:"3e1f2728cbc6a110" x_b3_parentspanid:"-" +°±ò¥®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¢Òè°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.533+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4d541c9e-dbed-42b2-4da3-057d3f4e4f18" response_time:0.002539642 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"589509e63b215781" x_b3_spanid:"589509e63b215781" x_b3_parentspanid:"-" +Ž™Òè°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÕèϲڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:08.017+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2cc2f28-c63a-41cc-63be-f3ebd3c0ad20" response_time:0.003328254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af4b938dcf253ec7" x_b3_spanid:"af4b938dcf253ec7" x_b3_parentspanid:"-" +»ÎèϲڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽÀβڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:08.014+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4d311e86-db78-4ca9-7d51-fabbc8f9ee08" response_time:0.002867352 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f219eea644c11116" x_b3_spanid:"f219eea644c11116" x_b3_parentspanid:"-" +ñ«Î²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿óÂΖڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.498+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9bcca22b-7e1b-49eb-4587-ea11bc76edaf" response_time:0.003026849 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"758fe3555c048948" x_b3_spanid:"758fe3555c048948" x_b3_parentspanid:"-" +šæÂΖڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ìýó°˜ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:00.972+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b4f2756-2ebb-4ccd-5cc9-b848cd955c57" response_time:0.00413567 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4127680d3b4aecae" x_b3_spanid:"4127680d3b4aecae" x_b3_parentspanid:"-" +Äõó°˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ„°É–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.487+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5c0a520f-638e-480e-6d41-c80ecc549f1f" response_time:0.002982864 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"62b97dca6104c1fa" x_b3_spanid:"62b97dca6104c1fa" x_b3_parentspanid:"-" +“ø¯É–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆÐ©Á˜ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.008+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c639ff36-399e-40be-59d6-9013577d94c3" response_time:0.002726194 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4ff9b8957e322ae1" x_b3_spanid:"4ff9b8957e322ae1" x_b3_parentspanid:"-" +…Å©Á˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹ÔߘڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f817b93c-fd57-433c-5c6e-4647055ab6fa" response_time:0.003653948 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a904878c288d65b" x_b3_spanid:"0a904878c288d65b" x_b3_parentspanid:"-" +̧ÔߘڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö‚¥â™ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.344+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d5ffea6f-8e4c-46db-6a40-071b67734cb4" response_time:0.00362071 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3a1bd90e181c213c" x_b3_spanid:"3a1bd90e181c213c" x_b3_parentspanid:"-" +‹ö¤â™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž»È™ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.197+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4adb32e2-f434-4933-5185-a0c73d4c9648" response_time:0.007208209 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"23b84595a5fe7d7c" x_b3_spanid:"23b84595a5fe7d7c" x_b3_parentspanid:"-" +™°È™ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÌÕ™×›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.857+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7448f384-967b-45ea-5d5f-a38097deb017" response_time:0.004106176 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"813696a169ba0db9" x_b3_spanid:"813696a169ba0db9" x_b3_parentspanid:"-" +ÔÊ™×›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ†çŸ›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.742+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"30e43d3f-7fe2-4086-6bde-01a8595e51f5" response_time:0.003375466 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a48651870111f372" x_b3_spanid:"a48651870111f372" x_b3_parentspanid:"-" +ðøæŸ›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©ËÁßžÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.680+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab1401c1-0a67-48f0-7d8e-7fa103af5a1f" response_time:0.004272925 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2b181f0093f14edc" x_b3_spanid:"2b181f0093f14edc" x_b3_parentspanid:"-" +ƒÀÁßžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£Ù¬îŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.981+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aea18a9c-06f1-4c8e-7bf6-647884e1e385" response_time:0.002680987 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c3428607f96b2cac" x_b3_spanid:"c3428607f96b2cac" x_b3_parentspanid:"-" +ÒȬîŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒðžîÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.444+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"da62103e-573b-4514-7fcc-abc1899104fe" response_time:0.002833376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f63fe6ef0deff4e" x_b3_spanid:"3f63fe6ef0deff4e" x_b3_parentspanid:"-" +«âžîÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤àÎüžÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.743+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bca74322-439d-4c53-7607-cb6925f788f6" response_time:0.002673038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9cf5f76629d6c128" x_b3_spanid:"9cf5f76629d6c128" x_b3_parentspanid:"-" +¹ÕÎüžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èæÿ›ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.816+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a162a9ff-09ae-444a-7ad9-909da014f79b" response_time:0.003263161 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ed076247d539af29" x_b3_spanid:"ed076247d539af29" x_b3_parentspanid:"-" +ÆÛÿ›ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý֑ϜڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.110+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f8abae55-300f-4453-72b7-b2da9081dc23" response_time:0.002938773 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef6146e832321bdf" x_b3_spanid:"ef6146e832321bdf" x_b3_parentspanid:"-" +•ˑϜڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ€ñ±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.314+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4a7239e-3480-4623-733d-4248f66420d4" response_time:0.006303709 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c654f37787f3b96d" x_b3_spanid:"c654f37787f3b96d" x_b3_parentspanid:"-" +Æóð±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬¬Ï¸žÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.600+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c2dbf8b8-8ca6-4754-47f0-a86e59a7152f" response_time:0.00299746 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0a9772cdf0b849ba" x_b3_spanid:"0a9772cdf0b849ba" x_b3_parentspanid:"-" +ê¤Ï¸žÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉÍ녜ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.956+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b55bc135-c7a5-4a96-5818-9465e2f0a8d1" response_time:0.002929573 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"52b9bba7cffe78d2" x_b3_spanid:"52b9bba7cffe78d2" x_b3_parentspanid:"-" +ºÃ녜ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0вťžÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.560+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"83a40a8b-fb63-4fe1-4f14-f3e213802a85" response_time:0.003044094 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd915a33cfa35116" x_b3_spanid:"fd915a33cfa35116" x_b3_parentspanid:"-" +˩ťžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ǫ옠ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.070+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"52b29523-e68e-4d2e-6ea7-b029e30f7602" response_time:0.003321034 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e5b37f479cb61922" x_b3_spanid:"e5b37f479cb61922" x_b3_parentspanid:"-" +„옠ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿åž÷ ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.264+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"017ed61a-cd1d-473a-7fcb-de6e72396cc8" response_time:0.007309899 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"464df59fe726a57d" x_b3_spanid:"464df59fe726a57d" x_b3_parentspanid:"-" +÷Øž÷ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥Ú¨ ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.098+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"56acdad4-6e99-4306-6487-fc9af0213dc2" response_time:0.007000066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"04a5142ca0181617" x_b3_spanid:"04a5142ca0181617" x_b3_parentspanid:"-" +±Í¨ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ËËÄ ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.161+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8329e4a2-2b01-4b59-6e24-b923d230e423" response_time:0.003617376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7c4d145eaf032815" x_b3_spanid:"7c4d145eaf032815" x_b3_parentspanid:"-" +ܰËÄ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹šÊˆ£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.840+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29312" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"67fddbe3-08c9-40db-7346-41d76f710bd0" response_time:0.004376398 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fe716f7a48d38287" x_b3_spanid:"fe716f7a48d38287" x_b3_parentspanid:"-" +ŽÊˆ£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦°Œ¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.094+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ec1d6f6a-b6c5-4579-7bfd-9d3a21f4a4fe" response_time:0.003061174 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4500a10df609faf2" x_b3_spanid:"4500a10df609faf2" x_b3_parentspanid:"-" +ѨŒ¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨†å£¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.704+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20724" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"92987e29-60b7-4eb5-6659-da2e26931beb" response_time:0.002862496 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4b1a3f75b9b2d752" x_b3_spanid:"4b1a3f75b9b2d752" x_b3_parentspanid:"-" +óû䣦ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎÖÔÚ¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8ce4251e-8b1f-4012-74fa-07cfe024ab4e" response_time:0.002793729 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6e220676be00a09" x_b3_spanid:"e6e220676be00a09" x_b3_parentspanid:"-" +ÚÆÔÚ¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™ü…°¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.729+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a90af905-a514-476c-64f0-6b1a68da5833" response_time:0.003175874 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1576f403111bd03c" x_b3_spanid:"1576f403111bd03c" x_b3_parentspanid:"-" +Àï…°¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ŽÚ²¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.272+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"150eb434-e099-4571-416d-c6a76d8f7f15" response_time:0.003010549 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8657cc6c219080a8" x_b3_spanid:"8657cc6c219080a8" x_b3_parentspanid:"-" +¡‚Ú²¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öþÇó¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.408+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bafdb6d7-9630-41b8-6c77-4cab0d8faf67" response_time:0.002987943 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"251cef59de634772" x_b3_spanid:"251cef59de634772" x_b3_parentspanid:"-" +’óÇó¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð˜Õù©ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.688+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b8bf405e-9d97-4928-7ed2-f8a14152e883" response_time:0.003953266 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8995d244f8f396e8" x_b3_spanid:"8995d244f8f396e8" x_b3_parentspanid:"-" +çÕù©ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úõ¦Ë¨ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.324+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cdeadca8-bfd9-42d5-6fb9-1a7b145c9941" response_time:0.002640519 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dca6584b1443a892" x_b3_spanid:"dca6584b1443a892" x_b3_parentspanid:"-" +«å¦Ë¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý÷°ßªÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.903+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f27f7738-72d2-4b48-7f28-cd26e1ea6e35" response_time:0.002214232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9a9cf93b7a0d0f74" x_b3_spanid:"9a9cf93b7a0d0f74" x_b3_parentspanid:"-" +Ýí°ßªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ç¥îªÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.934+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ef8918f2-86cb-4f96-6f22-5c2ad2d6365d" response_time:0.002310454 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8e440090318cfb20" x_b3_spanid:"8e440090318cfb20" x_b3_parentspanid:"-" +³€¥îªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊÜИ«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.022+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bd9cae3e-1bba-449d-790d-d04bb75212b6" response_time:0.003552432 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e890238a7a033ead" x_b3_spanid:"e890238a7a033ead" x_b3_parentspanid:"-" +ÏÒИ«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜ÁÀª«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.060+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4dca476b-88c1-4dbc-73b8-09f375854067" response_time:0.002795891 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b2ab90efdcf79863" x_b3_spanid:"b2ab90efdcf79863" x_b3_parentspanid:"-" +Û¶Àª«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0曡֫ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.152+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31554" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3deedf86-5e97-40c5-743f-00b4ca46a32e" response_time:0.002714157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2e6fc767bcba15cc" x_b3_spanid:"2e6fc767bcba15cc" x_b3_parentspanid:"-" +ø¡Ö«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ôÂã²­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.614+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e05ac871-0d48-4a96-68d7-f5d9818511ee" response_time:0.002713375 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6511f81d1710301a" x_b3_spanid:"6511f81d1710301a" x_b3_parentspanid:"-" +˸㲭ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0À…У«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.046+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"76dd5e9f-7866-4891-5470-b574f67e96a6" response_time:0.002657487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0adc638b2865f87" x_b3_spanid:"a0adc638b2865f87" x_b3_parentspanid:"-" +ý÷Ï£«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©ñŒ¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.273+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:29458" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"69d09b09-bc94-4c61-60fe-8083d4927323" response_time:0.002727206 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d94c4fe86ec11222" x_b3_spanid:"d94c4fe86ec11222" x_b3_parentspanid:"-" +ú匬ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷·ÍׯڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.229+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:27544" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4c22773-da77-47f7-6f95-163640210d1e" response_time:0.00251591 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7dd685459bf801fb" x_b3_spanid:"7dd685459bf801fb" x_b3_parentspanid:"-" +Þ¬ÍׯڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ú…ѱڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.751+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33900" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c641588-a8f8-4a9b-5236-13dad05c6318" response_time:0.003227698 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e6a90ff2a09ca48" x_b3_spanid:"5e6a90ff2a09ca48" x_b3_parentspanid:"-" +¤ó…ѱڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»Ó…Ò°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.485+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:32732" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7074851c-4b4d-404c-44b5-9c705621652b" response_time:0.002334349 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00e3915020f53878" x_b3_spanid:"00e3915020f53878" x_b3_parentspanid:"-" +®°…Ò°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z2z$20fb04a2-ac64-4cfa-a173-9ce3621822a3‚ +10.10.81.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™ÙÞëÔÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:59.242+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14381" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"08481279-d6c1-4460-5048-0abdf3fb5e70" response_time:0.006687024 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5afef928bcbf848f" x_b3_spanid:"5afef928bcbf848f" x_b3_parentspanid:"-" +êÎÞëÔÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ùý÷çÕÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:10:59.502+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12273" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04a4c5ac-c363-47c8-7130-2a34b0b0a081" response_time:0.006381352 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"df4f44136d0bf3ad" x_b3_spanid:"df4f44136d0bf3ad" x_b3_parentspanid:"-" +òï÷çÕÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Î²æÜÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:01.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12273" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28af2208-8ff1-4bc7-422b-8eba8245b965" response_time:0.002192989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b8b0546d381636a" x_b3_spanid:"0b8b0546d381636a" x_b3_parentspanid:"-" +•À²æÜÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó‹•àÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:02.286+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14205" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df7e36b5-c045-40f2-6ea1-f40c736a2274" response_time:0.00207261 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0864becad6c9f50a" x_b3_spanid:"0864becad6c9f50a" x_b3_parentspanid:"-" +¾Ä‹•àÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©ïæàÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:02.456+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14381" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"48e549ee-9a97-4677-5611-780fcfc35f3b" response_time:0.002472767 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6daa9676d3580f9b" x_b3_spanid:"6daa9676d3580f9b" x_b3_parentspanid:"-" +ØáæàÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£àß“öÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:08.188+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:6910" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bd58d92e-9da9-41ad-45ee-666e9bfccc53" response_time:0.002115916 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0096fc44695441ba" x_b3_spanid:"0096fc44695441ba" x_b3_parentspanid:"-" +‘×ß“öÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âªÅñáÏœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:02.744+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14381" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d014746a-bd54-4db7-610d-42c796dbf910" response_time:0.00607021 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d51d10ec5949f4a9" x_b3_spanid:"d51d10ec5949f4a9" x_b3_parentspanid:"-" +ßÅñáÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„³ãÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:03.075+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12025" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7eb93a7-db91-47ed-6466-ec3bd03b5cda" response_time:0.001936604 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"053a06fc9e94292e" x_b3_spanid:"053a06fc9e94292e" x_b3_parentspanid:"-" +üû²ãÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šÕ†ñäÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:03.534+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12025" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ddd4f271-4320-448f-5030-14d70b252375" response_time:0.020224038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ed5e5a55b7f6ac8d" x_b3_spanid:"ed5e5a55b7f6ac8d" x_b3_parentspanid:"-" +‹¿†ñäÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šŒ½€æÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:03.853+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14205" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3b81be62-043c-44a6-7e39-0bff67ef5141" response_time:0.001796234 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7a7b473fa213da72" x_b3_spanid:"7a7b473fa213da72" x_b3_parentspanid:"-" +‚ü¼€æÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0γ×ÉæÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:04.006+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14381" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ffeb7152-7634-4f11-421d-22c2d29cb65f" response_time:0.002775566 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ad2d8342ca5f0fab" x_b3_spanid:"ad2d8342ca5f0fab" x_b3_parentspanid:"-" +§«×ÉæÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦ÂŸƒçÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:04.126+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14381" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"98af196b-7172-4fb4-4d82-0a9640af4d53" response_time:0.003418568 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bdd8cdeb5ea79139" x_b3_spanid:"bdd8cdeb5ea79139" x_b3_parentspanid:"-" +‡´ŸƒçÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®¸è¡çÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:04.191+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14381" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34885d3a-81ad-4cd0-6aee-e759d16bc7d7" response_time:0.002464568 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6776ab7e138d9f4" x_b3_spanid:"d6776ab7e138d9f4" x_b3_parentspanid:"-" +Ÿ°è¡çÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹Ê¸ÓèÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:04.561+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14205" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"019e53ac-9c77-4a0f-4cee-a8b3c4b3688f" response_time:0.004729285 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a6423fba72999c6a" x_b3_spanid:"a6423fba72999c6a" x_b3_parentspanid:"-" +»¸ÓèÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºæùæêÏœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:11:05.141+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:14549" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cdfe4597-5ad8-43e4-718f-e75119ef7c88" response_time:0.002620994 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c00dc26cfddfd5d9" x_b3_spanid:"c00dc26cfddfd5d9" x_b3_parentspanid:"-" +€ÙùæêÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0šîÙþìÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:05.729+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5f95805-17eb-404d-444e-62747a09b1db" response_time:0.001594575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fd7063dc03cbc834" x_b3_spanid:"fd7063dc03cbc834" x_b3_parentspanid:"-" +·åÙþìÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×ØÃ¾íÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:05.862+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"674318f8-946c-4571-7790-2bbf64b20f2d" response_time:0.001838649 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f16ea419df3ebadc" x_b3_spanid:"f16ea419df3ebadc" x_b3_parentspanid:"-" +òÌþíÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÅöñýïÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:06.530+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5b848969-3da8-4e42-688f-5cade02e21f5" response_time:0.003854068 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e1d9443e67c0dc00" x_b3_spanid:"e1d9443e67c0dc00" x_b3_parentspanid:"-" +¬çñýïÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²“½œðÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:06.594+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"892f922b-7882-4e6c-6a86-b8762dd27684" response_time:0.004445007 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3d629519e3acf3a9" x_b3_spanid:"3d629519e3acf3a9" x_b3_parentspanid:"-" +нœðÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¹Œ·ñÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:06.920+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:6910" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60510d4a-b3fa-4e5a-4f3d-8f73a40340c4" response_time:0.002075168 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af3e551e11789357" x_b3_spanid:"af3e551e11789357" x_b3_parentspanid:"-" +÷Œ·ñÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öÖ‰€òÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:07.074+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"358db330-f863-4df8-4795-7b8e94e57514" response_time:0.002097887 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e53f7a7ecdedc35" x_b3_spanid:"0e53f7a7ecdedc35" x_b3_parentspanid:"-" +Ïlj€òÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0êüÈ­øÏœÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:11:08.776+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6b9b2d2f-b01f-4ff5-5206-c5c99d581862" response_time:0.00551708 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cec924d285984655" x_b3_spanid:"cec924d285984655" x_b3_parentspanid:"-" +ÅñÈ­øÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æÕ©ÔÿÏœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:10.740+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b8e1296-d2dc-4ea2-459b-9bb75f9bb30b" response_time:0.00150686 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7943e921c760fa07" x_b3_spanid:"7943e921c760fa07" x_b3_parentspanid:"-" +ÁéÔÿÏœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ú·ý‚„МÖB˜ +Ûben-java-main-application.cfapps.io - [2017-03-16T19:11:11.911+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"13d95236-8cac-4436-6e8e-007164b25c39" response_time:0.00230058 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2975f7e0583cc0c" x_b3_spanid:"d2975f7e0583cc0c" x_b3_parentspanid:"-" +¨«ý‚„МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’à囄МÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:11.963+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"192c4934-e8fc-41ae-7dfb-58a28d9e6fc4" response_time:0.002305853 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5d8d11537b0e9eb4" x_b3_spanid:"5d8d11537b0e9eb4" x_b3_parentspanid:"-" +¶Ô囄МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÁÑü…МÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:11:12.434+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:12064" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0111d648-9b92-44fc-5691-93669020566f" response_time:0.002625285 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1bd84aa7a2f8b2a7" x_b3_spanid:"1bd84aa7a2f8b2a7" x_b3_parentspanid:"-" +†¹Ñü…МÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û¥´ÇˆÐœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:13.129+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"94fdb5dc-5149-4823-5eb7-40ef592e0245" response_time:0.001618108 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dd5768226632dfc1" x_b3_spanid:"dd5768226632dfc1" x_b3_parentspanid:"-" +ú´ÇˆÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›ìººŠÐœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:13.639+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:6910" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b07ebcd1-e749-43a6-6625-aed34429e58e" response_time:0.001456062 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f19a22bebc86101" x_b3_spanid:"4f19a22bebc86101" x_b3_parentspanid:"-" +ÆÞººŠÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ã‹Ž¥ÐœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:14.393+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c3ef48ef-106f-41f3-65fa-5fa19f98770d" response_time:0.008225225 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fa315bb587ba1d29" x_b3_spanid:"fa315bb587ba1d29" x_b3_parentspanid:"-" +Òõ¥ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Îéî»ÐœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:14.442+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:8890" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d69f3c35-dfdd-4bac-4968-f8ad2f25fcd3" response_time:0.006232157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f80e03661f293039" x_b3_spanid:"f80e03661f293039" x_b3_parentspanid:"-" +–áî»ÐœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åôÑМÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:11:14.488+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.66.5:9366" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b058f89-7ea2-4f4f-78f7-f31b41ecf58d" response_time:0.006343047 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"99c6e1aff7a2e777" x_b3_spanid:"99c6e1aff7a2e777" x_b3_parentspanid:"-" +’’ôÑМÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÁøÀÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.059+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12025" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9c8dd36a-f17b-46da-689f-2f16bba9902f" response_time:0.006101875 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ec63ed91578855c" x_b3_spanid:"1ec63ed91578855c" x_b3_parentspanid:"-" +®ÁøÀÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ý¡‰ÀËÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.337+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33508" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"711d0b53-cb9b-4914-4f5d-87bd1d5c26ff" response_time:0.001590237 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"746cea87d747df7e" x_b3_spanid:"746cea87d747df7e" x_b3_parentspanid:"-" +Κ‰ÀËÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0耖ÌÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.473+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e3e4e41-cff7-4f36-72c2-80c1e0f08152" response_time:0.001481231 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6015fec0225a58d9" x_b3_spanid:"6015fec0225a58d9" x_b3_parentspanid:"-" +¥ô•ÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È”‰ôËÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.446+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"09b7aede-6d00-49fe-55d6-0b035693d34d" response_time:0.001657823 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ac36391ac4f7a692" x_b3_spanid:"ac36391ac4f7a692" x_b3_parentspanid:"-" +Úˆ‰ôËÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»Ô”ÌÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.514+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90106dd7-3456-4d91-6df4-fe8ebe2821c6" response_time:0.001985776 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8327062d6e99c65f" x_b3_spanid:"8327062d6e99c65f" x_b3_parentspanid:"-" +ý³Ô”ÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óΘžÌÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.532+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"01f7b19f-3067-485f-7964-6c9be9e04c6c" response_time:0.003087515 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8659cf5f70a31ed4" x_b3_spanid:"8659cf5f70a31ed4" x_b3_parentspanid:"-" +ðŘžÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÚÛŽ£ÌÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.544+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4178bbb1-0498-4972-7ff0-9a180693ccf5" response_time:0.001535062 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2a96a10a48c587c3" x_b3_spanid:"2a96a10a48c587c3" x_b3_parentspanid:"-" +ªÓŽ£ÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Òö˜¤ÑÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.888+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84a92312-130a-4b8a-6d9c-fcbb61d5b9c4" response_time:0.001885991 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"95e9fa4514135a85" x_b3_spanid:"95e9fa4514135a85" x_b3_parentspanid:"-" +Ä꘤ÑÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Íó¯¹ÑÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.933+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b90f6450-f608-41ae-5220-4c4b51ca9f9d" response_time:0.001858685 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8eb2734545ea911" x_b3_spanid:"b8eb2734545ea911" x_b3_parentspanid:"-" +°ë¯¹ÑÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ãñ݉ÒÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:42.097+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d46927bb-9edd-4e07-5312-08635851507c" response_time:0.00615709 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7566f1c588eb2b9c" x_b3_spanid:"7566f1c588eb2b9c" x_b3_parentspanid:"-" +†³Ú‰ÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“÷ºÎÒÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.246+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eb07175b-9f2e-4f4b-47ca-8efb2167ebbb" response_time:0.001824179 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"09bdce03619b1e3e" x_b3_spanid:"09bdce03619b1e3e" x_b3_parentspanid:"-" +ŸíºÎÒÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’®ÓáÕÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:43.088+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a6647e79-ce6b-4f8d-6995-59a953498b4d" response_time:0.00458267 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59482f12f0bcc930" x_b3_spanid:"59482f12f0bcc930" x_b3_parentspanid:"-" +… ÓáÕÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ûäª×ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.513+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c3a9e07-5a4d-4ef1-4832-7b4b01103a5f" response_time:0.001816018 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b852001ba4670a1c" x_b3_spanid:"b852001ba4670a1c" x_b3_parentspanid:"-" +ì‘äª×ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø¨ª¢ØÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.763+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f6cb8de-8aa5-4b5b-6152-e2ffe2b70b1c" response_time:0.001999354 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5ac3bb26873c8658" x_b3_spanid:"5ac3bb26873c8658" x_b3_parentspanid:"-" +ý›ª¢ØÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ˷ØÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:43.808+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:28650" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"685f3f44-8c77-4acb-67ea-b2867fb0c0af" response_time:0.002193873 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41123d81bdf656b2" x_b3_spanid:"41123d81bdf656b2" x_b3_parentspanid:"-" +Ô°Ë·ØÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Çê­²ÙÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.065+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33032" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abc42aba-5881-46c0-4d78-ac4e9dba08c5" response_time:0.002752145 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9393041a46774e48" x_b3_spanid:"9393041a46774e48" x_b3_parentspanid:"-" +‹ã­²ÙÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€Ñí£ÜÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:44.840+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19d06617-817e-4da8-6b2c-6cbb61f9d015" response_time:0.002792121 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0d5bcedb589f0893" x_b3_spanid:"0d5bcedb589f0893" x_b3_parentspanid:"-" +¼Çí£ÜÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸Ö…¿æÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.581+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b829acb8-6ce0-455e-7957-3b2b8b7e7adc" response_time:0.002924667 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7484917dfa4e7814" x_b3_spanid:"7484917dfa4e7814" x_b3_parentspanid:"-" +úË…¿æÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÑâçÃéÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.397+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee8eb993-4af7-4007-4189-f424c4303494" response_time:0.001835091 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d2ae8b28f7001865" x_b3_spanid:"d2ae8b28f7001865" x_b3_parentspanid:"-" +“ÖçÃéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º²ÆÆïÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.012+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78ddb6eb-edce-4054-7172-7e11684f9f0a" response_time:0.003301348 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"499b5993b178c074" x_b3_spanid:"499b5993b178c074" x_b3_parentspanid:"-" +ÀªÆÆïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÙÛ•ÏðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.300+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"10cababf-d528-41df-7b4b-71e2de32c71d" response_time:0.002053029 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"93d75b82ed3da3d9" x_b3_spanid:"93d75b82ed3da3d9" x_b3_parentspanid:"-" +áÍ•ÏðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝÏÉèðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.354+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"df10437b-337c-4e76-693f-0fe1403e9093" response_time:0.001515379 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5059776a007a77f2" x_b3_spanid:"5059776a007a77f2" x_b3_parentspanid:"-" +ûÂÉèðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆøû•ôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.251+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5dc69615-99c8-48c4-4d09-05d43f5d4f7e" response_time:0.004469357 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eadd67e0da8ffbe8" x_b3_spanid:"eadd67e0da8ffbe8" x_b3_parentspanid:"-" +Äîû•ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒáÓ¤õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.553+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8cd9f066-d04a-4b8d-68ef-48da1b763e05" response_time:0.001972436 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"02fa610cdcd646c2" x_b3_spanid:"02fa610cdcd646c2" x_b3_parentspanid:"-" +âÕÓ¤õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ײ×÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.197+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33512" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b2be3010-9a4b-4f87-50ae-48cf4d538c42" response_time:0.001260597 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6cf36d0d6c50bae4" x_b3_spanid:"6cf36d0d6c50bae4" x_b3_parentspanid:"-" +Îβ×÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì·¹¹øÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.402+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d5586e3-43e8-40bc-7c0b-b956bcbee84f" response_time:0.002090958 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e2aefc91cbd19ab" x_b3_spanid:"3e2aefc91cbd19ab" x_b3_parentspanid:"-" +˯¹¹øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àЧüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.438+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f78c510-9ac4-4443-7745-d33611c17725" response_time:0.001850487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef83247361f8a0dd" x_b3_spanid:"ef83247361f8a0dd" x_b3_parentspanid:"-" +ٲϧüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ¿ÜÇýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.774+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee24d49d-41cc-4a67-7258-71df3a6c6261" response_time:0.001744694 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05b66d0afb171190" x_b3_spanid:"05b66d0afb171190" x_b3_parentspanid:"-" +®²ÜÇýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0è‹‡ŠˆÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.597+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b46396bd-b22a-460d-51cf-09736e3edeb3" response_time:0.002112328 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ffd0aa6fb8727f6c" x_b3_spanid:"ffd0aa6fb8727f6c" x_b3_parentspanid:"-" +€ÿ†ŠˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÒéŽýˆÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.839+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:31610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc1c1c70-4b91-4622-56b8-e9d789583410" response_time:0.001592882 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4542769330d2221c" x_b3_spanid:"4542769330d2221c" x_b3_parentspanid:"-" +‚âŽýˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ò£ÅŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.259+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"acb0e346-b953-4fa5-60dd-816d0df4cfcb" response_time:0.001612749 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e4f28fa4c871b83" x_b3_spanid:"5e4f28fa4c871b83" x_b3_parentspanid:"-" +âæ£ÅŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±ùœ¤ŽÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:58.263+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ff5b9618-e62b-4aba-67b5-d0e0d4ad747b" response_time:0.0016926 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ac9c44b53831927" x_b3_spanid:"1ac9c44b53831927" x_b3_parentspanid:"-" +ËŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÝÐóÎŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.353+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be60e88e-b2af-4db2-4fa7-326621b014af" response_time:0.001397543 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"edafb0e175b89303" x_b3_spanid:"edafb0e175b89303" x_b3_parentspanid:"-" +ªÅóÎŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“ Ñ‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.472+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2da5934f-55eb-4a78-7d75-fa6ad2c9e9b2" response_time:0.001689418 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fca610f0dee03150" x_b3_spanid:"fca610f0dee03150" x_b3_parentspanid:"-" +“•чڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔÂüÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.716+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3cc70db9-32de-499a-7296-2af2907e8080" response_time:0.001500405 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"562db292e4bca019" x_b3_spanid:"562db292e4bca019" x_b3_parentspanid:"-" +¨¶üÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€“¿Ð“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.696+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"146311ef-92ed-427f-62e2-e22c1e6c9d25" response_time:0.004318137 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d73c4d8497d74069" x_b3_spanid:"d73c4d8497d74069" x_b3_parentspanid:"-" +؇¿Ð“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿñòÓ”ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.973+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35384" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"45e8c15d-49b8-4900-579a-bd939272b5cb" response_time:0.00279652 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5374fa3936dcdbba" x_b3_spanid:"5374fa3936dcdbba" x_b3_parentspanid:"-" +êåòÓ”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ¶·â”ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.002+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35384" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4615e64d-c88b-401a-4e88-dfdb7d633c8c" response_time:0.003903989 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8fcea931fd60d11c" x_b3_spanid:"8fcea931fd60d11c" x_b3_parentspanid:"-" +‡©·â”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿ¼¾–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.466+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"78544ee2-f33c-40b1-65c1-a9892745defd" response_time:0.001553768 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b37ed5b6daae8cb5" x_b3_spanid:"b37ed5b6daae8cb5" x_b3_parentspanid:"-" +÷ƒ¼¾–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0úÖÀé˜ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.093+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"03417f19-5fa9-4407-4ab2-41be5b573746" response_time:0.002089356 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3df41af2d945559a" x_b3_spanid:"3df41af2d945559a" x_b3_parentspanid:"-" +æÎÀé˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×Ó‘ÑŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.920+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6a91ec7-6e54-433b-6882-117974d4f671" response_time:0.002075286 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e14ac1d37bc1f1b1" x_b3_spanid:"e14ac1d37bc1f1b1" x_b3_parentspanid:"-" +ñˑџڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚†µ©¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.642+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"54b60f37-5620-4c70-539d-56d1cdf830e1" response_time:0.002966029 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c1a53e4bb08c1c04" x_b3_spanid:"c1a53e4bb08c1c04" x_b3_parentspanid:"-" +Ðþ´©¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Æš­Ð¢ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:03.724+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6924efb9-8566-4a6c-68d9-eba6df604937" response_time:0.00214852 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"af3166714748c3e0" x_b3_spanid:"af3166714748c3e0" x_b3_parentspanid:"-" +鑭ТڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»ÀÒ”¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.404+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62ccecbe-71fc-4768-65dc-a597adcc91ab" response_time:0.002230136 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9b34fdbe8a718e46" x_b3_spanid:"9b34fdbe8a718e46" x_b3_parentspanid:"-" +ö¸Ò”¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•Š«¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.452+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62b79fb3-8934-4d10-7cc6-71198e043009" response_time:0.001812771 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f625acf78e4422e" x_b3_spanid:"8f625acf78e4422e" x_b3_parentspanid:"-" +Ú‰Š«¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ø–°Ý¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.557+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"208b98d0-7f24-44ba-508f-dce0e291b1a8" response_time:0.001406082 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1cfbc018607b8145" x_b3_spanid:"1cfbc018607b8145" x_b3_parentspanid:"-" +ɰݥڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û²®¦ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.727+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"db17a9b0-330d-453d-662d-27bea3543cc3" response_time:0.001576006 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7adb0867c5f416e9" x_b3_spanid:"7adb0867c5f416e9" x_b3_parentspanid:"-" +€Ô²®¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0漩ͦڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.791+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35478" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9a37270c-771d-41f8-7407-7628c1da330d" response_time:0.002721483 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc476efc4c716dd8" x_b3_spanid:"dc476efc4c716dd8" x_b3_parentspanid:"-" +ßµ©Í¦ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0×õòú§ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.156+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:33846" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"02193b26-22d0-49e2-4956-d29fccba8cc8" response_time:0.00155451 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e8ffdc6a355fa396" x_b3_spanid:"e8ffdc6a355fa396" x_b3_parentspanid:"-" +„ëòú§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰¹Ô™«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.026+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"18ca39ee-4ec8-42e7-5914-dd1aa22eb9ff" response_time:0.001775118 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"76d5bc7ff54d3c00" x_b3_spanid:"76d5bc7ff54d3c00" x_b3_parentspanid:"-" +ȫԙ«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¡÷¡¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.311+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:34206" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4409b63-cac0-4d03-6f3d-82cde3692c78" response_time:0.002022412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3a7c82eec100cb45" x_b3_spanid:"3a7c82eec100cb45" x_b3_parentspanid:"-" +ô–÷¡¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùÚö¹®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.899+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:35478" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a7eaa10-1860-4027-438d-2d7852c35c72" response_time:0.001420471 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a5e8c0cd37fae33a" x_b3_spanid:"a5e8c0cd37fae33a" x_b3_parentspanid:"-" +íÎö¹®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z1z$f6418a63-2fef-4fbe-9cd1-003edf8dda8d‚ 10.10.17.14 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐÉñý­ÔœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:13:40.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10504" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"20d14957-3e65-46ed-7d6c-e46410824583" response_time:0.006332423 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"21472d1506b33f0b" x_b3_spanid:"21472d1506b33f0b" x_b3_parentspanid:"-" +¾ñý­ÔœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR20j cf-cfapps-io2r router_z2z$1af8fc2e-5da4-4a03-bad0-a2037d599920‚ +10.10.81.3 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø§«¾ÂÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.477+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5abc1bbf-97cb-4099-6a89-f223a5547fba" response_time:0.002882726 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f95cbaec7a672e09" x_b3_spanid:"f95cbaec7a672e09" x_b3_parentspanid:"-" +™«¾ÂÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µÚìÂÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.575+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"28ddbfa8-7891-40e0-7833-09a454d90526" response_time:0.002261742 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ef22eb4f5aeaec44" x_b3_spanid:"ef22eb4f5aeaec44" x_b3_parentspanid:"-" +ѨÚìÂÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿èŽÃÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.615+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16555" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"98ba5b52-4a06-46b7-55dc-f0b803e76d36" response_time:0.005118378 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"73c040b383343a9f" x_b3_spanid:"73c040b383343a9f" x_b3_parentspanid:"-" +ûÙŽÃÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾±õ­ÄÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:20.978+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16179" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4e0b9f5-15f5-4e71-4eaf-27f6a4e263c1" response_time:0.003711369 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1db0bd7837c40277" x_b3_spanid:"1db0bd7837c40277" x_b3_parentspanid:"-" +µ¤õ­ÄÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ä™¹ˆÆÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:21.438+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5cc74e9c-eaba-407d-5e25-6e17d6ce11e6" response_time:0.002842133 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d5afb75d3e12d54b" x_b3_spanid:"d5afb75d3e12d54b" x_b3_parentspanid:"-" +£Ð·ˆÆÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎèâÕÈÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:22.138+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8411" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ec2dde2-439d-4e23-4d9c-4baf85cb873c" response_time:0.001791513 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9008cc32f56dbf35" x_b3_spanid:"9008cc32f56dbf35" x_b3_parentspanid:"-" +ËÛâÕÈÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Óñ¤ÉÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:22.284+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12017" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a3bd894-21c2-4524-6b67-957bc298f2d1" response_time:0.021724086 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"434727552dd19f4e" x_b3_spanid:"434727552dd19f4e" x_b3_parentspanid:"-" +óÆñ¤ÉÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ü©˜œÊÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:22.550+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8411" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee23482d-d537-4cfe-442c-2f77317b5898" response_time:0.005175236 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e8359785bd214ce3" x_b3_spanid:"e8359785bd214ce3" x_b3_parentspanid:"-" +àœ˜œÊÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ ËªÊÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:22.578+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8411" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"aed13ca2-7e32-4a2b-6949-948ba7c08a0b" response_time:0.007343632 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f884ca3f72d841da" x_b3_spanid:"f884ca3f72d841da" x_b3_parentspanid:"-" +ŒŽËªÊÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆª­ÉÊÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:22.646+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12017" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"91fbad86-2294-4680-67e1-b174ff23f87d" response_time:0.003846921 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5dd849408269ad59" x_b3_spanid:"5dd849408269ad59" x_b3_parentspanid:"-" +£­ÉÊÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µïïüÊÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:22.757+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15905" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62acbe8a-786d-4931-5e88-34b31154ba4c" response_time:0.001817147 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9fbc80fc582cb7a7" x_b3_spanid:"9fbc80fc582cb7a7" x_b3_parentspanid:"-" +œçïüÊÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0û“íÚÌÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:23.222+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ab46dafc-dd39-42ba-62eb-7756fa85f227" response_time:0.001878825 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9ee69e48d6f280f" x_b3_spanid:"e9ee69e48d6f280f" x_b3_parentspanid:"-" +“‡íÚÌÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èüÌÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:23.290+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3c68a18a-4a31-4a6e-65f5-090b822d26a6" response_time:0.003392761 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"55223d0aaea11126" x_b3_spanid:"55223d0aaea11126" x_b3_parentspanid:"-" +÷ßüÌÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÈúòëÍÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:23.523+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60265596-f8ad-42ee-7c4c-0d2a656b2a26" response_time:0.004911502 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"87772219cfef74b2" x_b3_spanid:"87772219cfef74b2" x_b3_parentspanid:"-" +ÈìòëÍÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€«¹ŒÏÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:23.862+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bc2866ed-120c-415b-4fed-cb89b1a1dc05" response_time:0.002286248 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f15a2e430dbe5b1a" x_b3_spanid:"f15a2e430dbe5b1a" x_b3_parentspanid:"-" + ¹ŒÏÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬üœ¶ÏÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:23.951+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16179" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"77bcb935-149c-41a6-4ba0-d3cbc21329f3" response_time:0.001512066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1364246961f6fd63" x_b3_spanid:"1364246961f6fd63" x_b3_parentspanid:"-" +çÏÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶â°êÐÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:24.328+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15833" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34d96978-0fe4-4b1a-7578-125c0087b787" response_time:0.001947441 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"19a8f19a5c1375f6" x_b3_spanid:"19a8f19a5c1375f6" x_b3_parentspanid:"-" +ŽÑ°êÐÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ѶžãÑÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:24.578+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9c1455b5-004a-48bc-4869-c7394278acd3" response_time:0.005608756 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"37b1e40efe0358fc" x_b3_spanid:"37b1e40efe0358fc" x_b3_parentspanid:"-" +ÿ¬žãÑÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0í®’“ÒÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:24.681+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15833" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f4cfb72a-bf2a-4819-4dca-eb880a958b30" response_time:0.002940699 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45bdf82f7afa488f" x_b3_spanid:"45bdf82f7afa488f" x_b3_parentspanid:"-" +Ëž’“ÒÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›üÄ«ÒÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:24.731+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12017" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3bae149d-d533-4557-6bf0-023074239a70" response_time:0.004569574 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a4fea0822be43d2a" x_b3_spanid:"a4fea0822be43d2a" x_b3_parentspanid:"-" +¶ôÄ«ÒÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„º ÆÔÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:25.326+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a408277d-b648-46fa-5888-5611ee5719e0" response_time:0.002308332 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"80deb493399c5808" x_b3_spanid:"80deb493399c5808" x_b3_parentspanid:"-" +ù° ÆÔÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ªûàüÕÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:25.707+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15905" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"caadb9c4-699a-4e99-7c55-45dc3991eedd" response_time:0.004127944 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d20a87d96d5835fb" x_b3_spanid:"d20a87d96d5835fb" x_b3_parentspanid:"-" +¥ïàüÕÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Äí·ÍÖÕœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:25.878+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"65c86078-0245-47a4-7478-6dd22a560341" response_time:0.00182127 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0877b57ca93dd3fc" x_b3_spanid:"0877b57ca93dd3fc" x_b3_parentspanid:"-" +‚Þ·ÍÖÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»ñÝØÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:26.280+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"607b30f0-63f9-41cb-7c5f-268babe7e055" response_time:0.003597184 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3ff8986a7290f5d6" x_b3_spanid:"3ff8986a7290f5d6" x_b3_parentspanid:"-" +ËéÝØÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›»…ÜØÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:26.445+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16531" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f5107a0-71b7-4853-6af4-bc41ac789bbd" response_time:0.002375191 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e170073b74e4028" x_b3_spanid:"6e170073b74e4028" x_b3_parentspanid:"-" +Ø©…ÜØÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÔåÍ£ÙÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:26.595+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16531" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7ab75ad1-1605-4302-7773-4e17e9fa61f0" response_time:0.002816325 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"065c9db31e0971af" x_b3_spanid:"065c9db31e0971af" x_b3_parentspanid:"-" +ŽÜÍ£ÙÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶ëý§ÜÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:27.408+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15905" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6bb46d2f-1d1a-4572-64de-6586f1cd795a" response_time:0.00384292 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d1a44d371ce0d71" x_b3_spanid:"1d1a44d371ce0d71" x_b3_parentspanid:"-" +õßý§ÜÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀÀò³ÜÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:27.435+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15905" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4ceb9dc5-8c23-4ef8-6e39-7fcce4789148" response_time:0.001882324 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7bb781995f3ea550" x_b3_spanid:"7bb781995f3ea550" x_b3_parentspanid:"-" +ÿýñ³ÜÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ³‡ÝÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:27.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12025" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"147ce742-0538-4604-6ed2-c1af41779995" response_time:0.002185562 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2bd757a8625c1cf5" x_b3_spanid:"2bd757a8625c1cf5" x_b3_parentspanid:"-" +ü䳇ÝÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Êñ¸¯ÝÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:27.694+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8411" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc1095d5-fe4e-4d13-7467-84989a5904df" response_time:0.001987147 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c18f44fc4ee56bb" x_b3_spanid:"4c18f44fc4ee56bb" x_b3_parentspanid:"-" +Å鸯ÝÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û˜ë¼ÝÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:27.716+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0cbb6a8-ef1b-48e3-63ce-e5b44c431149" response_time:0.007701011 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a9317ea998d43e6" x_b3_spanid:"6a9317ea998d43e6" x_b3_parentspanid:"-" +߉ë¼ÝÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0´¾¸àßÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:28.333+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:12025" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9b90a2c-ca20-46cf-43b6-c952a4488cf6" response_time:0.002607844 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"307e103385b05ebb" x_b3_spanid:"307e103385b05ebb" x_b3_parentspanid:"-" +€²¸àßÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö††ŠáÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:28.688+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"028d835a-0039-4146-781b-a7e1f4a95ce3" response_time:0.002862772 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae51100f19e99b6b" x_b3_spanid:"ae51100f19e99b6b" x_b3_parentspanid:"-" +Îì…ŠáÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0â×ÖâáÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:28.873+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16531" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"44766a38-cf79-4f21-53e5-f7620c2037dc" response_time:0.004501945 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bafc521ebde95854" x_b3_spanid:"bafc521ebde95854" x_b3_parentspanid:"-" +ˆÀÖâáÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë‹…âÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:28.944+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16531" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"188bf4d2-1de1-4b6b-70b4-56250c53239b" response_time:0.005439984 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"27aa90a43fcacb60" x_b3_spanid:"27aa90a43fcacb60" x_b3_parentspanid:"-" +×þŽ…âÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0º«¥ÖâÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:29.115+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8411" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ad5af556-1f31-4f16-762d-990ef03e9873" response_time:0.004757644 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b46eda42ea7c1e63" x_b3_spanid:"b46eda42ea7c1e63" x_b3_parentspanid:"-" +¿ ¥ÖâÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 îÇèãÕœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:29.419+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8411" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"99327ef5-95fb-487e-7976-41cc5320ade4" response_time:0.00733997 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d25a7af0e0358f1b" x_b3_spanid:"d25a7af0e0358f1b" x_b3_parentspanid:"-" +ÞàÇèãÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ľ‹áäÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:29.672+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d3b8066c-528e-495e-53bf-8aaebaaf9cac" response_time:0.007407386 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"41d51e149db48d79" x_b3_spanid:"41d51e149db48d79" x_b3_parentspanid:"-" +ß«‹áäÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 ±à–åÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:29.790+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e8e17151-11fc-4671-67c8-075ca61ff217" response_time:0.002318482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c344b4cd605ad64d" x_b3_spanid:"c344b4cd605ad64d" x_b3_parentspanid:"-" +™¡à–åÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0츬åÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:29.830+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d835b9d1-7418-4f57-5589-942aeb95d9c0" response_time:0.006636001 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"665ce63167751c2c" x_b3_spanid:"665ce63167751c2c" x_b3_parentspanid:"-" +樬åÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±çá¸åÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:29.861+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f3a3791-5c03-4fea-6f09-be249130c69f" response_time:0.002462909 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4b37e7ce1152ad96" x_b3_spanid:"4b37e7ce1152ad96" x_b3_parentspanid:"-" +Û×á¸åÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÁäúåÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:29.998+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"108e8fed-84b3-43d6-55f2-0f7db3e4bfe5" response_time:0.001913066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4914ac4ed1d56bcc" x_b3_spanid:"4914ac4ed1d56bcc" x_b3_parentspanid:"-" +ÌÔúåÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥šÕ‹æÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:30.035+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c950a64e-05cc-474a-55c1-e4a429ac06fb" response_time:0.001868788 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e94e37c14038708" x_b3_spanid:"3e94e37c14038708" x_b3_parentspanid:"-" +ÌՋæÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 „ÛÇæÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:30.161+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8595" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"abbfba0d-f3e7-49e4-5538-a75c0aec6f8c" response_time:0.002114614 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a7a78f35d1d8d348" x_b3_spanid:"a7a78f35d1d8d348" x_b3_parentspanid:"-" +´÷ÚÇæÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎÀÄÔæÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:30.188+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b928127f-6b07-494a-6fa2-719d4e734e05" response_time:0.001936206 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6802626912990698" x_b3_spanid:"6802626912990698" x_b3_parentspanid:"-" +º´ÄÔæÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉÜÐñæÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:30.242+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"767e10e7-043a-41ab-405b-56317ea9b235" response_time:0.008995482 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb33496dec1da89f" x_b3_spanid:"bb33496dec1da89f" x_b3_parentspanid:"-" +îÂÐñæÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄúêéÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:30.851+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15713" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"67af27ba-d75a-4c43-51fd-9c02a82b4567" response_time:0.002280964 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"53a3aaeec12ef76c" x_b3_spanid:"53a3aaeec12ef76c" x_b3_parentspanid:"-" +•ìêéÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àºå¥êÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:31.149+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e730f030-2e68-4f76-7ef0-7c584540dc4e" response_time:0.016383227 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8bc8528438cf4129" x_b3_spanid:"8bc8528438cf4129" x_b3_parentspanid:"-" +ˆ§å¥êÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùèÑñêÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:31.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15713" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e9ed332e-bed5-482d-6f88-a906a25e0031" response_time:0.001746396 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ec8e6676b6567ab" x_b3_spanid:"6ec8e6676b6567ab" x_b3_parentspanid:"-" +ìáÑñêÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0þ¹ïóêÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:31.328+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a6243cd5-c18d-4e81-7ddf-8cb46284a5df" response_time:0.001528565 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29266911ff671d33" x_b3_spanid:"29266911ff671d33" x_b3_parentspanid:"-" +ƒ±ïóêÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊœãìÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:31.827+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15905" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cc639736-ff0b-42a4-5484-8aba11d6fc8a" response_time:0.004747743 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"45ccb5a04fada8d1" x_b3_spanid:"45ccb5a04fada8d1" x_b3_parentspanid:"-" +—þ›ãìÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òð¥ƒíÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:31.895+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16179" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"32523902-19be-4dc8-7d95-b80a928c64ca" response_time:0.003200279 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ac5d82e8751d95a" x_b3_spanid:"1ac5d82e8751d95a" x_b3_parentspanid:"-" +¹ä¥ƒíÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö¥—·íÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:32.005+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4c0cacb7-26b8-4188-45cc-e5d97dbeb566" response_time:0.001988789 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d95e92b5eda34eb9" x_b3_spanid:"d95e92b5eda34eb9" x_b3_parentspanid:"-" +·íÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»»€æíÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:32.101+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16179" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4366bc9-dac5-4dbc-6bb8-ee8abb8438d9" response_time:0.004605586 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0e9739cd36d04673" x_b3_spanid:"0e9739cd36d04673" x_b3_parentspanid:"-" +º°€æíÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž·¼‰îÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:32.170+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d7fad72-aa90-44b4-5b66-9fb6f1f5735e" response_time:0.009481137 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"61d61e753a8fe434" x_b3_spanid:"61d61e753a8fe434" x_b3_parentspanid:"-" +½§¼‰îÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œ†ÏŒîÕœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:32.183+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"893c9505-6140-4b31-62bb-a600090f80d4" response_time:0.00391966 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e0c51a020d29af5a" x_b3_spanid:"e0c51a020d29af5a" x_b3_parentspanid:"-" +éýÎŒîÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ê飑ðÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:32.730+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7c976b9a-fbde-4a20-4b81-a1769d8de43f" response_time:0.003459288 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"134320dfdff6163d" x_b3_spanid:"134320dfdff6163d" x_b3_parentspanid:"-" +ÃÚ£‘ðÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†¼«©ðÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:32.777+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e5809e1-3028-4365-6ece-23762d840393" response_time:0.006510089 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59a4d3408cf8e123" x_b3_spanid:"59a4d3408cf8e123" x_b3_parentspanid:"-" +ñ²«©ðÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™ŒûòÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:33.483+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1f52abd7-a4b1-4707-519b-a4f29874630d" response_time:0.008517297 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc62cf4bb5c799f7" x_b3_spanid:"dc62cf4bb5c799f7" x_b3_parentspanid:"-" +ØÿœûòÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0™Ðó óÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:33.569+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:10265" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3ab7647b-40d1-4abe-6021-51c107bcd676" response_time:0.002466745 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39efc44aa023e00e" x_b3_spanid:"39efc44aa023e00e" x_b3_parentspanid:"-" +ÄÄó óÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€µ˜ÚõÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:34.225+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bab6d7fa-be89-4445-76b6-719fd8b0d5cd" response_time:0.003259196 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ce4b899f2e1d102f" x_b3_spanid:"ce4b899f2e1d102f" x_b3_parentspanid:"-" +Ǧ˜ÚõÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°ûÆåõÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:34.250+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7950f439-8a16-4812-4158-08ceca1fab31" response_time:0.002451526 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d1e05b515b41b6c" x_b3_spanid:"4d1e05b515b41b6c" x_b3_parentspanid:"-" +ÉîÆåõÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0“¿“·öÕœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:34.417+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:9443" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4f74cee3-89b5-42bd-5365-3ccf6e233ad7" response_time:0.00646487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"136b335cbd13aa4e" x_b3_spanid:"136b335cbd13aa4e" x_b3_parentspanid:"-" +ð´“·öÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëá€÷ÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:34.574+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"01733846-1c3d-4b88-5922-ad04ff0689f0" response_time:0.003705364 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"90279a16445a7058" x_b3_spanid:"90279a16445a7058" x_b3_parentspanid:"-" +Ãá€÷ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‹¾™÷ÕœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:34.635+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cf56c405-b2b4-4cb5-71ad-ea85a2ed7d61" response_time:0.00254627 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"403fcee3e41a5c44" x_b3_spanid:"403fcee3e41a5c44" x_b3_parentspanid:"-" +¸´˜÷ÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0îóÀøÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:34.903+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:11141" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e642ba7-a307-4ea1-56c3-8d500ff4ddfd" response_time:0.002758506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"633886479c08b698" x_b3_spanid:"633886479c08b698" x_b3_parentspanid:"-" +ïãÀøÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬Â´¶úÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:35.493+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7fa48e35-0517-41e7-6f16-003e27ec726e" response_time:0.002096531 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d8078dad004d015c" x_b3_spanid:"d8078dad004d015c" x_b3_parentspanid:"-" +á«´¶úÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨—´†üÕœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:14:35.930+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:1039" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"180231ba-aa0a-48ae-7a31-650006ed4ac1" response_time:0.00178964 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5e8e38d07510eee8" x_b3_spanid:"5e8e38d07510eee8" x_b3_parentspanid:"-" +Ž´†üÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½¶ÍüÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:36.078+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84a73865-8e15-40b2-7f33-07b754a0e1b6" response_time:0.002577218 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f6ad18e405b5d7a" x_b3_spanid:"8f6ad18e405b5d7a" x_b3_parentspanid:"-" +Ÿ¬ÍüÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷´È­ýÕœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:36.280+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bd1a00fd-79fc-4d4e-6a8f-8ab8c8aec85a" response_time:0.00240428 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2ad3b0f73cfe240" x_b3_spanid:"e2ad3b0f73cfe240" x_b3_parentspanid:"-" +ý¤È­ýÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥Ó¶ÿÕœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:36.835+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16019" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8c545b1f-c8f6-484b-602f-7b016e97ada6" response_time:0.001500419 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"537006590176ae2a" x_b3_spanid:"537006590176ae2a" x_b3_parentspanid:"-" +ËöÿÕœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áæ¿Ž€ÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:37.020+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2b1d243-9428-458f-5e10-4f0062d97cce" response_time:0.002017413 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6515fdcfb1457967" x_b3_spanid:"6515fdcfb1457967" x_b3_parentspanid:"-" +¼Ö¿Ž€ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äü„±€ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:37.091+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15243" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dd432aa5-2a88-4333-67c5-2e6c26621e99" response_time:0.003405505 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"37400ea4c9b218d4" x_b3_spanid:"37400ea4c9b218d4" x_b3_parentspanid:"-" +‚ð„±€ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿¯€…ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:37.269+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16177" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb3c2f64-d441-4009-42b6-ad1485b43605" response_time:0.002202834 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d05ae7465d4af69f" x_b3_spanid:"d05ae7465d4af69f" x_b3_parentspanid:"-" +†¨€…ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„½“ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:37.300+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16177" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"40f6b2e6-8e16-430c-7732-7893b75795cf" response_time:0.001580649 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f90e9f482d0ccab6" x_b3_spanid:"f90e9f482d0ccab6" x_b3_parentspanid:"-" +ñõ¼“ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÍÉ£˜ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:37.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16177" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6da0d2b8-e52a-40ef-6d78-cfe4cd9d4cd6" response_time:0.001641156 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e74c04e0da749487" x_b3_spanid:"e74c04e0da749487" x_b3_parentspanid:"-" +ðÁ£˜ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾ïÁ·‚ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:37.643+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d5d2c064-134e-484c-67aa-804b231b581e" response_time:0.002031915 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f2d297046e057f79" x_b3_spanid:"f2d297046e057f79" x_b3_parentspanid:"-" +ÞáÁ·‚ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØÄÏ‚ƒÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:37.801+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16555" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b046b2d7-218b-4f34-5a9e-364e0a492dc6" response_time:0.001817642 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"77a9ef93a59599b8" x_b3_spanid:"77a9ef93a59599b8" x_b3_parentspanid:"-" +Ž¶Ï‚ƒÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñÓàƒÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:37.996+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:8855" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"45450b05-fb79-4806-5a5c-c8d7e1683236" response_time:0.002499781 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3bdd10efccf52398" x_b3_spanid:"3bdd10efccf52398" x_b3_parentspanid:"-" +¿ÈàƒÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚úèæƒÖœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:14:38.011+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16131" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e632553-9c6f-4caa-6e6b-b1c2e4867824" response_time:0.00188018 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fb36563c757b4453" x_b3_spanid:"fb36563c757b4453" x_b3_parentspanid:"-" +ŠîèæƒÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’öÒ“„ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:38.105+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15713" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"95d8a012-9be7-4694-60b4-5323264cbf93" response_time:0.001637288 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"981964380770b7ef" x_b3_spanid:"981964380770b7ef" x_b3_parentspanid:"-" +“èÒ“„ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨Ê³Æ…ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:38.480+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15905" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"04118e52-2b6b-45c8-7e5d-cc6eccd23808" response_time:0.001881678 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8f9cc59e3dc5281b" x_b3_spanid:"8f9cc59e3dc5281b" x_b3_parentspanid:"-" +佳ƅ֜Ö"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’„춆֜ÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:38.715+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:16175" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"48170c7f-ff2b-4680-6893-7ad418ea7ef2" response_time:0.002257208 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"84e51a8d2438d461" x_b3_spanid:"84e51a8d2438d461" x_b3_parentspanid:"-" +‹øë¶†ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0 „¬¾‡ÖœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:14:38.999+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:15833" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f4d40248-d4ee-48b9-5f55-11d79c6e6df1" response_time:0.002500803 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b7da97b68da895ff" x_b3_spanid:"b7da97b68da895ff" x_b3_parentspanid:"-" +ì÷«¾‡ÖœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR24j cf-cfapps-io2r router_z1z$7742b06f-e398-41d5-84cd-a41f992e2757‚ +10.10.17.5 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÜÇн ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.148+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"90a49803-46f9-4eb1-5308-3df696b38788" response_time:0.001932797 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e43a83a4f4e15b97" x_b3_spanid:"e43a83a4f4e15b97" x_b3_parentspanid:"-" +ë¼Ð½ ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄҬϠڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.183+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6cb62958-a8e4-4caf-78a5-1f19dd196b22" response_time:0.004397188 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3f51e970dee392e9" x_b3_spanid:"3f51e970dee392e9" x_b3_parentspanid:"-" +ÇǬϠڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òÀë¢ÉÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.738+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f3ead38f-a8aa-4aa5-440f-6ba10a5ac739" response_time:0.001943374 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e85a91b6736ea4f6" x_b3_spanid:"e85a91b6736ea4f6" x_b3_parentspanid:"-" +æ²ë¢ÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ØóÞàÉÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.867+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4360ba5d-41d3-474c-7829-50f11a75b308" response_time:0.002599244 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6cf49ada060a0b2" x_b3_spanid:"b6cf49ada060a0b2" x_b3_parentspanid:"-" +œèÞàÉÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðàΕÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:39.976+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5eb175d6-f171-417b-6dd8-73a7bfe78308" response_time:0.004797675 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5afb6f11a022e22d" x_b3_spanid:"5afb6f11a022e22d" x_b3_parentspanid:"-" +ïÓΕÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çЪ¦ÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.011+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55860" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4afde1f7-756b-40d8-72a0-d29f77acf9c4" response_time:0.005136217 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"23fb14f72614bf50" x_b3_spanid:"23fb14f72614bf50" x_b3_parentspanid:"-" +ØÁª¦ÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0džâëÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.159+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e4cdc34c-178c-4e78-4858-c3992b2c6ab0" response_time:0.002079142 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6a703837f53adce5" x_b3_spanid:"6a703837f53adce5" x_b3_parentspanid:"-" +ìúáëÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ññ•÷ÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.183+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"923602d6-5ece-4467-4ace-daabee9a4f88" response_time:0.002155914 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f55b6d0e92f3bd54" x_b3_spanid:"f55b6d0e92f3bd54" x_b3_parentspanid:"-" +‘æ•÷ÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÎåÐÿÊÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.202+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"914c6419-08cf-4e87-7e9f-a8365847b7dd" response_time:0.001475487 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2de1433ce5bfab3c" x_b3_spanid:"2de1433ce5bfab3c" x_b3_parentspanid:"-" +ÕÜÐÿÊÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„±–ŒËÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:40.228+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1637cba8-3b84-4260-50f3-b2c2ff2cda4b" response_time:0.00152798 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7861e6c734a75974" x_b3_spanid:"7861e6c734a75974" x_b3_parentspanid:"-" +¸§–ŒËÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0°Ž©ÙËÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.389+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"21f3eeae-04c9-476b-65bc-bce502a3ed6d" response_time:0.001604333 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf539c7737de4407" x_b3_spanid:"cf539c7737de4407" x_b3_parentspanid:"-" +ü©ÙËÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—ä¿ÂÌÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.610+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eba3ae6a-0c2b-49e7-6893-aeb6e164bae8" response_time:0.001678191 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d16a063c9dda0a7e" x_b3_spanid:"d16a063c9dda0a7e" x_b3_parentspanid:"-" +™Ñ¿ÂÌÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾¦ù¨ÍÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:40.825+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d7d89008-5dc2-45a4-4383-cf34f3132ab4" response_time:0.001536988 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d8d29edbef4b4b47" x_b3_spanid:"d8d29edbef4b4b47" x_b3_parentspanid:"-" +ןù¨ÍÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œôǃÎÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.015+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bf9d0b4e-ea72-4ef4-760c-28ba4dcd385a" response_time:0.001898654 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ff998c683ed0623" x_b3_spanid:"2ff998c683ed0623" x_b3_parentspanid:"-" +ôáǃÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùˆÿ‡ÎÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.023+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f748e94-6a49-4cc1-55de-9c450638def3" response_time:0.002439126 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"29f46bfdd41f03ca" x_b3_spanid:"29f46bfdd41f03ca" x_b3_parentspanid:"-" +¨úþ‡ÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨ÃÎÉÎÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.159+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"cffcf116-55dd-473a-7536-b6085fbaa020" response_time:0.004044239 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e78b437484d788b6" x_b3_spanid:"e78b437484d788b6" x_b3_parentspanid:"-" +Ò¼ÎÉÎÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ÏÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.404+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58352" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12b70a9c-aff0-412b-7d7d-d7f25dd2b60b" response_time:0.001778609 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e9cf66ca8b85f2f6" x_b3_spanid:"e9cf66ca8b85f2f6" x_b3_parentspanid:"-" +Ùþš½ÏÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äñšÔÑÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:41.989+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:51284" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a34b2bec-970e-49cd-4217-44bc98486fa4" response_time:0.002499373 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bd216b2579907cc" x_b3_spanid:"9bd216b2579907cc" x_b3_parentspanid:"-" +ŽëšÔÑÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0»É—µÓÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:42.462+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e27e713e-276d-4cfe-45f2-bd7483ace31f" response_time:0.001228664 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"91e075c97975badd" x_b3_spanid:"91e075c97975badd" x_b3_parentspanid:"-" +¢Á—µÓÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0øÓêääÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.121+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d69bdceb-f203-4ab0-62b0-eeb775abda0b" response_time:0.005227155 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"67078ece56d5aa8f" x_b3_spanid:"67078ece56d5aa8f" x_b3_parentspanid:"-" +ÍÉêääÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡ú„žèÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.049+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"45500c0f-5c4b-4654-4e41-5ecb656f6ee8" response_time:0.002780376 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"97c8b9dd212f46a8" x_b3_spanid:"97c8b9dd212f46a8" x_b3_parentspanid:"-" +Ðð„žèÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ó›ìèÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.214+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0948fbc4-e4bd-48d4-5cf7-369382a25441" response_time:0.001704048 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"55b51fe8ba229ebe" x_b3_spanid:"55b51fe8ba229ebe" x_b3_parentspanid:"-" +ðç›ìèÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ä®ó éÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.324+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f0b69557-bf80-4eba-60b4-ca20b31657bf" response_time:0.001823756 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3389e4cb42265703" x_b3_spanid:"3389e4cb42265703" x_b3_parentspanid:"-" +æ¤ó éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0®Ý³¨éÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.339+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a82eb3b-4153-45d0-54f8-6fb5e917a298" response_time:0.002827297 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b97bef6c208df33b" x_b3_spanid:"b97bef6c208df33b" x_b3_parentspanid:"-" +ÿ˳¨éÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âÝ›ûéÙœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:16:48.511+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"21089c98-aacf-4cb3-56f7-31f1b4992979" response_time:0.0040775 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"db751773859d8a8b" x_b3_spanid:"db751773859d8a8b" x_b3_parentspanid:"-" +ÄÑ›ûéÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ëóðØêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.709+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"76fdfb6d-8a02-40f9-5d88-6a8a1a3b59af" response_time:0.003032669 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f729a41f41e6bfc0" x_b3_spanid:"f729a41f41e6bfc0" x_b3_parentspanid:"-" +£éðØêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßÛõÖêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.700+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"33e757c8-cc87-487d-6d7a-d24a2751a049" response_time:0.007556083 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cc849f1b7530216d" x_b3_spanid:"cc849f1b7530216d" x_b3_parentspanid:"-" +ÎÉõÖêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯­£ýêÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.786+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6cc5b65c-f2fc-4c19-4562-664c45fea4af" response_time:0.002059475 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eac8ffadee69155d" x_b3_spanid:"eac8ffadee69155d" x_b3_parentspanid:"-" +ì £ýêÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Á´ú—ëÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:48.842+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce884abc-a7de-480a-7e7b-59c4242c50a8" response_time:0.002110614 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e3a4ea8263447e4b" x_b3_spanid:"e3a4ea8263447e4b" x_b3_parentspanid:"-" +ªú—ëÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0óŠÿìÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:49.090+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"60e39c33-1b51-44e8-52ad-9260f629ee52" response_time:0.00176906 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6a1f77842eea464" x_b3_spanid:"c6a1f77842eea464" x_b3_parentspanid:"-" +ËÿþìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0÷ûª•íÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.373+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fc92328e-aabc-4d3f-6a49-0c34f9af52fa" response_time:0.001976239 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"73a7130b6639ce63" x_b3_spanid:"73a7130b6639ce63" x_b3_parentspanid:"-" +óª•íÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0äÒ¼ðíÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.564+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8cabe6b9-a249-466a-7186-a75bf113c7e1" response_time:0.002036105 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"24133ab7771f04d5" x_b3_spanid:"24133ab7771f04d5" x_b3_parentspanid:"-" +½Ë¼ðíÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0æäŠÂîÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.736+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a9d2004b-d298-4cc2-4932-393f60b94173" response_time:0.001533807 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7dd28216815a2c9a" x_b3_spanid:"7dd28216815a2c9a" x_b3_parentspanid:"-" +öÕŠÂîÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«ìûöïÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.113+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ba367730-f1b8-4184-466a-696b33645fc2" response_time:0.004333038 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"318c31e1d47c4f98" x_b3_spanid:"318c31e1d47c4f98" x_b3_parentspanid:"-" +½áûöïÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0àÓýñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.466+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4e852d82-d7a9-4b1f-66a9-8525a2e64cfd" response_time:0.001701514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"562224e2c682a7f6" x_b3_spanid:"562224e2c682a7f6" x_b3_parentspanid:"-" +ÅËýñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²Ï˜ÛñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.594+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05fd8b80-3503-4e90-48ee-e2025de9e1cf" response_time:0.001967621 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"12210a06e1c60748" x_b3_spanid:"12210a06e1c60748" x_b3_parentspanid:"-" +ý˜ÛñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ôßò’òÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.710+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8c7319a5-646e-47ca-4d41-03016ec208d2" response_time:0.002361799 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e4be84a325888093" x_b3_spanid:"e4be84a325888093" x_b3_parentspanid:"-" +«Öò’òÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0—íõ÷òÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.922+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"47922491-384d-4c6c-5336-803b28b4ba3d" response_time:0.002003016 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4643702f4abb4d0d" x_b3_spanid:"4643702f4abb4d0d" x_b3_parentspanid:"-" +³áõ÷òÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖܶÃôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.349+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1750cc5e-5cc0-4717-7450-d22f8cf649e6" response_time:0.002086066 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8fa871a9f7fe173" x_b3_spanid:"f8fa871a9f7fe173" x_b3_parentspanid:"-" +ØÎ¶ÃôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø­ŒêôÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.431+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6a790773-08d8-4eb9-7384-1d5ade61eebe" response_time:0.001389338 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1ca9da60b94d37ac" x_b3_spanid:"1ca9da60b94d37ac" x_b3_parentspanid:"-" +¥¢ŒêôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û‹Ž¼õÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.601+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0a97ebda-c335-463e-656b-2dabf8a475cf" response_time:0.002899254 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a517e0921820f628" x_b3_spanid:"a517e0921820f628" x_b3_parentspanid:"-" +ùþ¼õÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ð˜îÍöÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.908+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a93ff541-f0ed-4aa3-6e59-1d0e9ea274d5" response_time:0.001588003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b6de5bd3a8ffa7f7" x_b3_spanid:"b6de5bd3a8ffa7f7" x_b3_parentspanid:"-" +æîÍöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0à¥ãöÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.952+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6c792452-90e7-4add-5cbf-e7c49f001d51" response_time:0.002352929 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9655764f768a055e" x_b3_spanid:"9655764f768a055e" x_b3_parentspanid:"-" +Ñ©¢ãöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0«òóöÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.987+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"575a812f-3fd5-48e6-618d-7313a4ea8a47" response_time:0.00148194 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2a6cdbf5492ec50e" x_b3_spanid:"2a6cdbf5492ec50e" x_b3_parentspanid:"-" +ÁçóöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜Õãµ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.126+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"96236553-612d-461d-6816-0ffef3550585" response_time:0.001782798 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7eb21136d67a6906" x_b3_spanid:"7eb21136d67a6906" x_b3_parentspanid:"-" +ÞÇãµ÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÏÿÀÂ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.153+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5f8dfaa1-2269-4bea-4513-1a817953c23a" response_time:0.001370412 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a687cd7ce7414c7d" x_b3_spanid:"a687cd7ce7414c7d" x_b3_parentspanid:"-" +áòÀÂ÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›Ôæ÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.229+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f7541b08-3abe-416d-7c01-d2f7acab205e" response_time:0.001703157 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"583d4892f11825ed" x_b3_spanid:"583d4892f11825ed" x_b3_parentspanid:"-" +Ôæ÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‰øÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.301+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2a2a62fe-852f-47e8-75a9-ed1d9a99cce2" response_time:0.001568874 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f831508e308ae7bc" x_b3_spanid:"f831508e308ae7bc" x_b3_parentspanid:"-" +Ï”²‰øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß¼“¬øÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.374+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"35e9fa67-bfa6-4dbe-47b4-0ae2d015f5a0" response_time:0.001653009 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6304b124e61c7d3d" x_b3_spanid:"6304b124e61c7d3d" x_b3_parentspanid:"-" +ž±“¬øÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0çÚíØøÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.468+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"950decdf-a140-4d91-44a6-904c4d2b8852" response_time:0.001665955 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dadaaf3f8735a3ec" x_b3_spanid:"dadaaf3f8735a3ec" x_b3_parentspanid:"-" +£ÉíØøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†ŠÈÄùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.694+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"57b38a4a-281a-493b-4300-df202d98ea83" response_time:0.001583111 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"402ccf636737fa51" x_b3_spanid:"402ccf636737fa51" x_b3_parentspanid:"-" +¤ýÇÄùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÊšëßýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.825+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80447b1f-40d8-434b-659a-b0cea0527bc0" response_time:0.001747026 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00a02d800b76057a" x_b3_spanid:"00a02d800b76057a" x_b3_parentspanid:"-" +ÏëßýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÄÌþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.052+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"12415c8f-245c-4a53-42a9-7e53de74e3a6" response_time:0.002067363 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"48d8ce0fd0cb316c" x_b3_spanid:"48d8ce0fd0cb316c" x_b3_parentspanid:"-" +ß´ÌþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ѨžéþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.111+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b851a290-6b29-4d22-4f74-e79fbc177516" response_time:0.003315249 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"72fd2ff379d2e082" x_b3_spanid:"72fd2ff379d2e082" x_b3_parentspanid:"-" +롞éþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ö¤§ÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.195+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7bcec656-c708-45c5-4c61-6d4d0ce55e0a" response_time:0.001721835 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9bd07e2fae092804" x_b3_spanid:"9bd07e2fae092804" x_b3_parentspanid:"-" +Ä•§ÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0é­â½€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.558+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"411a90f2-d962-49c7-706c-222ad109db46" response_time:0.002303731 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"11455516fbeacb71" x_b3_spanid:"11455516fbeacb71" x_b3_parentspanid:"-" +ƒ£â½€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0݈–ÃÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.838+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"be093a42-51e2-402e-43c6-e8e52cf416d8" response_time:0.002174324 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"798cff7a0b7d0565" x_b3_spanid:"798cff7a0b7d0565" x_b3_parentspanid:"-" +Éù•ÃÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0©òÜʃڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.391+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"002796e7-27c1-48ef-755d-f465ac9b03e0" response_time:0.001856445 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"450cff466f9fb431" x_b3_spanid:"450cff466f9fb431" x_b3_parentspanid:"-" +ÈâÜʃڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0럎âƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.440+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0295f588-2edd-4272-6548-01e33abadee7" response_time:0.001923624 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"504c8e7c79d51720" x_b3_spanid:"504c8e7c79d51720" x_b3_parentspanid:"-" +âƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ü—ˆ­„ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.595+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e355777e-0a4a-4149-5ae7-5f86a3ddd5ac" response_time:0.003685166 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7fa74f56e242a625" x_b3_spanid:"7fa74f56e242a625" x_b3_parentspanid:"-" +ûˆˆ­„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒò²…ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.878+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62932c36-0d3e-48f4-5253-84407cc08f3c" response_time:0.001763178 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a274cac39a5b9789" x_b3_spanid:"a274cac39a5b9789" x_b3_parentspanid:"-" +‡òñ²…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­¶Ä…ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.915+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7dda558e-2285-4053-404e-2ebd40573fc1" response_time:0.001654068 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ae18e7d967fa58c1" x_b3_spanid:"ae18e7d967fa58c1" x_b3_parentspanid:"-" +ȃ¶Ä…ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥äû¨†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.125+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b52de658-55be-4672-7a13-a4aab5de0d41" response_time:0.002512606 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71b90052acd20077" x_b3_spanid:"71b90052acd20077" x_b3_parentspanid:"-" +ÂÚû¨†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0žè‘–‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.355+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b492a53-1d3e-470e-7e38-a08079a8ef58" response_time:0.001625671 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1d2cb6f550f137f9" x_b3_spanid:"1d2cb6f550f137f9" x_b3_parentspanid:"-" +§Û‘–‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·ˆ¤Î‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.472+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8674fe24-1186-4cac-5e3c-76fcad3716ec" response_time:0.001723276 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1c7851a300a7aad7" x_b3_spanid:"1c7851a300a7aad7" x_b3_parentspanid:"-" +êü£Î‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿™áΈڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.742+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e09acae4-0d52-4c70-6407-08cdb30d9210" response_time:0.002041868 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"54b005d73dc4473c" x_b3_spanid:"54b005d73dc4473c" x_b3_parentspanid:"-" +–ŒáΈڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒ¼ã´‰ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.956+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e2698c00-1ad7-4c75-7483-2ff204c0e90d" response_time:0.001609093 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"71e40667a4df2148" x_b3_spanid:"71e40667a4df2148" x_b3_parentspanid:"-" +³´ã´‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0½ÜÐÉڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.986+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dbb69772-d33e-4c44-72ba-175def6f60fd" response_time:0.002510297 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a2876374ae52dd0" x_b3_spanid:"1a2876374ae52dd0" x_b3_parentspanid:"-" +ÎÕÐÉڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÖÅýÙ‰ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.034+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7e0fd779-3ce1-49c0-608d-9d43756217ff" response_time:0.00153795 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"570507ec833b1980" x_b3_spanid:"570507ec833b1980" x_b3_parentspanid:"-" +Ú½ýÙ‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0È®¦ŠŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.135+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dff26dac-e309-4d0d-476e-027e18e85173" response_time:0.002003484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"186c691309aea3bc" x_b3_spanid:"186c691309aea3bc" x_b3_parentspanid:"-" +¦§¦ŠŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î¶Í‡‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.394+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8213e8ce-9370-4265-6db8-5eddd015efe0" response_time:0.005203433 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"219e1e2883390bf6" x_b3_spanid:"219e1e2883390bf6" x_b3_parentspanid:"-" +å¦Í‡‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0€á¼Â‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.521+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57634" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0058bfba-cb7f-4395-7032-c39cf017760a" response_time:0.001777704 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"935bcc9eaf9c264e" x_b3_spanid:"935bcc9eaf9c264e" x_b3_parentspanid:"-" +Íټ‹ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãɨì‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.609+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62facc44-c9f0-4df5-4ec7-e3b77c3adbef" response_time:0.001524582 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"28dc34dbe4d19b1e" x_b3_spanid:"28dc34dbe4d19b1e" x_b3_parentspanid:"-" +–¹¨ì‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬òÀ¾ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.781+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a415451-1c08-4286-55ae-2a7d795d791c" response_time:0.002264335 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"28ddeb461515f54f" x_b3_spanid:"28ddeb461515f54f" x_b3_parentspanid:"-" +´éÀ¾ŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öú ¥ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.997+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"62170a4a-d751-47a0-4075-bf4274a7a572" response_time:0.001525092 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"080442a444b92524" x_b3_spanid:"080442a444b92524" x_b3_parentspanid:"-" +¹ó ¥ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0꼤ºÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.041+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2e24d5e9-8d10-4225-68e3-911751a5df52" response_time:0.001742734 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5114138e47a56d1b" x_b3_spanid:"5114138e47a56d1b" x_b3_parentspanid:"-" +¸µ¤ºÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ì’áÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.123+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"348ef2f9-1a91-4ff7-4c08-39fdacf0c687" response_time:0.001337255 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"bb9f64f714584a23" x_b3_spanid:"bb9f64f714584a23" x_b3_parentspanid:"-" +éŠáÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ƒÓ¾óŽÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.427+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2d68e109-1ccf-43a2-512a-fd82b83613b0" response_time:0.004074286 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"14dd0d1099b6fa79" x_b3_spanid:"14dd0d1099b6fa79" x_b3_parentspanid:"-" +ížóŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚¶¼×ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.640+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f01c0a84-380d-41c3-73e1-c54f7fe37dec" response_time:0.001358039 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1e1b2ac546b6b6b4" x_b3_spanid:"1e1b2ac546b6b6b4" x_b3_parentspanid:"-" +ª¼×ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ðÖ öÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.972+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e1f36910-be47-4f4e-4d41-6dfa89e69b71" response_time:0.001488841 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"354812fcb10d3f05" x_b3_spanid:"354812fcb10d3f05" x_b3_parentspanid:"-" +ÈË öÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¦÷¬±‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.096+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"19e3299a-6a71-434f-6bfc-a0c78c663f83" response_time:0.001632422 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8ca6704f7d138856" x_b3_spanid:"8ca6704f7d138856" x_b3_parentspanid:"-" +ÿꬱ‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ˆ¢«å‘ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.203+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f6c97840-5f41-4917-5bab-1c512260dc76" response_time:0.003581291 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0ccec4b6aa0c8db8" x_b3_spanid:"0ccec4b6aa0c8db8" x_b3_parentspanid:"-" +·–«å‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ”ìÛ“ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.720+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b4738b37-266d-41ec-73a0-69cb81ccfcc2" response_time:0.003165632 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63ac062e11d20458" x_b3_spanid:"63ac062e11d20458" x_b3_parentspanid:"-" +Ò‚ìÛ“ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÄܘʔڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:59.952+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57610" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2c573a0a-10f8-4e12-52eb-788477620e6d" response_time:0.003488637 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69c2a45051682667" x_b3_spanid:"69c2a45051682667" x_b3_parentspanid:"-" +âҘʔڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0£ÏÇܪڜÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:05.898+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bc214b49-e7db-4aa9-7083-c1f57408692f" response_time:0.0016994 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"716e53191ec12668" x_b3_spanid:"716e53191ec12668" x_b3_parentspanid:"-" +ËÀÇܪڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚Dz›«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.029+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dbfc230e-7838-4bfc-6324-11871c9564de" response_time:0.001737191 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2ebbcb32fb8d4bb" x_b3_spanid:"e2ebbcb32fb8d4bb" x_b3_parentspanid:"-" +仲›«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ëœ®¾«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.102+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2debf27d-aae6-4de0-4aa8-524060410e3a" response_time:0.002290961 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e762eba4ac961209" x_b3_spanid:"e762eba4ac961209" x_b3_parentspanid:"-" +Е®¾«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶Éˆ×¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.423+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f2b0554d-4094-4f43-40dd-53a66e550415" response_time:0.001965094 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ed0dd89f8f9ddba" x_b3_spanid:"6ed0dd89f8f9ddba" x_b3_parentspanid:"-" +žÁˆ×¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ç¦ú§­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.593+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6ba0ff98-2672-4b98-626b-92f65b2b35b2" response_time:0.001702787 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5d91561aaa2f58f5" x_b3_spanid:"5d91561aaa2f58f5" x_b3_parentspanid:"-" +ïŸú§­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±â”µ­ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.620+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6037cda1-6239-45e1-63dd-9caa46a2a221" response_time:0.002007641 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b94303febc5933c7" x_b3_spanid:"b94303febc5933c7" x_b3_parentspanid:"-" +Û”µ­ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Úµ«Ë®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.932+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5a45fba3-ac49-4e84-7350-4522331f21f9" response_time:0.004521502 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d802fcdfcea4b730" x_b3_spanid:"d802fcdfcea4b730" x_b3_parentspanid:"-" +‹©«Ë®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†õ᥯ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.125+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59662" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9fc65c54-6681-4b80-6b02-4c8c6fcf3d0a" response_time:0.001929308 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"59ff63dfe2e16136" x_b3_spanid:"59ff63dfe2e16136" x_b3_parentspanid:"-" +·æá¥¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·µîó¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.289+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80c7c958-1670-464b-7598-85d924880617" response_time:0.001823462 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"09ca47dddd827336" x_b3_spanid:"09ca47dddd827336" x_b3_parentspanid:"-" +ˆ­îó¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß®°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.346+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a3ebecbb-7b08-43d0-6e52-26e0f6d20662" response_time:0.001289506 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"772b5b487a2e19dc" x_b3_spanid:"772b5b487a2e19dc" x_b3_parentspanid:"-" +þ¡°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0”ßã³°ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.423+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59668" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7c5a3f56-2ff8-4e72-5ae9-46987a08a5d4" response_time:0.00159752 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"24295eb0b77c0968" x_b3_spanid:"24295eb0b77c0968" x_b3_parentspanid:"-" +‡Öã³°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¯ƒÄƱڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.730+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"213fc7e4-ff9c-4c8c-61e0-69566d455d85" response_time:0.001945378 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c39a5cf1b0ad49a1" x_b3_spanid:"c39a5cf1b0ad49a1" x_b3_parentspanid:"-" +–úÃÆ±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0š‘ó±ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.824+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f884aa45-3077-4fb0-6abf-46adea3ddf90" response_time:0.001602054 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"32df437297551f01" x_b3_spanid:"32df437297551f01" x_b3_parentspanid:"-" +ü÷ó±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µ¬ó­²ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.948+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:58034" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ce1ba603-fe73-461e-71dd-07d92a2eeb18" response_time:0.001296975 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"688e02ca1cd20a74" x_b3_spanid:"688e02ca1cd20a74" x_b3_parentspanid:"-" +¥ó­²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Û…šã–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.542+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:59540" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ebbf0cb2-4746-4e65-63fd-592a5ad083b2" response_time:0.002421591 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e500b0cb0afc3541" x_b3_spanid:"e500b0cb0afc3541" x_b3_parentspanid:"-" +ôü™ã–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­Á•ö–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.583+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a8f7d7a7-8a2c-4457-6adb-0c2c96d860aa" response_time:0.001605843 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4c33de0ad581eb28" x_b3_spanid:"4c33de0ad581eb28" x_b3_parentspanid:"-" +ô·•ö–ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âØ½—ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.732+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"80fc654c-4952-4b2f-540c-a95d87514fb2" response_time:0.001602448 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b480860161737f2d" x_b3_spanid:"b480860161737f2d" x_b3_parentspanid:"-" +̽—ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ßéòò›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.917+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:57618" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"844f2d5c-eccb-49e4-7cf4-93c55193547d" response_time:0.002501257 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e89782329ac86bb4" x_b3_spanid:"e89782329ac86bb4" x_b3_parentspanid:"-" +Úáòò›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z1z$1a12142f-8658-4ad0-9b73-4361bee74f71‚ +10.10.17.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åæÍöðÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f560c6ad-e458-4728-5b23-2e0382f38214" response_time:0.002962848 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f0a63aae2868649" x_b3_spanid:"2f0a63aae2868649" x_b3_parentspanid:"-" +¿ÜÍöðÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ø¢£»ñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.526+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"11300dea-9f4b-45d0-5508-869cf7bd40a6" response_time:0.002662575 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"763a19363de72ac5" x_b3_spanid:"763a19363de72ac5" x_b3_parentspanid:"-" +À•£»ñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•êæÀñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.537+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6a91ca2e-ec94-4ca6-6714-79564b0541b7" response_time:0.002962753 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b02fcfa0e04e09c1" x_b3_spanid:"b02fcfa0e04e09c1" x_b3_parentspanid:"-" +ñØæÀñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù‘ÞçñÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.619+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b966e13b-cf6d-418a-5cf9-3a51fb7c383c" response_time:0.003099111 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"312f32a845ed5eb5" x_b3_spanid:"312f32a845ed5eb5" x_b3_parentspanid:"-" +ÔŠÞçñÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­„”òÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.704+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4728b4eb-7feb-4c82-40b3-4d3bc57e4800" response_time:0.002796437 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3c4beeec03e9747a" x_b3_spanid:"3c4beeec03e9747a" x_b3_parentspanid:"-" +ö“òÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ãÉéÖòÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:50.852+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"eeee19e9-d8f2-45bc-72b1-597c2cf31c6d" response_time:0.003040046 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"904a589628ef1873" x_b3_spanid:"904a589628ef1873" x_b3_parentspanid:"-" +ŽéÖòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0áÖ®øòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.922+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dc1bb3f5-e390-4ec2-7560-13c581afdff2" response_time:0.003723485 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1a3b8bc28cfc68c1" x_b3_spanid:"1a3b8bc28cfc68c1" x_b3_parentspanid:"-" +ÃÏ®øòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0åÀóÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.963+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"89b63312-10a6-44c4-69eb-9d9237737f4a" response_time:0.006517985 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"17ba397c7af54e8b" x_b3_spanid:"17ba397c7af54e8b" x_b3_parentspanid:"-" +²ú¿óÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥ÕŽÉóÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.092+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"1e31a0bc-b355-4922-51b4-d7608de6cf95" response_time:0.002713231 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c5329e5b13bc2c50" x_b3_spanid:"c5329e5b13bc2c50" x_b3_parentspanid:"-" +­ÍŽÉóÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0’ÙþÃóÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.081+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4ae7525d-8cf8-46a2-66e6-f03cf92e6ee4" response_time:0.002719241 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"626156ccffe7e237" x_b3_spanid:"626156ccffe7e237" x_b3_parentspanid:"-" +ôÑþÃóÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Úø––ôÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:51.247+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a19dd28b-86bc-4ea0-5819-4b6581fed84d" response_time:0.00882302 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f8f177128ec1daef" x_b3_spanid:"f8f177128ec1daef" x_b3_parentspanid:"-" +ëê––ôÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íÀ‚öÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.749+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"658d1417-bc83-4573-4128-3d9c55f94bd2" response_time:0.002963312 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a0a57e0ae8f4490f" x_b3_spanid:"a0a57e0ae8f4490f" x_b3_parentspanid:"-" +ƒÀ‚öÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0õ¢êÂöÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:51.884+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"014ec1cb-30e1-4271-5848-b7dbb41f6a08" response_time:0.002238087 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"5a34428da26870c9" x_b3_spanid:"5a34428da26870c9" x_b3_parentspanid:"-" +Õ–êÂöÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ë•Õ‘÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:42470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8da90b29-80c1-422b-6db6-1a6afe8bb583" response_time:0.002305826 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7b23e3b5d148d75a" x_b3_spanid:"7b23e3b5d148d75a" x_b3_parentspanid:"-" +îŽÕ‘÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0›¯¸Ô÷ÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.190+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"774bbb5b-75f3-4653-4b06-eb219add39f7" response_time:0.00228419 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ec668821f86f8cc3" x_b3_spanid:"ec668821f86f8cc3" x_b3_parentspanid:"-" +’¨¸Ô÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÿõ›ë÷ÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.237+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6b7667f-2325-49fe-55d9-d1f7096857ab" response_time:0.003182473 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"00f18536703380ed" x_b3_spanid:"00f18536703380ed" x_b3_parentspanid:"-" +Ýê›ë÷ÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŽòÃøÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:52.281+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b80cf005-94d1-41d5-53da-74094f8b53c8" response_time:0.00616804 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8de29bc4415301b7" x_b3_spanid:"8de29bc4415301b7" x_b3_parentspanid:"-" +àêÃøÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0öî‚ùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.556+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d20a92d9-0899-4d6c-7c5b-fd942e69b140" response_time:0.002300592 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4406797253803841" x_b3_spanid:"4406797253803841" x_b3_parentspanid:"-" +ëî‚ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0嬋ùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.573+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0f66b004-5d37-4357-6145-bdef5bf60cd7" response_time:0.002351517 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8cff9ba769d74fd2" x_b3_spanid:"8cff9ba769d74fd2" x_b3_parentspanid:"-" +Û£‹ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ü€¨©ùÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:52.635+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:63151" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"59caf338-36ba-4f4a-5c7e-11267860c479" response_time:0.003429176 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b182dde629358d36" x_b3_spanid:"b182dde629358d36" x_b3_parentspanid:"-" +¢ô§©ùÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0„ôúÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.060+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"87e4a140-910a-4253-45ad-0a0d4c63aeb2" response_time:0.004053641 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3484fc94361a5d6a" x_b3_spanid:"3484fc94361a5d6a" x_b3_parentspanid:"-" +ñ…„ôúÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ºùÚúûÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.338+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b78c09d5-5f13-434f-481e-493638eb4625" response_time:0.007787514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6e3fea70e2657ac8" x_b3_spanid:"6e3fea70e2657ac8" x_b3_parentspanid:"-" +üïÚúûÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Çñö¡üÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.426+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:17786" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7264dea9-c7f5-493c-52b8-5b23995e8179" response_time:0.002411833 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d1fc8d99e4f217dd" x_b3_spanid:"d1fc8d99e4f217dd" x_b3_parentspanid:"-" +’êö¡üÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0…û¬ØüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.539+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6d9c3166-6fbd-438d-4fa2-40cb26ce24b7" response_time:0.003107392 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f9b2cbc757f72def" x_b3_spanid:"f9b2cbc757f72def" x_b3_parentspanid:"-" +Ûñ¬ØüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ò‚ŸìüÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.582+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7b4fff9a-11d3-4b23-5436-952f310b8329" response_time:0.002556677 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3001e0a98891342a" x_b3_spanid:"3001e0a98891342a" x_b3_parentspanid:"-" +æôžìüÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¨²ê®ýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.719+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d0cac462-446d-49f2-67b8-356f89355621" response_time:0.004955037 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b8eae43dc5fc7fb9" x_b3_spanid:"b8eae43dc5fc7fb9" x_b3_parentspanid:"-" +îšê®ýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ñ§œäýÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:53.834+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0027ef9c-5ac2-49da-6969-909dde907f48" response_time:0.002267974 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"748a64ea4c5ba849" x_b3_spanid:"748a64ea4c5ba849" x_b3_parentspanid:"-" +œäýÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬©çÛþÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.083+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c61317ef-0b42-45f1-4f75-2a25a0adc70f" response_time:0.003761631 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ed2f0c923c6ccd5c" x_b3_spanid:"ed2f0c923c6ccd5c" x_b3_parentspanid:"-" +Ç çÛþÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ùî³ÏÿÙœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.320+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3ade797-b7ca-43ae-404f-f1d69e1f3243" response_time:0.009149542 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"fc44f707db029aef" x_b3_spanid:"fc44f707db029aef" x_b3_parentspanid:"-" +ãå³ÏÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ÿ²ÝøÿÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.413+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05da7cec-62e7-442e-528d-4814c667ec0b" response_time:0.002782498 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3e1f29d520bd48ac" x_b3_spanid:"3e1f29d520bd48ac" x_b3_parentspanid:"-" +ç¤ÝøÿÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0§¢€¬€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.516+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8656839f-86a6-48b3-4db9-e570339de91f" response_time:0.007316904 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f743cb5355b4e170" x_b3_spanid:"f743cb5355b4e170" x_b3_parentspanid:"-" +í–€¬€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0³†æþ€ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.694+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8d1d7e2c-5ba4-467b-67ca-04b2053f836c" response_time:0.002641209 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"a8075560a71cad46" x_b3_spanid:"a8075560a71cad46" x_b3_parentspanid:"-" +†úåþ€ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0éÕâäÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:47.116+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8969cf99-ae01-4112-6703-3f56d3713af8" response_time:0.003874659 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c2fd883b60224790" x_b3_spanid:"c2fd883b60224790" x_b3_parentspanid:"-" +œÉâäÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò÷Ë¢ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:54.769+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"649e3ae9-47aa-40e8-6d6e-d92cea4a4dc0" response_time:0.002517877 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"469ffe21933022c5" x_b3_spanid:"469ffe21933022c5" x_b3_parentspanid:"-" +·æË¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŸáËÈÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:54.849+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"277a7a57-f2d4-4954-72f0-0fdf08d1a4ab" response_time:0.002318719 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8cb5091fbcf58000" x_b3_spanid:"8cb5091fbcf58000" x_b3_parentspanid:"-" +²ÙËÈÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý¸ÿô‚ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.210+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"185c04e0-d086-4364-6fec-650da14d346d" response_time:0.00344962 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4d56629e47ddc384" x_b3_spanid:"4d56629e47ddc384" x_b3_parentspanid:"-" +¹±ÿô‚ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0íÏÒʃڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.390+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8a138746-45ba-49b1-79d7-eca8aa19311a" response_time:0.002720471 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0150bd90e0501640" x_b3_spanid:"0150bd90e0501640" x_b3_parentspanid:"-" +¥ÁÒʃڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ûà‰ØƒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.418+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bde40442-4980-47ed-4362-16eba94e4bd3" response_time:0.002642242 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"94337ddbc061f518" x_b3_spanid:"94337ddbc061f518" x_b3_parentspanid:"-" +¾×‰ØƒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ß®§‰„ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:55.521+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ea001dd8-dd19-47a3-5394-21a05d45dcfc" response_time:0.003050715 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"43aeb8172a47740a" x_b3_spanid:"43aeb8172a47740a" x_b3_parentspanid:"-" +¼§§‰„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ò–¿×ìÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:49.242+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"34426264-dcc9-48fe-50c7-8a603db6fcb4" response_time:0.003651714 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9c8298a3a85077fb" x_b3_spanid:"9c8298a3a85077fb" x_b3_parentspanid:"-" +¾Ž¿×ìÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–ØžòÙœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:50.735+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0854f350-8d7e-4e07-53f5-a9fd24206c7f" response_time:0.002603178 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"4f0eed3877f67f78" x_b3_spanid:"4f0eed3877f67f78" x_b3_parentspanid:"-" +¿ŽØžòÙœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0•òƒþ„ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:55.767+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e6437328-c371-446f-44df-84d959bc2851" response_time:0.002258765 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f62415677966deac" x_b3_spanid:"f62415677966deac" x_b3_parentspanid:"-" +­êƒþ„ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀÚ쑆ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.076+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9b896fa0-8c40-4304-58d0-a727b6418189" response_time:0.002638321 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"abab189037422d2a" x_b3_spanid:"abab189037422d2a" x_b3_parentspanid:"-" +—Ë쑆ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0±¬»ï†ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.273+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"6997f78d-7af4-4c0b-7e79-35d71b2c31df" response_time:0.002621022 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cfb20dff7209180d" x_b3_spanid:"cfb20dff7209180d" x_b3_parentspanid:"-" +¬¥»ï†ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0΂ÄćڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.448+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a949f5de-ae9e-4d86-629d-b67b8037edb2" response_time:0.005239351 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e2d13fef90b1f712" x_b3_spanid:"e2d13fef90b1f712" x_b3_parentspanid:"-" +°øÃćڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ìß‘¡ˆÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.645+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3a2bfca6-6611-42d8-4a08-8fa4f72f4dd6" response_time:0.003124203 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6d05d6dd3e8752da" x_b3_spanid:"6d05d6dd3e8752da" x_b3_parentspanid:"-" +¬Ë‘¡ˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ū鱈ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.680+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7ae25295-0c44-468e-59d0-a8048f54fb73" response_time:0.002681064 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d4916ce51db963a8" x_b3_spanid:"d4916ce51db963a8" x_b3_parentspanid:"-" +ÿ¢é±ˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¾®²ÚˆÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.765+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ca98c1a8-628d-4afa-79e1-4cf7e746f0be" response_time:0.002600008 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"da87f48f4682da52" x_b3_spanid:"da87f48f4682da52" x_b3_parentspanid:"-" +Ц²ÚˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ù‹¯öˆÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.821+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ee54c774-bd90-47cb-6dbb-2dd7a44ecb0c" response_time:0.005159588 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"03f4a8f1c32db1f2" x_b3_spanid:"03f4a8f1c32db1f2" x_b3_parentspanid:"-" +Åþ®öˆÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ã諸‰ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:56.967+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"05852057-ec07-455e-746c-aff34b63adf8" response_time:0.002256986 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8801e1245ec0ba62" x_b3_spanid:"8801e1245ec0ba62" x_b3_parentspanid:"-" +Ü㪺‰ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ý‡äŠÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.323+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"e3d046ce-2acd-41fc-7c08-c351c44dabed" response_time:0.002505635 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"499cf7c2e97906e9" x_b3_spanid:"499cf7c2e97906e9" x_b3_parentspanid:"-" +’ó‡äŠÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÂŽ–ȋڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.533+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:5344" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3f146428-e066-497d-7b94-3ad4db1dc50c" response_time:0.002388202 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"dc242d351dcadda8" x_b3_spanid:"dc242d351dcadda8" x_b3_parentspanid:"-" +“ƒ–ȋڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0–÷èô‹ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.626+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b43097ff-f21f-4643-419f-a6cf9007f022" response_time:0.002342629 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"05d949a81b511729" x_b3_spanid:"05d949a81b511729" x_b3_parentspanid:"-" +¬ðèô‹ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0†ç—„ŒÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:57.658+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"71806399-8b62-4f7b-5671-143d188bc658" response_time:0.002696393 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3ea434ef4f90910e" x_b3_spanid:"3ea434ef4f90910e" x_b3_parentspanid:"-" +žÛ—„ŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤ÌàõŒÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:57.896+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c931bb45-ca11-4c06-7c37-18860cffe1f6" response_time:0.00270853 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"39e7738c72df752f" x_b3_spanid:"39e7738c72df752f" x_b3_parentspanid:"-" +†ÃàõŒÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ó®›ÔÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.095+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"4cf8e885-4088-4afc-444e-849022b44c1e" response_time:0.002441991 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2f328d3e0cdc83fc" x_b3_spanid:"2f328d3e0cdc83fc" x_b3_parentspanid:"-" +Р›ÔÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‚ߘàŽÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:58.388+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5d003fe0-2006-435b-4693-95a7067cf709" response_time:0.002635003 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e6282b76e0c834a5" x_b3_spanid:"e6282b76e0c834a5" x_b3_parentspanid:"-" +¦Ó˜àŽÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¶ß÷õÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:58.702+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c314dd69-c9da-4c26-413b-975fa314d396" response_time:0.002579595 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"60efcee1f32fdadd" x_b3_spanid:"60efcee1f32fdadd" x_b3_parentspanid:"-" +ôæöõÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­œ¡­‘ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.086+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:3432" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"15905034-c5cc-43af-7b38-00dbb9daa217" response_time:0.002906274 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b7b281ecb85c032c" x_b3_spanid:"b7b281ecb85c032c" x_b3_parentspanid:"-" +†‘¡­‘ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0œòªÕ‡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:16:56.486+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"bdeb4ac0-be17-443c-6c7f-eabea0b0c671" response_time:0.002989647 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"862c91e31884b326" x_b3_spanid:"862c91e31884b326" x_b3_parentspanid:"-" +ûäªÕ‡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÉŸ¿“’ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.300+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0b7fdb2a-375d-4f27-4093-37f37449f2a8" response_time:0.003450462 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88396bbcf9bf11f5" x_b3_spanid:"88396bbcf9bf11f5" x_b3_parentspanid:"-" +ÒŠ¿“’ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ðüè”ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.017+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"143e5b6a-0af0-4c23-6b7f-8b1a8c070cd0" response_time:0.002844814 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69889e8ee65c9c87" x_b3_spanid:"69889e8ee65c9c87" x_b3_parentspanid:"-" +¯ôûè”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0òœ²ß•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.265+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d6cc5576-43ac-4e76-6107-d8c898ac63db" response_time:0.003345108 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"d6095e9899964a4e" x_b3_spanid:"d6095e9899964a4e" x_b3_parentspanid:"-" +Õ‘²ß•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ì˜×¥•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.143+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"38d3ca10-7b32-4e5a-7564-317622094d20" response_time:0.003627347 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"77984470feabd362" x_b3_spanid:"77984470feabd362" x_b3_parentspanid:"-" +ƌץ•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ú¶æô•ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.310+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7f0c183d-bb8c-4ebc-51c9-058dbbdc5255" response_time:0.002595273 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ebc7b6fc78887634" x_b3_spanid:"ebc7b6fc78887634" x_b3_parentspanid:"-" +›¤æô•ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÆîŠ–ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:00.361+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"82cf49ed-6925-4b0e-6c3f-a2a19acc2241" response_time:0.002654928 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"88b4481498efcd79" x_b3_spanid:"88b4481498efcd79" x_b3_parentspanid:"-" +ÑኖڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ņ÷’”ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:16:59.831+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:4574" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8861b088-28bf-4430-5877-ec9037c1c11e" response_time:0.008402688 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"22bf7d3e8091c091" x_b3_spanid:"22bf7d3e8091c091" x_b3_parentspanid:"-" +äøö’”ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR25j cf-cfapps-io2r router_z2z$7cf11aab-257d-4f39-8745-427f82c17f0f‚ +10.10.81.7 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ʀ—×¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.733+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"3d65efb2-1e29-4e92-5971-1fd0326fadbc" response_time:0.007385303 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"18a61ac246a77d9a" x_b3_spanid:"18a61ac246a77d9a" x_b3_parentspanid:"-" +ÖŸ—×¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0²™¥•£ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.868+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9d9ef35a-12be-4f11-5fd6-c36b64995f4e" response_time:0.002907904 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"72d8638cd896f943" x_b3_spanid:"72d8638cd896f943" x_b3_parentspanid:"-" +𒥕£ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0·€×ç¨ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:05.382+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"dad7db98-606d-4740-7195-d6c48c8aaa7f" response_time:0.00337627 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2c004fe8f6681f23" x_b3_spanid:"2c004fe8f6681f23" x_b3_parentspanid:"-" +ËòÖç¨ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0蒅ƩڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.581+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"85fe94a6-3e18-4365-67e7-13fa0eb5cba8" response_time:0.002562663 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"83135add83ed0af3" x_b3_spanid:"83135add83ed0af3" x_b3_parentspanid:"-" +²„…ƩڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿ŸªÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.768+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b59ec865-3dd6-4706-5cc5-3becbe9065b4" response_time:0.002275514 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"eb27846bdceca4c2" x_b3_spanid:"eb27846bdceca4c2" x_b3_parentspanid:"-" +õŸªÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0µõÖ›«ÚœÖB™ +Üben-java-main-application.cfapps.io - [2017-03-16T19:17:06.029+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"ca98a499-56f2-45ef-72a2-a50ffc22fa0c" response_time:0.0023232 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8bfb8c98f780fa6a" x_b3_spanid:"8bfb8c98f780fa6a" x_b3_parentspanid:"-" +ÝéÖ›«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¤š×¥«ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.050+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"66819d07-dd74-4452-6100-ebccbb406a07" response_time:0.002550674 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b3b537203d40548" x_b3_spanid:"3b3b537203d40548" x_b3_parentspanid:"-" +ß’×¥«ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0˜±‘–¬ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.286+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"8e7b70f8-5b6a-474b-6e46-a4b0ff8b233a" response_time:0.002441563 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"9e3d47092811ab24" x_b3_spanid:"9e3d47092811ab24" x_b3_parentspanid:"-" +µ¢‘–¬ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Þþ­®®ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:06.873+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"7c18e685-253b-4672-5707-4dd93585edfb" response_time:0.002723983 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"cf3f3dc8b697ec2f" x_b3_spanid:"cf3f3dc8b697ec2f" x_b3_parentspanid:"-" +ò­®®ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÐíË©¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.132+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5b1ef352-c708-47fd-4a3f-019e526d1af8" response_time:0.002321708 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8aa640b19b057420" x_b3_spanid:"8aa640b19b057420" x_b3_parentspanid:"-" +­åË©¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¬¿ÍÚ¯ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.235+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"84791231-9efe-41b5-58c2-440dbe86d6d6" response_time:0.002258824 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c6cce8fa05019c7e" x_b3_spanid:"c6cce8fa05019c7e" x_b3_parentspanid:"-" +®·ÍÚ¯ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸ä‹†°ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:07.326+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c792996c-2083-498c-664a-fba33cc8b6a0" response_time:0.002505377 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"0b9164f8325af788" x_b3_spanid:"0b9164f8325af788" x_b3_parentspanid:"-" +ÂØ‹†°ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Š¿ó¤±ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.658+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:52972" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"0c8ce743-513f-4db1-43d0-89d6b336a1b9" response_time:0.00322607 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"2ac82206c9ea8271" x_b3_spanid:"2ac82206c9ea8271" x_b3_parentspanid:"-" +½²ó¤±ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0­ŸÐ¦²ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:07.931+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"800e6636-eafd-45f0-5925-a0007aac642f" response_time:0.00224661 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6ad13e4a0178fc2a" x_b3_spanid:"6ad13e4a0178fc2a" x_b3_parentspanid:"-" +”Ц²ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0⩯٘ڜÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.058+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"50912df5-3f61-4a10-70b4-7efa1e22d970" response_time:0.00245077 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"63c518ce1714331c" x_b3_spanid:"63c518ce1714331c" x_b3_parentspanid:"-" +“¡¯Ù˜ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÅÖ™ڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.278+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45614" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"918f0b00-0637-4d87-5dd9-71ef8c461f43" response_time:0.003859903 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b78990f88677d78c" x_b3_spanid:"b78990f88677d78c" x_b3_parentspanid:"-" +‚Ö™ڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0âö†©šÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.494+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb1bf250-60fa-47fd-60d7-1209bf8db40e" response_time:0.002580029 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"61b0e015d3c679d0" x_b3_spanid:"61b0e015d3c679d0" x_b3_parentspanid:"-" +ó솩šÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÓõàšÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:01.607+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5f0a25f-dbc1-4335-4ab5-83af6ebac2b2" response_time:0.00621585 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"69567d8fbaa8392c" x_b3_spanid:"69567d8fbaa8392c" x_b3_parentspanid:"-" +êÇõàšÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0왈›ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:01.691+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:22858" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"125f6e00-d46e-40e4-697e-0ed49cf0683b" response_time:0.004835444 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"1b616008b2e143fa" x_b3_spanid:"1b616008b2e143fa" x_b3_parentspanid:"-" +Ö’ˆ›ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0‡³íèœÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.164+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"a0927eff-2e7f-4793-710f-8104f2fc27fc" response_time:0.002527407 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"ead7bd8f5d90d082" x_b3_spanid:"ead7bd8f5d90d082" x_b3_parentspanid:"-" +¬¦íèœÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0î³Þ¨ÚœÖBš +Ýben-java-main-application.cfapps.io - [2017-03-16T19:17:02.298+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"d90d3c61-abd7-4805-5b56-3a60562aecd3" response_time:0.00265753 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"6b611adccf8ca00e" x_b3_spanid:"6b611adccf8ca00e" x_b3_parentspanid:"-" +ɬިڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Õô¡ÚÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.402+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"fb4772ca-6127-41a1-463a-2ed6f17caa72" response_time:0.002405054 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b4d9e7801c94f865" x_b3_spanid:"b4d9e7801c94f865" x_b3_parentspanid:"-" +‹í¡ÚÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¿öœüÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.473+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55640" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"9414c65d-be3d-4c80-73d2-b19aeeb0ffb2" response_time:0.003415711 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"f58656a5cc737010" x_b3_spanid:"f58656a5cc737010" x_b3_parentspanid:"-" +‹èœüÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ÀªÏžÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.514+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"007b399f-fd8e-4557-4b2f-ed9cca8cd609" response_time:0.002641672 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"b792d56ec8bdd76e" x_b3_spanid:"b792d56ec8bdd76e" x_b3_parentspanid:"-" +ÿœÏžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸ÿý©žÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.568+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"105c64d1-00b9-4faf-524b-d4cbb5b35754" response_time:0.003536966 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"7528356a89a413f9" x_b3_spanid:"7528356a89a413f9" x_b3_parentspanid:"-" +Ñõý©žÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ö³‰ÔžÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.657+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:54868" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"f36d5758-7607-4918-72e3-f6040a1b6ffa" response_time:0.002962484 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"e44b8df37766d373" x_b3_spanid:"e44b8df37766d373" x_b3_parentspanid:"-" +¶¬‰ÔžÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ŒÃêŸÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:02.973+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:46898" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"132d369e-38bb-49b0-58eb-6403191dbff7" response_time:0.002581667 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"c0bf6c4c9dd79196" x_b3_spanid:"c0bf6c4c9dd79196" x_b3_parentspanid:"-" +߇ÃêŸÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¥‘β¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.387+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"2b17cc64-3ba1-4ad1-51f0-cea7cebbec6f" response_time:0.007957704 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8977a0b793133651" x_b3_spanid:"8977a0b793133651" x_b3_parentspanid:"-" +¶ˆÎ²¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ž¥œÔ¡ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.462+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:55658" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"c70658ad-729a-490b-47fb-64fecff101a3" response_time:0.004202847 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"3b2e0ebc62034d0a" x_b3_spanid:"3b2e0ebc62034d0a" x_b3_parentspanid:"-" +ÈšœÔ¡ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0Ϩ¿¢ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:03.580+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:19062" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"70eeb059-23e1-4524-71d4-76bfab3f907f" response_time:0.006097512 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"8b05b5279b619281" x_b3_spanid:"8b05b5279b619281" x_b3_parentspanid:"-" +æ¿¢ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0¸÷ᆤڜÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.106+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:20486" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"b5ce7806-c9fe-49fb-5a17-168c2c7f027c" response_time:0.002969253 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"024d02f3f54db1b0" x_b3_spanid:"024d02f3f54db1b0" x_b3_parentspanid:"-" +éᆤڜÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR21j cf-cfapps-io2r router_z2z$03d941fa-bf61-4274-b0c7-b865ac45aa44‚ +10.10.81.4 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0ž¯ª—¤ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:04.141+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:45470" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"158bd2b4-0d45-4e4b-588d-9d2c8fe17fb0" response_time:0.002381962 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"457553a914a3babd" x_b3_spanid:"457553a914a3babd" x_b3_parentspanid:"-" +¢ª—¤ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR23j cf-cfapps-io2r router_z2z$f02f8e15-2835-413e-8042-ac7bae1b7656‚ +10.10.81.9 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2 + + +gorouter0èùò§ÚœÖB› +Þben-java-main-application.cfapps.io - [2017-03-16T19:17:05.137+0000] "GET / HTTP/1.1" 200 0 2 "-" "Mozilla/5.0 (apple-x86_64-darwin16.0.0) Siege/4.0.2" "10.10.2.141:53270" "10.10.147.23:61073" x_forwarded_for:"209.234.137.222" x_forwarded_proto:"http" vcap_request_id:"5837fcf3-f362-4ff8-4cb6-8d666da5db02" response_time:0.002420736 app_id:"6ff0a336-5527-401d-817f-2a900b7ffd79" app_index:"0" x_b3_traceid:"560c0f5161d3aa19" x_b3_spanid:"560c0f5161d3aa19" x_b3_parentspanid:"-" +îò§ÚœÖ"$6ff0a336-5527-401d-817f-2a900b7ffd79*RTR22j cf-cfapps-io2r router_z2z$222b81c7-d293-4648-b804-a748c74782fc‚ +10.10.81.6 +--74684f6bed3ee99aa98a13c609c354cd849b01a6e6051226906140ad31b2-- diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_recentlogs_response.bin b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_recentlogs_response.bin new file mode 100644 index 00000000000..89ef070580f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/doppler/apps/GET_{id}_recentlogs_response.bin @@ -0,0 +1,11 @@ +--92d42123ec83c0af6a27ba0de34528b702a53e2e67ba99636286b6a4cafb + + +rep0¹ò¡ŸÑ˜à£BÛ +ž2016-04-21 22:36:28.035 INFO 24 --- [ main] o.s.j.e.a.AnnotationMBeanExporter : Located managed bean 'rabbitConnectionFactory': registering with JMX server as MBean [org.springframework.amqp.rabbit.connection:name=rabbitConnectionFactory,type=CachingConnectionFactory]“⡟јà£"$1a95eadc-95c6-4675-aa07-8c02f80ea8a4*APP20jcf-cfapps-io2-diegorcell_z2z33‚ 10.10.115.68 +--92d42123ec83c0af6a27ba0de34528b702a53e2e67ba99636286b6a4cafb + + +rep0Šó°ãÓ˜à£BU +Container became healthy¤ã°ãÓ˜à£"$1a95eadc-95c6-4675-aa07-8c02f80ea8a4*CELL20jcf-cfapps-io2-diegorcell_z2z33‚ 10.10.115.68 +--92d42123ec83c0af6a27ba0de34528b702a53e2e67ba99636286b6a4cafb-- diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/invalid_error_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/invalid_error_response.json new file mode 100644 index 00000000000..58d4645e78a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/invalid_error_response.json @@ -0,0 +1 @@ +Invalid Error Response \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_info_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_info_response.json new file mode 100644 index 00000000000..db4fde79895 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_info_response.json @@ -0,0 +1,4 @@ +{ + "version" : "2.6.1", + "vm_uptime" : "7166438" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_meta_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_meta_response.json new file mode 100644 index 00000000000..a0edcebb35c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_meta_response.json @@ -0,0 +1,16 @@ +{ + "meta": { + "traffic_controller": { + "count": "5490", + "expired": "1069110", + "newestTimestamp": "1588631926299067790", + "oldestTimestamp": "1588595386296937544" + }, + "uaa": { + "count": "100000", + "expired": "79066604", + "newestTimestamp": "1588631951858159538", + "oldestTimestamp": "1588623478864261934" + } + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_{id}_read_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_{id}_read_response.json new file mode 100644 index 00000000000..d8f859c90ea --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/logcache.v1/GET_{id}_read_response.json @@ -0,0 +1,87 @@ +{ + "envelopes" : { + "batch" : [ + { + "deprecated_tags" : {}, + "gauge" : { + "metrics" : { + "cpu" : { + "unit" : "percentage", + "value" : 0.394234612100979 + }, + "disk" : { + "unit" : "bytes", + "value" : 433881088 + }, + "disk_quota" : { + "unit" : "bytes", + "value" : 2122546345 + }, + "memory" : { + "unit" : "bytes", + "value" : 822926477 + }, + "memory_quota" : { + "unit" : "bytes", + "value" : 2147483648 + } + } + }, + "instance_id" : "0", + "source_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "tags" : { + "app_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "app_name" : "test", + "deployment" : "cf-6a000373a858bcb78f1c", + "index" : "f237deb0-471f-459a-a18b-de084a8113e7", + "instance_id" : "0", + "ip" : "10.194.34.36", + "job" : "diego_cell", + "organization_id" : "825ec316-5590-416a-9247-1dd0a5750801", + "organization_name" : "system", + "origin" : "rep", + "process_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "process_instance_id" : "9173f9d0-02b7-4f39-4738-f53b", + "process_type" : "web", + "product" : "Pivotal Application Service", + "source_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "space_id" : "547d902c-0554-4e7c-b886-3926a2e73bdf", + "space_name" : "test", + "system_domain" : "cf.red.springapps.io" + }, + "timestamp" : "1588592413697846700" + }, + { + "deprecated_tags" : {}, + "instance_id" : "0", + "log" : { + "payload" : "MjAyMC0wNS0wNCAxODozNjo0NC42ODYgIElORk8gMTMgLS0tIFstaW5zdGFuY2Uua2V5LTBdIG8uYy5zLkZpbGVXYXRjaGluZ1g1MDlFeHRlbmRlZEtleU1hbmFnZXIgOiBVcGRhdGVkIEtleU1hbmFnZXIgZm9yIC9ldGMvY2YtaW5zdGFuY2UtY3JlZGVudGlhbHMvaW5zdGFuY2Uua2V5IGFuZCAvZXRjL2NmLWluc3RhbmNlLWNyZWRlbnRpYWxzL2luc3RhbmNlLmNydA==", + "type" : "OUT" + }, + "source_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "tags" : { + "app_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "app_name" : "test", + "deployment" : "cf-6a000373a858bcb78f1c", + "index" : "f237deb0-471f-459a-a18b-de084a8113e7", + "instance_id" : "0", + "ip" : "10.194.34.36", + "job" : "diego_cell", + "organization_id" : "825ec316-5590-416a-9247-1dd0a5750801", + "organization_name" : "system", + "origin" : "rep", + "process_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "process_instance_id" : "9173f9d0-02b7-4f39-4738-f53b", + "process_type" : "web", + "product" : "Pivotal Application Service", + "source_id" : "1a69c137-90f5-4b0a-8526-2ebca84c83a8", + "source_type" : "APP/PROC/WEB", + "space_id" : "547d902c-0554-4e7c-b886-3926a2e73bdf", + "space_name" : "test", + "system_domain" : "cf.red.springapps.io" + }, + "timestamp" : "1588617404686865694" + } + ] + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/GET_response.json new file mode 100644 index 00000000000..30f820c94b3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/GET_response.json @@ -0,0 +1,31 @@ +{ + "total_policies": 2, + "policies": [ + { + "source": { + "id": "1081ceac-f5c4-47a8-95e8-88e1e302efb5" + }, + "destination": { + "id": "38f08df0-19df-4439-b4e9-61096d4301ea", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + }, + { + "source": { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36" + }, + "destination": { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_delete_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_delete_request.json new file mode 100644 index 00000000000..f66588bc7aa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_delete_request.json @@ -0,0 +1,30 @@ +{ + "policies": [ + { + "source": { + "id": "1081ceac-f5c4-47a8-95e8-88e1e302efb5" + }, + "destination": { + "id": "38f08df0-19df-4439-b4e9-61096d4301ea", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + }, + { + "source": { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36" + }, + "destination": { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_delete_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_delete_response.json new file mode 100644 index 00000000000..9e26dfeeb6e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_delete_response.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_request.json new file mode 100644 index 00000000000..f66588bc7aa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_request.json @@ -0,0 +1,30 @@ +{ + "policies": [ + { + "source": { + "id": "1081ceac-f5c4-47a8-95e8-88e1e302efb5" + }, + "destination": { + "id": "38f08df0-19df-4439-b4e9-61096d4301ea", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + }, + { + "source": { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36" + }, + "destination": { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36", + "protocol": "tcp", + "ports": { + "start": 1234, + "end": 1235 + } + } + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_response.json new file mode 100644 index 00000000000..9e26dfeeb6e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/policies/POST_response.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/tags/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/tags/GET_response.json new file mode 100644 index 00000000000..b1db0943577 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/networking/tags/GET_response.json @@ -0,0 +1,16 @@ +{ + "tags": [ + { + "id": "1081ceac-f5c4-47a8-95e8-88e1e302efb5", + "tag": "0001" + }, + { + "id": "308e7ef1-63f1-4a6c-978c-2e527cbb1c36", + "tag": "0002" + }, + { + "id": "38f08df0-19df-4439-b4e9-61096d4301ea", + "tag": "0003" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/GET_response.json new file mode 100644 index 00000000000..02ed797426d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/GET_response.json @@ -0,0 +1,8 @@ +[ + { + "guid": "abc123", + "name": "default-tcp", + "reservable_ports": "1024-65535", + "type": "tcp" + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/PUT_{id}_request.json new file mode 100644 index 00000000000..469deee3475 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/PUT_{id}_request.json @@ -0,0 +1,3 @@ +{ + "reservable_ports": "1024-65535" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/PUT_{id}_response.json new file mode 100644 index 00000000000..622c2039d81 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/routergroups/PUT_{id}_response.json @@ -0,0 +1,6 @@ +{ + "guid": "abc123", + "name": "default-tcp", + "reservable_ports": "1024-65535", + "type": "tcp" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/GET_response.json new file mode 100644 index 00000000000..e563ae44e59 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/GET_response.json @@ -0,0 +1,13 @@ +[ + { + "router_group_guid": "xyz789", + "port": 5200, + "backend_ip": "10.1.1.12", + "backend_port": 60000, + "modification_tag": { + "guid": "cbdhb4e3-141d-4259-b0ac-99140e8998l0", + "index": 10 + }, + "ttl": 30 + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/POST_create_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/POST_create_request.json new file mode 100644 index 00000000000..95a768e8bb6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/POST_create_request.json @@ -0,0 +1,9 @@ +[ + { + "router_group_guid": "xyz789", + "port": 5200, + "backend_ip": "10.1.1.12", + "backend_port": 60000, + "ttl": 30 + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/POST_delete_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/POST_delete_request.json new file mode 100644 index 00000000000..94aa6347fd1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/routing/v1/tcproutes/POST_delete_request.json @@ -0,0 +1,8 @@ +[ + { + "router_group_guid": "xyz789", + "port": 5200, + "backend_ip": "10.1.1.12", + "backend_port": 60000 + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/authorizations/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/authorizations/GET_response.json new file mode 100644 index 00000000000..60db42f3944 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/authorizations/GET_response.json @@ -0,0 +1,73 @@ +{ + "issuer": "http://localhost:8080/uaa/oauth/token", + "authorization_endpoint": "http://localhost/oauth/authorize", + "token_endpoint": "http://localhost/oauth/token", + "token_endpoint_auth_methods_supported": [ + "client_secret_basic", + "client_secret_post" + ], + "token_endpoint_auth_signing_alg_values_supported": [ + "RS256", + "HS256" + ], + "userinfo_endpoint": "http://localhost/userinfo", + "jwks_uri": "http://localhost/token_keys", + "scopes_supported": [ + "openid", + "profile", + "email", + "phone", + "roles", + "user_attributes" + ], + "response_types_supported": [ + "code", + "code id_token", + "id_token", + "token id_token" + ], + "subject_types_supported": [ + "public" + ], + "id_token_signing_alg_values_supported": [ + "RS256", + "HS256" + ], + "id_token_encryption_alg_values_supported": [ + "none" + ], + "claim_types_supported": [ + "normal" + ], + "claims_supported": [ + "sub", + "user_name", + "origin", + "iss", + "auth_time", + "amr", + "acr", + "client_id", + "aud", + "zid", + "grant_type", + "user_id", + "azp", + "scope", + "exp", + "iat", + "jti", + "rev_sig", + "cid", + "given_name", + "family_name", + "phone_number", + "email" + ], + "claims_parameter_supported": false, + "service_documentation": "http://docs.cloudfoundry.org/api/uaa/", + "end_session_endpoint": "http://localhost/logout.do", + "ui_locales_supported": [ + "en-US" + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/check/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/check/POST_response.json new file mode 100644 index 00000000000..319b91cbd65 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/check/POST_response.json @@ -0,0 +1,33 @@ +{ + "user_id": "ae77988e-1b25-4e02-87f2-81f98293a356", + "user_name": "marissa", + "email": "marissa@test.org", + "client_id": "app", + "exp": 1462015244, + "scope": [ + "scim.userids", + "openid", + "cloud_controller.read", + "password.write", + "cloud_controller.write" + ], + "jti": "f9f2f98d88e04ff7bb1f69041d3c0346", + "aud": [ + "app", + "scim", + "openid", + "cloud_controller", + "password" + ], + "sub": "ae77988e-1b25-4e02-87f2-81f98293a356", + "iss": "http://localhost:8080/uaa/oauth/token", + "iat": 1461972044, + "cid": "app", + "grant_type": "password", + "azp": "app", + "auth_time": 1461972044, + "zid": "uaa", + "rev_sig": "4e89e4da", + "origin": "uaa", + "revocable": true +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/DELETE_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/DELETE_{id}_response.json new file mode 100644 index 00000000000..6012a176c61 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/DELETE_{id}_response.json @@ -0,0 +1,32 @@ +{ + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "Gieovr", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "a4mzKu", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364443957 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_meta_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_meta_response.json new file mode 100644 index 00000000000..a1b28a9e1cf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_meta_response.json @@ -0,0 +1,26 @@ +[ + { + "clientId": "9134O7y4", + "showOnHomePage": true, + "appLaunchUrl": "http://client3.com/app", + "appIcon": "Y2xpZW50IDMgaWNvbg==" + }, + { + "clientId": "RpFRZpY3", + "showOnHomePage": false, + "appLaunchUrl": "http://changed.app.launch/url", + "appIcon": "" + }, + { + "clientId": "ewegZo0R", + "showOnHomePage": false, + "appLaunchUrl": "http://client4.com/app", + "appIcon": "aWNvbiBmb3IgY2xpZW50IDQ=" + }, + { + "clientId": "lqhK1n8q", + "showOnHomePage": true, + "appLaunchUrl": "http://myloginpage.com", + "appIcon": "aWNvbiBmb3IgY2xpZW50IDQ=" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_response.json new file mode 100644 index 00000000000..1189fb2fd36 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_response.json @@ -0,0 +1,42 @@ +{ + "resources": [ + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "EGgNW3", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "7uDPJX", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364445334 + } + ], + "startIndex": 1, + "itemsPerPage": 1, + "totalResults": 1, + "schemas": [ + "http://cloudfoundry.org/schema/scim/oauth-clients-1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_response_deserialize.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_response_deserialize.json new file mode 100644 index 00000000000..f1a19e2babf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_response_deserialize.json @@ -0,0 +1,57 @@ +{ + "resources": [ + { + "action": "none", + "authorities": [ + "uaa.none" + ], + "authorized_grant_types": [ + "authorization_code", + "refresh_token" + ], + "autoapprove": true, + "client_id": "ssh-proxy", + "lastModified": 1469112324000, + "redirect_uri": [ + "/login" + ], + "resource_ids": [ + "none" + ], + "scope": [ + "openid", + "cloud_controller.read", + "cloud_controller.write" + ] + }, + { + "action": "none", + "authorities": [ + "routing.routes.write", + "routing.routes.read" + ], + "authorized_grant_types": [ + "client_credentials", + "refresh_token" + ], + "autoapprove": [ + "routing.routes.write", + "routing.routes.read" + ], + "client_id": "tcp_emitter", + "lastModified": 1469112324000, + "resource_ids": [ + "none" + ], + "scope": [ + "uaa.none" + ] + } + ], + "startIndex": 1, + "itemsPerPage": 2, + "totalResults": 2, + "schemas": [ + "http://cloudfoundry.org/schema/scim/oauth-clients-1.0" + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_{id}_meta_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_{id}_meta_response.json new file mode 100644 index 00000000000..78a9abc8be5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_{id}_meta_response.json @@ -0,0 +1,6 @@ +{ + "clientId": "P4vuAaSe", + "showOnHomePage": true, + "appLaunchUrl": "http://myloginpage.com", + "appIcon": "aWNvbiBmb3IgY2xpZW50IDQ=" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_{id}_response.json new file mode 100644 index 00000000000..d8b2187e478 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/GET_{id}_response.json @@ -0,0 +1,32 @@ +{ + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "4Z3t1r", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "mr80UZ", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364445592 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_request.json new file mode 100644 index 00000000000..cd24223fe70 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_request.json @@ -0,0 +1,29 @@ +{ + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "autoapprove": [ + "true" + ], + "client_id": "aPq3I1", + "client_secret": "secret", + "name": "My Client Name", + "redirect_uri": [ + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*" + ], + "scope": [ + "clients.read", + "clients.write" + ], + "token_salt": "hRZ21X" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_response.json new file mode 100644 index 00000000000..bc91157c3bb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_response.json @@ -0,0 +1,32 @@ +{ + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "aPq3I1", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "hRZ21X", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364445109 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_delete_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_delete_request.json new file mode 100644 index 00000000000..a6359776a53 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_delete_request.json @@ -0,0 +1,8 @@ +[ + { + "client_id": "14pnUs" + }, + { + "client_id": "qECLyr" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_delete_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_delete_response.json new file mode 100644 index 00000000000..4b113ed45a5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_delete_response.json @@ -0,0 +1,68 @@ +[ + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "14pnUs", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "erRsWH", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364444461, + "approvals_deleted": true + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "qECLyr", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "48TIsq", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364444868, + "approvals_deleted": true + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_modify_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_modify_request.json new file mode 100644 index 00000000000..c25d438d831 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_modify_request.json @@ -0,0 +1,44 @@ +[ + { + "action": "secret", + "client_secret": "new_secret", + "client_id": "Zkgt1Y" + }, + { + "action": "delete", + "client_id": "Xm43aH" + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "tlA1z5", + "client_secret": "secret", + "resource_ids": [], + "authorized_grant_types": [ + "client_credentials" + ], + "access_token_validity": 2700, + "refresh_token_validity": 7000, + "action": "add", + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "UpzrHR", + "autoapprove": [ + "true" + ], + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "redirect_uri": [ + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*" + ] + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_modify_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_modify_response.json new file mode 100644 index 00000000000..a0bed0ad731 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_modify_response.json @@ -0,0 +1,83 @@ +[ + { + "scope": [], + "client_id": "Zkgt1Y", + "resource_ids": [], + "authorized_grant_types": [], + "action": "secret", + "authorities": [], + "approvals_deleted": false + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "Xm43aH", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "access_token_validity": 2700, + "refresh_token_validity": 7000, + "action": "delete", + "authorities": [ + "clients.read", + "new.authority", + "clients.write" + ], + "token_salt": "WjlWvu", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1474923482302, + "approvals_deleted": true + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "tlA1z5", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "access_token_validity": 2700, + "refresh_token_validity": 7000, + "action": "add", + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "UpzrHR", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1474923482727 + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_request.json new file mode 100644 index 00000000000..f33cb53fd4d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_request.json @@ -0,0 +1,60 @@ +[ + { + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "autoapprove": [ + "true" + ], + "client_id": "14pnUs", + "client_secret": "secret", + "name": "My Client Name", + "redirect_uri": [ + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*" + ], + "scope": [ + "clients.read", + "clients.write" + ], + "token_salt": "erRsWH" + }, + { + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "autoapprove": [ + "true" + ], + "client_id": "0Tgnfy", + "client_secret": "secret", + "name": "My Client Name", + "redirect_uri": [ + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*" + ], + "scope": [ + "clients.read", + "clients.write" + ], + "token_salt": "4wMTwN" + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_response.json new file mode 100644 index 00000000000..08a1533138d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_response.json @@ -0,0 +1,66 @@ +[ + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "14pnUs", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "erRsWH", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364444218 + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "0Tgnfy", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "4wMTwN", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364444318 + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_secret_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_secret_request.json new file mode 100644 index 00000000000..b4cdb258b37 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_secret_request.json @@ -0,0 +1,10 @@ +[ + { + "clientId": "Zkgt1Y", + "secret": "new_secret" + }, + { + "clientId": "Xm43aH", + "secret": "new_secret" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_secret_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_secret_response.json new file mode 100644 index 00000000000..dcfd19a32a3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/POST_tx_secret_response.json @@ -0,0 +1,73 @@ +[ + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "Zkgt1Y", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "access_token_validity": 2700, + "refresh_token_validity": 7000, + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "uHICvG", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1474923482301, + "approvals_deleted": true + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "Xm43aH", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "access_token_validity": 2700, + "refresh_token_validity": 7000, + "authorities": [ + "clients.read", + "new.authority", + "clients.write" + ], + "token_salt": "WjlWvu", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1474923482302, + "approvals_deleted": true + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_tx_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_tx_request.json new file mode 100644 index 00000000000..aea8e9bb93f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_tx_request.json @@ -0,0 +1,59 @@ +[ + { + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "autoapprove": [ + "true" + ], + "client_id": "14pnUs", + "name": "My Client Name", + "redirect_uri": [ + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*" + ], + "scope": [ + "clients.read", + "clients.write" + ], + "token_salt": "erRsWH" + }, + { + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "authorities": [ + "clients.read", + "new.authority", + "clients.write" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "autoapprove": [ + "true" + ], + "client_id": "0Tgnfy", + "name": "My Client Name", + "redirect_uri": [ + "http://test1.com", + "http*://ant.path.wildcard/**/passback/*" + ], + "scope": [ + "clients.read", + "clients.write" + ], + "token_salt": "4wMTwN" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_tx_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_tx_response.json new file mode 100644 index 00000000000..224454ec19c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_tx_response.json @@ -0,0 +1,67 @@ +[ + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "14pnUs", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "erRsWH", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364444218 + }, + { + "scope": [ + "clients.read", + "clients.write" + ], + "client_id": "0Tgnfy", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "true" + ], + "authorities": [ + "clients.read", + "new.authority", + "clients.write" + ], + "token_salt": "4wMTwN", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364444318 + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_meta_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_meta_request.json new file mode 100644 index 00000000000..d94ceb14b96 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_meta_request.json @@ -0,0 +1,5 @@ +{ + "appLaunchUrl": "http://changed.app.launch/url", + "clientId": "RpFRZpY3", + "showOnHomePage": false +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_meta_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_meta_response.json new file mode 100644 index 00000000000..dcdb7fd5dfe --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_meta_response.json @@ -0,0 +1,6 @@ +{ + "clientId": "RpFRZpY3", + "showOnHomePage": false, + "appLaunchUrl": "http://changed.app.launch/url", + "appIcon": "" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_request.json new file mode 100644 index 00000000000..d3f59d11cc9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_request.json @@ -0,0 +1,13 @@ +{ + "scope": [ + "clients.new", + "clients.autoapprove" + ], + "client_id": "55pTMX", + "authorized_grant_types": [ + "client_credentials" + ], + "autoapprove": [ + "clients.autoapprove" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_response.json new file mode 100644 index 00000000000..64704ce173c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_response.json @@ -0,0 +1,32 @@ +{ + "scope": [ + "clients.new", + "clients.autoapprove" + ], + "client_id": "55pTMX", + "resource_ids": [ + "none" + ], + "authorized_grant_types": [ + "client_credentials" + ], + "redirect_uri": [ + "http*://ant.path.wildcard/**/passback/*", + "http://test1.com" + ], + "autoapprove": [ + "clients.autoapprove" + ], + "authorities": [ + "clients.read", + "clients.write" + ], + "token_salt": "8mwCEy", + "allowedproviders": [ + "uaa", + "ldap", + "my-saml-provider" + ], + "name": "My Client Name", + "lastModified": 1468364443857 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_secret_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_secret_request.json new file mode 100644 index 00000000000..a23447de35f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_secret_request.json @@ -0,0 +1,4 @@ +{ + "clientId": "BMGkqk", + "secret": "new_secret" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_secret_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_secret_response.json new file mode 100644 index 00000000000..a0feed9c2a6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/clients/PUT_{id}_secret_response.json @@ -0,0 +1,4 @@ +{ + "status": "ok", + "message": "secret updated" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/error_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/error_response.json new file mode 100644 index 00000000000..b9d88ffb879 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/error_response.json @@ -0,0 +1,10 @@ +{ + "error": "unauthorized", + "error_description": "Bad credentials", + "extra_information": { + "some": [ + "extra", + "information" + ] + } +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_external_displayname_{displayName}_externalgroup_{externalGroup}_origin_{origin}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_external_displayname_{displayName}_externalgroup_{externalGroup}_origin_{origin}_response.json new file mode 100644 index 00000000000..0b47f41caad --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_external_displayname_{displayName}_externalgroup_{externalGroup}_origin_{origin}_response.json @@ -0,0 +1,14 @@ +{ + "meta": { + "version": 0, + "created": "2016-06-16T00:01:41.465Z", + "lastModified": "2016-06-16T00:01:41.465Z" + }, + "groupId": "f8f0048f-de32-4d20-b41d-5820b690063d", + "externalGroup": "external group", + "displayName": "Group For Testing Deleting External Group Mapping By Name", + "origin": "ldap", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_external_groupid_{groupId}_externalgroup_{externalGroup}_origin_{origin}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_external_groupid_{groupId}_externalgroup_{externalGroup}_origin_{origin}_response.json new file mode 100644 index 00000000000..5e8b02ea680 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_external_groupid_{groupId}_externalgroup_{externalGroup}_origin_{origin}_response.json @@ -0,0 +1,14 @@ +{ + "meta": { + "version": 0, + "created": "2016-06-16T00:01:41.223Z", + "lastModified": "2016-06-16T00:01:41.223Z" + }, + "groupId": "d68167b4-81b3-490d-9838-94092d5c89f6", + "externalGroup": "external group", + "displayName": "Group For Testing Deleting External Group Mapping", + "origin": "ldap", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_{id}_members_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_{id}_members_{id}_response.json new file mode 100644 index 00000000000..a0c678bfabf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_{id}_members_{id}_response.json @@ -0,0 +1,5 @@ +{ + "origin": "uaa", + "type": "USER", + "value": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_{id}_response.json new file mode 100644 index 00000000000..0766280abfc --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/DELETE_{id}_response.json @@ -0,0 +1,21 @@ +{ + "id": "test-group-id", + "meta": { + "version": 1, + "created": "2016-06-03T17:59:30.527Z", + "lastModified": "2016-06-03T17:59:30.561Z" + }, + "displayName": "Cooler Group Name for Delete", + "zoneId": "uaa", + "description": "the cool group", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "f0e6a061-6e3a-4be9-ace5-142ee24e20b7" + } + ], + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_external_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_external_response.json new file mode 100644 index 00000000000..a5c26236658 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_external_response.json @@ -0,0 +1,16 @@ +{ + "resources": [ + { + "displayName": "Group For Testing Retrieving External Group Mappings", + "externalGroup": "external group", + "groupId": "c4a41861-6c83-45a7-995e-64fb66565dce", + "origin": "ldap" + } + ], + "startIndex": 1, + "itemsPerPage": 1, + "totalResults": 1, + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_members_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_members_response.json new file mode 100644 index 00000000000..69fd701ecd5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_members_response.json @@ -0,0 +1,35 @@ +[ + { + "origin": "uaa", + "type": "USER", + "entity": { + "id": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2", + "externalId": "test-user", + "meta": { + "version": 0, + "created": "2016-06-16T00:01:41.665Z", + "lastModified": "2016-06-16T00:01:41.665Z" + }, + "userName": "40HfKc", + "name": { + "familyName": "cool-familyName", + "givenName": "cool-name" + }, + "emails": [ + { + "value": "cool@chill.com", + "primary": false + } + ], + "active": true, + "verified": true, + "origin": "uaa", + "zoneId": "uaa", + "passwordLastModified": "2016-06-16T00:01:41.000Z", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] + }, + "value": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_members_response_no_entity.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_members_response_no_entity.json new file mode 100644 index 00000000000..5b690eda87e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_members_response_no_entity.json @@ -0,0 +1,7 @@ +[ + { + "origin": "uaa", + "type": "USER", + "value": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_response.json new file mode 100644 index 00000000000..4207886519c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_response.json @@ -0,0 +1,31 @@ +{ + "resources": [ + { + "id": "f87c557a-8ddc-43d3-98fb-e420ebc7f0f1", + "meta": { + "version": 1, + "created": "2016-06-16T00:01:41.692Z", + "lastModified": "2016-06-16T00:01:41.728Z" + }, + "displayName": "Cooler Group Name for List", + "zoneId": "uaa", + "description": "the cool group", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2" + } + ], + "schemas": [ + "urn:scim:schemas:core:1.0" + ] + } + ], + "startIndex": 1, + "itemsPerPage": 50, + "totalResults": 1, + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_{id}_members_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_{id}_members_{id}_response.json new file mode 100644 index 00000000000..6b5ff0cbe5a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_{id}_members_{id}_response.json @@ -0,0 +1,5 @@ +{ + "origin": "uaa", + "type": "USER", + "value": "test-member-id" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_{id}_response.json new file mode 100644 index 00000000000..48dc5b32484 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/GET_{id}_response.json @@ -0,0 +1,21 @@ +{ + "id": "test-group-id", + "meta": { + "version": 1, + "created": "2016-06-03T17:59:30.527Z", + "lastModified": "2016-06-03T17:59:30.561Z" + }, + "displayName": "Cooler Group Name for Retrieve", + "zoneId": "uaa", + "description": "the cool group", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "f0e6a061-6e3a-4be9-ace5-142ee24e20b7" + } + ], + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_external_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_external_request.json new file mode 100644 index 00000000000..f94b450156c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_external_request.json @@ -0,0 +1,4 @@ +{ + "externalGroup": "External group", + "groupId": "76937b62-346c-4848-953c-d790b87ec80a" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_external_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_external_response.json new file mode 100644 index 00000000000..d601f68ac02 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_external_response.json @@ -0,0 +1,14 @@ +{ + "meta": { + "version": 0, + "created": "2016-06-16T00:01:41.393Z", + "lastModified": "2016-06-16T00:01:41.393Z" + }, + "groupId": "76937b62-346c-4848-953c-d790b87ec80a", + "externalGroup": "External group", + "displayName": "Group For Testing Creating External Group Mapping", + "origin": "ldap", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_request.json new file mode 100644 index 00000000000..42eb0a9a130 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_request.json @@ -0,0 +1,11 @@ +{ + "description": "the cool group", + "displayName": "Cool Group Name", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "f0e6a061-6e3a-4be9-ace5-142ee24e20b7" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_response.json new file mode 100644 index 00000000000..2f9089ca795 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_response.json @@ -0,0 +1,21 @@ +{ + "id": "46081184-7ca9-453d-9bf8-74da7113bec6", + "meta": { + "version": 0, + "created": "2016-06-03T17:59:30.527Z", + "lastModified": "2016-06-03T17:59:30.527Z" + }, + "displayName": "Cool Group Name", + "zoneId": "uaa", + "description": "the cool group", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "f0e6a061-6e3a-4be9-ace5-142ee24e20b7" + } + ], + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_{id}_members_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_{id}_members_request.json new file mode 100644 index 00000000000..4ee3465a3e9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_{id}_members_request.json @@ -0,0 +1,5 @@ +{ + "origin": "uaa", + "type": "USER", + "value": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_{id}_members_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_{id}_members_response.json new file mode 100644 index 00000000000..4ee3465a3e9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/POST_{id}_members_response.json @@ -0,0 +1,5 @@ +{ + "origin": "uaa", + "type": "USER", + "value": "40bc8ef1-0719-4a0c-9f60-e9f843cd4af2" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/PUT_{id}_request.json new file mode 100644 index 00000000000..1758fa498f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/PUT_{id}_request.json @@ -0,0 +1,11 @@ +{ + "description": "the cool group", + "displayName": "Cooler Group Name for Update", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "f0e6a061-6e3a-4be9-ace5-142ee24e20b7" + } + ] +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/PUT_{id}_response.json new file mode 100644 index 00000000000..e59ba7ca157 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/groups/PUT_{id}_response.json @@ -0,0 +1,21 @@ +{ + "id": "test-group-id", + "meta": { + "version": 1, + "created": "2016-06-03T17:59:30.527Z", + "lastModified": "2016-06-03T17:59:30.561Z" + }, + "displayName": "Cooler Group Name for Update", + "zoneId": "uaa", + "description": "the cool group", + "members": [ + { + "origin": "uaa", + "type": "USER", + "value": "f0e6a061-6e3a-4be9-ace5-142ee24e20b7" + } + ], + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/DELETE_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/DELETE_{id}_response.json new file mode 100644 index 00000000000..515a52b8e5d --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/DELETE_{id}_response.json @@ -0,0 +1,30 @@ +{ + "type": "saml", + "config": { + "emailDomain": null, + "additionalConfiguration": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "metaDataLocation": "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\nMBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\nZm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\nVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\nBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\nAQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\nWWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\nBw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\nvvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\nGFHNkZ6DmoT/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n", + "idpEntityAlias": "saml-for-delete", + "zoneId": "uaa", + "nameID": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "assertionConsumerIndex": 0, + "metadataTrustCheck": false, + "showSamlLink": false, + "socketFactoryClassName": "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory", + "linkText": "IDPEndpointsMockTests Saml Provider:saml-for-delete", + "iconUrl": null, + "addShadowUserOnLogin": true, + "groupMappingMode": "EXPLICITLY_MAPPED" + }, + "id": "3ba5978b-8db1-4f27-bfbd-f24f6773b52f", + "originKey": "saml-for-delete", + "name": "saml-for-delete name", + "version": 0, + "created": 1466035298319, + "last_modified": 1466035298319, + "active": true, + "identityZoneId": "uaa" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/GET_response.json new file mode 100644 index 00000000000..30279c36a98 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/GET_response.json @@ -0,0 +1,97 @@ +[ + { + "type": "saml", + "config": { + "emailDomain": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "metaDataLocation": "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\nMBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\nZm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\nVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\nBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\nAQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\nWWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\nBw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\nvvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\nGFHNkZ6DmoT/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n", + "idpEntityAlias": "SAML", + "zoneId": "uaa", + "nameID": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "assertionConsumerIndex": 0, + "metadataTrustCheck": false, + "showSamlLink": false, + "socketFactoryClassName": "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory", + "linkText": "IDPEndpointsMockTests Saml Provider:SAML", + "iconUrl": null, + "addShadowUserOnLogin": true, + "groupMappingMode": "EXPLICITLY_MAPPED" + }, + "id": "a2e96056-c777-40b8-95b8-ff81b441fcf1", + "originKey": "SAML", + "name": "SAML name", + "version": 0, + "created": 1465001965526, + "last_modified": 1465001965526, + "active": true, + "identityZoneId": "uaa" + }, + { + "type": "keystone", + "config": null, + "id": "e6f15c2c-e5fa-46f6-a301-66b802d0102f", + "originKey": "keystone", + "name": "keystone", + "version": 1, + "created": 946713600000, + "last_modified": 1465001954764, + "active": false, + "identityZoneId": "uaa" + }, + { + "type": "ldap", + "config": null, + "id": "a3b9ef5d-e717-4ea9-91fa-371fa7a32f46", + "originKey": "ldap", + "name": "ldap", + "version": 1, + "created": 946713600000, + "last_modified": 1465001955226, + "active": false, + "identityZoneId": "uaa" + }, + { + "type": "oauth2.0", + "config": { + "additionalConfiguration": null, + "emailDomain": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "authUrl": "http://auth.url", + "tokenUrl": "http://token.url", + "tokenKeyUrl": null, + "tokenKey": "token-key", + "linkText": null, + "showLinkText": false, + "skipSslValidation": false, + "relyingPartyId": "uaa", + "relyingPartySecret": "secret", + "scopes": null, + "addShadowUserOnLogin": true, + "checkTokenUrl": null + }, + "id": "16506900-561d-411f-904b-15c3e2722cba", + "originKey": "oauth2.0", + "name": "UAA Provider", + "version": 0, + "created": 1465001966855, + "last_modified": 1465001966855, + "active": true, + "identityZoneId": "uaa" + }, + { + "type": "uaa", + "config": null, + "id": "8d364146-ecb3-461e-b294-87580807a08f", + "originKey": "uaa", + "name": "uaa", + "version": 1, + "created": 946713600000, + "last_modified": 1465001955249, + "active": true, + "identityZoneId": "uaa" + } +] \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/GET_{id}_response.json new file mode 100644 index 00000000000..34b0fd87e4c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/GET_{id}_response.json @@ -0,0 +1,30 @@ +{ + "type": "saml", + "config": { + "additionalConfiguration": null, + "emailDomain": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "metaDataLocation": "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\nMBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\nZm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\nVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\nBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\nAQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\nWWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\nBw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\nvvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\nGFHNkZ6DmoT/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n", + "idpEntityAlias": "saml-for-get", + "zoneId": "uaa", + "nameID": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "assertionConsumerIndex": 0, + "metadataTrustCheck": false, + "showSamlLink": false, + "socketFactoryClassName": "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory", + "linkText": "IDPEndpointsMockTests Saml Provider:saml-for-get", + "iconUrl": null, + "addShadowUserOnLogin": true, + "groupMappingMode": "EXPLICITLY_MAPPED" + }, + "id": "0077d56d-4e10-447a-9438-57d058e033ae", + "originKey": "saml-for-get", + "name": "saml-for-get name", + "version": 0, + "created": 1465001966715, + "last_modified": 1465001966715, + "active": true, + "identityZoneId": "uaa" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_ldap.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_ldap.json new file mode 100644 index 00000000000..5e1dd0068dd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_ldap.json @@ -0,0 +1,15 @@ +{ + "type": "ldap", + "config": { + "attributeMappings": {}, + "ldapProfileFile": "ldap/ldap-simple-bind.xml", + "baseUrl": "ldap://localhost:33389", + "skipSSLVerification": false, + "mailAttributeName": "mail", + "mailSubstituteOverridesLdap": false, + "ldapGroupFile": "ldap/ldap-groups-null.xml" + }, + "originKey": "ldap", + "name": "ldap name", + "active": true +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_oauth.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_oauth.json new file mode 100644 index 00000000000..ecaf3918cdb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_oauth.json @@ -0,0 +1,17 @@ +{ + "active": true, + "config": { + "addShadowUserOnLogin": true, + "attributeMappings": {}, + "authUrl": "http://auth.url", + "relyingPartyId": "uaa", + "relyingPartySecret": "secret", + "showLinkText": false, + "skipSslValidation": false, + "tokenKey": "token-key", + "tokenUrl": "http://token.url" + }, + "name": "UAA Provider", + "originKey": "oauth2.0", + "type": "oauth2.0" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_saml.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_saml.json new file mode 100644 index 00000000000..81ed680f893 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_request_saml.json @@ -0,0 +1,18 @@ +{ + "active": true, + "config": { + "addShadowUserOnLogin": true, + "assertionConsumerIndex": 0, + "attributeMappings": {}, + "groupMappingMode": "EXPLICITLY_MAPPED", + "linkText": "IDPEndpointsMockTests Saml Provider:SAML", + "metaDataLocation": "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\nMBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\nZm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\nVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\nBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\nAQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\nWWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\nBw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\nvvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\nGFHNkZ6DmoT/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n", + "metadataTrustCheck": false, + "nameID": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "showSamlLink": false, + "socketFactoryClassName": "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory" + }, + "name": "SAML name", + "originKey": "SAML", + "type": "saml" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_ldap.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_ldap.json new file mode 100644 index 00000000000..60d7c3b1a12 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_ldap.json @@ -0,0 +1,42 @@ +{ + "type": "ldap", + "config": { + "emailDomain": null, + "additionalConfiguration": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "ldapProfileFile": "ldap/ldap-simple-bind.xml", + "baseUrl": "ldap://localhost:33389", + "referral": null, + "skipSSLVerification": false, + "userDNPattern": "cn={0},ou=Users,dc=test,dc=com", + "userDNPatternDelimiter": ";", + "bindUserDn": null, + "bindPassword": null, + "userSearchBase": null, + "userSearchFilter": null, + "passwordAttributeName": null, + "passwordEncoder": null, + "localPasswordCompare": null, + "mailAttributeName": "mail", + "mailSubstitute": null, + "mailSubstituteOverridesLdap": false, + "ldapGroupFile": "ldap/ldap-groups-null.xml", + "groupSearchBase": null, + "groupSearchFilter": null, + "groupsIgnorePartialResults": null, + "autoAddGroups": true, + "groupSearchSubTree": true, + "maxGroupSearchDepth": 10, + "groupRoleAttribute": null + }, + "id": "aaccbccb-1c85-4e8b-86ed-4ce66f91c856", + "originKey": "ldap", + "name": "ldap name", + "version": 0, + "created": 1465001967988, + "last_modified": 1465001967988, + "active": true, + "identityZoneId": "uaa" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_oauth.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_oauth.json new file mode 100644 index 00000000000..db242042df9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_oauth.json @@ -0,0 +1,30 @@ +{ + "type": "oauth2.0", + "config": { + "emailDomain": null, + "additionalConfiguration": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "authUrl": "http://auth.url", + "tokenUrl": "http://token.url", + "tokenKeyUrl": null, + "tokenKey": "token-key", + "linkText": null, + "showLinkText": false, + "skipSslValidation": false, + "relyingPartyId": "uaa", + "relyingPartySecret": "secret", + "scopes": null, + "addShadowUserOnLogin": true, + "checkTokenUrl": null + }, + "id": "16506900-561d-411f-904b-15c3e2722cba", + "originKey": "oauth2.0", + "name": "UAA Provider", + "version": 0, + "created": 1465001966855, + "last_modified": 1465001966855, + "active": true, + "identityZoneId": "uaa" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_saml.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_saml.json new file mode 100644 index 00000000000..bca333eae8b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/POST_response_saml.json @@ -0,0 +1,30 @@ +{ + "type": "saml", + "config": { + "emailDomain": null, + "additionalConfiguration": null, + "providerDescription": null, + "externalGroupsWhitelist": [], + "attributeMappings": {}, + "metaDataLocation": "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\nA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\nMBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\nZm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\nVVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\nBE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\nAQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\nWWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\nBw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\nvvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\nGFHNkZ6DmoT/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n", + "idpEntityAlias": "SAML", + "zoneId": "uaa", + "nameID": "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress", + "assertionConsumerIndex": 0, + "metadataTrustCheck": false, + "showSamlLink": false, + "socketFactoryClassName": "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory", + "linkText": "IDPEndpointsMockTests Saml Provider:SAML", + "iconUrl": null, + "addShadowUserOnLogin": true, + "groupMappingMode": "EXPLICITLY_MAPPED" + }, + "id": "a2e96056-c777-40b8-95b8-ff81b441fcf1", + "originKey": "SAML", + "name": "SAML name", + "version": 0, + "created": 1465001965526, + "last_modified": 1465001965526, + "active": true, + "identityZoneId": "uaa" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/PUT_{id}_request.json new file mode 100644 index 00000000000..dd51cc105eb --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/PUT_{id}_request.json @@ -0,0 +1,15 @@ +{ + "active": true, + "config": { + "disableInternalUserManagement": false, + "lockoutPolicy": { + "countFailuresWithin": 8, + "lockoutAfterFailures": 8, + "lockoutPeriodSeconds": 8 + } + }, + "originKey": "uaa", + "name": "uaa", + "type": "uaa", + "version": 1 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/PUT_{id}_response.json new file mode 100644 index 00000000000..7072de56939 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-providers/PUT_{id}_response.json @@ -0,0 +1,23 @@ +{ + "type": "uaa", + "config": { + "emailDomain": null, + "additionalConfiguration": null, + "providerDescription": null, + "passwordPolicy": null, + "lockoutPolicy": { + "lockoutPeriodSeconds": 8, + "lockoutAfterFailures": 8, + "countFailuresWithin": 8 + }, + "disableInternalUserManagement": false + }, + "id": "test-identity-provider-id", + "originKey": "uaa", + "name": "uaa", + "version": 2, + "created": 946713600000, + "last_modified": 1465001967669, + "active": true, + "identityZoneId": "uaa" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/DELETE_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/DELETE_{id}_response.json new file mode 100644 index 00000000000..3d12426f121 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/DELETE_{id}_response.json @@ -0,0 +1,116 @@ +{ + "id": "twiglet-delete", + "subdomain": "twiglet-delete", + "config": { + "clientLockoutPolicy": { + "lockoutPeriodSeconds": -1, + "lockoutAfterFailures": -1, + "countFailuresWithin": -1 + }, + "tokenPolicy": { + "accessTokenValidity": -1, + "refreshTokenValidity": -1, + "jwtRevocable": false, + "activeKeyId": null, + "keys": {} + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600, + "certificate": null, + "privateKey": null, + "privateKeyPassword": null + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": true, + "whitelist": null + }, + "homeRedirect": "http://my.hosted.homepage.com/", + "selfService": { + "selfServiceLinksEnabled": true, + "signup": "/create_account", + "passwd": "/forgot_password" + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "One Time Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "branding": { + "companyName": "Test Company", + "productLogo": "VGVzdFByb2R1Y3RMb2dv", + "squareLogo": "VGVzdFNxdWFyZUxvZ28=", + "footerLegalText": "Test footer legal text", + "footerLinks": { + "Support": "http://support.example.com" + } + }, + "accountChooserEnabled": false + }, + "name": "The Twiglet Zone", + "version": 0, + "created": 1481728057024, + "last_modified": 1481728057024 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/GET_response.json new file mode 100644 index 00000000000..a5980a1815b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/GET_response.json @@ -0,0 +1,109 @@ +[ + { + "id": "15wtczzd", + "subdomain": "15wtczzd", + "config": { + "clientLockoutPolicy": { + "lockoutPeriodSeconds": -1, + "lockoutAfterFailures": -1, + "countFailuresWithin": -1 + }, + "tokenPolicy": { + "accessTokenValidity": -1, + "refreshTokenValidity": -1, + "jwtRevocable": false, + "activeKeyId": null, + "keys": {} + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600, + "certificate": null, + "privateKey": null, + "privateKeyPassword": null + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": true, + "whitelist": null + }, + "selfService": { + "selfServiceLinksEnabled": true, + "signup": "/create_account", + "passwd": "/forgot_password" + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "One Time Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "accountChooserEnabled": false + }, + "name": "The Twiglet Zone", + "version": 0, + "description": "Like the Twilight Zone but tastier.", + "created": 1481728053399, + "last_modified": 1481728053399 + } +] diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/GET_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/GET_{id}_response.json new file mode 100644 index 00000000000..15e744f81b9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/GET_{id}_response.json @@ -0,0 +1,157 @@ +{ + "id": "twiglet-get", + "subdomain": "twiglet-get", + "config": { + "clientSecretPolicy": { + "minLength": -1, + "maxLength": -1, + "requireUpperCaseCharacter": -1, + "requireLowerCaseCharacter": -1, + "requireDigit": -1, + "requireSpecialCharacter": -1 + }, + "tokenPolicy": { + "accessTokenValidity": 3600, + "refreshTokenValidity": 7200, + "jwtRevocable": false, + "refreshTokenUnique": false, + "refreshTokenFormat": "jwt", + "activeKeyId": "active-key-1" + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600, + "activeKeyId": "legacy-saml-key", + "keys": { + "legacy-saml-key": { + "certificate": "-----BEGIN CERTIFICATE-----\nMIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\nA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\nMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\nYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\nODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\nCAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\nZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\nHn+GmxZA\n-----END CERTIFICATE-----\n" + } + }, + "entityID": "cloudfoundry-saml-login", + "disableInResponseToCheck": false, + "certificate": "-----BEGIN CERTIFICATE-----\nMIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\nA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\nMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\nYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\nODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\nCAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\nZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\nHn+GmxZA\n-----END CERTIFICATE-----\n" + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": false, + "whitelist": null + }, + "homeRedirect": "http://my.hosted.homepage.com/", + "selfService": { + "selfServiceLinksEnabled": true, + "signup": null, + "passwd": null + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "Temporary Authentication Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "branding": { + "companyName": "Test Company", + "productLogo": "VGVzdFByb2R1Y3RMb2dv", + "squareLogo": "VGVzdFNxdWFyZUxvZ28=", + "footerLegalText": "Test footer legal text", + "footerLinks": { + "Support": "http://support.example.com" + }, + "banner": { + "logo": "VGVzdFByb2R1Y3RMb2dv", + "text": "Announcement", + "textColor": "#000000", + "backgroundColor": "#89cff0", + "link": "http://announce.example.com" + }, + "consent": { + "text": "Some Policy", + "link": "http://policy.example.com" + } + }, + "accountChooserEnabled": false, + "userConfig": { + "defaultGroups": [ + "openid", + "password.write", + "uaa.user", + "approvals.me", + "profile", + "roles", + "user_attributes", + "uaa.offline_token" + ] + }, + "mfaConfig": { + "enabled": false, + "identityProviders": [ + "uaa", + "ldap" + ] + }, + "issuer": "http://localhost:8080/uaa" + }, + "name": "The Twiglet Zone", + "version": 0, + "created": 1529690486268, + "last_modified": 1529690486268 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/POST_request.json new file mode 100644 index 00000000000..7022971485e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/POST_request.json @@ -0,0 +1,154 @@ +{ + "id": "twiglet-create", + "subdomain": "twiglet-create", + "config": { + "clientSecretPolicy": { + "minLength": -1, + "maxLength": -1, + "requireUpperCaseCharacter": -1, + "requireLowerCaseCharacter": -1, + "requireDigit": -1, + "requireSpecialCharacter": -1 + }, + "tokenPolicy": { + "accessTokenValidity": -1, + "refreshTokenValidity": -1, + "jwtRevocable": false, + "refreshTokenUnique": false, + "refreshTokenFormat": "jwt", + "keys": { + "exampleKeyId": { + "signingKey": "s1gNiNg.K3y/t3XT" + } + } + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600, + "activeKeyId": "legacy-saml-key", + "keys": { + "legacy-saml-key": { + "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF\nAt0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr\nQA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS\nkQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce\n7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J\nBO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN\nA24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==\n-----END RSA PRIVATE KEY-----\n", + "passphrase": "password", + "certificate": "-----BEGIN CERTIFICATE-----\nMIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\nA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\nMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\nYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\nODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\nCAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\nZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\nHn+GmxZA\n-----END CERTIFICATE-----\n" + } + }, + "entityID": "cloudfoundry-saml-login", + "disableInResponseToCheck": false, + "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF\nAt0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr\nQA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS\nkQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce\n7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J\nBO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN\nA24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==\n-----END RSA PRIVATE KEY-----\n", + "privateKeyPassword": "password", + "certificate": "-----BEGIN CERTIFICATE-----\nMIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\nA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\nMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\nYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\nODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\nCAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\nZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\nHn+GmxZA\n-----END CERTIFICATE-----\n" + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": false + }, + "homeRedirect": "http://my.hosted.homepage.com/", + "selfService": { + "selfServiceLinksEnabled": true + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "One Time Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "branding": { + "companyName": "Test Company", + "productLogo": "VGVzdFByb2R1Y3RMb2dv", + "squareLogo": "VGVzdFNxdWFyZUxvZ28=", + "footerLegalText": "Test footer legal text", + "footerLinks": { + "Support": "http://support.example.com" + }, + "banner": { + "logo": "VGVzdFByb2R1Y3RMb2dv", + "text": "Announcement", + "textColor": "#000000", + "backgroundColor": "#89cff0", + "link": "http://announce.example.com" + } + }, + "accountChooserEnabled": false, + "userConfig": { + "defaultGroups": [ + "openid", + "password.write", + "uaa.user", + "approvals.me", + "profile", + "roles", + "user_attributes", + "uaa.offline_token" + ] + }, + "mfaConfig": { + "enabled": false + } + }, + "name": "The Twiglet Zone", + "version": 0, + "description": "Like the Twilight Zone but tastier.", + "created": 1512452533738, + "last_modified": 1512452533738 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/POST_response.json new file mode 100644 index 00000000000..171eaf374dd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/POST_response.json @@ -0,0 +1,158 @@ +{ + "id": "twiglet-create", + "subdomain": "twiglet-create", + "config": { + "clientSecretPolicy": { + "minLength": -1, + "maxLength": -1, + "requireUpperCaseCharacter": -1, + "requireLowerCaseCharacter": -1, + "requireDigit": -1, + "requireSpecialCharacter": -1 + }, + "tokenPolicy": { + "accessTokenValidity": -1, + "refreshTokenValidity": -1, + "jwtRevocable": false, + "refreshTokenUnique": false, + "refreshTokenFormat": "jwt", + "activeKeyId": null, + "keys": { + "exampleKeyId": { + "signingKey": "s1gNiNg.K3y/t3XT" + } + } + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600, + "activeKeyId": "legacy-saml-key", + "keys": { + "legacy-saml-key": { + "key": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF\nAt0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr\nQA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS\nkQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce\n7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J\nBO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN\nA24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==\n-----END RSA PRIVATE KEY-----\n", + "passphrase": "password", + "certificate": "-----BEGIN CERTIFICATE-----\nMIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\nA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\nMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\nYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\nODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\nCAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\nZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\nHn+GmxZA\n-----END CERTIFICATE-----\n" + } + }, + "entityID": "cloudfoundry-saml-login", + "disableInResponseToCheck": false, + "privateKey": "-----BEGIN RSA PRIVATE KEY-----\nMIIBOwIBAAJBAJv8ZpB5hEK7qxP9K3v43hUS5fGT4waKe7ix4Z4mu5UBv+cw7WSF\nAt0Vaag0sAbsPzU8Hhsrj/qPABvfB8asUwcCAwEAAQJAG0r3ezH35WFG1tGGaUOr\nQA61cyaII53ZdgCR1IU8bx7AUevmkFtBf+aqMWusWVOWJvGu2r5VpHVAIl8nF6DS\nkQIhAMjEJ3zVYa2/Mo4ey+iU9J9Vd+WoyXDQD4EEtwmyG1PpAiEAxuZlvhDIbbce\n7o5BvOhnCZ2N7kYb1ZC57g3F+cbJyW8CIQCbsDGHBto2qJyFxbAO7uQ8Y0UVHa0J\nBO/g900SAcJbcQIgRtEljIShOB8pDjrsQPxmI1BLhnjD1EhRSubwhDw5AFUCIQCN\nA24pDtdOHydwtSB5+zFqFLfmVZplQM/g5kb4so70Yw==\n-----END RSA PRIVATE KEY-----\n", + "privateKeyPassword": "password", + "certificate": "-----BEGIN CERTIFICATE-----\nMIICEjCCAXsCAg36MA0GCSqGSIb3DQEBBQUAMIGbMQswCQYDVQQGEwJKUDEOMAwG\nA1UECBMFVG9reW8xEDAOBgNVBAcTB0NodW8ta3UxETAPBgNVBAoTCEZyYW5rNERE\nMRgwFgYDVQQLEw9XZWJDZXJ0IFN1cHBvcnQxGDAWBgNVBAMTD0ZyYW5rNEREIFdl\nYiBDQTEjMCEGCSqGSIb3DQEJARYUc3VwcG9ydEBmcmFuazRkZC5jb20wHhcNMTIw\nODIyMDUyNjU0WhcNMTcwODIxMDUyNjU0WjBKMQswCQYDVQQGEwJKUDEOMAwGA1UE\nCAwFVG9reW8xETAPBgNVBAoMCEZyYW5rNEREMRgwFgYDVQQDDA93d3cuZXhhbXBs\nZS5jb20wXDANBgkqhkiG9w0BAQEFAANLADBIAkEAm/xmkHmEQrurE/0re/jeFRLl\n8ZPjBop7uLHhnia7lQG/5zDtZIUC3RVpqDSwBuw/NTweGyuP+o8AG98HxqxTBwID\nAQABMA0GCSqGSIb3DQEBBQUAA4GBABS2TLuBeTPmcaTaUW/LCB2NYOy8GMdzR1mx\n8iBIu2H6/E2tiY3RIevV2OW61qY2/XRQg7YPxx3ffeUugX9F4J/iPnnu1zAxxyBy\n2VguKv4SWjRFoRkIfIlHX0qVviMhSlNy2ioFLy7JcPZb+v3ftDGywUqcBiVDoea0\nHn+GmxZA\n-----END CERTIFICATE-----\n" + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": false, + "whitelist": null + }, + "homeRedirect": "http://my.hosted.homepage.com/", + "selfService": { + "selfServiceLinksEnabled": true, + "signup": null, + "passwd": null + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "One Time Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "branding": { + "companyName": "Test Company", + "productLogo": "VGVzdFByb2R1Y3RMb2dv", + "squareLogo": "VGVzdFNxdWFyZUxvZ28=", + "footerLegalText": "Test footer legal text", + "footerLinks": { + "Support": "http://support.example.com" + }, + "banner": { + "logo": "VGVzdFByb2R1Y3RMb2dv", + "text": "Announcement", + "textColor": "#000000", + "backgroundColor": "#89cff0", + "link": "http://announce.example.com" + } + }, + "accountChooserEnabled": false, + "userConfig": { + "defaultGroups": [ + "openid", + "password.write", + "uaa.user", + "approvals.me", + "profile", + "roles", + "user_attributes", + "uaa.offline_token" + ] + }, + "mfaConfig": { + "enabled": false + } + }, + "name": "The Twiglet Zone", + "version": 0, + "description": "Like the Twilight Zone but tastier.", + "created": 1512452533738, + "last_modified": 1512452533738 +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/PUT_{id}_request.json new file mode 100644 index 00000000000..14dc7398705 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/PUT_{id}_request.json @@ -0,0 +1,115 @@ +{ + "subdomain": "twiglet-update", + "config": { + "clientLockoutPolicy": { + "lockoutPeriodSeconds": -1, + "lockoutAfterFailures": -1, + "countFailuresWithin": -1 + }, + "tokenPolicy": { + "accessTokenValidity": -1, + "refreshTokenValidity": -1, + "jwtRevocable": false, + "keys": { + "updatedKeyId": { + "signingKey": "upD4t3d.s1gNiNg.K3y/t3XT" + } + } + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600 + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": true + }, + "homeRedirect": "http://my.hosted.homepage.com/", + "selfService": { + "selfServiceLinksEnabled": true, + "signup": "/create_account", + "passwd": "/forgot_password" + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "One Time Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "branding": { + "companyName": "Test Company", + "productLogo": "VGVzdFByb2R1Y3RMb2dv", + "squareLogo": "VGVzdFNxdWFyZUxvZ28=", + "footerLegalText": "Test footer legal text", + "footerLinks": { + "Support": "http://support.example.com" + } + }, + "accountChooserEnabled": false + }, + "name": "The Updated Twiglet Zone", + "version": 0, + "description": "Like the Twilight Zone but not tastier.", + "created": 1481728057246, + "last_modified": 1481728057246 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/PUT_{id}_response.json new file mode 100644 index 00000000000..2d3ecb5ebef --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/identity-zones/PUT_{id}_response.json @@ -0,0 +1,121 @@ +{ + "id": "twiglet-update", + "subdomain": "twiglet-update", + "config": { + "clientLockoutPolicy": { + "lockoutPeriodSeconds": -1, + "lockoutAfterFailures": -1, + "countFailuresWithin": -1 + }, + "tokenPolicy": { + "accessTokenValidity": -1, + "refreshTokenValidity": -1, + "jwtRevocable": false, + "activeKeyId": null, + "keys": { + "updatedKeyId": { + "signingKey": "upD4t3d.s1gNiNg.K3y/t3XT" + } + } + }, + "samlConfig": { + "assertionSigned": true, + "requestSigned": true, + "wantAssertionSigned": true, + "wantAuthnRequestSigned": false, + "assertionTimeToLiveSeconds": 600, + "certificate": null, + "privateKey": null, + "privateKeyPassword": null + }, + "corsPolicy": { + "xhrConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + }, + "defaultConfiguration": { + "allowedOrigins": [ + ".*" + ], + "allowedOriginPatterns": [], + "allowedUris": [ + ".*" + ], + "allowedUriPatterns": [], + "allowedHeaders": [ + "Accept", + "Authorization", + "Content-Type" + ], + "allowedMethods": [ + "GET" + ], + "allowedCredentials": false, + "maxAge": 1728000 + } + }, + "links": { + "logout": { + "redirectUrl": "/login", + "redirectParameterName": "redirect", + "disableRedirectParameter": true, + "whitelist": null + }, + "homeRedirect": "http://my.hosted.homepage.com/", + "selfService": { + "selfServiceLinksEnabled": true, + "signup": "/create_account", + "passwd": "/forgot_password" + } + }, + "prompts": [ + { + "name": "username", + "type": "text", + "text": "Email" + }, + { + "name": "password", + "type": "password", + "text": "Password" + }, + { + "name": "passcode", + "type": "password", + "text": "One Time Code (Get on at /passcode)" + } + ], + "idpDiscoveryEnabled": false, + "branding": { + "companyName": "Test Company", + "productLogo": "VGVzdFByb2R1Y3RMb2dv", + "squareLogo": "VGVzdFNxdWFyZUxvZ28=", + "footerLegalText": "Test footer legal text", + "footerLinks": { + "Support": "http://support.example.com" + } + }, + "accountChooserEnabled": false + }, + "name": "The Updated Twiglet Zone", + "version": 1, + "description": "Like the Twilight Zone but not tastier.", + "created": 1481728057213, + "last_modified": 1481728057259 +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/GET_response.json new file mode 100644 index 00000000000..6c6784819cf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/GET_response.json @@ -0,0 +1,34 @@ +{ + "app": { + "version": "4.7.0-SNAPSHOT" + }, + "showLoginLinks": true, + "links": { + "uaa": "http://localhost:8080/uaa", + "passwd": "/forgot_password", + "login": "http://localhost:8080/uaa", + "register": "/create_account" + }, + "zone_name": "uaa", + "entityID": "cloudfoundry-saml-login", + "commit_id": "4bba13c", + "idpDefinitions": { + "SAMLMetadataUrl": "http://localhost:8080/uaa/saml/discovery?returnIDParam=idp&entityID=cloudfoundry-saml-login&idp=SAMLMetadataUrl&isPassive=true", + "SAML": "http://localhost:8080/uaa/saml/discovery?returnIDParam=idp&entityID=cloudfoundry-saml-login&idp=SAML&isPassive=true" + }, + "prompts": { + "username": [ + "text", + "Email" + ], + "password": [ + "password", + "Password" + ], + "passcode": [ + "password", + "One Time Code ( Get one at http://localhost:8080/uaa/passcode )" + ] + }, + "timestamp": "2017-09-08T23:11:58+0000" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/POST_request.json new file mode 100644 index 00000000000..5e0ce2d4399 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/POST_request.json @@ -0,0 +1,4 @@ +{ + "username": "marissa", + "password": "koala" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/POST_response.json new file mode 100644 index 00000000000..b53ff257ea1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/info/POST_response.json @@ -0,0 +1,4 @@ +{ + "code" : "m0R24i7t2s", + "path" : "/oauth/authorize" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/token_key/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/token_key/GET_response.json new file mode 100644 index 00000000000..265d390175c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/token_key/GET_response.json @@ -0,0 +1,9 @@ +{ + "kid": "testKey", + "alg": "SHA256withRSA", + "value": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0m59l2u9iDnMbrXHfqkO\nrn2dVQ3vfBJqcDuFUK03d+1PZGbVlNCqnkpIJ8syFppW8ljnWweP7+LiWpRoz0I7\nfYb3d8TjhV86Y997Fl4DBrxgM6KTJOuE/uxnoDhZQ14LgOU2ckXjOzOdTsnGMKQB\nLCl0vpcXBtFLMaSbpv1ozi8h7DJyVZ6EnFQZUWGdgTMhDrmqevfx95U/16c5WBDO\nkqwIn7Glry9n9Suxygbf8g5AzpWcusZgDLIIZ7JTUldBb8qU2a0Dl4mvLZOn4wPo\njfj9Cw2QICsc5+Pwf21fP+hzf+1WSRHbnYv8uanRO0gZ8ekGaghM/2H6gqJbo2nI\nJwIDAQAB\n-----END PUBLIC KEY-----", + "kty": "RSA", + "use": "sig", + "n": "ANJufZdrvYg5zG61x36pDq59nVUN73wSanA7hVCtN3ftT2Rm1ZTQqp5KSCfLMhaaVvJY51sHj+/i4lqUaM9CO32G93fE44VfOmPfexZeAwa8YDOikyTrhP7sZ6A4WUNeC4DlNnJF4zsznU7JxjCkASwpdL6XFwbRSzGkm6b9aM4vIewyclWehJxUGVFhnYEzIQ65qnr38feVP9enOVgQzpKsCJ+xpa8vZ/UrscoG3/IOQM6VnLrGYAyyCGeyU1JXQW/KlNmtA5eJry2Tp+MD6I34/QsNkCArHOfj8H9tXz/oc3/tVkkR252L/Lmp0TtIGfHpBmoITP9h+oKiW6NpyCc=", + "e": "AQAB" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/token_keys/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/token_keys/GET_response.json new file mode 100644 index 00000000000..5c5b8cf944f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/token_keys/GET_response.json @@ -0,0 +1,13 @@ +{ + "keys": [ + { + "kid": "testKey", + "alg": "SHA256withRSA", + "value": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA0m59l2u9iDnMbrXHfqkO\nrn2dVQ3vfBJqcDuFUK03d+1PZGbVlNCqnkpIJ8syFppW8ljnWweP7+LiWpRoz0I7\nfYb3d8TjhV86Y997Fl4DBrxgM6KTJOuE/uxnoDhZQ14LgOU2ckXjOzOdTsnGMKQB\nLCl0vpcXBtFLMaSbpv1ozi8h7DJyVZ6EnFQZUWGdgTMhDrmqevfx95U/16c5WBDO\nkqwIn7Glry9n9Suxygbf8g5AzpWcusZgDLIIZ7JTUldBb8qU2a0Dl4mvLZOn4wPo\njfj9Cw2QICsc5+Pwf21fP+hzf+1WSRHbnYv8uanRO0gZ8ekGaghM/2H6gqJbo2nI\nJwIDAQAB\n-----END PUBLIC KEY-----", + "kty": "RSA", + "use": "sig", + "n": "ANJufZdrvYg5zG61x36pDq59nVUN73wSanA7hVCtN3ftT2Rm1ZTQqp5KSCfLMhaaVvJY51sHj+/i4lqUaM9CO32G93fE44VfOmPfexZeAwa8YDOikyTrhP7sZ6A4WUNeC4DlNnJF4zsznU7JxjCkASwpdL6XFwbRSzGkm6b9aM4vIewyclWehJxUGVFhnYEzIQ65qnr38feVP9enOVgQzpKsCJ+xpa8vZ/UrscoG3/IOQM6VnLrGYAyyCGeyU1JXQW/KlNmtA5eJry2Tp+MD6I34/QsNkCArHOfj8H9tXz/oc3/tVkkR252L/Lmp0TtIGfHpBmoITP9h+oKiW6NpyCc=", + "e": "AQAB" + } + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_refresh_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_refresh_response.json new file mode 100644 index 00000000000..e1152bdb691 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_refresh_response.json @@ -0,0 +1,8 @@ +{ + "access_token": "eyJhbGciOiJIUzI1NiIsImtpZCI6Imx", + "token_type": "bearer", + "refresh_token": "eyJhbGciOiJIUzI1NiIsImtpZCI6Imx_E", + "expires_in": 43199, + "scope": "scim.userids cloud_controller.read password.write cloud_controller.write openid", + "jti": "6af5fc07a8b74c2eafb0079ff477bb11" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_AC.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_AC.json new file mode 100644 index 00000000000..401be6799c6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_AC.json @@ -0,0 +1,8 @@ +{ + "access_token": "555e2047bbc849628ff8cbfa7b342274", + "token_type": "bearer", + "refresh_token": "555e2047bbc849628ff8cbfa7b342274-r", + "expires_in": 43199, + "scope": "openid oauth.approvals", + "jti": "555e2047bbc849628ff8cbfa7b342274" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_CC.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_CC.json new file mode 100644 index 00000000000..55f6653af9e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_CC.json @@ -0,0 +1,7 @@ +{ + "access_token": "f87f93a2666d4e6eaa54e34df86d160c", + "token_type": "bearer", + "expires_in": 43199, + "scope": "clients.read emails.write scim.userids password.write idps.write notifications.write oauth.login scim.write critical_notifications.write", + "jti": "f87f93a2666d4e6eaa54e34df86d160c" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_OI.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_OI.json new file mode 100644 index 00000000000..4b32c4bbac0 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_OI.json @@ -0,0 +1,9 @@ +{ + "access_token": "53a58e6581ee49d08f9e572f673bc8db", + "token_type": "bearer", + "id_token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImxlZ2FjeS10b2tlbi1rZXkiLC", + "refresh_token": "53a58e6581ee49d08f9e572f673bc8db-r", + "expires_in": 43199, + "scope": "openid oauth.approvals", + "jti": "53a58e6581ee49d08f9e572f673bc8db" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_OT.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_OT.json new file mode 100644 index 00000000000..5eeaa5de4ae --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_OT.json @@ -0,0 +1,8 @@ +{ + "access_token": "0ddcada64ef742a28badaf4750ef435f", + "token_type": "bearer", + "refresh_token": "0ddcada64ef742a28badaf4750ef435f-r", + "expires_in": 43199, + "scope": "scim.userids openid cloud_controller.read password.write cloud_controller.write", + "jti": "0ddcada64ef742a28badaf4750ef435f" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_PW.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_PW.json new file mode 100644 index 00000000000..5f26b1ee97a --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/tokens/GET_response_PW.json @@ -0,0 +1,8 @@ +{ + "access_token": "cd37a35114084fafb83d21c6f2af0e84", + "token_type": "bearer", + "refresh_token": "cd37a35114084fafb83d21c6f2af0e84-r", + "expires_in": 43199, + "scope": "scim.userids openid cloud_controller.read password.write cloud_controller.write", + "jti": "cd37a35114084fafb83d21c6f2af0e84" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/DELETE_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/DELETE_response.json new file mode 100644 index 00000000000..3468b9b94af --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/DELETE_response.json @@ -0,0 +1,113 @@ +{ + "id": "421225f4-318e-4a4d-9219-4b6a0ed3678a", + "externalId": "test-user", + "meta": { + "version": 0, + "created": "2016-05-18T18:25:23.102Z", + "lastModified": "2016-05-18T18:25:23.102Z" + }, + "userName": "7Q4Rqr@test.org", + "name": { + "familyName": "family name", + "givenName": "given name" + }, + "emails": [ + { + "value": "7Q4Rqr@test.org", + "primary": false + } + ], + "groups": [ + { + "value": "4622c5e1-ddfd-4e17-9e81-2ae3c03972be", + "display": "password.write", + "type": "DIRECT" + }, + { + "value": "62f67643-05d8-43c6-b193-4cd6ab9960cb", + "display": "cloud_controller.write", + "type": "DIRECT" + }, + { + "value": "c47bf470-f9c4-4eea-97e4-490ce7b8f6f7", + "display": "uaa.user", + "type": "DIRECT" + }, + { + "value": "8a6add1f-d3ee-400c-a263-c4197351b78e", + "display": "approvals.me", + "type": "DIRECT" + }, + { + "value": "e10424ed-ed80-45ac-848b-7f7e79b00c42", + "display": "cloud_controller.read", + "type": "DIRECT" + }, + { + "value": "ede11441-6ffe-4510-81f8-bb40626155f0", + "display": "openid", + "type": "DIRECT" + }, + { + "value": "7e3d4b06-0d6b-43a1-ac3a-5f1b2642262c", + "display": "scim.me", + "type": "DIRECT" + }, + { + "value": "3b481f3c-d9a7-4920-a687-72cb0381b671", + "display": "cloud_controller_service_permissions.read", + "type": "DIRECT" + }, + { + "value": "4480c647-4047-4c6a-877f-70f5f96e8c11", + "display": "oauth.approvals", + "type": "DIRECT" + }, + { + "value": "542bb178-1c04-4bb5-813a-5a038319ac1d", + "display": "user_attributes", + "type": "DIRECT" + }, + { + "value": "c4ac4653-2fdd-4901-a028-9c9866cb4e9c", + "display": "scim.userids", + "type": "DIRECT" + }, + { + "value": "74fde138-daf3-4e4d-bb52-93a6cb727030", + "display": "profile", + "type": "DIRECT" + }, + { + "value": "1b18551f-eead-4076-90dd-b464998f6ddd", + "display": "roles", + "type": "DIRECT" + } + ], + "approvals": [ + { + "userId": "421225f4-318e-4a4d-9219-4b6a0ed3678a", + "clientId": "identity", + "scope": "uaa.user", + "status": "APPROVED", + "lastUpdatedAt": "2016-05-18T18:25:53.114Z", + "expiresAt": "2016-05-18T18:25:53.114Z" + }, + { + "userId": "421225f4-318e-4a4d-9219-4b6a0ed3678a", + "clientId": "client id", + "scope": "scim.read", + "status": "APPROVED", + "lastUpdatedAt": "2016-05-18T18:25:23.112Z", + "expiresAt": "2016-05-18T18:25:33.112Z" + } + ], + "active": true, + "verified": true, + "origin": "uaa", + "zoneId": "uaa", + "passwordLastModified": "2016-05-18T18:25:23.000Z", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_ids_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_ids_response.json new file mode 100644 index 00000000000..3363c9d2fea --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_ids_response.json @@ -0,0 +1,20 @@ +{ + "resources": [ + { + "id": "c1476587-5ec9-4b7e-9ed2-381e3133f07a", + "userName": "dwayneSnbjBm@test.org", + "origin": "uaa" + }, + { + "id": "2fc67623-ee31-4edc-9b1f-0b50416195fb", + "userName": "bobOu38vE@test.org", + "origin": "uaa" + } + ], + "startIndex": 1, + "itemsPerPage": 10, + "totalResults": 2, + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_response.json new file mode 100644 index 00000000000..8be5a5ede4b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_response.json @@ -0,0 +1,115 @@ +{ + "resources": [ + { + "id": "a94534d5-de08-41eb-8712-a51314e6a484", + "externalId": "test-user", + "meta": { + "version": 0, + "created": "2016-05-18T18:25:24.036Z", + "lastModified": "2016-05-18T18:25:24.036Z" + }, + "userName": "Da63pG@test.org", + "name": { + "familyName": "family name", + "givenName": "given name" + }, + "emails": [ + { + "value": "Da63pG@test.org", + "primary": false + } + ], + "groups": [ + { + "value": "4622c5e1-ddfd-4e17-9e81-2ae3c03972be", + "display": "password.write", + "type": "DIRECT" + }, + { + "value": "62f67643-05d8-43c6-b193-4cd6ab9960cb", + "display": "cloud_controller.write", + "type": "DIRECT" + }, + { + "value": "c47bf470-f9c4-4eea-97e4-490ce7b8f6f7", + "display": "uaa.user", + "type": "DIRECT" + }, + { + "value": "8a6add1f-d3ee-400c-a263-c4197351b78e", + "display": "approvals.me", + "type": "DIRECT" + }, + { + "value": "e10424ed-ed80-45ac-848b-7f7e79b00c42", + "display": "cloud_controller.read", + "type": "DIRECT" + }, + { + "value": "ede11441-6ffe-4510-81f8-bb40626155f0", + "display": "openid", + "type": "DIRECT" + }, + { + "value": "7e3d4b06-0d6b-43a1-ac3a-5f1b2642262c", + "display": "scim.me", + "type": "DIRECT" + }, + { + "value": "3b481f3c-d9a7-4920-a687-72cb0381b671", + "display": "cloud_controller_service_permissions.read", + "type": "DIRECT" + }, + { + "value": "4480c647-4047-4c6a-877f-70f5f96e8c11", + "display": "oauth.approvals", + "type": "DIRECT" + }, + { + "value": "542bb178-1c04-4bb5-813a-5a038319ac1d", + "display": "user_attributes", + "type": "DIRECT" + }, + { + "value": "c4ac4653-2fdd-4901-a028-9c9866cb4e9c", + "display": "scim.userids", + "type": "DIRECT" + }, + { + "value": "74fde138-daf3-4e4d-bb52-93a6cb727030", + "display": "profile", + "type": "DIRECT" + }, + { + "value": "1b18551f-eead-4076-90dd-b464998f6ddd", + "display": "roles", + "type": "DIRECT" + } + ], + "approvals": [ + { + "userId": "a94534d5-de08-41eb-8712-a51314e6a484", + "clientId": "client id", + "scope": "scim.read", + "status": "APPROVED", + "lastUpdatedAt": "2016-05-18T18:25:24.047Z", + "expiresAt": "2016-05-18T18:25:34.047Z" + } + ], + "active": true, + "verified": true, + "origin": "uaa", + "zoneId": "uaa", + "passwordLastModified": "2016-05-18T18:25:24.000Z", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] + } + ], + "startIndex": 1, + "itemsPerPage": 50, + "totalResults": 1, + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_userinfo_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_userinfo_response.json new file mode 100644 index 00000000000..252811f6faa --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_userinfo_response.json @@ -0,0 +1,12 @@ +{ + "user_id" : "ab485a4f-168a-4de8-b3ac-ab501767bfc9", + "user_name" : "anO0Lv@test.org", + "name" : "PasswordResetUserFirst PasswordResetUserLast", + "given_name" : "PasswordResetUserFirst", + "family_name" : "PasswordResetUserLast", + "phone_number" : "+15558880000", + "email" : "anO0Lv@test.org", + "email_verified" : true, + "previous_logon_time" : null, + "sub" : "ab485a4f-168a-4de8-b3ac-ab501767bfc9" +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_{id}_verify_link_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_{id}_verify_link_response.json new file mode 100644 index 00000000000..8c6b46ad6c7 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_{id}_verify_link_response.json @@ -0,0 +1,3 @@ +{ + "verify_link": "http://localhost/verify_user?code=nOGQWBqCx5" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_{id}_verify_user_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_{id}_verify_user_response.json new file mode 100644 index 00000000000..a9cd69a18bf --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/GET_{id}_verify_user_response.json @@ -0,0 +1,27 @@ +{ + "id": "c0d42e48-9b69-461d-a77b-f75d3a5948b6", + "meta": { + "version": 12, + "created": "2016-06-03T17:59:31.027Z", + "lastModified": "2016-06-03T17:59:31.027Z" + }, + "userName": "billy_o@example.com", + "name": { + "familyName": "d'Orange", + "givenName": "William" + }, + "emails": [ + { + "value": "billy_o@example.com", + "primary": false + } + ], + "active": true, + "verified": true, + "origin": "uaa", + "zoneId": "uaa", + "passwordLastModified": "2016-06-03T17:59:31.000Z", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PATCH_{id}_status_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PATCH_{id}_status_request.json new file mode 100644 index 00000000000..09f15121224 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PATCH_{id}_status_request.json @@ -0,0 +1,3 @@ +{ + "passwordChangeRequired": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PATCH_{id}_status_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PATCH_{id}_status_response.json new file mode 100644 index 00000000000..09f15121224 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PATCH_{id}_status_response.json @@ -0,0 +1,3 @@ +{ + "passwordChangeRequired": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_invite_users_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_invite_users_request.json new file mode 100644 index 00000000000..2403dc33860 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_invite_users_request.json @@ -0,0 +1,6 @@ +{ + "emails": [ + "user1@pjy596.com", + "user2@pjy596.com" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_invite_users_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_invite_users_response.json new file mode 100644 index 00000000000..b5d7d22592f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_invite_users_response.json @@ -0,0 +1,23 @@ +{ + "new_invites": [ + { + "email": "user1@pjy596.com", + "userId": "68af461b-484e-464a-96ac-a336abed48ad", + "origin": "uaa", + "success": true, + "errorCode": null, + "errorMessage": null, + "inviteLink": "http://localhost/invitations/accept?code=WEqtpOh73k" + }, + { + "email": "user2@pjy596.com", + "userId": "d256cf96-5c14-4649-9a0d-5564c66411b5", + "origin": "uaa", + "success": true, + "errorCode": null, + "errorMessage": null, + "inviteLink": "http://localhost/invitations/accept?code=n5X0hCsD3N" + } + ], + "failed_invites": [] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_request.json new file mode 100644 index 00000000000..6697652b50b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_request.json @@ -0,0 +1,23 @@ +{ + "externalId": "test-user", + "userName": "ZO6FEI@test.org", + "name": { + "familyName": "family name", + "givenName": "given name" + }, + "emails": [ + { + "value": "ZO6FEI@test.org", + "primary": true + } + ], + "phoneNumbers": [ + { + "value": "5555555555" + } + ], + "active": true, + "verified": true, + "origin": "", + "password": "secret" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_response.json new file mode 100644 index 00000000000..beedb99e08e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/POST_response.json @@ -0,0 +1,101 @@ +{ + "id": "9d175c69-8f25-4460-82d7-be9657f87a68", + "externalId": "test-user", + "meta": { + "version": 0, + "created": "2016-05-18T18:25:24.559Z", + "lastModified": "2016-05-18T18:25:24.559Z" + }, + "userName": "ZO6FEI@test.org", + "name": { + "familyName": "family name", + "givenName": "given name" + }, + "emails": [ + { + "value": "ZO6FEI@test.org", + "primary": false + } + ], + "phoneNumbers": [ + { + "value": "5555555555" + } + ], + "groups": [ + { + "value": "4622c5e1-ddfd-4e17-9e81-2ae3c03972be", + "display": "password.write", + "type": "DIRECT" + }, + { + "value": "62f67643-05d8-43c6-b193-4cd6ab9960cb", + "display": "cloud_controller.write", + "type": "DIRECT" + }, + { + "value": "c47bf470-f9c4-4eea-97e4-490ce7b8f6f7", + "display": "uaa.user", + "type": "DIRECT" + }, + { + "value": "8a6add1f-d3ee-400c-a263-c4197351b78e", + "display": "approvals.me", + "type": "DIRECT" + }, + { + "value": "e10424ed-ed80-45ac-848b-7f7e79b00c42", + "display": "cloud_controller.read", + "type": "DIRECT" + }, + { + "value": "ede11441-6ffe-4510-81f8-bb40626155f0", + "display": "openid", + "type": "DIRECT" + }, + { + "value": "7e3d4b06-0d6b-43a1-ac3a-5f1b2642262c", + "display": "scim.me", + "type": "DIRECT" + }, + { + "value": "3b481f3c-d9a7-4920-a687-72cb0381b671", + "display": "cloud_controller_service_permissions.read", + "type": "DIRECT" + }, + { + "value": "4480c647-4047-4c6a-877f-70f5f96e8c11", + "display": "oauth.approvals", + "type": "DIRECT" + }, + { + "value": "542bb178-1c04-4bb5-813a-5a038319ac1d", + "display": "user_attributes", + "type": "DIRECT" + }, + { + "value": "c4ac4653-2fdd-4901-a028-9c9866cb4e9c", + "display": "scim.userids", + "type": "DIRECT" + }, + { + "value": "74fde138-daf3-4e4d-bb52-93a6cb727030", + "display": "profile", + "type": "DIRECT" + }, + { + "value": "1b18551f-eead-4076-90dd-b464998f6ddd", + "display": "roles", + "type": "DIRECT" + } + ], + "approvals": [], + "active": true, + "verified": true, + "origin": "uaa", + "zoneId": "uaa", + "passwordLastModified": "2016-05-18T18:25:24.000Z", + "schemas": [ + "urn:scim:schemas:core:1.0" + ] +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_request.json new file mode 100644 index 00000000000..3f77cea45a5 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_request.json @@ -0,0 +1,4 @@ +{ + "oldPassword": "secret", + "password": "newsecret" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_response.json new file mode 100644 index 00000000000..1ad43649a7f --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_response.json @@ -0,0 +1,4 @@ +{ + "status": "ok", + "message": "password updated" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_{id}_request.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_{id}_request.json new file mode 100644 index 00000000000..4ca10b700d4 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_{id}_request.json @@ -0,0 +1,22 @@ +{ + "active": true, + "emails": [ + { + "value": "oH4jON@test.org", + "primary": false + } + ], + "phoneNumbers": [ + { + "value": "5555555555" + } + ], + "externalId": "test-user", + "name": { + "familyName": "family name", + "givenName": "given name" + }, + "origin": "uaa", + "userName": "oH4jON@test.org", + "verified": true +} \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_{id}_response.json b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_{id}_response.json new file mode 100644 index 00000000000..91acbfc30d6 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/fixtures/uaa/users/PUT_{id}_response.json @@ -0,0 +1,68 @@ +{ + "active": true, + "approvals": [ + { + "clientId": "identity", + "expiresAt": "2016-05-18T18:25:54.239Z", + "lastUpdatedAt": "2016-05-18T18:25:54.239Z", + "scope": "uaa.user", + "status": "DENIED", + "userId": "test-user-id" + }, + { + "clientId": "client id", + "expiresAt": "2016-05-18T18:25:34.236Z", + "lastUpdatedAt": "2016-05-18T18:25:34.236Z", + "scope": "scim.read", + "status": "APPROVED", + "userId": "test-user-id" + } + ], + "id": "test-user-id", + "emails": [ + { + "value": "oH4jON@test.org", + "primary": false + } + ], + "phoneNumbers": [ + { + "value": "5555555555" + } + ], + "externalId": "test-user", + "groups": [ + { + "display": "password.write", + "value": "4622c5e1-ddfd-4e17-9e81-2ae3c03972be", + "type": "DIRECT" + }, + { + "display": "cloud_controller.write", + "value": "62f67643-05d8-43c6-b193-4cd6ab9960cb", + "type": "DIRECT" + }, + { + "display": "uaa.user", + "value": "c47bf470-f9c4-4eea-97e4-490ce7b8f6f7", + "type": "DIRECT" + } + ], + "meta": { + "version": 1, + "created": "2016-05-18T18:25:24.222Z", + "lastModified": "2016-05-18T18:25:24.265Z" + }, + "name": { + "familyName": "family name", + "givenName": "given name" + }, + "origin": "uaa", + "passwordLastModified": "2016-05-18T18:25:24.000Z", + "schemas": [ + "urn:scim:schemas:core:1.0" + ], + "userName": "oH4jON@test.org", + "verified": true, + "zoneId": "uaa" +} diff --git a/cloudfoundry-client-reactor/src/test/resources/logback-test.xml b/cloudfoundry-client-reactor/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..3080ca29a2e --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/logback-test.xml @@ -0,0 +1,37 @@ + + + + + + + + %-27thread %-37logger %msg%n + + + + + + + + + + + + + + + diff --git a/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/all-data.txt b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/all-data.txt new file mode 100644 index 00000000000..6dbc0f8cee9 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/all-data.txt @@ -0,0 +1,6 @@ +data: This is the first message. + +data: This is the second message, it +data: has two lines. + +data: This is the third message. diff --git a/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/colon-spacing.txt b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/colon-spacing.txt new file mode 100644 index 00000000000..b9da95d51d3 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/colon-spacing.txt @@ -0,0 +1,3 @@ +data:test + +data: test diff --git a/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/random-colons.txt b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/random-colons.txt new file mode 100644 index 00000000000..14eca64dedd --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/random-colons.txt @@ -0,0 +1,6 @@ +data + +data +data + +data: \ No newline at end of file diff --git a/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/three-lines.txt b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/three-lines.txt new file mode 100644 index 00000000000..3d7e0f431f1 --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/three-lines.txt @@ -0,0 +1,3 @@ +data: YHOO +data: +2 +data: 10 diff --git a/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/with-comment.txt b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/with-comment.txt new file mode 100644 index 00000000000..ddc76e11d7b --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/with-comment.txt @@ -0,0 +1,9 @@ +: test stream + +data: first event +id: 1 + +data:second event +id + +data: third event diff --git a/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/with-event-types.txt b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/with-event-types.txt new file mode 100644 index 00000000000..8c5e271e97c --- /dev/null +++ b/cloudfoundry-client-reactor/src/test/resources/org/cloudfoundry/reactor/routing/v1/tcproutes/with-event-types.txt @@ -0,0 +1,8 @@ +event: add +data: 73857293 + +event: remove +data: 2153 + +event: add +data: 113411 diff --git a/cloudfoundry-client/pom.xml b/cloudfoundry-client/pom.xml new file mode 100644 index 00000000000..6b1bbd3dc86 --- /dev/null +++ b/cloudfoundry-client/pom.xml @@ -0,0 +1,128 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + cloudfoundry-client + Cloud Foundry Java Client + jar + + + + com.fasterxml.jackson.core + jackson-annotations + provided + + + com.fasterxml.jackson.core + jackson-databind + provided + + + com.squareup.wire + wire-runtime${wire.suffix} + + + org.springframework.boot + spring-boot-starter-test + test + + + io.projectreactor + reactor-core + + + org.assertj + assertj-core + test + + + org.immutables + value + provided + + + + + + + com.squareup.wire + wire-maven-plugin + + + envelope.proto + error.proto + http.proto + log.proto + metric.proto + uuid.proto + + ${project.basedir}/../vendor/dropsonde-protocol/events + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.cloudfoundry.client + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + -missing + + org/cloudfoundry/dropsonde/events/* + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/AbstractCloudFoundryException.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/AbstractCloudFoundryException.java new file mode 100644 index 00000000000..ca55abf2588 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/AbstractCloudFoundryException.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +/** + * An abstract base class for all Cloud Foundry-specific exceptions + */ +public abstract class AbstractCloudFoundryException extends RuntimeException { + + private static final long serialVersionUID = -3767690104362198649L; + + private final Integer statusCode; + + /** + * Creates a new instance + * + * @param statusCode the status code + */ + protected AbstractCloudFoundryException(Integer statusCode, String message) { + super(message); + this.statusCode = statusCode; + } + + /** + * Returns the status code of the error + */ + public int getStatusCode() { + return this.statusCode; + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/AllowNulls.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/AllowNulls.java new file mode 100644 index 00000000000..af4091eb1da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/AllowNulls.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +public @interface AllowNulls {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/Nullable.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/Nullable.java new file mode 100644 index 00000000000..eb6119003c9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/Nullable.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER}) +@Retention(RetentionPolicy.RUNTIME) +public @interface Nullable {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/QueryParameter.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/QueryParameter.java new file mode 100644 index 00000000000..ede26c1e09d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/QueryParameter.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation indicating that a method represents a query parameter + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@JsonIgnore +@JacksonAnnotationsInside +public @interface QueryParameter { + + /** + * Returns the delimiter to use between Iterable elements + * + * @return the delimiter to use between Iterable elements + */ + String delimiter() default ","; + + /** + * Returns the name of the query parameter + * + * @return the name of the query parameter + */ + String value(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/UnknownCloudFoundryException.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/UnknownCloudFoundryException.java new file mode 100644 index 00000000000..27053084cdb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/UnknownCloudFoundryException.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +/** + * An exception representing a Cloud Foundry error that cannot be mapped to any other error. + */ +public final class UnknownCloudFoundryException extends AbstractCloudFoundryException { + + private static final long serialVersionUID = 7543981972741374552L; + + private final String payload; + + /** + * Creates a new instance + * + * @param statusCode the status code + * @param payload the payload of the error + */ + public UnknownCloudFoundryException(Integer statusCode, String payload) { + super(statusCode, "Unknown Cloud Foundry Exception"); + this.payload = payload; + } + + /** + * Creates a new instance + * + * @param statusCode the status code + */ + public UnknownCloudFoundryException(Integer statusCode) { + this(statusCode, null); + } + + /** + * Returns the payload of the error + */ + public String getPayload() { + return this.payload; + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java new file mode 100644 index 00000000000..0f85e973e52 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/CloudFoundryClient.java @@ -0,0 +1,384 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client; + +import org.cloudfoundry.client.v2.applications.ApplicationsV2; +import org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEvents; +import org.cloudfoundry.client.v2.blobstores.Blobstores; +import org.cloudfoundry.client.v2.buildpacks.Buildpacks; +import org.cloudfoundry.client.v2.domains.Domains; +import org.cloudfoundry.client.v2.environmentvariablegroups.EnvironmentVariableGroups; +import org.cloudfoundry.client.v2.events.Events; +import org.cloudfoundry.client.v2.featureflags.FeatureFlags; +import org.cloudfoundry.client.v2.info.Info; +import org.cloudfoundry.client.v2.jobs.Jobs; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitions; +import org.cloudfoundry.client.v2.organizations.Organizations; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomains; +import org.cloudfoundry.client.v2.resourcematch.ResourceMatch; +import org.cloudfoundry.client.v2.routemappings.RouteMappings; +import org.cloudfoundry.client.v2.routes.Routes; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroups; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingsV2; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokers; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstances; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeys; +import org.cloudfoundry.client.v2.serviceplans.ServicePlans; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilities; +import org.cloudfoundry.client.v2.services.Services; +import org.cloudfoundry.client.v2.serviceusageevents.ServiceUsageEvents; +import org.cloudfoundry.client.v2.shareddomains.SharedDomains; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitions; +import org.cloudfoundry.client.v2.spaces.Spaces; +import org.cloudfoundry.client.v2.stacks.Stacks; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstances; +import org.cloudfoundry.client.v2.users.Users; +import org.cloudfoundry.client.v3.admin.AdminV3; +import org.cloudfoundry.client.v3.applications.ApplicationsV3; +import org.cloudfoundry.client.v3.auditevents.AuditEventsV3; +import org.cloudfoundry.client.v3.buildpacks.BuildpacksV3; +import org.cloudfoundry.client.v3.builds.Builds; +import org.cloudfoundry.client.v3.deployments.DeploymentsV3; +import org.cloudfoundry.client.v3.domains.DomainsV3; +import org.cloudfoundry.client.v3.droplets.Droplets; +import org.cloudfoundry.client.v3.isolationsegments.IsolationSegments; +import org.cloudfoundry.client.v3.jobs.JobsV3; +import org.cloudfoundry.client.v3.organizations.OrganizationsV3; +import org.cloudfoundry.client.v3.packages.Packages; +import org.cloudfoundry.client.v3.processes.Processes; +import org.cloudfoundry.client.v3.quotas.organizations.OrganizationQuotasV3; +import org.cloudfoundry.client.v3.quotas.spaces.SpaceQuotasV3; +import org.cloudfoundry.client.v3.resourcematch.ResourceMatchV3; +import org.cloudfoundry.client.v3.roles.RolesV3; +import org.cloudfoundry.client.v3.routes.RoutesV3; +import org.cloudfoundry.client.v3.securitygroups.SecurityGroupsV3; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingsV3; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokersV3; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstancesV3; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingsV3; +import org.cloudfoundry.client.v3.serviceplans.ServicePlansV3; +import org.cloudfoundry.client.v3.spaces.SpacesV3; +import org.cloudfoundry.client.v3.stacks.StacksV3; +import org.cloudfoundry.client.v3.tasks.Tasks; +import org.cloudfoundry.client.v3.users.UsersV3; + +/** + * Main entry point to the Cloud Foundry Client API + */ +public interface CloudFoundryClient { + + /** + * The currently supported Cloud Controller API version + */ + String SUPPORTED_API_VERSION = "2.272.0"; + + /** + * Main entry point to the Cloud Foundry Application Usage Events Client API + */ + AdminV3 adminV3(); + + /** + * Main entry point to the Cloud Foundry Application Usage Events Client API + */ + ApplicationUsageEvents applicationUsageEvents(); + + /** + * Main entry point to the Cloud Foundry Applications V2 Client API + */ + ApplicationsV2 applicationsV2(); + + /** + * Main entry point to the Cloud Foundry Applications V3 Client API + */ + ApplicationsV3 applicationsV3(); + + /** + * Main entry point to the Cloud Foundry Audit Events V3 Client API + */ + AuditEventsV3 auditEventsV3(); + + /** + * Main entry point to the Cloud Foundry Blobstores Client API + */ + Blobstores blobstores(); + + /** + * Main entry point to the Cloud Foundry Buildpacks Client API + */ + Buildpacks buildpacks(); + + /** + * Main entry point to the Cloud Foundry Buildpacks V3 Client API + */ + BuildpacksV3 buildpacksV3(); + + /** + * Main entry point to the Cloud Foundry Builds Client API + */ + Builds builds(); + + /** + * Main entry point to the Cloud Foundry Deployments V3 Client API + */ + DeploymentsV3 deploymentsV3(); + + /** + * Main entry point to the Cloud Foundry Domains Client API + */ + Domains domains(); + + /** + * Main entry point to the Cloud Foundry Domains V3 Client API + */ + DomainsV3 domainsV3(); + + /** + * Main entry point to the Cloud Foundry Droplets Client API + */ + Droplets droplets(); + + /*** + * Main entry point to the Cloud Foundry Environment Variable Groups Client API + */ + EnvironmentVariableGroups environmentVariableGroups(); + + /** + * Main entry point to the Cloud Foundry Events Client API + */ + Events events(); + + /** + * Main entry point to the Cloud Foundry Feature Flags Client API + */ + FeatureFlags featureFlags(); + + /** + * Main entry point to the Cloud Foundry Info Client API + */ + Info info(); + + /** + * Main entry point to the Cloud Foundry Isolation Segments API + */ + IsolationSegments isolationSegments(); + + /** + * Main entry point to the Cloud Foundry Jobs Client API + */ + Jobs jobs(); + + /** + * Main entry point to the Cloud Foundry Jobs V3 Client API + */ + JobsV3 jobsV3(); + + /** + * Main entry point to the Cloud Foundry Quota Definitions Client API + */ + OrganizationQuotaDefinitions organizationQuotaDefinitions(); + + /** + * Main entry point to the Cloud Foundry Quota V3 Client API + */ + OrganizationQuotasV3 organizationQuotasV3(); + + /** + * Main entry point to the Cloud Foundry Organizations V2 Client API + */ + Organizations organizations(); + + /** + * Main entry point to the Cloud Foundry Organizations V3 Client API + */ + OrganizationsV3 organizationsV3(); + + /** + * Main entry point to the Cloud Foundry Packages Client API + */ + Packages packages(); + + /** + * Main entry point to the Cloud Foundry Private Domains Client API + */ + PrivateDomains privateDomains(); + + /** + * Main entry point to the Cloud Foundry Processes Client API + */ + Processes processes(); + + /** + * Main entry point to the Cloud Foundry Resource Match Client API + */ + ResourceMatch resourceMatch(); + + /** + * Main entry point to the Cloud Foundry Resource Match V3 Client API + */ + ResourceMatchV3 resourceMatchV3(); + + /** + * Main entry point to the Cloud Foundry Roles V3 Client API + */ + RolesV3 rolesV3(); + + /** + * Main entry point to the Cloud Foundry Route Mappings Client API + */ + RouteMappings routeMappings(); + + /** + * Main entry point to the Cloud Foundry Routes Client API + */ + Routes routes(); + + /** + * Main entry point to the Cloud Foundry Routes V3 Client API + */ + RoutesV3 routesV3(); + + /** + * Main entry point to the Cloud Foundry Security Groups Client API + */ + SecurityGroups securityGroups(); + + /** + * Main entry point to the Cloud Foundry Security Groups V3 Client API + */ + SecurityGroupsV3 securityGroupsV3(); + + /** + * Main entry point to the Cloud Foundry Service Bindings V2 Client API + */ + ServiceBindingsV2 serviceBindingsV2(); + + /** + * Main entry point to the Cloud Foundry Service Bindings V3 Client API + */ + ServiceBindingsV3 serviceBindingsV3(); + + /** + * Main entry point to the Cloud Foundry Service Brokers Client API + */ + ServiceBrokers serviceBrokers(); + + /** + * Main entry point to the Cloud Foundry Service Brokers V3 Client API + */ + ServiceBrokersV3 serviceBrokersV3(); + + /** + * Main entry point to the Cloud Foundry Service Instances Client API + */ + ServiceInstances serviceInstances(); + + /** + * Main entry point to the Cloud Foundry Service Instances V3 Client API + */ + ServiceInstancesV3 serviceInstancesV3(); + + /** + * Main entry point to the Cloud Foundry Service Keys Client API + */ + ServiceKeys serviceKeys(); + + /** + * Main entry point to the Cloud Foundry Service Offerings V3 Client API + */ + ServiceOfferingsV3 serviceOfferingsV3(); + + /** + * Main entry point to the Cloud Foundry Service Plan Visibilities Client API + */ + ServicePlanVisibilities servicePlanVisibilities(); + + /** + * Main entry point to the Cloud Foundry Service Plans Client API + */ + ServicePlans servicePlans(); + + /** + * Main entry point to the Cloud Foundry Service Plans V3 Client API + */ + ServicePlansV3 servicePlansV3(); + + /** + * Main entry point to the Cloud Foundry Service Usage Events Client API + */ + ServiceUsageEvents serviceUsageEvents(); + + /** + * Main entry point to the Cloud Foundry Services Client API + */ + Services services(); + + /** + * Main entry point to the Cloud Foundry Shared Domains Client API + */ + SharedDomains sharedDomains(); + + /** + * Main entry point to the Cloud Foundry Space Quota Definitions Client API + */ + SpaceQuotaDefinitions spaceQuotaDefinitions(); + + /** + * Main entry point to the Cloud Foundry Space V3 Client API + */ + SpaceQuotasV3 spaceQuotasV3(); + + /** + * Main entry point to the Cloud Foundry Spaces V2 Client API + */ + Spaces spaces(); + + /** + * Main entry point to the Cloud Foundry Spaces V3 Client API + */ + SpacesV3 spacesV3(); + + /** + * Main entry point to the Cloud Foundry Stacks Client API + */ + Stacks stacks(); + + /** + * Main entry point to the Cloud Foundry Stacks V3 Client API + */ + StacksV3 stacksV3(); + + /** + * Main entry point to the Cloud Foundry Tasks Client API + */ + Tasks tasks(); + + /** + * Main entry point to the Cloud Foundry User Provided Service Instances Client + * API + */ + UserProvidedServiceInstances userProvidedServiceInstances(); + + /** + * Main entry point to the Cloud Foundry Users Client API + */ + Users users(); + + /** + * Main entry point to the Cloud Foundry Users V3 Client API + */ + UsersV3 usersV3(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/ClientV2Exception.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/ClientV2Exception.java new file mode 100644 index 00000000000..3b0d9d6090e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/ClientV2Exception.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import org.cloudfoundry.AbstractCloudFoundryException; + +/** + * An exception encapsulating an error returned from Cloud Foundry V2 APIs + */ +public final class ClientV2Exception extends AbstractCloudFoundryException { + + private static final long serialVersionUID = -5211312680168239905L; + + private final Integer code; + + private final String description; + + private final String errorCode; + + /** + * Creates a new instance + * + * @param statusCode the status code + * @param code the code + * @param description the description + * @param errorCode the error code + */ + public ClientV2Exception( + Integer statusCode, Integer code, String description, String errorCode) { + super(statusCode, String.format("%s(%d): %s", errorCode, code, description)); + this.code = code; + this.description = description; + this.errorCode = errorCode; + } + + /** + * Returns the code + */ + public Integer getCode() { + return this.code; + } + + /** + * Returns the description + */ + public String getDescription() { + return this.description; + } + + /** + * Returns the error code + */ + public String getErrorCode() { + return this.errorCode; + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/FilterParameter.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/FilterParameter.java new file mode 100644 index 00000000000..ff42d48fabe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/FilterParameter.java @@ -0,0 +1,105 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.client.v2.FilterParameter.Operation.IN; +import static org.cloudfoundry.client.v2.FilterParameter.Operation.IS; + +import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation indicating that a method represents a Cloud Foundry V2 filter parameter + */ +@JacksonAnnotationsInside +@JsonIgnore +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface FilterParameter { + + /** + * Returns the collection operation for the filter. Defaults to {@link Operation#IN} + * + * @return the collection operation for the filter + */ + Operation collectionOperation() default IN; + + /** + * Returns the operation for the filter. Defaults to {@link Operation#IS} + * + * @return the operation for the filter + */ + Operation operation() default IS; + + /** + * Returns the name of the parameter + * + * @return the name of the parameter + */ + String value(); + + /** + * Operations in a Cloud Foundry V2 filter + */ + enum Operation { + + /** + * Greater than or equal to. Renders to {@code >}. + */ + GREATER_THAN(">"), + + /** + * Greater than or equal to. Renders to {@code >=}. + */ + GREATER_THAN_OR_EQUAL_TO(">="), + + /** + * In. Renders to {@code IN }. + */ + IN(" IN "), + + /** + * Is. Renders to {@code :}. + */ + IS(":"), + + /** + * Less than. Renders to {@code <}. + */ + LESS_THAN("<"), + + /** + * Less than or equal to. Renders to {@code <=}. + */ + LESS_THAN_OR_EQUAL_TO("<="); + + private final String value; + + Operation(String value) { + this.value = value; + } + + @Override + public String toString() { + return this.value; + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/OrderDirection.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/OrderDirection.java new file mode 100644 index 00000000000..03adc611056 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/OrderDirection.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The order direction of the {@link PaginatedRequest} + */ +public enum OrderDirection { + + /** + * Indicates that order should be ascending + */ + ASCENDING("asc"), + + /** + * Indicates that order should be descending + */ + DESCENDING("desc"); + + private final String value; + + OrderDirection(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/PaginatedRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/PaginatedRequest.java new file mode 100644 index 00000000000..1d7a2b8cf52 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/PaginatedRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; + +/** + * Base class for requests that are paginated + */ +public abstract class PaginatedRequest { + + /** + * The order direction + */ + @Nullable + @QueryParameter("order-direction") + public abstract OrderDirection getOrderDirection(); + + /** + * The page + */ + @Nullable + @QueryParameter("page") + public abstract Integer getPage(); + + /** + * The results per page + */ + @Nullable + @QueryParameter("results-per-page") + public abstract Integer getResultsPerPage(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/PaginatedResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/PaginatedResponse.java new file mode 100644 index 00000000000..1ca4010cbd5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/PaginatedResponse.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +/** + * Base class for requests that are paginated + * + * @param the resource type + */ +public abstract class PaginatedResponse> { + + /** + * The next url + */ + @JsonProperty("next_url") + @Nullable + public abstract String getNextUrl(); + + /** + * The previous url + */ + @JsonProperty("prev_url") + @Nullable + public abstract String getPreviousUrl(); + + /** + * The resources + */ + @JsonProperty("resources") + @Nullable + public abstract List getResources(); + + /** + * The total pages + */ + @JsonProperty("total_pages") + @Nullable + public abstract Integer getTotalPages(); + + /** + * The total results + */ + @JsonProperty("total_results") + @Nullable + public abstract Integer getTotalResults(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/Resource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/Resource.java new file mode 100644 index 00000000000..d4ba4e4b3b3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/Resource.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * The resource payload for a paginated response + * + * @param the type of entity contained within the resource + */ +public abstract class Resource { + + /** + * The resource's entity + */ + @JsonProperty("entity") + @Nullable + public abstract T getEntity(); + + /** + * The resource's metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/_MaintenanceInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/_MaintenanceInfo.java new file mode 100644 index 00000000000..059cdf90c95 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/_MaintenanceInfo.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing service plan maintenance info + */ +@JsonDeserialize +@Value.Immutable +abstract class _MaintenanceInfo { + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/_Metadata.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/_Metadata.java new file mode 100644 index 00000000000..0a2d184797f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/_Metadata.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The metadata payload for a resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _Metadata { + + /** + * When the resource was created + */ + @JsonProperty("created_at") + @Nullable + abstract String getCreatedAt(); + + /** + * The resource's id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * When the resource was last updated + */ + @JsonProperty("updated_at") + @Nullable + abstract String getUpdatedAt(); + + /** + * The resource's URL + */ + @JsonProperty("url") + @Nullable + abstract String getUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractApplicationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractApplicationEntity.java new file mode 100644 index 00000000000..e2bbcc326ca --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractApplicationEntity.java @@ -0,0 +1,193 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; + +/** + * The core entity response payload for Application resources + */ +public abstract class AbstractApplicationEntity { + + /** + * The buildpack + */ + @JsonProperty("buildpack") + @Nullable + public abstract String getBuildpack(); + + /** + * The command + */ + @JsonProperty("command") + @Nullable + public abstract String getCommand(); + + /** + * The console + */ + @Deprecated + @JsonProperty("console") + @Nullable + public abstract Boolean getConsole(); + + /** + * Debug + */ + @Deprecated + @JsonProperty("debug") + @Nullable + public abstract String getDebug(); + + /** + * The detected start command + */ + @JsonProperty("detected_start_command") + @Nullable + public abstract String getDetectedStartCommand(); + + /** + * Diego + */ + @JsonProperty("diego") + @Nullable + public abstract Boolean getDiego(); + + /** + * The disk quota in megabytes + */ + @JsonProperty("disk_quota") + @Nullable + public abstract Integer getDiskQuota(); + + /** + * The docker credentials + */ + @JsonProperty("docker_credentials") + @Nullable + public abstract DockerCredentials getDockerCredentials(); + + /** + * The docker image + */ + @JsonProperty("docker_image") + @Nullable + public abstract String getDockerImage(); + + /** + * The environment JSONs + */ + @AllowNulls + @JsonProperty("environment_json") + @Nullable + public abstract Map getEnvironmentJsons(); + + /** + * The health check HTTP endpoint + */ + @JsonProperty("health_check_http_endpoint") + @Nullable + public abstract String getHealthCheckHttpEndpoint(); + + /** + * The health check timeout + */ + @JsonProperty("health_check_timeout") + @Nullable + public abstract Integer getHealthCheckTimeout(); + + /** + * The health check type + */ + @JsonProperty("health_check_type") + @Nullable + public abstract String getHealthCheckType(); + + /** + * The instances + */ + @JsonProperty("instances") + @Nullable + public abstract Integer getInstances(); + + /** + * The memory in megabytes + */ + @JsonProperty("memory") + @Nullable + public abstract Integer getMemory(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + public abstract String getName(); + + /** + * Production + */ + @Deprecated + @JsonProperty("production") + @Nullable + public abstract Boolean getProduction(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + public abstract String getSpaceId(); + + /** + * The stack id + */ + @JsonProperty("stack_guid") + @Nullable + public abstract String getStackId(); + + /** + * The staging failed description + */ + @JsonProperty("staging_failed_description") + @Nullable + public abstract String getStagingFailedDescription(); + + /** + * The staging failed reason + */ + @JsonProperty("staging_failed_reason") + @Nullable + public abstract String getStagingFailedReason(); + + /** + * The staging task id + */ + @JsonProperty("staging_task_id") + @Nullable + public abstract String getStagingTaskId(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + public abstract String getState(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractApplicationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractApplicationResource.java new file mode 100644 index 00000000000..cfc457cf79e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractApplicationResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The core resource in application responses + */ +public abstract class AbstractApplicationResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractRestageApplicationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractRestageApplicationResource.java new file mode 100644 index 00000000000..5262846c627 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/AbstractRestageApplicationResource.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +/** + * The base class for Restage Application resources + */ +public abstract class AbstractRestageApplicationResource + extends org.cloudfoundry.client.v2.Resource< + org.cloudfoundry.client.v2.applications.RestageApplicationEntity> {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/ApplicationsV2.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/ApplicationsV2.java new file mode 100644 index 00000000000..ab1cc6f8e97 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/ApplicationsV2.java @@ -0,0 +1,206 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Applications V2 Client API + */ +public interface ApplicationsV2 { + + /** + * Makes the Associate Route with the Application request + * + * @param request the Associate Route with the Application request + * @return the response from the Associate Route with the Application request + */ + Mono associateRoute( + AssociateApplicationRouteRequest request); + + /** + * Makes the Copy the app bits for an Application request + * + * @param request the Copy Application request + * @return the response from the Copy Application request + */ + Mono copy(CopyApplicationRequest request); + + /** + * Makes the Creating an App request and the Creating a Docker App request. + * + * @param request the Create Application request + * @return the response from the Create Application request + */ + Mono create(CreateApplicationRequest request); + + /** + * Makes the Delete the App request + * + * @param request the Delete Application request + * @return the response from the Delete Application request + */ + Mono delete(DeleteApplicationRequest request); + + /** + * Makes the Downloads the bits for an App request + * + * @param request the Download Application request + * @return the response from the Download Application request + */ + Flux download(DownloadApplicationRequest request); + + /** + * Makes the Downloads the staged droplet for an App request + * + * @param request the Download Droplet request + * @return the response from the Download Droplet request + */ + Flux downloadDroplet(DownloadApplicationDropletRequest request); + + /** + * Makes the Get the env for an App request + * + * @param request the Get Application Environment request + * @return the response from the Get Application Environment request + */ + Mono environment(ApplicationEnvironmentRequest request); + + /** + * Makes the Retrieve a Particular App request + * + * @param request the Get Application request + * @return the response from the Get Application request + */ + Mono get(GetApplicationRequest request); + + /** + * Makes the Retrieve Permissions on a Particular App request + * + * @param request the Get Application Permissions request + * @return the response from the Get Application Permissions request + */ + Mono getPermissions( + GetApplicationPermissionsRequest request); + + /** + * Makes the Get the instance information for a STARTED App request + * + * @param request the Get Instance Information request + * @return the response from the Get Instance Information request + */ + Mono instances(ApplicationInstancesRequest request); + + /** + * Makes the List all Apps request + * + * @param request the List Applications request + * @return the response from the List Applications request + */ + Mono list(ListApplicationsRequest request); + + /** + * Makes the List all Routes for the Application request + * + * @param request the List all Routes for the Application request + * @return the response from the List all Routes for the Application request + */ + Mono listRoutes(ListApplicationRoutesRequest request); + + /** + * Makes the List all Service Bindings for the App request + * + * @param request the List Service Bindings request + * @return the response from the List Service Bindings request + */ + Mono listServiceBindings( + ListApplicationServiceBindingsRequest request); + + /** + * Makes the Remove Route from the Application request + * + * @param request the Remove Route from the Application request + * @return the response from the Remove Route from the Application request + */ + Mono removeRoute(RemoveApplicationRouteRequest request); + + /** + * Makes the Remove Service Binding from the Application request + * + * @param request the Remove a Service Binding from an Application request + * @return the response from the Remove a Service Binding from an Application request + */ + Mono removeServiceBinding(RemoveApplicationServiceBindingRequest request); + + /** + * Makes the Restage an App request + * + * @param request the Restage an Application request + * @return the response from the Restage an Application request + */ + Mono restage(RestageApplicationRequest request); + + /** + * Makes the Get detailed stats for a STARTED App request + * + * @param request the Get Statistics request + * @return the response from the Get Statistics request + */ + Mono statistics(ApplicationStatisticsRequest request); + + /** + * Makes the Get Application Summary request + * + * @param request the Get Application Summary request + * @return the response from the Get Application Summary request + */ + Mono summary(SummaryApplicationRequest request); + + /** + * Makes the Terminate Application Instance request + * + * @param request the Terminate Application Instance request + * @return the response form the Terminate Application Instance request + */ + Mono terminateInstance(TerminateApplicationInstanceRequest request); + + /** + * Makes the Updating an App request + * + * @param request the Update Application request + * @return the response from the Update Application request + */ + Mono update(UpdateApplicationRequest request); + + /** + * Makes the Upload the bits for an App request + * + * @param request the Upload Application request + * @return the response from the Upload Application request + */ + Mono upload(UploadApplicationRequest request); + + /** + * Makes the Upload the droplet for an App request + * + * @param request the Upload Droplet request + * @return the response from the Upload Droplet request + */ + Mono uploadDroplet(UploadApplicationDropletRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java new file mode 100644 index 00000000000..31dec6ef777 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEntity.java @@ -0,0 +1,131 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the Application resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationEntity extends AbstractApplicationEntity { + + /** + * The detected buildpack + */ + @JsonProperty("detected_buildpack") + @Nullable + abstract String getDetectedBuildpack(); + + /** + * The detected buildpack id + */ + @JsonProperty("detected_buildpack_guid") + @Nullable + abstract String getDetectedBuildpackId(); + + /** + * Whether SSH is enabled + */ + @JsonProperty("enable_ssh") + @Nullable + abstract Boolean getEnableSsh(); + + /** + * The events url + */ + @JsonProperty("events_url") + @Nullable + abstract String getEventsUrl(); + + /** + * The package state + */ + @JsonProperty("package_state") + @Nullable + abstract String getPackageState(); + + /** + * When the package was update + */ + @JsonProperty("package_updated_at") + @Nullable + abstract String getPackageUpdatedAt(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + + /** + * The route mappings url + */ + @JsonProperty("route_mappings_url") + @Nullable + abstract String getRouteMappingsUrl(); + + /** + * The routes url + */ + @JsonProperty("routes_url") + @Nullable + abstract String getRoutesUrl(); + + /** + * The service bindings url + */ + @JsonProperty("service_bindings_url") + @Nullable + abstract String getServiceBindingsUrl(); + + /** + * The space url + */ + @JsonProperty("space_url") + @Nullable + abstract String getSpaceUrl(); + + /** + * The stack url + */ + @JsonProperty("stack_url") + @Nullable + abstract String getStackUrl(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEnvironmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEnvironmentRequest.java new file mode 100644 index 00000000000..269690dd519 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEnvironmentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get the env for an App operation. + */ +@Value.Immutable +abstract class _ApplicationEnvironmentRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEnvironmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEnvironmentResponse.java new file mode 100644 index 00000000000..912e351140d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationEnvironmentResponse.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationEnvironmentResponse { + + /** + * The application environment variables + */ + @AllowNulls + @JsonProperty("application_env_json") + @Nullable + abstract Map getApplicationEnvironmentJsons(); + + /** + * The environment variables + */ + @AllowNulls + @JsonProperty("environment_json") + @Nullable + abstract Map getEnvironmentJsons(); + + /** + * The running environment variables + */ + @AllowNulls + @JsonProperty("running_env_json") + @Nullable + abstract Map getRunningEnvironmentJsons(); + + /** + * The staging environment variables + */ + @AllowNulls + @JsonProperty("staging_env_json") + @Nullable + abstract Map getStagingEnvironmentJsons(); + + /** + * The system environment variables + */ + @AllowNulls + @JsonProperty("system_env_json") + @Nullable + abstract Map getSystemEnvironmentJsons(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java new file mode 100644 index 00000000000..4e6ff0e812e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstanceInfo.java @@ -0,0 +1,94 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Instance information in Get Application Instance response. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationInstanceInfo { + + /** + * The console IP + */ + @JsonProperty("console_ip") + @Nullable + abstract String getConsoleIp(); + + /** + * The console port + */ + @JsonProperty("console_port") + @Nullable + abstract Integer getConsolePort(); + + /** + * The debug IP + */ + @JsonProperty("debug_ip") + @Nullable + abstract String getDebugIp(); + + /** + * The debug port + */ + @JsonProperty("debug_port") + @Nullable + abstract Integer getDebugPort(); + + /** + * The details + */ + @JsonProperty("details") + @Nullable + abstract String getDetails(); + + /** + * The since + */ + @JsonProperty("since") + @Nullable + abstract Double getSince(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + + /** + * The update + */ + @JsonProperty("uptime") + @Nullable + abstract Long getUptime(); + + /** + * Routable + */ + @JsonProperty("routable") + @Nullable + abstract String getRoutable(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstancesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstancesRequest.java new file mode 100644 index 00000000000..23ad58d2a34 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstancesRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get the instance information operation. + */ +@Value.Immutable +abstract class _ApplicationInstancesRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstancesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstancesResponse.java new file mode 100644 index 00000000000..3c85a7f5a6c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationInstancesResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The response payload for the Get the instance information operation. + */ +@JsonDeserialize(using = _ApplicationInstancesResponse.ApplicationInstancesResponseDeserializer.class) +@Value.Immutable +abstract class _ApplicationInstancesResponse { + + /** + * The instances + */ + @AllowNulls + abstract Map getInstances(); + + static final class ApplicationInstancesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -3557583833091104581L; + + ApplicationInstancesResponseDeserializer() { + super(ApplicationInstancesResponse.class); + } + + @Override + public ApplicationInstancesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ApplicationInstancesResponse.builder() + .instances(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationResource.java new file mode 100644 index 00000000000..79b1476750f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Application Resource in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationResource extends AbstractApplicationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationStatisticsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationStatisticsRequest.java new file mode 100644 index 00000000000..33e7ca318f3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationStatisticsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Statistics operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _ApplicationStatisticsRequest { + + /** + * The application id + */ + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationStatisticsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationStatisticsResponse.java new file mode 100644 index 00000000000..d54b0630e68 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ApplicationStatisticsResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The response payload for the Get Application Statistics operation. + */ +@JsonDeserialize(using = _ApplicationStatisticsResponse.ApplicationStatisticsResponseDeserializer.class) +@Value.Immutable +abstract class _ApplicationStatisticsResponse { + + /** + * The instances + */ + @AllowNulls + abstract Map getInstances(); + + static final class ApplicationStatisticsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2925663073415059473L; + + ApplicationStatisticsResponseDeserializer() { + super(ApplicationStatisticsResponse.class); + } + + @Override + public ApplicationStatisticsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ApplicationStatisticsResponse.builder() + .instances(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_AssociateApplicationRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_AssociateApplicationRouteRequest.java new file mode 100644 index 00000000000..43b5ef9b4d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_AssociateApplicationRouteRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Route with the Application operation + */ +@Value.Immutable +abstract class _AssociateApplicationRouteRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_AssociateApplicationRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_AssociateApplicationRouteResponse.java new file mode 100644 index 00000000000..3a4c0d620a4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_AssociateApplicationRouteResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Route with the Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateApplicationRouteResponse extends AbstractApplicationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CopyApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CopyApplicationRequest.java new file mode 100644 index 00000000000..6bca9061391 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CopyApplicationRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Copy the Application operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CopyApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The source application id + */ + @JsonProperty("source_app_guid") + abstract String getSourceApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CopyApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CopyApplicationResponse.java new file mode 100644 index 00000000000..5bcf33ea8ac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CopyApplicationResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Copy Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CopyApplicationResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CreateApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CreateApplicationRequest.java new file mode 100644 index 00000000000..50627c986c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CreateApplicationRequest.java @@ -0,0 +1,192 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the v2 Create Application request + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateApplicationRequest { + + /** + * Buildpack to build the application + */ + @JsonProperty("buildpack") + @Nullable + abstract String getBuildpack(); + + /** + * The command to start the application after it is staged + */ + @JsonProperty("command") + @Nullable + abstract String getCommand(); + + /** + * Open the console port for the application (at $CONSOLE_PORT) + */ + @Deprecated + @JsonProperty("console") + @Nullable + abstract Boolean getConsole(); + + /** + * Open the debug port for the application (at $DEBUG_PORT) + */ + @Deprecated + @JsonProperty("debug") + @Nullable + abstract String getDebug(); + + /** + * The command detected by the buildpack during staging + */ + @JsonProperty("detected_start_command") + @Nullable + abstract String getDetectedStartCommand(); + + /** + * Use diego to stage and to run when available + */ + @JsonProperty("diego") + @Nullable + abstract Boolean getDiego(); + + /** + * The maximum amount of disk available to an instance of an application. In megabytes. + */ + @JsonProperty("disk_quota") + @Nullable + abstract Integer getDiskQuota(); + + /** + * Docker credentials for pulling docker image + */ + @AllowNulls + @JsonProperty("docker_credentials") + @Nullable + abstract DockerCredentials getDockerCredentials(); + + /** + * Name of the Docker image containing the application + */ + @JsonProperty("docker_image") + @Nullable + abstract String getDockerImage(); + + /** + * Enable SSHing into the application + */ + @JsonProperty("enable_ssh") + @Nullable + abstract Boolean getEnableSsh(); + + /** + * Key/value pairs of all the environment variables to run in your application. Does not include any system or service variables. + */ + @AllowNulls + @JsonProperty("environment_json") + @Nullable + abstract Map getEnvironmentJsons(); + + /** + * The HTTP endpoint to check for health + */ + @JsonProperty("health_check_http_endpoint") + @Nullable + abstract String getHealthCheckHttpEndpoint(); + + /** + * Timeout for health checking of an staged applcation when starting up + */ + @JsonProperty("health_check_timeout") + @Nullable + abstract Integer getHealthCheckTimeout(); + + /** + * Type of health check to perform + */ + @JsonProperty("health_check_type") + @Nullable + abstract String getHealthCheckType(); + + /** + * The number of instances of the application to run. To ensure optimal availability, ensure there are at least 2 instances. + */ + @JsonProperty("instances") + @Nullable + abstract Integer getInstances(); + + /** + * The amount of memory each instance should have. In megabytes. + */ + @JsonProperty("memory") + @Nullable + abstract Integer getMemory(); + + /** + * The name of the application + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The ports on which the application may listen + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + + /** + * Whether to open the production port + */ + @Deprecated + @JsonProperty("production") + @Nullable + abstract Boolean getProduction(); + + /** + * The id of the associated space + */ + @JsonProperty("space_guid") + abstract String getSpaceId(); + + /** + * The id of the associated stack + */ + @JsonProperty("stack_guid") + @Nullable + abstract String getStackId(); + + /** + * The current desired state of the application + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CreateApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CreateApplicationResponse.java new file mode 100644 index 00000000000..e773fbde535 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_CreateApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the v2 Create Application request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateApplicationResponse extends AbstractApplicationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DeleteApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DeleteApplicationRequest.java new file mode 100644 index 00000000000..e032ec1aabd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DeleteApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Application operation. + */ +@Value.Immutable +abstract class _DeleteApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DockerCredentials.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DockerCredentials.java new file mode 100644 index 00000000000..532f072481a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DockerCredentials.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing Docker Credentials + */ +@JsonDeserialize +@Value.Immutable +abstract class _DockerCredentials { + + /** + * The password + */ + @JsonProperty("password") + @Nullable + abstract String getPassword(); + + /** + * The username + */ + @JsonProperty("username") + @Nullable + abstract String getUsername(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DownloadApplicationDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DownloadApplicationDropletRequest.java new file mode 100644 index 00000000000..1c261ee36fa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DownloadApplicationDropletRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Download Droplet operation + */ +@Value.Immutable +abstract class _DownloadApplicationDropletRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DownloadApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DownloadApplicationRequest.java new file mode 100644 index 00000000000..19451255b99 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_DownloadApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Download Application operation + */ +@Value.Immutable +abstract class _DownloadApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationPermissionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationPermissionsRequest.java new file mode 100644 index 00000000000..581aa15979f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationPermissionsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Permissions operation + */ +@Value.Immutable +abstract class _GetApplicationPermissionsRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationPermissionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationPermissionsResponse.java new file mode 100644 index 00000000000..e865b8269c6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationPermissionsResponse.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application Permissions operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationPermissionsResponse { + + /** + * The application id + */ + @JsonProperty("read_basic_data") + abstract Boolean getReadBasicData(); + + /** + * The application id + */ + @JsonProperty("read_sensitive_data") + abstract Boolean getReadSensitiveData(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationRequest.java new file mode 100644 index 00000000000..8d9a13a412e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application operation + */ +@Value.Immutable +abstract class _GetApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationResponse.java new file mode 100644 index 00000000000..42d18bba832 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_GetApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationResponse extends AbstractApplicationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java new file mode 100644 index 00000000000..e2cfae9cd23 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_InstanceStatistics.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _InstanceStatistics { + + /** + * The isolation segment + */ + @JsonProperty("isolation_segment") + @Nullable + abstract String getIsolationSegment(); + + /** + * The instance state + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + + /** + * The instance statistics + */ + @JsonProperty("stats") + @Nullable + abstract Statistics getStatistics(); + + /** + * Routable + */ + @JsonProperty("routable") + @Nullable + abstract String getRoutable(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationRoutesRequest.java new file mode 100644 index 00000000000..9b874523166 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationRoutesRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Routes for the Application operation + */ +@Value.Immutable +abstract class _ListApplicationRoutesRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The domain ids + */ + @FilterParameter("domain_guid") + @Nullable + abstract List getDomainIds(); + + /** + * The hosts + */ + @FilterParameter("host") + @Nullable + abstract List getHosts(); + + /** + * The paths + */ + @FilterParameter("path") + @Nullable + abstract List getPaths(); + + /** + * The ports + */ + @FilterParameter("port") + @Nullable + abstract List getPorts(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationRoutesResponse.java new file mode 100644 index 00000000000..60d3d199878 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationRoutesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Routes for the Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationServiceBindingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationServiceBindingsRequest.java new file mode 100644 index 00000000000..e4f6a827f9b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationServiceBindingsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Bindings for the App operation + */ +@Value.Immutable +abstract class _ListApplicationServiceBindingsRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The ids of the service instances + */ + @FilterParameter("service_instance_guid") + @Nullable + abstract List getServiceInstanceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationServiceBindingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationServiceBindingsResponse.java new file mode 100644 index 00000000000..5d06ab8f9b5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationServiceBindingsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Bindings for the App operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationServiceBindingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationsRequest.java new file mode 100644 index 00000000000..838846ed1a8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationsRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Apps operation + */ +@Value.Immutable +abstract class _ListApplicationsRequest extends PaginatedRequest { + + /** + * The diego flag + */ + @FilterParameter("diego") + @Nullable + abstract Boolean getDiego(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + + /** + * The stack ids + */ + @FilterParameter("stack_guid") + @Nullable + abstract List getStackIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationsResponse.java new file mode 100644 index 00000000000..8515d675372 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_ListApplicationsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Apps operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_NetInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_NetInfo.java new file mode 100644 index 00000000000..4a0651f20e3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_NetInfo.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +@JsonDeserialize +@Value.Immutable +abstract class _NetInfo { + + /** + * The address + */ + @JsonProperty("address") + @Nullable + abstract String getAddress(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_NetInfoPorts.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_NetInfoPorts.java new file mode 100644 index 00000000000..2ea4bed28f9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_NetInfoPorts.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Net Info Port details + */ +@JsonDeserialize +@Value.Immutable +abstract class _NetInfoPorts { + + /* + * The container port value + */ + @JsonProperty("container_port") + public abstract Integer getContainerPort(); + + /* + * The host port value + */ + @JsonProperty("host_port") + public abstract Integer getHostPort(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RemoveApplicationRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RemoveApplicationRouteRequest.java new file mode 100644 index 00000000000..9b3a129a226 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RemoveApplicationRouteRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Route from the Application operation + */ +@Value.Immutable +abstract class _RemoveApplicationRouteRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RemoveApplicationServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RemoveApplicationServiceBindingRequest.java new file mode 100644 index 00000000000..729da749ce6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RemoveApplicationServiceBindingRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove a Service Binding from an Application operation + */ +@Value.Immutable +abstract class _RemoveApplicationServiceBindingRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Resource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Resource.java new file mode 100644 index 00000000000..d2843522769 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Resource.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the resources + */ +@JsonDeserialize +@Value.Immutable +abstract class _Resource { + + /** + * The hash + */ + @JsonProperty("sha1") + @Nullable + abstract String getHash(); + + /** + * The POSIX file mode in an octal representation + */ + @JsonProperty("mode") + @Nullable + abstract String getMode(); + + /** + * The path + */ + @JsonProperty("fn") + @Nullable + abstract String getPath(); + + /** + * The size + */ + @JsonProperty("size") + @Nullable + abstract Integer getSize(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationEntity.java new file mode 100644 index 00000000000..42a5c8061c3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationEntity.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response entity payload for the Restage an Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RestageApplicationEntity extends AbstractApplicationEntity { + + /** + * The detected buildpack + */ + @JsonProperty("detected_buildpack") + @Nullable + abstract String getDetectedBuildpack(); + + /** + * The detected buildpack id + */ + @JsonProperty("detected_buildpack_guid") + @Nullable + abstract String getDetectedBuildpackId(); + + /** + * Whether SSH is enabled + */ + @JsonProperty("enable_ssh") + @Nullable + abstract Boolean getEnableSsh(); + + /** + * The package state + */ + @JsonProperty("package_state") + @Nullable + abstract String getPackageState(); + + /** + * When the package was update + */ + @JsonProperty("package_updated_at") + @Nullable + abstract String getPackageUpdatedAt(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationRequest.java new file mode 100644 index 00000000000..86663b176f7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Restage an App operation + */ +@Value.Immutable +abstract class _RestageApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationResponse.java new file mode 100644 index 00000000000..27c1190650d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_RestageApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Restage an Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RestageApplicationResponse extends AbstractRestageApplicationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java new file mode 100644 index 00000000000..3bd0437da89 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Statistics.java @@ -0,0 +1,114 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +@JsonDeserialize +@Value.Immutable +abstract class _Statistics { + + /** + * The application disk quota + */ + @JsonProperty("disk_quota") + @Nullable + abstract Long getDiskQuota(); + + /** + * The application file descriptor quota + */ + @JsonProperty("fds_quota") + @Nullable + abstract Integer getFdsQuota(); + + /** + * The application host + */ + @JsonProperty("host") + @Nullable + abstract String getHost(); + + /** + * The application memory quota + */ + @JsonProperty("mem_quota") + @Nullable + abstract Long getMemoryQuota(); + + /** + * The application name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The net info + */ + @JsonProperty("net_info") + @Nullable + abstract NetInfo getNetInfo(); + + /** + * The application port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + + /** + * The application uptime + */ + @JsonProperty("uptime") + @Nullable + abstract Long getUptime(); + + /** + * The application uris + */ + @JsonProperty("uris") + @Nullable + abstract List getUris(); + + /** + * The application usage + */ + @JsonProperty("usage") + @Nullable + abstract Usage getUsage(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + + /** + * The instance guid + */ + @JsonProperty("instance_guid") + @Nullable + abstract String getInstanceGuid(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationRequest.java new file mode 100644 index 00000000000..bd394b98e94 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Summary operation + */ +@Value.Immutable +abstract class _SummaryApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java new file mode 100644 index 00000000000..5ad85ae19b9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_SummaryApplicationResponse.java @@ -0,0 +1,127 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.domains.Domain; +import org.cloudfoundry.client.v2.routes.Route; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstance; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Get Application Summary operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SummaryApplicationResponse extends AbstractApplicationEntity { + + /** + * The available domains + */ + @JsonProperty("available_domains") + @Nullable + abstract List getAvailableDomains(); + + /** + * The detected buildpack + */ + @JsonProperty("detected_buildpack") + @Nullable + abstract String getDetectedBuildpack(); + + /** + * The detected buildpack id + */ + @JsonProperty("detected_buildpack_guid") + @Nullable + abstract String getDetectedBuildpackId(); + + /** + * Whether SSH is enabled + */ + @JsonProperty("enable_ssh") + @Nullable + abstract Boolean getEnableSsh(); + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The package state + */ + @JsonProperty("package_state") + @Nullable + abstract String getPackageState(); + + /** + * When the package was update + */ + @JsonProperty("package_updated_at") + @Nullable + abstract String getPackageUpdatedAt(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + + /** + * The routes + */ + @JsonProperty("routes") + @Nullable + abstract List getRoutes(); + + /** + * The running instances + */ + @JsonProperty("running_instances") + @Nullable + abstract Integer getRunningInstances(); + + /** + * The services + */ + @JsonProperty("services") + @Nullable + abstract List getServices(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_TerminateApplicationInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_TerminateApplicationInstanceRequest.java new file mode 100644 index 00000000000..d9d2a9109e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_TerminateApplicationInstanceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Terminate Application Instance operation + */ +@Value.Immutable +abstract class _TerminateApplicationInstanceRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The index + */ + @JsonIgnore + abstract String getIndex(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UpdateApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UpdateApplicationRequest.java new file mode 100644 index 00000000000..758517e52fb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UpdateApplicationRequest.java @@ -0,0 +1,194 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the v2 Update Application request + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * Buildpack to build the application + */ + @JsonProperty("buildpack") + @Nullable + abstract String getBuildpack(); + + /** + * The command to start the application after it is staged + */ + @JsonProperty("command") + @Nullable + abstract String getCommand(); + + /** + * Open the console port for the application (at {@code $CONSOLE_PORT}) + */ + @Deprecated + @JsonProperty("console") + @Nullable + abstract Boolean getConsole(); + + /** + * Open the debug port for the application (at {@code $DEBUG_PORT}) + */ + @Deprecated + @JsonProperty("debug") + @Nullable + abstract String getDebug(); + + /** + * Use diego to stage and to run when available + */ + @JsonProperty("diego") + @Nullable + abstract Boolean getDiego(); + + /** + * The maximum amount of disk available to an instance of an application. In megabytes. + */ + @JsonProperty("disk_quota") + @Nullable + abstract Integer getDiskQuota(); + + /** + * Docker credentials for pulling docker image + */ + @AllowNulls + @JsonProperty("docker_credentials") + @Nullable + abstract DockerCredentials getDockerCredentials(); + + /** + * Name of the Docker image containing the application + */ + @JsonProperty("docker_image") + @Nullable + abstract String getDockerImage(); + + /** + * Enable SSH for the application + */ + @JsonProperty("enable_ssh") + @Nullable + abstract Boolean getEnableSsh(); + + /** + * Key/value pairs of all the environment variables to run in your application. Does not include any system or service variables. + */ + @AllowNulls + @JsonProperty("environment_json") + @Nullable + abstract Map getEnvironmentJsons(); + + /** + * The HTTP endpoint to check for health + */ + @JsonProperty("health_check_http_endpoint") + @Nullable + abstract String getHealthCheckHttpEndpoint(); + + /** + * Timeout for health checking of an staged application when starting up + */ + @JsonProperty("health_check_timeout") + @Nullable + abstract Integer getHealthCheckTimeout(); + + /** + * Type of health check to perform + */ + @JsonProperty("health_check_type") + @Nullable + abstract String getHealthCheckType(); + + /** + * The number of instances of the application to run. To ensure optimal availability, ensure there are at least 2 instances. + */ + @JsonProperty("instances") + @Nullable + abstract Integer getInstances(); + + /** + * The amount of memory each instance should have. In megabytes. + */ + @JsonProperty("memory") + @Nullable + abstract Integer getMemory(); + + /** + * The name of the application + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The ports on which the application may listen + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + + /** + * Whether the application is production + */ + @Deprecated + @JsonProperty("production") + @Nullable + abstract String getProduction(); + + /** + * The id of the associated space + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The id of the associated stack + */ + @JsonProperty("stack_guid") + @Nullable + abstract String getStackId(); + + /** + * The current desired state of the application + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UpdateApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UpdateApplicationResponse.java new file mode 100644 index 00000000000..94a3e7dacb5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UpdateApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the v2 Create Application request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateApplicationResponse extends AbstractApplicationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationDropletRequest.java new file mode 100644 index 00000000000..67eeca4401f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationDropletRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +import java.nio.file.Path; + +/** + * Request payload for the Upload Application Droplet operation. + */ +@Value.Immutable +abstract class _UploadApplicationDropletRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * A tgz droplet file + */ + @JsonIgnore + abstract Path getDroplet(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationDropletResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationDropletResponse.java new file mode 100644 index 00000000000..478eb0b36e6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationDropletResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Upload Application Droplet request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UploadApplicationDropletResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationRequest.java new file mode 100644 index 00000000000..8b9754bb8bf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationRequest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +import java.nio.file.Path; +import java.util.List; + +/** + * Request payload for the Upload Application operation. + */ +@Value.Immutable +abstract class _UploadApplicationRequest { + + /** + * A binary zip file or a directory containing the application bits to upload + */ + @JsonIgnore + abstract Path getApplication(); + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * If true, a new asynchronous job is submitted to persist the bits and the job id is included in the response + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * Fingerprints of the application bits that have previously been pushed to Cloud Foundry + */ + @JsonIgnore + abstract List getResources(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationResponse.java new file mode 100644 index 00000000000..d245713e46a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_UploadApplicationResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Upload Application request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UploadApplicationResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java new file mode 100644 index 00000000000..564ab275f9c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applications/_Usage.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Application instance usage info + */ +@JsonDeserialize +@Value.Immutable +abstract class _Usage { + + /** + * The CPU usage + */ + @JsonProperty("cpu") + @Nullable + abstract Double getCpu(); + + /** + * The CPU entitlement + */ + @JsonProperty("cpu_entitlement") + @Nullable + abstract Double getCpuEntitlement(); + + /** + * The disk usage + */ + @JsonProperty("disk") + @Nullable + abstract Long getDisk(); + + /** + * The memory usage + */ + @JsonProperty("mem") + @Nullable + abstract Long getMemory(); + + /** + * The time since start + */ + @JsonProperty("time") + @Nullable + abstract String getTime(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate") + @Nullable + abstract Integer getLogRate(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/AbstractApplicationUsageEventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/AbstractApplicationUsageEventResource.java new file mode 100644 index 00000000000..1f10da28b3b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/AbstractApplicationUsageEventResource.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import org.cloudfoundry.client.v2.Resource; + +/** + * A base class for Application Usage Event resources + */ +public abstract class AbstractApplicationUsageEventResource + extends Resource< + org.cloudfoundry.client.v2.applicationusageevents.ApplicationUsageEventEntity> {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/ApplicationUsageEvents.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/ApplicationUsageEvents.java new file mode 100644 index 00000000000..220587b793b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/ApplicationUsageEvents.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Application Usage Events Client API + */ +public interface ApplicationUsageEvents { + + /** + * Makes the Get an Application Usage Event request + * + * @param request the Get Application Usage Event request + * @return the response from the Get all Application Usage Event request + */ + Mono get(GetApplicationUsageEventRequest request); + + /** + * Makes the List all Application Usage Events request + * + * @param request the List all Application Usage Events request + * @return the response from the List all Application Usage Events request + */ + Mono list(ListApplicationUsageEventsRequest request); + + /** + * Makes the Purge and Reseed Application Usage Events request + * + * @param request the Purge and Reseed Application Usage Events + * @return the response from the Purge and Reseed Application Usage Events request + */ + Mono purgeAndReseed(PurgeAndReseedApplicationUsageEventsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ApplicationUsageEventEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ApplicationUsageEventEntity.java new file mode 100644 index 00000000000..71529b34342 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ApplicationUsageEventEntity.java @@ -0,0 +1,144 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Application Usage Event resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationUsageEventEntity { + + /** + * The application id + */ + @JsonProperty("app_guid") + @Nullable + abstract String getApplicationId(); + + /** + * The application name + */ + @JsonProperty("app_name") + @Nullable + abstract String getApplicationName(); + + /** + * The buildpack id + */ + @JsonProperty("buildpack_guid") + @Nullable + abstract String getBuildpackId(); + + /** + * The buildpack name + */ + @JsonProperty("buildpack_name") + @Nullable + abstract String getBuildpackName(); + + /** + * The instance count + */ + @JsonProperty("instance_count") + @Nullable + abstract Integer getInstanceCount(); + + /** + * The memory in mb by instance + */ + @JsonProperty("memory_in_mb_per_instance") + @Nullable + abstract Integer getMemoryInMbPerInstance(); + + /** + * The organization id + */ + @JsonProperty("org_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The state of the package + */ + @JsonProperty("package_state") + @Nullable + abstract String getPackageState(); + + /** + * The parent application id if one exists (experimental) + */ + @JsonProperty("parent_app_guid") + @Nullable + abstract String getParentApplicationId(); + + /** + * The parent application name if one exists (experimental) + */ + @JsonProperty("parent_app_name") + @Nullable + abstract String getParentApplicationName(); + + /** + * The process type (experimental) + */ + @JsonProperty("process_type") + @Nullable + abstract String getProcessType(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The space name + */ + @JsonProperty("space_name") + @Nullable + abstract String getSpaceName(); + + /** + * The desired state of the application + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + + /** + * The task id if one exists (experimental) + */ + @JsonProperty("task_guid") + @Nullable + abstract String getTaskId(); + + /** + * The task name if one exists (experimental) + */ + @JsonProperty("task_name") + @Nullable + abstract String getTaskName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ApplicationUsageEventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ApplicationUsageEventResource.java new file mode 100644 index 00000000000..63a42e09735 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ApplicationUsageEventResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain application usage events + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationUsageEventResource extends AbstractApplicationUsageEventResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_GetApplicationUsageEventRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_GetApplicationUsageEventRequest.java new file mode 100644 index 00000000000..556073b76fc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_GetApplicationUsageEventRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Usage Events operation + */ +@Value.Immutable +abstract class _GetApplicationUsageEventRequest { + + /** + * The service usage event id + */ + @JsonIgnore + abstract String getApplicationUsageEventId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_GetApplicationUsageEventResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_GetApplicationUsageEventResponse.java new file mode 100644 index 00000000000..4ee54af70a8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_GetApplicationUsageEventResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Application Usage Events Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationUsageEventResponse extends AbstractApplicationUsageEventResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ListApplicationUsageEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ListApplicationUsageEventsRequest.java new file mode 100644 index 00000000000..f9c3d5bad1f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ListApplicationUsageEventsRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List Application Usage Events operation + */ +@Value.Immutable +abstract class _ListApplicationUsageEventsRequest extends PaginatedRequest { + + /** + * The after application usage event id: Restrict results to Application Usage Events after the one with the given id + */ + @Nullable + @QueryParameter("after_guid") + abstract String getAfterApplicationUsageEventId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ListApplicationUsageEventsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ListApplicationUsageEventsResponse.java new file mode 100644 index 00000000000..95a24f94a22 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_ListApplicationUsageEventsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Usage Events operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationUsageEventsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_PurgeAndReseedApplicationUsageEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_PurgeAndReseedApplicationUsageEventsRequest.java new file mode 100644 index 00000000000..23b78d2313b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/applicationusageevents/_PurgeAndReseedApplicationUsageEventsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import org.immutables.value.Value; + +/** + * The request payload for the Purge and Reseed Application Usage Events operation + */ +@Value.Immutable +abstract class _PurgeAndReseedApplicationUsageEventsRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/Blobstores.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/Blobstores.java new file mode 100644 index 00000000000..e595f9a2738 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/Blobstores.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.blobstores; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Blobstores Client API + */ +public interface Blobstores { + + /** + * Makes the Delete Buildpack Caches request + * + * @param request the Delete Buildpack Caches request + * @return the response from the Delete Buildpack Caches request + */ + Mono deleteBuildpackCaches( + DeleteBlobstoreBuildpackCachesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/_DeleteBlobstoreBuildpackCachesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/_DeleteBlobstoreBuildpackCachesRequest.java new file mode 100644 index 00000000000..da927b94c31 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/_DeleteBlobstoreBuildpackCachesRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.blobstores; + +import org.immutables.value.Value; + +/** + * The request payload for the Delete Buildpack Caches operation + */ +@Value.Immutable +abstract class _DeleteBlobstoreBuildpackCachesRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/_DeleteBlobstoreBuildpackCachesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/_DeleteBlobstoreBuildpackCachesResponse.java new file mode 100644 index 00000000000..1f5a9998515 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/blobstores/_DeleteBlobstoreBuildpackCachesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.blobstores; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The resource response payload for the Delete Buildpack Caches operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteBlobstoreBuildpackCachesResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/AbstractBuildpackResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/AbstractBuildpackResource.java new file mode 100644 index 00000000000..53e7bd71802 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/AbstractBuildpackResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import org.cloudfoundry.client.v2.Resource; + +/** + * Buildpacks in responses + */ +public abstract class AbstractBuildpackResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/Buildpacks.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/Buildpacks.java new file mode 100644 index 00000000000..a44ac6cecc3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/Buildpacks.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Buildpacks Client API + */ +public interface Buildpacks { + + /** + * Makes the Create the Buildpack request + * + * @param request the Create Buildpack request + * @return the response from the Create Buildpack request + */ + Mono create(CreateBuildpackRequest request); + + /** + * Makes the Delete the Buildpack request + * + * @param request the Delete Buildpack request + * @return the response from the Delete Buildpack request + */ + Mono delete(DeleteBuildpackRequest request); + + /** + * Makes the Retrieve a particular Buildpack request + * + * @param request the Get Buildpack request + * @return the response from the Get Buildpack request + */ + Mono get(GetBuildpackRequest request); + + /** + * Makes the List all Buildpacks request + * + * @param request the List all Buildpacks request + * @return the response from the List all Buildpacks request + */ + Mono list(ListBuildpacksRequest request); + + /** + * Makes the Change the position of a Buildpack, + * Enable or disable a Buildpack, and + * Lock or unlock a Buildpack requests + * + * @param request the Update Buildpack request + * @return the response from the Update Buildpack request + */ + Mono update(UpdateBuildpackRequest request); + + /** + * Makes the Upload Buildpack request + * + * @param request the Upload Buildpack request + * @return the response from the Upload Buildpack request + */ + Mono upload(UploadBuildpackRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/LifecycleType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/LifecycleType.java new file mode 100644 index 00000000000..6b8d714d813 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/LifecycleType.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The lifecycle type + */ +public enum LifecycleType { + BUILDPACK("buildpack"), + + DOCKER("docker"), + + CNB("cnb"); + + private final String value; + + private LifecycleType(String value) { + this.value = value; + } + + @JsonCreator + public static LifecycleType from(String s) { + switch (s.toLowerCase()) { + case "buildpack": + return BUILDPACK; + case "docker": + return DOCKER; + case "cnb": + return CNB; + default: + throw new IllegalArgumentException(String.format("Unknown lifecycle type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_BuildpackEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_BuildpackEntity.java new file mode 100644 index 00000000000..ccca72951a3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_BuildpackEntity.java @@ -0,0 +1,80 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the buildpack resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _BuildpackEntity { + + /** + * Whether the buildpack is enabled + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * The filename + */ + @JsonProperty("filename") + @Nullable + abstract String getFilename(); + + /** + * Whether the buildpack is locked + */ + @JsonProperty("locked") + @Nullable + abstract Boolean getLocked(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The position + */ + @JsonProperty("position") + @Nullable + abstract Integer getPosition(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + abstract String getStack(); + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + @Nullable + abstract LifecycleType getLifecycle(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_BuildpackResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_BuildpackResource.java new file mode 100644 index 00000000000..8f541657614 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_BuildpackResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Buildpacks + */ +@JsonDeserialize +@Value.Immutable +abstract class _BuildpackResource extends AbstractBuildpackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_CreateBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_CreateBuildpackRequest.java new file mode 100644 index 00000000000..cd06ca83dc2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_CreateBuildpackRequest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create Buildpack + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateBuildpackRequest { + + /** + * The enabled flag + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * The filename + */ + @JsonProperty("filename") + @Nullable + abstract String getFilename(); + + /** + * The locked flag + */ + @JsonProperty("locked") + @Nullable + abstract Boolean getLocked(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The position + */ + @JsonProperty("position") + @Nullable + abstract Integer getPosition(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_CreateBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_CreateBuildpackResponse.java new file mode 100644 index 00000000000..04ada166bb3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_CreateBuildpackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Buildpack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateBuildpackResponse extends AbstractBuildpackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_DeleteBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_DeleteBuildpackRequest.java new file mode 100644 index 00000000000..a3206a7b4df --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_DeleteBuildpackRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Buildpack operation. + */ +@Value.Immutable +abstract class _DeleteBuildpackRequest { + + /** + * The async flag + */ + @QueryParameter("async") + @Nullable + abstract Boolean getAsync(); + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_DeleteBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_DeleteBuildpackResponse.java new file mode 100644 index 00000000000..66bf9c1796e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_DeleteBuildpackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete Buildpack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteBuildpackResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_GetBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_GetBuildpackRequest.java new file mode 100644 index 00000000000..73ce837f97b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_GetBuildpackRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Buildpack + */ +@Value.Immutable +abstract class _GetBuildpackRequest { + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_GetBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_GetBuildpackResponse.java new file mode 100644 index 00000000000..39424d206e7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_GetBuildpackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Buildpack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetBuildpackResponse extends AbstractBuildpackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_ListBuildpacksRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_ListBuildpacksRequest.java new file mode 100644 index 00000000000..37613db7912 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_ListBuildpacksRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List buildpacks operation + */ +@Value.Immutable +abstract class _ListBuildpacksRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_ListBuildpacksResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_ListBuildpacksResponse.java new file mode 100644 index 00000000000..8c80f8d062c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_ListBuildpacksResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Buildpacks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListBuildpacksResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UpdateBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UpdateBuildpackRequest.java new file mode 100644 index 00000000000..fc3ebf3de43 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UpdateBuildpackRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload to Update a Buildpack + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateBuildpackRequest { + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + + /** + * The enabled flag + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * The filename + */ + @JsonProperty("filename") + @Nullable + abstract String getFilename(); + + /** + * The locked flag + */ + @JsonProperty("locked") + @Nullable + abstract Boolean getLocked(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The position + */ + @JsonProperty("position") + @Nullable + abstract Integer getPosition(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UpdateBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UpdateBuildpackResponse.java new file mode 100644 index 00000000000..c4a915659f0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UpdateBuildpackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Update Buildpack request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateBuildpackResponse extends AbstractBuildpackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UploadBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UploadBuildpackRequest.java new file mode 100644 index 00000000000..6a658bc1703 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UploadBuildpackRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +import java.nio.file.Path; + +/** + * The request payload to Upload a Buildpack + */ +@Value.Immutable +abstract class _UploadBuildpackRequest { + + /** + * A binary zip file containing the buildpack bits. + */ + @JsonIgnore + abstract Path getBuildpack(); + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + + /** + * The filename + */ + @JsonIgnore + abstract String getFilename(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UploadBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UploadBuildpackResponse.java new file mode 100644 index 00000000000..bea2dc76743 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/buildpacks/_UploadBuildpackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Update Buildpack request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UploadBuildpackResponse extends AbstractBuildpackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/AbstractDomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/AbstractDomainResource.java new file mode 100644 index 00000000000..4e36df24307 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/AbstractDomainResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Domain resources + */ +public abstract class AbstractDomainResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/Domains.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/Domains.java new file mode 100644 index 00000000000..baf6e9ea9ae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/Domains.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Domains Client API + */ +public interface Domains { + + /** + * Makes the deprecated Create a Domain + * owned by the given Organization request and the deprecated + * Create a Shared Domain request + * + * @param request the Create a Domain request + * @return the response from the Create a Domain request + */ + @Deprecated + Mono create(CreateDomainRequest request); + + /** + * Makes the deprecated Delete a Particular Domain request + * + * @param request the Delete a Particular Domain request + * @return the response from the Delete a Particular Domain request + */ + @Deprecated + Mono delete(DeleteDomainRequest request); + + /** + * Makes the deprecated Get Domain request + * + * @param request The Get Domain request + * @return the response from the Get Domain request + */ + @Deprecated + Mono get(GetDomainRequest request); + + /** + * Makes the deprecated List all Domains request + * + * @param request the List all Domains request + * @return the response from the List all Domains request + */ + @Deprecated + Mono list(ListDomainsRequest request); + + /** + * Makes the deprecated List all Spaces for the Domain + * request + * + * @param request the List all Spaces for the Domain request + * @return the response from the List all Spaces for the Domain request + */ + @Deprecated + Mono listSpaces(ListDomainSpacesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_CreateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_CreateDomainRequest.java new file mode 100644 index 00000000000..d9e42857efb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_CreateDomainRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the deprecated Create a Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateDomainRequest { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The owning organization id + */ + @JsonProperty("owning_organization_guid") + @Nullable + abstract String getOwningOrganizationId(); + + /** + * The wildcard + */ + @JsonProperty("wildcard") + abstract Boolean getWildcard(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_CreateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_CreateDomainResponse.java new file mode 100644 index 00000000000..4ab8257ec5a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_CreateDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the deprecated Create a Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateDomainResponse extends AbstractDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DeleteDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DeleteDomainRequest.java new file mode 100644 index 00000000000..e8dafe9de1f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DeleteDomainRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the deprecated Delete a Particular Domain operation + */ +@Value.Immutable +abstract class _DeleteDomainRequest { + + /** + * Whether to delete asynchronously + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DeleteDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DeleteDomainResponse.java new file mode 100644 index 00000000000..217f6d521ec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DeleteDomainResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the deprecated Delete a Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteDomainResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_Domain.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_Domain.java new file mode 100644 index 00000000000..f4f7b183696 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_Domain.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The domain + */ +@JsonDeserialize +@Value.Immutable +abstract class _Domain { + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * Whether this is an internal domain + */ + @JsonProperty("internal") + @Nullable + abstract Boolean getInternal(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The owning organization id + */ + @JsonProperty("owning_organization_guid") + @Nullable + abstract String getOwningOrganizationId(); + + /** + * The router group id + */ + @JsonProperty("router_group_guid") + @Nullable + abstract String getRouterGroupId(); + + /** + * The router group type + */ + @JsonProperty("router_group_type") + @Nullable + abstract String getRouterGroupType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DomainEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DomainEntity.java new file mode 100644 index 00000000000..4d00adf434b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DomainEntity.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the Domain resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _DomainEntity { + + /** + * Whether this is an internal domain + */ + @JsonProperty("internal") + @Nullable + abstract Boolean getInternal(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The owning organization id + */ + @JsonProperty("owning_organization_guid") + @Nullable + abstract String getOwningOrganizationId(); + + /** + * The owning organization url + */ + @JsonProperty("owning_organization_url") + @Nullable + abstract String getOwningOrganizationUrl(); + + /** + * The router group id + */ + @JsonProperty("router_group_guid") + @Nullable + abstract String getRouterGroupId(); + + /** + * The router group type + */ + @JsonProperty("router_group_type") + @Nullable + abstract String getRouterGroupType(); + + /** + * The shared organizations + */ + @JsonProperty("shared_organizations") + @Nullable + abstract List getSharedOrganizations(); + + /** + * The spaces url + */ + @JsonProperty("spaces_url") + @Nullable + abstract String getSpacesUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DomainResource.java new file mode 100644 index 00000000000..25893c83dcc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_DomainResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Domain resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _DomainResource extends AbstractDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_GetDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_GetDomainRequest.java new file mode 100644 index 00000000000..6a2c81bc658 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_GetDomainRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Get Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _GetDomainRequest { + + /** + * The domain id + */ + abstract String getDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_GetDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_GetDomainResponse.java new file mode 100644 index 00000000000..0d8948cd152 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_GetDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetDomainResponse extends AbstractDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainSpacesRequest.java new file mode 100644 index 00000000000..6d613005f7e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainSpacesRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the deprecated List all Spaces for the Domain operation + */ +@Value.Immutable +abstract class _ListDomainSpacesRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The developer ids + */ + @FilterParameter("developer_guid") + @Nullable + abstract List getDeveloperIds(); + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainSpacesResponse.java new file mode 100644 index 00000000000..a9d74618320 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the deprecated List all Spaces for the Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListDomainSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainsRequest.java new file mode 100644 index 00000000000..51cabeeb398 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the deprecated List all Domains operation + */ +@Value.Immutable +abstract class _ListDomainsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The owning organization ids + */ + @FilterParameter("owning_organization_guid") + @Nullable + abstract List getOwningOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainsResponse.java new file mode 100644 index 00000000000..457049d9f41 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/domains/_ListDomainsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the deprecated List all Domains operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/EnvironmentVariableGroups.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/EnvironmentVariableGroups.java new file mode 100644 index 00000000000..73e1bd5233a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/EnvironmentVariableGroups.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry EnvironmentVariableGroups V2 Client API + */ +public interface EnvironmentVariableGroups { + + /** + * Makes the Get the Running Environment + * Variables request + * + * @param request the Get Running Environment Variables request + * @return the response from the Get Running Environment Variables request + */ + Mono getRunningEnvironmentVariables( + GetRunningEnvironmentVariablesRequest request); + + /** + * Makes the Get the Staging Environment + * Variables request + * + * @param request the Get Staging Environment Variables request + * @return the response from the Get Staging Environment Variables request + */ + Mono getStagingEnvironmentVariables( + GetStagingEnvironmentVariablesRequest request); + + /** + * Makes the Update the Running Environment + * Variables request + * + * @param request the Update Running Environment Variables request + * @return the response from the Update Running Environment Variables request + */ + Mono updateRunningEnvironmentVariables( + UpdateRunningEnvironmentVariablesRequest request); + + /** + * Makes the Update + * the Staging Environment Variables request + * + * @param request the Update Staging Environment Variables request + * @return the response from the Update Staging Environment Variables request + */ + Mono updateStagingEnvironmentVariables( + UpdateStagingEnvironmentVariablesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetRunningEnvironmentVariablesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetRunningEnvironmentVariablesRequest.java new file mode 100644 index 00000000000..f866f95f2de --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetRunningEnvironmentVariablesRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import org.immutables.value.Value; + +/** + * The request payload for the get running environment variable group + */ +@Value.Immutable +abstract class _GetRunningEnvironmentVariablesRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetRunningEnvironmentVariablesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetRunningEnvironmentVariablesResponse.java new file mode 100644 index 00000000000..f386c700f79 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetRunningEnvironmentVariablesResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The request payload for the get running environment variable group + */ +@JsonDeserialize(using = _GetRunningEnvironmentVariablesResponse.GetRunningEnvironmentVariablesResponseDeserializer.class) +@Value.Immutable +abstract class _GetRunningEnvironmentVariablesResponse { + + /** + * The environment variables + */ + @AllowNulls + abstract Map getEnvironmentVariables(); + + static final class GetRunningEnvironmentVariablesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 8147883032650698806L; + + GetRunningEnvironmentVariablesResponseDeserializer() { + super(GetRunningEnvironmentVariablesResponse.class); + } + + @Override + public GetRunningEnvironmentVariablesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return GetRunningEnvironmentVariablesResponse.builder() + .environmentVariables(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetStagingEnvironmentVariablesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetStagingEnvironmentVariablesRequest.java new file mode 100644 index 00000000000..79df594bd3e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetStagingEnvironmentVariablesRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import org.immutables.value.Value; + +/** + * The request payload for the get staging environment variable group + */ +@Value.Immutable +abstract class _GetStagingEnvironmentVariablesRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetStagingEnvironmentVariablesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetStagingEnvironmentVariablesResponse.java new file mode 100644 index 00000000000..ac33164e21b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_GetStagingEnvironmentVariablesResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The request payload for the get staging environment variable group + */ +@JsonDeserialize(using = _GetStagingEnvironmentVariablesResponse.GetStagingEnvironmentVariablesResponseDeserializer.class) +@Value.Immutable +abstract class _GetStagingEnvironmentVariablesResponse { + + /** + * The environment variables + */ + @AllowNulls + abstract Map getEnvironmentVariables(); + + static final class GetStagingEnvironmentVariablesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 5913020448383524781L; + + GetStagingEnvironmentVariablesResponseDeserializer() { + super(GetStagingEnvironmentVariablesResponse.class); + } + + @Override + public GetStagingEnvironmentVariablesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return GetStagingEnvironmentVariablesResponse.builder() + .environmentVariables(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateRunningEnvironmentVariablesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateRunningEnvironmentVariablesRequest.java new file mode 100644 index 00000000000..32e9b733ca2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateRunningEnvironmentVariablesRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the update running environment variable group + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateRunningEnvironmentVariablesRequest { + + @AllowNulls + @JsonValue + @Nullable + abstract Map getEnvironmentVariables(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateRunningEnvironmentVariablesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateRunningEnvironmentVariablesResponse.java new file mode 100644 index 00000000000..49fa980eed0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateRunningEnvironmentVariablesResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The request payload for the update running environment variable group + */ +@JsonDeserialize(using = _UpdateRunningEnvironmentVariablesResponse.UpdateRunningEnvironmentVariablesResponseDeserializer.class) +@Value.Immutable +abstract class _UpdateRunningEnvironmentVariablesResponse { + + /** + * The environment variables + */ + @AllowNulls + abstract Map getEnvironmentVariables(); + + static final class UpdateRunningEnvironmentVariablesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 1760922340301743864L; + + UpdateRunningEnvironmentVariablesResponseDeserializer() { + super(UpdateRunningEnvironmentVariablesResponse.class); + } + + @Override + public UpdateRunningEnvironmentVariablesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return UpdateRunningEnvironmentVariablesResponse.builder() + .environmentVariables(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateStagingEnvironmentVariablesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateStagingEnvironmentVariablesRequest.java new file mode 100644 index 00000000000..efb24ba7742 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateStagingEnvironmentVariablesRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import com.fasterxml.jackson.annotation.JsonValue; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the update staging environment variable group + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateStagingEnvironmentVariablesRequest { + + @AllowNulls + @JsonValue + @Nullable + abstract Map getEnvironmentVariables(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateStagingEnvironmentVariablesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateStagingEnvironmentVariablesResponse.java new file mode 100644 index 00000000000..6ae8f2b23a8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/environmentvariablegroups/_UpdateStagingEnvironmentVariablesResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The request payload for the update staging environment variable group + */ +@JsonDeserialize(using = _UpdateStagingEnvironmentVariablesResponse.UpdateStagingEnvironmentVariablesResponseDeserializer.class) +@Value.Immutable +abstract class _UpdateStagingEnvironmentVariablesResponse { + + /** + * The environment variables + */ + @AllowNulls + abstract Map getEnvironmentVariables(); + + static final class UpdateStagingEnvironmentVariablesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 8275824722309754398L; + + UpdateStagingEnvironmentVariablesResponseDeserializer() { + super(UpdateStagingEnvironmentVariablesResponse.class); + } + + @Override + public UpdateStagingEnvironmentVariablesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return UpdateStagingEnvironmentVariablesResponse.builder() + .environmentVariables(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/AbstractEventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/AbstractEventResource.java new file mode 100644 index 00000000000..bef32d84121 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/AbstractEventResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Event resources + */ +public abstract class AbstractEventResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/Events.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/Events.java new file mode 100644 index 00000000000..f8f0a50c894 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/Events.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Events Client API + */ +public interface Events { + + /** + * Makes the Get Event request + * + * @param request the Get Event request + * @return the response from the Get Event request + */ + Mono get(GetEventRequest request); + + /** + * Makes the List Events request + * + * @param request the List Events request + * @return the response from the List Events request + */ + Mono list(ListEventsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_EventEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_EventEntity.java new file mode 100644 index 00000000000..b736abb9ed3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_EventEntity.java @@ -0,0 +1,121 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; +import java.util.Optional; + +/** + * The entity response payload for the Event resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _EventEntity { + + /** + * The actee + */ + @JsonProperty("actee") + @Nullable + abstract String getActee(); + + /** + * The actee name + */ + @JsonProperty("actee_name") + @Nullable + abstract String getActeeName(); + + /** + * The actee type + */ + @JsonProperty("actee_type") + @Nullable + abstract String getActeeType(); + + /** + * The actor + */ + @JsonProperty("actor") + @Nullable + abstract String getActor(); + + /** + * The actor name + */ + @JsonProperty("actor_name") + @Nullable + abstract String getActorName(); + + /** + * The actor type + */ + @JsonProperty("actor_type") + @Nullable + abstract String getActorType(); + + /** + * The actor name + */ + @JsonProperty("actor_username") + @Nullable + abstract String getActorUserName(); + + /** + * The metadatas + */ + @AllowNulls + @JsonProperty("metadata") + @Nullable + abstract Map> getMetadatas(); + + /** + * The organization id + */ + @JsonProperty("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The timestamp + */ + @JsonProperty("timestamp") + @Nullable + abstract String getTimestamp(); + + /** + * The type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_EventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_EventResource.java new file mode 100644 index 00000000000..50ba214bf98 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_EventResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain events + */ +@JsonDeserialize +@Value.Immutable +abstract class _EventResource extends AbstractEventResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_GetEventRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_GetEventRequest.java new file mode 100644 index 00000000000..c26448b492d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_GetEventRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Event operation + */ +@Value.Immutable +abstract class _GetEventRequest { + + /** + * The event id + */ + @JsonIgnore + abstract String getEventId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_GetEventResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_GetEventResponse.java new file mode 100644 index 00000000000..697e5b3970a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_GetEventResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Event operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetEventResponse extends AbstractEventResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsRequest.java new file mode 100644 index 00000000000..1a3c9bc496d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Events operation + */ +@Value.Immutable +abstract class _ListEventsRequest extends PaginatedRequest { + + /** + * The actees + */ + @FilterParameter("actee") + @Nullable + abstract List getActees(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + + /** + * The timestamps + */ + @FilterParameter(value = "timestamp", operation = FilterParameter.Operation.GREATER_THAN_OR_EQUAL_TO) + @Nullable + abstract List getTimestamps(); + + /** + * The types + */ + @FilterParameter("type") + @Nullable + abstract List getTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsResponse.java new file mode 100644 index 00000000000..e024626289e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/events/_ListEventsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Events operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListEventsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/AbstractFeatureFlag.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/AbstractFeatureFlag.java new file mode 100644 index 00000000000..d9a2142649f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/AbstractFeatureFlag.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * General feature flag payload. + */ +public abstract class AbstractFeatureFlag { + + /** + * The state of the feature flag + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * The custom error message for the feature flag + */ + @JsonProperty("error_message") + @Nullable + abstract String getErrorMessage(); + + /** + * The name of the feature flag + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The url for the feature flag + */ + @JsonProperty("url") + @Nullable + abstract String getUrl(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/FeatureFlags.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/FeatureFlags.java new file mode 100644 index 00000000000..2f0787908dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/FeatureFlags.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry config/feature_flags Client API + */ +public interface FeatureFlags { + + /** + * Makes one of the Get feature flags requests. See API under Feature Flags. + * + * @param request the get feature flag request + * @return the response from the get feature flag request + */ + Mono get(GetFeatureFlagRequest request); + + /** + * Makes the List Feature Flags request + * + * @param request the list feature flags request + * @return the response from the list feature flags request + */ + Mono list(ListFeatureFlagsRequest request); + + /** + * Makes the Set Feature Flag request + * + * @param request the set feature flag request + * @return the response from the set feature flag request + */ + Mono set(SetFeatureFlagRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_FeatureFlagEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_FeatureFlagEntity.java new file mode 100644 index 00000000000..bebb761ca77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_FeatureFlagEntity.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The entity response payload for Feature Flag operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _FeatureFlagEntity extends AbstractFeatureFlag { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_GetFeatureFlagRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_GetFeatureFlagRequest.java new file mode 100644 index 00000000000..21d37efc1d9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_GetFeatureFlagRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +import java.util.regex.Pattern; + +/** + * The request payload for the Get SetUserRoles feature flag operation + */ +@Value.Immutable +abstract class _GetFeatureFlagRequest { + + private static final Pattern ALPHAS_AND_UNDERS = Pattern.compile("[a-z_]*"); + + @Value.Check + void check() { + if (!ALPHAS_AND_UNDERS.matcher(getName()).matches()) { + throw new IllegalStateException("name must consist only of alphabetic characters and underscores"); + } + } + + /** + * The name of the feature flag + */ + @JsonIgnore + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_GetFeatureFlagResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_GetFeatureFlagResponse.java new file mode 100644 index 00000000000..bfc49de9986 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_GetFeatureFlagResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get SetUserRoles feature flag operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetFeatureFlagResponse extends AbstractFeatureFlag { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_ListFeatureFlagsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_ListFeatureFlagsRequest.java new file mode 100644 index 00000000000..63730340511 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_ListFeatureFlagsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import org.immutables.value.Value; + +/** + * The request payload for the List Feature Flags operation + */ +@Value.Immutable +abstract class _ListFeatureFlagsRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_ListFeatureFlagsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_ListFeatureFlagsResponse.java new file mode 100644 index 00000000000..913093606e0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_ListFeatureFlagsResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response payload for the List Feature Flags operation + */ +@JsonDeserialize(using = _ListFeatureFlagsResponse.ListFeatureFlagsResponseDeserializer.class) +@Value.Immutable +abstract class _ListFeatureFlagsResponse { + + /** + * The feature flags + */ + abstract List getFeatureFlags(); + + static final class ListFeatureFlagsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -7140658514147017528L; + + ListFeatureFlagsResponseDeserializer() { + super(ListFeatureFlagsResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListFeatureFlagsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListFeatureFlagsResponse.builder() + .featureFlags((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_SetFeatureFlagRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_SetFeatureFlagRequest.java new file mode 100644 index 00000000000..421fef048b9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_SetFeatureFlagRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Set Feature Flag operation + */ +@JsonSerialize +@Value.Immutable +abstract class _SetFeatureFlagRequest { + + /** + * The state of the feature flag + */ + @JsonProperty("enabled") + abstract Boolean getEnabled(); + + /** + * The custom error message for the feature flag + */ + @JsonProperty("error_message") + @Nullable + abstract String getErrorMessage(); + + /** + * The name of the feature flag + */ + @JsonIgnore + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_SetFeatureFlagResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_SetFeatureFlagResponse.java new file mode 100644 index 00000000000..ac567c0076c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/featureflags/_SetFeatureFlagResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Set feature flag operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SetFeatureFlagResponse extends AbstractFeatureFlag { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/Info.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/Info.java new file mode 100644 index 00000000000..00ae77e2651 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/Info.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.info; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Info Client API + */ +public interface Info { + + /** + * Makes the Get Info request + * + * @param request the Get Info request + * @return the response from the Get Info request + */ + Mono get(GetInfoRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/_GetInfoRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/_GetInfoRequest.java new file mode 100644 index 00000000000..6ecb60a4af5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/_GetInfoRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.info; + +import org.immutables.value.Value; + +/** + * The request payload for the Get Info operation + */ +@Value.Immutable +abstract class _GetInfoRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/_GetInfoResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/_GetInfoResponse.java new file mode 100644 index 00000000000..ea0470553a8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/info/_GetInfoResponse.java @@ -0,0 +1,157 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.info; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response payload for the Info operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetInfoResponse { + + /** + * The API version + */ + @JsonProperty("api_version") + @Nullable + abstract String getApiVersion(); + + /** + * The application SSH endpoint + */ + @JsonProperty("app_ssh_endpoint") + @Nullable + abstract String getApplicationSshEndpoint(); + + /** + * The application SSH host key fingerprint + */ + @JsonProperty("app_ssh_host_key_fingerprint") + @Nullable + abstract String getApplicationSshHostKeyFingerprint(); + + /** + * The application SSH OAuth client + */ + @JsonProperty("app_ssh_oauth_client") + @Nullable + abstract String getApplicationSshOAuthClient(); + + /** + * The authorization endpoint + */ + @JsonProperty("authorization_endpoint") + @Nullable + abstract String getAuthorizationEndpoint(); + + /** + * The build number + */ + @JsonProperty("build") + @Nullable + abstract String getBuildNumber(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The doppler logging endpoint + */ + @JsonProperty("doppler_logging_endpoint") + @Nullable + abstract String getDopplerLoggingEndpoint(); + + /** + * The logging endpoint + */ + @JsonProperty("logging_endpoint") + @Nullable + abstract String getLoggingEndpoint(); + + /** + * The minimum CLI version + */ + @JsonProperty("min_cli_version") + @Nullable + abstract String getMinCliVersion(); + + /** + * The minimum recommended CLI version + */ + @JsonProperty("min_recommended_cli_version") + @Nullable + abstract String getMinRecommendedCliVersion(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The version of the supported Open Service Broker API + */ + @JsonProperty("osbapi_version") + @Nullable + abstract String getOsbapiVersion(); + + /** + * The routing endpoint + */ + @JsonProperty("routing_endpoint") + @Nullable + abstract String getRoutingEndpoint(); + + /** + * The support url + */ + @JsonProperty("support") + @Nullable + abstract String getSupport(); + + /** + * The token endpoint + */ + @JsonProperty("token_endpoint") + @Nullable + abstract String getTokenEndpoint(); + + /** + * The user + */ + @JsonProperty("user") + @Nullable + abstract String getUser(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract Integer getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/AbstractJobResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/AbstractJobResource.java new file mode 100644 index 00000000000..90494df2a90 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/AbstractJobResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Job resources + */ +public abstract class AbstractJobResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/Jobs.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/Jobs.java new file mode 100644 index 00000000000..74513f95233 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/Jobs.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Job Client API + */ +public interface Jobs { + + /** + * Makes the Get Job request + * + * @param request the Get Job request + * @return the response from the Get Job request + */ + Mono get(GetJobRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_ErrorDetails.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_ErrorDetails.java new file mode 100644 index 00000000000..9517c1c98fa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_ErrorDetails.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The error details in {@link JobEntity} response payloads + */ +@JsonDeserialize +@Value.Immutable +abstract class _ErrorDetails { + + /** + * The code + */ + @JsonProperty("code") + @Nullable + abstract Integer getCode(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The error code + */ + @JsonProperty("error_code") + @Nullable + abstract String getErrorCode(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_GetJobRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_GetJobRequest.java new file mode 100644 index 00000000000..4c34d7b7be9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_GetJobRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Job operation + */ +@Value.Immutable +abstract class _GetJobRequest { + + /** + * The job id + */ + @JsonIgnore + abstract String getJobId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_GetJobResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_GetJobResponse.java new file mode 100644 index 00000000000..d962c823525 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_GetJobResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Job operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetJobResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_JobEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_JobEntity.java new file mode 100644 index 00000000000..f4a3d144127 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/jobs/_JobEntity.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Job entity in response payloads + */ +@JsonDeserialize +@Value.Immutable +abstract class _JobEntity { + + /** + * The error + */ + @JsonProperty("error") + @Nullable + abstract String getError(); + + /** + * The error details + */ + @JsonProperty("error_details") + @Nullable + abstract ErrorDetails getErrorDetails(); + + /** + * The id + */ + @JsonProperty("guid") + abstract String getId(); + + /** + * The status + */ + @JsonProperty("status") + abstract String getStatus(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/AbstractOrganizationQuotaDefinition.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/AbstractOrganizationQuotaDefinition.java new file mode 100644 index 00000000000..66f2c9adcc7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/AbstractOrganizationQuotaDefinition.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import org.cloudfoundry.client.v2.Resource; + +/** + * Organization Quota in responses + */ +public abstract class AbstractOrganizationQuotaDefinition + extends Resource< + org.cloudfoundry.client.v2.organizationquotadefinitions + .OrganizationQuotaDefinitionEntity> {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/OrganizationQuotaDefinitions.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/OrganizationQuotaDefinitions.java new file mode 100644 index 00000000000..553a527cc88 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/OrganizationQuotaDefinitions.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Organization Quota Definitions Client API + */ +public interface OrganizationQuotaDefinitions { + + /** + * Makes the Creating an Organization Quota Definition + * request + * + * @param request the Create an Organization Quota Definition request + * @return the response from the Create an Organization Quota Definition request + */ + Mono create( + CreateOrganizationQuotaDefinitionRequest request); + + /** + * Makes the Delete an Organization Quota + * Definition request + * + * @param request the Delete an Organization Quota Definition request + * @return the response from the Delete an Organization Quota Definition request + */ + Mono delete( + DeleteOrganizationQuotaDefinitionRequest request); + + /** + * Makes the Retrieve a Particular Organization + * Quota Definition request + * + * @param request the Retrieve a Particular Organization Quota Definition request + * @return the response from the Retrieve a Particular Organization Quota Definition request + */ + Mono get(GetOrganizationQuotaDefinitionRequest request); + + /** + * Makes the List all Organization Quota Definitions + * request + * + * @param request the List all Organization Quota Definitions request + * @return the response from the List all Organization Quota Definitions request + */ + Mono list( + ListOrganizationQuotaDefinitionsRequest request); + + /** + * Makes the Update an Organization Quota Definition + * request + * + * @param request the Update an Organization Quota Definition request + * @return the response from the Update an Organization Quota Definition request + */ + Mono update( + UpdateOrganizationQuotaDefinitionRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java new file mode 100644 index 00000000000..23f70d17284 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionRequest.java @@ -0,0 +1,117 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Creating a Organization Quota Definition operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateOrganizationQuotaDefinitionRequest { + + /** + * The application instance limit + */ + @JsonProperty("app_instance_limit") + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The application task limit + */ + @JsonProperty("app_task_limit") + @Nullable + abstract Integer getApplicationTaskLimit(); + + /** + * The instance memory limit + */ + @JsonProperty("instance_memory_limit") + abstract Integer getInstanceMemoryLimit(); + + /** + * The memory limit + */ + @JsonProperty("memory_limit") + abstract Integer getMemoryLimit(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The non basic services allowed + */ + @JsonProperty("non_basic_services_allowed") + abstract Boolean getNonBasicServicesAllowed(); + + /** + * The total private domains + */ + @JsonProperty("total_private_domains") + @Nullable + abstract Integer getTotalPrivateDomains(); + + /** + * The total reserved route ports + */ + @JsonProperty("total_reserved_route_ports") + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total routes + */ + @JsonProperty("total_routes") + abstract Integer getTotalRoutes(); + + /** + * The total service keys + */ + @JsonProperty("total_service_keys") + @Nullable + abstract Integer getTotalServiceKeys(); + + /** + * The total services + */ + @JsonProperty("total_services") + abstract Integer getTotalServices(); + + /** + * The trial db allowed + */ + @Deprecated + @JsonProperty("trial_db_allowed") + @Nullable + abstract Boolean getTrialDatabaseAllowed(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionResponse.java new file mode 100644 index 00000000000..dcdfeb4359c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_CreateOrganizationQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create an Organization Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateOrganizationQuotaDefinitionResponse extends AbstractOrganizationQuotaDefinition { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionRequest.java new file mode 100644 index 00000000000..3567166349c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete an Organization Quota Definition operation + */ +@Value.Immutable +abstract class _DeleteOrganizationQuotaDefinitionRequest { + + /** + * The async flag + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The quota definition id + */ + @JsonIgnore + abstract String getOrganizationQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionResponse.java new file mode 100644 index 00000000000..eb3fd1b4e33 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_DeleteOrganizationQuotaDefinitionResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response for the Delete Organization Quota Definition response + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteOrganizationQuotaDefinitionResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionRequest.java new file mode 100644 index 00000000000..9ea53b7ede1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieve a Particular Organization Quota Definition operation + */ +@Value.Immutable +abstract class _GetOrganizationQuotaDefinitionRequest { + + /** + * The quota definition id + */ + @JsonIgnore + abstract String getOrganizationQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java new file mode 100644 index 00000000000..2256d1576dc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_GetOrganizationQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieve a Particular Organization Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationQuotaDefinitionResponse extends AbstractOrganizationQuotaDefinition { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsRequest.java new file mode 100644 index 00000000000..698944e820a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Organization Quota Definitions operation + */ +@Value.Immutable +abstract class _ListOrganizationQuotaDefinitionsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsResponse.java new file mode 100644 index 00000000000..e350024f196 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_ListOrganizationQuotaDefinitionsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Organization Quota Definitions operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationQuotaDefinitionsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionEntity.java new file mode 100644 index 00000000000..9ed9964e124 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionEntity.java @@ -0,0 +1,126 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; +import org.immutables.value.Value.Default; + +/** + * The entity response payload for the Quota Definition resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationQuotaDefinitionEntity { + + /** + * The application instance limit + */ + @JsonProperty("app_instance_limit") + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The application task limit + */ + @JsonProperty("app_task_limit") + @Nullable + abstract Integer getApplicationTaskLimit(); + + /** + * The instance memory limit + */ + @JsonProperty("instance_memory_limit") + @Nullable + abstract Integer getInstanceMemoryLimit(); + + /** + * The memory limit + */ + @JsonProperty("memory_limit") + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The non basic services allowed + */ + @JsonProperty("non_basic_services_allowed") + @Nullable + abstract Boolean getNonBasicServicesAllowed(); + + /** + * The total private domains + */ + @JsonProperty("total_private_domains") + @Nullable + abstract Integer getTotalPrivateDomains(); + + /** + * The total reserved route ports + */ + @JsonProperty("total_reserved_route_ports") + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total routes + */ + @JsonProperty("total_routes") + @Nullable + abstract Integer getTotalRoutes(); + + /** + * The total service keys + */ + @JsonProperty("total_service_keys") + @Nullable + abstract Integer getTotalServiceKeys(); + + /** + * The total services + */ + @JsonProperty("total_services") + @Nullable + abstract Integer getTotalServices(); + + /** + * The trial db allowed + */ + @Deprecated + @JsonProperty("trial_db_allowed") + @Nullable + abstract Boolean getTrialDatabaseAllowed(); + + /** + * The log rate limit + */ + @Value.Default + @JsonProperty("log_rate_limit") + @Nullable + Integer getLogRateLimit(){ + return -1; + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionResource.java new file mode 100644 index 00000000000..76929688016 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_OrganizationQuotaDefinitionResource.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain Quota Definitions + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationQuotaDefinitionResource extends AbstractOrganizationQuotaDefinition { + +} + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionRequest.java new file mode 100644 index 00000000000..ba4009e65b3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionRequest.java @@ -0,0 +1,123 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Updating an Organization Quota Definition operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateOrganizationQuotaDefinitionRequest { + + /** + * The application instance limit + */ + @JsonProperty("app_instance_limit") + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The application task limit + */ + @JsonProperty("app_task_limit") + @Nullable + abstract Integer getApplicationTaskLimit(); + + /** + * The instance memory limit + */ + @JsonProperty("instance_memory_limit") + @Nullable + abstract Integer getInstanceMemoryLimit(); + + /** + * The memory limit + */ + @JsonProperty("memory_limit") + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The non basic services allowed + */ + @JsonProperty("non_basic_services_allowed") + @Nullable + abstract Boolean getNonBasicServicesAllowed(); + + /** + * The quota definition id + */ + @JsonIgnore + abstract String getOrganizationQuotaDefinitionId(); + + /** + * The total private domains + */ + @JsonProperty("total_private_domains") + @Nullable + abstract Integer getTotalPrivateDomains(); + + /** + * The total reserved route ports + */ + @JsonProperty("total_reserved_route_ports") + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total routes + */ + @JsonProperty("total_routes") + @Nullable + abstract Integer getTotalRoutes(); + + /** + * The total service keys + */ + @JsonProperty("total_service_keys") + @Nullable + abstract Integer getTotalServiceKeys(); + + /** + * The total services + */ + @JsonProperty("total_services") + @Nullable + abstract Integer getTotalServices(); + + /** + * The trial db allowed + */ + @Deprecated + @JsonProperty("trial_db_allowed") + @Nullable + abstract Boolean getTrialDatabaseAllowed(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionResponse.java new file mode 100644 index 00000000000..4c05ea91356 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizationquotadefinitions/_UpdateOrganizationQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update an Organization Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateOrganizationQuotaDefinitionResponse extends AbstractOrganizationQuotaDefinition { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/AbstractOrganizationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/AbstractOrganizationResource.java new file mode 100644 index 00000000000..dc3383debc1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/AbstractOrganizationResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The core resource in organization responses + */ +public abstract class AbstractOrganizationResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/AbstractUserOrganizationRoleResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/AbstractUserOrganizationRoleResource.java new file mode 100644 index 00000000000..f5d096fb404 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/AbstractUserOrganizationRoleResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for user Organization Role Resources + */ +public abstract class AbstractUserOrganizationRoleResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/Organizations.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/Organizations.java new file mode 100644 index 00000000000..88a8d89a2d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/Organizations.java @@ -0,0 +1,339 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Organizations Client API + */ +public interface Organizations { + + /** + * Makes the Associate Auditor with the Organization request + * + * @param request the Associate Auditor request + * @return the response from the Associate Auditor request + */ + Mono associateAuditor( + AssociateOrganizationAuditorRequest request); + + /** + * Makes the Associate Auditor with the Organization by Username + * request + * + * @param request the Associate Auditor with an Organization by Username request + * @return the response from the Associate Auditor with an Organization by Username request + */ + Mono associateAuditorByUsername( + AssociateOrganizationAuditorByUsernameRequest request); + + /** + * Makes the Associate Billing Manager with the Organization + * request + * + * @param request the Associate Billing Manager with the Organization request + * @return the response from the Associate Billing Manager with the Organization request + */ + Mono associateBillingManager( + AssociateOrganizationBillingManagerRequest request); + + /** + * Makes the Associate Billing Manager with the Organization + * by Username request + * + * @param request the Associate Billing Manager with the Organization by Username request + * @return the response from the Associate Billing Manager with the Organization by Username request + */ + Mono associateBillingManagerByUsername( + AssociateOrganizationBillingManagerByUsernameRequest request); + + /** + * Makes the Associate Manager with the Organization request + * + * @param request the Associate Manager with the Organization request + * @return the response from the Associate Manager with the Organization request + */ + Mono associateManager( + AssociateOrganizationManagerRequest request); + + /** + * Makes the Associate Manager with the Organization by Username + * request + * + * @param request the Associate Manager with the Organization by Username request + * @return the response from the Associate Manager with the Organization by Username request + */ + Mono associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest request); + + /** + * Makes the Associate Private Domain with the Organization request + * + * @param request the Associate Private Domain with the Organization request + * @return the response from the Associate Private Domain with the Organization request + */ + Mono associatePrivateDomain( + AssociateOrganizationPrivateDomainRequest request); + + /** + * Makes the Associate User with the Organization request + * + * @param request the Associate User with the Organization request + * @return the response from the Associate User with the Organization request + */ + Mono associateUser(AssociateOrganizationUserRequest request); + + /** + * Makes the Associate User with the Organization by Username + * request + * + * @param request the Associate User with the Organization by Username request + * @return the response from the Associate User with the Organization by Username request + */ + Mono associateUserByUsername( + AssociateOrganizationUserByUsernameRequest request); + + /** + * Makes the Creating an Organization request + * + * @param request the Creating an Organization request + * @return the response from the Creating an Organization request + */ + Mono create(CreateOrganizationRequest request); + + /** + * Makes the Delete a Particular Organization request + * + * @param request the Delete a Particular Organization request + * @return the response from the Delete a Particular Organization request + */ + Mono delete(DeleteOrganizationRequest request); + + /** + * Makes the Retrieve a Particular Organization request + * + * @param request the Retrieve a Particular Organization request + * @return the response from the Retrieve a Particular Organization request + */ + Mono get(GetOrganizationRequest request); + + /** + * Makes the Retrieving organization instance usage request + * + * @param request the Retrieving organization instance usage request + * @return the response from the Retrieving organization instance usage request + */ + Mono getInstanceUsage( + GetOrganizationInstanceUsageRequest request); + + /** + * Makes the Retrieving organization memory usage request + * + * @param request the Retrieving organization memory usage request + * @return the response from the Retrieving organization memory usage request + */ + Mono getMemoryUsage( + GetOrganizationMemoryUsageRequest request); + + /** + * Makes the Retrieving the roles of all Users in the + * Organization request + * + * @param request the Retrieving the roles of all Users in the Organization request + * @return the response from the Retrieving the roles of all Users in the Organization request + */ + Mono getUserRoles(GetOrganizationUserRolesRequest request); + + /** + * Makes the List Organizations request + * + * @param request the List Organizations request + * @return the response from the List Organizations request + */ + Mono list(ListOrganizationsRequest request); + + /** + * Makes the List all Auditors for the Organization request + * + * @param request the List all Auditors for the Organization request + * @return the response from the List all Auditors for the Organization request + */ + Mono listAuditors(ListOrganizationAuditorsRequest request); + + /** + * Makes the List all Billing Managers for the Organization request + * + * @param request the List all Billing Managers for the Organization request + * @return the response from the List all Billing Managers for the Organization request + */ + Mono listBillingManagers( + ListOrganizationBillingManagersRequest request); + + /** + * List all Domains for the Organization request + * + * @param request the List all Domains for the Organization request + * @return the response from the List all Domains for the Organization request + */ + @Deprecated + Mono listDomains(ListOrganizationDomainsRequest request); + + /** + * Makes the List all Managers for the Organization request + * + * @param request the List all Managers for the Organization request + * @return the response from the List all Managers for the Organization request + */ + Mono listManagers(ListOrganizationManagersRequest request); + + /** + * List all Private Domains for the Organization request + * + * @param request the List all Private Domains for the Organization request + * @return the response from the List all Private Domains for the Organization request + */ + Mono listPrivateDomains( + ListOrganizationPrivateDomainsRequest request); + + /** + * Makes the List all Services for the Organization request + * + * @param request the List all Services for the Organization request + * @return the response from the List all Services for the Organization request + */ + Mono listServices(ListOrganizationServicesRequest request); + + /** + * Makes the List all Space Quota Definitions for the + * Organization request + * + * @param request the List all Space Quota Definitions for the Organization request + * @return the response from the List all Space Quota Definitions for the Organization request + */ + Mono listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest request); + + /** + * Makes the List all Spaces for the Organization request + * + * @param request the List all Spaces for the Organization request + * @return the response from the List all Spaces for the Organization request + */ + Mono listSpaces(ListOrganizationSpacesRequest request); + + /** + * Makes the List all Users for the Organization request + * + * @param request the List all Users for the Organization request + * @return the response from the List all Users for the Organization request + */ + Mono listUsers(ListOrganizationUsersRequest request); + + /** + * Makes the Remove Auditor from the Organization request + * + * @param request the Remove Auditor from the Organization request + * @return the response from the Remove Auditor from the Organization request + */ + Mono removeAuditor(RemoveOrganizationAuditorRequest request); + + /** + * Makes the Disassociate Auditor with the Organization by + * Username request + * + * @param request the Remove Auditor with the Organization By Username request + * @return the response from the Associate Billing Manager with the Organization request + */ + Mono removeAuditorByUsername(RemoveOrganizationAuditorByUsernameRequest request); + + /** + * Makes the Remove Billing Manager from the Organization request + * + * @param request the Remove Billing Manager from the Organization request + * @return the response from the Remove Billing Manager from the Organization request + */ + Mono removeBillingManager(RemoveOrganizationBillingManagerRequest request); + + /** + * Makes the Disassociate Billing Manager with the + * Organization by Username request + * + * @param request the Disassociate Billing Manager with the Organization by Username request + * @return the response from the Disassociate Billing Manager with the Organization by Username request + */ + Mono removeBillingManagerByUsername( + RemoveOrganizationBillingManagerByUsernameRequest request); + + /** + * Makes the Remove Manager from the Organization request + * + * @param request the Remove Manager from the Organization request + * @return the response from the Remove Manager from the Organization request + */ + Mono removeManager(RemoveOrganizationManagerRequest request); + + /** + * Makes the Disassociate Manager with the Organization by + * Username request + * + * @param request the Disassociate Manager with the Organization by Username request + * @return the response from the Disassociate Manager with the Organization by Username request + */ + Mono removeManagerByUsername(RemoveOrganizationManagerByUsernameRequest request); + + /** + * Makes the Remove Private Domain from the Organization request + * + * @param request the Remove Private Domain from the Organization request + * @return the response from the Remove Private Domain from the Organization request + */ + Mono removePrivateDomain(RemoveOrganizationPrivateDomainRequest request); + + /** + * Makes the Remove User from the Organization request + * + * @param request the Remove User from the Organization request + * @return the response from the Remove User from the Organization request + */ + Mono removeUser(RemoveOrganizationUserRequest request); + + /** + * Makes the Disassociate User with the Organization by Username + * request + * + * @param request the Disassociate User with the Organization by Username request + * @return the response from the Disassociate User with the Organization by Username request + */ + Mono removeUserByUsername(RemoveOrganizationUserByUsernameRequest request); + + /** + * Makes the Get Organization summary request + * + * @param request the Organization summary request + * @return the response from the Organization summary request + */ + Mono summary(SummaryOrganizationRequest request); + + /** + * Makes the Update an Organization request + * + * @param request the Update an Organization request + * @return the response from the Update an Organization request + */ + Mono update(UpdateOrganizationRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorByUsernameRequest.java new file mode 100644 index 00000000000..74a6dd55e9f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Auditor with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateOrganizationAuditorByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorByUsernameResponse.java new file mode 100644 index 00000000000..3856d06323f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Auditor with the Organization by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationAuditorByUsernameResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorRequest.java new file mode 100644 index 00000000000..e1f5ce998a6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Auditor operation + */ +@Value.Immutable +abstract class _AssociateOrganizationAuditorRequest { + + /** + * The auditor id + */ + @JsonIgnore + abstract String getAuditorId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorResponse.java new file mode 100644 index 00000000000..454aecb2194 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationAuditorResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Auditor operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationAuditorResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerByUsernameRequest.java new file mode 100644 index 00000000000..e7f332fc2e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Billing Manager with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateOrganizationBillingManagerByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerByUsernameResponse.java new file mode 100644 index 00000000000..6f84475ccca --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Billing Manager with the Organization by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationBillingManagerByUsernameResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerRequest.java new file mode 100644 index 00000000000..62a42dd64ae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Billing Manager with the Organization operation + */ +@Value.Immutable +abstract class _AssociateOrganizationBillingManagerRequest { + + /** + * The billing manager id + */ + @JsonIgnore + abstract String getBillingManagerId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerResponse.java new file mode 100644 index 00000000000..008a6831c7d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationBillingManagerResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Billing Manager with the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationBillingManagerResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerByUsernameRequest.java new file mode 100644 index 00000000000..4a334e00b6f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Manager with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateOrganizationManagerByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerByUsernameResponse.java new file mode 100644 index 00000000000..3d4540e1f00 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Manager with the Organization by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationManagerByUsernameResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerRequest.java new file mode 100644 index 00000000000..898b44c4a1f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Manager with the Organization operation + */ +@Value.Immutable +abstract class _AssociateOrganizationManagerRequest { + + /** + * The manager id + */ + @JsonIgnore + abstract String getManagerId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerResponse.java new file mode 100644 index 00000000000..7629e50acba --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationManagerResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Manager with the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationManagerResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationPrivateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationPrivateDomainRequest.java new file mode 100644 index 00000000000..13cb43f84cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationPrivateDomainRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Private Domain with the Organization operation + */ +@Value.Immutable +abstract class _AssociateOrganizationPrivateDomainRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The private domain id + */ + @JsonIgnore + abstract String getPrivateDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationPrivateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationPrivateDomainResponse.java new file mode 100644 index 00000000000..362cbd8c7ee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationPrivateDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Private Domain with the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationPrivateDomainResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserByUsernameRequest.java new file mode 100644 index 00000000000..cf088b4856e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate User with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateOrganizationUserByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserByUsernameResponse.java new file mode 100644 index 00000000000..e27db8cd68b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate User with the Organization by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationUserByUsernameResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserRequest.java new file mode 100644 index 00000000000..88876f8b121 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate User with the Organization operation + */ +@Value.Immutable +abstract class _AssociateOrganizationUserRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserResponse.java new file mode 100644 index 00000000000..692c158c405 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_AssociateOrganizationUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate User with the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateOrganizationUserResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_CreateOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_CreateOrganizationRequest.java new file mode 100644 index 00000000000..5f1646514f8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_CreateOrganizationRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Creating an Organization operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateOrganizationRequest { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The quota definition id + */ + @JsonProperty("quota_definition_guid") + @Nullable + abstract String getQuotaDefinitionId(); + + /** + * The status + */ + @JsonProperty("status") + @Nullable + abstract String getStatus(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_CreateOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_CreateOrganizationResponse.java new file mode 100644 index 00000000000..d06303df144 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_CreateOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Creating an Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateOrganizationResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_DeleteOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_DeleteOrganizationRequest.java new file mode 100644 index 00000000000..6dc9e5bcb28 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_DeleteOrganizationRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Particular Organization operation + */ +@Value.Immutable +abstract class _DeleteOrganizationRequest { + + /** + * Whether to delete asynchronously + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * Whether to delete recursively + */ + @Nullable + @QueryParameter("recursive") + abstract Boolean getRecursive(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_DeleteOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_DeleteOrganizationResponse.java new file mode 100644 index 00000000000..bccfb5e189c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_DeleteOrganizationResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response for the Delete Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteOrganizationResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationInstanceUsageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationInstanceUsageRequest.java new file mode 100644 index 00000000000..a8b5d69f7e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationInstanceUsageRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieving an organizations instance usage operation + */ +@Value.Immutable +abstract class _GetOrganizationInstanceUsageRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationInstanceUsageResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationInstanceUsageResponse.java new file mode 100644 index 00000000000..31abdd19f11 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationInstanceUsageResponse.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieving the organizations instance usage operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationInstanceUsageResponse { + + /** + * The instance usage + */ + @JsonProperty("instance_usage") + @Nullable + abstract Integer getInstanceUsage(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationMemoryUsageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationMemoryUsageRequest.java new file mode 100644 index 00000000000..3eb71eede1a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationMemoryUsageRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieving an organizations memory usage operation + */ +@Value.Immutable +abstract class _GetOrganizationMemoryUsageRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationMemoryUsageResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationMemoryUsageResponse.java new file mode 100644 index 00000000000..66f6d483e21 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationMemoryUsageResponse.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieving the organizations memory usage operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationMemoryUsageResponse { + + /** + * The memory usage in mb + */ + @JsonProperty("memory_usage_in_mb") + @Nullable + abstract Integer getMemoryUsageInMb(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationRequest.java new file mode 100644 index 00000000000..7c3c6adb1dc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieve a Particular Organization operation + */ +@Value.Immutable +abstract class _GetOrganizationRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationResponse.java new file mode 100644 index 00000000000..fc54aab5c37 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieve a Particular Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationUserRolesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationUserRolesRequest.java new file mode 100644 index 00000000000..217ad5e0d5b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationUserRolesRequest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieving the roles of all Users in the Organization operation + */ +@Value.Immutable +abstract class _GetOrganizationUserRolesRequest extends PaginatedRequest { + + /** + * The organization id + */ + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationUserRolesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationUserRolesResponse.java new file mode 100644 index 00000000000..48eab37c78e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_GetOrganizationUserRolesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieving the roles of all Users in the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationUserRolesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationAuditorsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationAuditorsRequest.java new file mode 100644 index 00000000000..1b62169abe6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationAuditorsRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Auditors for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationAuditorsRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationAuditorsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationAuditorsResponse.java new file mode 100644 index 00000000000..13b1b8967fb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationAuditorsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Auditors for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationAuditorsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationBillingManagersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationBillingManagersRequest.java new file mode 100644 index 00000000000..1ab6a5a5172 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationBillingManagersRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Billing Managers for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationBillingManagersRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationBillingManagersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationBillingManagersResponse.java new file mode 100644 index 00000000000..504fb99b501 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationBillingManagersResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Billing Managers for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationBillingManagersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationDomainsRequest.java new file mode 100644 index 00000000000..daec0d25557 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationDomainsRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Private Domains for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationDomainsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The owning organization ids + */ + @FilterParameter("owning_organization_guid") + @Nullable + abstract List getOwningOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationDomainsResponse.java new file mode 100644 index 00000000000..710d24de3e4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationDomainsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Private Domains for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationManagersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationManagersRequest.java new file mode 100644 index 00000000000..e6c75d8a70b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationManagersRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Managers for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationManagersRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationManagersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationManagersResponse.java new file mode 100644 index 00000000000..0aa93b71daf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationManagersResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Managers for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationManagersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationPrivateDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationPrivateDomainsRequest.java new file mode 100644 index 00000000000..ecf3fa10b96 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationPrivateDomainsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Private Domains for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationPrivateDomainsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationPrivateDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationPrivateDomainsResponse.java new file mode 100644 index 00000000000..c2124c2ee2d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationPrivateDomainsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Private Domains for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationPrivateDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationServicesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationServicesRequest.java new file mode 100644 index 00000000000..4c1a3f638d5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationServicesRequest.java @@ -0,0 +1,68 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Services for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationServicesRequest extends PaginatedRequest { + + /** + * The active flag + */ + @FilterParameter("active") + @Nullable + abstract Boolean getActive(); + + /** + * The labels + */ + @FilterParameter("label") + @Nullable + abstract List getLabels(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The providers + */ + @Deprecated + @FilterParameter("provider") + @Nullable + abstract List getProviders(); + + /** + * The service broker ids + */ + @FilterParameter("service_broker_guid") + @Nullable + abstract List getServiceBrokerIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationServicesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationServicesResponse.java new file mode 100644 index 00000000000..7d6cd39e188 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationServicesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Services for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationServicesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpaceQuotaDefinitionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpaceQuotaDefinitionsRequest.java new file mode 100644 index 00000000000..478b7043171 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpaceQuotaDefinitionsRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Space Quota Definitions for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationSpaceQuotaDefinitionsRequest extends PaginatedRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpaceQuotaDefinitionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpaceQuotaDefinitionsResponse.java new file mode 100644 index 00000000000..8dab676ab66 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpaceQuotaDefinitionsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Space Quota Definitions for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationSpaceQuotaDefinitionsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpacesRequest.java new file mode 100644 index 00000000000..67def857a36 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpacesRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Spaces for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationSpacesRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The developer ids + */ + @FilterParameter("developer_guid") + @Nullable + abstract List getDeveloperIds(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpacesResponse.java new file mode 100644 index 00000000000..5232b56b1cf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Spaces for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationUsersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationUsersRequest.java new file mode 100644 index 00000000000..c40a524317c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationUsersRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Users for the Organization operation + */ +@Value.Immutable +abstract class _ListOrganizationUsersRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationUsersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationUsersResponse.java new file mode 100644 index 00000000000..04bebdb6ae8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationUsersResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Users for the Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationUsersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationsRequest.java new file mode 100644 index 00000000000..53288abd0b4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationsRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Organizations operation + */ +@Value.Immutable +abstract class _ListOrganizationsRequest extends PaginatedRequest { + + /** + * The auditor ids + */ + @FilterParameter("auditor_guid") + @Nullable + abstract List getAuditorIds(); + + /** + * The billing manager ids + */ + @FilterParameter("billing_manager_guid") + @Nullable + abstract List getBillingManagerIds(); + + /** + * The manager ids + */ + @FilterParameter("manager_guid") + @Nullable + abstract List getManagerIds(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + + /** + * The statuses + */ + @FilterParameter("status") + @Nullable + abstract List getStatuses(); + + /** + * The user ids + */ + @FilterParameter("user_guid") + @Nullable + abstract List getUserIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationsResponse.java new file mode 100644 index 00000000000..36cb937950b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_ListOrganizationsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Operations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationEntity.java new file mode 100644 index 00000000000..0bfdafe7aa9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationEntity.java @@ -0,0 +1,143 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Organization resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationEntity { + + /** + * The application events url + */ + @JsonProperty("app_events_url") + @Nullable + abstract String getApplicationEventsUrl(); + + /** + * The auditors url + */ + @JsonProperty("auditors_url") + @Nullable + abstract String getAuditorsUrl(); + + /** + * Billing enabled + */ + @JsonProperty("billing_enabled") + @Nullable + abstract Boolean getBillingEnabled(); + + /** + * The billing managers url + */ + @JsonProperty("billing_managers_url") + @Nullable + abstract String getBillingManagersUrl(); + + /** + * The default isolation segment id + */ + @JsonProperty("default_isolation_segment_guid") + @Nullable + abstract String getDefaultIsolationSegmentId(); + + /** + * The domains url + */ + @JsonProperty("domains_url") + @Nullable + abstract String getDomainsUrl(); + + /** + * The isolation segment url + */ + @JsonProperty("isolation_segment_url") + @Nullable + abstract String getIsolationSegmentUrl(); + + /** + * The managers url + */ + @JsonProperty("managers_url") + @Nullable + abstract String getManagersUrl(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The private domains url + */ + @JsonProperty("private_domains_url") + @Nullable + abstract String getPrivateDomainsUrl(); + + /** + * The quota definition id + */ + @JsonProperty("quota_definition_guid") + @Nullable + abstract String getQuotaDefinitionId(); + + /** + * The quota definition url + */ + @JsonProperty("quota_definition_url") + @Nullable + abstract String getQuotaDefinitionUrl(); + + /** + * The space quota definition url + */ + @JsonProperty("space_quota_definitions_url") + @Nullable + abstract String getSpaceQuotaDefinitionsUrl(); + + /** + * The spaces url + */ + @JsonProperty("spaces_url") + @Nullable + abstract String getSpacesUrl(); + + /** + * The status + */ + @JsonProperty("status") + @Nullable + abstract String getStatus(); + + /** + * The users url + */ + @JsonProperty("users_url") + @Nullable + abstract String getUsersUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationResource.java new file mode 100644 index 00000000000..bd7167bad45 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain auditors + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationResource extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationSpaceSummary.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationSpaceSummary.java new file mode 100644 index 00000000000..3181165c64d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_OrganizationSpaceSummary.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The Space part of an Organization summary + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationSpaceSummary { + + /** + * The application count + */ + @JsonProperty("app_count") + @Nullable + abstract Integer getApplicationCount(); + + /** + * The space id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The mem_dev_total + */ + @JsonProperty("mem_dev_total") + @Nullable + abstract Integer getMemoryDevelopmentTotal(); + + /** + * The mem_prod_total + */ + @JsonProperty("mem_prod_total") + @Nullable + abstract Integer getMemoryProductionTotal(); + + /** + * The space name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The service count + */ + @JsonProperty("service_count") + @Nullable + abstract Integer getServiceCount(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationAuditorByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationAuditorByUsernameRequest.java new file mode 100644 index 00000000000..3fc60a2d1e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationAuditorByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Remove (Disassociate) Auditor with Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveOrganizationAuditorByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationAuditorRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationAuditorRequest.java new file mode 100644 index 00000000000..1c28495a3bb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationAuditorRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Auditor from the Organization operation + */ +@Value.Immutable +abstract class _RemoveOrganizationAuditorRequest { + + /** + * The auditor id + */ + @JsonIgnore + abstract String getAuditorId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationBillingManagerByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationBillingManagerByUsernameRequest.java new file mode 100644 index 00000000000..3b9f83bf114 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationBillingManagerByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Disassociate Billing Manager with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveOrganizationBillingManagerByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationBillingManagerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationBillingManagerRequest.java new file mode 100644 index 00000000000..447a5cac6fd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationBillingManagerRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Billing Manager from the Organization operation + */ +@Value.Immutable +abstract class _RemoveOrganizationBillingManagerRequest { + + /** + * The billing manager id + */ + @JsonIgnore + abstract String getBillingManagerId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationManagerByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationManagerByUsernameRequest.java new file mode 100644 index 00000000000..9a6ecc675f2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationManagerByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Disassociate Manager with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveOrganizationManagerByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationManagerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationManagerRequest.java new file mode 100644 index 00000000000..013c2eac383 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationManagerRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Manager from the Organization operation + */ +@Value.Immutable +abstract class _RemoveOrganizationManagerRequest { + + /** + * The manager id + */ + @JsonIgnore + abstract String getManagerId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationPrivateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationPrivateDomainRequest.java new file mode 100644 index 00000000000..5412e6ee9b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationPrivateDomainRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Private Domain from the Organization operation + */ +@Value.Immutable +abstract class _RemoveOrganizationPrivateDomainRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The private domain id + */ + @JsonIgnore + abstract String getPrivateDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationUserByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationUserByUsernameRequest.java new file mode 100644 index 00000000000..f14170b2fec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationUserByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Disassociate User with the Organization by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveOrganizationUserByUsernameRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationUserRequest.java new file mode 100644 index 00000000000..1d7ccaafcbb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_RemoveOrganizationUserRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove User from the Organization operation + */ +@Value.Immutable +abstract class _RemoveOrganizationUserRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationRequest.java new file mode 100644 index 00000000000..a2de35f965f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Organization summary operation + */ +@Value.Immutable +abstract class _SummaryOrganizationRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationResponse.java new file mode 100644 index 00000000000..92559f75b05 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_SummaryOrganizationResponse.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Organization summary operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SummaryOrganizationResponse { + + /** + * The organization id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The organization name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * List of spaces that are in the organization + */ + @JsonProperty("spaces") + @Nullable + abstract List getSpaces(); + + /** + * The organization status + */ + @JsonProperty("status") + @Nullable + abstract String getStatus(); + + /** + * mode + */ + @JsonProperty("mode") + @Nullable + abstract String getMode(); + + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UpdateOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UpdateOrganizationRequest.java new file mode 100644 index 00000000000..9d5a26c5528 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UpdateOrganizationRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Update an Organization operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateOrganizationRequest { + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The quota definition id + */ + @JsonProperty("quota_definition_guid") + @Nullable + abstract String getQuotaDefinitionId(); + + /** + * The status + */ + @JsonProperty("status") + @Nullable + abstract String getStatus(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UpdateOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UpdateOrganizationResponse.java new file mode 100644 index 00000000000..0f3a2d768dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UpdateOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update an Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateOrganizationResponse extends AbstractOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UserOrganizationRoleEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UserOrganizationRoleEntity.java new file mode 100644 index 00000000000..54d68c3b192 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UserOrganizationRoleEntity.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.users.AbstractUserEntity; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the Route resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserOrganizationRoleEntity extends AbstractUserEntity { + + /** + * The organization roles + */ + @JsonProperty("organization_roles") + @Nullable + abstract List getOrganizationRoles(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UserOrganizationRoleResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UserOrganizationRoleResource.java new file mode 100644 index 00000000000..a0de9bd9b19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/organizations/_UserOrganizationRoleResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * User Role Resource in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserOrganizationRoleResource extends AbstractUserOrganizationRoleResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/AbstractPrivateDomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/AbstractPrivateDomainResource.java new file mode 100644 index 00000000000..eaba3c11c90 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/AbstractPrivateDomainResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The response payload for the deprecated Create a Private Domain operation + */ +public abstract class AbstractPrivateDomainResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/PrivateDomains.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/PrivateDomains.java new file mode 100644 index 00000000000..6f1c4180405 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/PrivateDomains.java @@ -0,0 +1,68 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Domains Client API + */ +public interface PrivateDomains { + + /** + * Makes the Create a Private Domain owned by the given + * Organization request + * + * @param request the Create a Private Domain request + * @return the response from the Create a Private Domain request + */ + Mono create(CreatePrivateDomainRequest request); + + /** + * Makes the Delete a Particular Private Domain request + * + * @param request the Delete Private Domain request + * @return the response from the Delete Private Domain request + */ + Mono delete(DeletePrivateDomainRequest request); + + /** + * Makes the Retrieve a Particular Private Domain request + * + * @param request the Get Private Domain request + * @return the response from the Get Private Domain request + */ + Mono get(GetPrivateDomainRequest request); + + /** + * Makes the List Private Domains request + * + * @param request the List Private Domains request + * @return the response from the List Private Domains request + */ + Mono list(ListPrivateDomainsRequest request); + + /** + * Makes the List all Shared Organizations for the Private + * Domain request + * + * @param request the List Private Domain Shared Organizations request + * @return the response from the List Private Domains Shared Organizations request + */ + Mono listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_CreatePrivateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_CreatePrivateDomainRequest.java new file mode 100644 index 00000000000..a37530b14e2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_CreatePrivateDomainRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the deprecated Create a Private Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreatePrivateDomainRequest { + + /** + * The domain name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The owning organization id + */ + @JsonProperty("owning_organization_guid") + abstract String getOwningOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_CreatePrivateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_CreatePrivateDomainResponse.java new file mode 100644 index 00000000000..38964aa0fa3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_CreatePrivateDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the deprecated Create a Private Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreatePrivateDomainResponse extends AbstractPrivateDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_DeletePrivateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_DeletePrivateDomainRequest.java new file mode 100644 index 00000000000..f85581acb64 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_DeletePrivateDomainRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Particular Private Domain operation + */ +@Value.Immutable +abstract class _DeletePrivateDomainRequest { + + /** + * The async + */ + @QueryParameter("async") + @Nullable + abstract Boolean getAsync(); + + /** + * The private domain id + */ + @JsonIgnore + abstract String getPrivateDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_DeletePrivateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_DeletePrivateDomainResponse.java new file mode 100644 index 00000000000..60ca253d510 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_DeletePrivateDomainResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response to the Delete Private Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeletePrivateDomainResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_GetPrivateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_GetPrivateDomainRequest.java new file mode 100644 index 00000000000..f9660aa4329 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_GetPrivateDomainRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Private Domain operation + */ +@Value.Immutable +abstract class _GetPrivateDomainRequest { + + /** + * The private domain id + */ + @JsonIgnore + abstract String getPrivateDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_GetPrivateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_GetPrivateDomainResponse.java new file mode 100644 index 00000000000..420cb118692 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_GetPrivateDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Private Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetPrivateDomainResponse extends AbstractPrivateDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainSharedOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainSharedOrganizationsRequest.java new file mode 100644 index 00000000000..a8f74c6a129 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainSharedOrganizationsRequest.java @@ -0,0 +1,88 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Private Domain Shared Organizations operation + */ +@Value.Immutable +abstract class _ListPrivateDomainSharedOrganizationsRequest extends PaginatedRequest { + + /** + * The auditor ids + */ + @FilterParameter("auditor_guid") + @Nullable + abstract List getAuditorIds(); + + /** + * The billing manager ids + */ + @FilterParameter("billing_manager_guid") + @Nullable + abstract List getBillingManagerIds(); + + /** + * The manager ids + */ + @FilterParameter("manager_guid") + @Nullable + abstract List getManagerIds(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The private domain id + */ + @JsonIgnore + abstract String getPrivateDomainId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + + /** + * The statuses + */ + @FilterParameter("status") + @Nullable + abstract List getStatuses(); + + /** + * The user ids + */ + @FilterParameter("user_guid") + @Nullable + abstract List getUserIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainSharedOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainSharedOrganizationsResponse.java new file mode 100644 index 00000000000..980ccb6e2b9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainSharedOrganizationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Private Domain Shared Organizations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListPrivateDomainSharedOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainsRequest.java new file mode 100644 index 00000000000..fab03743696 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainsRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Private Domains operation + */ +@Value.Immutable +abstract class _ListPrivateDomainsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainsResponse.java new file mode 100644 index 00000000000..2a6d66b2a0e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_ListPrivateDomainsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Private Domains operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListPrivateDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_PrivateDomainEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_PrivateDomainEntity.java new file mode 100644 index 00000000000..ed3700db8ca --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_PrivateDomainEntity.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _PrivateDomainEntity { + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The owning organization id + */ + @JsonProperty("owning_organization_guid") + @Nullable + abstract String getOwningOrganizationId(); + + /** + * The owning organization url + */ + @JsonProperty("owning_organization_url") + @Nullable + abstract String getOwningOrganizationUrl(); + + /** + * The shared organizations url + */ + @JsonProperty("shared_organizations_url") + @Nullable + abstract String getSharedOrganizationsUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_PrivateDomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_PrivateDomainResource.java new file mode 100644 index 00000000000..c7d94102801 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/privatedomains/_PrivateDomainResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _PrivateDomainResource extends AbstractPrivateDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/ResourceMatch.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/ResourceMatch.java new file mode 100644 index 00000000000..01843cd15b4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/ResourceMatch.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.resourcematch; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Resource Matching Client API + */ +public interface ResourceMatch { + + /** + * Makes the List Matching Resources request + * + * @param request the List Matching Resources request + * @return the response from the List Matching Resources request + */ + Mono list(ListMatchingResourcesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_ListMatchingResourcesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_ListMatchingResourcesRequest.java new file mode 100644 index 00000000000..03cb0c63b9c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_ListMatchingResourcesRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.resourcematch; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the List Matching Resources operation + */ +@JsonSerialize(using = _ListMatchingResourcesRequest.ListMatchingResourcesRequestSerializer.class) +@Value.Immutable +abstract class _ListMatchingResourcesRequest { + + /** + * The resources + */ + abstract List getResources(); + + static final class ListMatchingResourcesRequestSerializer extends StdSerializer { + + private static final long serialVersionUID = 9014636223275241673L; + + ListMatchingResourcesRequestSerializer() { + super(ListMatchingResourcesRequest.class); + } + + @Override + public void serialize(ListMatchingResourcesRequest value, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(value.getResources()); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_ListMatchingResourcesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_ListMatchingResourcesResponse.java new file mode 100644 index 00000000000..bb3d7cbf8d6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_ListMatchingResourcesResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.resourcematch; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response payload for the List Matching Resources operation + */ +@JsonDeserialize(using = _ListMatchingResourcesResponse.ListMatchingResourcesResponseDeserializer.class) +@Value.Immutable +abstract class _ListMatchingResourcesResponse { + + /** + * The resources + */ + abstract List getResources(); + + static final class ListMatchingResourcesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 3925746088156597950L; + + ListMatchingResourcesResponseDeserializer() { + super(ListMatchingResourcesResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListMatchingResourcesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListMatchingResourcesResponse.builder() + .resources((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_Resource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_Resource.java new file mode 100644 index 00000000000..055f5a03c05 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/resourcematch/_Resource.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.resourcematch; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A resource used for matching or has been matched + */ +@JsonDeserialize +@Value.Immutable +abstract class _Resource { + + /** + * The hash + */ + @JsonProperty("sha1") + @Nullable + abstract String getHash(); + + /** + * The POSIX file mode in an octal representation + */ + @JsonProperty("mode") + @Nullable + abstract String getMode(); + + /** + * The size + */ + @JsonProperty("size") + @Nullable + abstract Integer getSize(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/AbstractRouteMappingResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/AbstractRouteMappingResource.java new file mode 100644 index 00000000000..2855a80d32b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/AbstractRouteMappingResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The resource response payload for Route Mapping + */ +public abstract class AbstractRouteMappingResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/RouteMappings.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/RouteMappings.java new file mode 100644 index 00000000000..24f734157f6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/RouteMappings.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Route Mappings V2 Client API + */ +public interface RouteMappings { + + /** + * Makes the Creating a Route Mapping request + * + * @param request the Creating a Route Mapping request + * @return the response from the Creating a Route Mapping request + */ + Mono create(CreateRouteMappingRequest request); + + /** + * Makes the Deleting a Route Mapping request + * + * @param request the Delete a Route Mapping request + * @return the response from deleting a Route Mapping request + */ + Mono delete(DeleteRouteMappingRequest request); + + /** + * Makes the Retrieve a Particular Route Mapping request + * + * @param request the Get a Particular Route Mapping request + * @return the response from the Get a Particular Route Mapping request + */ + Mono get(GetRouteMappingRequest request); + + /** + * Makes the List Route Mappings request + * + * @param request the List Route Mappings request + * @return the response from the List Route Mappings request + */ + Mono list(ListRouteMappingsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_CreateRouteMappingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_CreateRouteMappingRequest.java new file mode 100644 index 00000000000..7b6d0083d31 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_CreateRouteMappingRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create a Route Mapping operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateRouteMappingRequest { + + /** + * The application id + */ + @JsonProperty("app_guid") + abstract String getApplicationId(); + + /** + * The application port on which the application should listen, and to which requests for the mapped route will be routed. + */ + @JsonProperty("app_port") + @Nullable + abstract Integer getApplicationPort(); + + /** + * The route id + */ + @JsonProperty("route_guid") + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_CreateRouteMappingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_CreateRouteMappingResponse.java new file mode 100644 index 00000000000..1ae45896414 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_CreateRouteMappingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create a Route Mapping operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateRouteMappingResponse extends AbstractRouteMappingResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_DeleteRouteMappingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_DeleteRouteMappingRequest.java new file mode 100644 index 00000000000..57cdb6e25d6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_DeleteRouteMappingRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload object for the Delete a Route Mapping operation + */ +@Value.Immutable +abstract class _DeleteRouteMappingRequest { + + /** + * The async parameter + */ + @QueryParameter("async") + @Nullable + abstract Boolean getAsync(); + + /** + * The route mapping id + */ + @JsonIgnore + abstract String getRouteMappingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_DeleteRouteMappingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_DeleteRouteMappingResponse.java new file mode 100644 index 00000000000..1cfe7983828 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_DeleteRouteMappingResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete a Route Mapping operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteRouteMappingResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_GetRouteMappingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_GetRouteMappingRequest.java new file mode 100644 index 00000000000..e9aa95d24b2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_GetRouteMappingRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload object for the Get a Route Mapping operation + */ +@Value.Immutable +abstract class _GetRouteMappingRequest { + + /** + * The route mapping id + */ + @JsonIgnore + abstract String getRouteMappingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_GetRouteMappingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_GetRouteMappingResponse.java new file mode 100644 index 00000000000..0f07bd3b641 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_GetRouteMappingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get a Route Mapping operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetRouteMappingResponse extends AbstractRouteMappingResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_ListRouteMappingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_ListRouteMappingsRequest.java new file mode 100644 index 00000000000..7b03bb42530 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_ListRouteMappingsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Route Mappings operation + */ +@Value.Immutable +abstract class _ListRouteMappingsRequest extends PaginatedRequest { + + /** + * The ids of the applications + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The ids of the routes + */ + @FilterParameter("route_guid") + @Nullable + abstract List getRouteIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_ListRouteMappingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_ListRouteMappingsResponse.java new file mode 100644 index 00000000000..29f1daa0df4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_ListRouteMappingsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Route Mappings operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRouteMappingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_RouteMappingEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_RouteMappingEntity.java new file mode 100644 index 00000000000..ca6b91b71ea --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_RouteMappingEntity.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Route Mapping resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouteMappingEntity { + + /** + * The application id + */ + @JsonProperty("app_guid") + @Nullable + abstract String getApplicationId(); + + /** + * The application port + */ + @JsonProperty("app_port") + @Nullable + abstract Integer getApplicationPort(); + + /** + * The application url + */ + @JsonProperty("app_url") + @Nullable + abstract String getApplicationUrl(); + + /** + * The route id + */ + @JsonProperty("route_guid") + @Nullable + abstract String getRouteId(); + + /** + * The route url + */ + @JsonProperty("route_url") + @Nullable + abstract String getRouteUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_RouteMappingResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_RouteMappingResource.java new file mode 100644 index 00000000000..3ed54f470a9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routemappings/_RouteMappingResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Route Mappings + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouteMappingResource extends AbstractRouteMappingResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/AbstractRouteResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/AbstractRouteResource.java new file mode 100644 index 00000000000..0dae4923432 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/AbstractRouteResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import org.cloudfoundry.client.v2.Resource; + +/** + * Base class for all route resources + */ +public abstract class AbstractRouteResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/Routes.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/Routes.java new file mode 100644 index 00000000000..f0b4f6dbf30 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/Routes.java @@ -0,0 +1,106 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Routes V2 Client API + */ +public interface Routes { + + /** + * Makes the Associate Application with the Route request + * + * @param request the Associate an Application with the Route request + * @return the response from the Associate an Application with the Route request + */ + Mono associateApplication( + AssociateRouteApplicationRequest request); + + /** + * Makes the Creating a Route request + * + * @param request the Creating a Route request + * @return the response from the Creating a Route request + */ + Mono create(CreateRouteRequest request); + + /** + * Makes the Delete a Particular Route request + * + * @param request the Delete a Particular Route request + * @return the response from the Delete a Particular Route request + */ + Mono delete(DeleteRouteRequest request); + + /** + * Makes the Check a Route exists request + * + * @param request the Check a Route exists request + * @return the response from the Check a Route exists request + */ + Mono exists(RouteExistsRequest request); + + /** + * Makes the Retrieve a Particular Route request + * + * @param request the Retrieve a Particular Route request + * @return the response from the Retrieve a Particular Route request + */ + Mono get(GetRouteRequest request); + + /** + * Makes the List all Routes request + * + * @param request the List all Applications for the Route request + * @return the response from the List all Applications for the Route request + */ + Mono list(ListRoutesRequest request); + + /** + * Makes the List all Applications for the Route request + * + * @param request the List all Applications for the Route request + * @return the response from the List all Applications for the Route request + */ + Mono listApplications(ListRouteApplicationsRequest request); + + /** + * Makes the List all Route Mappings for the Route request + * + * @param request the List all Route Mappings for the Route request + * @return the response from the List all Route Mappings for the Route request + */ + Mono listMappings(ListRouteMappingsRequest request); + + /** + * Makes the Remove Application from the Route request + * + * @param request the Remove Application from the Route request + * @return the response from the Remove Application from the Route request + */ + Mono removeApplication(RemoveRouteApplicationRequest request); + + /** + * Makes the Update a Route request + * + * @param request the Update a Route request + * @return the response from the Update a Route request + */ + Mono update(UpdateRouteRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_AssociateRouteApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_AssociateRouteApplicationRequest.java new file mode 100644 index 00000000000..43a93966787 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_AssociateRouteApplicationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate an Application with the Route operation + */ +@Value.Immutable +abstract class _AssociateRouteApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_AssociateRouteApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_AssociateRouteApplicationResponse.java new file mode 100644 index 00000000000..cf380460a7a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_AssociateRouteApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate an Application with the Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateRouteApplicationResponse extends AbstractRouteResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_CreateRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_CreateRouteRequest.java new file mode 100644 index 00000000000..8a64209a485 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_CreateRouteRequest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Creating a Route operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateRouteRequest { + + /** + * The domain id + */ + @JsonProperty("domain_guid") + abstract String getDomainId(); + + /** + * The generate port + */ + @Nullable + @QueryParameter("generate_port") + abstract Boolean getGeneratePort(); + + /** + * The host + */ + @JsonProperty("host") + @Nullable + abstract String getHost(); + + /** + * The path + */ + @JsonProperty("path") + @Nullable + abstract String getPath(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + + /** + * The space id + */ + @JsonProperty("space_guid") + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_CreateRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_CreateRouteResponse.java new file mode 100644 index 00000000000..7c058dacc94 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_CreateRouteResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Creating a Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateRouteResponse extends AbstractRouteResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_DeleteRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_DeleteRouteRequest.java new file mode 100644 index 00000000000..ef8672bd793 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_DeleteRouteRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Particular Route operation + */ +@Value.Immutable +abstract class _DeleteRouteRequest { + + /** + * The async + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_DeleteRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_DeleteRouteResponse.java new file mode 100644 index 00000000000..b99ee7efcb3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_DeleteRouteResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response for the Delete Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteRouteResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_GetRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_GetRouteRequest.java new file mode 100644 index 00000000000..e1f8ca51b8d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_GetRouteRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieve a Particular Route operation + */ +@Value.Immutable +abstract class _GetRouteRequest { + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_GetRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_GetRouteResponse.java new file mode 100644 index 00000000000..6d1835a0fbf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_GetRouteResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieve a Particular Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetRouteResponse extends AbstractRouteResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteApplicationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteApplicationsRequest.java new file mode 100644 index 00000000000..625a2aa9bab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteApplicationsRequest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Applications for the Route operation + */ +@Value.Immutable +abstract class _ListRouteApplicationsRequest extends PaginatedRequest { + + /** + * The application id + */ + @Nullable + @QueryParameter("app_guid") + abstract String getApplicationId(); + + /** + * The diego flag + */ + @FilterParameter("diego") + @Nullable + abstract Boolean getDiego(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + + /** + * The stack ids + */ + @FilterParameter("stack_guid") + @Nullable + abstract List getStackIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteApplicationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteApplicationsResponse.java new file mode 100644 index 00000000000..fea982705bf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteApplicationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Applications for the Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRouteApplicationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteMappingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteMappingsRequest.java new file mode 100644 index 00000000000..fe93fa4f179 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteMappingsRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Route Mappings for the Route operation + */ +@Value.Immutable +abstract class _ListRouteMappingsRequest extends PaginatedRequest { + + /** + * The application id + */ + @Nullable + @QueryParameter("app_guid") + abstract String getApplicationId(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteMappingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteMappingsResponse.java new file mode 100644 index 00000000000..9e24188d98f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRouteMappingsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.routemappings.RouteMappingResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Route Mappings for the Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRouteMappingsResponse extends PaginatedResponse { + +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRoutesRequest.java new file mode 100644 index 00000000000..e40faea777f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRoutesRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Routes operation + */ +@Value.Immutable +abstract class _ListRoutesRequest extends PaginatedRequest { + + /** + * The domain ids + */ + @FilterParameter("domain_guid") + @Nullable + abstract List getDomainIds(); + + /** + * The hosts + */ + @FilterParameter("host") + @Nullable + abstract List getHosts(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The paths + */ + @FilterParameter("path") + @Nullable + abstract List getPaths(); + + /** + * The port + */ + @FilterParameter("port") + @Nullable + abstract Integer getPort(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRoutesResponse.java new file mode 100644 index 00000000000..d4757250d3c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_ListRoutesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Routes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RemoveRouteApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RemoveRouteApplicationRequest.java new file mode 100644 index 00000000000..51feb25b527 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RemoveRouteApplicationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Application from the Route operation + */ +@Value.Immutable +abstract class _RemoveRouteApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_Route.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_Route.java new file mode 100644 index 00000000000..4671e251230 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_Route.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.domains.Domain; +import org.immutables.value.Value; + +/** + * A route bound to an application + */ +@JsonDeserialize +@Value.Immutable +abstract class _Route { + + /** + * The domain + */ + @JsonProperty("domain") + @Nullable + abstract Domain getDomain(); + + /** + * The host + */ + @JsonProperty("host") + @Nullable + abstract String getHost(); + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The path + */ + @JsonProperty("path") + @Nullable + abstract String getPath(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteEntity.java new file mode 100644 index 00000000000..47dbc167061 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteEntity.java @@ -0,0 +1,108 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Route resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouteEntity { + + /** + * The applications url + */ + @JsonProperty("apps_url") + @Nullable + abstract String getApplicationsUrl(); + + /** + * The domain id + */ + @JsonProperty("domain_guid") + @Nullable + abstract String getDomainId(); + + /** + * The domain url + */ + @JsonProperty("domain_url") + @Nullable + abstract String getDomainUrl(); + + /** + * The host + */ + @JsonProperty("host") + @Nullable + abstract String getHost(); + + /** + * The path + */ + @JsonProperty("path") + @Nullable + abstract String getPath(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + + /** + * The route mappings url + */ + @JsonProperty("route_mappings_url") + @Nullable + abstract String getRouteMappingsUrl(); + + /** + * The service instance id + */ + @JsonProperty("service_instance_guid") + @Nullable + abstract String getServiceInstanceId(); + + /** + * The service instance url + */ + @JsonProperty("service_instance_url") + @Nullable + abstract String getServiceInstanceUrl(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The space url + */ + @JsonProperty("space_url") + @Nullable + abstract String getSpaceUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteExistsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteExistsRequest.java new file mode 100644 index 00000000000..87fa05e23ea --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteExistsRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Check a Route exists operation + */ +@Value.Immutable +abstract class _RouteExistsRequest { + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + + /** + * The host + */ + @Nullable + @JsonIgnore + abstract String getHost(); + + /** + * The path + */ + @Nullable + @QueryParameter("path") + abstract String getPath(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteResource.java new file mode 100644 index 00000000000..6507d84d6fa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_RouteResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Route Resource in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouteResource extends AbstractRouteResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_UpdateRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_UpdateRouteRequest.java new file mode 100644 index 00000000000..ec793e8f63e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_UpdateRouteRequest.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Update a Route operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateRouteRequest { + + /** + * The domain id + */ + @JsonProperty("domain_guid") + @Nullable + abstract String getDomainId(); + + /** + * The host + */ + @JsonProperty("host") + @Nullable + abstract String getHost(); + + /** + * The path + */ + @JsonProperty("path") + @Nullable + abstract String getPath(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_UpdateRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_UpdateRouteResponse.java new file mode 100644 index 00000000000..94db87103f4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/routes/_UpdateRouteResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateRouteResponse extends AbstractRouteResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/AbstractSecurityGroupResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/AbstractSecurityGroupResource.java new file mode 100644 index 00000000000..fa03df8413b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/AbstractSecurityGroupResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.cloudfoundry.client.v2.Resource; + +/** + * Route Resource in responses + */ +public abstract class AbstractSecurityGroupResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/Protocol.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/Protocol.java new file mode 100644 index 00000000000..d34c116b3a9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/Protocol.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The protocol of a {@link RuleEntity} + */ +public enum Protocol { + + /** + * All protocols + */ + ALL("all"), + + /** + * ICMP protocol + */ + ICMP("icmp"), + + /** + * TCP protocol + */ + TCP("tcp"), + + /** + * UDP protocol + */ + UDP("udp"); + + private final String value; + + Protocol(String value) { + this.value = value; + } + + @JsonCreator + public static Protocol from(String s) { + switch (s.toLowerCase()) { + case "all": + return ALL; + case "icmp": + return ICMP; + case "tcp": + return TCP; + case "udp": + return UDP; + default: + throw new IllegalArgumentException(String.format("Unknown protocol: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/SecurityGroups.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/SecurityGroups.java new file mode 100644 index 00000000000..ec6e07b4895 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/SecurityGroups.java @@ -0,0 +1,144 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import reactor.core.publisher.Mono; + +public interface SecurityGroups { + + /** + * Makes the Associate Space with the Security Group request. + * + * @param request the associate security group space request + * @return the response from the associate security group space request + */ + Mono associateSpace( + AssociateSecurityGroupSpaceRequest request); + + /** + * Makes the Creating a Security Group request. + * + * @param request the create security group request + * @return the response from the create security group request + */ + Mono create(CreateSecurityGroupRequest request); + + /** + * Makes the Delete a Particular Security Group request. + * + * @param request the delete security group request + * @return the response from the delete security group request + */ + Mono delete(DeleteSecurityGroupRequest request); + + /** + * Makes the Retrieve a Particular Security Group request. + * + * @param request the get security groups request + * @return the response from the get security groups request + */ + Mono get(GetSecurityGroupRequest request); + + /** + * Makes the List all Security Groups request. + * + * @param request the list all security groups request + * @return the response from the list all security groups request + */ + Mono list(ListSecurityGroupsRequest request); + + /** + * Makes the List Running Security Groups + * request. + * + * @param request the list running security groups request + * @return the response from the list running security groups request + */ + Mono listRunningDefaults( + ListSecurityGroupRunningDefaultsRequest request); + + /** + * Makes the List all Spaces for the Security Group request. + * + * @param request the list all spaces for the security group request + * @return the response from the list all spaces for the security group request + */ + Mono listSpaces(ListSecurityGroupSpacesRequest request); + + /** + * Makes the List Staging Security Groups request. + * + * @param request the list staging security groups request + * @return the response from the list staging security groups request + */ + Mono listStagingDefaults( + ListSecurityGroupStagingDefaultsRequest request); + + /** + * Makes the + * Removing a Security Group as a default for running Apps request. + * + * @param request the remove running security group request + * @return the response from the remove running security group request + */ + Mono removeRunningDefault(RemoveSecurityGroupRunningDefaultRequest request); + + /** + * Makes the Remove Space from the Security Group request. + * + * @param request the remove security group space request + * @return the response from the remove security group space request + */ + Mono removeSpace(RemoveSecurityGroupSpaceRequest request); + + /** + * Makes the + * Removing a Security Group as a default for staging request. + * + * @param request the remove staging security group request + * @return the response from the remove staging security group request + */ + Mono removeStagingDefault(RemoveSecurityGroupStagingDefaultRequest request); + + /** + * Makes the Set a Security Group as a default for + * running Apps request. + * + * @param request the list running security groups request + * @return the response from the list running security groups request + */ + Mono setRunningDefault( + SetSecurityGroupRunningDefaultRequest request); + + /** + * Makes the Set a Security Group as a default for + * staging Apps request. + * + * @param request the list staging security groups request + * @return the response from the list staging security groups request + */ + Mono setStagingDefault( + SetSecurityGroupStagingDefaultRequest request); + + /** + * Makes the Updating a Security Group request. + * + * @param request the update security group request + * @return the response from the update security group request + */ + Mono update(UpdateSecurityGroupRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_AssociateSecurityGroupSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_AssociateSecurityGroupSpaceRequest.java new file mode 100644 index 00000000000..5d682e46295 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_AssociateSecurityGroupSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Space with the Security Group operation + */ +@Value.Immutable +abstract class _AssociateSecurityGroupSpaceRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_AssociateSecurityGroupSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_AssociateSecurityGroupSpaceResponse.java new file mode 100644 index 00000000000..ddda81036d5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_AssociateSecurityGroupSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Space with the Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSecurityGroupSpaceResponse extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_CreateSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_CreateSecurityGroupRequest.java new file mode 100644 index 00000000000..71ba01fc4d6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_CreateSecurityGroupRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + + +/** + * The request payload for the Create a Security Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSecurityGroupRequest { + + /** + * The security group name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The security group rules + */ + @JsonProperty("rules") + @Nullable + abstract List getRules(); + + /** + * The list of associated spaces + */ + @JsonProperty("space_guids") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_CreateSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_CreateSecurityGroupResponse.java new file mode 100644 index 00000000000..6092969b514 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_CreateSecurityGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Creating a Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSecurityGroupResponse extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_DeleteSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_DeleteSecurityGroupRequest.java new file mode 100644 index 00000000000..c03f075f16d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_DeleteSecurityGroupRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Security Group operation + */ +@Value.Immutable +abstract class _DeleteSecurityGroupRequest { + + /** + * The async flag + */ + @QueryParameter("async") + @Nullable + abstract Boolean getAsync(); + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_DeleteSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_DeleteSecurityGroupResponse.java new file mode 100644 index 00000000000..7b484041e58 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_DeleteSecurityGroupResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteSecurityGroupResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_GetSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_GetSecurityGroupRequest.java new file mode 100644 index 00000000000..975165b07a1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_GetSecurityGroupRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get a Security Group operation + */ +@Value.Immutable +abstract class _GetSecurityGroupRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_GetSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_GetSecurityGroupResponse.java new file mode 100644 index 00000000000..7df5a8d2623 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_GetSecurityGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get a Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSecurityGroupResponse extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupRunningDefaultsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupRunningDefaultsRequest.java new file mode 100644 index 00000000000..d82227ab033 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupRunningDefaultsRequest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List Running Security Groups operation + */ +@Value.Immutable +abstract class _ListSecurityGroupRunningDefaultsRequest extends PaginatedRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupRunningDefaultsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupRunningDefaultsResponse.java new file mode 100644 index 00000000000..f0334891988 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupRunningDefaultsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Running Security Groups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSecurityGroupRunningDefaultsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupSpacesRequest.java new file mode 100644 index 00000000000..ba38eac40de --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupSpacesRequest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Spaces for the Security Group operation + */ +@Value.Immutable +abstract class _ListSecurityGroupSpacesRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The developer ids + */ + @FilterParameter("developer_guid") + @Nullable + abstract List getDeveloperIds(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The space id + */ + @Nullable + @QueryParameter("space_guid") + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupSpacesResponse.java new file mode 100644 index 00000000000..f6d1b493be7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Spaces for the Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSecurityGroupSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupStagingDefaultsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupStagingDefaultsRequest.java new file mode 100644 index 00000000000..ab680a28760 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupStagingDefaultsRequest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List Staging Security Groups operation + */ +@Value.Immutable +abstract class _ListSecurityGroupStagingDefaultsRequest extends PaginatedRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupStagingDefaultsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupStagingDefaultsResponse.java new file mode 100644 index 00000000000..5a7d0e2eaaf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupStagingDefaultsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Staging Security Groups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSecurityGroupStagingDefaultsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupsRequest.java new file mode 100644 index 00000000000..d54b4c373c1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupsRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Security Groups operation + */ +@Value.Immutable +abstract class _ListSecurityGroupsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupsResponse.java new file mode 100644 index 00000000000..d28303a348c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_ListSecurityGroupsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Security Groups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSecurityGroupsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupRunningDefaultRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupRunningDefaultRequest.java new file mode 100644 index 00000000000..6c58d1a757a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupRunningDefaultRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Security Group Running Default operation + */ +@Value.Immutable +abstract class _RemoveSecurityGroupRunningDefaultRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupSpaceRequest.java new file mode 100644 index 00000000000..527fda694b0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Space from the Security Group operation + */ +@Value.Immutable +abstract class _RemoveSecurityGroupSpaceRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupStagingDefaultRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupStagingDefaultRequest.java new file mode 100644 index 00000000000..f8a3022ae85 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RemoveSecurityGroupStagingDefaultRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Security Group Staging Default operation + */ +@Value.Immutable +abstract class _RemoveSecurityGroupStagingDefaultRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RuleEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RuleEntity.java new file mode 100644 index 00000000000..ddae3181b0e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_RuleEntity.java @@ -0,0 +1,80 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A security group rule + */ +@JsonDeserialize +@Value.Immutable +abstract class _RuleEntity { + + /** + * The code control signal for icmp + */ + @JsonProperty("code") + @Nullable + abstract Integer getCode(); + + /** + * The description of the rule + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The destination + */ + @JsonProperty("destination") + @Nullable + abstract String getDestination(); + + /** + * Enables logging for the egress rule + */ + @JsonProperty("log") + @Nullable + abstract Boolean getLog(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract String getPorts(); + + /** + * The protocol + */ + @JsonProperty("protocol") + @Nullable + abstract Protocol getProtocol(); + + /** + * The type control signal for icmp + */ + @JsonProperty("type") + @Nullable + abstract Integer getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SecurityGroupEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SecurityGroupEntity.java new file mode 100644 index 00000000000..d036fc9dfd1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SecurityGroupEntity.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the Security Group resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _SecurityGroupEntity { + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The rules + */ + @JsonProperty("rules") + @Nullable + abstract List getRules(); + + /** + * The running default + */ + @JsonProperty("running_default") + @Nullable + abstract Boolean getRunningDefault(); + + /** + * The spaces url + */ + @JsonProperty("spaces_url") + @Nullable + abstract String getSpacesUrl(); + + /** + * The staging default + */ + @JsonProperty("staging_default") + @Nullable + abstract Boolean getStagingDefault(); + + /** + * The staging spaces url + */ + @JsonProperty("staging_spaces_url") + @Nullable + abstract String getStagingSpacesUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SecurityGroupResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SecurityGroupResource.java new file mode 100644 index 00000000000..45058741882 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SecurityGroupResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Route Resource in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _SecurityGroupResource extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupRunningDefaultRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupRunningDefaultRequest.java new file mode 100644 index 00000000000..dd61d5fa97f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupRunningDefaultRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Set Security Group Running Default operation + */ +@Value.Immutable +abstract class _SetSecurityGroupRunningDefaultRequest { + + /** + * The security group to set as a default + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupRunningDefaultResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupRunningDefaultResponse.java new file mode 100644 index 00000000000..6c1483fd940 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupRunningDefaultResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Set Running Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SetSecurityGroupRunningDefaultResponse extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupStagingDefaultRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupStagingDefaultRequest.java new file mode 100644 index 00000000000..ff76eb82a86 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupStagingDefaultRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Set Security Group Staging Default operation + */ +@Value.Immutable +abstract class _SetSecurityGroupStagingDefaultRequest { + + /** + * The security group to set as a default + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupStagingDefaultResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupStagingDefaultResponse.java new file mode 100644 index 00000000000..7ca7df48ad6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_SetSecurityGroupStagingDefaultResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Set Staging Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SetSecurityGroupStagingDefaultResponse extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_UpdateSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_UpdateSecurityGroupRequest.java new file mode 100644 index 00000000000..8eb148da28a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_UpdateSecurityGroupRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Update a Security Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateSecurityGroupRequest { + + /** + * The security group name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The security group rules + */ + @JsonProperty("rules") + @Nullable + abstract List getRules(); + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The list of associated spaces + */ + @JsonProperty("space_guids") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_UpdateSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_UpdateSecurityGroupResponse.java new file mode 100644 index 00000000000..95c0a1d6842 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/securitygroups/_UpdateSecurityGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Creating a Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateSecurityGroupResponse extends AbstractSecurityGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/AbstractServiceBindingResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/AbstractServiceBindingResource.java new file mode 100644 index 00000000000..588679a6890 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/AbstractServiceBindingResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The core resource in Service Bindings + */ +public abstract class AbstractServiceBindingResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/ServiceBindingsV2.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/ServiceBindingsV2.java new file mode 100644 index 00000000000..1d0f4a4e217 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/ServiceBindingsV2.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Bindings V2 Client API + */ +public interface ServiceBindingsV2 { + + /** + * Makes the Create Service Binding request + * + * @param request the Create Service Binding request + * @return the response from the Create Service Binding request + */ + Mono create(CreateServiceBindingRequest request); + + /** + * Makes the Delete the Service Binding request + * + * @param request the Delete Service Binding request + * @return the response from the Delete Service Binding request + */ + Mono delete(DeleteServiceBindingRequest request); + + /** + * Makes the Retrieve a Particular Service Binding request + * + * @param request the Get Service Binding request + * @return the response from the Get Service Binding request + */ + Mono get(GetServiceBindingRequest request); + + /** + * Makes the Retrieve a Particular Service Binding's Parameters + * request + * + * @param request the Get Parameters request + * @return the response from the Get Parameters request + */ + Mono getParameters( + GetServiceBindingParametersRequest request); + + /** + * Makes the List all Service Bindings request + * + * @param request the List Service Bindings request + * @return the response from the List Service Bindings request + */ + Mono list(ListServiceBindingsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_CreateServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_CreateServiceBindingRequest.java new file mode 100644 index 00000000000..2c6cf81ff4e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_CreateServiceBindingRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the Create Service Binding + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceBindingRequest { + + /** + * The application id + */ + @JsonProperty("app_guid") + abstract String getApplicationId(); + + /** + * Key/value pairs of all arbitrary parameters to pass along to the service broker + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The service instance id + */ + @JsonProperty("service_instance_guid") + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_CreateServiceBindingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_CreateServiceBindingResponse.java new file mode 100644 index 00000000000..bb5e0c6c899 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_CreateServiceBindingResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Create Service Binding request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateServiceBindingResponse extends AbstractServiceBindingResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_DeleteServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_DeleteServiceBindingRequest.java new file mode 100644 index 00000000000..1a1a7b31990 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_DeleteServiceBindingRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service Binding operation. + */ +@Value.Immutable +abstract class _DeleteServiceBindingRequest { + + /** + * The async flag + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_DeleteServiceBindingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_DeleteServiceBindingResponse.java new file mode 100644 index 00000000000..e3efb07a3fe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_DeleteServiceBindingResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response to the Delete Service Binding operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteServiceBindingResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingParametersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingParametersRequest.java new file mode 100644 index 00000000000..27818b5dda1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingParametersRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Binding Parameters operation + */ +@Value.Immutable +abstract class _GetServiceBindingParametersRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingParametersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingParametersResponse.java new file mode 100644 index 00000000000..55e0f02ab2a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingParametersResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The response payload for the Get Service Binding Parameters operation + */ +@JsonDeserialize(using = _GetServiceBindingParametersResponse.ServiceBindingParametersResponseDeserializer.class) +@Value.Immutable +abstract class _GetServiceBindingParametersResponse { + + /** + * The service binding parameters + */ + @AllowNulls + abstract Map getParameters(); + + static final class ServiceBindingParametersResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 2428493373917623001L; + + ServiceBindingParametersResponseDeserializer() { + super(GetServiceBindingParametersResponse.class); + } + + @Override + public GetServiceBindingParametersResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return GetServiceBindingParametersResponse.builder() + .parameters(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingRequest.java new file mode 100644 index 00000000000..5e71e141473 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Binding operation + */ +@Value.Immutable +abstract class _GetServiceBindingRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingResponse.java new file mode 100644 index 00000000000..60bfdab5477 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_GetServiceBindingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Service Binding operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceBindingResponse extends AbstractServiceBindingResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_LastOperation.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_LastOperation.java new file mode 100644 index 00000000000..2893962ef8d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_LastOperation.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The last operation payload for Service Bindings + */ +@JsonDeserialize +@Value.Immutable +abstract class _LastOperation { + + /** + * When the entity was created + */ + @JsonProperty("created_at") + @Nullable + abstract String getCreatedAt(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + + /** + * The type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + + /** + * When the entity was last updated + */ + @JsonProperty("updated_at") + @Nullable + abstract String getUpdatedAt(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ListServiceBindingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ListServiceBindingsRequest.java new file mode 100644 index 00000000000..39acda66835 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ListServiceBindingsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service bindings operation + */ +@Value.Immutable +abstract class _ListServiceBindingsRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The service instance ids + */ + @FilterParameter("service_instance_guid") + @Nullable + abstract List getServiceInstanceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ListServiceBindingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ListServiceBindingsResponse.java new file mode 100644 index 00000000000..61923e76208 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ListServiceBindingsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Bindings + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceBindingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ServiceBindingEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ServiceBindingEntity.java new file mode 100644 index 00000000000..f7817747b2a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ServiceBindingEntity.java @@ -0,0 +1,130 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.serviceinstances.GatewayData; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The entity response payload for the Service Binding resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBindingEntity { + + /** + * The application id + */ + @JsonProperty("app_guid") + @Nullable + abstract String getApplicationId(); + + /** + * The application url + */ + @JsonProperty("app_url") + @Nullable + abstract String getApplicationUrl(); + + /** + * The binding options + */ + @AllowNulls + @JsonProperty("binding_options") + @Nullable + abstract Map getBindingOptions(); + + /** + * The credentials + */ + @AllowNulls + @JsonProperty("credentials") + @Nullable + abstract Map getCredentials(); + + /** + * The gateway data + */ + @Deprecated + @JsonProperty("gateway_data") + @Nullable + abstract GatewayData getGatewayData(); + + /** + * The gateway name + */ + @JsonProperty("gateway_name") + @Nullable + abstract String getGatewayName(); + + /** + * The last operation + */ + @JsonProperty("last_operation") + @Nullable + abstract LastOperation getLastOperation(); + + /** + * The service binding name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The service binding parameters url + */ + @JsonProperty("service_binding_parameters_url") + @Nullable + abstract String getServiceBindingParametersUrl(); + + /** + * The service instance id + */ + @JsonProperty("service_instance_guid") + @Nullable + abstract String getServiceInstanceId(); + + /** + * The service instance url + */ + @JsonProperty("service_instance_url") + @Nullable + abstract String getServiceInstanceUrl(); + + /** + * The syslog drain url + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The volume mounts + */ + @JsonProperty("volume_mounts") + @Nullable + abstract List getVolumeMounts(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ServiceBindingResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ServiceBindingResource.java new file mode 100644 index 00000000000..8b34799c6c9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_ServiceBindingResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Service Binding in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBindingResource extends AbstractServiceBindingResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_VolumeMounts.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_VolumeMounts.java new file mode 100644 index 00000000000..46a2f3b2d0d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebindings/_VolumeMounts.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Volume Mount details + */ +@JsonDeserialize +@Value.Immutable +abstract class _VolumeMounts { + + /* + * The host port value + */ + @JsonProperty("container_dir") + public abstract String getContainerDir(); + + /* + * The host port value + */ + @JsonProperty("device_type") + @Nullable + public abstract String getDeviceType(); + + /* + * The host port value + */ + @JsonProperty("mode") + @Nullable + public abstract String getMode(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/AbstractServiceBrokerResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/AbstractServiceBrokerResource.java new file mode 100644 index 00000000000..b9c606c08b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/AbstractServiceBrokerResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for service broker resources + */ +public abstract class AbstractServiceBrokerResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/ServiceBrokers.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/ServiceBrokers.java new file mode 100644 index 00000000000..7a99a835a5a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/ServiceBrokers.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Brokers Client API + */ +public interface ServiceBrokers { + + /** + * Makes the Create Service Broker request + * + * @param request the Create Service Broker request + * @return the response from the Create Service Broker request + */ + Mono create(CreateServiceBrokerRequest request); + + /** + * Makes the Delete the Service Broker request + * + * @param request the Delete Service Broker request + * @return the response from the Delete Service Broker request + */ + Mono delete(DeleteServiceBrokerRequest request); + + /** + * Makes the Retrieve a Particular Service Broker request + * + * @param request the Get Service Broker request + * @return the response from the Get Service Broker request + */ + Mono get(GetServiceBrokerRequest request); + + /** + * Makes the List all Service Brokers request + * + * @param request the List Service Brokers request + * @return the response from the List Service Brokers request + */ + Mono list(ListServiceBrokersRequest request); + + /** + * Makes the Update Service Broker request + * + * @param request the Update Service Broker request + * @return the response from the Update Service Broker request + */ + Mono update(UpdateServiceBrokerRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_CreateServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_CreateServiceBrokerRequest.java new file mode 100644 index 00000000000..47a42997e77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_CreateServiceBrokerRequest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create Service Broker + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceBrokerRequest { + + /** + * The password with which to authenticate against the service broker. + */ + @JsonProperty("auth_password") + abstract String getAuthenticationPassword(); + + /** + * The username with which to authenticate against the service broker. + */ + @JsonProperty("auth_username") + abstract String getAuthenticationUsername(); + + /** + * The url of the service broker. + */ + @JsonProperty("broker_url") + abstract String getBrokerUrl(); + + /** + * The name of the service broker. + */ + @JsonProperty("name") + abstract String getName(); + + /** + * (experimental) Guid of a space the broker is scoped to. Space developers are able to create service brokers scoped to a space. + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_CreateServiceBrokerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_CreateServiceBrokerResponse.java new file mode 100644 index 00000000000..e0e1acf5f63 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_CreateServiceBrokerResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Create Service Broker request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateServiceBrokerResponse extends AbstractServiceBrokerResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_DeleteServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_DeleteServiceBrokerRequest.java new file mode 100644 index 00000000000..35d815afaf3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_DeleteServiceBrokerRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _DeleteServiceBrokerRequest { + + /** + * The service broker id + */ + @JsonIgnore + abstract String getServiceBrokerId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_GetServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_GetServiceBrokerRequest.java new file mode 100644 index 00000000000..d8904f18c3c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_GetServiceBrokerRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Broker operation + */ +@Value.Immutable +abstract class _GetServiceBrokerRequest { + + /** + * The service broker id + */ + @JsonIgnore + abstract String getServiceBrokerId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_GetServiceBrokerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_GetServiceBrokerResponse.java new file mode 100644 index 00000000000..2c0926649ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_GetServiceBrokerResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Service Broker Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceBrokerResponse extends AbstractServiceBrokerResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ListServiceBrokersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ListServiceBrokersRequest.java new file mode 100644 index 00000000000..abff4adc7a6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ListServiceBrokersRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service brokers operation + */ +@Value.Immutable +abstract class _ListServiceBrokersRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ListServiceBrokersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ListServiceBrokersResponse.java new file mode 100644 index 00000000000..1455457b420 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ListServiceBrokersResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Brokers + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceBrokersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ServiceBrokerEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ServiceBrokerEntity.java new file mode 100644 index 00000000000..9862cba27ee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ServiceBrokerEntity.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for Service Broker + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBrokerEntity { + + /** + * The authentication username + */ + @JsonProperty("auth_username") + @Nullable + abstract String getAuthenticationUsername(); + + /** + * The url of the service broker. + */ + @JsonProperty("broker_url") + @Nullable + abstract String getBrokerUrl(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ServiceBrokerResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ServiceBrokerResource.java new file mode 100644 index 00000000000..1dec3c36a03 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_ServiceBrokerResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Service Broker in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBrokerResource extends AbstractServiceBrokerResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_UpdateServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_UpdateServiceBrokerRequest.java new file mode 100644 index 00000000000..efa01cd2e8b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_UpdateServiceBrokerRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload to Update a Service Broker + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServiceBrokerRequest { + + /** + * The password with which to authenticate against the service broker. + */ + @JsonProperty("auth_password") + @Nullable + abstract String getAuthenticationPassword(); + + /** + * The username with which to authenticate against the service broker. + */ + @JsonProperty("auth_username") + @Nullable + abstract String getAuthenticationUsername(); + + /** + * The url of the service broker. + */ + @JsonProperty("broker_url") + @Nullable + abstract String getBrokerUrl(); + + /** + * The name of the service broker. + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The service broker id + */ + @JsonIgnore + abstract String getServiceBrokerId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_UpdateServiceBrokerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_UpdateServiceBrokerResponse.java new file mode 100644 index 00000000000..5c4a69aeb4b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicebrokers/_UpdateServiceBrokerResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response for the Update Service Broker operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServiceBrokerResponse extends AbstractServiceBrokerResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/AbstractServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/AbstractServiceInstanceResource.java new file mode 100644 index 00000000000..eb9bf705ba0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/AbstractServiceInstanceResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The resource response payload for Service Instances + */ +public abstract class AbstractServiceInstanceResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/AbstractUnionServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/AbstractUnionServiceInstanceResource.java new file mode 100644 index 00000000000..6492f67659f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/AbstractUnionServiceInstanceResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The resource response payload for any type of Service Instance + */ +public abstract class AbstractUnionServiceInstanceResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/BaseServiceInstanceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/BaseServiceInstanceEntity.java new file mode 100644 index 00000000000..55ae4b94d0d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/BaseServiceInstanceEntity.java @@ -0,0 +1,100 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; + +/** + * The entity response payload for both types of Service Instances + */ +public abstract class BaseServiceInstanceEntity { + + /** + * The credentials + */ + @AllowNulls + @JsonProperty("credentials") + @Nullable + public abstract Map getCredentials(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + public abstract String getName(); + + /** + * The routes url + */ + @JsonProperty("routes_url") + @Nullable + public abstract String getRoutesUrl(); + + /** + * The service bindings url + */ + @JsonProperty("service_bindings_url") + @Nullable + public abstract String getServiceBindingsUrl(); + + /** + * The shared from url + */ + @JsonProperty("shared_from_url") + @Nullable + public abstract String getSharedFromUrl(); + + /** + * The shared to url + */ + @JsonProperty("shared_to_url") + @Nullable + public abstract String getSharedToUrl(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + public abstract String getSpaceId(); + + /** + * The space url + */ + @JsonProperty("space_url") + @Nullable + public abstract String getSpaceUrl(); + + /** + * A list of tags for the service instance + */ + @JsonProperty("tags") + @Nullable + public abstract List getTags(); + + /** + * The type + */ + @JsonProperty("type") + @Nullable + public abstract String getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/ServiceInstances.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/ServiceInstances.java new file mode 100644 index 00000000000..95b2dccc7e1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/ServiceInstances.java @@ -0,0 +1,129 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Instances Client API + */ +public interface ServiceInstances { + + /** + * Makes the Bind Service Instance To a Route request + * + * @param request the Bind Service Instance To Route request + * @return the response from the Bind Service Instance To Route request + */ + Mono bindRoute(BindServiceInstanceRouteRequest request); + + /** + * Makes the Create Service Instance request + * + * @param request the Create Service Instance request + * @return the response from the Create Service Instance request + */ + Mono create(CreateServiceInstanceRequest request); + + /** + * Makes the Delete the Service Instance request + * + * @param request the Delete Service Instance request + * @return the response from the Delete Service Instance request + */ + Mono delete(DeleteServiceInstanceRequest request); + + /** + * Makes the Retrieve a Particular Service Instance request + * + * @param request the Get Service Instance request + * @return the response from the Get Service Instance request + */ + Mono get(GetServiceInstanceRequest request); + + /** + * Makes the + * Retrieve a Particular Service Instance's Parameters + * request + * + * @param request the Get Parameters request + * @return the response from the Get Parameters request + */ + Mono getParameters( + GetServiceInstanceParametersRequest request); + + /** + * Makes the Retrieving permissions on a Service Instance request + * + * @param request the Get Permissions request + * @return the response from the Get Permissions request + */ + Mono getPermissions( + GetServiceInstancePermissionsRequest request); + + /** + * Makes the List Service Instances request + * + * @param request the List Service Instances request + * @return the response from the List Service Instances request + */ + Mono list(ListServiceInstancesRequest request); + + /** + * Makes the List all Routes for the Service Instance request + * + * @param request the List Routes request + * @return the response from the List Routes request + */ + Mono listRoutes(ListServiceInstanceRoutesRequest request); + + /** + * Makes the List all Service Bindings for the Service + * Instance request + * + * @param request the List Service Bindings request + * @return the response from the List Service Bindings request + */ + Mono listServiceBindings( + ListServiceInstanceServiceBindingsRequest request); + + /** + * Makes the List all Service keys for the Service + * Instance request + * + * @param request the List Service Keys request + * @return the response from the List Service Keys request + */ + Mono listServiceKeys( + ListServiceInstanceServiceKeysRequest request); + + /** + * Makes the Unbinding a Service Instance from a Route request + * + * @param request the Unbind Service Instance from a Route request + * @return the response from the Unbind Service Instance from a Route request + */ + Mono unbindRoute(UnbindServiceInstanceRouteRequest request); + + /** + * Makes the Update Service Instance request + * + * @param request the Update Service Instance request + * @return the response from the Update Service Instance request + */ + Mono update(UpdateServiceInstanceRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_BindServiceInstanceRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_BindServiceInstanceRouteRequest.java new file mode 100644 index 00000000000..1025b276fd7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_BindServiceInstanceRouteRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload to Bind Service Instance To a Route + */ +@JsonSerialize +@Value.Immutable +abstract class _BindServiceInstanceRouteRequest { + + /** + * Key/value pairs of all arbitrary parameters to pass along to the service broker + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_BindServiceInstanceRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_BindServiceInstanceRouteResponse.java new file mode 100644 index 00000000000..0d6d92b22db --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_BindServiceInstanceRouteResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Bind Service Instance To Route request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _BindServiceInstanceRouteResponse extends AbstractServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_CreateServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_CreateServiceInstanceRequest.java new file mode 100644 index 00000000000..c939bcf2beb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_CreateServiceInstanceRequest.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the Create Service Instance + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceInstanceRequest { + + /** + * The accept incomplete flag + */ + @Nullable + @QueryParameter("accepts_incomplete") + abstract Boolean getAcceptsIncomplete(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Key/value pairs of all arbitrary parameters to pass along to the service broker + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + abstract String getServicePlanId(); + + /** + * The space id + */ + @JsonProperty("space_guid") + abstract String getSpaceId(); + + /** + * A list of tags for the service instance + */ + @JsonProperty("tags") + @Nullable + abstract List getTags(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_CreateServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_CreateServiceInstanceResponse.java new file mode 100644 index 00000000000..2e21c07934d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_CreateServiceInstanceResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Create Service Instance request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateServiceInstanceResponse extends AbstractServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_DeleteServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_DeleteServiceInstanceRequest.java new file mode 100644 index 00000000000..2df6e64f290 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_DeleteServiceInstanceRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service Instance operation. + */ +@Value.Immutable +abstract class _DeleteServiceInstanceRequest { + + /** + * The accept incomplete flag + */ + @Nullable + @QueryParameter("accepts_incomplete") + abstract Boolean getAcceptsIncomplete(); + + /** + * The async flag + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The purge flag + */ + @Nullable + @QueryParameter("purge") + abstract Boolean getPurge(); + + /** + * The recursive flag + */ + @Nullable + @QueryParameter("recursive") + abstract Boolean getRecursive(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_DeleteServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_DeleteServiceInstanceResponse.java new file mode 100644 index 00000000000..301853f5701 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_DeleteServiceInstanceResponse.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.databind.DatabindContext; +import com.fasterxml.jackson.databind.JavaType; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.annotation.JsonTypeIdResolver; +import com.fasterxml.jackson.databind.jsontype.impl.TypeIdResolverBase; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.Resource; +import org.immutables.value.Value; + +/** + * The response for the Delete Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteServiceInstanceResponse extends Resource { + + /** + * The resource's entity + */ + @JsonProperty("entity") + @JsonTypeIdResolver(_DeleteServiceInstanceResponse.DeleteServiceInstanceResponseTypeIdResolver.class) + @JsonTypeInfo(use = JsonTypeInfo.Id.CUSTOM, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type", defaultImpl = org.cloudfoundry.client.v2.jobs.JobEntity.class, visible = true) + @Nullable + public abstract Object getEntity(); + + static final class DeleteServiceInstanceResponseTypeIdResolver extends TypeIdResolverBase { + + @Override + public JsonTypeInfo.Id getMechanism() { + return null; + } + + @Override + public String idFromValue(Object value) { + return null; + } + + @Override + public String idFromValueAndType(Object value, Class suggestedType) { + return null; + } + + @Override + public JavaType typeFromId(DatabindContext context, String id) { + return context.constructType(ServiceInstanceEntity.class); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GatewayData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GatewayData.java new file mode 100644 index 00000000000..e6880a029df --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GatewayData.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The payload for Gateway Data + */ +@JsonDeserialize +@Value.Immutable +abstract class _GatewayData { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The options + */ + @AllowNulls + @JsonProperty("options") + @Nullable + abstract Map getOptions(); + + /** + * The plan + */ + @JsonProperty("plan") + abstract String getPlan(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceParametersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceParametersRequest.java new file mode 100644 index 00000000000..1a07e19e253 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceParametersRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Parameters operation + */ +@Value.Immutable +abstract class _GetServiceInstanceParametersRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceParametersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceParametersResponse.java new file mode 100644 index 00000000000..85e3dd72fcc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceParametersResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The resource response payload for the Get Parameters Response + */ +@JsonDeserialize(using = _GetServiceInstanceParametersResponse.ServiceInstanceParametersResponseDeserializer.class) +@Value.Immutable +abstract class _GetServiceInstanceParametersResponse { + + /** + * The service instance parameters + */ + @AllowNulls + abstract Map getParameters(); + + static final class ServiceInstanceParametersResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -2925663073415059473L; + + ServiceInstanceParametersResponseDeserializer() { + super(GetServiceInstanceParametersResponse.class); + } + + @Override + public GetServiceInstanceParametersResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return GetServiceInstanceParametersResponse.builder() + .parameters(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstancePermissionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstancePermissionsRequest.java new file mode 100644 index 00000000000..8f48c98f0d7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstancePermissionsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Permissions operation + */ +@Value.Immutable +abstract class _GetServiceInstancePermissionsRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstancePermissionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstancePermissionsResponse.java new file mode 100644 index 00000000000..bafe9b4870c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstancePermissionsResponse.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Permissions Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceInstancePermissionsResponse { + + /** + * The manage flag + */ + @JsonProperty("manage") + @Nullable + abstract Boolean getManage(); + + /** + * The read flag + */ + @JsonProperty("read") + @Nullable + abstract Boolean getRead(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceRequest.java new file mode 100644 index 00000000000..31d791c62e9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Instance operation + */ +@Value.Immutable +abstract class _GetServiceInstanceRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceResponse.java new file mode 100644 index 00000000000..ba72fd096a1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_GetServiceInstanceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Service Instance Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceInstanceResponse extends AbstractServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_LastOperation.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_LastOperation.java new file mode 100644 index 00000000000..b4304729e9a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_LastOperation.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The last operation payload for the List Service Instances operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _LastOperation { + + /** + * When the entity was created + */ + @JsonProperty("created_at") + @Nullable + abstract String getCreatedAt(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + + /** + * The type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + + /** + * When the entity was last updated + */ + @JsonProperty("updated_at") + @Nullable + abstract String getUpdatedAt(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceRoutesRequest.java new file mode 100644 index 00000000000..294bbd3a675 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceRoutesRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Routes for the Service Instance operation + */ +@Value.Immutable +abstract class _ListServiceInstanceRoutesRequest extends PaginatedRequest { + + /** + * The domain id + */ + @FilterParameter("domain_guid") + @Nullable + abstract List getDomainId(); + + /** + * The host + */ + @FilterParameter("host") + @Nullable + abstract List getHost(); + + /** + * The organization id + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationId(); + + /** + * The path + */ + @FilterParameter("path") + @Nullable + abstract List getPath(); + + /** + * The port + */ + @FilterParameter("port") + @Nullable + abstract List getPort(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceRoutesResponse.java new file mode 100644 index 00000000000..75683ebbcb7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceRoutesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Routes for the Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceInstanceRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceBindingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceBindingsRequest.java new file mode 100644 index 00000000000..a7c10607d19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceBindingsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Bindings for the Service Instance operation + */ +@Value.Immutable +abstract class _ListServiceInstanceServiceBindingsRequest extends PaginatedRequest { + + /** + * The ids of the applications + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceBindingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceBindingsResponse.java new file mode 100644 index 00000000000..51750895393 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceBindingsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Bindings for the Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceInstanceServiceBindingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceKeysRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceKeysRequest.java new file mode 100644 index 00000000000..60c101496cc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceKeysRequest.java @@ -0,0 +1,88 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Keys for the Service Instance operation + */ +@Value.Immutable +abstract class _ListServiceInstanceServiceKeysRequest extends PaginatedRequest { + + /** + * The gateway names + */ + @FilterParameter("gateway_name") + @Nullable + abstract List getGatewayNames(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The service binding ids + */ + @FilterParameter("service_binding_guid") + @Nullable + abstract List getServiceBindingIds(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + + /** + * The service key ids + */ + @FilterParameter("service_key_guid") + @Nullable + abstract List getServiceKeyIds(); + + /** + * The service plan ids + */ + @FilterParameter("service_plan_guid") + @Nullable + abstract List getServicePlanIds(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceKeysResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceKeysResponse.java new file mode 100644 index 00000000000..88c7365f7df --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstanceServiceKeysResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Keys for the Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceInstanceServiceKeysResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstancesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstancesRequest.java new file mode 100644 index 00000000000..c4c932dd100 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstancesRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Instances operation + */ +@Value.Immutable +abstract class _ListServiceInstancesRequest extends PaginatedRequest { + + /** + * The gateway names + */ + @FilterParameter("gateway_name") + @Nullable + abstract List getGatewayNames(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The service binding ids + */ + @FilterParameter("service_binding_guid") + @Nullable + abstract List getServiceBindingIds(); + + /** + * The service key ids + */ + @FilterParameter("service_key_guid") + @Nullable + abstract List getServiceKeyIds(); + + /** + * The service plan ids + */ + @FilterParameter("service_plan_guid") + @Nullable + abstract List getServicePlanIds(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstancesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstancesResponse.java new file mode 100644 index 00000000000..bc1a529c21c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ListServiceInstancesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Instances operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceInstancesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Plan.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Plan.java new file mode 100644 index 00000000000..09767abe074 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Plan.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +/** + * A service plan + */ +@JsonDeserialize +@Value.Immutable +abstract class _Plan { + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The service + */ + @JsonProperty("service") + @Nullable + abstract Service getService(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Service.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Service.java new file mode 100644 index 00000000000..973744ddba8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Service.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The service payload + */ +@JsonDeserialize +@Value.Immutable +abstract class _Service { + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The label + */ + @JsonProperty("label") + @Nullable + abstract String getLabel(); + + /** + * The provider + */ + @JsonProperty("provider") + @Nullable + abstract String getProvider(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstance.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstance.java new file mode 100644 index 00000000000..ce52b795a4f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstance.java @@ -0,0 +1,113 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +import java.util.List; + +/** + * A service instance + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceInstance { + + /** + * The bound application count + */ + @JsonProperty("bound_app_count") + @Nullable + abstract Integer getBoundApplicationCount(); + + /** + * The dashboard url + */ + @JsonProperty("dashboard_url") + @Nullable + abstract String getDashboardUrl(); + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The last operation + */ + @JsonProperty("last_operation") + @Nullable + abstract LastOperation getLastOperation(); + + /** + * The maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The service broker name + */ + @JsonProperty("service_broker_name") + @Nullable + abstract String getServiceBrokerName(); + + /** + * The service plan + */ + @JsonProperty("service_plan") + @Nullable + abstract Plan getServicePlan(); + + /** + * The shared from + */ + @JsonProperty("shared_from") + @Nullable + abstract Share getSharedFrom(); + + /** + * The shared to + */ + @AllowNulls + @JsonProperty("shared_to") + @Nullable + abstract List getSharedTo(); + + /** + * The type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstanceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstanceEntity.java new file mode 100644 index 00000000000..0f99dab6e1c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstanceEntity.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +/** + * The entity response payload for Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceInstanceEntity extends BaseServiceInstanceEntity { + + /** + * The dashboard url + */ + @JsonProperty("dashboard_url") + @Nullable + abstract String getDashboardUrl(); + + /** + * The gateway data + */ + @Deprecated + @JsonProperty("gateway_data") + @Nullable + abstract GatewayData getGatewayData(); + + /** + * The last operation + */ + @JsonProperty("last_operation") + @Nullable + abstract LastOperation getLastOperation(); + + /** + * The instance maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The service id + */ + @JsonProperty("service_guid") + @Nullable + abstract String getServiceId(); + + /** + * The service instance parameters url + */ + @JsonProperty("service_instance_parameters_url") + @Nullable + abstract String getServiceInstanceParametersUrl(); + + /** + * The service keys url + */ + @JsonProperty("service_keys_url") + @Nullable + abstract String getServiceKeysUrl(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + @Nullable + abstract String getServicePlanId(); + + /** + * The service plan url + */ + @JsonProperty("service_plan_url") + @Nullable + abstract String getServicePlanUrl(); + + /** + * The service url + */ + @JsonProperty("service_url") + @Nullable + abstract String getServiceUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstanceResource.java new file mode 100644 index 00000000000..d1dc6816976 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_ServiceInstanceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceInstanceResource extends AbstractServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Share.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Share.java new file mode 100644 index 00000000000..948e4521e56 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_Share.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for shared (to or from) services + */ +@JsonDeserialize +@Value.Immutable +abstract class _Share { + + /** + * The organization name + */ + @JsonProperty("organization_name") + @Nullable + abstract String getOrganizationName(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The space name + */ + @JsonProperty("space_name") + @Nullable + abstract String getSpaceName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnbindServiceInstanceRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnbindServiceInstanceRouteRequest.java new file mode 100644 index 00000000000..f5d96f9795f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnbindServiceInstanceRouteRequest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload to Unbind Service Instance from a Route + */ +@Value.Immutable +abstract class _UnbindServiceInstanceRouteRequest { + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnionServiceInstanceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnionServiceInstanceEntity.java new file mode 100644 index 00000000000..078c91a4b9d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnionServiceInstanceEntity.java @@ -0,0 +1,118 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +/** + * The entity response payload for any type of Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _UnionServiceInstanceEntity extends BaseServiceInstanceEntity { + + /** + * The dashboard url + */ + @JsonProperty("dashboard_url") + @Nullable + abstract String getDashboardUrl(); + + /** + * The gateway data + */ + @Deprecated + @JsonProperty("gateway_data") + @Nullable + abstract GatewayData getGatewayData(); + + /** + * The last operation + */ + @JsonProperty("last_operation") + @Nullable + abstract LastOperation getLastOperation(); + + /** + * The maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * URL to which requests for bound routes will be forwarded + */ + @JsonProperty("route_service_url") + @Nullable + abstract String getRouteServiceUrl(); + + /** + * The service id + */ + @JsonProperty("service_guid") + @Nullable + abstract String getServiceId(); + + /** + * The service instance parameters url + */ + @JsonProperty("service_instance_parameters_url") + @Nullable + abstract String getServiceInstanceParametersUrl(); + + /** + * The service keys url + */ + @JsonProperty("service_keys_url") + @Nullable + abstract String getServiceKeysUrl(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + @Nullable + abstract String getServicePlanId(); + + /** + * The service plan url + */ + @JsonProperty("service_plan_url") + @Nullable + abstract String getServicePlanUrl(); + + /** + * The service url + */ + @JsonProperty("service_url") + @Nullable + abstract String getServiceUrl(); + + /** + * The url for the syslog_drain to direct to + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnionServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnionServiceInstanceResource.java new file mode 100644 index 00000000000..84d039e0ace --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UnionServiceInstanceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for any type of Service Instance + */ +@JsonDeserialize +@Value.Immutable +abstract class _UnionServiceInstanceResource extends AbstractUnionServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UpdateServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UpdateServiceInstanceRequest.java new file mode 100644 index 00000000000..fdf8b87eada --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UpdateServiceInstanceRequest.java @@ -0,0 +1,88 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload to Update a Service Instance + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServiceInstanceRequest { + + /** + * The accept incomplete flag + */ + @Nullable + @QueryParameter("accepts_incomplete") + abstract Boolean getAcceptsIncomplete(); + + /** + * The maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Key/value pairs of all arbitrary parameters to pass along to the service broker + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + @Nullable + abstract String getServicePlanId(); + + /** + * A list of tags for the service instance + */ + @JsonProperty("tags") + @Nullable + abstract List getTags(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UpdateServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UpdateServiceInstanceResponse.java new file mode 100644 index 00000000000..311b3107440 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceinstances/_UpdateServiceInstanceResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Update Service Instance request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServiceInstanceResponse extends AbstractServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/AbstractServiceKeyResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/AbstractServiceKeyResource.java new file mode 100644 index 00000000000..e14048936c0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/AbstractServiceKeyResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The resource response payload for Service Keys + */ +public abstract class AbstractServiceKeyResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/ServiceKeys.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/ServiceKeys.java new file mode 100644 index 00000000000..40e9aac4173 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/ServiceKeys.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Keys Client API + */ +public interface ServiceKeys { + + /** + * Makes the Create Service Key request + * + * @param request the Create Service Key request + * @return the response from the Create Service Key request + */ + Mono create(CreateServiceKeyRequest request); + + /** + * Makes the Delete the Service Key request + * + * @param request the Delete Service Key request + * @return the response from the Delete Service Key request + */ + Mono delete(DeleteServiceKeyRequest request); + + /** + * Makes the Retrieve a Particular Service Key request + * + * @param request the Get Service Key request + * @return the response from the Get Service Key request + */ + Mono get(GetServiceKeyRequest request); + + /** + * Makes the List Service Keys request + * + * @param request the List Service Keys request + * @return the response from the List Service Keys request + */ + Mono list(ListServiceKeysRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_CreateServiceKeyRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_CreateServiceKeyRequest.java new file mode 100644 index 00000000000..f56ff535a3d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_CreateServiceKeyRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the Create Service Key + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceKeyRequest { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Key/value pairs of all arbitrary parameters to pass along to the service broker + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The service instance id + */ + @JsonProperty("service_instance_guid") + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_CreateServiceKeyResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_CreateServiceKeyResponse.java new file mode 100644 index 00000000000..a2ffa8f16f0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_CreateServiceKeyResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Create Service Key request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateServiceKeyResponse extends AbstractServiceKeyResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_DeleteServiceKeyRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_DeleteServiceKeyRequest.java new file mode 100644 index 00000000000..88894dd61d9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_DeleteServiceKeyRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _DeleteServiceKeyRequest { + + /** + * The service key id + */ + @JsonIgnore + abstract String getServiceKeyId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_GetServiceKeyRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_GetServiceKeyRequest.java new file mode 100644 index 00000000000..33d49b159dc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_GetServiceKeyRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Key operation + */ +@Value.Immutable +abstract class _GetServiceKeyRequest { + + /** + * The service key id + */ + @JsonIgnore + abstract String getServiceKeyId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_GetServiceKeyResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_GetServiceKeyResponse.java new file mode 100644 index 00000000000..07792b585d4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_GetServiceKeyResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Service Key Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceKeyResponse extends AbstractServiceKeyResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ListServiceKeysRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ListServiceKeysRequest.java new file mode 100644 index 00000000000..5bf59c0ce15 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ListServiceKeysRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Keys operation + */ +@Value.Immutable +abstract class _ListServiceKeysRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The service instance ids + */ + @FilterParameter("service_instance_guid") + @Nullable + abstract List getServiceInstanceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ListServiceKeysResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ListServiceKeysResponse.java new file mode 100644 index 00000000000..82e9a936784 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ListServiceKeysResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Keys operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceKeysResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ServiceKeyEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ServiceKeyEntity.java new file mode 100644 index 00000000000..635977a8b62 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ServiceKeyEntity.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The entity response payload for Service Keys + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceKeyEntity { + + /** + * The credentials + */ + @AllowNulls + @JsonProperty("credentials") + @Nullable + abstract Map getCredentials(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The service instance id + */ + @JsonProperty("service_instance_guid") + @Nullable + abstract String getServiceInstanceId(); + + /** + * The service instance url + */ + @JsonProperty("service_instance_url") + @Nullable + abstract String getServiceInstanceUrl(); + + /** + * The service key parameters url + */ + @JsonProperty("service_key_parameters_url") + @Nullable + abstract String getServiceKeyParametersUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ServiceKeyResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ServiceKeyResource.java new file mode 100644 index 00000000000..f6756c70b68 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/servicekeys/_ServiceKeyResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Service Key in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceKeyResource extends AbstractServiceKeyResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/AbstractServicePlanResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/AbstractServicePlanResource.java new file mode 100644 index 00000000000..90855d5b2cc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/AbstractServicePlanResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The core resource in Service Plan responses + */ +public abstract class AbstractServicePlanResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/ServicePlans.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/ServicePlans.java new file mode 100644 index 00000000000..2a936efab9c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/ServicePlans.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import reactor.core.publisher.Mono; + +public interface ServicePlans { + + /** + * Makes the Delete the Service Plan request + * + * @param request the Delete Service Plan request + * @return the response from the Delete Service Plan request + */ + Mono delete(DeleteServicePlanRequest request); + + /** + * Makes the Retrieve a Particular Service Plan request + * + * @param request the Get Service Plan request + * @return the response from the Get Service Plan request + */ + Mono get(GetServicePlanRequest request); + + /** + * Makes the List Service Plans request + * + * @param request the List Service Plans request + * @return the response from the List Service Plans request + */ + Mono list(ListServicePlansRequest request); + + /** + * Makes the List all Service Instances for the Service Plan + * request + * + * @param request the List Service Instances request + * @return the response from the List Service Instances request + */ + Mono listServiceInstances( + ListServicePlanServiceInstancesRequest request); + + /** + * Makes the Updating a Service Plan request + * + * @param request the Update Service Plan request + * @return the response from the Update Service Plan request + */ + Mono update(UpdateServicePlanRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_DeleteServicePlanRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_DeleteServicePlanRequest.java new file mode 100644 index 00000000000..f1b7ec709ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_DeleteServicePlanRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service Plan request. + */ +@Value.Immutable +abstract class _DeleteServicePlanRequest { + + /** + * The async + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_DeleteServicePlanResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_DeleteServicePlanResponse.java new file mode 100644 index 00000000000..0038f37815e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_DeleteServicePlanResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response to the Delete Service Plan operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteServicePlanResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_GetServicePlanRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_GetServicePlanRequest.java new file mode 100644 index 00000000000..e64ec7520d2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_GetServicePlanRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Plan operation + */ +@Value.Immutable +abstract class _GetServicePlanRequest { + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_GetServicePlanResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_GetServicePlanResponse.java new file mode 100644 index 00000000000..237e360cf49 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_GetServicePlanResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Service Plan Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServicePlanResponse extends AbstractServicePlanResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlanServiceInstancesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlanServiceInstancesRequest.java new file mode 100644 index 00000000000..4c8b05556ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlanServiceInstancesRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Instances for the Service Plan operation + */ +@Value.Immutable +abstract class _ListServicePlanServiceInstancesRequest extends PaginatedRequest { + + /** + * The gateway names + */ + @FilterParameter("gateway_name") + @Nullable + abstract List getGatewayNames(); + + /** + * The names of the service instances + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The service binding ids + */ + @FilterParameter("service_binding_guid") + @Nullable + abstract List getServiceBindingIds(); + + /** + * The service key ids + */ + @FilterParameter("service_key_guid") + @Nullable + abstract List getServiceKeyIds(); + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlanServiceInstancesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlanServiceInstancesResponse.java new file mode 100644 index 00000000000..da853f8aec3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlanServiceInstancesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Instances for the Service Plan operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServicePlanServiceInstancesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlansRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlansRequest.java new file mode 100644 index 00000000000..69c53536ef0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlansRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Plans operation + */ +@Value.Immutable +abstract class _ListServicePlansRequest extends PaginatedRequest { + + /** + * The active flag + */ + @FilterParameter("active") + @Nullable + abstract Boolean getActive(); + + /** + * The service broker ids + */ + @FilterParameter("service_broker_guid") + @Nullable + abstract List getServiceBrokerIds(); + + /** + * The service ids + */ + @FilterParameter("service_guid") + @Nullable + abstract List getServiceIds(); + + /** + * The service instance ids + */ + @FilterParameter("service_instance_guid") + @Nullable + abstract List getServiceInstanceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlansResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlansResponse.java new file mode 100644 index 00000000000..bbf16189890 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ListServicePlansResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Plans operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServicePlansResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Parameters.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Parameters.java new file mode 100644 index 00000000000..7957e55da57 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Parameters.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The entity representing service plan schema parameters + */ +@JsonDeserialize +@Value.Immutable +abstract class _Parameters { + + /** + * The JSON schema + */ + @JsonProperty("$schema") + @Nullable + abstract String getJsonSchema(); + + /** + * The parameter type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + + /** + * The parameter properties + */ + @JsonProperty("properties") + @Nullable + abstract Map getProperties(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Schema.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Schema.java new file mode 100644 index 00000000000..fc410fb89b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Schema.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing a service plan schema + */ +@JsonDeserialize +@Value.Immutable +abstract class _Schema { + + /** + * The schema parameters + */ + @JsonProperty("parameters") + @Nullable + abstract Parameters getParameters(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Schemas.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Schemas.java new file mode 100644 index 00000000000..e102a84d2cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_Schemas.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing service plan schemas + */ +@JsonDeserialize +@Value.Immutable +abstract class _Schemas { + + /** + * The service binding schema + */ + @JsonProperty("service_binding") + @Nullable + abstract ServiceBindingSchema getServiceBinding(); + + /** + * The service instance schema + */ + @JsonProperty("service_instance") + abstract ServiceInstanceSchema getServiceInstance(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServiceBindingSchema.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServiceBindingSchema.java new file mode 100644 index 00000000000..e711b5a1a2e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServiceBindingSchema.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The entity representing a service binding schema + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBindingSchema { + + /** + * The create schema + */ + @JsonProperty("create") + abstract Schema getCreate(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServiceInstanceSchema.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServiceInstanceSchema.java new file mode 100644 index 00000000000..4b1fa892249 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServiceInstanceSchema.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The entity representing a service instance schema + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceInstanceSchema { + + /** + * The create schema + */ + @JsonProperty("create") + abstract Schema getCreate(); + + /** + * The update schema + */ + @JsonProperty("update") + abstract Schema getUpdate(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServicePlanEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServicePlanEntity.java new file mode 100644 index 00000000000..0d8c6b0290a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServicePlanEntity.java @@ -0,0 +1,138 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +/** + * The entity response payload for Service Plans + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServicePlanEntity { + + /** + * The active flag + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * The bindable flag + */ + @JsonProperty("bindable") + @Nullable + abstract Boolean getBindable(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The extra (A JSON string with additional data about the plan) + */ + @JsonProperty("extra") + @Nullable + abstract String getExtra(); + + /** + * The free flag + */ + @JsonProperty("free") + @Nullable + abstract Boolean getFree(); + + /** + * The plan maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The maximum polling duration + */ + @JsonProperty("maximum_polling_duration") + @Nullable + abstract Long getMaximumPollingDuration(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Whether the plan is updatable + */ + @JsonProperty("plan_updateable") + @Nullable + abstract Boolean getPlanUpdatable(); + + /** + * The public flag + */ + @JsonProperty("public") + @Nullable + abstract Boolean getPubliclyVisible(); + + /** + * The schemas + */ + @JsonProperty("schemas") + @Nullable + abstract Schemas getSchemas(); + + /** + * The service id + */ + @JsonProperty("service_guid") + @Nullable + abstract String getServiceId(); + + /** + * The service instances url + */ + @JsonProperty("service_instances_url") + @Nullable + abstract String getServiceInstancesUrl(); + + /** + * The service url + */ + @JsonProperty("service_url") + @Nullable + abstract String getServiceUrl(); + + /** + * The unique id in the service broker + */ + @JsonProperty("unique_id") + @Nullable + abstract String getUniqueId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServicePlanResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServicePlanResource.java new file mode 100644 index 00000000000..18dd7e8e937 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_ServicePlanResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Service Plans + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServicePlanResource extends AbstractServicePlanResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_UpdateServicePlanRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_UpdateServicePlanRequest.java new file mode 100644 index 00000000000..e92ec9d6735 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_UpdateServicePlanRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the update service plan operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServicePlanRequest { + + /** + * Make the plan visible to all users + */ + @JsonProperty("public") + @Nullable + abstract Boolean getPubliclyVisible(); + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_UpdateServicePlanResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_UpdateServicePlanResponse.java new file mode 100644 index 00000000000..dca346197ea --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplans/_UpdateServicePlanResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response for the Update Service Plan operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServicePlanResponse extends AbstractServicePlanResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/AbstractServicePlanVisibilityResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/AbstractServicePlanVisibilityResource.java new file mode 100644 index 00000000000..739db0f9f1a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/AbstractServicePlanVisibilityResource.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Service Plan Visibility resources + */ +public abstract class AbstractServicePlanVisibilityResource + extends Resource< + org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityEntity> {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/ServicePlanVisibilities.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/ServicePlanVisibilities.java new file mode 100644 index 00000000000..78a0f34b951 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/ServicePlanVisibilities.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Plan Visibilities Client API + */ +public interface ServicePlanVisibilities { + + /** + * Makes the Create Service Plan Visibility request + * + * @param request the Create Service Plan Visibility request + * @return the response from the Create Service Plan Visibility request + */ + Mono create(CreateServicePlanVisibilityRequest request); + + /** + * Makes the Delete the Service Plan Visibility request + * + * @param request the Delete Service Plan Visibility request + * @return the response from the Delete Service Plan Visibility request + */ + Mono delete(DeleteServicePlanVisibilityRequest request); + + /** + * Makes the Retrieve a Particular Service Plan Visibility + * request + * + * @param request the Get Service Plan Visibility request + * @return the response from the Get Service Plan Visibility request + */ + Mono get(GetServicePlanVisibilityRequest request); + + /** + * Makes the List all Service Plan Visibilities request + * + * @param request the List Service Plan Visibilities request + * @return the response from the List Service Plan Visibilities request + */ + Mono list(ListServicePlanVisibilitiesRequest request); + + /** + * Makes the Update Service Plan Visibility request + * + * @param request the Update Service Plan Visibility request + * @return the response from the Update Service Plan Visibility request + */ + Mono update(UpdateServicePlanVisibilityRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_CreateServicePlanVisibilityRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_CreateServicePlanVisibilityRequest.java new file mode 100644 index 00000000000..e685199b19e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_CreateServicePlanVisibilityRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Create Service Plan Visibility + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServicePlanVisibilityRequest { + + /** + * The organization id + */ + @JsonProperty("organization_guid") + abstract String getOrganizationId(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + abstract String getServicePlanId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_CreateServicePlanVisibilityResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_CreateServicePlanVisibilityResponse.java new file mode 100644 index 00000000000..07b7cd2b41d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_CreateServicePlanVisibilityResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Create Service Plan Visibility request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateServicePlanVisibilityResponse extends AbstractServicePlanVisibilityResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_DeleteServicePlanVisibilityRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_DeleteServicePlanVisibilityRequest.java new file mode 100644 index 00000000000..0bfe147bf39 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_DeleteServicePlanVisibilityRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the delete service plan visibility request + */ +@Value.Immutable +abstract class _DeleteServicePlanVisibilityRequest { + + /** + * The async flag + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The service plan visibility id + */ + @JsonIgnore + abstract String getServicePlanVisibilityId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_DeleteServicePlanVisibilityResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_DeleteServicePlanVisibilityResponse.java new file mode 100644 index 00000000000..4ebdf5372b2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_DeleteServicePlanVisibilityResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response for Delete Service Plan Visibility oepration + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteServicePlanVisibilityResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_GetServicePlanVisibilityRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_GetServicePlanVisibilityRequest.java new file mode 100644 index 00000000000..d5d13715d9f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_GetServicePlanVisibilityRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Plan Visibility operation + */ +@Value.Immutable +abstract class _GetServicePlanVisibilityRequest { + + /** + * The service plan visibility id + */ + @JsonIgnore + abstract String getServicePlanVisibilityId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_GetServicePlanVisibilityResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_GetServicePlanVisibilityResponse.java new file mode 100644 index 00000000000..cefff9ccf59 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_GetServicePlanVisibilityResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Service Plan Visibility operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServicePlanVisibilityResponse extends AbstractServicePlanVisibilityResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ListServicePlanVisibilitiesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ListServicePlanVisibilitiesRequest.java new file mode 100644 index 00000000000..d93cbacd0ec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ListServicePlanVisibilitiesRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Service Plan Visibilities operation + */ +@Value.Immutable +abstract class _ListServicePlanVisibilitiesRequest extends PaginatedRequest { + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The service plan ids + */ + @FilterParameter("service_plan_guid") + @Nullable + abstract List getServicePlanIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ListServicePlanVisibilitiesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ListServicePlanVisibilitiesResponse.java new file mode 100644 index 00000000000..fad1a782e79 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ListServicePlanVisibilitiesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Service Plan Visibilities + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServicePlanVisibilitiesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ServicePlanVisibilityEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ServicePlanVisibilityEntity.java new file mode 100644 index 00000000000..75e7f0ce241 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ServicePlanVisibilityEntity.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for Service Plan Visibility + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServicePlanVisibilityEntity { + + /** + * The organization id + */ + @JsonProperty("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The organization url + */ + @JsonProperty("organization_url") + @Nullable + abstract String getOrganizationUrl(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + @Nullable + abstract String getServicePlanId(); + + /** + * The service plan url + */ + @JsonProperty("service_plan_url") + @Nullable + abstract String getServicePlanUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ServicePlanVisibilityResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ServicePlanVisibilityResource.java new file mode 100644 index 00000000000..7b5f60ac6da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_ServicePlanVisibilityResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Service Plan Visibility in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServicePlanVisibilityResource extends AbstractServicePlanVisibilityResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_UpdateServicePlanVisibilityRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_UpdateServicePlanVisibilityRequest.java new file mode 100644 index 00000000000..36fbc781949 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_UpdateServicePlanVisibilityRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Update Service Plan Visibility + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServicePlanVisibilityRequest { + + /** + * The organization id + */ + @JsonProperty("organization_guid") + abstract String getOrganizationId(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + abstract String getServicePlanId(); + + /** + * The service plan visibility id + */ + @JsonIgnore + abstract String getServicePlanVisibilityId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_UpdateServicePlanVisibilityResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_UpdateServicePlanVisibilityResponse.java new file mode 100644 index 00000000000..55a792268f4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceplanvisibilities/_UpdateServicePlanVisibilityResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Update Service Plan Visibility request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServicePlanVisibilityResponse extends AbstractServicePlanVisibilityResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/AbstractServiceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/AbstractServiceResource.java new file mode 100644 index 00000000000..ff64fc195d1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/AbstractServiceResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The core resource in Service responses + */ +public abstract class AbstractServiceResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/Services.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/Services.java new file mode 100644 index 00000000000..2fe16bb42a0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/Services.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Services Client API + */ +public interface Services { + + /** + * Makes the Delete the Service request + * + * @param request the Delete Service request + * @return the response from the Delete Service request + */ + Mono delete(DeleteServiceRequest request); + + /** + * Makes the Retrieve a Particular Service request + * + * @param request the Get Service request + * @return the response from the Get Service request + */ + Mono get(GetServiceRequest request); + + /** + * Makes the List Services request + * + * @param request the List Services request + * @return the response from the List Services request + */ + Mono list(ListServicesRequest request); + + /** + * Makes the List all Service Plans for the Service request + * + * @param request the List Service Plans request + * @return the response from the List Service Plans request + */ + Mono listServicePlans(ListServiceServicePlansRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_DeleteServiceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_DeleteServiceRequest.java new file mode 100644 index 00000000000..95fe0c9ed73 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_DeleteServiceRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service operation. + */ +@Value.Immutable +abstract class _DeleteServiceRequest { + + /** + * The async flag + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The purge flag + */ + @Nullable + @QueryParameter("purge") + abstract Boolean getPurge(); + + /** + * The service id + */ + @JsonIgnore + abstract String getServiceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_DeleteServiceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_DeleteServiceResponse.java new file mode 100644 index 00000000000..60b72fdbabc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_DeleteServiceResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete Service operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteServiceResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_GetServiceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_GetServiceRequest.java new file mode 100644 index 00000000000..3e23870114a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_GetServiceRequest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + + +import org.immutables.value.Value; + +/** + * The request payload for the Get Service operation + */ +@Value.Immutable +abstract class _GetServiceRequest { + + /** + * The service id + */ + abstract String getServiceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_GetServiceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_GetServiceResponse.java new file mode 100644 index 00000000000..c34e4c0d8dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_GetServiceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Service Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceResponse extends AbstractServiceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServiceServicePlansRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServiceServicePlansRequest.java new file mode 100644 index 00000000000..dd10f91f1c8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServiceServicePlansRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Plans for the Service operation + */ +@Value.Immutable +abstract class _ListServiceServicePlansRequest extends PaginatedRequest { + + /** + * The active flag + */ + @FilterParameter("active") + @Nullable + abstract Boolean getActive(); + + /** + * The service id + */ + @JsonIgnore + abstract String getServiceId(); + + /** + * The service instance ids + */ + @FilterParameter("service_instance_guid") + @Nullable + abstract List getServiceInstanceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServiceServicePlansResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServiceServicePlansResponse.java new file mode 100644 index 00000000000..ce6038daeca --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServiceServicePlansResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Plans for the Service operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceServicePlansResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServicesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServicesRequest.java new file mode 100644 index 00000000000..c41c62b1460 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServicesRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Services operation + */ +@Value.Immutable +abstract class _ListServicesRequest extends PaginatedRequest { + + /** + * The active flag + */ + @FilterParameter("active") + @Nullable + abstract Boolean getActive(); + + /** + * The labels + */ + @FilterParameter("label") + @Nullable + abstract List getLabels(); + + /** + * The providers + */ + @FilterParameter("provider") + @Nullable + abstract List getProviders(); + + /** + * The service broker ids + */ + @FilterParameter("service_broker_guid") + @Nullable + abstract List getServiceBrokerIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServicesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServicesResponse.java new file mode 100644 index 00000000000..0b0b9f48520 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ListServicesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Services operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServicesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ServiceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ServiceEntity.java new file mode 100644 index 00000000000..cad6402e8ad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ServiceEntity.java @@ -0,0 +1,187 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for Services + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceEntity { + + /** + * The active status + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * Whether to allow context updates + */ + @JsonProperty("allow_context_updates") + @Nullable + abstract Boolean getAllowContextUpdates(); + + /** + * The bindable status + */ + @JsonProperty("bindable") + @Nullable + abstract Boolean getBindable(); + + /** + * The bindings retrievable status + */ + @JsonProperty("bindings_retrievable") + @Nullable + abstract Boolean getBindingsRetrievable(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The documentation url + */ + @Deprecated + @JsonProperty("documentation_url") + @Nullable + abstract String getDocumentationUrl(); + + /** + * Extra service-related data + */ + @JsonProperty("extra") + @Nullable + abstract String getExtra(); + + /** + * The info url + */ + @Deprecated + @JsonProperty("info_url") + @Nullable + abstract String getInfoUrl(); + + /** + * The instances retrievable status + */ + @JsonProperty("instances_retrievable") + @Nullable + abstract Boolean getInstancesRetrievable(); + + /** + * The name of the service + */ + @JsonProperty("label") + @Nullable + abstract String getLabel(); + + /** + * The long description + */ + @Deprecated + @JsonProperty("long_description") + @Nullable + abstract String getLongDescription(); + + /** + * Whether the service can be updated to a different plan + */ + @JsonProperty("plan_updateable") + @Nullable + abstract Boolean getPlanUpdateable(); + + /** + * The name of the service provider + */ + @Deprecated + @JsonProperty("provider") + @Nullable + abstract String getProvider(); + + /** + * Required dependencies + */ + @JsonProperty("requires") + @Nullable + abstract List getRequires(); + + /** + * The service broker id + */ + @JsonProperty("service_broker_guid") + @Nullable + abstract String getServiceBrokerId(); + + /** + * The service broker name + */ + @JsonProperty("service_broker_name") + @Nullable + abstract String getServiceBrokerName(); + + /** + * The service plans url + */ + @JsonProperty("service_plans_url") + @Nullable + abstract String getServicePlansUrl(); + + /** + * The tags + */ + @JsonProperty("tags") + @Nullable + abstract List getTags(); + + /** + * The unique id to identify the service with the broker + */ + @JsonProperty("unique_id") + @Nullable + abstract String getUniqueId(); + + /** + * The url + */ + @Deprecated + @JsonProperty("url") + @Nullable + abstract String getUrl(); + + /** + * The version + */ + @Deprecated + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ServiceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ServiceResource.java new file mode 100644 index 00000000000..1e509849ccb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/services/_ServiceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Services + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceResource extends AbstractServiceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/AbstractServiceUsageEventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/AbstractServiceUsageEventResource.java new file mode 100644 index 00000000000..34912c32fac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/AbstractServiceUsageEventResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Service Usage Event resources + */ +public abstract class AbstractServiceUsageEventResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/ServiceUsageEvents.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/ServiceUsageEvents.java new file mode 100644 index 00000000000..477d45f3fda --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/ServiceUsageEvents.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Usage Events V2 Client API + */ +public interface ServiceUsageEvents { + + /** + * Makes the Retrieve a Particular Service Usage Events request + * + * @param request the Get Service Usage Events + * @return the response from the Get Service Usage Events request + */ + Mono get(GetServiceUsageEventRequest request); + + /** + * Makes the List Service Usage Events request + * + * @param request the List Service Usage Events request + * @return the response from the List Service Usage Events request + */ + Mono list(ListServiceUsageEventsRequest request); + + /** + * Makes the Purge and Reseed Service Usage Events request + * + * @param request the Purge and Reseed Service Usage Events + * @return the response from the Purge and Reseed Service Usage Events request + */ + Mono purgeAndReseed(PurgeAndReseedServiceUsageEventsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_GetServiceUsageEventRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_GetServiceUsageEventRequest.java new file mode 100644 index 00000000000..da119d8a3f0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_GetServiceUsageEventRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Usage Events operation + */ +@Value.Immutable +abstract class _GetServiceUsageEventRequest { + + /** + * The service usage event id + */ + @JsonIgnore + abstract String getServiceUsageEventId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_GetServiceUsageEventResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_GetServiceUsageEventResponse.java new file mode 100644 index 00000000000..a038cf831a4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_GetServiceUsageEventResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Service Usage Events Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceUsageEventResponse extends AbstractServiceUsageEventResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ListServiceUsageEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ListServiceUsageEventsRequest.java new file mode 100644 index 00000000000..98698ce89f4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ListServiceUsageEventsRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Usage Events operation + */ +@Value.Immutable +abstract class _ListServiceUsageEventsRequest extends PaginatedRequest { + + /** + * The after service usage event id: Restrict results to Service Usage Events after the one with the given id + */ + @Nullable + @QueryParameter("after_guid") + abstract String getAfterServiceUsageEventId(); + + /** + * The service ids + */ + @FilterParameter("service_guid") + @Nullable + abstract List getServiceIds(); + + /** + * The service instance types + */ + @FilterParameter("service_instance_type") + @Nullable + abstract List getServiceInstanceTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ListServiceUsageEventsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ListServiceUsageEventsResponse.java new file mode 100644 index 00000000000..5c7a93b6fd3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ListServiceUsageEventsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Usage Events operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceUsageEventsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_PurgeAndReseedServiceUsageEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_PurgeAndReseedServiceUsageEventsRequest.java new file mode 100644 index 00000000000..99eee006d4d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_PurgeAndReseedServiceUsageEventsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import org.immutables.value.Value; + +/** + * The request payload for the Purge and Reseed Service Usage Events operation + */ +@Value.Immutable +abstract class _PurgeAndReseedServiceUsageEventsRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ServiceUsageEventEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ServiceUsageEventEntity.java new file mode 100644 index 00000000000..c38344ee9d0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ServiceUsageEventEntity.java @@ -0,0 +1,122 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for Service Usage Events + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceUsageEventEntity { + + /** + * The organization id + */ + @JsonProperty("org_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The service broker id + */ + @JsonProperty("service_broker_guid") + @Nullable + abstract String getServiceBrokerId(); + + /** + * The service broker name + */ + @JsonProperty("service_broker_name") + @Nullable + abstract String getServiceBrokerName(); + + /** + * The service id + */ + @JsonProperty("service_guid") + @Nullable + abstract String getServiceId(); + + /** + * The service instance id + */ + @JsonProperty("service_instance_guid") + @Nullable + abstract String getServiceInstanceId(); + + /** + * The service instance name + */ + @JsonProperty("service_instance_name") + @Nullable + abstract String getServiceInstanceName(); + + /** + * The service instance type + */ + @JsonProperty("service_instance_type") + @Nullable + abstract String getServiceInstanceType(); + + /** + * The service label + */ + @JsonProperty("service_label") + @Nullable + abstract String getServiceLabel(); + + /** + * The service plan id + */ + @JsonProperty("service_plan_guid") + @Nullable + abstract String getServicePlanId(); + + /** + * The service plan name + */ + @JsonProperty("service_plan_name") + @Nullable + abstract String getServicePlanName(); + + /** + * The space id + */ + @JsonProperty("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The space name + */ + @JsonProperty("space_name") + @Nullable + abstract String getSpaceName(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ServiceUsageEventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ServiceUsageEventResource.java new file mode 100644 index 00000000000..f5f06db3217 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/serviceusageevents/_ServiceUsageEventResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for Service Usage Events + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceUsageEventResource extends AbstractServiceUsageEventResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/AbstractSharedDomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/AbstractSharedDomainResource.java new file mode 100644 index 00000000000..403f9ee2018 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/AbstractSharedDomainResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Shared Domain resources + */ +public abstract class AbstractSharedDomainResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/SharedDomains.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/SharedDomains.java new file mode 100644 index 00000000000..c91f3038432 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/SharedDomains.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Shared Domains Client API + */ +public interface SharedDomains { + + /** + * Makes the Create a Shared Domain request + * + * @param request the Create a Shared Domain request + * @return the response from the Create a Shared Domain request + */ + Mono create(CreateSharedDomainRequest request); + + /** + * Makes the Delete a Shared Domain request + * + * @param request the Delete a Shared Domain request + * @return the response from the Delete a Shared Domain request + */ + Mono delete(DeleteSharedDomainRequest request); + + /** + * Makes the Get a Shared Domain request + * + * @param request the Get a Shared Domain request + * @return the response from the Get a Shared Domain request + */ + Mono get(GetSharedDomainRequest request); + + /** + * Makes the List all Shared Domains request + * + * @param request the List all Shared Domains request + * @return the response from the List all Shared Domains request + */ + Mono list(ListSharedDomainsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_CreateSharedDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_CreateSharedDomainRequest.java new file mode 100644 index 00000000000..db0630ccb9f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_CreateSharedDomainRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create a Shared Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSharedDomainRequest { + + /** + * Whether this is an internal domain + */ + @JsonProperty("internal") + @Nullable + abstract Boolean getInternal(); + + /** + * The domain name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The router group id + */ + @JsonProperty("router_group_guid") + @Nullable + abstract String getRouterGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_CreateSharedDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_CreateSharedDomainResponse.java new file mode 100644 index 00000000000..6a1712ed008 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_CreateSharedDomainResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + + +/** + * The response payload to Create a Shared Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSharedDomainResponse extends AbstractSharedDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_DeleteSharedDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_DeleteSharedDomainRequest.java new file mode 100644 index 00000000000..12f4aa59d72 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_DeleteSharedDomainRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Shared Domain operation + */ +@Value.Immutable +abstract class _DeleteSharedDomainRequest { + + /** + * The async flag + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The shared domain id + */ + @JsonIgnore + abstract String getSharedDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_DeleteSharedDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_DeleteSharedDomainResponse.java new file mode 100644 index 00000000000..203a81adc99 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_DeleteSharedDomainResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete a Shared Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteSharedDomainResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_GetSharedDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_GetSharedDomainRequest.java new file mode 100644 index 00000000000..3ef4f69caee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_GetSharedDomainRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * * The request payload for the Get a Shared Domain operation + */ +@Value.Immutable +abstract class _GetSharedDomainRequest { + + /** + * The shared domain id + */ + @JsonIgnore + abstract String getSharedDomainId(); + +} + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_GetSharedDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_GetSharedDomainResponse.java new file mode 100644 index 00000000000..25586c54205 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_GetSharedDomainResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + + +/** + * The response payload to Get a Shared Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSharedDomainResponse extends AbstractSharedDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_ListSharedDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_ListSharedDomainsRequest.java new file mode 100644 index 00000000000..b34964832fd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_ListSharedDomainsRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Shared Domains operation + */ +@Value.Immutable +abstract class _ListSharedDomainsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_ListSharedDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_ListSharedDomainsResponse.java new file mode 100644 index 00000000000..94b1c2fd881 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_ListSharedDomainsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Shared Domains operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSharedDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_SharedDomainEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_SharedDomainEntity.java new file mode 100644 index 00000000000..403f48f3bb3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_SharedDomainEntity.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Domain resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _SharedDomainEntity { + + /** + * Whether this is an internal domain + */ + @JsonProperty("internal") + @Nullable + abstract Boolean getInternal(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The router group id + */ + @JsonProperty("router_group_guid") + @Nullable + abstract String getRouterGroupId(); + + /** + * The router group type + */ + @JsonProperty("router_group_type") + @Nullable + abstract String getRouterGroupType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_SharedDomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_SharedDomainResource.java new file mode 100644 index 00000000000..5ac920021e6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/shareddomains/_SharedDomainResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Domain resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _SharedDomainResource extends AbstractSharedDomainResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/AbstractSpaceQuotaDefinitionResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/AbstractSpaceQuotaDefinitionResource.java new file mode 100644 index 00000000000..132b828880b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/AbstractSpaceQuotaDefinitionResource.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Space Quota Definition resources + */ +public abstract class AbstractSpaceQuotaDefinitionResource + extends Resource< + org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity> {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/SpaceQuotaDefinitions.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/SpaceQuotaDefinitions.java new file mode 100644 index 00000000000..fb148dc5d9d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/SpaceQuotaDefinitions.java @@ -0,0 +1,95 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Space Quota Definitions Client API + */ +public interface SpaceQuotaDefinitions { + + /** + * Makes the Associate a Space with a Space Quota + * Definition request + * + * @param request the Associate a Space with a Space Quota Definition request + * @return the response from the Associate a Space with a Space Quota Definition request + */ + Mono associateSpace( + AssociateSpaceQuotaDefinitionRequest request); + + /** + * Makes the Creating a Space Quota Definition request + * + * @param request the Create a Space Quota Definition request + * @return the response from the Create a Space Quota Definition request + */ + Mono create(CreateSpaceQuotaDefinitionRequest request); + + /** + * Makes the Delete a Particular Space Quota Definition request + * + * @param request the Delete a Particular Space Quota Definition request + * @return the response from the Delete a Particular Space Quota Definition request + */ + Mono delete(DeleteSpaceQuotaDefinitionRequest request); + + /** + * Makes the Retrieve a Particular Space Quota Definition + * request + * + * @param request the Retrieve a Particular Space Quota Definition request + * @return the response from the Retrieve a Particular Space Quota Definition request + */ + Mono get(GetSpaceQuotaDefinitionRequest request); + + /** + * Makes the List all Space Quota Definitions request + * + * @param request the List Space Quota Definitions request + * @return the response from the List Space Quota Definitions request + */ + Mono list(ListSpaceQuotaDefinitionsRequest request); + + /** + * Makes the List all Spaces for the Space Quota Definition + * request + * + * @param request the List all Spaces for the Space Quota Definition request + * @return the response from the List all Spaces for the Space Quota Definition request + */ + Mono listSpaces( + ListSpaceQuotaDefinitionSpacesRequest request); + + /** + * Makes the Remove a Space from a Space Quota Definition + * request + * + * @param request the Remove a Space from a Space Quota Definition request + * @return the response from the Remove a Space from a Space Quota Definition request + */ + Mono removeSpace(RemoveSpaceQuotaDefinitionRequest request); + + /** + * Makes the Updating a Space Quota Definition request + * + * @param request the Update Space Quota Definitions request + * @return the response from the Update Space Quota Definitions request + */ + Mono update(UpdateSpaceQuotaDefinitionRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_AssociateSpaceQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_AssociateSpaceQuotaDefinitionRequest.java new file mode 100644 index 00000000000..5f3bfb9e45d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_AssociateSpaceQuotaDefinitionRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Space with the Space Quota Definition operation + */ +@Value.Immutable +abstract class _AssociateSpaceQuotaDefinitionRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The space quota definition id + */ + @JsonIgnore + abstract String getSpaceQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_AssociateSpaceQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_AssociateSpaceQuotaDefinitionResponse.java new file mode 100644 index 00000000000..2de7c91d93e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_AssociateSpaceQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Space Group with the Space Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceQuotaDefinitionResponse extends AbstractSpaceQuotaDefinitionResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_CreateSpaceQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_CreateSpaceQuotaDefinitionRequest.java new file mode 100644 index 00000000000..f20d5fc991a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_CreateSpaceQuotaDefinitionRequest.java @@ -0,0 +1,102 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create a Space Quota Definition operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSpaceQuotaDefinitionRequest { + + /** + * How many app instances a space can create. (-1 represents an unlimited amount) + */ + @Nullable + @JsonProperty("app_instance_limit") + abstract Integer getApplicationInstanceLimit(); + + /** + * The number of tasks that can be run per app. (-1 represents an unlimited amount) + */ + @Nullable + @JsonProperty("app_task_limit") + abstract Integer getApplicationTaskLimit(); + + /** + * The maximum amount of memory in megabytes an application instance can have. (-1 represents an unlimited amount) + */ + @Nullable + @JsonProperty("instance_memory_limit") + abstract Integer getInstanceMemoryLimit(); + + /** + * How much memory in megabytes a space can have + */ + @JsonProperty("memory_limit") + abstract Integer getMemoryLimit(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * If a space can have non basic services + */ + @JsonProperty("non_basic_services_allowed") + abstract Boolean getNonBasicServicesAllowed(); + + /** + * The owning organization of the space quota + */ + @JsonProperty("organization_guid") + abstract String getOrganizationId(); + + /** + * How many routes a space can have that use a reserved port. These routes count toward total_routes. (-1 represents an unlimited amount; subject to org quota) + */ + @Nullable + @JsonProperty("total_reserved_route_ports") + abstract Integer getTotalReservedRoutePorts(); + + /** + * How many routes a space can have. (-1 represents an unlimited amount) + */ + @JsonProperty("total_routes") + abstract Integer getTotalRoutes(); + + /** + * How many service keys an organization can have. (-1 represents an unlimited amount) + */ + @Nullable + @JsonProperty("total_service_keys") + abstract Integer getTotalServiceKeys(); + + /** + * How many services a space can have. (-1 represents an unlimited amount) + */ + @JsonProperty("total_services") + abstract Integer getTotalServices(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_CreateSpaceQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_CreateSpaceQuotaDefinitionResponse.java new file mode 100644 index 00000000000..828ede136f5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_CreateSpaceQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create a Space Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSpaceQuotaDefinitionResponse extends AbstractSpaceQuotaDefinitionResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_DeleteSpaceQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_DeleteSpaceQuotaDefinitionRequest.java new file mode 100644 index 00000000000..ca8878a9e06 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_DeleteSpaceQuotaDefinitionRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Space Quota Definition operation + */ +@Value.Immutable +abstract class _DeleteSpaceQuotaDefinitionRequest { + + /** + * If true, a new asynchronous job is submitted to perform the operation and the job id is included in the response + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The space quota definition id + */ + @JsonIgnore + abstract String getSpaceQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_DeleteSpaceQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_DeleteSpaceQuotaDefinitionResponse.java new file mode 100644 index 00000000000..f6f8ddf8d61 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_DeleteSpaceQuotaDefinitionResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete a Space Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteSpaceQuotaDefinitionResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_GetSpaceQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_GetSpaceQuotaDefinitionRequest.java new file mode 100644 index 00000000000..0ea01d47ba1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_GetSpaceQuotaDefinitionRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieve a Particular Space Quota Definition operation + */ +@Value.Immutable +abstract class _GetSpaceQuotaDefinitionRequest { + + /** + * The space quota definition id + */ + @JsonIgnore + abstract String getSpaceQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_GetSpaceQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_GetSpaceQuotaDefinitionResponse.java new file mode 100644 index 00000000000..961e9350495 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_GetSpaceQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieve a Particular Space Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSpaceQuotaDefinitionResponse extends AbstractSpaceQuotaDefinitionResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionSpacesRequest.java new file mode 100644 index 00000000000..7459cd9d6ce --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionSpacesRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Spaces for the Space Quota Definition operation + */ +@Value.Immutable +abstract class _ListSpaceQuotaDefinitionSpacesRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The developer ids + */ + @FilterParameter("developer_guid") + @Nullable + abstract List getDeveloperIds(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space quota definition id + */ + @JsonIgnore + abstract String getSpaceQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionSpacesResponse.java new file mode 100644 index 00000000000..171c90fd7e2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Spaces for the Space Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceQuotaDefinitionSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionsRequest.java new file mode 100644 index 00000000000..48761c2a861 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionsRequest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List Space Quota Definitions operation + */ +@Value.Immutable +abstract class _ListSpaceQuotaDefinitionsRequest extends PaginatedRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionsResponse.java new file mode 100644 index 00000000000..7a5a618dca0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_ListSpaceQuotaDefinitionsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Space Quota Definitions operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceQuotaDefinitionsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_RemoveSpaceQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_RemoveSpaceQuotaDefinitionRequest.java new file mode 100644 index 00000000000..b72c5c6861c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_RemoveSpaceQuotaDefinitionRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Space from the Space Quota Definition operation + */ +@Value.Immutable +abstract class _RemoveSpaceQuotaDefinitionRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The space quota definition id + */ + @JsonIgnore + abstract String getSpaceQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionEntity.java new file mode 100644 index 00000000000..0e2e996c13a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionEntity.java @@ -0,0 +1,129 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Space Quota Definition resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceQuotaDefinitionEntity { + + /** + * The application instance limit + */ + @JsonProperty("app_instance_limit") + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The number of tasks that can be run per app. (-1 represents an unlimited amount) + */ + @JsonProperty("app_task_limit") + @Nullable + abstract Integer getApplicationTaskLimit(); + + /** + * The instance memory limit + */ + @JsonProperty("instance_memory_limit") + @Nullable + abstract Integer getInstanceMemoryLimit(); + + /** + * The memory limit + */ + @JsonProperty("memory_limit") + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The non basic services allowed + */ + @JsonProperty("non_basic_services_allowed") + @Nullable + abstract Boolean getNonBasicServicesAllowed(); + + /** + * The organization id + */ + @JsonProperty("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The organization url + */ + @JsonProperty("organization_url") + @Nullable + abstract String getOrganizationUrl(); + + /** + * The spaces url + */ + @JsonProperty("spaces_url") + @Nullable + abstract String getSpacesUrl(); + + /** + * How many routes a space can have that use a reserved port. These routes count toward total_routes. (-1 represents an unlimited amount; subject to org quota) + */ + @JsonProperty("total_reserved_route_ports") + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total routes + */ + @JsonProperty("total_routes") + @Nullable + abstract Integer getTotalRoutes(); + + /** + * How many service keys an organization can have. (-1 represents an unlimited amount) + */ + @JsonProperty("total_service_keys") + @Nullable + abstract Integer getTotalServiceKeys(); + + /** + * The total services + */ + @JsonProperty("total_services") + @Nullable + abstract Integer getTotalServices(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionResource.java new file mode 100644 index 00000000000..05e9e741756 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_SpaceQuotaDefinitionResource.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain users + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceQuotaDefinitionResource extends AbstractSpaceQuotaDefinitionResource { + +} + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_UpdateSpaceQuotaDefinitionRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_UpdateSpaceQuotaDefinitionRequest.java new file mode 100644 index 00000000000..22221e23863 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_UpdateSpaceQuotaDefinitionRequest.java @@ -0,0 +1,115 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Update a Space Quota Definition operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateSpaceQuotaDefinitionRequest { + + /** + * How many app instances a space can create. (-1 represents an unlimited amount) + */ + @JsonProperty("app_instance_limit") + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The number of tasks that can be run per app. (-1 represents an unlimited amount) + */ + @JsonProperty("app_task_limit") + @Nullable + abstract Integer getApplicationTaskLimit(); + + /** + * The maximum amount of memory in megabytes an application instance can have. (-1 represents an unlimited amount) + */ + @JsonProperty("instance_memory_limit") + @Nullable + abstract Integer getInstanceMemoryLimit(); + + /** + * How much memory in megabytes a space can have + */ + @JsonProperty("memory_limit") + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * If a space can have non basic services + */ + @JsonProperty("non_basic_services_allowed") + @Nullable + abstract Boolean getNonBasicServicesAllowed(); + + /** + * The owning organization of the space quota + */ + @JsonProperty("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The space quota definition id + */ + @JsonIgnore + abstract String getSpaceQuotaDefinitionId(); + + /** + * How many routes a space can have that use a reserved port. These routes count toward total_routes. (-1 represents an unlimited amount; subject to org quota) + */ + @JsonProperty("total_reserved_route_ports") + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * How many routes a space can have. (-1 represents an unlimited amount) + */ + @JsonProperty("total_routes") + @Nullable + abstract Integer getTotalRoutes(); + + /** + * How many service keys an organization can have. (-1 represents an unlimited amount) + */ + @JsonProperty("total_service_keys") + @Nullable + abstract Integer getTotalServiceKeys(); + + /** + * How many services a space can have. (-1 represents an unlimited amount) + */ + @JsonProperty("total_services") + @Nullable + abstract Integer getTotalServices(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_UpdateSpaceQuotaDefinitionResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_UpdateSpaceQuotaDefinitionResponse.java new file mode 100644 index 00000000000..41883e71ed9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spacequotadefinitions/_UpdateSpaceQuotaDefinitionResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a Space Quota Definition operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateSpaceQuotaDefinitionResponse extends AbstractSpaceQuotaDefinitionResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/AbstractSpaceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/AbstractSpaceResource.java new file mode 100644 index 00000000000..ed4b1a8292e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/AbstractSpaceResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import org.cloudfoundry.client.v2.Resource; + +/** + * Base class for space resources + */ +public abstract class AbstractSpaceResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/AbstractUserSpaceRoleResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/AbstractUserSpaceRoleResource.java new file mode 100644 index 00000000000..b778ae6bd69 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/AbstractUserSpaceRoleResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for user space roles + */ +public abstract class AbstractUserSpaceRoleResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/Spaces.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/Spaces.java new file mode 100644 index 00000000000..c34d840c209 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/Spaces.java @@ -0,0 +1,284 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Spaces Client API + */ +public interface Spaces { + + /** + * Makes the Associate Auditor with the Space request + * + * @param request the Associate Auditor request + * @return the response from the Associate Auditor request + */ + Mono associateAuditor(AssociateSpaceAuditorRequest request); + + /** + * Makes the Associate Auditor with the Space by Username request + * + * @param request the Associate Auditor with the Space by Username request + * @return the response from the Associate Auditor with the Space by Username request + */ + Mono associateAuditorByUsername( + AssociateSpaceAuditorByUsernameRequest request); + + /** + * Makes the Associate Developer with the Space request + * + * @param request the Associate Developer request + * @return the response from the Associate Developer request + */ + Mono associateDeveloper( + AssociateSpaceDeveloperRequest request); + + /** + * Makes the Associate Developer with the Space by Username request + * + * @param request the Associate Developer with the Space by Username request + * @return the response from the Associate Developer with the Space by Username request + */ + Mono associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest request); + + /** + * Makes the Associate Manager with the Space request + * + * @param request the Associate Manager request + * @return the response from the Associate Manager request + */ + Mono associateManager(AssociateSpaceManagerRequest request); + + /** + * Makes the Associate Manager with the Space by Username request + * + * @param request the Associate Manager with the Space by Username request + * @return the response from the Associate Manager with the Space by Username request + */ + Mono associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest request); + + /** + * Makes the Associate Security Group with the Space request + * + * @param request the Associate Security Group request + * @return the response from the Associate Security Group request + */ + Mono associateSecurityGroup( + AssociateSpaceSecurityGroupRequest request); + + /** + * Makes the Create Space request + * + * @param request the Create Space request + * @return the response from the Create Space request + */ + Mono create(CreateSpaceRequest request); + + /** + * Makes the Delete a Particular Space request + * + * @param request the Delete a Space request + * @return the response from the Delete a Space request + */ + Mono delete(DeleteSpaceRequest request); + + /** + * Makes the Get Space request + * + * @param request the Get Space request + * @return the response from the Get Space request + */ + Mono get(GetSpaceRequest request); + + /** + * Makes the Get Space Summary request + * + * @param request the Get Space Summary request + * @return the response from the Get Space Summary request + */ + Mono getSummary(GetSpaceSummaryRequest request); + + /** + * Makes the List Spaces request + * + * @param request the List Spaces request + * @return the response from the List Spaces request + */ + Mono list(ListSpacesRequest request); + + /** + * Makes the List all Apps for the Space request + * + * @param request the List all Apps for the Space request + * @return the response from the List all Apps for the Space request + */ + Mono listApplications(ListSpaceApplicationsRequest request); + + /** + * Makes the List all Auditors for the Space request + * + * @param request the List all Auditors for the Space request + * @return the response from the List all Auditors for the Space request + */ + Mono listAuditors(ListSpaceAuditorsRequest request); + + /** + * Makes the List all Developers for the Space request + * + * @param request the List all Developers for the Space request + * @return the response from the List all Developers for the Space request + */ + Mono listDevelopers(ListSpaceDevelopersRequest request); + + /** + * Makes the deprecated List all Domains for the Space request + * + * @param request the List all Domains for the Space request + * @return the response from the List all Domains for the Space request + */ + @Deprecated + Mono listDomains(ListSpaceDomainsRequest request); + + /** + * Makes the List all Events for the Space request + * + * @param request the List all Events for the Space request + * @return the response from the List all Events for the Space request + */ + Mono listEvents(ListSpaceEventsRequest request); + + /** + * Makes the List all Managers for the Space request + * + * @param request the List all Managers for the Space request + * @return the response from the List all Managers for the Space request + */ + Mono listManagers(ListSpaceManagersRequest request); + + /** + * Makes the List all Routes for the Space request + * + * @param request the List all Routes for the Space request + * @return the response from the List all Routes for the Space request + */ + Mono listRoutes(ListSpaceRoutesRequest request); + + /** + * Makes the List all Security Groups for the Space request + * + * @param request the List all Security Groups for the Space request + * @return the response from the List all Security Groups for the Space request + */ + Mono listSecurityGroups( + ListSpaceSecurityGroupsRequest request); + + /** + * Makes the List all Service Instances for the Space request + * + * @param request the List all Service Instances for the Space request + * @return the response from the List all Service Instances for the Space request + */ + Mono listServiceInstances( + ListSpaceServiceInstancesRequest request); + + /** + * Makes the List all Services for the Space request + * + * @param request the List all Services for the Space request + * @return the response from the List all Services for the Space request + */ + Mono listServices(ListSpaceServicesRequest request); + + /** + * Makes the Retrieving the roles of all Users in the Space request + * + * @param request the Retrieving the roles of all Users in the Space request + * @return the response from the Retrieving the roles of all Users in the Space request + */ + Mono listUserRoles(ListSpaceUserRolesRequest request); + + /** + * Makes the Remove Auditor from the Space request + * + * @param request the Remove Auditor from the Space request + * @return the response from the Remove Auditor from the Space request + */ + Mono removeAuditor(RemoveSpaceAuditorRequest request); + + /** + * Makes the Disassociate Auditor with the Space by Username request + * + * @param request the Disassociate Auditor with the Space by Username request + * @return the response from the Disassociate Auditor with the Space by Username request + */ + Mono removeAuditorByUsername( + RemoveSpaceAuditorByUsernameRequest request); + + /** + * Makes the Remove Developer from the Space request + * + * @param request the Remove Developer from the Space request + * @return the response from the Remove Developer from the Space request + */ + Mono removeDeveloper(RemoveSpaceDeveloperRequest request); + + /** + * Makes the Disassociate Developer with the Space by Username request + * + * @param request the Disassociate Developer with the Space by Username request + * @return the response from the Disassociate Developer with the Space by Username request + */ + Mono removeDeveloperByUsername( + RemoveSpaceDeveloperByUsernameRequest request); + + /** + * Makes the Remove Manager from the Space request + * + * @param request the Remove Manager from the Space request + * @return the response from the Remove Manager from the Space request + */ + Mono removeManager(RemoveSpaceManagerRequest request); + + /** + * Makes the Disassociate Manager with the Space by Username request + * + * @param request the Disassociate Manager with the Space by Username request + * @return the response from the Disassociate Manager with the Space by Username request + */ + Mono removeManagerByUsername( + RemoveSpaceManagerByUsernameRequest request); + + /** + * Makes the Remove Security Group from the Space request + * + * @param request the Remove Security Group from the Space request + * @return the response from the Remove Security Group from the Space request + */ + Mono removeSecurityGroup(RemoveSpaceSecurityGroupRequest request); + + /** + * Makes the Update a Space request + * + * @param request the Update a Space request + * @return the response from the Update a Space request + */ + Mono update(UpdateSpaceRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorByUsernameRequest.java new file mode 100644 index 00000000000..dc557cbd862 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Auditor with the Space by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateSpaceAuditorByUsernameRequest { + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorByUsernameResponse.java new file mode 100644 index 00000000000..d3a101f4b45 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Auditor with the Space by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceAuditorByUsernameResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorRequest.java new file mode 100644 index 00000000000..8d7304bfda9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Auditor with the Space operation + */ +@Value.Immutable +abstract class _AssociateSpaceAuditorRequest { + + /** + * The auditor id + */ + @JsonIgnore + abstract String getAuditorId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorResponse.java new file mode 100644 index 00000000000..4f85b73454e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceAuditorResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Auditor with the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceAuditorResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperByUsernameRequest.java new file mode 100644 index 00000000000..0f71497a171 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Developer with the Space by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateSpaceDeveloperByUsernameRequest { + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperByUsernameResponse.java new file mode 100644 index 00000000000..eb7d5c700b4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Developer with the Space by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceDeveloperByUsernameResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperRequest.java new file mode 100644 index 00000000000..0a4a9d9476a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Developer with the Space operation + */ +@Value.Immutable +abstract class _AssociateSpaceDeveloperRequest { + + /** + * The developer id + */ + @JsonIgnore + abstract String getDeveloperId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperResponse.java new file mode 100644 index 00000000000..4e8aa3f1501 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceDeveloperResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Developer with the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceDeveloperResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerByUsernameRequest.java new file mode 100644 index 00000000000..730708865c0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Manager with the Space by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateSpaceManagerByUsernameRequest { + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerByUsernameResponse.java new file mode 100644 index 00000000000..61420dae579 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Manager with the Space by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceManagerByUsernameResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerRequest.java new file mode 100644 index 00000000000..43d04e42aef --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Manager with the Space operation + */ +@Value.Immutable +abstract class _AssociateSpaceManagerRequest { + + /** + * The manager id + */ + @JsonIgnore + abstract String getManagerId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerResponse.java new file mode 100644 index 00000000000..6ac2b63afe9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceManagerResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Manager with the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceManagerResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceSecurityGroupRequest.java new file mode 100644 index 00000000000..d47b26d8d05 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceSecurityGroupRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Security Group with the Space operation + */ +@Value.Immutable +abstract class _AssociateSpaceSecurityGroupRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceSecurityGroupResponse.java new file mode 100644 index 00000000000..1ee52951d9f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_AssociateSpaceSecurityGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Security Group with the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateSpaceSecurityGroupResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_CreateSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_CreateSpaceRequest.java new file mode 100644 index 00000000000..08f076e5b78 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_CreateSpaceRequest.java @@ -0,0 +1,94 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Creating a Space operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSpaceRequest { + + /** + * Allow SSH + */ + @JsonProperty("allow_ssh") + @Nullable + abstract Boolean getAllowSsh(); + + /** + * The auditor ids + */ + @JsonProperty("auditor_guid") + @Nullable + abstract List getAuditorsIds(); + + /** + * The developer ids + */ + @JsonProperty("developer_guid") + @Nullable + abstract List getDeveloperIds(); + + /** + * The domain ids + */ + @JsonProperty("domain_guid") + @Nullable + abstract List getDomainIds(); + + /** + * The manager ids + */ + @JsonProperty("manager_guid") + @Nullable + abstract List getManagerIds(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The organization id + */ + @JsonProperty("organization_guid") + abstract String getOrganizationId(); + + /** + * The security group ids + */ + @JsonProperty("security_group_guids") + @Nullable + abstract List getSecurityGroupIds(); + + /** + * The space quota definition id + */ + @JsonProperty("space_quota_definition_guid") + @Nullable + abstract String getSpaceQuotaDefinitionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_CreateSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_CreateSpaceResponse.java new file mode 100644 index 00000000000..4bae9cd427c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_CreateSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Creating a Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSpaceResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_DeleteSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_DeleteSpaceRequest.java new file mode 100644 index 00000000000..042bc1945a0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_DeleteSpaceRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Particular Space operation + */ +@Value.Immutable +abstract class _DeleteSpaceRequest { + + /** + * The async + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The recursive flag + */ + @Nullable + @QueryParameter("recursive") + abstract Boolean getRecursive(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_DeleteSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_DeleteSpaceResponse.java new file mode 100644 index 00000000000..9b8a3327d23 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_DeleteSpaceResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response for Delete Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteSpaceResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceRequest.java new file mode 100644 index 00000000000..ac68fd3e8f0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Space operation + */ +@Value.Immutable +abstract class _GetSpaceRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceResponse.java new file mode 100644 index 00000000000..df5f60843ac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSpaceResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceSummaryRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceSummaryRequest.java new file mode 100644 index 00000000000..f7798eb47ea --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceSummaryRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Space Summary operation + */ +@Value.Immutable +abstract class _GetSpaceSummaryRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceSummaryResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceSummaryResponse.java new file mode 100644 index 00000000000..f56c2d38709 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_GetSpaceSummaryResponse.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstance; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Get Space summary operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSpaceSummaryResponse { + + /** + * The applications + */ + @JsonProperty("apps") + @Nullable + abstract List getApplications(); + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The services + */ + @JsonProperty("services") + @Nullable + abstract List getServices(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceApplicationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceApplicationsRequest.java new file mode 100644 index 00000000000..d45aaebc0bc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceApplicationsRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Apps for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceApplicationsRequest extends PaginatedRequest { + + /** + * The diego flag + */ + @FilterParameter("diego") + @Nullable + abstract Boolean getDiego(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The stack ids + */ + @FilterParameter("stack_guid") + @Nullable + abstract List getStackIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceApplicationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceApplicationsResponse.java new file mode 100644 index 00000000000..6af4b3b12d3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceApplicationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Apps for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceApplicationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceAuditorsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceAuditorsRequest.java new file mode 100644 index 00000000000..019c0b54841 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceAuditorsRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Auditors for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceAuditorsRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceAuditorsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceAuditorsResponse.java new file mode 100644 index 00000000000..832b4987962 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceAuditorsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Auditors for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceAuditorsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDevelopersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDevelopersRequest.java new file mode 100644 index 00000000000..a20401e011c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDevelopersRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Developers for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceDevelopersRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDevelopersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDevelopersResponse.java new file mode 100644 index 00000000000..32483d98eda --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDevelopersResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Developers for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceDevelopersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDomainsRequest.java new file mode 100644 index 00000000000..59dd202fe55 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDomainsRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the deprecated List all Domains for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceDomainsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The owning organization ids + */ + @FilterParameter("owning_organization_guid") + @Nullable + abstract List getOwningOrganizationIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDomainsResponse.java new file mode 100644 index 00000000000..f0b93228cbb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceDomainsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.immutables.value.Value; + +/** + * The response payload for the deprecated List all Domains for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceEventsRequest.java new file mode 100644 index 00000000000..e38c052aae0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceEventsRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Events for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceEventsRequest extends PaginatedRequest { + + /** + * The actees + */ + @FilterParameter("actee") + @Nullable + abstract List getActees(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The timestamps + */ + @FilterParameter(value = "timestamp", operation = FilterParameter.Operation.GREATER_THAN_OR_EQUAL_TO) + @Nullable + abstract List getTimestamps(); + + /** + * The types + */ + @FilterParameter("type") + @Nullable + abstract List getTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceEventsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceEventsResponse.java new file mode 100644 index 00000000000..6744602b942 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceEventsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.events.EventResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Events for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceEventsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceManagersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceManagersRequest.java new file mode 100644 index 00000000000..35d54a77bb4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceManagersRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Managers for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceManagersRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceManagersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceManagersResponse.java new file mode 100644 index 00000000000..8e492a6dfdd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceManagersResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Managers for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceManagersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceRoutesRequest.java new file mode 100644 index 00000000000..cd1f24ceec1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceRoutesRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Routes for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceRoutesRequest extends PaginatedRequest { + + /** + * The domain ids + */ + @FilterParameter("domain_guid") + @Nullable + abstract List getDomainIds(); + + /** + * The hosts + */ + @FilterParameter("host") + @Nullable + abstract List getHosts(); + + /** + * The paths + */ + @FilterParameter("path") + @Nullable + abstract List getPaths(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceRoutesResponse.java new file mode 100644 index 00000000000..218c999ab78 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceRoutesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Routes for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceSecurityGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceSecurityGroupsRequest.java new file mode 100644 index 00000000000..a6e6ef29683 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceSecurityGroupsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Security Groups for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceSecurityGroupsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceSecurityGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceSecurityGroupsResponse.java new file mode 100644 index 00000000000..667a7ad5d67 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceSecurityGroupsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Security Groups for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceSecurityGroupsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServiceInstancesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServiceInstancesRequest.java new file mode 100644 index 00000000000..4aea04b6dff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServiceInstancesRequest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Instances for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceServiceInstancesRequest extends PaginatedRequest { + + /** + * The gateway names + */ + @FilterParameter("gateway_name") + @Nullable + abstract List getGatewayNames(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The return user provided service instances + */ + @Nullable + @QueryParameter("return_user_provided_service_instances") + abstract Boolean getReturnUserProvidedServiceInstances(); + + /** + * The service binding ids + */ + @FilterParameter("service_binding_guid") + @Nullable + abstract List getServiceBindingIds(); + + /** + * The service key ids + */ + @FilterParameter("service_key_guid") + @Nullable + abstract List getServiceKeyIds(); + + /** + * The service plan ids + */ + @FilterParameter("service_plan_guid") + @Nullable + abstract List getServicePlanIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServiceInstancesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServiceInstancesResponse.java new file mode 100644 index 00000000000..e6ed9b15b3e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServiceInstancesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Instances for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceServiceInstancesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServicesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServicesRequest.java new file mode 100644 index 00000000000..0b3acbd854f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServicesRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Services for the Space operation + */ +@Value.Immutable +abstract class _ListSpaceServicesRequest extends PaginatedRequest { + + /** + * The actives + */ + @FilterParameter("active") + @Nullable + abstract List getActives(); + + /** + * The labels + */ + @FilterParameter("label") + @Nullable + abstract List getLabels(); + + /** + * The providers + */ + @FilterParameter("provider") + @Nullable + abstract List getProviders(); + + /** + * The service broker ids + */ + @FilterParameter("service_broker_guid") + @Nullable + abstract List getServiceBrokerIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServicesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServicesResponse.java new file mode 100644 index 00000000000..fffd57fc763 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceServicesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Services for the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceServicesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceUserRolesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceUserRolesRequest.java new file mode 100644 index 00000000000..3eff113f39b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceUserRolesRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieving the roles of all Users in the Space operation + */ +@Value.Immutable +abstract class _ListSpaceUserRolesRequest extends PaginatedRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceUserRolesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceUserRolesResponse.java new file mode 100644 index 00000000000..e07cb6166dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpaceUserRolesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieving the roles of all Users in the Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceUserRolesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpacesRequest.java new file mode 100644 index 00000000000..3ed2caf1cd1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpacesRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Spaces operation + */ +@Value.Immutable +abstract class _ListSpacesRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The developer ids + */ + @FilterParameter("developer_guid") + @Nullable + abstract List getDeveloperIds(); + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpacesResponse.java new file mode 100644 index 00000000000..f45c82ef452 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_ListSpacesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Spaces operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorByUsernameRequest.java new file mode 100644 index 00000000000..b3479af6eb6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Disassociate Auditor with the Space by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveSpaceAuditorByUsernameRequest { + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorByUsernameResponse.java new file mode 100644 index 00000000000..ba8c9e8617d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Remove Auditor with the Space by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RemoveSpaceAuditorByUsernameResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorRequest.java new file mode 100644 index 00000000000..16a33740d9d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceAuditorRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Auditor from the Space operation + */ +@Value.Immutable +abstract class _RemoveSpaceAuditorRequest { + + /** + * The auditor id + */ + @JsonIgnore + abstract String getAuditorId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperByUsernameRequest.java new file mode 100644 index 00000000000..010b96e003a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Disassociate Developer with the Space by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveSpaceDeveloperByUsernameRequest { + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperByUsernameResponse.java new file mode 100644 index 00000000000..ac631a2e2ac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Remove Developer with the Space by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RemoveSpaceDeveloperByUsernameResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperRequest.java new file mode 100644 index 00000000000..d9060f072d4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceDeveloperRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Developer from the Space operation + */ +@Value.Immutable +abstract class _RemoveSpaceDeveloperRequest { + + /** + * The developer id + */ + @JsonIgnore + abstract String getDeveloperId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerByUsernameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerByUsernameRequest.java new file mode 100644 index 00000000000..2ca6e279dda --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerByUsernameRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Disassociate Manager with the Space by Username operation + */ +@JsonSerialize +@Value.Immutable +abstract class _RemoveSpaceManagerByUsernameRequest { + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The username + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerByUsernameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerByUsernameResponse.java new file mode 100644 index 00000000000..cb247d98f13 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerByUsernameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Remove Manager with the Space by Username operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RemoveSpaceManagerByUsernameResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerRequest.java new file mode 100644 index 00000000000..c36a7245d6f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceManagerRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Manager from the Space operation + */ +@Value.Immutable +abstract class _RemoveSpaceManagerRequest { + + /** + * The manager id + */ + @JsonIgnore + abstract String getManagerId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceSecurityGroupRequest.java new file mode 100644 index 00000000000..8869356ce6d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_RemoveSpaceSecurityGroupRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Security Group from the Space operation + */ +@Value.Immutable +abstract class _RemoveSpaceSecurityGroupRequest { + + /** + * The security group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceApplicationSummary.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceApplicationSummary.java new file mode 100644 index 00000000000..a46426f5ff5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceApplicationSummary.java @@ -0,0 +1,132 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.applications.AbstractApplicationEntity; +import org.cloudfoundry.client.v2.routes.Route; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The Application part of a Space Summary in a response payload. + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceApplicationSummary extends AbstractApplicationEntity { + + /** + * The detected buildpack + */ + @JsonProperty("detected_buildpack") + @Nullable + abstract String getDetectedBuildpack(); + + /** + * The detected buildpack id + */ + @JsonProperty("detected_buildpack_guid") + @Nullable + abstract String getDetectedBuildpackId(); + + /** + * Whether SSH is enabled + */ + @JsonProperty("enable_ssh") + @Nullable + abstract Boolean getEnableSsh(); + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + + /** + * The package state + */ + @JsonProperty("package_state") + @Nullable + abstract String getPackageState(); + + /** + * When the package was update + */ + @JsonProperty("package_updated_at") + @Nullable + abstract String getPackageUpdatedAt(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract List getPorts(); + + /** + * The routes + */ + @JsonProperty("routes") + @Nullable + abstract List getRoutes(); + + /** + * The running instances + */ + @JsonProperty("running_instances") + @Nullable + abstract Integer getRunningInstances(); + + /** + * The service count + */ + @JsonProperty("service_count") + @Nullable + abstract Integer getServiceCount(); + + /** + * The service names + */ + @JsonProperty("service_names") + abstract List getServiceNames(); + + /** + * The urls + */ + @JsonProperty("urls") + @Nullable + abstract List getUrls(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceEntity.java new file mode 100644 index 00000000000..72e213ef320 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceEntity.java @@ -0,0 +1,164 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Space resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceEntity { + + /** + * Allow SSH + */ + @JsonProperty("allow_ssh") + @Nullable + abstract Boolean getAllowSsh(); + + /** + * The application events url + */ + @JsonProperty("app_events_url") + @Nullable + abstract String getApplicationEventsUrl(); + + /** + * The applications url + */ + @JsonProperty("apps_url") + @Nullable + abstract String getApplicationsUrl(); + + /** + * The auditors url + */ + @JsonProperty("auditors_url") + @Nullable + abstract String getAuditorsUrl(); + + /** + * The developers url + */ + @JsonProperty("developers_url") + @Nullable + abstract String getDevelopersUrl(); + + /** + * The domains url + */ + @JsonProperty("domains_url") + @Nullable + abstract String getDomainsUrl(); + + /** + * The events url + */ + @JsonProperty("events_url") + @Nullable + abstract String getEventsUrl(); + + /** + * The isolation segment id + */ + @JsonProperty("isolation_segment_guid") + @Nullable + abstract String getIsolationSegmentId(); + + /** + * The isolation segment url + */ + @JsonProperty("isolation_segment_url") + @Nullable + abstract String getIsolationSegmentUrl(); + + /** + * The managers url + */ + @JsonProperty("managers_url") + @Nullable + abstract String getManagersUrl(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The organization id + */ + @JsonProperty("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The organization url + */ + @JsonProperty("organization_url") + @Nullable + abstract String getOrganizationUrl(); + + /** + * The routes url + */ + @JsonProperty("routes_url") + @Nullable + abstract String getRoutesUrl(); + + /** + * The security groups url + */ + @JsonProperty("security_groups_url") + @Nullable + abstract String getSecurityGroupsUrl(); + + /** + * The service instances url + */ + @JsonProperty("service_instances_url") + @Nullable + abstract String getServiceInstancesUrl(); + + /** + * The space quota definition id + */ + @JsonProperty("space_quota_definition_guid") + @Nullable + abstract String getSpaceQuotaDefinitionId(); + + /** + * The space quota definition url + */ + @JsonProperty("space_quota_definition_url") + @Nullable + abstract String getSpaceQuotaDefinitionUrl(); + + /** + * The space quota definition url + */ + @JsonProperty("staging_security_groups_url") + @Nullable + abstract String getStagingSecurityGroupsUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceResource.java new file mode 100644 index 00000000000..cd845d9d6e1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_SpaceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain spaces + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceResource extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UpdateSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UpdateSpaceRequest.java new file mode 100644 index 00000000000..1aaeb3947ad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UpdateSpaceRequest.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Update a Space operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateSpaceRequest { + + /** + * Allow SSH + */ + @JsonProperty("allow_ssh") + @Nullable + abstract Boolean getAllowSsh(); + + /** + * The auditor ids + */ + @JsonProperty("auditor_guids") + @Nullable + abstract List getAuditorIds(); + + /** + * The developer ids + */ + @JsonProperty("developer_guids") + @Nullable + abstract List getDeveloperIds(); + + /** + * The domain ids + */ + @JsonProperty("domain_guids") + @Nullable + abstract List getDomainIds(); + + /** + * The manager ids + */ + @JsonProperty("manager_guids") + @Nullable + abstract List getManagerIds(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The organization id + */ + @JsonProperty("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The security group ids + */ + @JsonProperty("security_group_guids") + @Nullable + abstract List getSecurityGroupIds(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UpdateSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UpdateSpaceResponse.java new file mode 100644 index 00000000000..17c14dd8b93 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UpdateSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateSpaceResponse extends AbstractSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UserSpaceRoleEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UserSpaceRoleEntity.java new file mode 100644 index 00000000000..db4d63c3df6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UserSpaceRoleEntity.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.users.AbstractUserEntity; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the Route resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserSpaceRoleEntity extends AbstractUserEntity { + + /** + * The space roles + */ + @JsonProperty("space_roles") + @Nullable + abstract List getSpaceRoles(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UserSpaceRoleResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UserSpaceRoleResource.java new file mode 100644 index 00000000000..2054911b840 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/spaces/_UserSpaceRoleResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * User Role Resource in responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserSpaceRoleResource extends AbstractUserSpaceRoleResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/AbstractStackResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/AbstractStackResource.java new file mode 100644 index 00000000000..d3a8525cb92 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/AbstractStackResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for Stack resources + */ +public abstract class AbstractStackResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/Stacks.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/Stacks.java new file mode 100644 index 00000000000..c8b36478a02 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/Stacks.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import reactor.core.publisher.Mono; + +public interface Stacks { + + /** + * Makes the Create a Stack request + * + * @param request the Create a Stack request + * @return the response from the Create a Stack Request + */ + Mono create(CreateStackRequest request); + + /** + * Makes the Delete a Stack request + * + * @param request the Delete a Stack request + * @return the response from the Delete a Stack Request + */ + Mono delete(DeleteStackRequest request); + + /** + * Makes the Get Stack request + * + * @param request the Get Stack request + * @return the response from the Get Stack Request + */ + Mono get(GetStackRequest request); + + /** + * Makes the List Stacks request + * + * @param request the List Stacks request + * @return the response from the List Stacks request + */ + Mono list(ListStacksRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_CreateStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_CreateStackRequest.java new file mode 100644 index 00000000000..21b6567c2f3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_CreateStackRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create Stack operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateStackRequest { + + /** + * The stack description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The stack name + */ + @JsonProperty("name") + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_CreateStackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_CreateStackResponse.java new file mode 100644 index 00000000000..64a9e9aaa5d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_CreateStackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Stack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateStackResponse extends AbstractStackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_DeleteStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_DeleteStackRequest.java new file mode 100644 index 00000000000..abe66644e37 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_DeleteStackRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Stack operation + */ +@Value.Immutable +abstract class _DeleteStackRequest { + + /** + * If true, a new asynchronous job is submitted to perform the operation and the job id is included in the response + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The stack id + */ + @JsonIgnore + abstract String getStackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_DeleteStackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_DeleteStackResponse.java new file mode 100644 index 00000000000..df687c79684 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_DeleteStackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete Stack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteStackResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_GetStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_GetStackRequest.java new file mode 100644 index 00000000000..c1e2f9c6564 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_GetStackRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Stack operation + */ +@Value.Immutable +abstract class _GetStackRequest { + + /** + * The stack id + */ + @JsonIgnore + abstract String getStackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_GetStackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_GetStackResponse.java new file mode 100644 index 00000000000..63741d983cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_GetStackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Stack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetStackResponse extends AbstractStackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_ListStacksRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_ListStacksRequest.java new file mode 100644 index 00000000000..be8cf16e1b8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_ListStacksRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the List Stacks operation + */ +@Value.Immutable +abstract class _ListStacksRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_ListStacksResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_ListStacksResponse.java new file mode 100644 index 00000000000..3fa7e347bb1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_ListStacksResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Stacks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListStacksResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java new file mode 100644 index 00000000000..dc41d847591 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackEntity.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the Stack resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _StackEntity { + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Build RootFS Image + */ + @JsonProperty("build_rootfs_image") + @Nullable + abstract String getBuildRootfsImage(); + + /** + * Run RootFS Image + */ + @JsonProperty("run_rootfs_image") + @Nullable + abstract String getRunRootfsImage(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackResource.java new file mode 100644 index 00000000000..9e4656e2f77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/stacks/_StackResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain stacks + */ +@JsonDeserialize +@Value.Immutable +abstract class _StackResource extends AbstractStackResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/AbstractUserProvidedServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/AbstractUserProvidedServiceInstanceResource.java new file mode 100644 index 00000000000..9107478645c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/AbstractUserProvidedServiceInstanceResource.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The resource response payload for User Provided Service Instances + */ +public abstract class AbstractUserProvidedServiceInstanceResource + extends Resource< + org.cloudfoundry.client.v2.userprovidedserviceinstances + .UserProvidedServiceInstanceEntity> {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/UserProvidedServiceInstances.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/UserProvidedServiceInstances.java new file mode 100644 index 00000000000..4b87b3993a2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/UserProvidedServiceInstances.java @@ -0,0 +1,112 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry User Provided Service Instances Client API + */ +public interface UserProvidedServiceInstances { + + /** + * Makes the Associate Route with the User + * Provided Service Instance request + * + * @param request the Associate Route With User Provided Service Instance request + * @return the response from the Associate Route With User Provided Service Instance request + */ + Mono associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest request); + + /** + * Makes the Create User Provided Service Instance + * request + * + * @param request the Create User Provided Service Instance request + * @return the response from the Create User Provided Service Instance request + */ + Mono create( + CreateUserProvidedServiceInstanceRequest request); + + /** + * Makes the Delete the User Provided Service + * Instance request + * + * @param request the Delete User Provided Service Instance request + * @return the response from the Delete User Provided Service Instance request + */ + Mono delete(DeleteUserProvidedServiceInstanceRequest request); + + /** + * Makes the Retrieve a Particular User Provided + * Service Instance request + * + * @param request the Get User Provided Service Instance request + * @return the response from the Get User Provided Service Instance request + */ + Mono get(GetUserProvidedServiceInstanceRequest request); + + /** + * Makes the List User Provided Service Instances + * request + * + * @param request the List User Provided Service Instances request + * @return the response from the List User Provided Service Instances request + */ + Mono list( + ListUserProvidedServiceInstancesRequest request); + + /** + * Makes the List all Routes for the User + * Provided Service Instance request + * + * @param request the List User Provided Service Instance Routes request + * @return the response from the List User Provided Service Instance Routes request + */ + Mono listRoutes( + ListUserProvidedServiceInstanceRoutesRequest request); + + /** + * Makes the List all Service + * Bindings for the User Provided Service Instance request + * + * @param request the List Service Bindings request + * @return the response from the List Service Bindings request + */ + Mono listServiceBindings( + ListUserProvidedServiceInstanceServiceBindingsRequest request); + + /** + * Makes the Remove Route from the User Provided + * Service Instance request + * + * @param request the Remove Route from the User Provided Service Instance request + * @return the response from the Remove Route from the User Provided Service Instance request + */ + Mono removeRoute(RemoveUserProvidedServiceInstanceRouteRequest request); + + /** + * Makes the Update User Provided Service Instance + * request + * + * @param request the Update User Provided Service Instance request + * @return the response from the Update User Provided Service Instance request + */ + Mono update( + UpdateUserProvidedServiceInstanceRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_AssociateUserProvidedServiceInstanceRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_AssociateUserProvidedServiceInstanceRouteRequest.java new file mode 100644 index 00000000000..9b27f27d538 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_AssociateUserProvidedServiceInstanceRouteRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the Associate Route User Provided Service Instance + */ +@JsonSerialize +@Value.Immutable +abstract class _AssociateUserProvidedServiceInstanceRouteRequest { + + /** + * Key/value pairs to store credentials + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_AssociateUserProvidedServiceInstanceRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_AssociateUserProvidedServiceInstanceRouteResponse.java new file mode 100644 index 00000000000..434e97a86c6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_AssociateUserProvidedServiceInstanceRouteResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Update User Provided Service Instance Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserProvidedServiceInstanceRouteResponse extends AbstractUserProvidedServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_CreateUserProvidedServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_CreateUserProvidedServiceInstanceRequest.java new file mode 100644 index 00000000000..3023b80e900 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_CreateUserProvidedServiceInstanceRequest.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the Create User Provided Service Instance + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateUserProvidedServiceInstanceRequest { + + /** + * Key/value pairs to store credentials + */ + @AllowNulls + @JsonProperty("credentials") + @Nullable + abstract Map getCredentials(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * URL to which requests for bound routes will be forwarded + */ + @JsonProperty("route_service_url") + @Nullable + abstract String getRouteServiceUrl(); + + /** + * The space id + */ + @JsonProperty("space_guid") + abstract String getSpaceId(); + + /** + * The url for the syslog_drain to direct to + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The tags + */ + @JsonProperty("tags") + @Nullable + abstract List getTags(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_CreateUserProvidedServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_CreateUserProvidedServiceInstanceResponse.java new file mode 100644 index 00000000000..12770f9e649 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_CreateUserProvidedServiceInstanceResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Create User Provided Service Instance request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateUserProvidedServiceInstanceResponse extends AbstractUserProvidedServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_DeleteUserProvidedServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_DeleteUserProvidedServiceInstanceRequest.java new file mode 100644 index 00000000000..6425c9bb02d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_DeleteUserProvidedServiceInstanceRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete User Provided Service Instance operation. + */ +@Value.Immutable +abstract class _DeleteUserProvidedServiceInstanceRequest { + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_GetUserProvidedServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_GetUserProvidedServiceInstanceRequest.java new file mode 100644 index 00000000000..32395679a71 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_GetUserProvidedServiceInstanceRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get User Provided Service Instance operation + */ +@Value.Immutable +abstract class _GetUserProvidedServiceInstanceRequest { + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_GetUserProvidedServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_GetUserProvidedServiceInstanceResponse.java new file mode 100644 index 00000000000..75a271637db --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_GetUserProvidedServiceInstanceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get User Provided Service Instance Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetUserProvidedServiceInstanceResponse extends AbstractUserProvidedServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceRoutesRequest.java new file mode 100644 index 00000000000..7b27af85b86 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceRoutesRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Routes for the User Provided Service Instance operation + */ +@Value.Immutable +abstract class _ListUserProvidedServiceInstanceRoutesRequest extends PaginatedRequest { + + /** + * The domain id + */ + @FilterParameter("domain_guid") + @Nullable + abstract List getDomainId(); + + /** + * The host + */ + @FilterParameter("host") + @Nullable + abstract List getHost(); + + /** + * The organization id + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationId(); + + /** + * The path + */ + @FilterParameter("path") + @Nullable + abstract List getPath(); + + /** + * The port + */ + @FilterParameter("port") + @Nullable + abstract List getPort(); + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceRoutesResponse.java new file mode 100644 index 00000000000..8a28ba0c7b8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceRoutesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Routes for the User Provided Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserProvidedServiceInstanceRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceServiceBindingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceServiceBindingsRequest.java new file mode 100644 index 00000000000..5216a4f8558 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceServiceBindingsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Service Bindings for the User Provided Service Instance operation + */ +@Value.Immutable +abstract class _ListUserProvidedServiceInstanceServiceBindingsRequest extends PaginatedRequest { + + /** + * The ids of the applications + */ + @FilterParameter("app_guid") + @Nullable + abstract List getApplicationIds(); + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceServiceBindingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceServiceBindingsResponse.java new file mode 100644 index 00000000000..a030c532526 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstanceServiceBindingsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Service Bindings for the User Provided Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserProvidedServiceInstanceServiceBindingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstancesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstancesRequest.java new file mode 100644 index 00000000000..05cfd0127c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstancesRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List User Provided Service Instances operation + */ +@Value.Immutable +abstract class _ListUserProvidedServiceInstancesRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("name") + @Nullable + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstancesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstancesResponse.java new file mode 100644 index 00000000000..3c58db8462d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_ListUserProvidedServiceInstancesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List User Provided Service Instances operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserProvidedServiceInstancesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_RemoveUserProvidedServiceInstanceRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_RemoveUserProvidedServiceInstanceRouteRequest.java new file mode 100644 index 00000000000..42c6bfe13b8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_RemoveUserProvidedServiceInstanceRouteRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Route User Provided Service Instance + */ +@Value.Immutable +abstract class _RemoveUserProvidedServiceInstanceRouteRequest { + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UpdateUserProvidedServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UpdateUserProvidedServiceInstanceRequest.java new file mode 100644 index 00000000000..6dd30f5fdd0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UpdateUserProvidedServiceInstanceRequest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the Update User Provided Service Instance + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateUserProvidedServiceInstanceRequest { + + /** + * Key/value pairs that can be stored to store credentials + */ + @AllowNulls + @JsonProperty("credentials") + @Nullable + abstract Map getCredentials(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * URL to which requests for bound routes will be forwarded + */ + @JsonProperty("route_service_url") + @Nullable + abstract String getRouteServiceUrl(); + + /** + * The url for the syslog_drain to direct to + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The tags + */ + @JsonProperty + @Nullable + abstract List getTags(); + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getUserProvidedServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UpdateUserProvidedServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UpdateUserProvidedServiceInstanceResponse.java new file mode 100644 index 00000000000..4fe03bb0fe4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UpdateUserProvidedServiceInstanceResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Update User Provided Service Instance Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateUserProvidedServiceInstanceResponse extends AbstractUserProvidedServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UserProvidedServiceInstanceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UserProvidedServiceInstanceEntity.java new file mode 100644 index 00000000000..5cf4131d5d0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UserProvidedServiceInstanceEntity.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.serviceinstances.BaseServiceInstanceEntity; +import org.immutables.value.Value; + +/** + * The entity response payload for User Provided Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserProvidedServiceInstanceEntity extends BaseServiceInstanceEntity { + + /** + * URL to which requests for bound routes will be forwarded + */ + @JsonProperty("route_service_url") + @Nullable + abstract String getRouteServiceUrl(); + + /** + * The url for the syslog_drain to direct to + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UserProvidedServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UserProvidedServiceInstanceResource.java new file mode 100644 index 00000000000..7c969d8d9d0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/_UserProvidedServiceInstanceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for User Provided Service Instances + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserProvidedServiceInstanceResource extends AbstractUserProvidedServiceInstanceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserEntity.java new file mode 100644 index 00000000000..2cfac2de310 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserEntity.java @@ -0,0 +1,110 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * The entity response payload for the User resource + */ +public abstract class AbstractUserEntity { + + /** + * The active property + */ + @JsonProperty("active") + @Nullable + public abstract Boolean getActive(); + + /** + * The admin property + */ + @JsonProperty("admin") + @Nullable + public abstract Boolean getAdmin(); + + /** + * The audited organizations url + */ + @JsonProperty("audited_organizations_url") + @Nullable + public abstract String getAuditedOrganizationsUrl(); + + /** + * The audited spaces url + */ + @JsonProperty("audited_spaces_url") + @Nullable + public abstract String getAuditedSpacesUrl(); + + /** + * The billing managed organizations url + */ + @JsonProperty("billing_managed_organizations_url") + @Nullable + public abstract String getBillingManagedOrganizationsUrl(); + + /** + * The default space id + */ + @JsonProperty("default_space_guid") + @Nullable + public abstract String getDefaultSpaceId(); + + /** + * The default space url + */ + @JsonProperty("default_space_url") + @Nullable + public abstract String getDefaultSpaceUrl(); + + /** + * The managed organizations url + */ + @JsonProperty("managed_organizations_url") + @Nullable + public abstract String getManagedOrganizationsUrl(); + + /** + * The managed spaces url + */ + @JsonProperty("managed_spaces_url") + @Nullable + public abstract String getManagedSpacesUrl(); + + /** + * The organizations url + */ + @JsonProperty("organizations_url") + @Nullable + public abstract String getOrganizationsUrl(); + + /** + * The spaces url + */ + @JsonProperty("spaces_url") + @Nullable + public abstract String getSpacesUrl(); + + /** + * The username + */ + @JsonProperty("username") + @Nullable + public abstract String getUsername(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserOrganizationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserOrganizationResource.java new file mode 100644 index 00000000000..623501e6755 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserOrganizationResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for User Organization resources + */ +public abstract class AbstractUserOrganizationResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserResource.java new file mode 100644 index 00000000000..ab07c95d661 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for User resources + */ +public abstract class AbstractUserResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserSpaceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserSpaceResource.java new file mode 100644 index 00000000000..ad4df594c37 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserSpaceResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for User Space resources + */ +public abstract class AbstractUserSpaceResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserSummaryResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserSummaryResource.java new file mode 100644 index 00000000000..7d21cca32b5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/AbstractUserSummaryResource.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import org.cloudfoundry.client.v2.Resource; + +/** + * The base class for User Summary resources + */ +public abstract class AbstractUserSummaryResource + extends Resource {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/Users.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/Users.java new file mode 100644 index 00000000000..4217d553b6a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/Users.java @@ -0,0 +1,249 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import reactor.core.publisher.Mono; + +public interface Users { + + /** + * Makes the Associate Audited Organization with the User request + * + * @param request the Associate Audited Organization with the User request + * @return the response from the Associate Audited Organization with the User request + */ + Mono associateAuditedOrganization( + AssociateUserAuditedOrganizationRequest request); + + /** + * Makes the Associate Audited Space with the User request + * + * @param request the Associate Audited Space with the User request + * @return the response from the Associate Audited Space with the User request + */ + Mono associateAuditedSpace( + AssociateUserAuditedSpaceRequest request); + + /** + * Makes the Associate Billing Managed Organization with the User + * request + * + * @param request the Associate Billing Managed Organization with the User request + * @return the response from the Associate Billing Managed Organization with the User request + */ + Mono associateBillingManagedOrganization( + AssociateUserBillingManagedOrganizationRequest request); + + /** + * Makes the Associate Managed Organization with the User request + * + * @param request the Associate Managed Organization with the User request + * @return the response from the Associate Managed Organization with the User request + */ + Mono associateManagedOrganization( + AssociateUserManagedOrganizationRequest request); + + /** + * Makes the Associate Managed Space with the User request + * + * @param request the Associate Managed Space with the User request + * @return the response from the Associate Managed Space with the User request + */ + Mono associateManagedSpace( + AssociateUserManagedSpaceRequest request); + + /** + * Makes the Associate Organization with the User request + * + * @param request the Associate Organization with the User request + * @return the response from the Associate Organization with the User request + */ + Mono associateOrganization( + AssociateUserOrganizationRequest request); + + /** + * Makes the Associate Space with the User request + * + * @param request the Associate Space with the User request + * @return the response from the Associate Space with the User request + */ + Mono associateSpace(AssociateUserSpaceRequest request); + + /** + * Makes the Creating a User request + * + * @param request the Creating a User request + * @return the response from the Creating a User request + */ + Mono create(CreateUserRequest request); + + /** + * Makes the Delete a Particular User request + * + * @param request the Delete a Particular User request + * @return the response from the Delete a Particular User request + */ + Mono delete(DeleteUserRequest request); + + /** + * Makes the Retrieve a Particular User request + * + * @param request the Retrieve a Particular User request + * @return the response from the Retrieve a Particular User request + */ + Mono get(GetUserRequest request); + + /** + * Makes the List all Users request + * + * @param request the List all Users request + * @return the response from the List all Users request + */ + Mono list(ListUsersRequest request); + + /** + * Makes the List all Audited Organizations for the User request + * + * @param request the List all Audited Organizations for the User request + * @return the response from the List all Audited Organizations for the User request + */ + Mono listAuditedOrganizations( + ListUserAuditedOrganizationsRequest request); + + /** + * Makes the List all Audited Spaces for the User request + * + * @param request the List all Audited Spaces for the User request + * @return the response from the List all Audited Spaces for the User request + */ + Mono listAuditedSpaces(ListUserAuditedSpacesRequest request); + + /** + * Makes the List all Billing Managed Organizations for the User request + * + * @param request the List all Billing Managed Organizations for the User request + * @return the response from the List all Billing Managed Organizations for the User request + */ + Mono listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest request); + + /** + * Makes the List all Managed Organizations for the User request + * + * @param request the List all Managed Organizations for the User request + * @return the response from the List all Managed Organizations for the User request + */ + Mono listManagedOrganizations( + ListUserManagedOrganizationsRequest request); + + /** + * Makes the List all Managed Spaces for the User request + * + * @param request the List all Managed Spaces for the User request + * @return the response from the List all Managed Spaces for the User request + */ + Mono listManagedSpaces(ListUserManagedSpacesRequest request); + + /** + * Makes the List all Organizations for the User request + * + * @param request the List all Organizations for the User request + * @return the response from the List all Organizations for the User request + */ + Mono listOrganizations(ListUserOrganizationsRequest request); + + /** + * Makes the List all Spaces for the User request + * + * @param request the List all Spaces for the User request + * @return the response from the List all Spaces for the User request + */ + Mono listSpaces(ListUserSpacesRequest request); + + /** + * Makes the Remove Audited Organization from the User request + * + * @param request the Remove Audited Organization from the User request + * @return the response from the Remove Audited Organization from the User request + */ + Mono removeAuditedOrganization(RemoveUserAuditedOrganizationRequest request); + + /** + * Makes the Remove Audited Space from the User request + * + * @param request the Remove Audited Space from the User request + * @return the response from the Remove Audited Space from the User request + */ + Mono removeAuditedSpace(RemoveUserAuditedSpaceRequest request); + + /** + * Makes the Remove Managed Billing Organization from the User request + * + * @param request the Remove Billing Managed Organization from the User request + * @return the response from the Remove Billing Managed Organization from the User request + */ + Mono removeBillingManagedOrganization( + RemoveUserBillingManagedOrganizationRequest request); + + /** + * Makes the Remove Managed Organization from the User request + * + * @param request the Remove Managed Organization from the User request + * @return the response from the Remove Managed Organization from the User request + */ + Mono removeManagedOrganization(RemoveUserManagedOrganizationRequest request); + + /** + * Makes the Remove Managed Space from the User request + * + * @param request the Remove Managed Space from the User request + * @return the response from the Remove Managed Space from the User request + */ + Mono removeManagedSpace(RemoveUserManagedSpaceRequest request); + + /** + * Makes the Remove Organization from the User request + * + * @param request the Remove Organization from the User request + * @return the response from the Remove Organization from the User request + */ + Mono removeOrganization(RemoveUserOrganizationRequest request); + + /** + * Makes the Remove Space from the User request + * + * @param request the Remove Space from the User request + * @return the response from the Remove Space from the User request + */ + Mono removeSpace(RemoveUserSpaceRequest request); + + /** + * Makes the Get User Summary request + * + * @param request the Get User summary request + * @return the response from the Get User summary request + */ + Mono summary(SummaryUserRequest request); + + /** + * Makes the Updating a User request + * + * @param request the Updating a User request + * @return the response from the Updating a User request + */ + Mono update(UpdateUserRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedOrganizationRequest.java new file mode 100644 index 00000000000..3a04e6b4866 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Audited Organization with the User operation + */ +@Value.Immutable +abstract class _AssociateUserAuditedOrganizationRequest { + + /** + * The id of the audited organization + */ + @JsonIgnore + abstract String getAuditedOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedOrganizationResponse.java new file mode 100644 index 00000000000..25ebd7f9d48 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Audited Organization with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserAuditedOrganizationResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedSpaceRequest.java new file mode 100644 index 00000000000..fae71ae9098 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Audited Space with the User operation + */ +@Value.Immutable +abstract class _AssociateUserAuditedSpaceRequest { + + /** + * The id of the audited space + */ + @JsonIgnore + abstract String getAuditedSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedSpaceResponse.java new file mode 100644 index 00000000000..72d4238b9d7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserAuditedSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Audited Space with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserAuditedSpaceResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserBillingManagedOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserBillingManagedOrganizationRequest.java new file mode 100644 index 00000000000..376eb163957 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserBillingManagedOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Billing Managed Organization with the User operation + */ +@Value.Immutable +abstract class _AssociateUserBillingManagedOrganizationRequest { + + /** + * The id of the billing managed organization + */ + @JsonIgnore + abstract String getBillingManagedOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserBillingManagedOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserBillingManagedOrganizationResponse.java new file mode 100644 index 00000000000..dd7e6aff396 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserBillingManagedOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Billing Managed Organization with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserBillingManagedOrganizationResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedOrganizationRequest.java new file mode 100644 index 00000000000..306e9d78996 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Managed Organization with the User operation + */ +@Value.Immutable +abstract class _AssociateUserManagedOrganizationRequest { + + /** + * The id of the managed organization + */ + @JsonIgnore + abstract String getManagedOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedOrganizationResponse.java new file mode 100644 index 00000000000..60c20fbd73f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Managed Organization with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserManagedOrganizationResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedSpaceRequest.java new file mode 100644 index 00000000000..1c95318d7d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Managed Space with the User operation + */ +@Value.Immutable +abstract class _AssociateUserManagedSpaceRequest { + + /** + * The id of the managed space + */ + @JsonIgnore + abstract String getManagedSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedSpaceResponse.java new file mode 100644 index 00000000000..a4e885bd4e9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserManagedSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Managed Space with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserManagedSpaceResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserOrganizationRequest.java new file mode 100644 index 00000000000..d724213b881 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Organization with the User operation + */ +@Value.Immutable +abstract class _AssociateUserOrganizationRequest { + + /** + * The id of the organization + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserOrganizationResponse.java new file mode 100644 index 00000000000..9a4e3bad4c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Organization with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserOrganizationResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserSpaceRequest.java new file mode 100644 index 00000000000..5f0951b50ab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Associate Space with the User operation + */ +@Value.Immutable +abstract class _AssociateUserSpaceRequest { + + /** + * The id of the space + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserSpaceResponse.java new file mode 100644 index 00000000000..3710ab65904 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_AssociateUserSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Associate Space with the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssociateUserSpaceResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_CreateUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_CreateUserRequest.java new file mode 100644 index 00000000000..6596cf16ff4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_CreateUserRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create a User operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateUserRequest { + + /** + * The ID of the default space for apps created by this user + */ + @JsonProperty("default_space_guid") + @Nullable + abstract String getDefaultSpaceId(); + + /** + * The UAA ID of the user to create + */ + @JsonProperty("guid") + abstract String getUaaId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_CreateUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_CreateUserResponse.java new file mode 100644 index 00000000000..38722753f5b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_CreateUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create a User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateUserResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_DeleteUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_DeleteUserRequest.java new file mode 100644 index 00000000000..1d9ff2f290c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_DeleteUserRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Create a User operation + */ +@Value.Immutable +abstract class _DeleteUserRequest { + + /** + * The async + */ + @Nullable + @QueryParameter("async") + abstract Boolean getAsync(); + + /** + * The ID of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_DeleteUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_DeleteUserResponse.java new file mode 100644 index 00000000000..e8076166a78 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_DeleteUserResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response for the Delete User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteUserResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_GetUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_GetUserRequest.java new file mode 100644 index 00000000000..c9c5e9815e8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_GetUserRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get User operation + */ +@Value.Immutable +abstract class _GetUserRequest { + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_GetUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_GetUserResponse.java new file mode 100644 index 00000000000..5f475b43102 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_GetUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetUserResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedOrganizationsRequest.java new file mode 100644 index 00000000000..5013aaa93da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedOrganizationsRequest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Audited Organizations for the User operation + */ +@Value.Immutable +abstract class _ListUserAuditedOrganizationsRequest extends PaginatedRequest { + + /** + * The auditor id + */ + @FilterParameter("auditor_guid") + @Nullable + abstract String getAuditorId(); + + /** + * The billing manager id + */ + @FilterParameter("billing_manager_guid") + @Nullable + abstract String getBillingManagerId(); + + /** + * The manager id + */ + @FilterParameter("manager_guid") + @Nullable + abstract String getManagerId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The space id + */ + @FilterParameter("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The status + */ + @FilterParameter("status") + @Nullable + abstract String getStatus(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedOrganizationsResponse.java new file mode 100644 index 00000000000..a188323836c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedOrganizationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Audited Organizations for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserAuditedOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedSpacesRequest.java new file mode 100644 index 00000000000..405e1e5937e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedSpacesRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Audited Spaces for the User operation + */ +@Value.Immutable +abstract class _ListUserAuditedSpacesRequest extends PaginatedRequest { + + /** + * The application id + */ + @FilterParameter("app_guid") + @Nullable + abstract String getApplicationId(); + + /** + * The developer id + */ + @FilterParameter("developer_guid") + @Nullable + abstract String getDeveloperId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The organization id + */ + @FilterParameter("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedSpacesResponse.java new file mode 100644 index 00000000000..6f554b7e65b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserAuditedSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Audited Spaces for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserAuditedSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserBillingManagedOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserBillingManagedOrganizationsRequest.java new file mode 100644 index 00000000000..b3ebb01dd62 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserBillingManagedOrganizationsRequest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Billing Managed Organizations for the User operation + */ +@Value.Immutable +abstract class _ListUserBillingManagedOrganizationsRequest extends PaginatedRequest { + + /** + * The auditor id + */ + @FilterParameter("auditor_guid") + @Nullable + abstract String getAuditorId(); + + /** + * The billing manager id + */ + @FilterParameter("billing_manager_guid") + @Nullable + abstract String getBillingManagerId(); + + /** + * The manager id + */ + @FilterParameter("manager_guid") + @Nullable + abstract String getManagerId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The space id + */ + @FilterParameter("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The status + */ + @FilterParameter("status") + @Nullable + abstract String getStatus(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserBillingManagedOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserBillingManagedOrganizationsResponse.java new file mode 100644 index 00000000000..4613360f329 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserBillingManagedOrganizationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Billing Managed Organizations for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserBillingManagedOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedOrganizationsRequest.java new file mode 100644 index 00000000000..cc1a9efe52f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedOrganizationsRequest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Managed Organizations for the User operation + */ +@Value.Immutable +abstract class _ListUserManagedOrganizationsRequest extends PaginatedRequest { + + /** + * The auditor id + */ + @FilterParameter("auditor_guid") + @Nullable + abstract String getAuditorId(); + + /** + * The billing manager id + */ + @FilterParameter("billing_manager_guid") + @Nullable + abstract String getBillingManagerId(); + + /** + * The manager id + */ + @FilterParameter("manager_guid") + @Nullable + abstract String getManagerId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The space id + */ + @FilterParameter("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The status + */ + @FilterParameter("status") + @Nullable + abstract String getStatus(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedOrganizationsResponse.java new file mode 100644 index 00000000000..41fcc3462c0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedOrganizationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Managed Organizations for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserManagedOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedSpacesRequest.java new file mode 100644 index 00000000000..d17155a6465 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedSpacesRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Managed Spaces for the User operation + */ +@Value.Immutable +abstract class _ListUserManagedSpacesRequest extends PaginatedRequest { + + /** + * The application id + */ + @FilterParameter("app_guid") + @Nullable + abstract String getApplicationId(); + + /** + * The developer id + */ + @FilterParameter("developer_guid") + @Nullable + abstract String getDeveloperId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The organization id + */ + @FilterParameter("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedSpacesResponse.java new file mode 100644 index 00000000000..64798761e99 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserManagedSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Managed Spaces for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserManagedSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserOrganizationsRequest.java new file mode 100644 index 00000000000..61574c17cb2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserOrganizationsRequest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Organizations for the User operation + */ +@Value.Immutable +abstract class _ListUserOrganizationsRequest extends PaginatedRequest { + + /** + * The auditor id + */ + @FilterParameter("auditor_guid") + @Nullable + abstract String getAuditorId(); + + /** + * The billing manager id + */ + @FilterParameter("billing_manager_guid") + @Nullable + abstract String getBillingManagerId(); + + /** + * The manager id + */ + @FilterParameter("manager_guid") + @Nullable + abstract String getManagerId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The space id + */ + @FilterParameter("space_guid") + @Nullable + abstract String getSpaceId(); + + /** + * The status + */ + @FilterParameter("status") + @Nullable + abstract String getStatus(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserOrganizationsResponse.java new file mode 100644 index 00000000000..51117e02d94 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserOrganizationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Organizations for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserSpacesRequest.java new file mode 100644 index 00000000000..c3961439d46 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserSpacesRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List all Spaces for the User operation + */ +@Value.Immutable +abstract class _ListUserSpacesRequest extends PaginatedRequest { + + /** + * The application id + */ + @FilterParameter("app_guid") + @Nullable + abstract String getApplicationId(); + + /** + * The developer id + */ + @FilterParameter("developer_guid") + @Nullable + abstract String getDeveloperId(); + + /** + * The name + */ + @FilterParameter("name") + @Nullable + abstract String getName(); + + /** + * The organization id + */ + @FilterParameter("organization_guid") + @Nullable + abstract String getOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserSpacesResponse.java new file mode 100644 index 00000000000..991f4f6f372 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUserSpacesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.immutables.value.Value; + +/** + * The response payload for the List all Spaces for the User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUserSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUsersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUsersRequest.java new file mode 100644 index 00000000000..4dc064d6e22 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUsersRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.FilterParameter; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Users operation + */ +@Value.Immutable +abstract class _ListUsersRequest extends PaginatedRequest { + + /** + * The audited organization ids + */ + @FilterParameter("audited_organization_guid") + @Nullable + abstract List getAuditedOrganizationIds(); + + /** + * The audited space ids + */ + @FilterParameter("audited_space_guid") + @Nullable + abstract List getAuditedSpaceIds(); + + /** + * The billing managed organization ids + */ + @FilterParameter("billing_managed_organization_guid") + @Nullable + abstract List getBillingManagedOrganizationIds(); + + /** + * The managed organization ids + */ + @FilterParameter("managed_organization_guid") + @Nullable + abstract List getManagedOrganizationIds(); + + /** + * The managed space ids + */ + @FilterParameter("managed_space_guid") + @Nullable + abstract List getManagedSpaceIds(); + + /** + * The organization ids + */ + @FilterParameter("organization_guid") + @Nullable + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guid") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUsersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUsersResponse.java new file mode 100644 index 00000000000..595cbc88baf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_ListUsersResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Users operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUsersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserAuditedOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserAuditedOrganizationRequest.java new file mode 100644 index 00000000000..442143a98dc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserAuditedOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Audited Organization from the User operation + */ +@Value.Immutable +abstract class _RemoveUserAuditedOrganizationRequest { + + /** + * The id of the audited organization + */ + @JsonIgnore + abstract String getAuditedOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserAuditedSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserAuditedSpaceRequest.java new file mode 100644 index 00000000000..0cd83b65606 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserAuditedSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Audited Space from the User operation + */ +@Value.Immutable +abstract class _RemoveUserAuditedSpaceRequest { + + /** + * The id of the audited space + */ + @JsonIgnore + abstract String getAuditedSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserBillingManagedOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserBillingManagedOrganizationRequest.java new file mode 100644 index 00000000000..3edfe3c151e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserBillingManagedOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Billing Managed Organization from the User operation + */ +@Value.Immutable +abstract class _RemoveUserBillingManagedOrganizationRequest { + + /** + * The id of the billing managed organization + */ + @JsonIgnore + abstract String getBillingManagedOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserManagedOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserManagedOrganizationRequest.java new file mode 100644 index 00000000000..af7066c4a43 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserManagedOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Managed Organization from the User operation + */ +@Value.Immutable +abstract class _RemoveUserManagedOrganizationRequest { + + /** + * The id of the managed organization + */ + @JsonIgnore + abstract String getManagedOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserManagedSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserManagedSpaceRequest.java new file mode 100644 index 00000000000..8ff7f9326fc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserManagedSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Managed Space from the User operation + */ +@Value.Immutable +abstract class _RemoveUserManagedSpaceRequest { + + /** + * The id of the managed space + */ + @JsonIgnore + abstract String getManagedSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserOrganizationRequest.java new file mode 100644 index 00000000000..205cf41670c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserOrganizationRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Organization from the User operation + */ +@Value.Immutable +abstract class _RemoveUserOrganizationRequest { + + /** + * The id of the organization + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserSpaceRequest.java new file mode 100644 index 00000000000..6fbbe3e27d2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_RemoveUserSpaceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Space from the User operation + */ +@Value.Immutable +abstract class _RemoveUserSpaceRequest { + + /** + * The id of the space + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_SummaryUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_SummaryUserRequest.java new file mode 100644 index 00000000000..a55ff1f0658 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_SummaryUserRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get User Summary operation + */ +@Value.Immutable +abstract class _SummaryUserRequest { + + /** + * The ID of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_SummaryUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_SummaryUserResponse.java new file mode 100644 index 00000000000..1bc0472048a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_SummaryUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get User Summary operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SummaryUserResponse extends AbstractUserSummaryResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UpdateUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UpdateUserRequest.java new file mode 100644 index 00000000000..8d0bc97f8c3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UpdateUserRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Update a User operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateUserRequest { + + /** + * The id of the default space for apps created by this user + */ + @JsonProperty("default_space_guid") + @Nullable + abstract String getDefaultSpaceId(); + + /** + * The id of the user + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UpdateUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UpdateUserResponse.java new file mode 100644 index 00000000000..05c32bccf41 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UpdateUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateUserResponse extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserEntity.java new file mode 100644 index 00000000000..e39b1d5c649 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserEntity.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The entity response payload for the User resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserEntity extends AbstractUserEntity { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserOrganizationEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserOrganizationEntity.java new file mode 100644 index 00000000000..19abb530dea --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserOrganizationEntity.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the User Organization resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserOrganizationEntity { + + /** + * Billing enabled + */ + @JsonProperty("billing_enabled") + @Nullable + abstract Boolean getBillingEnabled(); + + /** + * The spaces + */ + @JsonProperty("managers") + @Nullable + abstract List getManagers(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The spaces + */ + @JsonProperty("quota_definition") + @Nullable + abstract OrganizationQuotaDefinitionResource getQuotaDefinition(); + + /** + * The spaces + */ + @JsonProperty("spaces") + @Nullable + abstract List getSpaces(); + + /** + * The status + */ + @JsonProperty("status") + @Nullable + abstract String getStatus(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserOrganizationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserOrganizationResource.java new file mode 100644 index 00000000000..200350d4a06 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserOrganizationResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain User Organizations + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserOrganizationResource extends AbstractUserOrganizationResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserResource.java new file mode 100644 index 00000000000..2bf1241ef13 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain users + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserResource extends AbstractUserResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSpaceEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSpaceEntity.java new file mode 100644 index 00000000000..9189f413290 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSpaceEntity.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity response payload for the User Space resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserSpaceEntity { + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSpaceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSpaceResource.java new file mode 100644 index 00000000000..f484795413b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSpaceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain User Spaces + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserSpaceResource extends AbstractUserSpaceResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSummaryEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSummaryEntity.java new file mode 100644 index 00000000000..a8b2fe57ee3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v2/users/_UserSummaryEntity.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The entity response payload for the User Summary resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserSummaryEntity { + + /** + * The audited organizations + */ + @JsonProperty("audited_organizations") + @Nullable + public abstract List getAuditedOrganizations(); + + /** + * The audited spaces + */ + @JsonProperty("audited_spaces") + @Nullable + public abstract List getAuditedSpaces(); + + /** + * The billing managed organizations + */ + @JsonProperty("billing_managed_organizations") + @Nullable + public abstract List getBillingManagedOrganizations(); + + /** + * The managed organizations + */ + @JsonProperty("managed_organizations") + @Nullable + public abstract List getManagedOrganizations(); + + /** + * The managed spaces + */ + @JsonProperty("managed_spaces") + @Nullable + public abstract List getManagedSpaces(); + + /** + * The developer organizations + */ + @JsonProperty("organizations") + @Nullable + public abstract List getOrganizations(); + + /** + * The developer spaces + */ + @JsonProperty("spaces") + @Nullable + public abstract List getSpaces(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/ChecksumType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/ChecksumType.java new file mode 100644 index 00000000000..61fd25d2a9e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/ChecksumType.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum ChecksumType { + SHA1("sha1"), + + SHA256("sha256"); + + private final String value; + + ChecksumType(String value) { + this.value = value; + } + + @JsonCreator + public static ChecksumType from(String s) { + switch (s.toLowerCase()) { + case "sha1": + return SHA1; + case "sha256": + return SHA256; + default: + throw new IllegalArgumentException(String.format("Unknown checksum type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/ClientV3Exception.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/ClientV3Exception.java new file mode 100644 index 00000000000..b2322245fca --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/ClientV3Exception.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import java.util.List; +import java.util.stream.Collectors; +import org.cloudfoundry.AbstractCloudFoundryException; + +/** + * An exception encapsulating an error returned from Cloud Foundry V3 APIs + */ +public final class ClientV3Exception extends AbstractCloudFoundryException { + + private static final long serialVersionUID = 3422415564722151878L; + + private final List errors; + + /** + * Creates a new instance + * + * @param statusCode the status code + * @param errors the errors + */ + public ClientV3Exception(Integer statusCode, List errors) { + super( + statusCode, + errors.stream() + .map(ClientV3Exception::toErrorString) + .collect(Collectors.joining(", "))); + this.errors = errors; + } + + /** + * Returns the errors + */ + public List getErrors() { + return this.errors; + } + + private static String toErrorString(Error error) { + return String.format("%s(%d): %s", error.getTitle(), error.getCode(), error.getDetail()); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/FilterParameter.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/FilterParameter.java new file mode 100644 index 00000000000..7502a1066d0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/FilterParameter.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JacksonAnnotationsInside; +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +/** + * An annotation indicating that a method represents a Cloud Foundry V3 filter parameter + */ +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@JsonIgnore +@JacksonAnnotationsInside +public @interface FilterParameter { + + /** + * Returns the name of the parameter + * + * @return the name of the parameter + */ + String value(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/LifecycleData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/LifecycleData.java new file mode 100644 index 00000000000..5e3875ae7d7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/LifecycleData.java @@ -0,0 +1,22 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +/** + * Marker interface for Lifecycle Data + */ +public interface LifecycleData {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/LifecycleType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/LifecycleType.java new file mode 100644 index 00000000000..953d731df39 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/LifecycleType.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum LifecycleType { + BUILDPACK("buildpack"), + + DOCKER("docker"), + + KPACK("kpack"), + + CNB("cnb"); + + private final String value; + + LifecycleType(String value) { + this.value = value; + } + + @JsonCreator + public static LifecycleType from(String s) { + switch (s.toLowerCase()) { + case "buildpack": + return BUILDPACK; + case "docker": + return DOCKER; + case "kpack": + return KPACK; + case "cnb": + return CNB; + default: + throw new IllegalArgumentException(String.format("Unknown lifecycle type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/PaginatedRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/PaginatedRequest.java new file mode 100644 index 00000000000..514b90ef7ed --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/PaginatedRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * Base class for requests that are paginated + */ +public abstract class PaginatedRequest { + + /** + * The order by + */ + @Nullable + @QueryParameter("order_by") + public abstract String getOrderBy(); + + /** + * The page + */ + @Nullable + @QueryParameter("page") + public abstract Integer getPage(); + + /** + * The results per page + */ + @Nullable + @QueryParameter("per_page") + public abstract Integer getPerPage(); + + @Value.Check + public void check() { + if (getPage() != null && getPage() < 1) { + throw new IllegalStateException("page must be greater than or equal to 1"); + } + + if (getPerPage() != null && (getPerPage() < 1 || getPerPage() > 5_000)) { + throw new IllegalStateException("perPage much be between 1 and 5000 inclusive"); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/PaginatedResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/PaginatedResponse.java new file mode 100644 index 00000000000..7546649879b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/PaginatedResponse.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +/** + * Base class for responses that are paginated + * + * @param the entity type + */ +public abstract class PaginatedResponse { + + /** + * The pagination + */ + @JsonProperty("pagination") + @Nullable + public abstract Pagination getPagination(); + + /** + * The resources + */ + @JsonProperty("resources") + @Nullable + public abstract List getResources(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/RelationshipResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/RelationshipResponse.java new file mode 100644 index 00000000000..4fd84e3e7b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/RelationshipResponse.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; + +/** + * A base class for all response types that are relationships + */ +public abstract class RelationshipResponse { + + /** + * The relationship + */ + @JsonProperty("data") + @Nullable + public abstract Relationship getData(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + public abstract Map getLinks(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/Resource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/Resource.java new file mode 100644 index 00000000000..b3cfe760d54 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/Resource.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; + +public abstract class Resource { + + /** + * When the resource was created + */ + @JsonProperty("created_at") + public abstract String getCreatedAt(); + + /** + * The resource's id + */ + @JsonProperty("guid") + public abstract String getId(); + + /** + * Links to related resources and actions for the resource + */ + @AllowNulls + @JsonProperty("links") + public abstract Map getLinks(); + + /** + * When the resource was last updated + */ + @JsonProperty("updated_at") + @Nullable + public abstract String getUpdatedAt(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_BuildpackData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_BuildpackData.java new file mode 100644 index 00000000000..71465ca7cc9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_BuildpackData.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * Data type for the Buildpack + */ +@JsonDeserialize +@Value.Immutable +abstract class _BuildpackData implements LifecycleData { + + /** + * The buildpack + */ + @JsonProperty("buildpacks") + @Nullable + abstract List getBuildpacks(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + abstract String getStack(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Checksum.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Checksum.java new file mode 100644 index 00000000000..3fcca4672ba --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Checksum.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A checksum payload + */ +@JsonDeserialize +@Value.Immutable +abstract class _Checksum { + + /** + * The type + */ + @JsonProperty("type") + @Nullable + abstract ChecksumType getType(); + + /** + * The value + */ + @JsonProperty("value") + @Nullable + abstract String getValue(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_CnbData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_CnbData.java new file mode 100644 index 00000000000..a3fafea714f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_CnbData.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * Data type for the Buildpack + */ +@JsonDeserialize +@Value.Immutable +abstract class _CnbData implements LifecycleData { + + /** + * The buildpack + */ + @JsonProperty("buildpacks") + @Nullable + abstract List getBuildpacks(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + abstract String getStack(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_DockerData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_DockerData.java new file mode 100644 index 00000000000..7123103c5d5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_DockerData.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Data type for the Docker + */ +@JsonDeserialize +@Value.Immutable +abstract class _DockerData implements LifecycleData { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Error.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Error.java new file mode 100644 index 00000000000..6ed8592dbde --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Error.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The error object + */ +@JsonDeserialize +@Value.Immutable +abstract class _Error { + + /** + * A numeric code for the error + */ + @JsonProperty("code") + abstract Integer getCode(); + + /** + * Detailed description of the error + */ + @JsonProperty("detail") + abstract String getDetail(); + + /** + * Short description of the error + */ + @JsonProperty("title") + abstract String getTitle(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Errors.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Errors.java new file mode 100644 index 00000000000..38fb0410886 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Errors.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The v3 error payload object + */ +@JsonDeserialize +@Value.Immutable +abstract class _Errors { + + /** + * The errors + */ + @JsonProperty("errors") + abstract List getErrors(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_KpackData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_KpackData.java new file mode 100644 index 00000000000..e8d88c4c89d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_KpackData.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * Data type for the Kpack + */ +@JsonDeserialize +@Value.Immutable +abstract class _KpackData implements LifecycleData { + + /** + * The buildpack + */ + @JsonProperty("buildpacks") + @Nullable + abstract List getBuildpacks(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_LastOperation.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_LastOperation.java new file mode 100644 index 00000000000..d024fb06b2c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_LastOperation.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The last operation object + */ +@JsonDeserialize +@Value.Immutable +abstract class _LastOperation { + + /** + * When the entity was created + */ + @JsonProperty("created_at") + @Nullable + abstract String getCreatedAt(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + abstract String getState(); + + /** + * The type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + + /** + * When the entity was last updated + */ + @JsonProperty("updated_at") + @Nullable + abstract String getUpdatedAt(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Lifecycle.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Lifecycle.java new file mode 100644 index 00000000000..8a691bb415f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Lifecycle.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The lifecycle type + */ +@JsonDeserialize +@Value.Immutable +abstract class _Lifecycle { + + /** + * The data for the lifecycle + */ + @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXTERNAL_PROPERTY, property = "type") + @JsonSubTypes({ + @JsonSubTypes.Type(name = "buildpack", value = BuildpackData.class), + @JsonSubTypes.Type(name = "docker", value = DockerData.class), + @JsonSubTypes.Type(name = "kpack", value = KpackData.class), + @JsonSubTypes.Type(name = "cnb", value = CnbData.class) + }) + @JsonProperty("data") + abstract LifecycleData getData(); + + /** + * The type + */ + @JsonProperty("type") + abstract LifecycleType getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Link.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Link.java new file mode 100644 index 00000000000..3867741d726 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Link.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A link payload + */ +@JsonDeserialize +@Value.Immutable +abstract class _Link { + + /** + * The href + */ + @JsonProperty("href") + abstract String getHref(); + + /** + * The method + */ + @JsonProperty("method") + @Nullable + abstract String getMethod(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_MaintenanceInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_MaintenanceInfo.java new file mode 100644 index 00000000000..d2121bb80eb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_MaintenanceInfo.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing service plan maintenance info + */ +@JsonDeserialize +@Value.Immutable +abstract class _MaintenanceInfo { + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Metadata.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Metadata.java new file mode 100644 index 00000000000..c377227d7ae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Metadata.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The metadata payload for a resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _Metadata { + + /** + * The metadata annotations + */ + @AllowNulls + @JsonInclude + @JsonProperty("annotations") + @Nullable + abstract Map getAnnotations(); + + /** + * The metadata labels + */ + @AllowNulls + @JsonInclude + @JsonProperty("labels") + @Nullable + abstract Map getLabels(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Pagination.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Pagination.java new file mode 100644 index 00000000000..0e081d0c2d4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Pagination.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Pagination information + */ +@JsonDeserialize +@Value.Immutable +abstract class _Pagination { + + /** + * The first + */ + @JsonProperty("first") + @Nullable + abstract Link getFirst(); + + /** + * The last + */ + @JsonProperty("last") + @Nullable + abstract Link getLast(); + + /** + * The next + */ + @JsonProperty("next") + @Nullable + abstract Link getNext(); + + /** + * The previous + */ + @JsonProperty("previous") + @Nullable + abstract Link getPrevious(); + + /** + * The total pages + */ + @JsonProperty("total_pages") + @Nullable + abstract Integer getTotalPages(); + + /** + * The total results + */ + @JsonProperty("total_results") + @Nullable + abstract Integer getTotalResults(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Relationship.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Relationship.java new file mode 100644 index 00000000000..50ef5c951a6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_Relationship.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a relationship to another entity + */ +@JsonDeserialize +@Value.Immutable +abstract class _Relationship { + + /** + * The id + */ + @JsonProperty("guid") + @Nullable + abstract String getId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_ToManyRelationship.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_ToManyRelationship.java new file mode 100644 index 00000000000..9af4125503c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_ToManyRelationship.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * Represents a to-one relationship to another entity + */ +@JsonDeserialize +@Value.Immutable +abstract class _ToManyRelationship { + + /** + * The relationship data + */ + @JsonProperty("data") + abstract List getData(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_ToOneRelationship.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_ToOneRelationship.java new file mode 100644 index 00000000000..9ea8f2fbbbc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_ToOneRelationship.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a to-one relationship to another entity + */ +@JsonDeserialize +@Value.Immutable +abstract class _ToOneRelationship { + + /** + * The relationship data + */ + @Nullable + @JsonProperty("data") + abstract Relationship getData(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_UsageSummary.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_UsageSummary.java new file mode 100644 index 00000000000..cfcaccae3ee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/_UsageSummary.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a summary of resource usage + */ +@JsonDeserialize +@Value.Immutable +abstract class _UsageSummary { + + /** + * The total memory usage + */ + @JsonProperty("memory_in_mb") + abstract Integer getMemoryInMb(); + + /** + * The number of started instances + */ + @JsonProperty("started_instances") + abstract Integer getStartedInstances(); + + /** + * The number of routes + */ + @JsonProperty("routes") + @Nullable + abstract Integer getRoutes(); + + /** + * The number of service instances + */ + @JsonProperty("service_instances") + @Nullable + abstract Integer getServiceInstances(); + + /** + * The number of reserved ports + */ + @JsonProperty("reserved_ports") + @Nullable + abstract Integer getReservedPorts(); + + /** + * The number of domains + */ + @JsonProperty("domains") + @Nullable + abstract Integer getDomains(); + + /** + * The number of tasks per app + */ + @JsonProperty("per_app_tasks") + @Nullable + abstract Integer getPerAppTasks(); + + /** + * The number of service keys + */ + @JsonProperty("service_keys") + @Nullable + abstract Integer getServiceKeys(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/admin/AdminV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/admin/AdminV3.java new file mode 100644 index 00000000000..81dbf7d1bf8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/admin/AdminV3.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.admin; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Admin Client API + */ +public interface AdminV3 { + + /** + * Makes the Clear BuildPack Cache request + * + * @param request the Clear BuildPack Cache request + * @return the response from the Clear BuildPack Cache request + */ + Mono clearBuildpackCache(ClearBuildpackCacheRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/admin/_ClearBuildpackCacheRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/admin/_ClearBuildpackCacheRequest.java new file mode 100644 index 00000000000..b3ad33912ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/admin/_ClearBuildpackCacheRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.admin; + +import org.immutables.value.Value; + +/** + * The request payload for the Clear Buildpack Cache operation + */ +@Value.Immutable +abstract class _ClearBuildpackCacheRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/Application.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/Application.java new file mode 100644 index 00000000000..a6d9898de40 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/Application.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are applications + */ +public abstract class Application extends Resource { + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + public abstract Lifecycle getLifecycle(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract ApplicationRelationships getRelationships(); + + /** + * The state + */ + @JsonProperty("state") + public abstract ApplicationState getState(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationFeature.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationFeature.java new file mode 100644 index 00000000000..b47cfd7df3b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationFeature.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * Base class for responses that are Application Features + */ +public abstract class ApplicationFeature { + + /** + * The description of the application feature + */ + @JsonProperty("description") + @Nullable + public abstract String getDescription(); + + /** + * Denotes whether or not the application feature is enabled + */ + @JsonProperty("enabled") + @Nullable + public abstract Boolean getEnabled(); + + /** + * The name of the application feature + */ + @JsonProperty("name") + @Nullable + public abstract String getName(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationState.java new file mode 100644 index 00000000000..06a7ead9195 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationState.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of the {@link Application} + */ +public enum ApplicationState { + + /** + * The running state + */ + STARTED("STARTED"), + + /** + * The succeeded state + */ + STOPPED("STOPPED"); + + private final String value; + + ApplicationState(String value) { + this.value = value; + } + + @JsonCreator + public static ApplicationState from(String s) { + switch (s.toLowerCase()) { + case "started": + return STARTED; + case "stopped": + return STOPPED; + default: + throw new IllegalArgumentException( + String.format("Unknown application state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationsV3.java new file mode 100644 index 00000000000..ff951a68a54 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/ApplicationsV3.java @@ -0,0 +1,265 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Applications V3 Client API + */ +public interface ApplicationsV3 { + + /** + * Makes the Create Application request + * + * @param request the Create Application request + * @return the response from the Create Application request + */ + Mono create(CreateApplicationRequest request); + + /** + * Makes the Delete Application request + * + * @param request the Delete Application request + * @return the response from the Delete Application request + */ + Mono delete(DeleteApplicationRequest request); + + /** + * Makes the Get Application request + * + * @param request the Get Application request + * @return the response from the Get Application request + */ + Mono get(GetApplicationRequest request); + + /** + * Makes the Get Current Droplet request + * + * @param request the Get Current Droplet request + * @return the response from the Get Current Droplet request + */ + Mono getCurrentDroplet( + GetApplicationCurrentDropletRequest request); + + /** + * Makes the Get Current Droplet Relationship request + * + * @param request the Get Current Droplet Relationship request + * @return the response from the Get Current Droplet Relationship request + */ + Mono getCurrentDropletRelationship( + GetApplicationCurrentDropletRelationshipRequest request); + + /** + * Makes the Get Application Environment request + * + * @param request the Get Application Environment request + * @return the response from the Get Application Environment request + */ + Mono getEnvironment( + GetApplicationEnvironmentRequest request); + + /** + * Makes the Get Application Environment Variables request + * + * @param request the Get Application Environment Variables request + * @return the response from the Get Application Environment Variables request + */ + Mono getEnvironmentVariables( + GetApplicationEnvironmentVariablesRequest request); + + /** + * Makes the Get Application Feature request + * + * @param request the Get Application Feature request + * @return the response from the Get Application Feature request + */ + Mono getFeature(GetApplicationFeatureRequest request); + + /** + * Makes the Get permissions for an Application request + * + * @param request the Get Permissions for an Application request + * @return the response from the Get Permissions for an Application request + */ + Mono getPermissions( + GetApplicationPermissionsRequest request); + + /** + * Makes the Get Application Process request + * + * @param request the Get Application Process request + * @return the response from the Get Application Process request + */ + Mono getProcess(GetApplicationProcessRequest request); + + /** + * Makes the Get Statistics for a Process for an Application request + * + * @param request the Get Statistics for a Process for an Application request + * @return the response from the Get Statistics for a Process for an Application request + */ + Mono getProcessStatistics( + GetApplicationProcessStatisticsRequest request); + + /** + * Makes the Get SSH enabled for an Application request + * + * @param request the Get SSH enabled for an Application request + * @return the response from the Get SSH enabled for an Application request + */ + Mono getSshEnabled(GetApplicationSshEnabledRequest request); + + /** + * Makes the List Applications request + * + * @param request the List Applications request + * @return the response from the List Applications request + */ + Mono list(ListApplicationsRequest request); + + /** + * Makes the List Application Builds request + * + * @param request the List Application Builds request + * @return the response from the List Application Builds request + */ + Mono listBuilds(ListApplicationBuildsRequest request); + + /** + * Makes the List Application Droplets request + * + * @param request the List Application Droplets request + * @return the response from the List Application Droplets request + */ + Mono listDroplets(ListApplicationDropletsRequest request); + + /** + * Makes the List Application Features request + * + * @param request the List Application Features request + * @return the response from the List Application Features request + */ + Mono listFeatures(ListApplicationFeaturesRequest request); + + /** + * Makes the List Application Packages request + * + * @param request the List Application Packages request + * @return the response from the List Application Packages request + */ + Mono listPackages(ListApplicationPackagesRequest request); + + /** + * Makes the List Application Processes request + * + * @param request the List Application Processes request + * @return the response from the List Application Processes request + */ + Mono listProcesses(ListApplicationProcessesRequest request); + + /** + * Makes the List Application Routes request + * + * @param request the List Application Routes request + * @return the response from the List Application Routes request + */ + Mono listRoutes(ListApplicationRoutesRequest request); + + /** + * Makes the List Application Tasks request + * + * @param request the List Application Tasks request + * @return the response from the List Application Tasks request + */ + Mono listTasks(ListApplicationTasksRequest request); + + /** + * Makes the Restart Application request + * + * @param request the Restart Application request + * @return the response from the Restart Application request + */ + Mono restart(RestartApplicationRequest request); + + /** + * Makes the Scale Application request + * + * @param request the Scale Application request + * @return the response from the Scale Application request + */ + Mono scale(ScaleApplicationRequest request); + + /** + * Makes the Set Current Droplet request + * + * @param request the Set Current Droplet request + * @return the response from the Set Current Droplet request + */ + Mono setCurrentDroplet( + SetApplicationCurrentDropletRequest request); + + /** + * Makes the Start Application request + * + * @param request the Start Application request + * @return the response from the Start Application request + */ + Mono start(StartApplicationRequest request); + + /** + * Makes the Stop Application request + * + * @param request the Stop Application request + * @return the response from the Stop Application request + */ + Mono stop(StopApplicationRequest request); + + /** + * Makes the Delete Application Process request + * + * @param request the Delete Application Process Instance request + * @return the response from the Delete Application Process Instance request + */ + Mono terminateInstance(TerminateApplicationInstanceRequest request); + + /** + * Makes the Update Application request + * + * @param request the Update Application request + * @return the response from the Update Application request + */ + Mono update(UpdateApplicationRequest request); + + /** + * Makes the Update Application Environment Variables request + * + * @param request the Update Application Environment Variables request + * @return the response from the Update Application Environment Variables request + */ + Mono updateEnvironmentVariables( + UpdateApplicationEnvironmentVariablesRequest request); + + /** + * Makes the Update Application Feature request + * + * @param request the Update Application Feature request + * @return the response from the Update Application Feature request + */ + Mono updateFeature(UpdateApplicationFeatureRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/EnvironmentVariables.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/EnvironmentVariables.java new file mode 100644 index 00000000000..2692450b827 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/EnvironmentVariables.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.client.v3.Link; + +/** + * The environment variables of an application + */ +public abstract class EnvironmentVariables { + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + abstract Map getLinks(); + + /** + * The application's environment variables + */ + @AllowNulls + @JsonProperty("var") + abstract Map getVars(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationFeatureResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationFeatureResource.java new file mode 100644 index 00000000000..146498c8fb2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationFeatureResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Application Features operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationFeatureResource extends ApplicationFeature { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java new file mode 100644 index 00000000000..5fbc363e645 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationRelationships.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The Application relationships + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationRelationships { + + /** + * The space relationship + */ + @JsonProperty("space") + abstract ToOneRelationship getSpace(); + + /** + * The current droplet relationship + */ + @JsonProperty("current_droplet") + @Nullable + abstract ToOneRelationship getCurrentDroplet(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationResource.java new file mode 100644 index 00000000000..c6dc0efab19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ApplicationResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Applications operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationResource extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_CreateApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_CreateApplicationRequest.java new file mode 100644 index 00000000000..a6b1e4281a9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_CreateApplicationRequest.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the Create Application operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateApplicationRequest { + + /** + * The environment variables + */ + @AllowNulls + @JsonProperty("environment_variables") + @Nullable + abstract Map getEnvironmentVariables(); + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + @Nullable + abstract Lifecycle getLifecycle(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract ApplicationRelationships getRelationships(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_CreateApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_CreateApplicationResponse.java new file mode 100644 index 00000000000..825b3ab0c4d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_CreateApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateApplicationResponse extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_DeleteApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_DeleteApplicationRequest.java new file mode 100644 index 00000000000..c2423a2e424 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_DeleteApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Application operation + */ +@Value.Immutable +abstract class _DeleteApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRelationshipRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRelationshipRequest.java new file mode 100644 index 00000000000..e04b35a7109 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRelationshipRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Current Droplet Relationship operation. + */ +@Value.Immutable +abstract class _GetApplicationCurrentDropletRelationshipRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRelationshipResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRelationshipResponse.java new file mode 100644 index 00000000000..c218a717bc1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRelationshipResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.RelationshipResponse; +import org.immutables.value.Value; + +/** + * The response payload for the GetCurrent Droplet Relationship operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationCurrentDropletRelationshipResponse extends RelationshipResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRequest.java new file mode 100644 index 00000000000..487fc2af77f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Current Droplet operation + */ +@Value.Immutable +abstract class _GetApplicationCurrentDropletRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletResponse.java new file mode 100644 index 00000000000..02c9a7f785e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationCurrentDropletResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.droplets.Droplet; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationCurrentDropletResponse extends Droplet { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentRequest.java new file mode 100644 index 00000000000..f2ea51345ac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Environment operation + */ +@Value.Immutable +abstract class _GetApplicationEnvironmentRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentResponse.java new file mode 100644 index 00000000000..9f0b4173856 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentResponse.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The response payload for the Get Application Environment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationEnvironmentResponse { + + /** + * The application environment variables + */ + @AllowNulls + @JsonProperty("application_env_json") + @Nullable + abstract Map getApplicationEnvironmentVariables(); + + /** + * The environment variables + */ + @AllowNulls + @JsonProperty("environment_variables") + @Nullable + abstract Map getEnvironmentVariables(); + + /** + * The running environment variables + */ + @AllowNulls + @JsonProperty("running_env_json") + @Nullable + abstract Map getRunningEnvironmentVariables(); + + /** + * The staging environment variables + */ + @AllowNulls + @JsonProperty("staging_env_json") + @Nullable + abstract Map getStagingEnvironmentVariables(); + + /** + * The application environment variables + */ + @AllowNulls + @JsonProperty("system_env_json") + @Nullable + abstract Map getSystemEnvironmentVariables(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentVariablesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentVariablesRequest.java new file mode 100644 index 00000000000..64ca6d324ed --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentVariablesRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Environment Variables operation + */ +@Value.Immutable +abstract class _GetApplicationEnvironmentVariablesRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentVariablesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentVariablesResponse.java new file mode 100644 index 00000000000..b2a82b531fc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationEnvironmentVariablesResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application Environment Variables operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationEnvironmentVariablesResponse extends EnvironmentVariables { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationFeatureRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationFeatureRequest.java new file mode 100644 index 00000000000..ae8319184f0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationFeatureRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application Feature operation. + */ +@Value.Immutable +abstract class _GetApplicationFeatureRequest { + + /** + * The id of the application + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The required feature name + */ + @JsonIgnore + abstract String getFeatureName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationFeatureResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationFeatureResponse.java new file mode 100644 index 00000000000..b88829aff29 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationFeatureResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application Feature operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationFeatureResponse extends ApplicationFeature { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationPermissionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationPermissionsRequest.java new file mode 100644 index 00000000000..1213aa28e89 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationPermissionsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Permissions for an Application operation + */ +@Value.Immutable +abstract class _GetApplicationPermissionsRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationPermissionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationPermissionsResponse.java new file mode 100644 index 00000000000..69c3aac3667 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationPermissionsResponse.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Permissions for an Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationPermissionsResponse { + + /** + * Whether the current user can read basic data + */ + @JsonProperty("read_basic_data") + abstract Boolean getReadBasicData(); + + /** + * Whether the current user can read sensitive data + */ + @JsonProperty("read_sensitive_data") + abstract Boolean getReadSensitiveData(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessRequest.java new file mode 100644 index 00000000000..e33a342ea57 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application operation + */ +@Value.Immutable +abstract class _GetApplicationProcessRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The type + */ + @JsonIgnore + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessResponse.java new file mode 100644 index 00000000000..e4f1a881b77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.processes.Process; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application Process operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationProcessResponse extends Process { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessStatisticsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessStatisticsRequest.java new file mode 100644 index 00000000000..6bb57bb0589 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessStatisticsRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Detailed Stats for an Application's Process operation + */ +@Value.Immutable +abstract class _GetApplicationProcessStatisticsRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The type of the process + */ + @JsonIgnore + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessStatisticsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessStatisticsResponse.java new file mode 100644 index 00000000000..362cf045b42 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationProcessStatisticsResponse.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Get Detailed Stats for an Application's Process operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationProcessStatisticsResponse { + + /** + * The resources + */ + @JsonProperty("resources") + @Nullable + abstract List getResources(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationRequest.java new file mode 100644 index 00000000000..a87b8b31474 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Application operation + */ +@Value.Immutable +abstract class _GetApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationResponse.java new file mode 100644 index 00000000000..87cc25730e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationResponse extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationSshEnabledRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationSshEnabledRequest.java new file mode 100644 index 00000000000..762026082fa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationSshEnabledRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get SSH enabled for an Application operation + */ +@Value.Immutable +abstract class _GetApplicationSshEnabledRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationSshEnabledResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationSshEnabledResponse.java new file mode 100644 index 00000000000..b73710ff2ec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_GetApplicationSshEnabledResponse.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get SSH enabled for an Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetApplicationSshEnabledResponse { + + /** + * Whether SSH is enabled + */ + @JsonProperty("enabled") + abstract Boolean getEnabled(); + + /** + * The reason for the enabled status + */ + @JsonProperty("reason") + abstract String getReason(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationBuildsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationBuildsRequest.java new file mode 100644 index 00000000000..5c5e1e75833 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationBuildsRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Application Builds operation + */ +@Value.Immutable +abstract class _ListApplicationBuildsRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The build states + */ + @FilterParameter("states") + abstract List getStates(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationBuildsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationBuildsResponse.java new file mode 100644 index 00000000000..679c1ba3d75 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationBuildsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.builds.BuildResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Builds operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationBuildsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationDropletsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationDropletsRequest.java new file mode 100644 index 00000000000..6a2fae6312e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationDropletsRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.cloudfoundry.client.v3.droplets.DropletState; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Application Droplets operation + */ +@Value.Immutable +abstract class _ListApplicationDropletsRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * Whether to only include the droplet current assigned to the app + */ + @FilterParameter("current") + @Nullable + abstract Boolean getCurrent(); + + /** + * The droplet ids + */ + @FilterParameter("guids") + abstract List getDropletIds(); + + /** + * The states + */ + @FilterParameter("states") + abstract List getStates(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationDropletsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationDropletsResponse.java new file mode 100644 index 00000000000..85d40bc7354 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationDropletsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.droplets.DropletResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Droplets operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationDropletsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationFeaturesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationFeaturesRequest.java new file mode 100644 index 00000000000..5c96c46c287 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationFeaturesRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the List Application Features operation. + */ +@Value.Immutable +abstract class _ListApplicationFeaturesRequest extends PaginatedRequest { + + /** + * The id of the application + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationFeaturesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationFeaturesResponse.java new file mode 100644 index 00000000000..65b02662d2b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationFeaturesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Feature operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationFeaturesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationPackagesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationPackagesRequest.java new file mode 100644 index 00000000000..dac54b33729 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationPackagesRequest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Application Packages operation + */ +@Value.Immutable +abstract class _ListApplicationPackagesRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * Package ids to filter by + */ + @FilterParameter("guids") + abstract List getPackageIds(); + + /** + * Package states to filter by + */ + @FilterParameter("states") + abstract List getStates(); + + /** + * Package types to filter by + */ + @FilterParameter("types") + abstract List getTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationPackagesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationPackagesResponse.java new file mode 100644 index 00000000000..28e9b2ec835 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationPackagesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.packages.PackageResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Packages operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationPackagesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationProcessesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationProcessesRequest.java new file mode 100644 index 00000000000..f13eb82798d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationProcessesRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Application Processes operation + */ +@Value.Immutable +abstract class _ListApplicationProcessesRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * List of process ids to filter by + */ + @FilterParameter("guids") + abstract List getProcessId(); + + /** + * List of process types to filter by + */ + @FilterParameter("types") + abstract List getTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationProcessesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationProcessesResponse.java new file mode 100644 index 00000000000..78da4f2c14b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationProcessesResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.processes.ProcessResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Processes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationProcessesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationRoutesRequest.java new file mode 100644 index 00000000000..106d3d95f0b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationRoutesRequest.java @@ -0,0 +1,65 @@ +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Application Routes operation + */ +@Value.Immutable +abstract class _ListApplicationRoutesRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The domain guids + */ + @FilterParameter("domain_guids") + abstract List getDomainIds(); + + /** + * The hosts + */ + @FilterParameter("hosts") + abstract List getHosts(); + + /** + * The label selector + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The organization ids + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The paths + */ + @FilterParameter("paths") + abstract List getPaths(); + + /** + * The ports + */ + @FilterParameter("ports") + abstract List getPorts(); + + /** + * The space ids + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationRoutesResponse.java new file mode 100644 index 00000000000..162050e94e2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationRoutesResponse.java @@ -0,0 +1,15 @@ +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.routes.RouteResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Routes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationTasksRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationTasksRequest.java new file mode 100644 index 00000000000..6ed7a718b70 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationTasksRequest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Application Tasks operation + */ +@Value.Immutable +abstract class _ListApplicationTasksRequest extends PaginatedRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * List of names to filter by + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * List of sequence ids to filter by + */ + @FilterParameter("sequence_ids") + abstract List getSequenceIds(); + + /** + * List of states to filter by + */ + @FilterParameter("states") + abstract List getStates(); + + /** + * List of task ids to filter by + */ + @FilterParameter("guids") + abstract List getTaskIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationTasksResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationTasksResponse.java new file mode 100644 index 00000000000..40c55e60d30 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationTasksResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.tasks.TaskResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Application Tasks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationTasksResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationsRequest.java new file mode 100644 index 00000000000..f2dec232799 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationsRequest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Applications operation + */ +@Value.Immutable +abstract class _ListApplicationsRequest extends PaginatedRequest { + + /** + * The ids + */ + @FilterParameter("guids") + abstract List getApplicationIds(); + + /** + * The metadata query + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationsResponse.java new file mode 100644 index 00000000000..97ac6eb9654 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ListApplicationsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Applications operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListApplicationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_RestartApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_RestartApplicationRequest.java new file mode 100644 index 00000000000..0b0ecedad8f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_RestartApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Restart Application operation + */ +@Value.Immutable +abstract class _RestartApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_RestartApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_RestartApplicationResponse.java new file mode 100644 index 00000000000..5bf530659dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_RestartApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Restart Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RestartApplicationResponse extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ScaleApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ScaleApplicationRequest.java new file mode 100644 index 00000000000..cce6eb001a5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ScaleApplicationRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Scale Application operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ScaleApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The disk size + */ + @JsonProperty("disk_in_mb") + @Nullable + abstract Integer getDiskInMb(); + + /** + * The number of instances + */ + @JsonProperty("instances") + @Nullable + abstract Integer getInstances(); + + /** + * The memory size + */ + @JsonProperty("memory_in_mb") + @Nullable + abstract Integer getMemoryInMb(); + + /** + * The type + */ + @JsonIgnore + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ScaleApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ScaleApplicationResponse.java new file mode 100644 index 00000000000..69ab7b91641 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_ScaleApplicationResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.processes.Process; +import org.immutables.value.Value; + +/** + * The response payload for the Scale Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ScaleApplicationResponse extends Process { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_SetApplicationCurrentDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_SetApplicationCurrentDropletRequest.java new file mode 100644 index 00000000000..7dc924926dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_SetApplicationCurrentDropletRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +/** + * The request payload for the Assign Application Droplet operation + */ +@JsonSerialize +@Value.Immutable +abstract class _SetApplicationCurrentDropletRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The entitled organizations + */ + @JsonProperty("data") + abstract Relationship getData(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_SetApplicationCurrentDropletResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_SetApplicationCurrentDropletResponse.java new file mode 100644 index 00000000000..2e48e108fbd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_SetApplicationCurrentDropletResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.RelationshipResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Assign Application Droplet operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SetApplicationCurrentDropletResponse extends RelationshipResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StartApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StartApplicationRequest.java new file mode 100644 index 00000000000..ee20621a37f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StartApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Start Application operation + */ +@Value.Immutable +abstract class _StartApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StartApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StartApplicationResponse.java new file mode 100644 index 00000000000..07da2acbbec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StartApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Start Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _StartApplicationResponse extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StopApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StopApplicationRequest.java new file mode 100644 index 00000000000..f688652be0a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StopApplicationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Stop Application operation + */ +@Value.Immutable +abstract class _StopApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StopApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StopApplicationResponse.java new file mode 100644 index 00000000000..1ca31713eac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_StopApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Start Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _StopApplicationResponse extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_TerminateApplicationInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_TerminateApplicationInstanceRequest.java new file mode 100644 index 00000000000..39ae8f1413f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_TerminateApplicationInstanceRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Application Process Instance operation + */ +@Value.Immutable +abstract class _TerminateApplicationInstanceRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The index + */ + @JsonIgnore + abstract String getIndex(); + + /** + * The type + */ + @JsonIgnore + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationEnvironmentVariablesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationEnvironmentVariablesRequest.java new file mode 100644 index 00000000000..90da3bfe425 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationEnvironmentVariablesRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.util.Map; + +@JsonSerialize +@Value.Immutable +abstract class _UpdateApplicationEnvironmentVariablesRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The application's environment variables + */ + @AllowNulls + @JsonProperty("var") + abstract Map getVars(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationEnvironmentVariablesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationEnvironmentVariablesResponse.java new file mode 100644 index 00000000000..908441ab85d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationEnvironmentVariablesResponse.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@Value.Immutable +@JsonDeserialize +abstract class _UpdateApplicationEnvironmentVariablesResponse extends EnvironmentVariables { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationFeatureRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationFeatureRequest.java new file mode 100644 index 00000000000..67fd0d66e11 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationFeatureRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Update Application Feature operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateApplicationFeatureRequest { + + /** + * The id of the application + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * Denotes whether or not the app feature should be enabled + */ + @JsonProperty("enabled") + abstract Boolean getEnabled(); + + /** + * The feature name + */ + @JsonIgnore + abstract String getFeatureName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationFeatureResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationFeatureResponse.java new file mode 100644 index 00000000000..e5f1334ff9b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationFeatureResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Application Feature operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateApplicationFeatureResponse extends ApplicationFeature { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationRequest.java new file mode 100644 index 00000000000..fe2e8416e22 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Application operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateApplicationRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + @Nullable + abstract Lifecycle getLifecycle(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationResponse.java new file mode 100644 index 00000000000..98c111b7407 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/applications/_UpdateApplicationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Application operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateApplicationResponse extends Application { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/AuditEvent.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/AuditEvent.java new file mode 100644 index 00000000000..cedb69b8940 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/AuditEvent.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are audit events + */ +public abstract class AuditEvent extends Resource { + + /** + * The event actor + */ + @JsonProperty("actor") + @Nullable + public abstract AuditEventActor getAuditEventActor(); + + /** + * The event target + */ + @JsonProperty("target") + @Nullable + public abstract AuditEventTarget getAuditEventTarget(); + + /** + * Additional information about event + */ + @AllowNulls + @JsonProperty("data") + @Nullable + public abstract Map getData(); + + /** + * The organization where the event occurred + */ + @JsonProperty("organization") + @Nullable + public abstract Relationship getOrganizationRelationship(); + + /** + * The space where the event occurred. + */ + @JsonProperty("space") + @Nullable + public abstract Relationship getSpaceRelationship(); + + /** + * The event type + */ + @JsonProperty("type") + @Nullable + public abstract String getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/AuditEventsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/AuditEventsV3.java new file mode 100644 index 00000000000..75dda08166e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/AuditEventsV3.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Audit Events V3 Client API + */ +public interface AuditEventsV3 { + + /** + * Makes the Get Audit Event request + * + * @param request the Get Audit Event request + * @return the response from the Get Audit Event request + */ + Mono get(GetAuditEventRequest request); + + /** + * Makes the List Audit Events request + * + * @param request the List Audit Events request + * @return the response from the List Audit Events request + */ + Mono list(ListAuditEventsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventActor.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventActor.java new file mode 100644 index 00000000000..7f78825f936 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventActor.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@Value.Immutable +@JsonDeserialize +abstract class _AuditEventActor { + + /** + * The actor id + */ + @JsonProperty("guid") + abstract String getId(); + + /** + * The actor name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The actor type + */ + @JsonProperty("type") + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventResource.java new file mode 100644 index 00000000000..2a95b0a9afb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Audit Events operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AuditEventResource extends AuditEvent { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventTarget.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventTarget.java new file mode 100644 index 00000000000..e0f21fe2c2e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_AuditEventTarget.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@Value.Immutable +@JsonDeserialize +abstract class _AuditEventTarget { + + /** + * The target id + */ + @JsonProperty("guid") + abstract String getId(); + + /** + * The target name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The target type + */ + @JsonProperty("type") + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_GetAuditEventRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_GetAuditEventRequest.java new file mode 100644 index 00000000000..55f24f0cc27 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_GetAuditEventRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import org.immutables.value.Value; + +/** + * The request payload for the Get Audit Event operation + */ +@Value.Immutable +public abstract class _GetAuditEventRequest { + + /** + * The audit event id + */ + abstract String getEventId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_GetAuditEventResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_GetAuditEventResponse.java new file mode 100644 index 00000000000..fd094cf6088 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_GetAuditEventResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Audit Event operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetAuditEventResponse extends AuditEvent { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_ListAuditEventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_ListAuditEventsRequest.java new file mode 100644 index 00000000000..18704d62dd5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_ListAuditEventsRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Audit Events operation + */ +@Value.Immutable +abstract class _ListAuditEventsRequest extends PaginatedRequest { + + /** + * The organization ids + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + + /** + * The request target ids + */ + @FilterParameter("target_guids") + abstract List getTargetIds(); + + /** + * The types + */ + @FilterParameter("types") + abstract List getTypes(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_ListAuditEventsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_ListAuditEventsResponse.java new file mode 100644 index 00000000000..fbad2c787ee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/auditevents/_ListAuditEventsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Audit Events operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListAuditEventsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/Buildpack.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/Buildpack.java new file mode 100644 index 00000000000..7e223cdfad6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/Buildpack.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.LifecycleType; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are buildpacks + */ +public abstract class Buildpack extends Resource { + + /** + * Whether the buildpack is enabled + */ + @JsonProperty("enabled") + public abstract Boolean getEnabled(); + + /** + * The filename + */ + @JsonProperty("filename") + @Nullable + public abstract String getFilename(); + + /** + * Whether the buildpack is locked + */ + @JsonProperty("locked") + public abstract Boolean getLocked(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The position + */ + @JsonProperty("position") + public abstract Integer getPosition(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + public abstract String getStack(); + + /** + * The state + */ + @JsonProperty("state") + public abstract BuildpackState getState(); + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + @Nullable + public abstract LifecycleType getLifecycle(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/BuildpackState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/BuildpackState.java new file mode 100644 index 00000000000..32c50254993 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/BuildpackState.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of the {@link Buildpack} + */ +public enum BuildpackState { + + /** + * The running state + */ + AWAITING_UPLOAD("AWAITING_UPLOAD"), + + /** + * The running state + */ + READY("READY"); + + private final String value; + + BuildpackState(String value) { + this.value = value; + } + + @JsonCreator + public static BuildpackState from(String s) { + switch (s.toLowerCase()) { + case "awaiting_upload": + return AWAITING_UPLOAD; + case "ready": + return READY; + default: + throw new IllegalArgumentException(String.format("Unknown buildpack state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/BuildpacksV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/BuildpacksV3.java new file mode 100644 index 00000000000..ced3254ab77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/BuildpacksV3.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Buildpacks V3 Client API + */ +public interface BuildpacksV3 { + + /** + * Makes the Create the Buildpack request + * + * @param request the Create Buildpack request + * @return the response from the Create Buildpack request + */ + Mono create(CreateBuildpackRequest request); + + /** + * Makes the Delete the Buildpack request + * + * @param request the Delete Buildpack request + * @return the response from the Delete Buildpack request + */ + Mono delete(DeleteBuildpackRequest request); + + /** + * Makes the Retrieve a particular Buildpack request + * + * @param request the Get Buildpack request + * @return the response from the Get Buildpack request + */ + Mono get(GetBuildpackRequest request); + + /** + * Makes the List all Buildpacks request + * + * @param request the List all Buildpacks request + * @return the response from the List all Buildpacks request + */ + Mono list(ListBuildpacksRequest request); + + /** + * Makes the Update a Buildpack requests + * + * @param request the Update Buildpack request + * @return the response from the Update Buildpack request + */ + Mono update(UpdateBuildpackRequest request); + + /** + * Makes the Upload Buildpack request + * + * @param request the Upload Buildpack request + * @return the response from the Upload Buildpack request + */ + Mono upload(UploadBuildpackRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_BuildpackResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_BuildpackResource.java new file mode 100644 index 00000000000..4dd599d5c6e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_BuildpackResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for List Buildpacks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _BuildpackResource extends Buildpack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_CreateBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_CreateBuildpackRequest.java new file mode 100644 index 00000000000..358ba3ab7a5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_CreateBuildpackRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Create Buildpack + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateBuildpackRequest { + + /** + * Whether the buildpack is enabled + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * Whether the buildpack is locked + */ + @JsonProperty("locked") + @Nullable + abstract Boolean getLocked(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The position + */ + @JsonProperty("position") + @Nullable + abstract Integer getPosition(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + abstract String getStack(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_CreateBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_CreateBuildpackResponse.java new file mode 100644 index 00000000000..0ada2f43055 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_CreateBuildpackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Buildpack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateBuildpackResponse extends Buildpack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_DeleteBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_DeleteBuildpackRequest.java new file mode 100644 index 00000000000..667ddd15815 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_DeleteBuildpackRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Buildpack operation. + */ +@Value.Immutable +abstract class _DeleteBuildpackRequest { + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_DeleteBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_DeleteBuildpackResponse.java new file mode 100644 index 00000000000..f55ac5131d4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_DeleteBuildpackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v2.jobs.AbstractJobResource; +import org.immutables.value.Value; + +/** + * The response payload for the Delete Buildpack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteBuildpackResponse extends AbstractJobResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_GetBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_GetBuildpackRequest.java new file mode 100644 index 00000000000..b9475d52a75 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_GetBuildpackRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Buildpack operation + */ +@Value.Immutable +abstract class _GetBuildpackRequest { + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_GetBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_GetBuildpackResponse.java new file mode 100644 index 00000000000..5518166164e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_GetBuildpackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Buildpack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetBuildpackResponse extends Buildpack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_ListBuildpacksRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_ListBuildpacksRequest.java new file mode 100644 index 00000000000..d704ff24549 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_ListBuildpacksRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Buildpacks operation + */ +@Value.Immutable +abstract class _ListBuildpacksRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * The stacks + */ + @FilterParameter("stacks") + @Nullable + abstract List getStacks(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_ListBuildpacksResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_ListBuildpacksResponse.java new file mode 100644 index 00000000000..d0359b3b82d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_ListBuildpacksResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Buildpacks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListBuildpacksResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UpdateBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UpdateBuildpackRequest.java new file mode 100644 index 00000000000..1f3da6ad994 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UpdateBuildpackRequest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload to Update a Buildpack + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateBuildpackRequest { + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + + /** + * Whether the buildpack is enabled + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * Whether the buildpack is locked + */ + @JsonProperty("locked") + @Nullable + abstract Boolean getLocked(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The position + */ + @JsonProperty("position") + @Nullable + abstract Integer getPosition(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + abstract String getStack(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UpdateBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UpdateBuildpackResponse.java new file mode 100644 index 00000000000..3ec565ef82b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UpdateBuildpackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Update Buildpack request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateBuildpackResponse extends Buildpack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UploadBuildpackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UploadBuildpackRequest.java new file mode 100644 index 00000000000..fe0cf4a4435 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UploadBuildpackRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +import java.nio.file.Path; + +/** + * The request payload to Upload a Buildpack + */ +@Value.Immutable +abstract class _UploadBuildpackRequest { + + /** + * The bits + */ + @JsonIgnore + abstract Path getBits(); + + /** + * The buildpack id + */ + @JsonIgnore + abstract String getBuildpackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UploadBuildpackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UploadBuildpackResponse.java new file mode 100644 index 00000000000..f5a7567286d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/buildpacks/_UploadBuildpackResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the the Update Buildpack request. + */ +@JsonDeserialize +@Value.Immutable +abstract class _UploadBuildpackResponse extends Buildpack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java new file mode 100644 index 00000000000..7d0e8387c0b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Build.java @@ -0,0 +1,103 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are builds + */ +public abstract class Build extends Resource { + + /** + * The user that created the build + */ + @JsonProperty("created_by") + public abstract CreatedBy getCreatedBy(); + + /** + * A resulting droplet from the staging process + */ + @JsonProperty("droplet") + @Nullable + public abstract Droplet getDroplet(); + + /** + * Describes errors during the build process + */ + @JsonProperty("error") + @Nullable + public abstract String getError(); + + /** + * The package that is the input to the staging process + */ + @JsonProperty("package") + public abstract Relationship getInputPackage(); + + /** + * The lifecycle that was configured or discovered from the application + */ + @JsonProperty("lifecycle") + public abstract Lifecycle getLifecycle(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract BuildRelationships getRelationships(); + + /** + * State of the build + */ + @JsonProperty("state") + public abstract BuildState getState(); + + /** + * Memory used for the build (MB) + */ + @JsonProperty("staging_memory_in_mb") + @Nullable + public abstract Integer getStagingMemory(); + + /** + * Disk space used for the build (MB) + */ + @JsonProperty("staging_disk_in_mb") + @Nullable + public abstract Integer getStagingDisk(); + + /** + * Log rate limit in bytes per second allocated for staging of the build + */ + @JsonProperty("staging_log_rate_limit_bytes_per_second") + @Nullable + public abstract Integer getStagingLogRateLimitBytesPerSecond(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/BuildState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/BuildState.java new file mode 100644 index 00000000000..5f72b9684da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/BuildState.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of a {@link Build} + */ +public enum BuildState { + + /** + * The failed state + */ + FAILED("FAILED"), + + /** + * The staged state + */ + STAGED("STAGED"), + + /** + * The staging state + */ + STAGING("STAGING"); + + private final String value; + + BuildState(String value) { + this.value = value; + } + + @JsonCreator + public static BuildState from(String s) { + switch (s.toLowerCase()) { + case "failed": + return FAILED; + case "staged": + return STAGED; + case "staging": + return STAGING; + default: + throw new IllegalArgumentException(String.format("Unknown build state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Builds.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Builds.java new file mode 100644 index 00000000000..9a25139c6cb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/Builds.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Builds Client API + */ +public interface Builds { + + /** + * Makes the Create Build request + * + * @param request the Create Build request + * @return the response from the Create Build request + */ + Mono create(CreateBuildRequest request); + + /** + * Makes the Get Build request + * + * @param request the Get Build request + * @return the response from the Get Build request + */ + Mono get(GetBuildRequest request); + + /** + * Makes the List Builds request + * + * @param request the List Builds request + * @return the response from the List Builds request + */ + Mono list(ListBuildsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_BuildRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_BuildRelationships.java new file mode 100644 index 00000000000..f55683658e6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_BuildRelationships.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The Build relationships + */ +@JsonDeserialize +@Value.Immutable +abstract class _BuildRelationships { + + /** + * The application relationship + */ + @JsonProperty("app") + abstract ToOneRelationship getApplication(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_BuildResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_BuildResource.java new file mode 100644 index 00000000000..d61d1e938f3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_BuildResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Builds operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _BuildResource extends Build { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreateBuildRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreateBuildRequest.java new file mode 100644 index 00000000000..642b575a438 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreateBuildRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +/** + * The request payload for the Create Build operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateBuildRequest { + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + @Nullable + abstract Lifecycle getLifecycle(); + + /** + * The package + */ + @JsonProperty("package") + abstract Relationship getPackage(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreateBuildResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreateBuildResponse.java new file mode 100644 index 00000000000..24fb0a33941 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreateBuildResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Build operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateBuildResponse extends Build { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreatedBy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreatedBy.java new file mode 100644 index 00000000000..66fd9cf8a8a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_CreatedBy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Information about who created a build + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreatedBy { + + /** + * The email + */ + @JsonProperty("email") + abstract String getEmail(); + + /** + * The id + */ + @JsonProperty("guid") + abstract String getId(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_Droplet.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_Droplet.java new file mode 100644 index 00000000000..c3f806a9dff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_Droplet.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a droplet + */ +@JsonDeserialize +@Value.Immutable +abstract class _Droplet { + + /** + * The href + */ + @JsonProperty("href") + @Nullable + abstract String getHref(); + + /** + * The id + */ + @JsonProperty("guid") + abstract String getId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_GetBuildRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_GetBuildRequest.java new file mode 100644 index 00000000000..a8d1852a95d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_GetBuildRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Build operation + */ +@Value.Immutable +abstract class _GetBuildRequest { + + /** + * The build id + */ + @JsonIgnore + abstract String getBuildId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_GetBuildResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_GetBuildResponse.java new file mode 100644 index 00000000000..741ce670df2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_GetBuildResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Build operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetBuildResponse extends Build { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_ListBuildsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_ListBuildsRequest.java new file mode 100644 index 00000000000..dacbec223b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_ListBuildsRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Builds operation + */ +@Value.Immutable +abstract class _ListBuildsRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * The package ids + */ + @FilterParameter("package_guids") + abstract List getPackageIds(); + + /** + * The build states + */ + @FilterParameter("states") + abstract List getStates(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_ListBuildsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_ListBuildsResponse.java new file mode 100644 index 00000000000..18817347068 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/builds/_ListBuildsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Builds operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListBuildsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java new file mode 100644 index 00000000000..6829057fee6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/Deployment.java @@ -0,0 +1,109 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.ToOneRelationship; + +/** + * Base class for responses that are deployments + */ +public abstract class Deployment extends Resource { + + /** + * The application the deployment is updating + */ + @JsonProperty("app") + @Nullable + public abstract ToOneRelationship getApplication(); + + /** + * The droplet the deployment is transitioning the app to + */ + @JsonProperty("droplet") + @Nullable + public abstract Relationship getDroplet(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The revision the deployment is transitioning the app to + */ + @JsonProperty("new_processes") + @Nullable + public abstract List getNewProcesses(); + + /** + * The app’s current droplet before the deployment was created + */ + @JsonProperty("previous_droplet") + @Nullable + public abstract Relationship getPreviousDroplet(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract DeploymentRelationships getRelationships(); + + /** + * The revision the deployment is transitioning the app to + */ + @JsonProperty("revision") + @Nullable + public abstract Revision getRevision(); + + /** + * The state of the deployment + */ + @Deprecated + @JsonProperty("state") + @Nullable + public abstract DeploymentState getState(); + + /** + * The status of the deployment + */ + @JsonProperty("status") + @Nullable + public abstract Status getStatus(); + + /** + * The strategy of the deployment + */ + @JsonProperty("strategy") + @Nullable + public abstract DeploymentStrategy getStrategy(); + + /** + * The options for the deployment + */ + @JsonProperty("options") + @Nullable + public abstract Options getOptions(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentState.java new file mode 100644 index 00000000000..3da1a339517 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentState.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of a {@link Deployment} + */ +public enum DeploymentState { + + /** + * The deploying state + */ + DEPLOYING("DEPLOYING"), + + /** + * The deployed state + */ + DEPLOYED("DEPLOYED"), + + /** + * The canceling state + */ + CANCELING("CANCELING"), + + /** + * The canceled state + */ + CANCELED("CANCELED"); + + private final String value; + + DeploymentState(String value) { + this.value = value; + } + + @JsonCreator + public static DeploymentState from(String s) { + switch (s.toLowerCase()) { + case "deploying": + return DEPLOYING; + case "deployed": + return DEPLOYED; + case "canceling": + return CANCELING; + case "canceled": + return CANCELED; + default: + throw new IllegalArgumentException( + String.format("Unknown deployment state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStatusReason.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStatusReason.java new file mode 100644 index 00000000000..6ab56a01776 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStatusReason.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The status reason of a {@link Deployment} + */ +public enum DeploymentStatusReason { + + /** + * The canceled status reason + */ + CANCELED("CANCELED"), + + /** + * The canceling status reason + */ + CANCELING("CANCELING"), + + /** + * The degenerate status reason + */ + DEGENERATE("DEGENERATE"), + + /** + * The deployed status reason + */ + DEPLOYED("DEPLOYED"), + + /** + * The deploying status reason + */ + DEPLOYING("DEPLOYING"), + + /** + * The superseded status reason + */ + SUPERSEDED("SUPERSEDED"); + + private final String value; + + DeploymentStatusReason(String value) { + this.value = value; + } + + @JsonCreator + public static DeploymentStatusReason from(String s) { + switch (s.toLowerCase()) { + case "canceled": + return CANCELED; + case "canceling": + return CANCELING; + case "degenerate": + return DEGENERATE; + case "deployed": + return DEPLOYED; + case "deploying": + return DEPLOYING; + case "superseded": + return SUPERSEDED; + default: + throw new IllegalArgumentException( + String.format("Unknown deployment state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStatusValue.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStatusValue.java new file mode 100644 index 00000000000..b8e1fe1eb44 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStatusValue.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The status value of a {@link Deployment} + */ +public enum DeploymentStatusValue { + + /** + * The active status value + */ + ACTIVE("ACTIVE"), + + /** + * The canceling status value + */ + CANCELING("CANCELING"), + + /** + * The deploying status value + */ + DEPLOYING("DEPLOYING"), + + /** + * The finalized status value + */ + FINALIZED("FINALIZED"); + + private final String value; + + DeploymentStatusValue(String value) { + this.value = value; + } + + @JsonCreator + public static DeploymentStatusValue from(String s) { + switch (s.toLowerCase()) { + case "active": + return ACTIVE; + case "deploying": + return DEPLOYING; + case "canceling": + return CANCELING; + case "finalized": + return FINALIZED; + default: + throw new IllegalArgumentException( + String.format("Unknown deployment status value: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStrategy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStrategy.java new file mode 100644 index 00000000000..677efeaa508 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentStrategy.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The strategy of the {@link Deployment} + */ +public enum DeploymentStrategy { + + /** + * The rolling strategy + */ + ROLLING("rolling"); + + private final String value; + + DeploymentStrategy(String value) { + this.value = value; + } + + @JsonCreator + public static DeploymentStrategy from(String s) { + if ("rolling".equals(s.toLowerCase())) { + return ROLLING; + } + throw new IllegalArgumentException(String.format("Unknown deployment strategy: %s", s)); + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentsV3.java new file mode 100644 index 00000000000..dd974101607 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/DeploymentsV3.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Deployments V3 Client API + */ +public interface DeploymentsV3 { + + /** + * Makes the Cancel a deployment request + * + * @param request the Cancel a deployment request + * @return the response from the Cancel a deployment request + */ + Mono cancel(CancelDeploymentRequest request); + + /** + * Makes the Get Deployment request + * + * @param request the Create Deployment request + * @return the response from the Create Deployment request + */ + Mono create(CreateDeploymentRequest request); + + /** + * Makes the Get Deployment request + * + * @param request the Get Deployment request + * @return the response from the Get Deployment request + */ + Mono get(GetDeploymentRequest request); + + /** + * Makes the List Deployments request + * + * @param request the List Deployments request + * @return the response from the List Deployments request + */ + Mono list(ListDeploymentsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CancelDeploymentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CancelDeploymentRequest.java new file mode 100644 index 00000000000..fbafe8629df --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CancelDeploymentRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Cancel Deployment operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CancelDeploymentRequest { + + /** + * The deployment id + */ + @JsonIgnore + abstract String getDeploymentId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CancelDeploymentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CancelDeploymentResponse.java new file mode 100644 index 00000000000..dcd7d3a69b1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CancelDeploymentResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Cancel Deployment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CancelDeploymentResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CreateDeploymentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CreateDeploymentRequest.java new file mode 100644 index 00000000000..9b253d8d4df --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CreateDeploymentRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +/** + * The request payload for the Create Deployment operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateDeploymentRequest { + + /** + * The droplet + */ + @JsonProperty("droplet") + @Nullable + abstract Relationship getDroplet(); + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract DeploymentRelationships getRelationships(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CreateDeploymentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CreateDeploymentResponse.java new file mode 100644 index 00000000000..2454977e691 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_CreateDeploymentResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Deployment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateDeploymentResponse extends Deployment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_DeploymentRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_DeploymentRelationships.java new file mode 100644 index 00000000000..a03c45b39b6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_DeploymentRelationships.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Create Deployment request + */ +@Value.Immutable +@JsonDeserialize +abstract class _DeploymentRelationships { + + /** + * The app relationship + */ + @JsonProperty("app") + @Nullable + abstract ToOneRelationship getApp(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_DeploymentResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_DeploymentResource.java new file mode 100644 index 00000000000..b421d46065b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_DeploymentResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Deployments operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeploymentResource extends Deployment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_GetDeploymentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_GetDeploymentRequest.java new file mode 100644 index 00000000000..7491abcfe12 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_GetDeploymentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Deployment operation + */ +@Value.Immutable +abstract class _GetDeploymentRequest { + + /** + * The deployment id + */ + @JsonIgnore + abstract String getDeploymentId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_GetDeploymentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_GetDeploymentResponse.java new file mode 100644 index 00000000000..95c68053e62 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_GetDeploymentResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Deployment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetDeploymentResponse extends Deployment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_ListDeploymentsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_ListDeploymentsRequest.java new file mode 100644 index 00000000000..60e4655e807 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_ListDeploymentsRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Deployments operation. + */ +@SuppressWarnings("deprecation") +@Value.Immutable +abstract class _ListDeploymentsRequest extends PaginatedRequest { + + /** + * List of app guids to filter by + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * List of states to filter by + */ + @FilterParameter("states") + abstract List getStates(); + + /** + * List of status reasons to filter by + */ + @FilterParameter("status_reasons") + abstract List getStatusReasons(); + + /** + * List of status values to filter by + */ + @FilterParameter("status_values") + abstract List getStatusValues(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_ListDeploymentsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_ListDeploymentsResponse.java new file mode 100644 index 00000000000..e894094770e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_ListDeploymentsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Deployments operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListDeploymentsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java new file mode 100644 index 00000000000..ef6e199d650 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Options.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Options { + + /** + * The The maximum number of new instances to deploy simultaneously + */ + @JsonProperty("max_in_flight") + abstract Integer getMaxInFlight(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Process.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Process.java new file mode 100644 index 00000000000..a1bcc175cad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Process.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Process { + + /** + * The process' id + */ + @JsonProperty("guid") + abstract String getId(); + + /** + * The process' type + */ + @JsonProperty("type") + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Revision.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Revision.java new file mode 100644 index 00000000000..12b0d9bf509 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Revision.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Revision { + + /** + * The revision's id + */ + @JsonProperty("guid") + abstract String getId(); + + /** + * The revision's version + */ + @JsonProperty("version") + abstract Integer getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Status.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Status.java new file mode 100644 index 00000000000..ea826d70682 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/deployments/_Status.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The status payload for the Deployment entity + */ +@JsonDeserialize +@Value.Immutable +abstract class _Status { + + /** + * The details + */ + @AllowNulls + @JsonProperty("details") + abstract Map getDetails(); + + /** + * The reason + */ + @JsonProperty("reason") + @Nullable + abstract DeploymentStatusReason getReason(); + + /** + * The value + */ + @JsonProperty("value") + abstract DeploymentStatusValue getValue(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/Domain.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/Domain.java new file mode 100644 index 00000000000..2d1a03bbc70 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/Domain.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.routes.Protocol; + +public abstract class Domain extends Resource { + + /** + * Metadata applied to the domain. + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name of the domain. + * Must be between 3 ~ 253 characters and follow RFC 1035. + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * Relationships of the domain. + */ + @JsonProperty("relationships") + public abstract DomainRelationships getRelationships(); + + /** + * Router group information + */ + @AllowNulls + @JsonProperty("router_group") + @Nullable + public abstract RouterGroup getRouterGroup(); + + /** + * Available protocols for routes using the domain + */ + @JsonProperty("supported_protocols") + @Nullable + public abstract List getSupportedProtocols(); + + /** + * Whether the domain is used for internal (container-to-container) traffic. + */ + @JsonProperty("internal") + public abstract boolean isInternal(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/DomainsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/DomainsV3.java new file mode 100644 index 00000000000..5af01d954e0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/DomainsV3.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Domains V3 Client API + */ +public interface DomainsV3 { + + /** + * Makes the Check Reserved Routes request + * + * @param request the Check Reserved Routes request + * @return the response from the Check Reserved Routes request + */ + Mono checkReservedRoutes(CheckReservedRoutesRequest request); + + /** + * Makes the Create a domain request + * + * @param request the Create a Domain request + * @return the response from the Create a Domain request + */ + Mono create(CreateDomainRequest request); + + /** + * Makes Delete a Particular Domain request + * + * @param request the Delete a Particular Domain request + * @return the response from the Delete a Particular Domain request + */ + Mono delete(DeleteDomainRequest request); + + /** + * Makes Get Domain request + * + * @param request The Get Domain request + * @return the response from the Get Domain request + */ + Mono get(GetDomainRequest request); + + /** + * Makes List all Domains request + * + * @param request the List all Domains request + * @return the response from the List all Domains request + */ + Mono list(ListDomainsRequest request); + + /** + * Makes Share a Domain request + * + * @param request The Share a Domain request + * @return the response from the Share a Domain request + */ + Mono share(ShareDomainRequest request); + + /** + * Makes Unshare a Domain request + * + * @param request The Unshare a Domain request + * @return the response from the Unshare a Domain request + */ + Mono unshare(UnshareDomainRequest request); + + /** + * Makes the Create a domain request + * + * @param request the Update a Domain request + * @return the response from the Update a Domain request + */ + Mono update(UpdateDomainRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CheckReservedRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CheckReservedRoutesRequest.java new file mode 100644 index 00000000000..d7f49e132c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CheckReservedRoutesRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Check Reserved Routes operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CheckReservedRoutesRequest { + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + + /** + * The hostname filter + */ + @Nullable + @QueryParameter("host") + abstract String getHost(); + + /** + * The path filter + */ + @Nullable + @QueryParameter("path") + abstract String getPath(); + + /** + * The port filter + */ + @Nullable + @QueryParameter("port") + abstract Integer getPort(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CheckReservedRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CheckReservedRoutesResponse.java new file mode 100644 index 00000000000..6e537d1d42f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CheckReservedRoutesResponse.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Check Reserved Routes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CheckReservedRoutesResponse { + + /** + * The matching route + */ + @JsonProperty("matching_route") + abstract Boolean getMatchingRoute(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CreateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CreateDomainRequest.java new file mode 100644 index 00000000000..d452ebdc2f2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CreateDomainRequest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Create a Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateDomainRequest { + + /** + * Whether this is an internal domain + */ + @JsonProperty("internal") + @Nullable + abstract Boolean getInternal(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + abstract DomainRelationships getRelationships(); + + /** + * The router group + */ + @JsonProperty("router_group") + @Nullable + abstract RouterGroup getRouterGroup(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CreateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CreateDomainResponse.java new file mode 100644 index 00000000000..47c7a2f96b0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_CreateDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create a Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateDomainResponse extends Domain { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DeleteDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DeleteDomainRequest.java new file mode 100644 index 00000000000..a09531a64ad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DeleteDomainRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Particular Domain operation + */ +@Value.Immutable +abstract class _DeleteDomainRequest { + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DomainRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DomainRelationships.java new file mode 100644 index 00000000000..2db7e590e6e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DomainRelationships.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _DomainRelationships { + + /** + * The organization the domain is scoped to. If set, the domain will only be available in that organization. + * Otherwise, the domain will be globally available. + */ + @JsonProperty("organization") + abstract ToOneRelationship getOrganization(); + + /** + * Organizations the domain is shared with. If set, the domain will be available in these organizations in addition + * to the organization the domain is scoped to. + */ + @JsonProperty("shared_organizations") + @Nullable + abstract ToManyRelationship getSharedOrganizations(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DomainResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DomainResource.java new file mode 100644 index 00000000000..a1d308fa39a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_DomainResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Domain resource + */ +@JsonDeserialize +@Value.Immutable +abstract class _DomainResource extends Domain { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_GetDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_GetDomainRequest.java new file mode 100644 index 00000000000..65a9cfa6409 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_GetDomainRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Get Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _GetDomainRequest { + + /** + * The domain id + */ + abstract String getDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_GetDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_GetDomainResponse.java new file mode 100644 index 00000000000..4f0ac883f52 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_GetDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetDomainResponse extends Domain { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ListDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ListDomainsRequest.java new file mode 100644 index 00000000000..edc47d649e1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ListDomainsRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Domains operation + */ +@Value.Immutable +abstract class _ListDomainsRequest extends PaginatedRequest { + + /** + * The ids + */ + @FilterParameter("guids") + @Nullable + abstract List getDomainIds(); + + /** + * The metadata query + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The names + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * The owning organization ids + */ + @FilterParameter("organization_guids") + @Nullable + abstract List getOwningOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ListDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ListDomainsResponse.java new file mode 100644 index 00000000000..23f0f82fcc1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ListDomainsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Domains operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_RouterGroup.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_RouterGroup.java new file mode 100644 index 00000000000..da6489b954a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_RouterGroup.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +@JsonDeserialize +@Value.Immutable +public abstract class _RouterGroup { + + /** + * The id of the desired router group to route tcp traffic through + */ + @JsonProperty("guid") + public abstract String getId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ShareDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ShareDomainRequest.java new file mode 100644 index 00000000000..8291a9a6a9a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ShareDomainRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Share Domain operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _ShareDomainRequest { + + /** + * The organizations the domain is shared to + */ + @JsonProperty("data") + abstract List getData(); + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ShareDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ShareDomainResponse.java new file mode 100644 index 00000000000..11767099449 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_ShareDomainResponse.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Share Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ShareDomainResponse { + + /** + * The data + */ + @JsonProperty("data") + @Nullable + abstract List getData(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UnshareDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UnshareDomainRequest.java new file mode 100644 index 00000000000..ff30c1bbc28 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UnshareDomainRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Unshare Domain operation. + */ +@Value.Immutable +abstract class _UnshareDomainRequest { + + /** + * The domain id + */ + @JsonIgnore + abstract String getDomainId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UpdateDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UpdateDomainRequest.java new file mode 100644 index 00000000000..d55aa96cf67 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UpdateDomainRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update a Domain operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateDomainRequest { + + /** + * The id + */ + @JsonIgnore + abstract String getDomainId(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UpdateDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UpdateDomainResponse.java new file mode 100644 index 00000000000..563ed77c7b2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/domains/_UpdateDomainResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a Domain operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateDomainResponse extends Domain { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/Droplet.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/Droplet.java new file mode 100644 index 00000000000..77284087561 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/Droplet.java @@ -0,0 +1,106 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Checksum; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are droplets + */ +public abstract class Droplet extends Resource { + + /** + * The buildpacks + */ + @JsonProperty("buildpacks") + @Nullable + public abstract List getBuildpacks(); + + /** + * The checksum + */ + @JsonProperty("checksum") + @Nullable + public abstract Checksum getChecksum(); + + /** + * The error + */ + @JsonProperty("error") + @Nullable + public abstract String getError(); + + /** + * Serialized JSON data resulting from staging for use when executing a droplet + */ + @JsonProperty("execution_metadata") + public abstract String getExecutionMetadata(); + + /** + * The docker image + */ + @JsonProperty("image") + @Nullable + public abstract String getImage(); + + /** + * The lifecycle + */ + @JsonProperty("lifecycle") + public abstract Lifecycle getLifecycle(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The process types and associated start commands + */ + @JsonProperty("process_types") + @Nullable + public abstract Map getProcessTypes(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract DropletRelationships getRelationships(); + + /** + * The stack + */ + @JsonProperty("stack") + @Nullable + public abstract String getStack(); + + /** + * The state + */ + @JsonProperty("state") + public abstract DropletState getState(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/DropletState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/DropletState.java new file mode 100644 index 00000000000..b6f1fd33f51 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/DropletState.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.cloudfoundry.client.v3.packages.Package; + +/** + * The state of a {@link Package} + */ +public enum DropletState { + + /** + * The copying state + */ + COPYING("COPYING"), + + /** + * The expired state + */ + EXPIRED("EXPIRED"), + + /** + * The failed state + */ + FAILED("FAILED"), + + /** + * The staged state + */ + STAGED("STAGED"), + + /** + * The awaiting upload state + */ + AWAITING_UPLOAD("AWAITING_UPLOAD"), + + /** + * The processing upload state + */ + PROCESSING_UPLOAD("PROCESSING_UPLOAD"); + + private final String value; + + DropletState(String value) { + this.value = value; + } + + @JsonCreator + public static DropletState from(String s) { + switch (s.toLowerCase()) { + case "copying": + return COPYING; + case "expired": + return EXPIRED; + case "failed": + return FAILED; + case "staged": + return STAGED; + case "awaiting_upload": + return AWAITING_UPLOAD; + case "processing_upload": + return PROCESSING_UPLOAD; + default: + throw new IllegalArgumentException(String.format("Unknown droplet state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/Droplets.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/Droplets.java new file mode 100644 index 00000000000..7c78e0c9ef1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/Droplets.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Droplets Client API + */ +public interface Droplets { + + /** + * Makes the Copy Droplet request + * + * @param request the Copy Droplet request + */ + Mono copy(CopyDropletRequest request); + + /** + * Makes the Delete Droplet request + * + * @param request the Delete Droplet request + * @return the response from the Delete Droplet request + */ + Mono delete(DeleteDropletRequest request); + + /** + * Makes the Get Droplet request + * + * @param request the Get Droplet request + * @return the response from the Get Droplet request + */ + Mono get(GetDropletRequest request); + + /** + * Makes the List Droplets request + * + * @param request the List Droplets request + * @return the response from the List Droplets request + */ + Mono list(ListDropletsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_Buildpack.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_Buildpack.java new file mode 100644 index 00000000000..0f55a24e61a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_Buildpack.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Buildpack { + + /** + * The name reported by buildpack + */ + @JsonProperty("buildpack_name") + @Nullable + abstract String getBuildpackName(); + + /** + * The output during buildpack detect process + */ + @JsonProperty("detect_output") + @Nullable + abstract String getDetectOutput(); + + /** + * The system buildpack name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The version of the buildpack + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_CopyDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_CopyDropletRequest.java new file mode 100644 index 00000000000..a8cd7e61f31 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_CopyDropletRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Copy Droplet operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CopyDropletRequest { + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract DropletRelationships getRelationships(); + + /** + * The source droplet id + */ + @QueryParameter("source_guid") + abstract String getSourceDropletId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_CopyDropletResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_CopyDropletResponse.java new file mode 100644 index 00000000000..522ff2858ae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_CopyDropletResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Copy Droplet operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CopyDropletResponse extends Droplet { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DeleteDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DeleteDropletRequest.java new file mode 100644 index 00000000000..7b6a9346107 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DeleteDropletRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Droplet operation + */ +@Value.Immutable +abstract class _DeleteDropletRequest { + + /** + * The droplet id + */ + @JsonIgnore + abstract String getDropletId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DropletRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DropletRelationships.java new file mode 100644 index 00000000000..02783b07354 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DropletRelationships.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Copy Droplet request + */ +@JsonDeserialize +@Value.Immutable +abstract class _DropletRelationships { + + /** + * The space relationship + */ + @JsonProperty("app") + abstract ToOneRelationship getApplication(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DropletResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DropletResource.java new file mode 100644 index 00000000000..8b7387892c6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_DropletResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List droplets operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _DropletResource extends Droplet { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_GetDropletRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_GetDropletRequest.java new file mode 100644 index 00000000000..7edebe2b685 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_GetDropletRequest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Droplet operation + */ +@Value.Immutable +abstract class _GetDropletRequest { + + /** + * The droplet id + */ + @JsonIgnore + abstract String getDropletId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_GetDropletResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_GetDropletResponse.java new file mode 100644 index 00000000000..d359ad6988d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_GetDropletResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Droplet operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetDropletResponse extends Droplet { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_ListDropletsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_ListDropletsRequest.java new file mode 100644 index 00000000000..4956f3e4da4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_ListDropletsRequest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Applications operation + */ +@Value.Immutable +abstract class _ListDropletsRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * The droplet ids + */ + @FilterParameter("guids") + abstract List getDropletIds(); + + /** + * The organization ids + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + + /** + * The states + */ + @FilterParameter("states") + abstract List getStates(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_ListDropletsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_ListDropletsResponse.java new file mode 100644 index 00000000000..2573df46233 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/droplets/_ListDropletsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Applications operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListDropletsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/IsolationSegment.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/IsolationSegment.java new file mode 100644 index 00000000000..dc139d21083 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/IsolationSegment.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are isolation segments + */ +public abstract class IsolationSegment extends Resource { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/IsolationSegments.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/IsolationSegments.java new file mode 100644 index 00000000000..5c8b41ee837 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/IsolationSegments.java @@ -0,0 +1,112 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Isolation Zones Client API + */ +public interface IsolationSegments { + + /** + * Makes the + * Add an Isolation Segment Organization Entitlement request + * + * @param request the Add an Isolation Segment Organization Entitlement request + * @return the response from the Add an Isolation Segment Organization Entitlement request + */ + Mono addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest request); + + /** + * Makes the Create an Isolation Segment request + * + * @param request the Create Isolation Segment request + * @return the response from the Create Isolation Segment request + */ + Mono create(CreateIsolationSegmentRequest request); + + /** + * Makes the Delete an Isolation Segment request + * + * @param request the Delete Isolation Segment request + * @return the response from the Delete Isolation Segment request + */ + Mono delete(DeleteIsolationSegmentRequest request); + + /** + * Makes the Get an Isolation Segment request + * + * @param request the Get Isolation Segment request + * @return the response from the Get Isolation Segment request + */ + Mono get(GetIsolationSegmentRequest request); + + /** + * Makes the List Isolation Segments request + * + * @param request the List Isolation Segments request + * @return the response from the List Isolation Segments request + */ + Mono list(ListIsolationSegmentsRequest request); + + /** + * Makes the List Organizations for Isolation Segment request + * + * @param request the List Organizations for Isolation Segment request + * @return the response from the List Organizations for Isolation Segment request + */ + Mono listEntitledOrganizations( + ListIsolationSegmentEntitledOrganizationsRequest request); + + /** + * Makes the List Organizations Relationship request + * + * @param request the List Organizations Relationship request + * @return the response from the List Organizations Relationship request + */ + Mono listOrganizationsRelationship( + ListIsolationSegmentOrganizationsRelationshipRequest request); + + /** + * Makes the List Spaces Relationship request + * + * @param request the List Spaces Relationship request + * @return the response from the List Spaces Relationship request + */ + Mono listSpacesRelationship( + ListIsolationSegmentSpacesRelationshipRequest request); + + /** + * Makes the + * Remove an Isolation Segment Organization Entitlement request + * + * @param request the Remove an Isolation Segment Organization Entitlement request + * @return the response from the Remove an Isolation Segment Organization Entitlement request + */ + Mono removeOrganizationEntitlement( + RemoveIsolationSegmentOrganizationEntitlementRequest request); + + /** + * Makes the Update an Isolation Segment request + * + * @param request the Update Isolation Segment request + * @return the response from the Update Isolation Segment request + */ + Mono update(UpdateIsolationSegmentRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_AddIsolationSegmentOrganizationEntitlementRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_AddIsolationSegmentOrganizationEntitlementRequest.java new file mode 100644 index 00000000000..40dc3e8b333 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_AddIsolationSegmentOrganizationEntitlementRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Entitle one or more Organizations for an Isolation Segment operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AddIsolationSegmentOrganizationEntitlementRequest { + + /** + * The organizations to add entitlement to + */ + @JsonProperty("data") + abstract List getData(); + + /** + * The isolation segment id + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_AddIsolationSegmentOrganizationEntitlementResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_AddIsolationSegmentOrganizationEntitlementResponse.java new file mode 100644 index 00000000000..c9176924300 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_AddIsolationSegmentOrganizationEntitlementResponse.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The response payload for the Entitle one or more Organizations for an Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AddIsolationSegmentOrganizationEntitlementResponse { + + /** + * The entitled organizations + */ + @JsonProperty("data") + @Nullable + abstract List getData(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + @Nullable + abstract Map getLinks(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_CreateIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_CreateIsolationSegmentRequest.java new file mode 100644 index 00000000000..352178fc5d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_CreateIsolationSegmentRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Create Isolation Segment operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateIsolationSegmentRequest { + + /** + * The name of the isolation segment + */ + @JsonProperty("name") + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_CreateIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_CreateIsolationSegmentResponse.java new file mode 100644 index 00000000000..40ab10bc291 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_CreateIsolationSegmentResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateIsolationSegmentResponse extends IsolationSegment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_DeleteIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_DeleteIsolationSegmentRequest.java new file mode 100644 index 00000000000..27888319513 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_DeleteIsolationSegmentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Isolation Segment operation. + */ +@Value.Immutable +abstract class _DeleteIsolationSegmentRequest { + + /** + * The isolation segment id + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_GetIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_GetIsolationSegmentRequest.java new file mode 100644 index 00000000000..d3d97df76d0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_GetIsolationSegmentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Isolation Segment operation. + */ +@Value.Immutable +abstract class _GetIsolationSegmentRequest { + + /** + * The id of the isolation segment + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_GetIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_GetIsolationSegmentResponse.java new file mode 100644 index 00000000000..c8b4e53a707 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_GetIsolationSegmentResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetIsolationSegmentResponse extends IsolationSegment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_IsolationSegmentResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_IsolationSegmentResource.java new file mode 100644 index 00000000000..327c331f99c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_IsolationSegmentResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _IsolationSegmentResource extends IsolationSegment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentEntitledOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentEntitledOrganizationsRequest.java new file mode 100644 index 00000000000..56131ee21b1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentEntitledOrganizationsRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Entitled Organizations operation. + */ +@Value.Immutable +abstract class _ListIsolationSegmentEntitledOrganizationsRequest extends PaginatedRequest { + + /** + * The isolation segment id + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentEntitledOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentEntitledOrganizationsResponse.java new file mode 100644 index 00000000000..38cd2ed0972 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentEntitledOrganizationsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Entitled Organizations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListIsolationSegmentEntitledOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentOrganizationsRelationshipRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentOrganizationsRelationshipRequest.java new file mode 100644 index 00000000000..83d9b9838e3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentOrganizationsRelationshipRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the List Organizations Relationship operation. + */ +@Value.Immutable +abstract class _ListIsolationSegmentOrganizationsRelationshipRequest { + + /** + * The isolation segment id + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentOrganizationsRelationshipResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentOrganizationsRelationshipResponse.java new file mode 100644 index 00000000000..9d5606ed655 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentOrganizationsRelationshipResponse.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The response payload for the List Organizations Relationship operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListIsolationSegmentOrganizationsRelationshipResponse { + + /** + * The entitled organizations + */ + @JsonProperty("data") + @Nullable + abstract List getData(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + @Nullable + abstract Map getLinks(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentSpacesRelationshipRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentSpacesRelationshipRequest.java new file mode 100644 index 00000000000..61e4c13902d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentSpacesRelationshipRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the List Spaces Relationship operation. + */ +@Value.Immutable +abstract class _ListIsolationSegmentSpacesRelationshipRequest { + + /** + * The isolation segment id + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentSpacesRelationshipResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentSpacesRelationshipResponse.java new file mode 100644 index 00000000000..425df260378 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentSpacesRelationshipResponse.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The response payload for the List Spaces Relationship operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListIsolationSegmentSpacesRelationshipResponse { + + /** + * The assigned spaces + */ + @JsonProperty("data") + @Nullable + abstract List getData(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + @Nullable + abstract Map getLinks(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentsRequest.java new file mode 100644 index 00000000000..06932b8ecb5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentsRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Isolation Segments operation. + */ +@Value.Immutable +abstract class _ListIsolationSegmentsRequest extends PaginatedRequest { + + /** + * The ids + */ + @FilterParameter("guids") + abstract List getIsolationSegmentIds(); + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentsResponse.java new file mode 100644 index 00000000000..60a626b1c28 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_ListIsolationSegmentsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Isolation Segments operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListIsolationSegmentsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_RemoveIsolationSegmentOrganizationEntitlementRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_RemoveIsolationSegmentOrganizationEntitlementRequest.java new file mode 100644 index 00000000000..c38865de490 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_RemoveIsolationSegmentOrganizationEntitlementRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Revoke Entitlement to Isolation Segment for an Organization operation + */ +@Value.Immutable +abstract class _RemoveIsolationSegmentOrganizationEntitlementRequest { + + /** + * The isolation segment id + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_UpdateIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_UpdateIsolationSegmentRequest.java new file mode 100644 index 00000000000..5c98562a570 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_UpdateIsolationSegmentRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Update Isolation Segment operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateIsolationSegmentRequest { + + /** + * The id of the isolation segment + */ + @JsonIgnore + abstract String getIsolationSegmentId(); + + /** + * The name of the isolation segment + */ + @JsonProperty("name") + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_UpdateIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_UpdateIsolationSegmentResponse.java new file mode 100644 index 00000000000..bac7de1e0fb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/isolationsegments/_UpdateIsolationSegmentResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateIsolationSegmentResponse extends IsolationSegment { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/Job.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/Job.java new file mode 100644 index 00000000000..659d31ef0b1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/Job.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.jobs; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are jobs + */ +public abstract class Job extends Resource { + + /** + * Collection of errors that occurred while processing the job. + */ + @JsonProperty("errors") + public abstract List getErrors(); + + /** + * Current desired operation of the job + */ + @JsonProperty("operation") + public abstract String getOperation(); + + /** + * State of the job + */ + @JsonProperty("state") + public abstract JobState getState(); + + /** + * Collection of warnings that occurred while processing the job. + */ + @JsonProperty("warnings") + public abstract List getWarnings(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/JobState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/JobState.java new file mode 100644 index 00000000000..e946b58a2b9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/JobState.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.jobs; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of a {@link Job} + */ +public enum JobState { + + /** + * The complete state + */ + COMPLETE("COMPLETE"), + + /** + * The failed state + */ + FAILED("FAILED"), + + /** + * The polling state + */ + POLLING("POLLING"), + + /** + * The processing state + */ + PROCESSING("PROCESSING"); + + private final String value; + + JobState(String value) { + this.value = value; + } + + @JsonCreator + public static JobState from(String s) { + switch (s.toLowerCase()) { + case "complete": + return COMPLETE; + case "failed": + return FAILED; + case "polling": + return POLLING; + case "processing": + return PROCESSING; + default: + throw new IllegalArgumentException(String.format("Unknown job state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/JobsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/JobsV3.java new file mode 100644 index 00000000000..e572ee8e071 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/JobsV3.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.jobs; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Jobs Client API + */ +public interface JobsV3 { + + /** + * Makes the Get Job request + * + * @param request the Get Job request + * @return the response from the Get Job request + */ + Mono get(GetJobRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_GetJobRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_GetJobRequest.java new file mode 100644 index 00000000000..06465b2529d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_GetJobRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.jobs; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Job operation + */ +@Value.Immutable +abstract class _GetJobRequest { + + /** + * The job id + */ + @JsonIgnore + abstract String getJobId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_GetJobResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_GetJobResponse.java new file mode 100644 index 00000000000..515bf4ea004 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_GetJobResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.jobs; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Job operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetJobResponse extends Job { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_Warning.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_Warning.java new file mode 100644 index 00000000000..edce3b7efd6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/jobs/_Warning.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.jobs; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The warning object + */ +@JsonDeserialize +@Value.Immutable +abstract class _Warning { + + /** + * Detailed description of the warning + */ + @JsonProperty("detail") + abstract String getDetail(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/Organization.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/Organization.java new file mode 100644 index 00000000000..3b2abf700bc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/Organization.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are organizations + */ +public abstract class Organization extends Resource { + + /** + * The metadata + */ + @JsonProperty("metadata") + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract OrganizationRelationships getRelationships(); + + /** + * The status + */ + @JsonProperty("status") + @Nullable + public abstract OrganizationStatus getStatus(); + + /** + * Whether the organization is suspended + */ + @JsonProperty("suspended") + @Nullable + public abstract Boolean getSuspended(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/OrganizationStatus.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/OrganizationStatus.java new file mode 100644 index 00000000000..52fd95d8e7f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/OrganizationStatus.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The status of an {@link Organization} + */ +public enum OrganizationStatus { + + /** + * The active state + */ + ACTIVE("ACTIVE"), + + /** + * The suspended state + */ + SUSPENDED("SUSPENDED"); + + private final String value; + + OrganizationStatus(String value) { + this.value = value; + } + + @JsonCreator + public static OrganizationStatus from(String s) { + switch (s.toLowerCase()) { + case "active": + return ACTIVE; + case "suspended": + return SUSPENDED; + default: + throw new IllegalArgumentException( + String.format("Unknown organization status: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/OrganizationsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/OrganizationsV3.java new file mode 100644 index 00000000000..46f1ffa8fbb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/OrganizationsV3.java @@ -0,0 +1,109 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Organizations V3 Client API + */ +public interface OrganizationsV3 { + + /** + * Makes the Assign Default Isolation Segment request + * + * @param request the Assign Default Isolation Segment request + * @return the response from the Assign Default Isolation Segment request + */ + Mono assignDefaultIsolationSegment( + AssignOrganizationDefaultIsolationSegmentRequest request); + + /** + * Makes the Create Organization request + * + * @param request the Create Organization request + * @return the response from the Create Organization request + */ + Mono create(CreateOrganizationRequest request); + + /** + * Makes the Delete Organization request + * + * @param request the Delete Organization request + * @return the response from the Delete Organization request + */ + Mono delete(DeleteOrganizationRequest request); + + /** + * Makes the Get Organization request + * + * @param request the Get Organization request + * @return the response from the Get Organization request + */ + Mono get(GetOrganizationRequest request); + + /** + * Makes the Get Default Domain for an Organization request + * + * @param request the Get Default Domain for an Organization request + * @return the response from the Get Default Domain for an Organization request + */ + Mono getDefaultDomain( + GetOrganizationDefaultDomainRequest request); + + /** + * Makes the Get Default Isolation Segment request + * + * @param request the Get Default Isolation Segment request + * @return the response from the Get Default Isolation Segment request + */ + Mono getDefaultIsolationSegment( + GetOrganizationDefaultIsolationSegmentRequest request); + + /** + * Makes the Get Usage Summary request + * + * @param request the Get Usage Summary request + * @return the response from the Get Usage Summary request + */ + Mono getUsageSummary( + GetOrganizationUsageSummaryRequest request); + + /** + * Makes the List Organizations request + * + * @param request the List Organizations request + * @return the response from the List Organizations request + */ + Mono list(ListOrganizationsRequest request); + + /** + * Makes List Organization Domains request + * + * @param request the List Organization Domains request + * @return the response from the List Organization Domains request + */ + Mono listDomains(ListOrganizationDomainsRequest request); + + /** + * Makes the Update an Organization request + * + * @param request the Update Organization request + * @return the response from the Update Organization request + */ + Mono update(UpdateOrganizationRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_AssignOrganizationDefaultIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_AssignOrganizationDefaultIsolationSegmentRequest.java new file mode 100644 index 00000000000..9fd25bcc50c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_AssignOrganizationDefaultIsolationSegmentRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +/** + * The request payload for the Assign Default Isolation Segment operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssignOrganizationDefaultIsolationSegmentRequest { + + /** + * The isolation segment to assign + */ + @JsonProperty("data") + @Nullable + abstract Relationship getData(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_AssignOrganizationDefaultIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_AssignOrganizationDefaultIsolationSegmentResponse.java new file mode 100644 index 00000000000..bf5dc271bf5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_AssignOrganizationDefaultIsolationSegmentResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.RelationshipResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Assign Default Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssignOrganizationDefaultIsolationSegmentResponse extends RelationshipResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_CreateOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_CreateOrganizationRequest.java new file mode 100644 index 00000000000..f7139c3a72e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_CreateOrganizationRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Assign Default Isolation Segment operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateOrganizationRequest { + + /** + * The organization id + */ + @JsonProperty("name") + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_CreateOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_CreateOrganizationResponse.java new file mode 100644 index 00000000000..626fe75bf19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_CreateOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateOrganizationResponse extends Organization { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_DeleteOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_DeleteOrganizationRequest.java new file mode 100644 index 00000000000..454ef8449e3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_DeleteOrganizationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Organization operation + */ +@Value.Immutable +abstract class _DeleteOrganizationRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultDomainRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultDomainRequest.java new file mode 100644 index 00000000000..3f3b8f34848 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultDomainRequest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _GetOrganizationDefaultDomainRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultDomainResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultDomainResponse.java new file mode 100644 index 00000000000..74e2e77df91 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultDomainResponse.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.domains.Domain; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationDefaultDomainResponse extends Domain { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultIsolationSegmentRequest.java new file mode 100644 index 00000000000..5e507015e1f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultIsolationSegmentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Default Isolation Segment operation + */ +@Value.Immutable +abstract class _GetOrganizationDefaultIsolationSegmentRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultIsolationSegmentResponse.java new file mode 100644 index 00000000000..943dbefe5da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationDefaultIsolationSegmentResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.RelationshipResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Get Default Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationDefaultIsolationSegmentResponse extends RelationshipResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationRequest.java new file mode 100644 index 00000000000..fd645fec952 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Organization operation + */ +@Value.Immutable +abstract class _GetOrganizationRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationResponse.java new file mode 100644 index 00000000000..861b8b7de0f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationResponse extends Organization { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationUsageSummaryRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationUsageSummaryRequest.java new file mode 100644 index 00000000000..70cfbfeb7fd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationUsageSummaryRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Organization Usage Summary operation + */ +@Value.Immutable +abstract class _GetOrganizationUsageSummaryRequest { + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationUsageSummaryResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationUsageSummaryResponse.java new file mode 100644 index 00000000000..8cf5362c77d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_GetOrganizationUsageSummaryResponse.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.UsageSummary; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The response payload for the Get Organization Usage Summary operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationUsageSummaryResponse { + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + @Nullable + abstract Map getLinks(); + + /** + * The entitled organizations + */ + @JsonProperty("usage_summary") + @Nullable + abstract UsageSummary getUsageSummary(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationDomainsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationDomainsRequest.java new file mode 100644 index 00000000000..162577ecb81 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationDomainsRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Organization Domains operation + */ +@Value.Immutable +abstract class _ListOrganizationDomainsRequest extends PaginatedRequest { + + /** + * The domain ids to filter by + */ + @FilterParameter("guids") + @Nullable + abstract List getDomainIds(); + + /** + * The metadata query + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The names + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + + /** + * The owning organization ids + */ + @FilterParameter("organization_guids") + @Nullable + abstract List getOwningOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationDomainsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationDomainsResponse.java new file mode 100644 index 00000000000..514977cf51c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationDomainsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Organization Domains operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationDomainsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationsRequest.java new file mode 100644 index 00000000000..a7c6f7d752d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationsRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Organizations operation. + */ +@Value.Immutable +abstract class _ListOrganizationsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationsResponse.java new file mode 100644 index 00000000000..b28e1440342 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_ListOrganizationsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Organizations operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_OrganizationRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_OrganizationRelationships.java new file mode 100644 index 00000000000..df6e3fd397b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_OrganizationRelationships.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Organization entity + */ +@Value.Immutable +@JsonDeserialize +abstract class _OrganizationRelationships { + + /** + * The quota relationship + */ + @JsonProperty("quota") + @Nullable + abstract ToOneRelationship getQuota(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_OrganizationResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_OrganizationResource.java new file mode 100644 index 00000000000..84719bc816f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_OrganizationResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Organizations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationResource extends Organization { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_UpdateOrganizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_UpdateOrganizationRequest.java new file mode 100644 index 00000000000..702ff6319ec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_UpdateOrganizationRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Organization operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateOrganizationRequest { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The organization id + */ + @JsonIgnore + abstract String getOrganizationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_UpdateOrganizationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_UpdateOrganizationResponse.java new file mode 100644 index 00000000000..c4449273cb9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/organizations/_UpdateOrganizationResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Organization operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateOrganizationResponse extends Organization { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/Package.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/Package.java new file mode 100644 index 00000000000..0a18c39fd46 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/Package.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are packages + */ +public abstract class Package extends Resource { + + /** + * The data for the package + */ + @JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXTERNAL_PROPERTY, + property = "type") + @JsonSubTypes({ + @JsonSubTypes.Type(name = "bits", value = BitsData.class), + @JsonSubTypes.Type(name = "docker", value = DockerData.class) + }) + @JsonProperty("data") + public abstract PackageData getData(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The state + */ + @JsonProperty("state") + public abstract PackageState getState(); + + /** + * The type + */ + @JsonProperty("type") + public abstract PackageType getType(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + abstract PackageRelationships getRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageData.java new file mode 100644 index 00000000000..b6dc2bc5ed1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageData.java @@ -0,0 +1,22 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +/** + * Marker interface for Package Data + */ +public interface PackageData {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageState.java new file mode 100644 index 00000000000..81ee96396b4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageState.java @@ -0,0 +1,92 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of a {@link Package} + */ +public enum PackageState { + + /** + * The awaiting upload state + */ + AWAITING_UPLOAD("AWAITING_UPLOAD"), + + /** + * The copying state + */ + COPYING("COPYING"), + + /** + * The expired state + */ + EXPIRED("EXPIRED"), + + /** + * The failed state + */ + FAILED("FAILED"), + + /** + * The processing upload state + */ + PROCESSING_UPLOAD("PROCESSING_UPLOAD"), + + /** + * The ready state + */ + READY("READY"); + + private final String value; + + PackageState(String value) { + this.value = value; + } + + @JsonCreator + public static PackageState from(String s) { + switch (s.toLowerCase()) { + case "awaiting_upload": + return AWAITING_UPLOAD; + case "copying": + return COPYING; + case "expired": + return EXPIRED; + case "failed": + return FAILED; + case "processing_upload": + return PROCESSING_UPLOAD; + case "ready": + return READY; + default: + throw new IllegalArgumentException(String.format("Unknown package state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageType.java new file mode 100644 index 00000000000..22ac3aaffb1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/PackageType.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of a {@link Package} + */ +public enum PackageType { + + /** + * The bits type + */ + BITS("bits"), + + /** + * The docker type + */ + DOCKER("docker"); + + private final String value; + + PackageType(String value) { + this.value = value; + } + + @JsonCreator + public static PackageType from(String s) { + switch (s.toLowerCase()) { + case "bits": + return BITS; + case "docker": + return DOCKER; + default: + throw new IllegalArgumentException(String.format("Unknown package type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/Packages.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/Packages.java new file mode 100644 index 00000000000..44b9e61cf68 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/Packages.java @@ -0,0 +1,90 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Packages Client API + */ +public interface Packages { + + /** + * Makes the Copy Package request + * + * @param request the Copy Package request + * @return the response from the Copy Package request + */ + Mono copy(CopyPackageRequest request); + + /** + * Makes the Create Package request + * + * @param request the Create Package request + * @return the response from the Create Package request + */ + Mono create(CreatePackageRequest request); + + /** + * Makes the Delete Package request + * + * @param request the Delete Package request + * @return the response from the Delete Package request + */ + Mono delete(DeletePackageRequest request); + + /** + * Makes the Download the bits for a package request + * + * @param request the Download Package request + * @return the response from the Download Package request + */ + Flux download(DownloadPackageRequest request); + + /** + * Makes the Get Package request + * + * @param request the Get Package request + * @return the response from the Get Package request + */ + Mono get(GetPackageRequest request); + + /** + * Makes the List Packages request + * + * @param request the List Packages request + * @return the response from the List Packages request + */ + Mono list(ListPackagesRequest request); + + /** + * Makes the List Droplets request + * + * @param request the List Droplets request + * @return the response from the List Droplets request + */ + Mono listDroplets(ListPackageDropletsRequest request); + + /** + * Makes the Upload Package request + * + * @param request the Upload Package request + * @return the response from the Upload Package request + */ + Mono upload(UploadPackageRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_BitsData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_BitsData.java new file mode 100644 index 00000000000..97e4fd8feb1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_BitsData.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Checksum; +import org.immutables.value.Value; + +/** + * Data type for bits packages + */ +@JsonDeserialize +@Value.Immutable +abstract class _BitsData implements PackageData { + + /** + * The checksum + */ + @JsonProperty("checksum") + @Nullable + abstract Checksum getChecksum(); + + /** + * The error + */ + @JsonProperty("error") + @Nullable + abstract String getError(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CopyPackageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CopyPackageRequest.java new file mode 100644 index 00000000000..0343ffe9fae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CopyPackageRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Copy Package operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CopyPackageRequest { + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract PackageRelationships getRelationships(); + + /** + * The source package id + */ + @QueryParameter("source_guid") + abstract String getSourcePackageId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CopyPackageResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CopyPackageResponse.java new file mode 100644 index 00000000000..8df9794f3fe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CopyPackageResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Copy Package operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CopyPackageResponse extends Package { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CreatePackageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CreatePackageRequest.java new file mode 100644 index 00000000000..ddfae727a80 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CreatePackageRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create Package operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreatePackageRequest { + + /** + * The datas + */ + @JsonProperty("data") + @Nullable + abstract PackageData getData(); + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract PackageRelationships getRelationships(); + + /** + * The type + */ + @JsonProperty("type") + abstract PackageType getType(); + + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CreatePackageResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CreatePackageResponse.java new file mode 100644 index 00000000000..1aa747031de --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_CreatePackageResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Package operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreatePackageResponse extends Package { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DeletePackageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DeletePackageRequest.java new file mode 100644 index 00000000000..20461529d61 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DeletePackageRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Package operation + */ +@Value.Immutable +abstract class _DeletePackageRequest { + + /** + * The package id + */ + @JsonIgnore + abstract String getPackageId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DockerData.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DockerData.java new file mode 100644 index 00000000000..ac485db594c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DockerData.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Data type for docker packages + */ +@JsonDeserialize +@Value.Immutable +abstract class _DockerData implements PackageData { + + /** + * The Docker image + */ + @JsonProperty("image") + abstract String getImage(); + + /** + * The password for the image's registry + */ + @JsonProperty("password") + @Nullable + abstract String getPassword(); + + /** + * The username for the image's registry + */ + @JsonProperty("username") + @Nullable + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DownloadPackageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DownloadPackageRequest.java new file mode 100644 index 00000000000..e5acfe65b71 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_DownloadPackageRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Download Package operation + */ +@Value.Immutable +abstract class _DownloadPackageRequest { + + /** + * The package id + */ + @JsonIgnore + abstract String getPackageId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_GetPackageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_GetPackageRequest.java new file mode 100644 index 00000000000..36bb91a7510 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_GetPackageRequest.java @@ -0,0 +1 @@ +/* * Copyright 2013-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.cloudfoundry.client.v3.packages; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; /** * The request payload for the Get Package operation */ @Value.Immutable abstract class _GetPackageRequest { /** * The package id */ @JsonIgnore abstract String getPackageId(); } \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_GetPackageResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_GetPackageResponse.java new file mode 100644 index 00000000000..1f2eaa9724f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_GetPackageResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Package operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetPackageResponse extends Package { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackageDropletsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackageDropletsRequest.java new file mode 100644 index 00000000000..eb679c72f21 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackageDropletsRequest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.cloudfoundry.client.v3.droplets.DropletState; +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _ListPackageDropletsRequest extends PaginatedRequest { + + /** + * The droplet ids to filter by + */ + @FilterParameter("guids") + abstract List getDropletIds(); + + /** + * The package id + */ + @JsonIgnore + abstract String getPackageId(); + + /** + * The droplet states to filter by + */ + @FilterParameter("states") + abstract List getStates(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackageDropletsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackageDropletsResponse.java new file mode 100644 index 00000000000..9c1d9605771 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackageDropletsResponse.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.droplets.DropletResource; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _ListPackageDropletsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackagesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackagesRequest.java new file mode 100644 index 00000000000..4b891b338a4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackagesRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Packages operation + */ +@Value.Immutable +abstract class _ListPackagesRequest extends PaginatedRequest { + + /** + * List of application ids to filter by + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * List of organization ids to filter by + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * List of package ids to filter by + */ + @FilterParameter("guids") + abstract List getPackageIds(); + + /** + * List of space ids to filter by + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + + /** + * List of package states to filter by + */ + @FilterParameter("states") + abstract List getStates(); + + /** + * List of package types to filter by + */ + @FilterParameter("types") + abstract List getTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackagesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackagesResponse.java new file mode 100644 index 00000000000..2d4ed91a2fd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_ListPackagesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Packages operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListPackagesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_PackageRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_PackageRelationships.java new file mode 100644 index 00000000000..ae131bb39ab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_PackageRelationships.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Create Package request + */ +@JsonDeserialize +@Value.Immutable +abstract class _PackageRelationships { + + /** + * The application relationship + */ + @JsonProperty("app") + abstract ToOneRelationship getApplication(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_PackageResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_PackageResource.java new file mode 100644 index 00000000000..cb9616f7cc8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_PackageResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List packages operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _PackageResource extends Package { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_UploadPackageRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_UploadPackageRequest.java new file mode 100644 index 00000000000..cd183055ccb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_UploadPackageRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.resourcematch.MatchedResource; +import org.immutables.value.Value; + +import java.nio.file.Path; +import java.util.List; + +/** + * The request payload for the Upload Package operation + */ +@Value.Immutable +abstract class _UploadPackageRequest { + @Value.Check + void check() { + if (getBits() == null && (getResources() == null || getResources().isEmpty())) { + throw new IllegalStateException("At least one of resources or bits are required"); + } + } + + /** + * The resources + */ + @JsonIgnore + @Nullable + abstract List getResources(); + + /** + * The bits + */ + @JsonIgnore + @Nullable + abstract Path getBits(); + + /** + * The package id + */ + @JsonIgnore + abstract String getPackageId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_UploadPackageResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_UploadPackageResponse.java new file mode 100644 index 00000000000..a8c803fc792 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/packages/_UploadPackageResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Upload Package operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UploadPackageResponse extends Package { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/HealthCheckType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/HealthCheckType.java new file mode 100644 index 00000000000..1b1748dcfd5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/HealthCheckType.java @@ -0,0 +1,80 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of a {@link HealthCheck} + */ +public enum HealthCheckType { + + /** + * An http health check + */ + HTTP("http"), + + /** + * No health check (deprecated, backwards compatibility only) + */ + @Deprecated + NONE("none"), + + /** + * A port health check + */ + PORT("port"), + + /** + * A process health check + */ + PROCESS("process"); + + private final String value; + + HealthCheckType(String value) { + this.value = value; + } + + @JsonCreator + public static HealthCheckType from(String s) { + switch (s.toLowerCase()) { + case "http": + return HTTP; + case "none": + return NONE; + case "port": + return PORT; + case "process": + return PROCESS; + default: + throw new IllegalArgumentException( + String.format("Unknown health check type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java new file mode 100644 index 00000000000..35d0ffbdb40 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Process.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are processes + */ +public abstract class Process extends Resource { + + /** + * The command + */ + @JsonProperty("command") + public abstract String getCommand(); + + /** + * The disk in megabytes + */ + @JsonProperty("disk_in_mb") + public abstract Integer getDiskInMb(); + + /** + * The health check + */ + @JsonProperty("health_check") + public abstract HealthCheck getHealthCheck(); + + /** + * The readiness health check + */ + @JsonProperty("readiness_health_check") + @Nullable + public abstract ReadinessHealthCheck getReadinessHealthCheck(); + + /** + * The instances + */ + @JsonProperty("instances") + public abstract Integer getInstances(); + + /** + * The memory in megabytes + */ + @JsonProperty("memory_in_mb") + public abstract Integer getMemoryInMb(); + + /** + * The metadata + */ + @JsonProperty("metadata") + public abstract Metadata getMetadata(); + + /** + * The relationships + */ + @JsonProperty("relationships") + public abstract ProcessRelationships getRelationships(); + + /** + * The type + */ + @JsonProperty("type") + public abstract String getType(); + + /** + * The version UUID + */ + @JsonProperty("version") + @Nullable + public abstract String getVersion(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit_in_bytes_per_second") + @Nullable + public abstract Integer getLogRateLimitInBytesPerSecond(); + + /** + * The user + */ + @JsonProperty("user") + @Nullable + public abstract String getUser(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessState.java new file mode 100644 index 00000000000..c9ac2c22c2d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessState.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of a {@link HealthCheck} + */ +public enum ProcessState { + + /** + * The crashed state + */ + CRASHED("CRASHED"), + + /** + * The down state + */ + DOWN("DOWN"), + + /** + * The running state + */ + RUNNING("RUNNING"), + + /** + * The starting state + */ + STARTING("STARTING"); + + private final String value; + + ProcessState(String value) { + this.value = value; + } + + @JsonCreator + public static ProcessState from(String s) { + switch (s.toLowerCase()) { + case "crashed": + return CRASHED; + case "down": + return DOWN; + case "running": + return RUNNING; + case "starting": + return STARTING; + default: + throw new IllegalArgumentException(String.format("Unknown process state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java new file mode 100644 index 00000000000..8cae8fee307 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ProcessStatistics.java @@ -0,0 +1,136 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +/** + * Process details statistics + */ +public abstract class ProcessStatistics { + + /** + * Information about errors placing the instance + */ + @JsonProperty("details") + @Nullable + public abstract String getDetails(); + + /** + * The disk quota + */ + @JsonProperty("disk_quota") + @Nullable + public abstract Long getDiskQuota(); + + /** + * The file descriptor quota + */ + @JsonProperty("fds_quota") + @Nullable + public abstract Long getFileDescriptorQuota(); + + /** + * The host + */ + @JsonProperty("host") + @Nullable + public abstract String getHost(); + + /** + * The index + */ + @JsonProperty("index") + @Nullable + public abstract Integer getIndex(); + + /** + * The instance port mappings + */ + @JsonProperty("instance_ports") + public abstract List getInstancePorts(); + + /** + * The isolation segment + */ + @JsonProperty("isolation_segment") + @Nullable + public abstract String getIsolationSegment(); + + /** + * The memory quota + */ + @JsonProperty("mem_quota") + @Nullable + public abstract Long getMemoryQuota(); + + /** + * The state + */ + @JsonProperty("state") + @Nullable + public abstract ProcessState getState(); + + /** + * The type + */ + @JsonProperty("type") + public abstract String getType(); + + /** + * The uptime + */ + @JsonProperty("uptime") + public abstract Long getUptime(); + + /** + * The usage + */ + @JsonProperty("usage") + @Nullable + public abstract ProcessUsage getUsage(); + + /** + * Routable + */ + @JsonProperty("routable") + @Nullable + abstract String getRoutable(); + + /** + * The internal IP address of the instance + */ + @JsonProperty("instance_internal_ip") + @Nullable + public abstract String getInstanceInternalIp(); + + /** + * The log rate limit + */ + @JsonProperty("log_rate_limit") + @Nullable + abstract Integer getLogRateLimit(); + + /** + * The instance guid + */ + @JsonProperty("instance_guid") + @Nullable + abstract String getInstanceGuid(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Processes.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Processes.java new file mode 100644 index 00000000000..d9d0ecbea04 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/Processes.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Processes Client API + */ +public interface Processes { + + /** + * Makes the Get Process request + * + * @param request the Get Process request + * @return the response from the Get Process request + */ + Mono get(GetProcessRequest request); + + /** + * Makes the Get stats for a process request + * + * @param request the Get Statistics for a Process request + * @return the response from the Get Statistics for a Process request + */ + Mono getStatistics(GetProcessStatisticsRequest request); + + /** + * Makes the List Process request + * + * @param request the List Processes request + * @return the response from the List Processes request + */ + Mono list(ListProcessesRequest request); + + /** + * Makes the Scale Application request + * + * @param request the Scale Process request + * @return the response from the Scale Process request + */ + Mono scale(ScaleProcessRequest request); + + /** + * Makes the Terminate Process Instance request + * + * @param request the Terminate Process Instance request + * @return the response from the Terminate Process Instance request + */ + Mono terminateInstance(TerminateProcessInstanceRequest request); + + /** + * Makes the Update Process request + * + * @param request the Update Process request + * @return the response from the Update Process request + */ + Mono update(UpdateProcessRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java new file mode 100644 index 00000000000..2d0a761fbcc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/ReadinessHealthCheckType.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum ReadinessHealthCheckType { + + /** + * An http health check + */ + HTTP("http"), + + /** + * A port health check + */ + PORT("port"), + + /** + * A process health check + */ + PROCESS("process"); + + private final String value; + + ReadinessHealthCheckType(String value) { + this.value = value; + } + + @JsonCreator + public static ReadinessHealthCheckType from(String s) { + switch (s.toLowerCase()) { + case "http": + return HTTP; + case "port": + return PORT; + case "process": + return PROCESS; + default: + throw new IllegalArgumentException( + String.format("Unknown health check type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java new file mode 100644 index 00000000000..67af40ec2b6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_Data.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Data { + + /** + * The endpoint + */ + @JsonProperty("endpoint") + @Nullable + abstract String getEndpoint(); + + /** + * The invocation timeout + */ + @JsonProperty("invocation_timeout") + @Nullable + abstract Integer getInvocationTimeout(); + + /** + * The timeout + */ + @JsonProperty("timeout") + @Nullable + abstract Integer getTimeout(); + + /** + * The interval in seconds between health check requests + */ + @JsonProperty("interval") + @Nullable + abstract Integer getInterval(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessRequest.java new file mode 100644 index 00000000000..c1173e9339b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Process operation + */ +@Value.Immutable +abstract class _GetProcessRequest { + + /** + * The process id + */ + @JsonIgnore + abstract String getProcessId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessResponse.java new file mode 100644 index 00000000000..ff2a832b296 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Process operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetProcessResponse extends Process { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessStatisticsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessStatisticsRequest.java new file mode 100644 index 00000000000..7a70e5c465f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessStatisticsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Statistics for a Process operation + */ +@Value.Immutable +abstract class _GetProcessStatisticsRequest { + + /** + * The process id + */ + @JsonIgnore + abstract String getProcessId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessStatisticsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessStatisticsResponse.java new file mode 100644 index 00000000000..a5fdde60f13 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_GetProcessStatisticsResponse.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Get Statistics for a Process operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetProcessStatisticsResponse { + + /** + * The resources + */ + @JsonProperty("resources") + abstract List getResources(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_HealthCheck.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_HealthCheck.java new file mode 100644 index 00000000000..798108b1222 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_HealthCheck.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The health check + */ +@JsonDeserialize +@Value.Immutable +abstract class _HealthCheck { + + /** + * The data + */ + @JsonProperty("data") + @Nullable + abstract Data getData(); + + /** + * The type + */ + @JsonProperty("type") + abstract HealthCheckType getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ListProcessesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ListProcessesRequest.java new file mode 100644 index 00000000000..13d45f4e2b4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ListProcessesRequest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Processes operation + */ +@Value.Immutable +abstract class _ListProcessesRequest extends PaginatedRequest { + + /** + * List of application ids to filter by + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * List of organization ids to filter by + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * List of process ids to filter by + */ + @FilterParameter("guids") + abstract List getProcessIds(); + + /** + * List of space ids to filter by + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + + /** + * List of process types to filter by + */ + @FilterParameter("types") + abstract List getTypes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ListProcessesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ListProcessesResponse.java new file mode 100644 index 00000000000..ee39d233bec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ListProcessesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Processes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListProcessesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_PortMapping.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_PortMapping.java new file mode 100644 index 00000000000..717351af44f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_PortMapping.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A mapping of internal to external ports + */ +@JsonDeserialize +@Value.Immutable +abstract class _PortMapping { + + /** + * The external port + */ + @JsonProperty("external") + @Nullable + abstract Integer getExternal(); + + /** + * The external TLS proxy port + */ + @JsonProperty("external_tls_proxy_port") + @Nullable + abstract Integer getExternalTlsProxyPort(); + + /** + * The internal port + */ + @JsonProperty("internal") + @Nullable + abstract Integer getInternal(); + + /** + * The internal TLS proxy port + */ + @JsonProperty("internal_tls_proxy_port") + @Nullable + abstract Integer getInternalTlsProxyPort(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessRelationships.java new file mode 100644 index 00000000000..5c8bae80376 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessRelationships.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Process entity + */ +@Value.Immutable +@JsonDeserialize +abstract class _ProcessRelationships { + + /** + * The app relationship + */ + @JsonProperty("app") + @Nullable + abstract ToOneRelationship getApp(); + + /** + * The revision relationship + */ + @JsonProperty("revision") + @Nullable + abstract ToOneRelationship getRevision(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessResource.java new file mode 100644 index 00000000000..354b99a4e22 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List processes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ProcessResource extends Process { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java new file mode 100644 index 00000000000..2f1340f35fc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessStatisticsResource.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.ArrayList; +import java.util.List; + +@JsonDeserialize +@Value.Immutable +abstract class _ProcessStatisticsResource extends ProcessStatistics { + + @Value.Check + protected void check() { + if (getState() == ProcessState.STARTING || getState() == ProcessState.RUNNING || getState() == ProcessState.CRASHED) { + List missing = new ArrayList<>(); + + if (getFileDescriptorQuota() == null) { + missing.add("fileDescriptorQuota"); + } + if (getHost() == null) { + missing.add("host"); + } + + if (!missing.isEmpty()) { + throw new IllegalStateException("Cannot build ProcessStatisticsResource, some of required attributes are not set " + missing); + } + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java new file mode 100644 index 00000000000..ab0a13340ce --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ProcessUsage.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Process usage information + */ +@JsonDeserialize +@Value.Immutable +abstract class _ProcessUsage { + + /** + * The CPU + */ + @JsonProperty("cpu") + @Nullable + abstract Double getCpu(); + + /** + * The disk + */ + @JsonProperty("disk") + @Nullable + abstract Long getDisk(); + + /** + * The memory + */ + @JsonProperty("mem") + @Nullable + abstract Long getMemory(); + + /** + * The time + */ + @JsonProperty("time") + @Nullable + abstract String getTime(); + + /** + * The CPU entitlement + */ + @JsonProperty("cpu_entitlement") + @Nullable + abstract Double getCpuEntitlement(); + + /** + * The current logging usage of the instance + */ + @JsonProperty("log_rate") + @Nullable + abstract Integer getLogRateLimit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java new file mode 100644 index 00000000000..25ae6e009f1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ReadinessHealthCheck.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2024 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The health check + */ +@JsonDeserialize +@Value.Immutable +abstract class _ReadinessHealthCheck { + + /** + * The data + */ + @JsonProperty("data") + @Nullable + abstract Data getData(); + + /** + * The type + */ + @JsonProperty("type") + abstract ReadinessHealthCheckType getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ScaleProcessRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ScaleProcessRequest.java new file mode 100644 index 00000000000..c781941fac4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ScaleProcessRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Scale Process operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ScaleProcessRequest { + + /** + * The disk in megabytes + */ + @JsonProperty("disk_in_mb") + @Nullable + abstract Integer getDiskInMb(); + + /** + * The number of instances + */ + @JsonProperty("instances") + @Nullable + abstract Integer getInstances(); + + /** + * The memory in megabytes + */ + @JsonProperty("memory_in_mb") + @Nullable + abstract Integer getMemoryInMb(); + + /** + * The process id + */ + @JsonIgnore + abstract String getProcessId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ScaleProcessResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ScaleProcessResponse.java new file mode 100644 index 00000000000..a2b2af5978f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_ScaleProcessResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Scale Process operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ScaleProcessResponse extends Process { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_TerminateProcessInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_TerminateProcessInstanceRequest.java new file mode 100644 index 00000000000..bc79d03bfe1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_TerminateProcessInstanceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Terminate Process Instance operation + */ +@Value.Immutable +abstract class _TerminateProcessInstanceRequest { + + /** + * The index + */ + @JsonIgnore + abstract String getIndex(); + + /** + * The process id + */ + @JsonIgnore + abstract String getProcessId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java new file mode 100644 index 00000000000..d00f2a2177f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Update Process operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateProcessRequest { + + /** + * The command + */ + @JsonProperty("command") + @Nullable + abstract String getCommand(); + + /** + * The health check + */ + @JsonProperty("health_check") + @Nullable + abstract HealthCheck getHealthCheck(); + + /** + * The readiness health check + */ + @JsonProperty("readiness_health_check") + @Nullable + abstract ReadinessHealthCheck getReadinessHealthCheck(); + + /** + * The process id + */ + @JsonIgnore + abstract String getProcessId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessResponse.java new file mode 100644 index 00000000000..7810134f620 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/processes/_UpdateProcessResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Process operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateProcessResponse extends Process { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Apps.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Apps.java new file mode 100644 index 00000000000..d25b705ccd8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Apps.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Quotas that affect applications and application sub-resources + */ +@JsonDeserialize +@Value.Immutable +abstract class _Apps { + + /** + * Maximum memory for a single process or task + * @return the maximum memory for a single process or task + */ + @JsonProperty("per_process_memory_in_mb") + @Nullable + abstract Integer getPerProcessMemoryInMb(); + + /** + * Total memory allowed for all the started processes and running tasks + * @return the total memory allowed for all the started processes and running tasks + */ + @JsonProperty("total_memory_in_mb") + @Nullable + abstract Integer getTotalMemoryInMb(); + + /** + * Total instances of all the started processes allowed + * @return the total instances of all the started processes allowed + */ + @JsonProperty("total_instances") + @Nullable + abstract Integer getTotalInstances(); + + /** + * Total log rate limit allowed for all the started processes and running tasks + * @return the total log rate limit allowed for all the started processes and running tasks + */ + @JsonProperty("log_rate_limit_in_bytes_per_second") + @Nullable + abstract Integer getLogRateLimitInBytesPerSecond(); + + /** + * Maximum number of running tasks + * @return the maximum number of running tasks + */ + @JsonProperty("per_app_tasks") + @Nullable + abstract Integer getPerAppTasks(); +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Routes.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Routes.java new file mode 100644 index 00000000000..14f1d38eb1a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Routes.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Quotas that affect routes + */ +@JsonDeserialize +@Value.Immutable +abstract class _Routes { + + /** + * Total number of routes allowed + * + * @return the total number of routes allowed + */ + @JsonProperty("total_routes") + @Nullable + abstract Integer getTotalRoutes(); + + /** + * Total number of ports that are reservable by routes + * + * @return the total number of reserved ports allowed + */ + @JsonProperty("total_reserved_ports") + @Nullable + abstract Integer getTotalReservedPorts(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Services.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Services.java new file mode 100644 index 00000000000..7ec674a4ca5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/_Services.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Quotas that affect services + */ +@JsonDeserialize +@Value.Immutable +abstract class _Services { + + /** + * Specifies whether instances of paid service plans can be created + * @return true if instances of paid service plans can be created, false otherwise + */ + @JsonProperty("paid_services_allowed") + abstract boolean isPaidServicesAllowed(); + + /** + * Total number of service instances allowed + * @return the total number of service instances allowed + */ + @JsonProperty("total_service_instances") + @Nullable + abstract Integer getTotalServiceInstances(); + + /** + * Total number of service keys allowed + * @return the total number of service keys allowed + */ + @JsonProperty("total_service_keys") + @Nullable + abstract Integer getTotalServiceKeys(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuota.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuota.java new file mode 100644 index 00000000000..a7afd763668 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuota.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; + +/** + * Base class for responses that are organization quota definitions + */ +public abstract class OrganizationQuota extends Resource { + + /** + * Name of the quota + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Quotas that affect applications and application sub-resources + */ + @JsonProperty("apps") + @Nullable + abstract Apps getApps(); + + /** + * Quotas that affect services + */ + @JsonProperty("services") + @Nullable + abstract Services getServices(); + + /** + * Quotas that affect routes + */ + @JsonProperty("routes") + @Nullable + abstract Routes getRoutes(); + + /** + * Quotas that affect domains + */ + @JsonProperty("domains") + @Nullable + abstract Domains getDomains(); + + /** + * A relationship to the organizations where the quota is applied + */ + @JsonProperty("relationships") + @Nullable + abstract OrganizationQuotaRelationships getRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuotasV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuotasV3.java new file mode 100644 index 00000000000..624e7374b26 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/OrganizationQuotasV3.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Organization Quota Client API + */ +public interface OrganizationQuotasV3 { + + /** + * Makes the Create Organization Quota + * request + * + * @param request the Create Organization Quota request + * @return the response from the Create Organization Quota request + */ + Mono create(CreateOrganizationQuotaRequest request); + + /** + * Makes the Get Organization Quota + * request + * + * @param request the Get Organization Quota request + * @return the response from the Get Organization Quota request + */ + Mono get(GetOrganizationQuotaRequest request); + + /** + * Makes the List all Organization Quota s + * request + * + * @param request the List all Organization Quotas request + * @return the response from the List all Organization Quotas request + */ + Mono list(ListOrganizationQuotasRequest request); + + /** Makes the Update Organization Quota + * request + * + * @param request the Update Organization Quota request + * @return the response from the Update Organization Quota request + */ + Mono update(UpdateOrganizationQuotaRequest request); + + /** + * Makes the Delete Organization Quota + * request + * + * @param request the Delete Organization Quota request + * @return the response from the Delete Organization Quota request + */ + Mono delete(DeleteOrganizationQuotaRequest request); + + /** + * Makes the Apply an Organization Quota to an Organization + * request + * + * @param request the Apply an Organization Quota to an Organization request + * @return the response from the Apply an Organization Quota to an Organization request + */ + Mono apply(ApplyOrganizationQuotaRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ApplyOrganizationQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ApplyOrganizationQuotaRequest.java new file mode 100644 index 00000000000..84ca9423cf3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ApplyOrganizationQuotaRequest.java @@ -0,0 +1,28 @@ +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.immutables.value.Value; + +/** + * The request payload to apply an Organization Quota to an Organization + */ +@JsonSerialize +@Value.Immutable +abstract class _ApplyOrganizationQuotaRequest { + + /** + * The Organization Quota id + */ + @JsonIgnore + abstract String getOrganizationQuotaId(); + + /** + * Relationships to the organizations where the quota is applied + * Use of JsonUnwrapped to inline the organization relationships as per the API spec + */ + @JsonUnwrapped + abstract ToManyRelationship organizationRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ApplyOrganizationQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ApplyOrganizationQuotaResponse.java new file mode 100644 index 00000000000..eaf61f61a19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ApplyOrganizationQuotaResponse.java @@ -0,0 +1,33 @@ +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The response payload for applying an Organization Quota to an Organization + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplyOrganizationQuotaResponse { + + /** + * Relationships to the organizations where the quota is applied + * Use of JsonUnwrapped to inline the organization relationships as per the API spec + */ + @JsonUnwrapped + abstract ToManyRelationship organizationRelationships(); + + /** + * Links to related resources and actions for the resource + */ + @AllowNulls + @JsonProperty("links") + public abstract Map getLinks(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaRequest.java new file mode 100644 index 00000000000..5f3477153cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaRequest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.immutables.value.Value; + +/** + * The request payload to create a new Organization Quota + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateOrganizationQuotaRequest { + + /** + * Name of the quota + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Quotas that affect applications and application sub-resources + */ + @JsonProperty("apps") + @Nullable + abstract Apps getApps(); + + /** + * Quotas that affect services + */ + @JsonProperty("services") + @Nullable + abstract Services getServices(); + + /** + * Quotas that affect routes + */ + @JsonProperty("routes") + @Nullable + abstract Routes getRoutes(); + + /** + * Quotas that affect domains + */ + @JsonProperty("domains") + @Nullable + abstract Domains getDomains(); + + /** + * A relationship to the organizations where the quota is applied + */ + @JsonProperty("relationships") + @Nullable + abstract OrganizationQuotaRelationships getRelationships(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaResponse.java new file mode 100644 index 00000000000..8dc16b19711 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_CreateOrganizationQuotaResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create an Organization Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateOrganizationQuotaResponse extends OrganizationQuota { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_DeleteOrganizationQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_DeleteOrganizationQuotaRequest.java new file mode 100644 index 00000000000..4e0b746d0a9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_DeleteOrganizationQuotaRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete an Organization Quota + */ +@Value.Immutable +abstract class _DeleteOrganizationQuotaRequest { + + /** + * The Organization Quota id + */ + @JsonIgnore + abstract String getOrganizationQuotaId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_Domains.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_Domains.java new file mode 100644 index 00000000000..a6aec9d18cc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_Domains.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Quotas that affect domains + */ +@JsonDeserialize +@Value.Immutable +abstract class _Domains { + + /** + * Total number of domains that can be scoped to an organization + * + * @return the total number of domains that can be scoped to an organization + */ + @JsonProperty("total_domains") + @Nullable + abstract Integer getTotalDomains(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaRequest.java new file mode 100644 index 00000000000..91cbb7b66d3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieve a Particular Organization Quota + */ +@Value.Immutable +abstract class _GetOrganizationQuotaRequest { + + /** + * The Organization Quota id + */ + @JsonIgnore + abstract String getOrganizationQuotaId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaResponse.java new file mode 100644 index 00000000000..d25fb070e23 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_GetOrganizationQuotaResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieve a Particular Organization Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOrganizationQuotaResponse extends OrganizationQuota { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasRequest.java new file mode 100644 index 00000000000..2073657f184 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Organization Quota + */ +@Value.Immutable +abstract class _ListOrganizationQuotasRequest extends PaginatedRequest { + + /** + * list of organization quota guids to filter by + */ + @FilterParameter("guids") + @Nullable + abstract List getGuids(); + + /** + * list of organization quota names to filter by + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * list of organization guids to filter by + */ + @FilterParameter("organization_guids") + @Nullable + abstract List getOrganizationGuids(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasResponse.java new file mode 100644 index 00000000000..a0e6c28d517 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_ListOrganizationQuotasResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Organization Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListOrganizationQuotasResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaRelationships.java new file mode 100644 index 00000000000..e5bdc072284 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaRelationships.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Organization Quota entity + */ + +@Value.Immutable +@JsonDeserialize +abstract class _OrganizationQuotaRelationships { + + /** + * The quota relationship + */ + @JsonProperty("organizations") + @Nullable + abstract ToManyRelationship getOrganizations(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaResource.java new file mode 100644 index 00000000000..2455745a5c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_OrganizationQuotaResource.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain Organization Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _OrganizationQuotaResource extends OrganizationQuota { + +} + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaRequest.java new file mode 100644 index 00000000000..2c7f97b7081 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaRequest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.immutables.value.Value; + +/** + * The request payload to update an Organization Quota + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateOrganizationQuotaRequest { + + /** + * The Organization Quota id + */ + @JsonIgnore + abstract String getOrganizationQuotaId(); + + /** + * Name of the quota + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Quotas that affect applications and application sub-resources + */ + @JsonProperty("apps") + @Nullable + abstract Apps getApps(); + + /** + * Quotas that affect services + */ + @JsonProperty("services") + @Nullable + abstract Services getServices(); + + /** + * Quotas that affect routes + */ + @JsonProperty("routes") + @Nullable + abstract Routes getRoutes(); + + /** + * Quotas that affect domains + */ + @JsonProperty("domains") + @Nullable + abstract Domains getDomains(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaResponse.java new file mode 100644 index 00000000000..78b4f1bfb39 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/organizations/_UpdateOrganizationQuotaResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update an Organization Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateOrganizationQuotaResponse extends OrganizationQuota { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuota.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuota.java new file mode 100644 index 00000000000..e73e2ca2721 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuota.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; + +/** + * Base class for responses that are Space Quotas + */ +public abstract class SpaceQuota extends Resource { + + /** + * Name of the quota + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Quotas that affect applications and application sub-resources + */ + @JsonProperty("apps") + @Nullable + abstract Apps getApps(); + + /** + * Quotas that affect services + */ + @JsonProperty("services") + @Nullable + abstract Services getServices(); + + /** + * Quotas that affect routes + */ + @JsonProperty("routes") + @Nullable + abstract Routes getRoutes(); + + /** + * A relationship to the space where the quota is applied + * A space quota must have a relationship to an organization + */ + @JsonProperty("relationships") + abstract SpaceQuotaRelationships getRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuotasV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuotasV3.java new file mode 100644 index 00000000000..ae2b00143db --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/SpaceQuotasV3.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Space Quota Client API + */ +public interface SpaceQuotasV3 { + + /** + * Makes the Create Space Quota + * request + * + * @param request the Create Space Quota request + * @return the response from the Create Space Quota request + */ + Mono create(CreateSpaceQuotaRequest request); + + /** + * Makes the Get Space Quota + * request + * + * @param request the Get Space Quota request + * @return the response from the Get Space Quota request + */ + Mono get(GetSpaceQuotaRequest request); + + /** + * Makes the List all Space Quota + * request + * + * @param request the List all Space Quotas request + * @return the response from the Space all Organization Quotas request + */ + Mono list(ListSpaceQuotasRequest request); + + /** Makes the Update Space Quota + * request + * + * @param request the Update Space Quota request + * @return the response from the Update Space Quota request + */ + Mono update(UpdateSpaceQuotaRequest request); + + /** + * Makes the Delete Space Quota + * request + * + * @param request the Delete Space Quota request + * @return the response from the Space Organization Quota request + */ + Mono delete(DeleteSpaceQuotaRequest request); + + /** + * Makes the Apply a Space Quota to a Space + * request + * + * @param request the Apply a Space Quota to a Space request + * @return the response from the Apply a Space Quota to a Space request + */ + Mono apply(ApplySpaceQuotaRequest request); + + /** + * Makes the Remove a Space Quota from a Space + * request + * + * @param request the Remove a Space Quota from a Space request + * @return the response from the Remove a Space Quota from a Space request + */ + Mono remove(RemoveSpaceQuotaRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ApplySpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ApplySpaceQuotaRequest.java new file mode 100644 index 00000000000..ddb1bb0d0e6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ApplySpaceQuotaRequest.java @@ -0,0 +1,28 @@ +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.immutables.value.Value; + +/** + * The request payload to apply an Space Quota to a Space + */ +@JsonSerialize +@Value.Immutable +abstract class _ApplySpaceQuotaRequest { + + /** + * The Space Quota id + */ + @JsonIgnore + abstract String getSpaceQuotaId(); + + /** + * Relationships to the spaces where the quota is applied + * Use of JsonUnwrapped to inline the space relationships as per the API spec + */ + @JsonUnwrapped + abstract ToManyRelationship spaceRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ApplySpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ApplySpaceQuotaResponse.java new file mode 100644 index 00000000000..fe721048e76 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ApplySpaceQuotaResponse.java @@ -0,0 +1,33 @@ +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonUnwrapped; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The response payload for applying a Space Quota to a Space + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplySpaceQuotaResponse { + + /** + * Relationships to the spaces where the quota is applied + * Use of JsonUnwrapped to inline the space relationships as per the API spec + */ + @JsonUnwrapped + abstract ToManyRelationship spaceRelationships(); + + /** + * Links to related resources and actions for the resource + */ + @AllowNulls + @JsonProperty("links") + public abstract Map getLinks(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaRequest.java new file mode 100644 index 00000000000..3504105c0c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.immutables.value.Value; + +/** + * The request payload to Create a new Space Quota + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSpaceQuotaRequest { + + /** + * Name of the quota + */ + @JsonProperty("name") + abstract String getName(); + + /** + * A relationship to the organizations and spaces where the quota is applied + */ + @JsonProperty("relationships") + abstract SpaceQuotaRelationships getRelationships(); + + /** + * Quotas that affect applications and application sub-resources + */ + @JsonProperty("apps") + @Nullable + abstract Apps getApps(); + + /** + * Quotas that affect services + */ + @JsonProperty("services") + @Nullable + abstract Services getServices(); + + /** + * Quotas that affect routes + */ + @JsonProperty("routes") + @Nullable + abstract Routes getRoutes(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaResponse.java new file mode 100644 index 00000000000..80dae76d79e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_CreateSpaceQuotaResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create a Space Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSpaceQuotaResponse extends SpaceQuota { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_DeleteSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_DeleteSpaceQuotaRequest.java new file mode 100644 index 00000000000..e5f582ae2b9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_DeleteSpaceQuotaRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete a Space Quota + */ +@Value.Immutable +abstract class _DeleteSpaceQuotaRequest { + + /** + * The space quota id + */ + @JsonIgnore + abstract String getSpaceQuotaId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaRequest.java new file mode 100644 index 00000000000..e1857575db3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Retrieve a Particular Space Quota + */ +@Value.Immutable +abstract class _GetSpaceQuotaRequest { + + /** + * The space quota id + */ + @JsonIgnore + abstract String getSpaceQuotaId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaResponse.java new file mode 100644 index 00000000000..5bf9bf8614b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_GetSpaceQuotaResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Retrieve a Particular Space Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSpaceQuotaResponse extends SpaceQuota { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasRequest.java new file mode 100644 index 00000000000..c524c226ce4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List all Space Quotas + */ +@Value.Immutable +abstract class _ListSpaceQuotasRequest extends PaginatedRequest { + + /** + * Comma-delimited list of space quota guids to filter by + */ + @FilterParameter("guids") + @Nullable + abstract List getGuids(); + + /** + * Comma-delimited list of space quota names to filter by + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * Comma-delimited list of organization guids to filter by + */ + @FilterParameter("organization_guids") + @Nullable + abstract List getOrganizationGuids(); + + /** + * Comma-delimited list of space guids to filter by + */ + @FilterParameter("space_guids") + @Nullable + abstract List getSpaceGuids(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasResponse.java new file mode 100644 index 00000000000..53d39cd58da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_ListSpaceQuotasResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List all Space Quotas + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpaceQuotasResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_RemoveSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_RemoveSpaceQuotaRequest.java new file mode 100644 index 00000000000..38f08bb5254 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_RemoveSpaceQuotaRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload to Remove a space quota from a space + */ +@Value.Immutable +abstract class _RemoveSpaceQuotaRequest { + + /** + * The space quota id + */ + @JsonIgnore + abstract String getSpaceQuotaId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaRelationships.java new file mode 100644 index 00000000000..54aba0ac679 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaRelationships.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Space Quota entity + */ + +@Value.Immutable +@JsonDeserialize +abstract class _SpaceQuotaRelationships { + + /** + * A relationship to the organization where the quota belongs + */ + @JsonProperty("organization") + abstract ToOneRelationship getOrganization(); + + /** + * A relationship to the spaces where the quota is applied + */ + @JsonProperty("spaces") + @Nullable + abstract ToManyRelationship getSpaces(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaResource.java new file mode 100644 index 00000000000..52ea290c717 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_SpaceQuotaResource.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Base class for resources that contain Space Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceQuotaResource extends SpaceQuota { + +} + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaRequest.java new file mode 100644 index 00000000000..2fd7b339fe6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaRequest.java @@ -0,0 +1,68 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.immutables.value.Value; + +/** + * The request payload to update a Space Quota + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateSpaceQuotaRequest { + + /** + * The space quota id + */ + @JsonIgnore + abstract String getSpaceQuotaId(); + + /** + * Name of the quota + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Quotas that affect applications and application sub-resources + */ + @JsonProperty("apps") + @Nullable + abstract Apps getApps(); + + /** + * Quotas that affect services + */ + @JsonProperty("services") + @Nullable + abstract Services getServices(); + + /** + * Quotas that affect routes + */ + @JsonProperty("routes") + @Nullable + abstract Routes getRoutes(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaResponse.java new file mode 100644 index 00000000000..82d57fd80e6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/quotas/spaces/_UpdateSpaceQuotaResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a Space Quota + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateSpaceQuotaResponse extends SpaceQuota { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/ResourceMatchV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/ResourceMatchV3.java new file mode 100644 index 00000000000..b44f661cb54 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/ResourceMatchV3.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.resourcematch; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Resource Matching Client API + */ +public interface ResourceMatchV3 { + + /** + * Makes the List Matching Resources request + * + * @param request the List Matching Resources request + * @return the response from the List Matching Resources request + */ + Mono list(ListMatchingResourcesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_ListMatchingResourcesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_ListMatchingResourcesRequest.java new file mode 100644 index 00000000000..cb64ce10f3b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_ListMatchingResourcesRequest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.resourcematch; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Matching Resources operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ListMatchingResourcesRequest { + @Value.Check + void check() { + if (getResources().isEmpty()) { + throw new IllegalStateException("Resources must have at least 1 resource"); + } + } + + /** + * The resources + */ + abstract List getResources(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_ListMatchingResourcesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_ListMatchingResourcesResponse.java new file mode 100644 index 00000000000..96154230bd8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_ListMatchingResourcesResponse.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.resourcematch; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the List Matching Resources operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListMatchingResourcesResponse { + + /** + * The resources + */ + abstract List getResources(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_MatchedResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_MatchedResource.java new file mode 100644 index 00000000000..77c2d33abf0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/resourcematch/_MatchedResource.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.resourcematch; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Checksum; +import org.immutables.value.Value; + +/** + * A resource used for matching or has been matched + */ +@JsonDeserialize +@Value.Immutable +abstract class _MatchedResource { + + /** + * The hash + */ + @JsonProperty("checksum") + @Nullable + abstract Checksum getChecksum(); + + /** + * The POSIX file mode in an octal representation + */ + @JsonProperty("mode") + @Nullable + abstract String getMode(); + + /** + * The path relative to app root + */ + @JsonProperty("path") + @Nullable + abstract String getPath(); + + /** + * The size + */ + @JsonProperty("size_in_bytes") + @Nullable + abstract Integer getSize(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/Role.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/Role.java new file mode 100644 index 00000000000..57cb3b9e4c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/Role.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are roles + */ +public abstract class Role extends Resource { + + /** + * Relationships of the role + */ + @JsonProperty("relationships") + public abstract RoleRelationships getRelationships(); + + /** + * The type + */ + @JsonProperty("type") + public abstract RoleType getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java new file mode 100644 index 00000000000..6b4c75ffba0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RoleType.java @@ -0,0 +1,99 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import java.util.Arrays; +import java.util.EnumSet; +import java.util.Map; +import java.util.Set; +import java.util.stream.Collectors; + +/** + * The type of a {@link Role} + */ +public enum RoleType { + + /** + * organization_auditor role type + */ + ORGANIZATION_AUDITOR, + + /** + * organization_billing_manager role type + */ + ORGANIZATION_BILLING_MANAGER, + + /** + * organization_manager role type + */ + ORGANIZATION_MANAGER, + + /** + * organization_user role type + */ + ORGANIZATION_USER, + + /** + * space_auditor role type + */ + SPACE_AUDITOR, + + /** + * space_developer role type + */ + SPACE_DEVELOPER, + + /** + * space_manager role type + */ + SPACE_MANAGER; + + public static final Set ORGANIZATION_ROLE_TYPES = + EnumSet.of( + ORGANIZATION_AUDITOR, + ORGANIZATION_BILLING_MANAGER, + ORGANIZATION_MANAGER, + ORGANIZATION_USER); + + public static final Set SPACE_ROLE_TYPES = + EnumSet.of(SPACE_AUDITOR, SPACE_DEVELOPER, SPACE_MANAGER); + + private static final Map NAMES_TO_VALUES = + Arrays.stream(RoleType.values()) + .collect(Collectors.toMap(RoleType::getValue, roleType -> roleType)); + + @JsonCreator + public static RoleType from(String s) { + RoleType roleType = NAMES_TO_VALUES.get(s); + if (roleType == null) { + throw new IllegalArgumentException("Unknown role type: " + s); + } + return roleType; + } + + @JsonValue + public String getValue() { + return name().toLowerCase(); + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RolesV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RolesV3.java new file mode 100644 index 00000000000..33de5585467 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/RolesV3.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Roles V3 Client API + */ +public interface RolesV3 { + + /** + * Makes the Create Role request + * + * @param request the Create Role request + * @return the response from the Create Role request + */ + Mono create(CreateRoleRequest request); + + /** + * Makes the Delete Role request + * + * @param request the Delete Role request + * @return the response from the Delete Role request + */ + Mono delete(DeleteRoleRequest request); + + /** + * Makes the Get Role request + * + * @param request the Get Role request + * @return the response from the Get Role request + */ + Mono get(GetRoleRequest request); + + /** + * Makes the List Roles request + * + * @param request the List Roles request + * @return the response from the List Roles request + */ + Mono list(ListRolesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_CreateRoleRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_CreateRoleRequest.java new file mode 100644 index 00000000000..ae226827be9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_CreateRoleRequest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Create Role operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateRoleRequest { + + @Value.Check + protected void validateRelationships() { + if (RoleType.ORGANIZATION_ROLE_TYPES.contains(getType()) && getRelationships().getOrganization() == null) { + throw new IllegalStateException("An organization relationship is required for an " + getType() + " role"); + } + if (RoleType.SPACE_ROLE_TYPES.contains(getType()) && getRelationships().getSpace() == null) { + throw new IllegalStateException("A space relationship is required for a " + getType() + " role"); + } + } + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract RoleRelationships getRelationships(); + + /** + * The type + */ + @JsonProperty("type") + abstract RoleType getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_CreateRoleResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_CreateRoleResponse.java new file mode 100644 index 00000000000..0015d507903 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_CreateRoleResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Role operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateRoleResponse extends Role { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_DeleteRoleRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_DeleteRoleRequest.java new file mode 100644 index 00000000000..513381133f5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_DeleteRoleRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Role operation + */ +@Value.Immutable +abstract class _DeleteRoleRequest { + + /** + * The role id + */ + @JsonIgnore + abstract String getRoleId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_GetRoleRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_GetRoleRequest.java new file mode 100644 index 00000000000..615867ff8dc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_GetRoleRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Role operation + */ +@Value.Immutable +abstract class _GetRoleRequest { + + /** + * The role id + */ + @JsonIgnore + abstract String getRoleId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_GetRoleResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_GetRoleResponse.java new file mode 100644 index 00000000000..58e02f67480 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_GetRoleResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Role operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetRoleResponse extends Role { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_ListRolesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_ListRolesRequest.java new file mode 100644 index 00000000000..f3c1477e02f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_ListRolesRequest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Roles operation + */ +@Value.Immutable +abstract class _ListRolesRequest extends PaginatedRequest { + + /** + * The role ids filter + */ + @FilterParameter("guids") + abstract List getRoleIds(); + + /** + * The organization ids filter + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The space ids filter + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + + /** + * The types filter + */ + @FilterParameter("types") + abstract List getTypes(); + + /** + * The user ids filter + */ + @FilterParameter("user_guids") + abstract List getUserIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_ListRolesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_ListRolesResponse.java new file mode 100644 index 00000000000..9520ae54573 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_ListRolesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Roles operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRolesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_RoleRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_RoleRelationships.java new file mode 100644 index 00000000000..90c4d99c51e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_RoleRelationships.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The Role relationships + */ +@JsonDeserialize +@Value.Immutable +abstract class _RoleRelationships { + + /** + * The organization relationship + */ + @JsonProperty("organization") + @Nullable + abstract ToOneRelationship getOrganization(); + + /** + * The space relationship + */ + @JsonProperty("space") + @Nullable + abstract ToOneRelationship getSpace(); + + /** + * The user relationship + */ + @JsonProperty("user") + abstract ToOneRelationship getUser(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_RoleResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_RoleResource.java new file mode 100644 index 00000000000..9babda88b0f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/roles/_RoleResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Roles operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RoleResource extends Role { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/Protocol.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/Protocol.java new file mode 100644 index 00000000000..949e9e17ab5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/Protocol.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The protocol of a {@link Route} + */ +public enum Protocol { + + /** + * TCP protocol + */ + TCP("tcp"), + + /** + * HTTP protocol + */ + HTTP("http"); + + private final String value; + + Protocol(String value) { + this.value = value; + } + + @JsonCreator + public static Protocol from(String s) { + switch (s.toLowerCase()) { + case "http": + return HTTP; + case "tcp": + return TCP; + default: + throw new IllegalArgumentException(String.format("Unknown protocol: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/Route.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/Route.java new file mode 100644 index 00000000000..e38d4b95fe3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/Route.java @@ -0,0 +1,72 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are routes + */ +public abstract class Route extends Resource { + + /** + * The destinations + */ + @JsonProperty("destinations") + @Nullable + public abstract List getDestinations(); + + /** + * The host + */ + @JsonProperty("host") + public abstract String getHost(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The path + */ + @JsonProperty("path") + public abstract String getPath(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + public abstract Integer getPort(); + + /** + * The protocol + */ + @JsonProperty("protocol") + @Nullable + public abstract Protocol getProtocol(); + + /** + * The relationships + */ + @JsonProperty("relationships") + public abstract RouteRelationships getRelationships(); + + /** + * The url + */ + @JsonProperty("url") + public abstract String getUrl(); + + /** + * The route options + */ + @JsonProperty("options") + @Nullable + public abstract RouteOptions getOptions(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/RouteDestinations.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/RouteDestinations.java new file mode 100644 index 00000000000..4f720fb48d7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/RouteDestinations.java @@ -0,0 +1,26 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.client.v3.Link; + +/** + * The Route Destinations + */ +public abstract class RouteDestinations { + + /** + * Links to related resources and actions for the resource + */ + @AllowNulls + @JsonProperty("links") + public abstract Map getLinks(); + + /** + * The destinations + */ + @JsonProperty("destinations") + abstract List getDestinations(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/RoutesV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/RoutesV3.java new file mode 100644 index 00000000000..14bd3d4d1dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/RoutesV3.java @@ -0,0 +1,80 @@ +package org.cloudfoundry.client.v3.routes; + +import reactor.core.publisher.Mono; + +public interface RoutesV3 { + + /** + * Makes the Create Route request + * + * @param request the Create Route request + * @return the response from the Create Route request + */ + Mono create(CreateRouteRequest request); + + /** + * Makes the Delete Route request + * + * @param request the Delete Route request + * @return the response from Delete Route request + */ + Mono delete(DeleteRouteRequest request); + + /** + * Makes the Get Route request + * + * @param request the Get Route request + * @return the response from the Get Route request + */ + Mono get(GetRouteRequest request); + + /** + * Makes the Insert Route Destinations request + * + * @param request the Insert Route Destinations request + * @return the response from the Insert Route Destinations request + */ + Mono insertDestinations( + InsertRouteDestinationsRequest request); + + /** + * Makes the List Routes request + * + * @param request the List Route request + * @return the response from the List Route request + */ + Mono list(ListRoutesRequest request); + + /** + * Makes the List Route Destinations request + * + * @param request the List Route Destinations request + * @return the response from the List Route Destinations request + */ + Mono listDestinations(ListRouteDestinationsRequest request); + + /** + * Makes the Remove Route Destinations request + * + * @param request the Remove Route Destinations request + * @return the response from the Remove Route Destinations request + */ + Mono removeDestinations(RemoveRouteDestinationsRequest request); + + /** + * Makes the Replace Route Destinations request + * + * @param request the Replace Route Destinations request + * @return the response from the Replace Route Destinations request + */ + Mono replaceDestinations( + ReplaceRouteDestinationsRequest request); + + /** + * Makes the List Routes request + * + * @param request the List Route request + * @return the response from the List Route request + */ + Mono update(UpdateRouteRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Application.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Application.java new file mode 100644 index 00000000000..cab15f8c5ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Application.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents an application to route traffic to. + */ +@JsonDeserialize +@Value.Immutable +abstract class _Application { + + /** + * The application id + */ + @JsonProperty("guid") + abstract String getApplicationId(); + + /** + * The Process + */ + @JsonProperty("process") + @Nullable + abstract Process getProcess(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_CreateRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_CreateRouteRequest.java new file mode 100644 index 00000000000..7f66e5d9cf0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_CreateRouteRequest.java @@ -0,0 +1,50 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Create Route operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateRouteRequest { + + /** + * The host + */ + @Nullable + @JsonProperty("host") + abstract String getHost(); + + /** + * The metadata + */ + @Nullable + @JsonProperty("metadata") + abstract Metadata getMetadata(); + + /** + * The path + */ + @Nullable + @JsonProperty("path") + abstract String getPath(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract RouteRelationships getRelationships(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_CreateRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_CreateRouteResponse.java new file mode 100644 index 00000000000..3d6357fc397 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_CreateRouteResponse.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateRouteResponse extends Route { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_DeleteRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_DeleteRouteRequest.java new file mode 100644 index 00000000000..9d0b5e9b12c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_DeleteRouteRequest.java @@ -0,0 +1,18 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Route operation + */ +@Value.Immutable +abstract class _DeleteRouteRequest { + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Destination.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Destination.java new file mode 100644 index 00000000000..13a7fcc13d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Destination.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a Route Destination + */ +@JsonDeserialize +@Value.Immutable +abstract class _Destination { + + /** + * The application + */ + @JsonProperty("app") + abstract Application getApplication(); + + /** + * The destination id + */ + @JsonProperty("guid") + @Nullable + abstract String getDestinationId(); + + /** + * The port + */ + @JsonProperty("port") + @Nullable + abstract Integer getPort(); + + /** + * The id + */ + @JsonProperty("weight") + @Nullable + abstract Integer getWeight(); + + /** + * The id + */ + @JsonProperty("protocol") + @Nullable + abstract String getProtocol(); + + /** + * When the entity was created + */ + @JsonProperty("created_at") + @Nullable + abstract String getCreatedAt(); + + /** + * When the entity was updated + */ + @JsonProperty("updated_at") + @Nullable + abstract String getUpdatedAt(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_GetRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_GetRouteRequest.java new file mode 100644 index 00000000000..4d084ecc9d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_GetRouteRequest.java @@ -0,0 +1,18 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Route operation + */ +@Value.Immutable +abstract class _GetRouteRequest { + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_GetRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_GetRouteResponse.java new file mode 100644 index 00000000000..1b5171eaa1a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_GetRouteResponse.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetRouteResponse extends Route { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_InsertRouteDestinationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_InsertRouteDestinationsRequest.java new file mode 100644 index 00000000000..d277fd2ac3a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_InsertRouteDestinationsRequest.java @@ -0,0 +1,29 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Insert Route Destinations operation + */ +@JsonSerialize +@Value.Immutable +abstract class _InsertRouteDestinationsRequest { + + /** + * The destinations to add to the route + */ + @JsonProperty("destinations") + abstract List getDestinations(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_InsertRouteDestinationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_InsertRouteDestinationsResponse.java new file mode 100644 index 00000000000..5432d16b7d3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_InsertRouteDestinationsResponse.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Insert Route Destinations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _InsertRouteDestinationsResponse extends RouteDestinations { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRouteDestinationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRouteDestinationsRequest.java new file mode 100644 index 00000000000..75b97920829 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRouteDestinationsRequest.java @@ -0,0 +1,34 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Route Destinations operation + */ +@Value.Immutable +abstract class _ListRouteDestinationsRequest extends PaginatedRequest { + + /** + * The application ids filter + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * The destination ids filter + */ + @FilterParameter("guids") + abstract List getDestinationIds(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRouteDestinationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRouteDestinationsResponse.java new file mode 100644 index 00000000000..8f26786914c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRouteDestinationsResponse.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the List Route Destinations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRouteDestinationsResponse extends RouteDestinations { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRoutesRequest.java new file mode 100644 index 00000000000..3be6096f2bd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRoutesRequest.java @@ -0,0 +1,65 @@ +package org.cloudfoundry.client.v3.routes; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Routes operation + */ +@Value.Immutable +abstract class _ListRoutesRequest extends PaginatedRequest { + + /** + * The application ids filter + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * The domain ids filter + */ + @FilterParameter("domain_guids") + abstract List getDomainIds(); + + /** + * The hosts filter + */ + @FilterParameter("hosts") + abstract List getHosts(); + + /** + * A query string containing a list of label selector requirements + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The organization ids filter + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The paths filter + */ + @FilterParameter("paths") + abstract List getPaths(); + + /** + * The ports filter + */ + @FilterParameter("ports") + abstract List getPorts(); + + /** + * The space ids filter + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRoutesResponse.java new file mode 100644 index 00000000000..559f159ff55 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ListRoutesResponse.java @@ -0,0 +1,14 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Routes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRoutesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Process.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Process.java new file mode 100644 index 00000000000..f4d2d7b4c96 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_Process.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Represents a route Process type. + */ +@JsonDeserialize +@Value.Immutable +abstract class _Process { + + /** + * The type + */ + @JsonProperty("type") + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RemoveRouteDestinationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RemoveRouteDestinationsRequest.java new file mode 100644 index 00000000000..1f047822af9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RemoveRouteDestinationsRequest.java @@ -0,0 +1,24 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Remove Route Destination operation + */ +@Value.Immutable +abstract class _RemoveRouteDestinationsRequest { + + /** + * The destination id + */ + @JsonIgnore + abstract String getDestinationId(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ReplaceRouteDestinationsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ReplaceRouteDestinationsRequest.java new file mode 100644 index 00000000000..735aa4e8adb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ReplaceRouteDestinationsRequest.java @@ -0,0 +1,29 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Replace Route Destination operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ReplaceRouteDestinationsRequest { + + /** + * The destinations for the route + */ + @JsonProperty("destinations") + abstract List getDestinations(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ReplaceRouteDestinationsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ReplaceRouteDestinationsResponse.java new file mode 100644 index 00000000000..d0417546fff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_ReplaceRouteDestinationsResponse.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Replace Route Destinations operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ReplaceRouteDestinationsResponse extends RouteDestinations { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteOptions.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteOptions.java new file mode 100644 index 00000000000..0c8bc8b15c3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteOptions.java @@ -0,0 +1,22 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a Route Options + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouteOptions { + + /** + * The loadbalancing + */ + @JsonProperty("loadbalancing") + @Nullable + public abstract String getLoadbalancing(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteRelationships.java new file mode 100644 index 00000000000..e86164a08ed --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteRelationships.java @@ -0,0 +1,27 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The Route relationships + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouteRelationships { + + /** + * The domain relationship + */ + @JsonProperty("domain") + abstract ToOneRelationship getDomain(); + + /** + * The space relationship + */ + @JsonProperty("space") + abstract ToOneRelationship getSpace(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteResource.java new file mode 100644 index 00000000000..d7ccc800e9e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_RouteResource.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List routes operation + */ +@JsonDeserialize +@Value.Immutable +public abstract class _RouteResource extends Route { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_UpdateRouteRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_UpdateRouteRequest.java new file mode 100644 index 00000000000..e375cdeac1f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_UpdateRouteRequest.java @@ -0,0 +1,30 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Route operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateRouteRequest { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The route id + */ + @JsonIgnore + abstract String getRouteId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_UpdateRouteResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_UpdateRouteResponse.java new file mode 100644 index 00000000000..c87543b7b4d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/routes/_UpdateRouteResponse.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.routes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Route operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateRouteResponse extends Route { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractBindSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractBindSecurityGroupRequest.java new file mode 100644 index 00000000000..daef64716e7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractBindSecurityGroupRequest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.List; +import org.cloudfoundry.client.v3.Relationship; + +@JsonSerialize +public abstract class AbstractBindSecurityGroupRequest { + + /** + * The Security Group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * A relationship to the spaces where the security_group is applied to + * applications during runtime + */ + @JsonProperty("data") + abstract List getBoundSpaces(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractBindSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractBindSecurityGroupResponse.java new file mode 100644 index 00000000000..65838436474 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractBindSecurityGroupResponse.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.List; +import java.util.Map; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Relationship; + +@JsonDeserialize +public abstract class AbstractBindSecurityGroupResponse { + + /** + * A relationship to the spaces where the security_group is applied to applications during + * runtime + */ + @JsonProperty("data") + abstract List getBoundSpaces(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + public abstract Map getLinks(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractListSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractListSecurityGroupRequest.java new file mode 100644 index 00000000000..1a29e8e83cb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractListSecurityGroupRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.PaginatedRequest; +import org.cloudfoundry.client.v3.FilterParameter; + +public abstract class AbstractListSecurityGroupRequest extends PaginatedRequest { + + /** + * The Space id + */ + @JsonIgnore + abstract String getSpaceId(); + + /** + * The security group ids filter + */ + @FilterParameter("guids") + @Nullable + abstract List getSecurityGroupIds(); + + /** + * The security group names filter + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractUnbindSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractUnbindSecurityGroupRequest.java new file mode 100644 index 00000000000..7903a2bdacf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/AbstractUnbindSecurityGroupRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +public abstract class AbstractUnbindSecurityGroupRequest { + + /** + * The Security Group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * The Space id + */ + @JsonIgnore + abstract String getSpaceId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/Protocol.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/Protocol.java new file mode 100644 index 00000000000..7bd2e1eb0e3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/Protocol.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The protocol of a Security Group + */ +public enum Protocol { + + /** + * All protocols + */ + ALL("all"), + + /** + * ICMP protocol + */ + ICMP("icmp"), + + /** + * TCP protocol + */ + TCP("tcp"), + + /** + * UDP protocol + */ + UDP("udp"); + + private final String value; + + Protocol(String value) { + this.value = value; + } + + @JsonCreator + public static Protocol from(String s) { + switch (s.toLowerCase()) { + case "all": + return ALL; + case "icmp": + return ICMP; + case "tcp": + return TCP; + case "udp": + return UDP; + default: + throw new IllegalArgumentException(String.format("Unknown protocol: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/SecurityGroup.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/SecurityGroup.java new file mode 100644 index 00000000000..0ac31fc985f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/SecurityGroup.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import java.util.List; +import org.cloudfoundry.client.v3.Resource; + +/** + * The entity response payload for the Security Group resource + */ +@JsonDeserialize +public abstract class SecurityGroup extends Resource { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The globally enabled + */ + @JsonProperty("globally_enabled") + abstract GloballyEnabled getGloballyEnabled(); + + /** + * The rules + */ + @JsonProperty("rules") + abstract List getRules(); + + /** + * The space relationships + */ + @JsonProperty("relationships") + abstract Relationships getRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/SecurityGroupsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/SecurityGroupsV3.java new file mode 100644 index 00000000000..daf492453f5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/SecurityGroupsV3.java @@ -0,0 +1,136 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import reactor.core.publisher.Mono; + +public interface SecurityGroupsV3 { + + /** + * Makes the Creating + * a Security Group request. + * + * @param request the Create Security Group request + * @return the response from the Create Security Group request + */ + Mono create(CreateSecurityGroupRequest request); + + /** + * Makes the Get + * a Security Group request. + * + * @param request the Get Security Group request + * @return the response from the Get Security Group request + */ + Mono get(GetSecurityGroupRequest request); + + /** + * Makes the List + * Security Groups request + * + * @param request the List Security Group request + * @return the response from the List Security Group request + */ + Mono list(ListSecurityGroupsRequest request); + + /** + * Makes the Update + * Security Groups request + * + * @param request the Update Security Group request + * @return the response from the Update Security Group request + */ + Mono update(UpdateSecurityGroupRequest request); + + /** + * Makes the Delete + * Security Groups request + * + * @param request the Delete Security Group request + * @return the response from the Delete Security Group request + */ + Mono delete(DeleteSecurityGroupRequest request); + + /** + * Makes the Bind + * Staging Security Group request + * + * @param request the Bind Staging Security Group request + * @return the response from the Bind Staging Security Group request + */ + Mono bindStagingSecurityGroup( + BindStagingSecurityGroupRequest request); + + /** + * Makes the Bind + * Running Security Group request + * + * @param request the Bind Running Security Group request + * @return the response from the Bind Running Security Group request + */ + Mono bindRunningSecurityGroup( + BindRunningSecurityGroupRequest request); + + /** + * Makes the Unbind + * Staging + * Security Group request + * + * @param request the Unbind Staging Security Group request + * @return the response from the Unbind staging Security Group request + */ + Mono unbindStagingSecurityGroup(UnbindStagingSecurityGroupRequest request); + + /** + * Makes the Unbind + * Running + * Security Groups request + * + * @param request the Unbind Staging Running Security Group request + * @return the response from the Unbind Running Security Group request + */ + Mono unbindRunningSecurityGroup(UnbindRunningSecurityGroupRequest request); + + /** + * Makes the List + * Running Security Groups request + * + * @param request the List Staging Security Group request + * @return the response from the List Staging Security Group request + */ + Mono listStaging(ListStagingSecurityGroupsRequest request); + + /** + * Makes the List + * Running Security Groups request + * + * @param request the List Staging Security Group request + * @return the response from the List Running Security Group request + */ + Mono listRunning(ListRunningSecurityGroupsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindRunningSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindRunningSecurityGroupRequest.java new file mode 100644 index 00000000000..0e14195fc77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindRunningSecurityGroupRequest.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonSerialize +@Value.Immutable +abstract class _BindRunningSecurityGroupRequest extends AbstractBindSecurityGroupRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindRunningSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindRunningSecurityGroupResponse.java new file mode 100644 index 00000000000..e299671f9af --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindRunningSecurityGroupResponse.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize +@Value.Immutable +public abstract class _BindRunningSecurityGroupResponse extends AbstractBindSecurityGroupResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindStagingSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindStagingSecurityGroupRequest.java new file mode 100644 index 00000000000..36ce1fcadae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindStagingSecurityGroupRequest.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonSerialize +@Value.Immutable +abstract class _BindStagingSecurityGroupRequest extends AbstractBindSecurityGroupRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindStagingSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindStagingSecurityGroupResponse.java new file mode 100644 index 00000000000..920c3eee7d4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_BindStagingSecurityGroupResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize +@Value.Immutable +public abstract class _BindStagingSecurityGroupResponse extends AbstractBindSecurityGroupResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_CreateSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_CreateSecurityGroupRequest.java new file mode 100644 index 00000000000..e2d6b4f6c02 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_CreateSecurityGroupRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Create a Security Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSecurityGroupRequest { + + /** + * The security group name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * the security group glbally enabled field + */ + @JsonProperty("globally_enabled") + @Nullable + abstract GloballyEnabled getGloballyEnabled(); + + /** + * The security group rules + */ + @JsonProperty("rules") + @Nullable + abstract List getRules(); + + /** + * The security group relationships + */ + @JsonProperty("relationships") + @Nullable + abstract Relationships getRelationships(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_CreateSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_CreateSecurityGroupResponse.java new file mode 100644 index 00000000000..5b7f6f8ccd9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_CreateSecurityGroupResponse.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Creating a Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSecurityGroupResponse extends SecurityGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_DeleteSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_DeleteSecurityGroupRequest.java new file mode 100644 index 00000000000..48b0e7d20e2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_DeleteSecurityGroupRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Security Group operation + */ +@Value.Immutable +abstract class _DeleteSecurityGroupRequest { + + /** + * The Security Group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GetSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GetSecurityGroupRequest.java new file mode 100644 index 00000000000..e001a6dbf9c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GetSecurityGroupRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Security Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _GetSecurityGroupRequest { + + /** + * The Security Group id + */ + @JsonIgnore + abstract String getSecurityGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GetSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GetSecurityGroupResponse.java new file mode 100644 index 00000000000..aab7d9d91ed --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GetSecurityGroupResponse.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the get Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSecurityGroupResponse extends SecurityGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GloballyEnabled.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GloballyEnabled.java new file mode 100644 index 00000000000..bf89201cbb2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_GloballyEnabled.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Controls if the group is applied globally to the lifecycle of all applications + */ +@JsonDeserialize +@Value.Immutable +abstract class _GloballyEnabled { + + /** + * Specifies whether the group should be applied globally to all running applications + */ + @JsonProperty("running") + @Nullable + abstract Boolean getRunning(); + + /** + * Specifies whether the group should be applied globally to all staging applications + */ + @JsonProperty("staging") + @Nullable + abstract Boolean getStaging(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListRunningSecurityGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListRunningSecurityGroupsRequest.java new file mode 100644 index 00000000000..45e37d9a8f9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListRunningSecurityGroupsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + + +/** + * The request payload for the List running Security Group operation + */ + +@Value.Immutable +abstract class _ListRunningSecurityGroupsRequest extends AbstractListSecurityGroupRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListRunningSecurityGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListRunningSecurityGroupsResponse.java new file mode 100644 index 00000000000..0a6ec345a27 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListRunningSecurityGroupsResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +import org.cloudfoundry.client.v3.PaginatedResponse; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * The response payload for the List Security Groups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListRunningSecurityGroupsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListSecurityGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListSecurityGroupsRequest.java new file mode 100644 index 00000000000..e8a4a0be880 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListSecurityGroupsRequest.java @@ -0,0 +1,70 @@ +/* + * Copyright 2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.Nullable; +import java.util.List; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +/** + * The request payload for the List Security Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ListSecurityGroupsRequest extends PaginatedRequest { + + /** + * The security group ids filter + */ + @FilterParameter("guids") + abstract List getSecurityGroupIds(); + + /** + * The security group names filter + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * the security group globally enabled running filter + */ + @FilterParameter("globally_enabled_running") + @Nullable + abstract Boolean getGloballyEnabledRunning(); + + /** + * the security group globally enabled staging filter + */ + @FilterParameter("globally_enabled_staging") + @Nullable + abstract Boolean getGloballyEnabledStagingBoolean(); + + /** + * the security group running_space_guids filter + */ + @FilterParameter("running_space_guids") + @Nullable + abstract List getRunningSpaceIds(); + + /** + * the security group staging_space_guids filter + */ + @FilterParameter("staging_space_guids") + @Nullable + abstract List getStagingSpaceIds(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListSecurityGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListSecurityGroupsResponse.java new file mode 100644 index 00000000000..f19bfc76136 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListSecurityGroupsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +import org.cloudfoundry.client.v3.PaginatedResponse; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * The response payload for the List Security Groups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSecurityGroupsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListStagingSecurityGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListStagingSecurityGroupsRequest.java new file mode 100644 index 00000000000..d85b8c9c01c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListStagingSecurityGroupsRequest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + + +/** + * The request payload for the List staging Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListStagingSecurityGroupsRequest extends AbstractListSecurityGroupRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListStagingSecurityGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListStagingSecurityGroupsResponse.java new file mode 100644 index 00000000000..1109b7a60a7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_ListStagingSecurityGroupsResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +import org.cloudfoundry.client.v3.PaginatedResponse; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +/** + * The response payload for the List Security Groups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListStagingSecurityGroupsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_Relationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_Relationships.java new file mode 100644 index 00000000000..e9d782cbac7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_Relationships.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.immutables.value.Value; + +/** + * Holds relationships to running/staging spaces where security groups is + * applied + */ +@JsonDeserialize +@Value.Immutable +abstract class _Relationships { + + /** + * A relationship to the spaces where the security_group is applied to + * applications during runtime + */ + @JsonProperty("running_spaces") + abstract ToManyRelationship getRunningSpaces(); + + /** + * A relationship to the spaces where the security_group is applied to + * applications during runtime + */ + @JsonProperty("staging_spaces") + abstract ToManyRelationship getStagingSpaces(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_Rule.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_Rule.java new file mode 100644 index 00000000000..b24119e0f89 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_Rule.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A security group rule + */ +@JsonDeserialize +@Value.Immutable +abstract class _Rule { + + /** + * The code control signal for icmp + */ + @JsonProperty("code") + @Nullable + abstract Integer getCode(); + + /** + * The description of the rule + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The destination + */ + @JsonProperty("destination") + @Nullable + abstract String getDestination(); + + /** + * Enables logging for the egress rule + */ + @JsonProperty("log") + @Nullable + abstract Boolean getLog(); + + /** + * The ports + */ + @JsonProperty("ports") + @Nullable + abstract String getPorts(); + + /** + * The protocol + */ + @JsonProperty("protocol") + @Nullable + abstract Protocol getProtocol(); + + /** + * The type control signal for icmp + */ + @JsonProperty("type") + @Nullable + abstract Integer getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_SecurityGroupResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_SecurityGroupResource.java new file mode 100644 index 00000000000..339559f111f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_SecurityGroupResource.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + + +/** + * The Resource response payload for the List SecurityGroups operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SecurityGroupResource extends SecurityGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UnbindRunningSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UnbindRunningSecurityGroupRequest.java new file mode 100644 index 00000000000..b9666f90422 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UnbindRunningSecurityGroupRequest.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +/** + * The request payload for the Unbind Running Security Group operation + */ +@Value.Immutable +abstract class _UnbindRunningSecurityGroupRequest extends AbstractUnbindSecurityGroupRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UnbindStagingSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UnbindStagingSecurityGroupRequest.java new file mode 100644 index 00000000000..7c0f3a34b88 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UnbindStagingSecurityGroupRequest.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +/** + * The request payload for the Unbind Staging Security Group operation + */ +@Value.Immutable +abstract class _UnbindStagingSecurityGroupRequest extends AbstractUnbindSecurityGroupRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UpdateSecurityGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UpdateSecurityGroupRequest.java new file mode 100644 index 00000000000..a5ce3eed999 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UpdateSecurityGroupRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import org.immutables.value.Value; + +import java.util.List; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonIgnore; + +/** + * The request payload for the Create a Security Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateSecurityGroupRequest { + + /** + * Id of the security group + */ + @JsonIgnore + abstract String getSecurityGroupId(); + + /** + * Name of the security group + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Object that controls if the group is applied globally to the lifecycle of all applications + */ + @JsonProperty("globally_enabled") + abstract GloballyEnabled getGloballyEnabled(); + + /** + * Rules that will be applied by this security group + */ + @JsonProperty("rules") + abstract List getRules(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UpdateSecurityGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UpdateSecurityGroupResponse.java new file mode 100644 index 00000000000..42f5dfa05e7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/securitygroups/_UpdateSecurityGroupResponse.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update a Security Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateSecurityGroupResponse extends SecurityGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBinding.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBinding.java new file mode 100644 index 00000000000..ffd616c2c7a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBinding.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.LastOperation; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are service bindings + */ +public abstract class ServiceBinding extends Resource { + + /** + * The name + */ + @JsonProperty("name") + @Nullable + public abstract String getName(); + + /** + * The type + */ + @JsonProperty("type") + public abstract ServiceBindingType getType(); + + /** + * The last operation + */ + @JsonProperty("last_operation") + @Nullable + public abstract LastOperation getLastOperation(); + + /** + * The relationships + */ + @JsonProperty("relationships") + public abstract ServiceBindingRelationships getRelationships(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBindingType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBindingType.java new file mode 100644 index 00000000000..d057c0dbc4a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBindingType.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The service credential binding type + */ +public enum ServiceBindingType { + + /** + * Indicates that the service binding is to an application + */ + APPLICATION("app"), + + /** + * Indicates that the service binding is a key + */ + KEY("key"); + + private final String value; + + ServiceBindingType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBindingsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBindingsV3.java new file mode 100644 index 00000000000..3e0558b19b8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/ServiceBindingsV3.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Bindings V3 Client API + */ +public interface ServiceBindingsV3 { + + /** + * Makes the Create a service credential binding request + * + * @param request the Create Service Binding request + * @return the response from the Create Service Binding request + */ + Mono create(CreateServiceBindingRequest request); + + /** + * Makes the Delete a service credential binding request + * + * @param request the Delete Service Binding request + * @return the response from the Delete Service Binding request + */ + Mono delete(DeleteServiceBindingRequest request); + + /** + * Makes the Get a service credential binding request + * + * @param request the Get Service Binding request + * @return the response from the Get Service Binding request + */ + Mono get(GetServiceBindingRequest request); + + /** + * Makes the Get a service credential binding details request + * + * @param request the Get Service Binding Details request + * @return the response from the Get Service Binding Details request + */ + Mono getDetails(GetServiceBindingDetailsRequest request); + + /** + * Makes the Get parameters a service credential binding request + * + * @param request the Get Service Binding Parameters request + * @return the response from the Get Service Binding Parameters request + */ + Mono getParameters( + GetServiceBindingParametersRequest request); + + /** + * Makes the List service credential bindings request + * + * @param request the List Service Bindings request + * @return the response from the List Service Bindings request + */ + Mono list(ListServiceBindingsRequest request); + + /** + * Makes the Update a service credential bindings request + * + * @param request the Update Service Bindings request + * @return the response from the Update Service Bindings request + */ + Mono update(UpdateServiceBindingRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_CreateServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_CreateServiceBindingRequest.java new file mode 100644 index 00000000000..5a5ecee9b05 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_CreateServiceBindingRequest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request payload for the Create Service Binding operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceBindingRequest { + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract ServiceBindingRelationships getRelationships(); + + /** + * The type + */ + @JsonProperty("type") + abstract ServiceBindingType getType(); + + /** + * The parameters + */ + @JsonProperty("parameters") + @Nullable + @AllowNulls + abstract Map getParameters(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + @Value.Check + void validateParameters() { + if (ServiceBindingType.KEY.equals(getType()) && getName() == null) { + throw new IllegalStateException("A name is required for a service binding of type 'key'"); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_CreateServiceBindingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_CreateServiceBindingResponse.java new file mode 100644 index 00000000000..787050e680d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_CreateServiceBindingResponse.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import org.immutables.value.Value; + +import java.util.Optional; + +/** + * The response payload for Create Service Binding + */ +@Value.Immutable +abstract class _CreateServiceBindingResponse { + + public abstract Optional getJobId(); + + public abstract Optional getServiceBinding(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_DeleteServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_DeleteServiceBindingRequest.java new file mode 100644 index 00000000000..e392dd7fd33 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_DeleteServiceBindingRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service Binding operation. + */ +@Value.Immutable +abstract class _DeleteServiceBindingRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingDetailsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingDetailsRequest.java new file mode 100644 index 00000000000..585021dee0d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingDetailsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Binding Details operation. + */ +@Value.Immutable +abstract class _GetServiceBindingDetailsRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingDetailsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingDetailsResponse.java new file mode 100644 index 00000000000..03a50c5f056 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingDetailsResponse.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The response payload for the Get Service Binding Details operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceBindingDetailsResponse { + + /** + * The credentials + */ + @JsonProperty("credentials") + @AllowNulls + abstract Map getCredentials(); + + /** + * The syslog drain url + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The volume mounts + */ + @JsonProperty("volume_mounts") + abstract List getVolumeMounts(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingParametersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingParametersRequest.java new file mode 100644 index 00000000000..2fd53a1f671 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingParametersRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Binding Parameters operation. + */ +@Value.Immutable +abstract class _GetServiceBindingParametersRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingParametersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingParametersResponse.java new file mode 100644 index 00000000000..441b9f03cb8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingParametersResponse.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Map; + +/** + * The response payload for the Get Service Binding Parameters operation + */ +@JsonDeserialize(using = _GetServiceBindingParametersResponse.ServiceBindingParametersResponseDeserializer.class) +@Value.Immutable +abstract class _GetServiceBindingParametersResponse { + + /** + * The parameters + */ + @AllowNulls + abstract Map getParameters(); + + static final class ServiceBindingParametersResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 1L; + + ServiceBindingParametersResponseDeserializer() { + super(GetServiceBindingParametersResponse.class); + } + + @Override + public GetServiceBindingParametersResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return GetServiceBindingParametersResponse.builder() + .parameters(p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingRequest.java new file mode 100644 index 00000000000..a8aa498f01b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Service Binding operation. + */ +@Value.Immutable +abstract class _GetServiceBindingRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingResponse.java new file mode 100644 index 00000000000..0e29e60ac1c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_GetServiceBindingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for Get Service Binding + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceBindingResponse extends ServiceBinding { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ListServiceBindingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ListServiceBindingsRequest.java new file mode 100644 index 00000000000..253cedbcf9a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ListServiceBindingsRequest.java @@ -0,0 +1,99 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Bindings operation. + */ +@Value.Immutable +abstract class _ListServiceBindingsRequest extends PaginatedRequest { + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * The service instance ids + */ + @FilterParameter("service_instance_guids") + abstract List getServiceInstanceIds(); + + /** + * The service instance names + */ + @FilterParameter("service_instance_names") + abstract List getServiceInstanceNames(); + + /** + * The application ids + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * The application names + */ + @FilterParameter("app_names") + abstract List getAppNames(); + + /** + * The service plan ids + */ + @FilterParameter("service_plan_guids") + abstract List getServicePlanIds(); + + /** + * The service plan names + */ + @FilterParameter("service_plan_names") + abstract List getServicePlanNames(); + + /** + * The service offering ids + */ + @FilterParameter("service_offering_guids") + abstract List getServiceOfferingIds(); + + /** + * The service offering names + */ + @FilterParameter("service_offering_names") + abstract List getServiceOfferingNames(); + + /** + * The type + */ + @FilterParameter("type") + @Nullable + abstract ServiceBindingType getType(); + + /** + * The ids + */ + @FilterParameter("guids") + abstract List getIds(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ListServiceBindingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ListServiceBindingsResponse.java new file mode 100644 index 00000000000..600b12cca55 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ListServiceBindingsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Bindings operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceBindingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingRelationships.java new file mode 100644 index 00000000000..0a90f88d5bb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingRelationships.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Create Service Binding request + */ +@Value.Immutable +@JsonDeserialize +abstract class _ServiceBindingRelationships { + + /** + * The application relationship + */ + @JsonProperty("app") + @Nullable + abstract ToOneRelationship getApplication(); + + /** + * The service instance relationship + */ + @JsonProperty("service_instance") + abstract ToOneRelationship getServiceInstance(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingResource.java new file mode 100644 index 00000000000..ff6b9a5b6b6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_ServiceBindingResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Service Bindings operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBindingResource extends ServiceBinding { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_UpdateServiceBindingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_UpdateServiceBindingRequest.java new file mode 100644 index 00000000000..a3b0ddc89e3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_UpdateServiceBindingRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Service Binding operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServiceBindingRequest { + + /** + * The service binding id + */ + @JsonIgnore + abstract String getServiceBindingId(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_UpdateServiceBindingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_UpdateServiceBindingResponse.java new file mode 100644 index 00000000000..59e4c157a55 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebindings/_UpdateServiceBindingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Service Binding operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServiceBindingResponse extends ServiceBinding { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/Authentication.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/Authentication.java new file mode 100644 index 00000000000..bfbca1f206c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/Authentication.java @@ -0,0 +1,15 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import java.util.Map; + +@JsonSerialize +abstract class Authentication { + + @JsonProperty("credentials") + abstract Map getCredentials(); + + @JsonProperty("type") + abstract String getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/ServiceBroker.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/ServiceBroker.java new file mode 100644 index 00000000000..95a02d83cee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/ServiceBroker.java @@ -0,0 +1,25 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +public abstract class ServiceBroker extends Resource { + + @AllowNulls + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + @JsonProperty("name") + public abstract String getName(); + + @JsonProperty("relationships") + @Nullable + public abstract ServiceBrokerRelationships getRelationships(); + + @JsonProperty("url") + public abstract String getUrl(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/ServiceBrokersV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/ServiceBrokersV3.java new file mode 100644 index 00000000000..f007b7cafa3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/ServiceBrokersV3.java @@ -0,0 +1,49 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Brokers V3 Client API + */ +public interface ServiceBrokersV3 { + + /** + * Makes the Create a service broker request + * + * @param request the Create Service Broker request + * @return the response from the Create Service Broker request + */ + Mono create(CreateServiceBrokerRequest request); + + /** + * Makes the Delete a service broker request + * + * @param request the Delete Service Broker request + * @return the response from the Delete Service Broker request + */ + Mono delete(DeleteServiceBrokerRequest request); + + /** + * Makes the Get a service broker request + * + * @param request the Get Service Broker request + * @return the response from the Get Service Broker request + */ + Mono get(GetServiceBrokerRequest request); + + /** + * Makes the List service brokers request + * + * @param request the List Service Brokers request + * @return the response from the List Service Brokers request + */ + Mono list(ListServiceBrokersRequest request); + + /** + * Makes the Update a service broker request + * + * @param request the Update Service Broker request + * @return the response from the Update Service Broker request + */ + Mono update(UpdateServiceBrokerRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_BasicAuthentication.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_BasicAuthentication.java new file mode 100644 index 00000000000..02f11e2848c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_BasicAuthentication.java @@ -0,0 +1,33 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import java.util.HashMap; +import java.util.Map; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +@Value.Immutable +abstract class _BasicAuthentication extends Authentication { + + @JsonIgnore + abstract String getUsername(); + + @JsonIgnore + abstract String getPassword(); + + @Value.Derived + Map getCredentials() { + Map credentials = new HashMap<>(); + credentials.put("username", getUsername()); + credentials.put("password", getPassword()); + return credentials; + } + + @Value.Derived + String getType() { + return "basic"; + } + + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_CreateServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_CreateServiceBrokerRequest.java new file mode 100644 index 00000000000..e4d6b6e094d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_CreateServiceBrokerRequest.java @@ -0,0 +1,33 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceBrokerRequest { + + @JsonProperty("authentication") + abstract Authentication getAuthentication(); + + @JsonProperty("name") + abstract String getName(); + + @AllowNulls + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + @JsonProperty("relationships") + @Nullable + abstract ServiceBrokerRelationships getRelationships(); + + @JsonProperty("url") + abstract String getUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_DeleteServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_DeleteServiceBrokerRequest.java new file mode 100644 index 00000000000..3633949c6a2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_DeleteServiceBrokerRequest.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +@Value.Immutable +abstract class _DeleteServiceBrokerRequest { + + @JsonIgnore + abstract String getServiceBrokerId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_GetServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_GetServiceBrokerRequest.java new file mode 100644 index 00000000000..b512340f08e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_GetServiceBrokerRequest.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +@Value.Immutable +abstract class _GetServiceBrokerRequest { + + @JsonIgnore + abstract String getServiceBrokerId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_GetServiceBrokerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_GetServiceBrokerResponse.java new file mode 100644 index 00000000000..42ee6ced71b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_GetServiceBrokerResponse.java @@ -0,0 +1,11 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceBrokerResponse extends ServiceBroker { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ListServiceBrokersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ListServiceBrokersRequest.java new file mode 100644 index 00000000000..dae007a04de --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ListServiceBrokersRequest.java @@ -0,0 +1,25 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import java.util.List; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _ListServiceBrokersRequest extends PaginatedRequest { + + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + @FilterParameter("names") + @Nullable + abstract List getNames(); + + @FilterParameter("space_guids") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ListServiceBrokersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ListServiceBrokersResponse.java new file mode 100644 index 00000000000..38f2385fbda --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ListServiceBrokersResponse.java @@ -0,0 +1,12 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceBrokersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ServiceBrokerRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ServiceBrokerRelationships.java new file mode 100644 index 00000000000..4ea68121898 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ServiceBrokerRelationships.java @@ -0,0 +1,18 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBrokerRelationships { + + @JsonProperty("space") + @Nullable + abstract ToOneRelationship getSpace(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ServiceBrokerResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ServiceBrokerResource.java new file mode 100644 index 00000000000..8eb96bb3985 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_ServiceBrokerResource.java @@ -0,0 +1,11 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBrokerResource extends ServiceBroker { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_UpdateServiceBrokerRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_UpdateServiceBrokerRequest.java new file mode 100644 index 00000000000..79c991cc42c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_UpdateServiceBrokerRequest.java @@ -0,0 +1,36 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; + +@JsonSerialize +@Value.Immutable +abstract class _UpdateServiceBrokerRequest { + + @JsonProperty("authentication") + @Nullable + abstract Authentication getAuthentication(); + + @JsonProperty("name") + @Nullable + abstract String getName(); + + @AllowNulls + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + @JsonIgnore + abstract String getServiceBrokerId(); + + @JsonProperty("url") + @Nullable + abstract String getUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_UpdateServiceBrokerResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_UpdateServiceBrokerResponse.java new file mode 100644 index 00000000000..53ac0124773 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/servicebrokers/_UpdateServiceBrokerResponse.java @@ -0,0 +1,14 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import java.util.Optional; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _UpdateServiceBrokerResponse { + + public abstract Optional jobId(); + + public abstract Optional serviceBroker(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstance.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstance.java new file mode 100644 index 00000000000..e7eda648aa0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstance.java @@ -0,0 +1,107 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.LastOperation; +import org.cloudfoundry.client.v3.MaintenanceInfo; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are service instances + */ +public abstract class ServiceInstance extends Resource { + + /** + * The dashboard url + */ + @JsonProperty("dashboard_url") + @Nullable + public abstract String getDashboardUrl(); + + /** + * The last operation + */ + @JsonProperty("last_operation") + @Nullable + public abstract LastOperation getLastOperation(); + + /** + * The maintenance info + */ + @JsonProperty("maintenance_info") + @Nullable + public abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract ServiceInstanceRelationships getRelationships(); + + /** + * The route service url + */ + @JsonProperty("route_service_url") + @Nullable + public abstract String getRouteServiceUrl(); + + /** + * The syslog drain url + */ + @JsonProperty("syslog_drain_url") + @Nullable + public abstract String getSyslogDrainUrl(); + + /** + * A list of tags for the service instance + */ + @JsonProperty("tags") + @Nullable + public abstract List getTags(); + + /** + * The type of the service instance + */ + @JsonProperty("type") + @Nullable + public abstract ServiceInstanceType getType(); + + /** + * Whether or not an upgrade of this service instance is available on the current Service Plan + */ + @JsonProperty("upgrade_available") + @Nullable + public abstract Boolean getUpdateAvailable(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstanceType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstanceType.java new file mode 100644 index 00000000000..e30ec65ac91 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstanceType.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The protocol of a {@link ServiceInstance} + */ +public enum ServiceInstanceType { + + /** + * Managed service instance + */ + MANAGED("managed"), + + /** + * User provided service instance + */ + USER_PROVIDED("user-provided"); + + private final String value; + + ServiceInstanceType(String value) { + this.value = value; + } + + @JsonCreator + public static ServiceInstanceType from(String s) { + switch (s.toLowerCase()) { + case "managed": + return MANAGED; + case "user-provided": + return USER_PROVIDED; + default: + throw new IllegalArgumentException( + String.format("Unknown service instance type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstancesV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstancesV3.java new file mode 100644 index 00000000000..9253035ef1f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/ServiceInstancesV3.java @@ -0,0 +1,118 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import java.util.Optional; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Instances V3 Client API + */ +public interface ServiceInstancesV3 { + + /** + * Makes the + * Create A Service Instance request + * + * @param request the Create Service Instance request + * @return the response from Create Service Instance request + */ + Mono create(CreateServiceInstanceRequest request); + + /** + * Makes the + * Get A Service Instance request + * + * @param request the Get Service Instance request + * @return the response from Get Service Instance request + */ + Mono get(GetServiceInstanceRequest request); + + /** + * Makes the + * Delete A Service Instance request + * + * @param request the Delete Service Instance request + * @return the response from Delete Service Instance request + */ + Mono> delete(DeleteServiceInstanceRequest request); + + /** + * Makes the + * Get parameters for a managed service instance request + * + * @param request the Get Managed Service Parameters request + * @return the response from Get Managed Service Parameters request + */ + Mono getManagedServiceParameters( + GetManagedServiceParametersRequest request); + + /** + * Makes the + * Get credentials for a user-provided service instance request + * + * @param request the Get User Provided Credentials request + * @return the response from Get User provided Credentials request + */ + Mono getUserProvidedCredentials( + GetUserProvidedCredentialsRequest request); + + /** + * Makes the List service instances request + * + * @param request the List Service Instances request + * @return the response from the List Service Instances request + */ + Mono list(ListServiceInstancesRequest request); + + /** + * Makes the + * List shared spaces relationship request + * + * @param request the List Shared Spaces Relationship request + * @return the response from the List Shared Spaces Relationship request + */ + Mono listSharedSpacesRelationship( + ListSharedSpacesRelationshipRequest request); + + /** + * Makes the + * Share a service instance to other spaces request + * + * @param request the Share Service Instance To Other Spaces request + * @return the response from the Share Service Instance To Other Spaces request + */ + Mono share(ShareServiceInstanceRequest request); + + /** + * Makes the + * Unshare a service instance from another space request + * + * @param request the Unshare Service Instance From Another Space request + * @return the response from the Unshare Service Instance From Another Space request + */ + Mono unshare(UnshareServiceInstanceRequest request); + + /** + * Makes the + * Update a service instance request + * + * @param request the Update Service Instance request + * @return the response from the Update Service Instance request + */ + Mono update(UpdateServiceInstanceRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_CreateServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_CreateServiceInstanceRequest.java new file mode 100644 index 00000000000..ab22c64d7fe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_CreateServiceInstanceRequest.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the Create Service operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateServiceInstanceRequest { + + /** + * The type of the service instance + */ + @JsonProperty("type") + abstract ServiceInstanceType getType(); + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + abstract ServiceInstanceRelationships getRelationships(); + + /** + * A list of tags for the service instance + */ + @JsonProperty("tags") + @Nullable + abstract List getTags(); + + /** + * The service creation parameters + */ + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The user provided service credentials + */ + @JsonProperty("credentials") + @Nullable + abstract Map getCredentials(); + + /** + * The syslog drain url + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The route service url + */ + @JsonProperty("route_service_url") + @Nullable + abstract String getRouteServiceUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_CreateServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_CreateServiceInstanceResponse.java new file mode 100644 index 00000000000..ebc8a2498be --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_CreateServiceInstanceResponse.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.Optional; + +/** + * The response payload for the Update Service operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateServiceInstanceResponse { + + abstract Optional getJobId(); + + abstract Optional getServiceInstance(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_DeleteServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_DeleteServiceInstanceRequest.java new file mode 100644 index 00000000000..b9f166568ab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_DeleteServiceInstanceRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Create Service operation + */ +@Value.Immutable +abstract class _DeleteServiceInstanceRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetManagedServiceParametersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetManagedServiceParametersRequest.java new file mode 100644 index 00000000000..f82d49bf80f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetManagedServiceParametersRequest.java @@ -0,0 +1,16 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +@Value.Immutable +abstract class _GetManagedServiceParametersRequest { + + /** + * The managed service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetManagedServiceParametersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetManagedServiceParametersResponse.java new file mode 100644 index 00000000000..47c6ff934b2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetManagedServiceParametersResponse.java @@ -0,0 +1,23 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import java.util.Map; + +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@Value.Immutable +@JsonDeserialize +abstract class _GetManagedServiceParametersResponse { + + /** + * + * @return parameters as map + */ + @JsonAnyGetter + @AllowNulls + abstract Map getParameters(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetServiceInstanceRequest.java new file mode 100644 index 00000000000..9c15df2ad78 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetServiceInstanceRequest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Create Service operation + */ +@Value.Immutable +abstract class _GetServiceInstanceRequest { + + @JsonIgnore + abstract String getServiceInstanceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetServiceInstanceResponse.java new file mode 100644 index 00000000000..a615d2a6f60 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetServiceInstanceResponse.java @@ -0,0 +1,10 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@Value.Immutable +@JsonDeserialize +abstract class _GetServiceInstanceResponse extends ServiceInstance { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetUserProvidedCredentialsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetUserProvidedCredentialsRequest.java new file mode 100644 index 00000000000..74bb66dccf5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetUserProvidedCredentialsRequest.java @@ -0,0 +1,15 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonIgnore; + +@Value.Immutable +abstract class _GetUserProvidedCredentialsRequest { + + /** + * The user provided service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetUserProvidedCredentialsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetUserProvidedCredentialsResponse.java new file mode 100644 index 00000000000..fbf1fb24625 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_GetUserProvidedCredentialsResponse.java @@ -0,0 +1,22 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import java.util.Map; + +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +@Value.Immutable +@JsonDeserialize +abstract class _GetUserProvidedCredentialsResponse { + + /** + * + * @return credentials as map + */ + @JsonAnyGetter + @AllowNulls + abstract Map getCredentials(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListServiceInstancesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListServiceInstancesRequest.java new file mode 100644 index 00000000000..afca8f45f73 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListServiceInstancesRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Instances operation. + */ +@Value.Immutable +abstract class _ListServiceInstancesRequest extends PaginatedRequest { + + /** + * The metadata query + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The service instance names + */ + @FilterParameter("names") + abstract List getServiceInstanceNames(); + + /** + * The space ids + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListServiceInstancesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListServiceInstancesResponse.java new file mode 100644 index 00000000000..844ad7e57f3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListServiceInstancesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Instances operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceInstancesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListSharedSpacesRelationshipRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListSharedSpacesRelationshipRequest.java new file mode 100644 index 00000000000..de32452cd93 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListSharedSpacesRelationshipRequest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the List Shared Spaces Relationship operation + */ +@Value.Immutable +abstract class _ListSharedSpacesRelationshipRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListSharedSpacesRelationshipResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListSharedSpacesRelationshipResponse.java new file mode 100644 index 00000000000..26fee359810 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ListSharedSpacesRelationshipResponse.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The response payload for the List Shared Spaces Relationship operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSharedSpacesRelationshipResponse { + + /** + * The shared space + */ + @JsonProperty("data") + @Nullable + abstract List getData(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + @Nullable + abstract Map getLinks(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ServiceInstanceRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ServiceInstanceRelationships.java new file mode 100644 index 00000000000..ab91b3dca8e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ServiceInstanceRelationships.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The service instance relationship + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceInstanceRelationships { + + /** + * The space relationship + */ + @JsonProperty("service_plan") + @Nullable + abstract ToOneRelationship getServicePlan(); + + /** + * The space relationship + */ + @JsonProperty("space") + @Nullable + abstract ToOneRelationship getSpace(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ServiceInstanceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ServiceInstanceResource.java new file mode 100644 index 00000000000..25cb39fec77 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ServiceInstanceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the List Service Instances operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ServiceInstanceResource extends ServiceInstance { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ShareServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ShareServiceInstanceRequest.java new file mode 100644 index 00000000000..22a99655b20 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ShareServiceInstanceRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Share Service Instance operation. + */ +@JsonSerialize +@Value.Immutable +abstract class _ShareServiceInstanceRequest { + + /** + * The spaces the service instance is shared to + */ + @JsonProperty("data") + abstract List getData(); + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ShareServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ShareServiceInstanceResponse.java new file mode 100644 index 00000000000..0ff297a761c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_ShareServiceInstanceResponse.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Link; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The response payload for the Share Service Instance operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ShareServiceInstanceResponse { + + /** + * The space + */ + @JsonProperty("data") + @Nullable + abstract List getData(); + + /** + * The links + */ + @AllowNulls + @JsonProperty("links") + @Nullable + abstract Map getLinks(); + + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UnshareServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UnshareServiceInstanceRequest.java new file mode 100644 index 00000000000..dca86bb53d1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UnshareServiceInstanceRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Unshare Service Instance operation. + */ +@Value.Immutable +abstract class _UnshareServiceInstanceRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UpdateServiceInstanceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UpdateServiceInstanceRequest.java new file mode 100644 index 00000000000..88936d03174 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UpdateServiceInstanceRequest.java @@ -0,0 +1,106 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.MaintenanceInfo; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request payload for the Update Service operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServiceInstanceRequest { + + /** + * The service instance id + */ + @JsonIgnore + abstract String getServiceInstanceId(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + abstract ServiceInstanceRelationships getRelationships(); + + /** + * A list of tags for the service instance + */ + @JsonProperty("tags") + @Nullable + abstract List getTags(); + + /** + * The service creation parameters + */ + @JsonProperty("parameters") + @Nullable + abstract Map getParameters(); + + /** + * The user provided service credentials + */ + @JsonProperty("credentials") + @Nullable + abstract Map getCredentials(); + + /** + * The syslog drain url + */ + @JsonProperty("syslog_drain_url") + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The route service url + */ + @JsonProperty("route_service_url") + @Nullable + abstract String getRouteServiceUrl(); + + /** + * The maintenance info object + */ + @JsonProperty("maintenance_info") + @Nullable + abstract MaintenanceInfo maintenanceInfo(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UpdateServiceInstanceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UpdateServiceInstanceResponse.java new file mode 100644 index 00000000000..79d0f15058f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceinstances/_UpdateServiceInstanceResponse.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.Optional; + +/** + * The response payload for the Update Service operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServiceInstanceResponse { + + abstract Optional getJobId(); + + abstract Optional getServiceInstance(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/ServiceOffering.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/ServiceOffering.java new file mode 100644 index 00000000000..a4aa3868414 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/ServiceOffering.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are service offerings + */ +public abstract class ServiceOffering extends Resource { + + /** + * Whether the service offering is available + */ + @JsonProperty("available") + public abstract Boolean getAvailable(); + + /** + * The broker catalog + */ + @JsonProperty("broker_catalog") + public abstract BrokerCatalog getBrokerCatalog(); + + /** + * The description + */ + @JsonProperty("description") + public abstract String getDescription(); + + /** + * The documentation url + */ + @JsonProperty("documentation_url") + public abstract String getDocumentationUrl(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract ServiceOfferingRelationships getRelationships(); + + /** + * A list of permissions that the user would have to give the service + */ + @JsonProperty("requires") + @Nullable + public abstract List getRequires(); + + /** + * Whether or not service instances of this service offering can be shared across organizations and spaces + */ + @JsonProperty("shareable") + public abstract Boolean getShareable(); + + /** + * A list of tags for the service offering + */ + @JsonProperty("tags") + @Nullable + public abstract List getTags(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/ServiceOfferingsV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/ServiceOfferingsV3.java new file mode 100644 index 00000000000..480e6fbbd7d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/ServiceOfferingsV3.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Offerings V3 Client API + */ +public interface ServiceOfferingsV3 { + + /** + * Makes the Delete a service offering request + * + * @param request the Delete a Service Offering request + * @return the response from the Delete a Service Offering request + */ + Mono delete(DeleteServiceOfferingRequest request); + + /** + * Makes the Get a service offering request + * + * @param request the Get a Service Offering request + * @return the response from the Get a Service Offering request + */ + Mono get(GetServiceOfferingRequest request); + + /** + * Makes the List service offerings request + * + * @param request the List Service Offerings request + * @return the response from the List Service Offerings request + */ + Mono list(ListServiceOfferingsRequest request); + + /** + * Makes the Update a service offering request + * + * @param request the Update a Service Offering request + * @return the response from the Update a Service Offering request + */ + Mono update(UpdateServiceOfferingRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_BrokerCatalog.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_BrokerCatalog.java new file mode 100644 index 00000000000..d446b6f2b6b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_BrokerCatalog.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * Broker Catalog information for a Service Offering + */ +@JsonDeserialize +@Value.Immutable +abstract class _BrokerCatalog { + + /** + * The identifier that the service broker provided for this service offering + */ + @JsonProperty("id") + abstract String getBrokerCatalogId(); + + /** + * Broker-related features of the service offering + */ + @JsonProperty("features") + abstract Features getFeatures(); + + /** + * The metadata + */ + @AllowNulls + @JsonProperty("metadata") + @Nullable + abstract Map getMetadata(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_DeleteServiceOfferingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_DeleteServiceOfferingRequest.java new file mode 100644 index 00000000000..b5cb8ddd733 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_DeleteServiceOfferingRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service Offering operation. + */ +@Value.Immutable +abstract class _DeleteServiceOfferingRequest { + + /** + * Whether any service plans, instances, and bindings associated with this service offering will also be deleted + */ + @QueryParameter("purge") + @Nullable + abstract Boolean getPurge(); + + /** + * The service offering id + */ + @JsonIgnore + abstract String getServiceOfferingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_Features.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_Features.java new file mode 100644 index 00000000000..c09d827bb13 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_Features.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Broker Catalog information for a Service Offering + */ +@JsonDeserialize +@Value.Immutable +abstract class _Features { + + /** + * Whether service instance updates relating only to context are propagated to the service broker + */ + @JsonProperty("allow_context_updates") + @Nullable + abstract Boolean getAllowContextUpdates(); + + /** + * Whether service instances of the service can be bound to applications + */ + @JsonProperty("bindable") + abstract Boolean getBindable(); + + /** + * Whether the Fetching a service binding endpoint is supported for all service plans + */ + @JsonProperty("bindings_retrievable") + abstract Boolean getBindingsRetrievable(); + + /** + * Whether the Fetching a service instance endpoint is supported for all service plans + */ + @JsonProperty("instances_retrievable") + abstract Boolean getInstancesRetrievable(); + + /** + * Whether the service offering supports upgrade/downgrade for service plans by default + */ + @JsonProperty("plan_updateable") + abstract Boolean getPlanUpdateable(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_GetServiceOfferingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_GetServiceOfferingRequest.java new file mode 100644 index 00000000000..f8c1500ea23 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_GetServiceOfferingRequest.java @@ -0,0 +1 @@ +/* * Copyright 2013-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.cloudfoundry.client.v3.serviceofferings; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; /** * The request payload for the Get Service Offering operation */ @Value.Immutable abstract class _GetServiceOfferingRequest { /** * The service offering id */ @JsonIgnore abstract String getServiceOfferingId(); } \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_GetServiceOfferingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_GetServiceOfferingResponse.java new file mode 100644 index 00000000000..e8939dd72d7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_GetServiceOfferingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Service Offering operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServiceOfferingResponse extends ServiceOffering { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ListServiceOfferingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ListServiceOfferingsRequest.java new file mode 100644 index 00000000000..81290c0f5cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ListServiceOfferingsRequest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Offerings operation + */ +@Value.Immutable +abstract class _ListServiceOfferingsRequest extends PaginatedRequest { + + /** + * Whether the service offering is available + */ + @FilterParameter("available") + @Nullable + abstract Boolean getAvailable(); + + /** + * List of label selectors + */ + @QueryParameter("label_selector") + @Nullable + abstract List getLabelSelector(); + + /** + * List of names to filter by + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * List of organization ids to filter by + */ + @FilterParameter("organization_guids") + @Nullable + abstract List getOrganizationIds(); + + /** + * List of service broker ids to filter by + */ + @FilterParameter("service_broker_guids") + @Nullable + abstract List getServiceBrokerIds(); + + /** + * List of service broker names to filter by + */ + @FilterParameter("service_broker_names") + @Nullable + abstract List getServiceBrokerNames(); + + /** + * List of space ids to filter by + */ + @FilterParameter("space_guids") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ListServiceOfferingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ListServiceOfferingsResponse.java new file mode 100644 index 00000000000..45b680a5203 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ListServiceOfferingsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Offerings operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServiceOfferingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ServiceOfferingRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ServiceOfferingRelationships.java new file mode 100644 index 00000000000..06bf054d65c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ServiceOfferingRelationships.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The Service Offering relationships + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceOfferingRelationships { + + /** + * The service broker relationship + */ + @JsonProperty("service_broker") + abstract ToOneRelationship getServiceBroker(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ServiceOfferingResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ServiceOfferingResource.java new file mode 100644 index 00000000000..2661b56b8ab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_ServiceOfferingResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Service Offerings operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceOfferingResource extends ServiceOffering { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_UpdateServiceOfferingRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_UpdateServiceOfferingRequest.java new file mode 100644 index 00000000000..e6d459ecd13 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_UpdateServiceOfferingRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Service Offering operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServiceOfferingRequest { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The service offering id + */ + @JsonIgnore + abstract String getServiceOfferingId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_UpdateServiceOfferingResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_UpdateServiceOfferingResponse.java new file mode 100644 index 00000000000..de7ebd8c6c6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceofferings/_UpdateServiceOfferingResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Service Offering operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServiceOfferingResponse extends ServiceOffering { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/ServicePlan.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/ServicePlan.java new file mode 100644 index 00000000000..d40b40fb2f6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/ServicePlan.java @@ -0,0 +1,99 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are Service Plans + */ +public abstract class ServicePlan extends Resource { + + /** + * Whether or not the service plan is available + */ + @JsonProperty("available") + public abstract Boolean getAvailable(); + + /** + * Information obtained from the service broker catalog + */ + @JsonProperty("broker_catalog") + public abstract BrokerCatalog getBrokerCatalog(); + + /** + * The cost of the service plan as obtained from the service broker catalog + */ + @JsonProperty("costs") + public abstract List getCosts(); + + /** + * Description of the service plan + */ + @JsonProperty("description") + public abstract String getDescription(); + + /** + * Whether or not the service plan is free of charge + */ + @JsonProperty("free") + public abstract Boolean getFree(); + + /** + * Information about the version of this service plan + */ + @JsonProperty("maintenance_info") + @Nullable + public abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The metadata + */ + @AllowNulls + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name of the service plan + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + public abstract ServicePlanRelationships getRelationships(); + + /** + * Schema definitions for service instances and service bindings for the service plan + */ + @JsonProperty("schemas") + public abstract Schemas getSchemas(); + + /** + * Denotes the visibility of the plan + */ + @JsonProperty("visibility_type") + public abstract Visibility getVisibilityType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/ServicePlansV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/ServicePlansV3.java new file mode 100644 index 00000000000..af75a242fb1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/ServicePlansV3.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Plans Client API + */ +public interface ServicePlansV3 { + + /** + * Makes the Delete Service Plan request + * + * @param request the Delete Service Plan request + * @return the response from the Delete Service Plan request + */ + Mono delete(DeleteServicePlanRequest request); + + /** + * Makes the Get Service Plan request + * + * @param request the Get Service Plan request + * @return the response from the Get Service Plan request + */ + Mono get(GetServicePlanRequest request); + + /** + * Makes the List Service Plan request + * + * @param request the List Service Plans request + * @return the response from the List Service Plans request + */ + Mono list(ListServicePlansRequest request); + + /** + * Makes the Upload Service Plan request + * + * @param request the Update Service Plan request + * @return the response from the Update Service Plan request + */ + Mono update(UpdateServicePlanRequest request); + + /** + * Makes the Upload Service Plan request + * + * @param request the Update Service Plan Visibility request + * @return the response from the Update Service Plan Visibility request + */ + Mono updateVisibility( + UpdateServicePlanVisibilityRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/Visibility.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/Visibility.java new file mode 100644 index 00000000000..7af3ae603cf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/Visibility.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The visibility of a {@link ServicePlan} + */ +public enum Visibility { + + /** + * Only Admin, Admin Read-Only and Global Auditor can see the service plan + */ + ADMIN("admin"), + + /** + * Restricted to members of a set of organizations + */ + ORGANIZATION("organization"), + + /** + * Everyone, including unauthenticated users can see the service plan + */ + PUBLIC("public"), + + /** + * Restricted to members of a space; only possible if the plan comes from a space-scoped service broker + */ + SPACE("space"); + + private final String value; + + Visibility(String value) { + this.value = value; + } + + @JsonCreator + public static Visibility from(String s) { + switch (s.toLowerCase()) { + case "admin": + return ADMIN; + case "organization": + return ORGANIZATION; + case "public": + return PUBLIC; + case "space": + return SPACE; + default: + throw new IllegalArgumentException(String.format("Unknown visibility: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_BrokerCatalog.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_BrokerCatalog.java new file mode 100644 index 00000000000..1fd2020b96d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_BrokerCatalog.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * Broker Catalog information for a Service Plan + */ +@JsonDeserialize +@Value.Immutable +abstract class _BrokerCatalog { + + /** + * The identifier that the service broker provided for this service plan + */ + @JsonProperty("id") + abstract String getBrokerCatalogId(); + + /** + * Broker-related features of the Service Plan + */ + @JsonProperty("features") + abstract Features getFeatures(); + + /** + * The maximum number of seconds that Cloud Foundry will wait for an asynchronous service broker operation + */ + @JsonProperty("maximum_polling_duration") + @Nullable + abstract Integer getMaximumPollingDuration(); + + /** + * The metadata + */ + @AllowNulls + @JsonProperty("metadata") + @Nullable + abstract Map getMetadata(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Cost.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Cost.java new file mode 100644 index 00000000000..09b4206533b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Cost.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Cost data for a Service Plan + */ +@JsonDeserialize +@Value.Immutable +abstract class _Cost { + + /** + * Pricing amount + */ + @JsonProperty("amount") + abstract Float getAmount(); + + /** + * Currency code for the pricing amount + */ + @JsonProperty("currency") + abstract String getCurrency(); + + /** + * Display name for type of cost, e.g. Monthly, Hourly, Request, GB + */ + @JsonProperty("unit") + abstract String getUnit(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_DeleteServicePlanRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_DeleteServicePlanRequest.java new file mode 100644 index 00000000000..18967779d87 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_DeleteServicePlanRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Service Plan operation + */ +@Value.Immutable +abstract class _DeleteServicePlanRequest { + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Features.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Features.java new file mode 100644 index 00000000000..48f23a029c5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Features.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * Broker Catalog information for a Service Plan + */ +@JsonDeserialize +@Value.Immutable +abstract class _Features { + + /** + * Whether service instances of the service can be bound to applications + */ + @JsonProperty("bindable") + abstract Boolean getBindable(); + + /** + * Whether the service plan supports upgrade/downgrade for service plans + */ + @JsonProperty("plan_updateable") + abstract Boolean getPlanUpdateable(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_GetServicePlanRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_GetServicePlanRequest.java new file mode 100644 index 00000000000..83a8f45b993 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_GetServicePlanRequest.java @@ -0,0 +1 @@ +/* * Copyright 2013-2021 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.cloudfoundry.client.v3.serviceplans; import com.fasterxml.jackson.annotation.JsonIgnore; import org.immutables.value.Value; /** * The request payload for the Get Service Plan operation */ @Value.Immutable abstract class _GetServicePlanRequest { /** * The service plan id */ @JsonIgnore abstract String getServicePlanId(); } \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_GetServicePlanResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_GetServicePlanResponse.java new file mode 100644 index 00000000000..b54bc9de5b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_GetServicePlanResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Service Plan operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetServicePlanResponse extends ServicePlan { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ListServicePlansRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ListServicePlansRequest.java new file mode 100644 index 00000000000..fb071afaf81 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ListServicePlansRequest.java @@ -0,0 +1,110 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Service Plans operation + */ +@Value.Immutable +abstract class _ListServicePlansRequest extends PaginatedRequest { + + /** + * Whether the service plan is available + */ + @FilterParameter("available") + @Nullable + abstract Boolean getAvailable(); + + /** + * List of IDs provided by the service broker for the service plan to filter by + */ + @FilterParameter("broker_catalog_ids") + @Nullable + abstract List getBrokerCatalogIds(); + + /** + * List of label selectors + */ + @QueryParameter("label_selector") + @Nullable + abstract List getLabelSelector(); + + /** + * List of names to filter by + */ + @FilterParameter("names") + @Nullable + abstract List getNames(); + + /** + * List of organization ids to filter by + */ + @FilterParameter("organization_guids") + @Nullable + abstract List getOrganizationIds(); + + /** + * List of service broker ids to filter by + */ + @FilterParameter("service_broker_guids") + @Nullable + abstract List getServiceBrokerIds(); + + /** + * List of service broker names to filter by + */ + @FilterParameter("service_broker_names") + @Nullable + abstract List getServiceBrokerNames(); + + /** + * List of service instance ids to filter by + */ + @FilterParameter("service_instance_guids") + @Nullable + abstract List getServiceInstanceIds(); + + /** + * List of service offering ids to filter by + */ + @FilterParameter("service_offering_guids") + @Nullable + abstract List getServiceOfferingIds(); + + /** + * List of service offering names to filter by + */ + @FilterParameter("service_offering_names") + @Nullable + abstract List getServiceOfferingNames(); + + /** + * List of space ids to filter by + */ + @FilterParameter("space_guids") + @Nullable + abstract List getSpaceIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ListServicePlansResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ListServicePlansResponse.java new file mode 100644 index 00000000000..827e138ea50 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ListServicePlansResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Service Plans operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListServicePlansResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_MaintenanceInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_MaintenanceInfo.java new file mode 100644 index 00000000000..91202225e3b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_MaintenanceInfo.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Maintenance Info for a Service Plan + */ +@JsonDeserialize +@Value.Immutable +abstract class _MaintenanceInfo { + + /** + * A textual explanation associated with this version + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The current semantic version of the service plan + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Organization.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Organization.java new file mode 100644 index 00000000000..5e6da84ee5e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Organization.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Organization for a Service Plan Visibility + */ +@JsonSerialize +@Value.Immutable +abstract class _Organization { + + /** + * The GUID of the organization + */ + @JsonProperty("guid") + abstract String getGuid(); + + /** + * The name of the organization + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Parameters.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Parameters.java new file mode 100644 index 00000000000..acaed357ec2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Parameters.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The entity representing service plan schema parameters + */ +@JsonDeserialize +@Value.Immutable +abstract class _Parameters { + + /** + * The JSON schema + */ + @JsonProperty("$schema") + @Nullable + abstract String getJsonSchema(); + + /** + * The parameter properties + */ + @JsonProperty("properties") + @Nullable + abstract Map getProperties(); + + /** + * The parameter type + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Schema.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Schema.java new file mode 100644 index 00000000000..4afd732b13b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Schema.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing a service plan schema + */ +@JsonDeserialize +@Value.Immutable +abstract class _Schema { + + /** + * The schema parameters + */ + @AllowNulls + @JsonProperty("parameters") + @Nullable + abstract Parameters getParameters(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Schemas.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Schemas.java new file mode 100644 index 00000000000..139828d809e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_Schemas.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing service plan schemas + */ +@JsonDeserialize +@Value.Immutable +abstract class _Schemas { + + /** + * The service binding schema + */ + @AllowNulls + @JsonProperty("service_binding") + @Nullable + abstract ServiceBindingSchema getServiceBinding(); + + /** + * The service instance schema + */ + @JsonProperty("service_instance") + abstract ServiceInstanceSchema getServiceInstance(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServiceBindingSchema.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServiceBindingSchema.java new file mode 100644 index 00000000000..684b109f2a7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServiceBindingSchema.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing a service binding schema + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceBindingSchema { + + /** + * The create schema + */ + @JsonProperty("create") + @Nullable + abstract Schema getCreate(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServiceInstanceSchema.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServiceInstanceSchema.java new file mode 100644 index 00000000000..a3fc0b1a887 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServiceInstanceSchema.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The entity representing a service instance schema + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServiceInstanceSchema { + + /** + * The create schema + */ + @JsonProperty("create") + abstract Schema getCreate(); + + /** + * The update schema + */ + @JsonProperty("update") + @Nullable + abstract Schema getUpdate(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServicePlanRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServicePlanRelationships.java new file mode 100644 index 00000000000..bede57d18dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServicePlanRelationships.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The Service Plan relationships + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServicePlanRelationships { + + /** + * The space relationship + */ + @JsonProperty("service_offering") + abstract ToOneRelationship getServiceOffering(); + + /** + * The space relationship + */ + @JsonProperty("space") + @Nullable + abstract ToOneRelationship getSpace(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServicePlanResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServicePlanResource.java new file mode 100644 index 00000000000..72db87c0cf2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_ServicePlanResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Service Plans operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ServicePlanResource extends ServicePlan { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanRequest.java new file mode 100644 index 00000000000..5a21532b9dc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Service Plan operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServicePlanRequest { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanResponse.java new file mode 100644 index 00000000000..bac6c0356a6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Service Plan operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServicePlanResponse extends ServicePlan { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanVisibilityRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanVisibilityRequest.java new file mode 100644 index 00000000000..dbb59a73526 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanVisibilityRequest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Update Service Plan Visibility operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateServicePlanVisibilityRequest { + + /** + * The service plan id + */ + @JsonIgnore + abstract String getServicePlanId(); + + /** + * Denotes the visibility of the plan + */ + @JsonProperty("type") + abstract Visibility getType(); + + /** + * The organizations where the service plan is visible + */ + @JsonProperty("organizations") + @Nullable + abstract List getOrganizations(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanVisibilityResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanVisibilityResponse.java new file mode 100644 index 00000000000..5c58e6650d4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/serviceplans/_UpdateServicePlanVisibilityResponse.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the Update Service Plan operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateServicePlanVisibilityResponse { + + /** + * Denotes the visibility of the plan + */ + @JsonProperty("type") + abstract Visibility getType(); + + /** + * The organizations where the service plan is visible + */ + @JsonProperty("organizations") + @Nullable + abstract List getOrganizations(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/Space.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/Space.java new file mode 100644 index 00000000000..0ea0fc9d09e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/Space.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are spaces + */ +public abstract class Space extends Resource { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract SpaceRelationships getRelationships(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/SpacesV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/SpacesV3.java new file mode 100644 index 00000000000..9a08546582f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/SpacesV3.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Spaces V3 Client API + */ +public interface SpacesV3 { + + Mono applyManifest(ApplyManifestRequest request); + + /** + * Makes the Assign an Isolation Segment request + * + * @param request the Assign an Isolation Segment request + * @return the response from the Assign an Isolation Segment request + */ + Mono assignIsolationSegment( + AssignSpaceIsolationSegmentRequest request); + + /** + * Makes the Get Space request + * + * @param request the Create Space request + * @return the response from the Create Space request + */ + Mono create(CreateSpaceRequest request); + + /** + * Makes the Delete Space request + * + * @param request the Delete Space request + * @return the response from the Delete Space request + */ + Mono delete(DeleteSpaceRequest request); + + /** + * Makes the Delete Unmapped Routes request + * + * @param request the Delete Unmapped Routes in Space request + * @return the response from the Delete Unmapped Routes in Space request + */ + Mono deleteUnmappedRoutes(DeleteUnmappedRoutesRequest request); + + /** + * Makes the Get Space request + * + * @param request the Get Space request + * @return the response from the Get Space request + */ + Mono get(GetSpaceRequest request); + + /** + * Makes the Get Assigned Isolation Segment request + * + * @param request the Get Assigned Isolation Segment request + * @return the response from the Get Assigned Isolation Segment request + */ + Mono getIsolationSegment( + GetSpaceIsolationSegmentRequest request); + + /** + * Makes the List Spaces request + * + * @param request the List Spaces request + * @return the response from the List Spaces request + */ + Mono list(ListSpacesRequest request); + + /** + * Makes the Update a Space request + * + * @param request the Update Space request + * @return the response from the Update Space request + */ + Mono update(UpdateSpaceRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ApplyManifestRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ApplyManifestRequest.java new file mode 100644 index 00000000000..34bf40d137b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ApplyManifestRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The response payload for the apply manifest operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ApplyManifestRequest { + /** + * The manifest to apply + */ + @JsonIgnore + abstract byte[] getManifest(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ApplyManifestResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ApplyManifestResponse.java new file mode 100644 index 00000000000..f0f853398ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ApplyManifestResponse.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.Optional; + +/** + * The response payload for the apply manifest operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplyManifestResponse { + + /** + * The Job ID + */ + public abstract Optional getJobId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_AssignSpaceIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_AssignSpaceIsolationSegmentRequest.java new file mode 100644 index 00000000000..34588fa1e14 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_AssignSpaceIsolationSegmentRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Relationship; +import org.immutables.value.Value; + +/** + * The request payload for the Assign Isolation Segment operation + */ +@JsonSerialize +@Value.Immutable +abstract class _AssignSpaceIsolationSegmentRequest { + + /** + * The isolation segment to assign + */ + @JsonProperty("data") + @Nullable + abstract Relationship getData(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_AssignSpaceIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_AssignSpaceIsolationSegmentResponse.java new file mode 100644 index 00000000000..1241c2bcb81 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_AssignSpaceIsolationSegmentResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.RelationshipResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Assign Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _AssignSpaceIsolationSegmentResponse extends RelationshipResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_CreateSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_CreateSpaceRequest.java new file mode 100644 index 00000000000..e0a701f1817 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_CreateSpaceRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Create Space operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateSpaceRequest { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The relationships + */ + @JsonProperty("relationships") + abstract SpaceRelationships getRelationships(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_CreateSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_CreateSpaceResponse.java new file mode 100644 index 00000000000..3db7342b12c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_CreateSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateSpaceResponse extends Space { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_DeleteSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_DeleteSpaceRequest.java new file mode 100644 index 00000000000..f1ccbf92220 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_DeleteSpaceRequest.java @@ -0,0 +1,18 @@ +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Unmapped Routes operation + */ +@Value.Immutable +abstract class _DeleteSpaceRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_DeleteUnmappedRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_DeleteUnmappedRoutesRequest.java new file mode 100644 index 00000000000..90245a51244 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_DeleteUnmappedRoutesRequest.java @@ -0,0 +1,18 @@ +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Unmapped Routes operation + */ +@Value.Immutable +abstract class _DeleteUnmappedRoutesRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceIsolationSegmentRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceIsolationSegmentRequest.java new file mode 100644 index 00000000000..4670db3cf7a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceIsolationSegmentRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Isolation Segment operation + */ +@Value.Immutable +abstract class _GetSpaceIsolationSegmentRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceIsolationSegmentResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceIsolationSegmentResponse.java new file mode 100644 index 00000000000..c93374b6fc4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceIsolationSegmentResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.RelationshipResponse; +import org.immutables.value.Value; + +/** + * The response payload for the Get Isolation Segment operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSpaceIsolationSegmentResponse extends RelationshipResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceRequest.java new file mode 100644 index 00000000000..6f031200411 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Space operation + */ +@Value.Immutable +abstract class _GetSpaceRequest { + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceResponse.java new file mode 100644 index 00000000000..41c9845502b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_GetSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetSpaceResponse extends Space { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ListSpacesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ListSpacesRequest.java new file mode 100644 index 00000000000..05a1693e51d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ListSpacesRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Spaces operation. + */ +@Value.Immutable +abstract class _ListSpacesRequest extends PaginatedRequest { + + /** + * List of space names to filter by + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * List of organization ids to filter by + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ListSpacesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ListSpacesResponse.java new file mode 100644 index 00000000000..31b52f60b8e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_ListSpacesResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Spaces operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListSpacesResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_SpaceRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_SpaceRelationships.java new file mode 100644 index 00000000000..9e3b0057360 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_SpaceRelationships.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Create Space request + */ +@Value.Immutable +@JsonDeserialize +abstract class _SpaceRelationships { + + /** + * The organization relationship + */ + @JsonProperty("organization") + abstract ToOneRelationship getOrganization(); + + /** + * The quota relationship + */ + @JsonProperty("quota") + @Nullable + abstract ToOneRelationship getQuota(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_SpaceResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_SpaceResource.java new file mode 100644 index 00000000000..4b3d3d72563 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_SpaceResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Spaces operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _SpaceResource extends Space { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_UpdateSpaceRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_UpdateSpaceRequest.java new file mode 100644 index 00000000000..67e86e6b7f2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_UpdateSpaceRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Space operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateSpaceRequest { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The space id + */ + @JsonIgnore + abstract String getSpaceId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_UpdateSpaceResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_UpdateSpaceResponse.java new file mode 100644 index 00000000000..068cd7194d3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/spaces/_UpdateSpaceResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Space operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateSpaceResponse extends Space { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/Stack.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/Stack.java new file mode 100644 index 00000000000..0e90cc053de --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/Stack.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are stacks + */ +public abstract class Stack extends Resource { + + /** + * The name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + public abstract String getDescription(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * Build RootFS Image + */ + @JsonProperty("build_rootfs_image") + @Nullable + abstract String getBuildRootfsImage(); + + /** + * Run RootFS Image + */ + @JsonProperty("run_rootfs_image") + @Nullable + abstract String getRunRootfsImage(); + + /** + * Whether the stack is configured to be the default stack for new applications. + */ + @JsonProperty("default") + @Nullable + abstract Boolean geDefault(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/StacksV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/StacksV3.java new file mode 100644 index 00000000000..33fc702159a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/StacksV3.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Stacks V3 Client API + */ +public interface StacksV3 { + + /** + * Makes the Create a Stack request + * + * @param request the Create Stack request + * @return the response from the Create Stack request + */ + Mono create(CreateStackRequest request); + + /** + * Makes the Delete a Stack request + * + * @param request the Delete Stack request + * @return the response from Delete Stack request + */ + Mono delete(DeleteStackRequest request); + + /** + * Makes the Get a Stack request + * + * @param request the Get Stack request + * @return the response from the Get Stack request + */ + Mono get(GetStackRequest request); + + /** + * Makes the List Stacks request + * + * @param request the List Stacks request + * @return the response from the List Stacks request + */ + Mono list(ListStacksRequest request); + + /** + * Makes the Update a Stack request + * + * @param request the Update Stack request + * @return the response from the Update Stack request + */ + Mono update(UpdateStackRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_CreateStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_CreateStackRequest.java new file mode 100644 index 00000000000..d50534c2fa7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_CreateStackRequest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Create Stack operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateStackRequest { + + /** + * The name + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The description + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + @Value.Check + protected void validateName() { + if (getName().length() > 250) { + throw new IllegalStateException("Name must not be more than 250 characters"); + } + } + + @Value.Check + protected void validateDescription() { + if (getDescription() != null && getDescription().length() > 250) { + throw new IllegalStateException("Description must not be more than 250 characters"); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_CreateStackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_CreateStackResponse.java new file mode 100644 index 00000000000..da1a65eb544 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_CreateStackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Stack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateStackResponse extends Stack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_DeleteStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_DeleteStackRequest.java new file mode 100644 index 00000000000..fd043cf8fe7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_DeleteStackRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Stack operation + */ +@Value.Immutable +abstract class _DeleteStackRequest { + + /** + * The stack id + */ + @JsonIgnore + abstract String getStackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_GetStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_GetStackRequest.java new file mode 100644 index 00000000000..f1f714b7a35 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_GetStackRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Stack operation + */ +@Value.Immutable +abstract class _GetStackRequest { + + /** + * The stack id + */ + @JsonIgnore + abstract String getStackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_GetStackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_GetStackResponse.java new file mode 100644 index 00000000000..657eb076ecc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_GetStackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get Stack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetStackResponse extends Stack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_ListStacksRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_ListStacksRequest.java new file mode 100644 index 00000000000..69e24a754cb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_ListStacksRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Stacks operation. + */ +@Value.Immutable +abstract class _ListStacksRequest extends PaginatedRequest { + + /** + * The metadata query + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_ListStacksResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_ListStacksResponse.java new file mode 100644 index 00000000000..7261314b159 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_ListStacksResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Stacks operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListStacksResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_StackResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_StackResource.java new file mode 100644 index 00000000000..f1e263497b0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_StackResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Stacks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _StackResource extends Stack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_UpdateStackRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_UpdateStackRequest.java new file mode 100644 index 00000000000..76337aeb448 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_UpdateStackRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update Stack operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateStackRequest { + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + + /** + * The stack id + */ + @JsonIgnore + abstract String getStackId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_UpdateStackResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_UpdateStackResponse.java new file mode 100644 index 00000000000..d7252c73ecc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/stacks/_UpdateStackResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2020 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Stack operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateStackResponse extends Stack { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/Task.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/Task.java new file mode 100644 index 00000000000..14070d479c0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/Task.java @@ -0,0 +1,106 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are tasks + */ +public abstract class Task extends Resource { + + /** + * The command that will be executed + */ + @JsonProperty("command") + @Nullable + public abstract String getCommand(); + + /** + * The amount of disk to allocate for the task in MB + */ + @JsonProperty("disk_in_mb") + public abstract Integer getDiskInMb(); + + /** + * The id of the droplet that will be used to run the command + */ + @JsonProperty("droplet_guid") + public abstract String getDropletId(); + + /** + * The amount of memory to allocate for the task in MB + */ + @JsonProperty("memory_in_mb") + public abstract Integer getMemoryInMb(); + + /** + * The metadata + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); + + /** + * The task's name + */ + @JsonProperty("name") + public abstract String getName(); + + /** + * The task result + */ + @JsonProperty("result") + @Nullable + public abstract Result getResult(); + + /** + * The user-facing id of the task + */ + @JsonProperty("sequence_id") + public abstract Integer getSequenceId(); + + /** + * The state of the task + */ + @JsonProperty("state") + public abstract TaskState getState(); + + /** + * The task relationships + */ + @JsonProperty("relationships") + @Nullable + public abstract TaskRelationships getTaskRelationships(); + + /** + * Amount of log rate to allocate for the task in bytes + */ + @JsonProperty("log_rate_limit_in_bytes_per_second") + @Nullable + public abstract Integer getLogRateLimitInBytesPerSecond(); + + /** + * The user + */ + @JsonProperty("user") + @Nullable + public abstract String getUser(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/TaskState.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/TaskState.java new file mode 100644 index 00000000000..bfe02583e62 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/TaskState.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The state of the {@link Task} + */ +public enum TaskState { + + /** + * The canceling state + */ + CANCELING("CANCELING"), + + /** + * The failed state + */ + FAILED("FAILED"), + + /** + * The pending state + */ + PENDING("PENDING"), + + /** + * The running state + */ + RUNNING("RUNNING"), + + /** + * The succeeded state + */ + SUCCEEDED("SUCCEEDED"); + + private final String value; + + TaskState(String value) { + this.value = value; + } + + @JsonCreator + public static TaskState from(String s) { + switch (s.toLowerCase()) { + case "canceling": + return CANCELING; + case "failed": + return FAILED; + case "pending": + return PENDING; + case "running": + return RUNNING; + case "succeeded": + return SUCCEEDED; + default: + throw new IllegalArgumentException(String.format("Unknown task state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/Tasks.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/Tasks.java new file mode 100644 index 00000000000..67a71dd73e7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/Tasks.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Tasks Client API + */ +public interface Tasks { + + /** + * Makes the Cancel a Task request + * + * @param request the Cancel Task request + * @return the response from the Cancel Task request + */ + Mono cancel(CancelTaskRequest request); + + /** + * Makes the Create A Task request + * + * @param request the Create Task request + * @return the response from the Create Task request + */ + Mono create(CreateTaskRequest request); + + /** + * Makes the Get A Task request + * + * @param request the Get Task request + * @return the response from the Get Task request + */ + Mono get(GetTaskRequest request); + + /** + * Makes the List Tasks request + * + * @param request the List Tasks request + * @return the response from the List Tasks request + */ + Mono list(ListTasksRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CancelTaskRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CancelTaskRequest.java new file mode 100644 index 00000000000..36c5af26856 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CancelTaskRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Cancel Task endpoint + */ +@Value.Immutable +abstract class _CancelTaskRequest { + + /** + * The task id + */ + @JsonIgnore + abstract String getTaskId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CancelTaskResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CancelTaskResponse.java new file mode 100644 index 00000000000..9cae48e27f4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CancelTaskResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Cancel Task endpoint + */ +@JsonDeserialize +@Value.Immutable +abstract class _CancelTaskResponse extends Task { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CreateTaskRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CreateTaskRequest.java new file mode 100644 index 00000000000..3bce1eb0797 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CreateTaskRequest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the Create Task endpoint + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateTaskRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + + /** + * The command that will be executed + */ + @JsonProperty("command") + abstract String getCommand(); + + /** + * Amount of disk to allocate for the task in MB + */ + @JsonProperty("disk_in_mb") + @Nullable + abstract Integer getDiskInMb(); + + /** + * The id of the droplet that will be used to run the command + */ + @JsonProperty("droplet_guid") + @Nullable + abstract String getDropletId(); + + /** + * The amount of memory to allocate for the task in MB + */ + @JsonProperty("memory_in_mb") + @Nullable + abstract Integer getMemoryInMb(); + + /** + * The name of the task + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CreateTaskResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CreateTaskResponse.java new file mode 100644 index 00000000000..c9923ae2781 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_CreateTaskResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Task endpoint + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateTaskResponse extends Task { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_GetTaskRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_GetTaskRequest.java new file mode 100644 index 00000000000..adf0e111439 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_GetTaskRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Task endpoint + */ +@Value.Immutable +abstract class _GetTaskRequest { + + /** + * The task id + */ + @JsonIgnore + abstract String getTaskId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_GetTaskResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_GetTaskResponse.java new file mode 100644 index 00000000000..002c640ba31 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_GetTaskResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create Task endpoint + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTaskResponse extends Task { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_ListTasksRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_ListTasksRequest.java new file mode 100644 index 00000000000..d5d90a960c0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_ListTasksRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Applications operation + */ +@Value.Immutable +abstract class _ListTasksRequest extends PaginatedRequest { + + /** + * The application ids + */ + @FilterParameter("app_guids") + abstract List getApplicationIds(); + + /** + * The names + */ + @FilterParameter("names") + abstract List getNames(); + + /** + * The organization ids + */ + @FilterParameter("organization_guids") + abstract List getOrganizationIds(); + + /** + * The space ids + */ + @FilterParameter("space_guids") + abstract List getSpaceIds(); + + /** + * The states + */ + @FilterParameter("states") + abstract List getStates(); + + /** + * The ids + */ + @FilterParameter("guids") + abstract List getTaskIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_ListTasksResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_ListTasksResponse.java new file mode 100644 index 00000000000..86a6adee798 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_ListTasksResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response payload for the List Tasks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListTasksResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_Result.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_Result.java new file mode 100644 index 00000000000..adebfd3f32d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_Result.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The result of a task + */ +@JsonDeserialize +@Value.Immutable +abstract class _Result { + + /** + * The failure reason + */ + @JsonProperty("failure_reason") + @Nullable + abstract String getFailureReason(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_TaskRelationships.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_TaskRelationships.java new file mode 100644 index 00000000000..4af79becd15 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_TaskRelationships.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.immutables.value.Value; + +/** + * The relationships for the Task entity + */ +@Value.Immutable +@JsonDeserialize +abstract class _TaskRelationships { + + /** + * The app relationship + */ + @JsonProperty("app") + abstract ToOneRelationship getApp(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_TaskResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_TaskResource.java new file mode 100644 index 00000000000..67d11fda66c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/tasks/_TaskResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List Tasks operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _TaskResource extends Task { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/User.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/User.java new file mode 100644 index 00000000000..cf6ffd4a895 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/User.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Resource; + +/** + * Base class for responses that are users + */ +public abstract class User extends Resource { + + /** + * The name registered in UAA; will be null for UAA clients and non-UAA users + */ + @JsonProperty("username") + @Nullable + public abstract String getUsername(); + + /** + * The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID + */ + @JsonProperty("presentation_name") + @Nullable + public abstract String getPresentationName(); + + /** + * The identity provider for the UAA user; will be null for UAA clients + */ + @JsonProperty("origin") + @Nullable + public abstract String getOrigin(); + + /** + * The metadata Labels and Annotations applied to the user + */ + @JsonProperty("metadata") + @Nullable + public abstract Metadata getMetadata(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/UsersV3.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/UsersV3.java new file mode 100644 index 00000000000..906582ead33 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/UsersV3.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Users V3 Client API + */ +public interface UsersV3 { + + /** + * Makes the Create a User request + * + * @param request the Create User request + * @return the response from the Create User request + */ + Mono create(CreateUserRequest request); + + /** + * Makes the Get a User request + * + * @param request the Get User request + * @return the response from the Get User request + */ + Mono get(GetUserRequest request); + + /** + * Makes the List all Users request + * + * @param request the List Users request + * @return the response from the List Users request + */ + Mono list(ListUsersRequest request); + + /** + * Makes the Update a Stack request + * + * @param request the Update User request + * @return the response from the Update User request + */ + Mono update(UpdateUserRequest request); + + /** + * Makes the Delete a User request + * + * @param request the Delete User request + * @return void + */ + Mono delete(DeleteUserRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_CreateUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_CreateUserRequest.java new file mode 100644 index 00000000000..71f6c4823fb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_CreateUserRequest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Create User operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateUserRequest { + + /** + * Unique identifier for the user. For UAA users this will match the UAA user ID; in the case of UAA clients, this will match the UAA client ID + */ + @JsonProperty("guid") + @Nullable + abstract String getUserId(); + + /** + * Username of the user to be created. This can only be provided together with origin. + */ + @JsonProperty("username") + @Nullable + abstract String getUsername(); + + /** + * Origin of the user to be created. This can only be provided together with username and cannot be uaa. + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The metadata Labels and Annotations applied to the user + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_CreateUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_CreateUserResponse.java new file mode 100644 index 00000000000..b1bdd0715d1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_CreateUserResponse.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateUserResponse extends User { +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_DeleteUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_DeleteUserRequest.java new file mode 100644 index 00000000000..5010b8193ad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_DeleteUserRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete User operation + * All roles associated with a user will be deleted if the user is deleted. + */ +@Value.Immutable +abstract class _DeleteUserRequest { + + /** + * The User id / guid + */ + @JsonIgnore + abstract String getUserId(); + +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_GetUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_GetUserRequest.java new file mode 100644 index 00000000000..1f2d0705863 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_GetUserRequest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get User operation + */ +@Value.Immutable +abstract class _GetUserRequest { + + /** + * The User id / guid + */ + @JsonIgnore + abstract String getUserId(); +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_GetUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_GetUserResponse.java new file mode 100644 index 00000000000..76adda2fc02 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_GetUserResponse.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Get User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetUserResponse extends User { +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_ListUsersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_ListUsersRequest.java new file mode 100644 index 00000000000..c8606ab59cf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_ListUsersRequest.java @@ -0,0 +1,49 @@ + + +package org.cloudfoundry.client.v3.users; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.FilterParameter; +import org.cloudfoundry.client.v3.PaginatedRequest; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Users operation. + */ +@Value.Immutable +abstract class _ListUsersRequest extends PaginatedRequest { + + /** + * Comma-delimited list of user guids to filter by + */ + @FilterParameter("guids") + @Nullable + abstract List getGuids(); + + /** + * Comma-delimited list of usernames to filter by. Mutually exclusive with partial_usernames + */ + @FilterParameter("usernames") + abstract List getUsernames(); + + /** + * Comma-delimited list of strings to search by. When using this query parameter, all the users that contain the string provided in their username will be returned. Mutually exclusive with usernames + */ + @FilterParameter("partial_usernames") + abstract List getPartialUsernames(); + + /** + * Comma-delimited list of user origins (user stores) to filter by, for example, users authenticated by UAA have the origin “uaaâ€; users authenticated by an LDAP provider have the origin “ldapâ€; when filtering by origins, usernames must be included + */ + @FilterParameter("origins") + abstract List getOrigins(); + + /** + * A query string containing a list of label selector requirements + */ + @FilterParameter("label_selector") + @Nullable + abstract String getLabelSelector(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_ListUsersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_ListUsersResponse.java new file mode 100644 index 00000000000..1cf5a2e87e4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_ListUsersResponse.java @@ -0,0 +1,16 @@ +package org.cloudfoundry.client.v3.users; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.client.v3.PaginatedResponse; +import org.cloudfoundry.client.v3.users.UserResource; +import org.immutables.value.Value; + +/** + * The response payload for the List Users operation. + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUsersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UpdateUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UpdateUserRequest.java new file mode 100644 index 00000000000..6258711533d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UpdateUserRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.Metadata; +import org.immutables.value.Value; + +/** + * The request payload for the Update User operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateUserRequest { + + /** + * The User id / guid + */ + @JsonIgnore + abstract String getUserId(); + + /** + * The metadata Labels and Annotations applied to the user + */ + @JsonProperty("metadata") + @Nullable + abstract Metadata getMetadata(); + +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UpdateUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UpdateUserResponse.java new file mode 100644 index 00000000000..b264d5bcb1d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UpdateUserResponse.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateUserResponse extends User { +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UserResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UserResource.java new file mode 100644 index 00000000000..65c08410c9e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/client/v3/users/_UserResource.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The Resource response payload for the List User operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserResource extends User{ +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/DopplerClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/DopplerClient.java new file mode 100644 index 00000000000..a9c03441cf9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/DopplerClient.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import reactor.core.publisher.Flux; + +/** + * Main entry point to the Doppler Client API + */ +public interface DopplerClient { + + /** + * Makes the Container Metrics request + * + * @param request the Container Metrics request + * @return the container metrics + */ + Flux containerMetrics(ContainerMetricsRequest request); + + /** + * Makes the Firehose request + * + * @param request the Firehose request + * @return the events from the firehose + */ + Flux firehose(FirehoseRequest request); + + /** + * Makes the Recent Logs request + * + * @param request the Recent Logs request + * @return the events from the recent logs + */ + Flux recentLogs(RecentLogsRequest request); + + /** + * Makes the Stream request + * + * @param request the Stream request + * @return the events from the stream + */ + Flux stream(StreamRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/EventType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/EventType.java new file mode 100644 index 00000000000..1e3b4e33dd9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/EventType.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import java.util.Objects; + +/** + * Event Types + */ +public enum EventType { + CONTAINER_METRIC, + + COUNTER_EVENT, + + ERROR, + + HTTP_START_STOP, + + LOG_MESSAGE, + + VALUE_METRIC; + + static EventType from(org.cloudfoundry.dropsonde.events.Envelope.EventType dropsonde) { + switch (Objects.requireNonNull(dropsonde, "dropsonde")) { + case ContainerMetric: + return CONTAINER_METRIC; + case CounterEvent: + return COUNTER_EVENT; + case Error: + return ERROR; + case HttpStartStop: + return HTTP_START_STOP; + case LogMessage: + return LOG_MESSAGE; + case ValueMetric: + return VALUE_METRIC; + default: + throw new IllegalArgumentException( + String.format("Unknown event type: %s", dropsonde)); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/MessageType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/MessageType.java new file mode 100644 index 00000000000..b855821f911 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/MessageType.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import java.util.Objects; + +/** + * The destination of the message + */ +public enum MessageType { + + /** + * {@code STDERR} + */ + ERR, + + /** + * {@code STDOUT} + */ + OUT; + + static MessageType from(org.cloudfoundry.dropsonde.events.LogMessage.MessageType dropsonde) { + switch (Objects.requireNonNull(dropsonde, "dropsonde")) { + case ERR: + return ERR; + case OUT: + return OUT; + default: + throw new IllegalArgumentException( + String.format("Unknown message type: %s", dropsonde)); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/Method.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/Method.java new file mode 100644 index 00000000000..55a82ec1f6f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/Method.java @@ -0,0 +1,207 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import java.util.Objects; + +/** + * HTTP Methods + */ +public enum Method { + ACL, + + BASELINE_CONTROL, + + BIND, + + CHECKIN, + + CHECKOUT, + + CONNECT, + + COPY, + + DEBUG, + + DELETE, + + GET, + + HEAD, + + LABEL, + + LINK, + + LOCK, + + MERGE, + + MKACTIVITY, + + MKCALENDAR, + + MKCOL, + + MKREDIRECTREF, + + MKWORKSPACE, + + MOVE, + + OPTIONS, + + ORDERPATCH, + + PATCH, + + POST, + + PRI, + + PROPFIND, + + PROPPATCH, + + PUT, + + REBIND, + + REPORT, + + SEARCH, + + SHOWMETHOD, + + SPACEJUMP, + + TEXTSEARCH, + + TRACE, + + TRACK, + + UNBIND, + + UNCHECKOUT, + + UNLINK, + + UNLOCK, + + UPDATE, + + UPDATEREDIRECTREF, + + VERSION_CONTROL; + + static Method from(org.cloudfoundry.dropsonde.events.Method dropsonde) { + switch (Objects.requireNonNull(dropsonde, "dropsonde")) { + case ACL: + return ACL; + case BASELINE_CONTROL: + return BASELINE_CONTROL; + case BIND: + return BIND; + case CHECKIN: + return CHECKIN; + case CHECKOUT: + return CHECKOUT; + case CONNECT: + return CONNECT; + case COPY: + return COPY; + case DEBUG: + return DEBUG; + case DELETE: + return DELETE; + case GET: + return GET; + case HEAD: + return HEAD; + case LABEL: + return LABEL; + case LINK: + return LINK; + case LOCK: + return LOCK; + case MERGE: + return MERGE; + case MKACTIVITY: + return MKACTIVITY; + case MKCALENDAR: + return MKCALENDAR; + case MKCOL: + return MKCOL; + case MKREDIRECTREF: + return MKREDIRECTREF; + case MKWORKSPACE: + return MKWORKSPACE; + case MOVE: + return MOVE; + case OPTIONS: + return OPTIONS; + case ORDERPATCH: + return ORDERPATCH; + case PATCH: + return PATCH; + case POST: + return POST; + case PRI: + return PRI; + case PROPFIND: + return PROPFIND; + case PROPPATCH: + return PROPPATCH; + case PUT: + return PUT; + case REBIND: + return REBIND; + case REPORT: + return REPORT; + case SEARCH: + return SEARCH; + case SHOWMETHOD: + return SHOWMETHOD; + case SPACEJUMP: + return SPACEJUMP; + case TEXTSEARCH: + return TEXTSEARCH; + case TRACE: + return TRACE; + case TRACK: + return TRACK; + case UNBIND: + return UNBIND; + case UNCHECKOUT: + return UNCHECKOUT; + case UNLINK: + return UNLINK; + case UNLOCK: + return UNLOCK; + case UPDATE: + return UPDATE; + case UPDATEREDIRECTREF: + return UPDATEREDIRECTREF; + case VERSION_CONTROL: + return VERSION_CONTROL; + default: + throw new IllegalArgumentException(String.format("Unknown method: %s", dropsonde)); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/PeerType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/PeerType.java new file mode 100644 index 00000000000..a4254c8750a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/PeerType.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import java.util.Objects; + +/** + * The type of peer handling request + */ +public enum PeerType { + + /** + * The request is made by this process + */ + CLIENT, + + /** + * The request is received by this process + */ + SERVER; + + static PeerType from(org.cloudfoundry.dropsonde.events.PeerType dropsonde) { + switch (Objects.requireNonNull(dropsonde, "dropsonde")) { + case Client: + return CLIENT; + case Server: + return SERVER; + default: + throw new IllegalArgumentException( + String.format("Unknown peer type: %s", dropsonde)); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/UuidUtils.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/UuidUtils.java new file mode 100644 index 00000000000..898746eaaac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/UuidUtils.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import java.util.Optional; +import java.util.UUID; + +final class UuidUtils { + + private UuidUtils() {} + + static UUID from(org.cloudfoundry.dropsonde.events.UUID dropsonde) { + return Optional.ofNullable(dropsonde) + .map(d -> new UUID(Long.reverseBytes(d.low), Long.reverseBytes(d.high))) + .orElse(null); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ContainerMetric.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ContainerMetric.java new file mode 100644 index 00000000000..c88ed59aa6c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ContainerMetric.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Objects; + +/** + * Records resource usage of an application in a container + */ +@Value.Immutable +abstract class _ContainerMetric { + + public static ContainerMetric from(org.cloudfoundry.dropsonde.events.ContainerMetric dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + return ContainerMetric.builder() + .applicationId(dropsonde.applicationId) + .cpuPercentage(dropsonde.cpuPercentage) + .diskBytes(dropsonde.diskBytes) + .diskBytesQuota(dropsonde.diskBytesQuota) + .instanceIndex(dropsonde.instanceIndex) + .memoryBytes(dropsonde.memoryBytes) + .memoryBytesQuota(dropsonde.memoryBytesQuota) + .build(); + } + + /** + * The ID of the contained application + */ + abstract String getApplicationId(); + + /** + * The CPU used, on a scale of 0 to 100 + */ + abstract Double getCpuPercentage(); + + /** + * The bytes of disk used + */ + abstract Long getDiskBytes(); + + /** + * The maximum bytes of disk allocated to container + */ + @Nullable + abstract Long getDiskBytesQuota(); + + /** + * The instance index of the contained application. (This, with applicationId, should uniquely identify a container.) + */ + abstract Integer getInstanceIndex(); + + /** + * The bytes of memory used + */ + abstract Long getMemoryBytes(); + + /** + * The maximum bytes of memory allocated to container + */ + @Nullable + abstract Long getMemoryBytesQuota(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ContainerMetricsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ContainerMetricsRequest.java new file mode 100644 index 00000000000..f2b8060264a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ContainerMetricsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Container Metrics endpoint + */ +@Value.Immutable +abstract class _ContainerMetricsRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_CounterEvent.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_CounterEvent.java new file mode 100644 index 00000000000..596c8b314db --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_CounterEvent.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Objects; + +/** + * Represents the increment of a counter. It contains only the change in the value; it is the responsibility of downstream consumers to maintain the value of the counter. + */ +@Value.Immutable +abstract class _CounterEvent { + + public static CounterEvent from(org.cloudfoundry.dropsonde.events.CounterEvent dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + return CounterEvent.builder() + .delta(dropsonde.delta) + .name(dropsonde.name) + .total(dropsonde.total) + .build(); + } + + /** + * The amount by which to increment the counter + */ + abstract Long getDelta(); + + /** + * The name of the counter. Must be consistent for downstream consumers to associate events semantically. + */ + abstract String getName(); + + /** + * The total value of the counter. This will be overridden by Metron, which internally tracks the total of each named Counter it receives. + */ + @Nullable + abstract Long getTotal(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_Envelope.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_Envelope.java new file mode 100644 index 00000000000..a6c0f194296 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_Envelope.java @@ -0,0 +1,138 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; +import java.util.Objects; +import java.util.Optional; + +/** + * Wraps an Event and adds metadata + */ +@Value.Immutable +abstract class _Envelope { + + public static Envelope from(org.cloudfoundry.dropsonde.events.Envelope dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + Envelope.Builder envelope = Envelope.builder() + .deployment(dropsonde.deployment) + .eventType(EventType.from(dropsonde.eventType)) + .index(dropsonde.index) + .ip(dropsonde.ip) + .job(dropsonde.job) + .origin(dropsonde.origin) + .tags(dropsonde.tags) + .timestamp(dropsonde.timestamp); + + Optional.ofNullable(dropsonde.containerMetric).ifPresent(d -> envelope.containerMetric(ContainerMetric.from(d))); + Optional.ofNullable(dropsonde.counterEvent).ifPresent(d -> envelope.counterEvent(CounterEvent.from(d))); + Optional.ofNullable(dropsonde.error).ifPresent(d -> envelope.error(Error.from(d))); + Optional.ofNullable(dropsonde.httpStartStop).ifPresent(d -> envelope.httpStartStop(HttpStartStop.from(d))); + Optional.ofNullable(dropsonde.logMessage).ifPresent(d -> envelope.logMessage(LogMessage.from(d))); + Optional.ofNullable(dropsonde.valueMetric).ifPresent(d -> envelope.valueMetric(ValueMetric.from(d))); + + return envelope.build(); + } + + /** + * The enclosed {@link ContainerMetric} + */ + @Nullable + abstract ContainerMetric getContainerMetric(); + + /** + * The enclosed {@link CounterEvent} + */ + @Nullable + abstract CounterEvent getCounterEvent(); + + /** + * Deployment name (used to uniquely identify source) + */ + @Nullable + abstract String getDeployment(); + + /** + * The enclosed {@link Error} + */ + @Nullable + abstract Error getError(); + + /** + * Type of wrapped event. Only the optional field corresponding to the value of eventType should be set. + */ + abstract EventType getEventType(); + + /** + * The enclosed {@link HttpStartStop} + */ + @Nullable + abstract HttpStartStop getHttpStartStop(); + + /** + * Index of job (used to uniquely identify source) + */ + @Nullable + abstract String getIndex(); + + /** + * IP address (used to uniquely identify source) + */ + @Nullable + abstract String getIp(); + + /** + * Job name (used to uniquely identify source) + */ + @Nullable + abstract String getJob(); + + /** + * The enclosed {@link LogMessage} + */ + @Nullable + abstract LogMessage getLogMessage(); + + /** + * Unique description of the origin of this event + */ + abstract String getOrigin(); + + /** + * key/value tags to include additional identifying information + */ + @AllowNulls + abstract Map getTags(); + + /** + * UNIX timestamp (in nanoseconds) event was wrapped in this Envelope. + */ + @Nullable + abstract Long getTimestamp(); + + /** + * The enclosed {@link ValueMetric} + */ + @Nullable + abstract ValueMetric getValueMetric(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_Error.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_Error.java new file mode 100644 index 00000000000..1d3db590528 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_Error.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.immutables.value.Value; + +import java.util.Objects; + +/** + * An Error event represents an error in the originating process + */ +@Value.Immutable +abstract class _Error { + + public static Error from(org.cloudfoundry.dropsonde.events.Error dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + return Error.builder() + .code(dropsonde.code) + .message(dropsonde.message) + .source(dropsonde.source) + .build(); + } + + /** + * The numeric error code. This is provided for programmatic responses to the error. + */ + abstract Integer getCode(); + + /** + * The error description (preferably human-readable) + */ + abstract String getMessage(); + + /** + * The source of the error + */ + abstract String getSource(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_FirehoseRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_FirehoseRequest.java new file mode 100644 index 00000000000..19f0a979462 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_FirehoseRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Firehose endpoint + */ +@Value.Immutable +abstract class _FirehoseRequest { + + /** + * The subscription id + */ + @JsonIgnore + abstract String getSubscriptionId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_HttpStartStop.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_HttpStartStop.java new file mode 100644 index 00000000000..7a641f26620 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_HttpStartStop.java @@ -0,0 +1,127 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Objects; +import java.util.UUID; + +/** + * This event represents the whole lifecycle of an HTTP request. + */ +@Value.Immutable +abstract class _HttpStartStop { + + public static HttpStartStop from(org.cloudfoundry.dropsonde.events.HttpStartStop dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + return HttpStartStop.builder() + .applicationId(UuidUtils.from(dropsonde.applicationId)) + .contentLength(dropsonde.contentLength) + .forwarded(dropsonde.forwarded) + .instanceId(dropsonde.instanceId) + .instanceIndex(dropsonde.instanceIndex) + .method(Method.from(dropsonde.method)) + .peerType(PeerType.from(dropsonde.peerType)) + .remoteAddress(dropsonde.remoteAddress) + .requestId(UuidUtils.from(dropsonde.requestId)) + .startTimestamp(dropsonde.startTimestamp) + .statusCode(dropsonde.statusCode) + .stopTimestamp(dropsonde.stopTimestamp) + .uri(dropsonde.uri) + .userAgent(dropsonde.userAgent) + .build(); + } + + /** + * The application id + */ + @Nullable + abstract UUID getApplicationId(); + + /** + * The length of the response in bytes + */ + abstract Long getContentLength(); + + /** + * The http forwarded-for [x-forwarded-for] header from the request + */ + abstract List getForwarded(); + + /** + * The ID of the application instance + */ + @Nullable + abstract String getInstanceId(); + + /** + * The index of the application instance + */ + @Nullable + abstract Integer getInstanceIndex(); + + /** + * The method of the request + */ + @Nullable + abstract Method getMethod(); + + /** + * The role of the emitting process in the request cycle + */ + abstract PeerType getPeerType(); + + /** + * The remote address of the request. (For a server, this should be the origin of the request.) + */ + abstract String getRemoteAddress(); + + /** + * The ID for tracking lifecycle of request. + */ + abstract UUID getRequestId(); + + /** + * The UNIX timestamp (in nanoseconds) when the request was sent (by a client) or received (by a server) + */ + abstract Long getStartTimestamp(); + + /** + * The status code returned with the response to the request + */ + abstract Integer getStatusCode(); + + /** + * The UNIX timestamp (in nanoseconds) when the request was received + */ + abstract Long getStopTimestamp(); + + /** + * The uri of the request + */ + abstract String getUri(); + + /** + * The contents of the UserAgent header on the request + */ + abstract String getUserAgent(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_LogMessage.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_LogMessage.java new file mode 100644 index 00000000000..73ae2e5d5e8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_LogMessage.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Objects; + +/** + * Contains a "log line" and associated metadata. + */ +@Value.Immutable +abstract class _LogMessage { + + public static LogMessage from(org.cloudfoundry.dropsonde.events.LogMessage dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + return LogMessage.builder() + .applicationId(dropsonde.app_id) + .message(dropsonde.message.utf8()) + .messageType(MessageType.from(dropsonde.message_type)) + .sourceInstance(dropsonde.source_instance) + .sourceType(dropsonde.source_type) + .timestamp(dropsonde.timestamp) + .build(); + } + + /** + * The application that emitted the message (or to which the application is related) + */ + @Nullable + abstract String getApplicationId(); + + /** + * The log message + */ + abstract String getMessage(); + + /** + * The type of the message + */ + abstract MessageType getMessageType(); + + /** + * The instance that emitted the message + */ + @Nullable + abstract String getSourceInstance(); + + /** + * The source of the message. For Cloud Foundry, this can be {@code APPLICATION}, {@code RTR}, {@code DEA}, {@code STG}, etc. + */ + @Nullable + abstract String getSourceType(); + + /** + * The UNIX timestamp (in nanoseconds) when the log was written + */ + abstract Long getTimestamp(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_RecentLogsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_RecentLogsRequest.java new file mode 100644 index 00000000000..7f15d6607b3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_RecentLogsRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Recent Logs endpoint + */ +@Value.Immutable +abstract class _RecentLogsRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_StreamRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_StreamRequest.java new file mode 100644 index 00000000000..1e73b7510cc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_StreamRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Stream endpoint + */ +@Value.Immutable +abstract class _StreamRequest { + + /** + * The application id + */ + @JsonIgnore + abstract String getApplicationId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ValueMetric.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ValueMetric.java new file mode 100644 index 00000000000..d9628ae3e69 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/doppler/_ValueMetric.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import org.immutables.value.Value; + +import java.util.Objects; + +/** + * Indicates the value of a metric at an instant in time + */ +@Value.Immutable +abstract class _ValueMetric { + + public static ValueMetric from(org.cloudfoundry.dropsonde.events.ValueMetric dropsonde) { + Objects.requireNonNull(dropsonde, "dropsonde"); + + return ValueMetric.builder() + .name(dropsonde.name) + .unit(dropsonde.unit) + .value(dropsonde.value) + .build(); + } + + /** + * The name of the metric. Must be consistent for downstream consumers to associate events semantically. + */ + abstract String getName(); + + /** + * The unit of the metric. Please see http://metrics20.org/spec/#units for ideas; SI units/prefixes are recommended where applicable. Should be + * consistent for the life of the metric (consumers are expected to report, but not interpret, prefixes). + */ + abstract String getUnit(); + + /** + * The value at the time of event emission + */ + abstract Double value(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/EnvelopeType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/EnvelopeType.java new file mode 100644 index 00000000000..d918e977993 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/EnvelopeType.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum EnvelopeType { + ANY("ANY"), + LOG("LOG"), + COUNTER("COUNTER"), + GAUGE("GAUGE"), + TIMER("TIMER"), + EVENT("EVENT"); + + private final String value; + + EnvelopeType(String value) { + this.value = value; + } + + @JsonCreator + public static EnvelopeType from(String s) { + switch (s.toLowerCase()) { + case "any": + return ANY; + case "log": + return LOG; + case "counter": + return COUNTER; + case "gauge": + return GAUGE; + case "timer": + return TIMER; + case "event": + return EVENT; + default: + throw new IllegalArgumentException(String.format("Unknown envelope type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/LogCacheClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/LogCacheClient.java new file mode 100644 index 00000000000..e455db220a4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/LogCacheClient.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Log Cache Client API + */ +public interface LogCacheClient { + + /** + * Makes the Log Cache /api/v1/info request + * + * @param request the Info request + * @return the Info response + */ + Mono info(InfoRequest request); + + /** + * Makes the Log Cache /api/v1/meta request + * + * @param meta the Meta request + * @return the Log Cache metadata for the cached logs and metrics + */ + Mono meta(MetaRequest meta); + + /** + * Makes the Log Cache /api/v1/read request + * + * @param request the Read request + * @return the read response + */ + Mono read(ReadRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/LogType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/LogType.java new file mode 100644 index 00000000000..ee9bc7fc505 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/LogType.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum LogType { + + /** + * {@code STDERR} + */ + ERR("ERR"), + + /** + * {@code STDOUT} + */ + OUT("OUT"); + + private final String value; + + LogType(String value) { + this.value = value; + } + + @JsonCreator + public static LogType from(String s) { + switch (s.toLowerCase()) { + case "err": + return ERR; + case "out": + return OUT; + default: + throw new IllegalArgumentException(String.format("Unknown log type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Counter.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Counter.java new file mode 100644 index 00000000000..c692d3efe54 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Counter.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Counter { + + /** + * The amount by which to increment the counter + */ + @JsonProperty("delta") + @Nullable + abstract Long getDelta(); + + /** + * The name of the counter. Must be consistent for downstream consumers to associate events semantically. + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The total value of the counter. This will be overridden by Metron, which internally tracks the total of each named Counter it receives. + */ + @JsonProperty("total") + @Nullable + abstract Long getTotal(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Envelope.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Envelope.java new file mode 100644 index 00000000000..2529d402493 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Envelope.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +@JsonDeserialize +@Value.Immutable +@JsonIgnoreProperties("deprecated_tags") +abstract class _Envelope { + + /** + * The enclosed {@link Counter} + */ + @JsonProperty("counter") + @Nullable + abstract Counter getCounter(); + + /** + * The enclosed {@link Event} + */ + @JsonProperty("event") + @Nullable + abstract Event getEvent(); + + /** + * The enclosed {@link Gauge} + */ + @JsonProperty("gauge") + @Nullable + abstract Gauge getGauge(); + + /** + * The instance id + */ + @JsonProperty("instance_id") + @Nullable + abstract String getInstanceId(); + + /** + * The enclosed {@link Log} + */ + @JsonProperty("log") + @Nullable + abstract Log getLog(); + + /** + * The source id + */ + @JsonProperty("source_id") + @Nullable + abstract String getSourceId(); + + /** + * Key/value tags to include additional identifying information + */ + @JsonProperty("tags") + @AllowNulls + abstract Map getTags(); + + /** + * The enclosed {@link Timer} + */ + @JsonProperty("timer") + @Nullable + abstract Timer getTimer(); + + /** + * UNIX timestamp (in nanoseconds) event was wrapped in this Envelope. + */ + @JsonProperty("timestamp") + @Nullable + abstract Long getTimestamp(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_EnvelopeBatch.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_EnvelopeBatch.java new file mode 100644 index 00000000000..2ac26a35fc2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_EnvelopeBatch.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +@JsonDeserialize +@Value.Immutable +abstract class _EnvelopeBatch { + + /** + * The batch + */ + @JsonProperty("batch") + abstract List getBatch(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Event.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Event.java new file mode 100644 index 00000000000..9342ec5bf76 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Event.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Event { + + /** + * The event body + */ + @JsonProperty("body") + @Nullable + abstract String getBody(); + + /** + * The event title + */ + @JsonProperty("title") + @Nullable + abstract String getTitle(); + +} + diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Gauge.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Gauge.java new file mode 100644 index 00000000000..5cbd1b3407a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Gauge.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.util.Map; + +@JsonDeserialize +@Value.Immutable +abstract class _Gauge { + + /** + * The gauge metrics + */ + @JsonProperty("metrics") + @AllowNulls + abstract Map getMetrics(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_InfoRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_InfoRequest.java new file mode 100644 index 00000000000..a7170297b7a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_InfoRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.immutables.value.Value; + +/** + * The request payload for the Info operation + */ +@Value.Immutable +abstract class _InfoRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_InfoResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_InfoResponse.java new file mode 100644 index 00000000000..55c4071cbe5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_InfoResponse.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response payload for the Info operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _InfoResponse { + + /** + * The info version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + + /** + * The vm uptime + */ + @JsonProperty("vm_uptime") + @Nullable + abstract Long vmUptime(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Log.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Log.java new file mode 100644 index 00000000000..cb001a2e19b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Log.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.nio.ByteBuffer; +import java.nio.charset.StandardCharsets; +import java.util.Base64; + +@JsonDeserialize +@Value.Immutable +abstract class _Log { + + public String getPayloadAsText() { + final byte[] decodedPayload = Base64.getDecoder().decode(getPayload()); + return StandardCharsets.UTF_8.decode(ByteBuffer.wrap(decodedPayload)).toString(); + } + + /** + * The log payload + */ + @JsonProperty("payload") + @Nullable + abstract String getPayload(); + + /** + * The log type + */ + @JsonProperty("type") + @Nullable + abstract LogType getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_MetaRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_MetaRequest.java new file mode 100644 index 00000000000..518162c3fe1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_MetaRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.immutables.value.Value; + +/** + * The request payload for the Meta operation + */ +@Value.Immutable +abstract class _MetaRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_MetaResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_MetaResponse.java new file mode 100644 index 00000000000..0aec95c73b5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_MetaResponse.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The response payload for the Meta operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _MetaResponse { + + /** + * The meta data + */ + @JsonProperty("meta") + abstract Map getMeta(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Metadata.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Metadata.java new file mode 100644 index 00000000000..322dcecd030 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Metadata.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.Optional; + +@JsonDeserialize +@Value.Immutable +abstract class _Metadata { + + /** + * The number of envelopes held in Log Cache + */ + @JsonProperty("count") + abstract Long getCount(); + + /** + * The number of envelopes that have been pruned + */ + @JsonProperty("expired") + abstract Optional getExpired(); + + /** + * Newest entry for the source, in nanoseconds since the Unix epoch + */ + @JsonProperty("newestTimestamp") + abstract Long getNewestTimestamp(); + + /** + * Oldest entry for the source, in nanoseconds since the Unix epoch + */ + @JsonProperty("oldestTimestamp") + abstract Long getOldestTimestamp(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Metric.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Metric.java new file mode 100644 index 00000000000..2cb78477dd2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Metric.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Metric { + + /** + * The metric unit + */ + @JsonProperty("unit") + @Nullable + abstract String getUnit(); + + /** + * The metric value + */ + @JsonProperty("value") + @Nullable + abstract Double getValue(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_ReadRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_ReadRequest.java new file mode 100644 index 00000000000..9521a256bc6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_ReadRequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _ReadRequest { + + @Nullable + @QueryParameter("descending") + abstract Boolean getDescending(); + + @Nullable + @QueryParameter("end_time") + abstract Long getEndTime(); + + @Nullable + @QueryParameter("envelope_types") + abstract List getEnvelopeTypes(); + + @Nullable + @QueryParameter("limit") + abstract Integer getLimit(); + + @Nullable + @QueryParameter("name_filter") + abstract String getNameFilter(); + + /** + * The source id + */ + abstract String getSourceId(); + + @Nullable + @QueryParameter("start_time") + abstract Long getStartTime(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_ReadResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_ReadResponse.java new file mode 100644 index 00000000000..fc1fe2bcbc0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_ReadResponse.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _ReadResponse { + + /** + * The envelopes + */ + @JsonProperty("envelopes") + @Value.Default + EnvelopeBatch getEnvelopes() { + return EnvelopeBatch.builder().build(); + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Timer.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Timer.java new file mode 100644 index 00000000000..a11b5285834 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/logcache/v1/_Timer.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _Timer { + + /** + * The timer name + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * The timer start + */ + @JsonProperty("start") + @Nullable + abstract Long getStart(); + + /** + * The timer stop + */ + @JsonProperty("stop") + @Nullable + abstract Long getStop(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/NetworkingClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/NetworkingClient.java new file mode 100644 index 00000000000..c9df985b163 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/NetworkingClient.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking; + +import org.cloudfoundry.networking.v1.policies.Policies; +import org.cloudfoundry.networking.v1.tags.Tags; + +/** + * Main entry point to the Networking Client API + */ +public interface NetworkingClient { + + /** + * Main entry point to the Policies API + */ + Policies policies(); + + /** + * Main entry point to the Tags API + */ + Tags tags(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/Policies.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/Policies.java new file mode 100644 index 00000000000..7a30c950be9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/Policies.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Policies API + */ +public interface Policies { + + /** + * Makes the Create Policies request + * + * @param request the Create Policies request + * @return the response to the Create Policies request + */ + Mono create(CreatePoliciesRequest request); + + /** + * Makes the Delete Policies request + * + * @param request the Delete Policies request + * @return the response to the Delete Policies request + */ + Mono delete(DeletePoliciesRequest request); + + /** + * Makes the List Policies request + * + * @param request the List Policies request + * @return the response to the List Policies request + */ + Mono list(ListPoliciesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_CreatePoliciesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_CreatePoliciesRequest.java new file mode 100644 index 00000000000..9f6dbd79d97 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_CreatePoliciesRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Create Policies operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreatePoliciesRequest { + + @Value.Check + void check() { + if (getPolicies() == null || getPolicies().isEmpty()) { + throw new IllegalStateException("Cannot build CreatePoliciesRequest, attribute policies must be specified"); + } + } + + /** + * The policies + */ + @JsonProperty("policies") + abstract List getPolicies(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_DeletePoliciesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_DeletePoliciesRequest.java new file mode 100644 index 00000000000..f0d6f759baa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_DeletePoliciesRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the Delete Policies operation + */ +@JsonSerialize +@Value.Immutable +abstract class _DeletePoliciesRequest { + + @Value.Check + void check() { + if (getPolicies() == null || getPolicies().isEmpty()) { + throw new IllegalStateException("Cannot build DeletePoliciesRequest, attribute policies must be specified"); + } + } + + /** + * The policies + */ + @JsonProperty("policies") + abstract List getPolicies(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Destination.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Destination.java new file mode 100644 index 00000000000..73b0defc7ac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Destination.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for Policy responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _Destination { + + /** + * The id + */ + @JsonProperty("id") + abstract String getId(); + + /** + * The ports + */ + @JsonProperty("ports") + abstract Ports getPorts(); + + /** + * The protocol + */ + @JsonProperty("protocol") + abstract String getProtocol(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_ListPoliciesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_ListPoliciesRequest.java new file mode 100644 index 00000000000..5f13a059260 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_ListPoliciesRequest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the List Policies operation + */ +@Value.Immutable +abstract class _ListPoliciesRequest { + + /** + * Policy group ids to filter on + */ + @Nullable + @QueryParameter("id") + abstract List getPolicyGroupIds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_ListPoliciesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_ListPoliciesResponse.java new file mode 100644 index 00000000000..5dbf4979e76 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_ListPoliciesResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the List Policies operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListPoliciesResponse { + + /** + * The policies + */ + @JsonProperty("policies") + abstract List getPolicies(); + + /** + * The number of policies listed + */ + @JsonProperty("total_policies") + abstract Integer getTotalPolicies(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Policy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Policy.java new file mode 100644 index 00000000000..cf991d8ea5f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Policy.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for Policy responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _Policy { + + /** + * Destination for the Policy + */ + @JsonProperty("destination") + abstract Destination getDestination(); + + /** + * Source for the Policy + */ + @JsonProperty("source") + abstract Source getSource(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Ports.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Ports.java new file mode 100644 index 00000000000..b4835e5d886 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Ports.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for Router Group responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _Ports { + + /** + * The ending port + */ + @JsonProperty("end") + abstract Integer getEnd(); + + /** + * The starting port + */ + @JsonProperty("start") + abstract Integer getStart(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Source.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Source.java new file mode 100644 index 00000000000..a80d1159cfe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/policies/_Source.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for Policy responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _Source { + + /** + * The id + */ + @JsonProperty("id") + abstract String getId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/Tags.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/Tags.java new file mode 100644 index 00000000000..5d525181612 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/Tags.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.tags; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Tags API + */ +public interface Tags { + + /** + * Makes the List Tags request + * + * @param request the List Tags request + * @return the response to the List Tags request + */ + Mono list(ListTagsRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_ListTagsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_ListTagsRequest.java new file mode 100644 index 00000000000..6407f62e291 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_ListTagsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.tags; + +import org.immutables.value.Value; + +/** + * The request payload for the List Tags operation + */ +@Value.Immutable +abstract class _ListTagsRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_ListTagsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_ListTagsResponse.java new file mode 100644 index 00000000000..192155869c8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_ListTagsResponse.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.tags; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response payload for the List Tags operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListTagsResponse { + + /** + * The policies + */ + @JsonProperty("tags") + abstract List getTags(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_Tag.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_Tag.java new file mode 100644 index 00000000000..b9f16c0711e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/networking/v1/tags/_Tag.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.tags; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for Tag responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _Tag { + + /** + * Id for the policy group + */ + @JsonProperty("id") + abstract String getId(); + + /** + * Tag for the policy group + */ + @JsonProperty("tag") + abstract String getTag(); + + /** + * Type for the policy group + */ + @JsonProperty("type") + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/package-info.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/package-info.java new file mode 100644 index 00000000000..0344f5da278 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/package-info.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Value.Style( + add = "*", + defaults = @Value.Immutable(copy = false), + depluralize = true, + depluralizeDictionary = "status:statuses", + jdkOnly = true, + put = "*", + typeAbstract = "_*", + typeImmutable = "*", + visibility = ImplementationVisibility.PUBLIC) +package org.cloudfoundry; + +import org.immutables.value.Value; +import org.immutables.value.Value.Style.ImplementationVisibility; diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/RoutingClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/RoutingClient.java new file mode 100644 index 00000000000..923ec22e13d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/RoutingClient.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing; + +import org.cloudfoundry.routing.v1.routergroups.RouterGroups; +import org.cloudfoundry.routing.v1.tcproutes.TcpRoutes; + +/** + * Main entry point to the Routing Client API + */ +public interface RoutingClient { + + /** + * Main entry point to the Routing Groups API + */ + RouterGroups routerGroups(); + + /** + * Main entry point to the TCP Routing API + */ + TcpRoutes tcpRoutes(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/_ModificationTag.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/_ModificationTag.java new file mode 100644 index 00000000000..3bf3c59eb06 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/_ModificationTag.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _ModificationTag { + + /** + * The ID of the route. + */ + @JsonProperty("guid") + abstract String getModificationTagId(); + + /** + * The index of the tag. + */ + @JsonProperty("index") + abstract Integer getIndex(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/AbstractRouterGroup.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/AbstractRouterGroup.java new file mode 100644 index 00000000000..42256d525ab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/AbstractRouterGroup.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The payload for Router Group responses + */ +abstract class AbstractRouterGroup { + + /** + * Name of the Router Group + */ + @JsonProperty("name") + abstract String getName(); + + /** + * Comma delimited list of reservable port or port ranges + */ + @JsonProperty("reservable_ports") + abstract String getReservablePorts(); + + /** + * ID of the Router Group + */ + @JsonProperty("guid") + abstract String getRouterGroupId(); + + /** + * Type of the router group, e.g. tcp + */ + @JsonProperty("type") + abstract String getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/RouterGroups.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/RouterGroups.java new file mode 100644 index 00000000000..9f511b16600 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/RouterGroups.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Routing Groups API + */ +public interface RouterGroups { + + /** + * Makes the List Router Groups request + * + * @param request the List Router Groups request + * @return the response to the List Router Groups request + */ + Mono list(ListRouterGroupsRequest request); + + /** + * Makes the Update Router Group request + * + * @param request the Update Router Groups request + * @return the response to the Update Router Groups request + */ + Mono update(UpdateRouterGroupRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_ListRouterGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_ListRouterGroupsRequest.java new file mode 100644 index 00000000000..fd4dac17da9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_ListRouterGroupsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import org.immutables.value.Value; + +/** + * The request payload for the List Router Groups operation + */ +@Value.Immutable +abstract class _ListRouterGroupsRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_ListRouterGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_ListRouterGroupsResponse.java new file mode 100644 index 00000000000..a30cb378365 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_ListRouterGroupsResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response payload for the List Router Groups operation + */ +@JsonDeserialize(using = ListRouterGroupsResponse.ListRouterGroupsResponseDeserializer.class) +@Value.Immutable +abstract class _ListRouterGroupsResponse { + + /** + * The Router Groups + */ + abstract List getRouterGroups(); + + + static final class ListRouterGroupsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6443312775022158253L; + + ListRouterGroupsResponseDeserializer() { + super(ListRouterGroupsResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListRouterGroupsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListRouterGroupsResponse.builder() + .routerGroups((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_RouterGroup.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_RouterGroup.java new file mode 100644 index 00000000000..04380d88a9b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_RouterGroup.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for Router Group responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _RouterGroup extends AbstractRouterGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_UpdateRouterGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_UpdateRouterGroupRequest.java new file mode 100644 index 00000000000..4afedb08c30 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_UpdateRouterGroupRequest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Update Router Group operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateRouterGroupRequest { + + /** + * The reservable ports + */ + @JsonProperty("reservable_ports") + abstract String getReservablePorts(); + + /** + * The router group id + */ + @JsonIgnore + abstract String getRouterGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_UpdateRouterGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_UpdateRouterGroupResponse.java new file mode 100644 index 00000000000..fa9fa2296c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/routergroups/_UpdateRouterGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Update Router Group operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateRouterGroupResponse extends AbstractRouterGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/AbstractTcpRoute.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/AbstractTcpRoute.java new file mode 100644 index 00000000000..07059a555bb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/AbstractTcpRoute.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.routing.v1.ModificationTag; + +abstract class AbstractTcpRoute { + + /** + * IP address of backend. + */ + @JsonProperty("backend_ip") + abstract String getBackendIp(); + + /** + * Backend port. + */ + @JsonProperty("backend_port") + abstract Integer getBackendPort(); + + /** + * The isolation segment + */ + @JsonProperty("isolation_segment") + @Nullable + abstract String getIsolationSegment(); + + /** + * Modification Tag for the route. + */ + @JsonProperty("modification_tag") + abstract ModificationTag getModificationTag(); + + /** + * External facing port for the TCP route. + */ + @JsonProperty("port") + abstract Integer getPort(); + + /** + * ID of the router group associated with this route. + */ + @JsonProperty("router_group_guid") + abstract String getRouterGroupId(); + + /** + * Time to live, in seconds. + */ + @JsonProperty("ttl") + abstract Integer getTtl(); + + /** + * Backend TLS port + */ + @JsonProperty("backend_tls_port") + @Nullable + abstract Integer getBackendTlsPort(); + + /** + * Instance ID + */ + @JsonProperty("instance_id") + @Nullable + abstract Integer getInstanceId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/EventType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/EventType.java new file mode 100644 index 00000000000..ee42ae3d1b7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/EventType.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The event type + */ +public enum EventType { + + /** + * The delete event type + */ + DELETE("DELETE"), + + /** + * The upsert event type + */ + UPSERT("UPSERT"); + + private final String value; + + EventType(String value) { + this.value = value; + } + + @JsonCreator + public static EventType from(String s) { + switch (s.toLowerCase()) { + case "delete": + return DELETE; + case "upsert": + return UPSERT; + default: + throw new IllegalArgumentException(String.format("Unknown event type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/TcpRoutes.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/TcpRoutes.java new file mode 100644 index 00000000000..9e3a6ce228f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/TcpRoutes.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the TCP Routes API + */ +public interface TcpRoutes { + + /** + * Makes the Create TCP Routes request + * + * @param request the Create TCP Routes request + * @return the response to the Create TCP Routes request + */ + Mono create(CreateTcpRoutesRequest request); + + /** + * Makes the Delete TCP Routes request + * + * @param request the Delete TCP Routes request + * @return the response to the Delete TCP Routes request + */ + Mono delete(DeleteTcpRoutesRequest request); + + /** + * Makes the TCP Routes Events request + * + * @param request the TCP Routes Events request + * @return the response to the TCP Routes Events request + */ + Flux events(EventsRequest request); + + /** + * Makes the List TCP Routes request + * + * @param request the List TCP Routes request + * @return the response to the List TCP Routes request + */ + Mono list(ListTcpRoutesRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_CreateTcpRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_CreateTcpRoutesRequest.java new file mode 100644 index 00000000000..e4760ba8e67 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_CreateTcpRoutesRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the Create TCP Routes operation + */ +@JsonSerialize(using = CreateTcpRoutesRequest.CreateTcpRoutesRequestSerializer.class) +@Value.Immutable +abstract class _CreateTcpRoutesRequest { + + /** + * The TCP Routes + */ + abstract List getTcpRoutes(); + + static final class CreateTcpRoutesRequestSerializer extends StdSerializer { + + private static final long serialVersionUID = 5332104273909063419L; + + CreateTcpRoutesRequestSerializer() { + super(CreateTcpRoutesRequest.class); + } + + @Override + public void serialize(CreateTcpRoutesRequest value, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(value.getTcpRoutes()); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_CreateTcpRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_CreateTcpRoutesResponse.java new file mode 100644 index 00000000000..ba30a3d13ae --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_CreateTcpRoutesResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the Create TCP Routes operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateTcpRoutesResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_DeleteTcpRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_DeleteTcpRoutesRequest.java new file mode 100644 index 00000000000..814122d64cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_DeleteTcpRoutesRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the Delete TCP Routes operation + */ +@JsonSerialize(using = DeleteTcpRoutesRequest.DeleteTcpRoutesRequestSerializer.class) +@Value.Immutable +abstract class _DeleteTcpRoutesRequest { + + /** + * The TCP Routes + */ + abstract List getTcpRoutes(); + + static final class DeleteTcpRoutesRequestSerializer extends StdSerializer { + + private static final long serialVersionUID = 7261470325465340771L; + + DeleteTcpRoutesRequestSerializer() { + super(DeleteTcpRoutesRequest.class); + } + + @Override + public void serialize(DeleteTcpRoutesRequest value, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(value.getTcpRoutes()); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_EventsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_EventsRequest.java new file mode 100644 index 00000000000..b520eaf696d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_EventsRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import org.immutables.value.Value; + +/** + * The request payload for the TCP Routes Events operation + */ +@Value.Immutable +abstract class _EventsRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_ListTcpRoutesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_ListTcpRoutesRequest.java new file mode 100644 index 00000000000..137d081c5c1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_ListTcpRoutesRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import org.immutables.value.Value; + +/** + * The request payload for the List TCP Routes operation + */ +@Value.Immutable +abstract class _ListTcpRoutesRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_ListTcpRoutesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_ListTcpRoutesResponse.java new file mode 100644 index 00000000000..fbe7063be98 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_ListTcpRoutesResponse.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response payload for the List TCP Routes operation + */ +@JsonDeserialize(using = ListTcpRoutesResponse.ListTcpRoutesResponseDeserializer.class) +@Value.Immutable +abstract class _ListTcpRoutesResponse { + + /** + * The TCP Routes + */ + abstract List getTcpRoutes(); + + static final class ListTcpRoutesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6443312775022158253L; + + ListTcpRoutesResponseDeserializer() { + super(ListTcpRoutesResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListTcpRoutesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListTcpRoutesResponse.builder() + .tcpRoutes((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRoute.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRoute.java new file mode 100644 index 00000000000..a125309185c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRoute.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for TCP Route responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _TcpRoute extends AbstractTcpRoute { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteConfiguration.java new file mode 100644 index 00000000000..97a72c08422 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteConfiguration.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for TCP Route responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _TcpRouteConfiguration { + + /** + * IP address of backend. + */ + @JsonProperty("backend_ip") + abstract String getBackendIp(); + + /** + * Backend port. + */ + @JsonProperty("backend_port") + abstract Integer getBackendPort(); + + /** + * External facing port for the TCP route. + */ + @JsonProperty("port") + abstract Integer getPort(); + + /** + * ID of the router group associated with this route. + */ + @JsonProperty("router_group_guid") + abstract String getRouterGroupId(); + + /** + * Time to live, in seconds. + */ + @JsonProperty("ttl") + abstract Integer getTtl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteDeletion.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteDeletion.java new file mode 100644 index 00000000000..8ddf6a27c20 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteDeletion.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for TCP Route responses + */ +@JsonDeserialize +@Value.Immutable +abstract class _TcpRouteDeletion { + + /** + * IP address of backend. + */ + @JsonProperty("backend_ip") + abstract String getBackendIp(); + + /** + * Backend port. + */ + @JsonProperty("backend_port") + abstract Integer getBackendPort(); + + /** + * External facing port for the TCP route. + */ + @JsonProperty("port") + abstract Integer getPort(); + + /** + * ID of the router group associated with this route. + */ + @JsonProperty("router_group_guid") + abstract String getRouterGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteEvent.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteEvent.java new file mode 100644 index 00000000000..605becb46c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/routing/v1/tcproutes/_TcpRouteEvent.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _TcpRouteEvent extends AbstractTcpRoute { + + /** + * The event type + */ + abstract EventType getEventType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/IdentityZoned.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/IdentityZoned.java new file mode 100644 index 00000000000..2839eaadd49 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/IdentityZoned.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; + +/** + * An interface that indicates that a UAA request can specify an identity zone in its header + */ +public interface IdentityZoned { + + /** + * Returns the identity zone id + * + * @return the identity zone id + */ + @JsonIgnore + @Nullable + String getIdentityZoneId(); + + /** + * Returns the identity zone subdomain + * + * @return the identity zone subdomain + */ + @JsonIgnore + @Nullable + String getIdentityZoneSubdomain(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedAndSortedByRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedAndSortedByRequest.java new file mode 100644 index 00000000000..e028294fcc7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedAndSortedByRequest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; + +/** + * Base class for requests that are paginated + */ +public abstract class PaginatedAndSortedByRequest extends PaginatedAndSortedRequest { + + /** + * The sort by + */ + @Nullable + @QueryParameter("sortBy") + public abstract String getSortBy(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedAndSortedRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedAndSortedRequest.java new file mode 100644 index 00000000000..d5be1eda288 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedAndSortedRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; + +/** + * Base class for requests that are paginated + */ +public abstract class PaginatedAndSortedRequest { + + /** + * The number of results per page + */ + @Nullable + @QueryParameter("count") + public abstract Integer getCount(); + + /** + * The filter + */ + @Nullable + @QueryParameter("filter") + public abstract String getFilter(); + + /** + * The sort order + */ + @Nullable + @QueryParameter("sortOrder") + public abstract SortOrder getSortOrder(); + + /** + * The start index + */ + @Nullable + @QueryParameter("startIndex") + public abstract Integer getStartIndex(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedResponse.java new file mode 100644 index 00000000000..18214b084f7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/PaginatedResponse.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; + +/** + * Base class for requests that are paginated + * + * @param the entity type + */ +public abstract class PaginatedResponse { + + /** + * The itemsPerPage + */ + @JsonProperty("itemsPerPage") + public abstract Integer getItemsPerPage(); + + /** + * The resources + */ + @JsonProperty("resources") + public abstract List getResources(); + + /** + * The schemas + */ + @JsonProperty("schemas") + public abstract List getSchemas(); + + /** + * The startIndex + */ + @JsonProperty("startIndex") + public abstract Integer getStartIndex(); + + /** + * The total results + */ + @JsonProperty("totalResults") + public abstract Integer getTotalResults(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ResponseType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ResponseType.java new file mode 100644 index 00000000000..50949a88911 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ResponseType.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The response types + */ +public enum ResponseType { + CODE("code"), + + ID_TOKEN("id_token"), + + CODE_AND_ID_TOKEN("code id_token"), + + TOKEN_AND_ID_TOKEN("token id_token"), + + TOKEN("token"); + + private final String value; + + ResponseType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/SortOrder.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/SortOrder.java new file mode 100644 index 00000000000..935a5419aa6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/SortOrder.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The sort order + */ +public enum SortOrder { + + /** + * Indicates that order should be ascending + */ + ASCENDING("ascending"), + + /** + * Indicates that order should be descending + */ + DESCENDING("descending"); + + private final String value; + + SortOrder(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/UaaClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/UaaClient.java new file mode 100644 index 00000000000..665fb920ee1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/UaaClient.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import org.cloudfoundry.uaa.authorizations.Authorizations; +import org.cloudfoundry.uaa.clients.Clients; +import org.cloudfoundry.uaa.groups.Groups; +import org.cloudfoundry.uaa.identityproviders.IdentityProviders; +import org.cloudfoundry.uaa.identityzones.IdentityZones; +import org.cloudfoundry.uaa.ratelimit.Ratelimit; +import org.cloudfoundry.uaa.serverinformation.ServerInformation; +import org.cloudfoundry.uaa.tokens.Tokens; +import org.cloudfoundry.uaa.users.Users; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Client API + */ +public interface UaaClient { + + /** + * The currently supported UAA API version + */ + String SUPPORTED_API_VERSION = "74.5.2"; + + /** + * Main entry point to the UAA Authorizations Client API + */ + Authorizations authorizations(); + + /** + * Main entry point to the UAA Clients API + */ + Clients clients(); + + /** + * Returns the username of the current user + */ + Mono getUsername(); + + /** + * Main entry point to the UAA Group Client API + */ + Groups groups(); + + /** + * Main entry point to the UAA Identity Provider Client API + */ + IdentityProviders identityProviders(); + + /** + * Main entry point to the UAA Identity Zone Client API + */ + IdentityZones identityZones(); + + /** + * Main entry point to the UAA Server Information API + */ + ServerInformation serverInformation(); + + /** + * Main entry point to the UAA Token Client API + */ + Tokens tokens(); + + /** + * Main entry point to the UAA User Client API + */ + Users users(); + + /** + * Main entry point to the UAA Ratelimit API + */ + Ratelimit rateLimit(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/UaaException.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/UaaException.java new file mode 100644 index 00000000000..e961faff1be --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/UaaException.java @@ -0,0 +1,68 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import org.cloudfoundry.AbstractCloudFoundryException; + +/** + * An exception encapsulating an error returned from the UAA APIs + */ +public final class UaaException extends AbstractCloudFoundryException { + + private static final long serialVersionUID = -474523104186506972L; + + private final String error; + + private final String errorDescription; + + private final String payload; + + /** + * Creates a new instance + * + * @param statusCode the status code + * @param error the error + * @param errorDescription the error description + */ + public UaaException(Integer statusCode, String error, String errorDescription, String payload) { + super(statusCode, String.format("%s: %s", error, errorDescription)); + this.error = error; + this.errorDescription = errorDescription; + this.payload = payload; + } + + /** + * Returns the error + */ + public String getError() { + return this.error; + } + + /** + * Returns the error message + */ + public String getErrorDescription() { + return this.errorDescription; + } + + /** + * Returns the full error payload + */ + public String getPayload() { + return payload; + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/Versioned.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/Versioned.java new file mode 100644 index 00000000000..1e3b1e043a6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/Versioned.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; + +/** + * An interface that indicates that a UAA request can specify an If Match in its header + */ +public interface Versioned { + + /** + * Returns the version + */ + @JsonIgnore + @Nullable + String getVersion(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/_Metadata.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/_Metadata.java new file mode 100644 index 00000000000..b05ff414297 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/_Metadata.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The metadata payload entities + */ +@JsonDeserialize +@Value.Immutable +abstract class _Metadata { + + /** + * When the resource record was created + */ + @JsonProperty("created") + @Nullable + abstract String getCreated(); + + /** + * When the resource record was last modified + */ + @JsonProperty("lastModified") + @Nullable + abstract String getLastModified(); + + /** + * The metadata version + */ + @JsonProperty("version") + @Nullable + abstract Integer getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/AbstractAuthorizationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/AbstractAuthorizationRequest.java new file mode 100644 index 00000000000..d4dd75feae5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/AbstractAuthorizationRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; + +/** + * The request payload for OpenID requests + */ +abstract class AbstractAuthorizationRequest { + + /** + * A unique string representing the registration information provided by the client + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * Redirection URI to which the authorization server will send the user-agent back once access is granted (or denied), optional if pre-registered by the client + */ + @Nullable + @QueryParameter("redirect_uri") + abstract String getRedirectUri(); + + /** + * requested scopes, space-delimited + */ + @Nullable + @QueryParameter(value = "scope", delimiter = " ") + abstract List getScopes(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/Authorizations.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/Authorizations.java new file mode 100644 index 00000000000..dd51833872a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/Authorizations.java @@ -0,0 +1,93 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Authorization Client API + */ +public interface Authorizations { + + /** + * Makes the Authorize By Authorization Code Grant (API) request + * + * @param request Authorize By Authorization Code Grant (API) request + * @return the authorization code + */ + Mono authorizationCodeGrantApi(AuthorizeByAuthorizationCodeGrantApiRequest request); + + /** + * Makes the Authorize By Authorization Code Grant (Browser) request + * + * @param request Authorize By Authorization Code Grant (Browser) request + * @return the authentication redirect URI + */ + Mono authorizationCodeGrantBrowser( + AuthorizeByAuthorizationCodeGrantBrowserRequest request); + + /** + * Makes the Authorize By Authorization Code Grant (Hybrid) request + * + * @param request Authorize By Authorization Code Grant (Hybrid) request + * @return the authentication redirect URI + */ + Mono authorizationCodeGrantHybrid( + AuthorizeByAuthorizationCodeGrantHybridRequest request); + + /** + * Makes the Get Open ID Provider Configuration request + * + * @param request Get Open ID Provider Configuration request + * @return the Open ID Provider Configuration + */ + Mono getOpenIdProviderConfiguration( + GetOpenIdProviderConfigurationRequest request); + + /** + * Makes the Authorize By Implicit Grant (Browser) request + * + * @param request Authorize By Implicit Grant (Browser) request + * @return the authentication redirect URI + */ + Mono implicitGrantBrowser(AuthorizeByImplicitGrantBrowserRequest request); + + /** + * Makes the Authorize By Open ID with Authorization Code Grant request + * + * @param request Authorize By Open ID with an Authorization Code Grant request + * @return the authentication location URI, including Access Token + */ + Mono openIdWithAuthorizationCodeAndIdToken( + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest request); + + /** + * Makes the Authorize By Open ID with an ID Token request + * + * @param request Authorize By Open ID with an ID Token request + * @return the authentication location URI, including Access Token + */ + Mono openIdWithIdToken(AuthorizeByOpenIdWithIdTokenRequest request); + + /** + * Makes the Authorize By Open ID with Implicit Grant request + * + * @param request Authorize By Open ID with Implicit Grant request + * @return the authentication location URI, including Access Token + */ + Mono openIdWithTokenAndIdToken(AuthorizeByOpenIdWithImplicitGrantRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantApiRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantApiRequest.java new file mode 100644 index 00000000000..1f07b30e675 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantApiRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for authorization with an authorization code grant operation + */ +@Value.Immutable +abstract class _AuthorizeByAuthorizationCodeGrantApiRequest { + + /** + * A unique string representing the registration information provided by the client + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * Redirection URI to which the authorization server will send the user-agent back once access is granted (or denied), optional if pre-registered by the client + */ + @Nullable + @QueryParameter("redirect_uri") + abstract String getRedirectUri(); + + /** + * Any random string to be returned in the Location header as a query parameter, used to achieve per-request customization + */ + @Nullable + @QueryParameter("state") + abstract String getState(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantBrowserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantBrowserRequest.java new file mode 100644 index 00000000000..942f7f19a09 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantBrowserRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for authorization with an authorization code grant operation + */ +@Value.Immutable +abstract class _AuthorizeByAuthorizationCodeGrantBrowserRequest extends AbstractAuthorizationRequest { + + /** + * The login hint + */ + @Nullable + @QueryParameter("login_hint") + abstract String getLoginHint(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantHybridRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantHybridRequest.java new file mode 100644 index 00000000000..a0d7fe779ee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByAuthorizationCodeGrantHybridRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.immutables.value.Value; + +/** + * The request payload for authorization with an authorization code grant operation + */ +@Value.Immutable +abstract class _AuthorizeByAuthorizationCodeGrantHybridRequest extends AbstractAuthorizationRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByImplicitGrantBrowserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByImplicitGrantBrowserRequest.java new file mode 100644 index 00000000000..d2d0fa51721 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByImplicitGrantBrowserRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.immutables.value.Value; + +/** + * The request payload for authorization with an authorization code grant operation + */ +@Value.Immutable +abstract class _AuthorizeByImplicitGrantBrowserRequest extends AbstractAuthorizationRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.java new file mode 100644 index 00000000000..149f8d134d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for authorize by open id with an id token operation + */ +@Value.Immutable +abstract class _AuthorizeByOpenIdWithAuthorizationCodeGrantRequest extends AbstractAuthorizationRequest { + + /** + * The login hint + */ + @Nullable + @QueryParameter("login_hint") + abstract String getLoginHint(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithIdTokenRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithIdTokenRequest.java new file mode 100644 index 00000000000..aa3d1e91e3a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithIdTokenRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.immutables.value.Value; + +/** + * The request payload for authorize by open id with an id token operation + */ +@Value.Immutable +abstract class _AuthorizeByOpenIdWithIdTokenRequest extends AbstractAuthorizationRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithImplicitGrantRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithImplicitGrantRequest.java new file mode 100644 index 00000000000..247d47b982a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_AuthorizeByOpenIdWithImplicitGrantRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for authorize by open id with an id token operation + */ +@Value.Immutable +abstract class _AuthorizeByOpenIdWithImplicitGrantRequest extends AbstractAuthorizationRequest { + + /** + * The login hint + */ + @Nullable + @QueryParameter("login_hint") + abstract String getLoginHint(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_GetOpenIdProviderConfigurationRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_GetOpenIdProviderConfigurationRequest.java new file mode 100644 index 00000000000..861b7fc13b0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_GetOpenIdProviderConfigurationRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.immutables.value.Value; + +/** + * The request payload for the get Open ID Provider Configuration operation + */ +@Value.Immutable +abstract class _GetOpenIdProviderConfigurationRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_GetOpenIdProviderConfigurationResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_GetOpenIdProviderConfigurationResponse.java new file mode 100644 index 00000000000..475eab40610 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/authorizations/_GetOpenIdProviderConfigurationResponse.java @@ -0,0 +1,152 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Locale; + +/** + * The response from the Get Open ID Provider Configuration request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetOpenIdProviderConfigurationResponse { + + /** + * The authorization endpoint + */ + @JsonProperty("authorization_endpoint") + abstract String getAuthorizationEndpoint(); + + /** + * Whether the claims parameter is supported + */ + @JsonProperty("claims_parameter_supported") + abstract Boolean getClaimsParameterSupported(); + + /** + * The issuer + */ + @JsonProperty("issuer") + abstract String getIssuer(); + + /** + * The Java Web Key Set endpoint + */ + @JsonProperty("jwks_uri") + abstract String getJavaWebKeySetEndpoint(); + + /** + * The location of human-readable documentation + */ + @JsonProperty("service_documentation") + abstract String getServiceDocumentation(); + + /** + * The claim types supported + */ + @JsonProperty("claim_types_supported") + abstract List getSupportedClaimTypes(); + + /** + * The claims supported + */ + @JsonProperty("claims_supported") + abstract List getSupportedClaims(); + + /** + * The id token encryption algorithms supported + */ + @JsonProperty("id_token_encryption_alg_values_supported") + abstract List getSupportedIdTokenEncryptionAlgorithms(); + + /** + * The id token signing algorithms supported + */ + @JsonProperty("id_token_signing_alg_values_supported") + abstract List getSupportedIdTokenSigningAlgorithms(); + + /** + * The response types supported + */ + @JsonProperty("response_types_supported") + abstract List getSupportedResponseTypes(); + + /** + * The scopes supported + */ + @JsonProperty("scopes_supported") + abstract List getSupportedScopes(); + + /** + * The subject types supported + */ + @JsonProperty("subject_types_supported") + abstract List getSupportedSubjectTypes(); + + /** + * The token endpoint authorization methods supported + */ + @JsonProperty("token_endpoint_auth_methods_supported") + abstract List getSupportedTokenEndpointAuthorizationMethods(); + + /** + * The token endpoint authorization signing algorithms supported + */ + @JsonProperty("token_endpoint_auth_signing_alg_values_supported") + abstract List getSupportedTokenEndpointAuthorizationSigningAlgorithms(); + + /** + * The UI locales supported + */ + @JsonProperty("ui_locales_supported") + abstract List getSupportedUiLocales(); + + /** + * The token endpoint + */ + @JsonProperty("token_endpoint") + abstract String getTokenEndpoint(); + + /** + * The user info endpoint + */ + @JsonProperty("userinfo_endpoint") + abstract String getUserInfoEndpoint(); + + /** + * URL of the logout endpoint. + */ + @JsonProperty("end_session_endpoint") + @Nullable + abstract String getEndSessionEndpoint(); + + /** + * JSON array containing a list of PKCE code challenge methods supported by this authorization endpoint. + */ + @JsonProperty("code_challenge_methods_supported") + @Nullable + abstract List getCodeChallengeMethodsSupported(); + +} \ No newline at end of file diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractChangeSecret.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractChangeSecret.java new file mode 100644 index 00000000000..093ef2d88dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractChangeSecret.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * The payload for change secret requests + */ +abstract class AbstractChangeSecret { + + /** + * The client id + */ + @JsonProperty("clientId") + abstract String getClientId(); + + /** + * The old secret + */ + @JsonProperty("oldSecret") + @Nullable + abstract String getOldSecret(); + + /** + * The new secret + */ + @JsonProperty("secret") + abstract String getSecret(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractClient.java new file mode 100644 index 00000000000..a761952b0c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractClient.java @@ -0,0 +1,141 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.tokens.GrantType; + +/** + * The payload for Client responses + */ +abstract class AbstractClient { + + /** + * The access token validity + */ + @JsonProperty("access_token_validity") + @Nullable + abstract Long getAccessTokenValidity(); + + /** + * The action + */ + @JsonProperty("action") + @Nullable + abstract String getAction(); + + /** + * A list of origin keys (alias) for identity providers the client is limited to. Null implies any identity provider is allowed. + */ + @JsonProperty("allowedproviders") + @Nullable + abstract List getAllowedProviders(); + + /** + * Were the approvals deleted for the client, and an audit event sent + */ + @JsonProperty("approvals_deleted") + @Nullable + abstract Boolean getApprovalsDeleted(); + + /** + * Scopes that the client is able to grant when creating a client + */ + @JsonProperty("authorities") + abstract List getAuthorities(); + + /** + * List of grant types that can be used to obtain a token with this client. Can include authorization_code, password, implicit, and/or client_credentials. + */ + @JsonProperty("authorized_grant_types") + abstract List getAuthorizedGrantTypes(); + + /** + * Scopes that do not require user approval + */ + @JsonProperty("autoapprove") + abstract List getAutoApproves(); + + /** + * Client identifier, unique within identity zone + */ + @JsonProperty("client_id") + abstract String getClientId(); + + /** + * What scope the bearer token had when client was created + */ + @JsonProperty("createdwith") + @Nullable + abstract String getCreatedWith(); + + /** + * Epoch of the moment the client information was last altered + */ + @JsonProperty("lastModified") + @Nullable + abstract Long getLastModified(); + + /** + * A human readable name for the client + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Allowed URI patterns for redirect during authorization + */ + @JsonProperty("redirect_uri") + @Nullable + abstract List getRedirectUriPatterns(); + + /** + * The refresh token validity + */ + @JsonProperty("refresh_token_validity") + @Nullable + abstract Long getRefreshTokenValidity(); + + /** + * The required user groups + */ + @JsonProperty("required_user_groups") + @Nullable + abstract List getRequiredUserGroups(); + + /** + * Resources the client is allowed access to + */ + @JsonProperty("resource_ids") + abstract List getResourceIds(); + + /** + * Scopes allowed for the client + */ + @JsonProperty("scope") + abstract List getScopes(); + + /** + * A random string used to generate the client’s revocation key. Change this value to revoke all active tokens for the client + */ + @JsonProperty("token_salt") + @Nullable + abstract String getTokenSalt(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractCreateClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractCreateClient.java new file mode 100644 index 00000000000..f5d10479c17 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractCreateClient.java @@ -0,0 +1,142 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.tokens.GrantType; +import org.immutables.value.Value; + +/** + * Client in Create request + */ +abstract class AbstractCreateClient { + + @Value.Check + void checkAuthorizedGrantTypes() { + if (this.getAuthorizedGrantTypes() == null) { + throw new IllegalStateException( + "Cannot build CreateClientRequest, required attribute authorizedGrantTypes is" + + " not set"); + } + } + + /** + * The access token validity + */ + @JsonProperty("access_token_validity") + @Nullable + abstract Long getAccessTokenValidity(); + + /** + * A list of origin keys (alias) for identity providers the client is limited to. Null implies any identity provider is allowed. + */ + @JsonProperty("allowedproviders") + @Nullable + abstract List getAllowedProviders(); + + /** + * Were the approvals deleted for the client, and an audit event sent + */ + @JsonProperty("approvals_deleted") + @Nullable + abstract Boolean getApprovalsDeleted(); + + /** + * Scopes that the client is able to grant when creating a client + */ + @JsonProperty("authorities") + @Nullable + abstract List getAuthorities(); + + /** + * List of grant types that can be used to obtain a token with this client. Can include authorization_code, password, implicit, and/or client_credentials. + */ + @JsonProperty("authorized_grant_types") + @Nullable + abstract List getAuthorizedGrantTypes(); + + /** + * Scopes that do not require user approval + */ + @JsonProperty("autoapprove") + @Nullable + abstract List getAutoApproves(); + + /** + * Client identifier, unique within identity zone + */ + @JsonProperty("client_id") + abstract String getClientId(); + + /** + * A secret string used for authenticating as this client + */ + @JsonProperty("client_secret") + @Nullable + abstract String getClientSecret(); + + /** + * What scope the bearer token had when client was created + */ + @JsonProperty("createdwith") + @Nullable + abstract String getCreatedWith(); + + /** + * A human readable name for the client + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Allowed URI pattern for redirect during authorization + */ + @JsonProperty("redirect_uri") + @Nullable + abstract List getRedirectUriPatterns(); + + /** + * The refresh token validity + */ + @JsonProperty("refresh_token_validity") + @Nullable + abstract Long getRefreshTokenValidity(); + + /** + * Resources the client is allowed access to + */ + @JsonProperty("resource_ids") + @Nullable + abstract List getResourceIds(); + + /** + * Scopes allowed for the client + */ + @JsonProperty("scope") + @Nullable + abstract List getScopes(); + + /** + * A random string used to generate the client’s revokation key. Change this value to revoke all active tokens for the client + */ + @JsonProperty("token_salt") + @Nullable + abstract String getTokenSalt(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractMetadata.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractMetadata.java new file mode 100644 index 00000000000..6967ff358ad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractMetadata.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * The payload for Client Metadata responses + */ +abstract class AbstractMetadata { + + /** + * Base64 encoded image file + */ + @JsonProperty("appIcon") + abstract String getAppIcon(); + + /** + * URL to which the app is linked + */ + @JsonProperty("appLaunchUrl") + @Nullable + abstract String getAppLaunchUrl(); + + /** + * Client identifier, unique within identity zone + */ + @JsonProperty("clientId") + abstract String getClientId(); + + /** + * Client name + */ + @JsonProperty("clientName") + @Nullable + abstract String getClientName(); + + /** + * Flag to control visibility on home page + */ + @JsonProperty("showOnHomePage") + abstract Boolean getShowOnHomePage(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractUpdateClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractUpdateClient.java new file mode 100644 index 00000000000..de8b2ff317f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/AbstractUpdateClient.java @@ -0,0 +1,121 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.tokens.GrantType; +import org.immutables.value.Value; + +/** + * Client in Update request + */ +abstract class AbstractUpdateClient { + + @Value.Check + void checkAuthorizedGrantType() { + if (this.getAuthorizedGrantTypes() == null) { + throw new IllegalStateException( + "Cannot build UpdateClientRequest, required attribute authorizedGrantTypes is" + + " not set"); + } + } + + /** + * A list of origin keys (alias) for identity providers the client is limited to. Null implies any identity provider is allowed. + */ + @JsonProperty("allowedproviders") + @Nullable + abstract List getAllowedProviders(); + + /** + * Were the approvals deleted for the client, and an audit event sent + */ + @JsonProperty("approvals_deleted") + @Nullable + abstract Boolean getApprovalsDeleted(); + + /** + * Scopes that the client is able to grant when creating a client + */ + @JsonProperty("authorities") + @Nullable + abstract List getAuthorities(); + + /** + * List of grant types that can be used to obtain a token with this client. Can include authorization_code, password, implicit, and/or client_credentials. + */ + @JsonProperty("authorized_grant_types") + @Nullable + abstract List getAuthorizedGrantTypes(); + + /** + * Scopes that do not require user approval + */ + @JsonProperty("autoapprove") + @Nullable + abstract List getAutoApproves(); + + /** + * Client identifier, unique within identity zone + */ + @JsonProperty("client_id") + abstract String getClientId(); + + /** + * What scope the bearer token had when client was created + */ + @JsonProperty("createdwith") + @Nullable + abstract String getCreatedWith(); + + /** + * A human readable name for the client + */ + @JsonProperty("name") + @Nullable + abstract String getName(); + + /** + * Allowed URI pattern for redirect during authorization + */ + @JsonProperty("redirect_uri") + @Nullable + abstract List getRedirectUriPatterns(); + + /** + * Resources the client is allowed access to + */ + @JsonProperty("resource_ids") + @Nullable + abstract List getResourceIds(); + + /** + * Scopes allowed for the client + */ + @JsonProperty("scope") + @Nullable + abstract List getScopes(); + + /** + * A random string used to generate the client’s revokation key. Change this value to revoke all active tokens for the client + */ + @JsonProperty("token_salt") + @Nullable + abstract String getTokenSalt(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/Action.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/Action.java new file mode 100644 index 00000000000..fe72eac5c65 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/Action.java @@ -0,0 +1,22 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +/* + * An interface that indicates the type of a UAA mixed action + */ +public interface Action {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/Clients.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/Clients.java new file mode 100644 index 00000000000..7ab3a274eac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/Clients.java @@ -0,0 +1,137 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Clients API + */ +public interface Clients { + + /** + * Makes the Batch Change Secret request + * + * @param request the Batch Change Secret request + * @return the response to the Batch Change Secret request + */ + Mono batchChangeSecret(BatchChangeSecretRequest request); + + /** + * Makes the Batch Create Client request + * + * @param request the Batch Create Client request + * @return the response to the Batch Create Client request + */ + Mono batchCreate(BatchCreateClientsRequest request); + + /** + * Makes the Batch Delete Clients request + * + * @param request the Batch Delete Clients request + * @return the response to the Batch Delete Clients request + */ + Mono batchDelete(BatchDeleteClientsRequest request); + + /** + * Makes the Batch Update Clients request + * + * @param request the Batch Update Clients request + * @return the response to the Batch Update Clients request + */ + Mono batchUpdate(BatchUpdateClientsRequest request); + + /** + * Makes the Change Secret request + * + * @param request the Change Secret request + * @return the response to the Change Secret request + */ + Mono changeSecret(ChangeSecretRequest request); + + /** + * Makes the Create Client request + * + * @param request the Create Client request + * @return the response to the Create Client request + */ + Mono create(CreateClientRequest request); + + /** + * Makes the Delete Client request + * + * @param request the Delete Client request + * @return the response to the Delete Client request + */ + Mono delete(DeleteClientRequest request); + + /** + * Makes the Retrieve Client request + * + * @param request the Get Client request + * @return the response to the Get Client request + */ + Mono get(GetClientRequest request); + + /** + * Makes the Retrieve Metadata request + * + * @param request the Get Metadata request + * @return the response to the Get Metadata request + */ + Mono getMetadata(GetMetadataRequest request); + + /** + * Makes the List Clients request + * + * @param request the List Clients request + * @return the response to the List Clients request + */ + Mono list(ListClientsRequest request); + + /** + * Makes the List Metadatas request + * + * @param request the List Metadatas request + * @return the response to the List Metadatas request + */ + Mono listMetadatas(ListMetadatasRequest request); + + /** + * Makes the Mixed Actions request + * + * @param request the Mixed Actions request + * @return the response to the Mixed Actions request + */ + Mono mixedActions(MixedActionsRequest request); + + /** + * Makes the Update Client request + * + * @param request the Update Client request + * @return the response to the Update Client request + */ + Mono update(UpdateClientRequest request); + + /** + * Makes the Update Metadata request + * + * @param request the Update Metadata request + * @return the response to the Update Metadata request + */ + Mono updateMetadata(UpdateMetadataRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ActionClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ActionClient.java new file mode 100644 index 00000000000..790a7644a95 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ActionClient.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list clients response + */ +@JsonDeserialize +@Value.Immutable +abstract class _ActionClient extends AbstractClient implements Action { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchChangeSecretRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchChangeSecretRequest.java new file mode 100644 index 00000000000..63d7a13f851 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchChangeSecretRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the Batch Create Clients operation + */ +@Value.Immutable +@JsonSerialize(using = _BatchChangeSecretRequest.BatchChangeSecretSerializer.class) +abstract class _BatchChangeSecretRequest implements IdentityZoned { + + @Value.Check + void checkClients() { + if (this.getChangeSecrets().isEmpty()) { + throw new IllegalStateException("Cannot build BatchChangeSecretsRequest, required attribute changeSecret is not set"); + } + } + + /** + * A list of secrets to change + */ + @JsonIgnore + abstract List getChangeSecrets(); + + static class BatchChangeSecretSerializer extends StdSerializer { + + private static final long serialVersionUID = 8880285813370852371L; + + BatchChangeSecretSerializer() { + super(BatchChangeSecretRequest.class); + } + + @Override + public void serialize(BatchChangeSecretRequest request, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(request.getChangeSecrets()); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchChangeSecretResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchChangeSecretResponse.java new file mode 100644 index 00000000000..0d5fd3b0499 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchChangeSecretResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the Batch Create Clients request + */ +@JsonDeserialize(using = _BatchChangeSecretResponse.BatchChangeSecretResponseDeserializer.class) +@Value.Immutable +abstract class _BatchChangeSecretResponse { + + /** + * Clients with changed secrets + */ + abstract List getClients(); + + static class BatchChangeSecretResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -4294840228888720278L; + + BatchChangeSecretResponseDeserializer() { + super(BatchChangeSecretResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public BatchChangeSecretResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return BatchChangeSecretResponse.builder() + .clients((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchCreateClientsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchCreateClientsRequest.java new file mode 100644 index 00000000000..9bf59bd5bad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchCreateClientsRequest.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the Batch Create Clients operation + */ +@Value.Immutable +@JsonSerialize(using = _BatchCreateClientsRequest.BatchCreateClientsSerializer.class) +abstract class _BatchCreateClientsRequest implements IdentityZoned { + + @Value.Check + void checkClients() { + if (this.getClients().isEmpty()) { + throw new IllegalStateException("Cannot build BatchCreateClientsRequest, required attribute clients is not set"); + } + } + + /** + * A list of clients to create + */ + @JsonIgnore + abstract List getClients(); + + static class BatchCreateClientsSerializer extends StdSerializer { + + private static final long serialVersionUID = 958714647149130533L; + + BatchCreateClientsSerializer() { + super(BatchCreateClientsRequest.class); + } + + @Override + public void serialize(BatchCreateClientsRequest request, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(request.getClients()); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchCreateClientsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchCreateClientsResponse.java new file mode 100644 index 00000000000..ab9d7f8a131 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchCreateClientsResponse.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the Batch Create Clients request + */ +@JsonDeserialize(using = _BatchCreateClientsResponse.BatchCreateClientsResponseDeserializer.class) +@Value.Immutable +abstract class _BatchCreateClientsResponse { + + /** + * The created clients + */ + abstract List getClients(); + + + static class BatchCreateClientsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -6791422038021875174L; + + BatchCreateClientsResponseDeserializer() { + super(BatchCreateClientsResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public BatchCreateClientsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return BatchCreateClientsResponse.builder() + .clients((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchDeleteClientsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchDeleteClientsRequest.java new file mode 100644 index 00000000000..2c6fc851211 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchDeleteClientsRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Collections; +import java.util.List; + +/** + * The request payload for the Batch Delete Clients operation + */ +@Value.Immutable +@JsonSerialize(using = _BatchDeleteClientsRequest.BatchDeleteClientsSerializer.class) +abstract class _BatchDeleteClientsRequest implements IdentityZoned { + + @Value.Check + void checkClientIds() { + if (this.getClientIds().isEmpty()) { + throw new IllegalStateException("Cannot build BatchDeleteClientsRequest, required attribute clientIds is not set"); + } + } + + /** + * A list of identifiers of clients to delete + */ + @JsonIgnore + abstract List getClientIds(); + + static class BatchDeleteClientsSerializer extends StdSerializer { + + private static final long serialVersionUID = 621601835573250942L; + + BatchDeleteClientsSerializer() { + super(BatchDeleteClientsRequest.class); + } + + @Override + public void serialize(BatchDeleteClientsRequest request, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(request.getClientIds().stream() + .map(clientId -> Collections.singletonMap("client_id", clientId)) + .toArray()); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchDeleteClientsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchDeleteClientsResponse.java new file mode 100644 index 00000000000..780ac0d3312 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchDeleteClientsResponse.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the Batch Delete Clients request + */ +@JsonDeserialize(using = _BatchDeleteClientsResponse.BatchDeleteClientsResponseDeserializer.class) +@Value.Immutable +abstract class _BatchDeleteClientsResponse { + + /** + * The deleted clients + */ + abstract List getClients(); + + static class BatchDeleteClientsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 999593607348906876L; + + BatchDeleteClientsResponseDeserializer() { + super(BatchDeleteClientsResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public BatchDeleteClientsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return BatchDeleteClientsResponse.builder() + .clients((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchUpdateClientsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchUpdateClientsRequest.java new file mode 100644 index 00000000000..0eb235e1b4d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchUpdateClientsRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the Batch Update Clients operation + */ +@Value.Immutable +@JsonSerialize(using = _BatchUpdateClientsRequest.BatchUpdateClientsSerializer.class) +abstract class _BatchUpdateClientsRequest implements IdentityZoned { + + @Value.Check + void checkClients() { + if (this.getClients().isEmpty()) { + throw new IllegalStateException("Cannot build BatchUpdateClientsRequest, required attribute clients is not set"); + } + } + + /** + * A list of clients to update + */ + @JsonIgnore + abstract List getClients(); + + + static class BatchUpdateClientsSerializer extends StdSerializer { + + private static final long serialVersionUID = -4801741701674524760L; + + BatchUpdateClientsSerializer() { + super(BatchUpdateClientsRequest.class); + } + + @Override + public void serialize(BatchUpdateClientsRequest request, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(request.getClients()); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchUpdateClientsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchUpdateClientsResponse.java new file mode 100644 index 00000000000..b2c5877e493 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_BatchUpdateClientsResponse.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the Batch Update Clients request + */ +@JsonDeserialize(using = _BatchUpdateClientsResponse.BatchUpdateClientsResponseDeserializer.class) +@Value.Immutable +abstract class _BatchUpdateClientsResponse { + + /** + * The updated clients + */ + abstract List getClients(); + + + static class BatchUpdateClientsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 7236348519922670190L; + + BatchUpdateClientsResponseDeserializer() { + super(BatchUpdateClientsResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public BatchUpdateClientsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return BatchUpdateClientsResponse.builder() + .clients((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecret.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecret.java new file mode 100644 index 00000000000..86e8a8735ed --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecret.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list clients response + */ +@JsonDeserialize +@Value.Immutable +abstract class _ChangeSecret extends AbstractChangeSecret { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecretRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecretRequest.java new file mode 100644 index 00000000000..9b15d997573 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecretRequest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for Change Secret + */ +@JsonSerialize +@Value.Immutable +abstract class _ChangeSecretRequest extends AbstractChangeSecret implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecretResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecretResponse.java new file mode 100644 index 00000000000..9221211e901 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ChangeSecretResponse.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the Change Secret request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ChangeSecretResponse { + + /** + * The change message + */ + @JsonProperty("message") + abstract String getMessage(); + + /** + * The change status + */ + @JsonProperty("status") + abstract String getStatus(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_Client.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_Client.java new file mode 100644 index 00000000000..4b8f077aca5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_Client.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list clients response + */ +@JsonDeserialize +@Value.Immutable +abstract class _Client extends AbstractClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClient.java new file mode 100644 index 00000000000..a61d434bdb8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClient.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.immutables.value.Value; + +/** + * The resource in the Batch Create Clients request + */ +@Value.Immutable +abstract class _CreateClient extends AbstractCreateClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientAction.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientAction.java new file mode 100644 index 00000000000..cafa364eb97 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientAction.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +/** + * The payload for the create client action + */ +@Value.Immutable +abstract class _CreateClientAction extends AbstractCreateClient implements Action { + + @JsonProperty("action") + @Value.Derived + public String getAction() { + return "add"; + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientRequest.java new file mode 100644 index 00000000000..c25dfde772b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientRequest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the create client + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateClientRequest extends AbstractCreateClient implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientResponse.java new file mode 100644 index 00000000000..4e91fe10b0d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_CreateClientResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the create client request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateClientResponse extends AbstractClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientAction.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientAction.java new file mode 100644 index 00000000000..dd27f872ac2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientAction.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +/** + * The payload for the delete client action + */ +@Value.Immutable +abstract class _DeleteClientAction implements Action { + + @JsonProperty("action") + @Value.Derived + public String getAction() { + return "delete"; + } + + /** + * The client id + */ + @JsonProperty("client_id") + abstract String getClientId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientRequest.java new file mode 100644 index 00000000000..a4da09ceaef --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for Delete Client + */ +@Value.Immutable +abstract class _DeleteClientRequest implements IdentityZoned { + + /** + * The client id + */ + @JsonIgnore + abstract String getClientId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientResponse.java new file mode 100644 index 00000000000..1e53f8653d8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_DeleteClientResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the Delete Client request + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteClientResponse extends AbstractClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetClientRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetClientRequest.java new file mode 100644 index 00000000000..8034aa2ccb5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetClientRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for Get Client + */ +@Value.Immutable +abstract class _GetClientRequest implements IdentityZoned { + + /** + * The client id + */ + @JsonIgnore + abstract String getClientId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetClientResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetClientResponse.java new file mode 100644 index 00000000000..0722b949c19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetClientResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the Get Client request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetClientResponse extends AbstractClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetMetadataRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetMetadataRequest.java new file mode 100644 index 00000000000..f3bdeb32830 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetMetadataRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for Get Metadata + */ +@Value.Immutable +abstract class _GetMetadataRequest implements IdentityZoned { + + /** + * The client id + */ + @JsonIgnore + abstract String getClientId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetMetadataResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetMetadataResponse.java new file mode 100644 index 00000000000..f887ee7be31 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_GetMetadataResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the Get Metadata request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetMetadataResponse extends AbstractMetadata { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListClientsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListClientsRequest.java new file mode 100644 index 00000000000..98ab0ff6db6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListClientsRequest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.PaginatedAndSortedByRequest; +import org.immutables.value.Value; + +/** + * The request payload for the list clients operation + */ +@Value.Immutable +abstract class _ListClientsRequest extends PaginatedAndSortedByRequest implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListClientsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListClientsResponse.java new file mode 100644 index 00000000000..1fc782a165d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListClientsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.uaa.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response from the list clients request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListClientsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListMetadatasRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListMetadatasRequest.java new file mode 100644 index 00000000000..17b074631ac --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListMetadatasRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.immutables.value.Value; + +/** + * The request payload for the list clients operation + */ +@Value.Immutable +abstract class _ListMetadatasRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListMetadatasResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListMetadatasResponse.java new file mode 100644 index 00000000000..131a5875592 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_ListMetadatasResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the list clients request + */ +@JsonDeserialize(using = _ListMetadatasResponse.ListMetadatasResponseDeserializer.class) +@Value.Immutable +abstract class _ListMetadatasResponse { + + /** + * The metadatas + */ + abstract List getMetadatas(); + + + static final class ListMetadatasResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -5354066398646521532L; + + ListMetadatasResponseDeserializer() { + super(ListMetadatasResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListMetadatasResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListMetadatasResponse.builder() + .metadatas((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_Metadata.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_Metadata.java new file mode 100644 index 00000000000..b0aa70af175 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_Metadata.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list metadatas response + */ +@JsonDeserialize +@Value.Immutable +abstract class _Metadata extends AbstractMetadata { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_MixedActionsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_MixedActionsRequest.java new file mode 100644 index 00000000000..42ab26a5af5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_MixedActionsRequest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The request payload for the Batch Update Clients operation + */ +@JsonSerialize(using = _MixedActionsRequest.MixedActionsSerializer.class) +@Value.Immutable +abstract class _MixedActionsRequest implements IdentityZoned { + + @Value.Check + void checkActions() { + if (this.getActions().isEmpty()) { + throw new IllegalStateException("Cannot build MixedActionsRequest, required attribute actions is not set"); + } + } + + /** + * A list of actions to perform + */ + @JsonIgnore + abstract List getActions(); + + static class MixedActionsSerializer extends StdSerializer { + + private static final long serialVersionUID = 8507863382046380145L; + + MixedActionsSerializer() { + super(MixedActionsRequest.class); + } + + @Override + public void serialize(MixedActionsRequest request, JsonGenerator gen, SerializerProvider provider) throws IOException { + gen.writeObject(request.getActions()); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_MixedActionsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_MixedActionsResponse.java new file mode 100644 index 00000000000..614ddb68b1a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_MixedActionsResponse.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the Batch Update Clients request + */ +@JsonDeserialize(using = _MixedActionsResponse.MixedActionsResponseDeserializer.class) +@Value.Immutable +abstract class _MixedActionsResponse { + + /** + * The updated clients + */ + abstract List getClients(); + + static final class MixedActionsResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -7915849788972763633L; + + MixedActionsResponseDeserializer() { + super(MixedActionsResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public MixedActionsResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return MixedActionsResponse.builder() + .clients((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClient.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClient.java new file mode 100644 index 00000000000..361ace8eb96 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClient.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.immutables.value.Value; + +/** + * The resource in the Batch Update Clients request + */ +@Value.Immutable +abstract class _UpdateClient extends AbstractUpdateClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientAction.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientAction.java new file mode 100644 index 00000000000..6380454beb2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientAction.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +/** + * The request payload for the create client + */ +@Value.Immutable +abstract class _UpdateClientAction extends AbstractUpdateClient implements Action { + + @JsonProperty("action") + @Value.Derived + public String getAction() { + return "update"; + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientRequest.java new file mode 100644 index 00000000000..948109d3b85 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientRequest.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for Update Client + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateClientRequest extends AbstractUpdateClient implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientResponse.java new file mode 100644 index 00000000000..d338be03ac3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateClientResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the Update Client request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateClientResponse extends AbstractClient { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateMetadataRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateMetadataRequest.java new file mode 100644 index 00000000000..664dfa3df9c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateMetadataRequest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for Update Metadata + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateMetadataRequest implements IdentityZoned { + + /** + * Base64 encoded image file + */ + @JsonProperty("appIcon") + @Nullable + abstract String getAppIcon(); + + /** + * URL to which the app is linked + */ + @JsonProperty("appLaunchUrl") + @Nullable + abstract String getAppLaunchUrl(); + + /** + * Client identifier, unique within identity zone + */ + @JsonProperty("clientId") + abstract String getClientId(); + + /** + * Client name + */ + @JsonProperty("clientName") + @Nullable + abstract String getClientName(); + + /** + * Flag to control visibility on home page + */ + @JsonProperty("showOnHomePage") + @Nullable + abstract Boolean getShowOnHomePage(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateMetadataResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateMetadataResponse.java new file mode 100644 index 00000000000..2faa10e1c7b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateMetadataResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the Update Metadata request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateMetadataResponse extends AbstractMetadata { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateSecretAction.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateSecretAction.java new file mode 100644 index 00000000000..8150992d3f8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateSecretAction.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +/** + * The request payload for the create client + */ +@Value.Immutable +abstract class _UpdateSecretAction implements Action { + + @JsonProperty("action") + @Value.Derived + public String getAction() { + return "secret"; + } + + /** + * The client id + */ + @JsonProperty("client_id") + abstract String getClientId(); + + /** + * The new secret + */ + @JsonProperty("client_secret") + abstract String getSecret(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateSecretClientAction.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateSecretClientAction.java new file mode 100644 index 00000000000..4dfe03d7c24 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/clients/_UpdateSecretClientAction.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +/** + * The request payload for the create client + */ +@Value.Immutable +abstract class _UpdateSecretClientAction extends AbstractUpdateClient implements Action { + + @JsonProperty("action") + @Value.Derived + public String getAction() { + return "update,secret"; + } + + /** + * The new secret + */ + @JsonProperty("client_secret") + abstract String getSecret(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractExternalGroupMapping.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractExternalGroupMapping.java new file mode 100644 index 00000000000..fb278d4d9f9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractExternalGroupMapping.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.uaa.Metadata; + +/** + * The entity response payload for External Group + */ +abstract class AbstractExternalGroupMapping extends AbstractExternalGroupResource { + + /** + * The group's metadata + */ + @JsonProperty("meta") + abstract Metadata getMetadata(); + + /** + * The group's schemas + */ + @JsonProperty("schemas") + abstract List getSchemas(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractExternalGroupResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractExternalGroupResource.java new file mode 100644 index 00000000000..dea6401acab --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractExternalGroupResource.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonProperty; + +abstract class AbstractExternalGroupResource { + + /** + * The group's displayed name + */ + @JsonProperty("displayName") + abstract String getDisplayName(); + + /** + * The identifier for the group in external identity provider that needs to be mapped to internal UAA groups + */ + @JsonProperty("externalGroup") + abstract String getExternalGroup(); + + /** + * The group unique ID + */ + @JsonProperty("groupId") + abstract String getGroupId(); + + /** + * Unique alias of the identity provider + */ + @JsonProperty("origin") + abstract String getOrigin(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractGroup.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractGroup.java new file mode 100644 index 00000000000..5c1f563fe15 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractGroup.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.Metadata; + +/** + * The entity response payload for Group + */ +abstract class AbstractGroup { + + /** + * Human readable description of the group, displayed e.g. when approving scopes + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The identifier specified upon creation of the group, unique within the identity zone + */ + @JsonProperty("displayName") + abstract String getDisplayName(); + + /** + * The globally unique group ID + */ + @JsonProperty("id") + abstract String getId(); + + /** + * Array of group members + */ + @JsonProperty("members") + abstract List getMembers(); + + /** + * The group's metadata + */ + @JsonProperty("meta") + abstract Metadata getMetadata(); + + /** + * The group's schemas + */ + @JsonProperty("schemas") + abstract List getSchemas(); + + /** + * Identifier for the identity zone to which the group belongs + */ + @JsonProperty("zoneId") + abstract String getZoneId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractMember.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractMember.java new file mode 100644 index 00000000000..7424183f900 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/AbstractMember.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.Optional; + +/** + * The payload for Group member + */ +abstract class AbstractMember { + + /** + * Globally unique identifier of the member, either a user ID or another group ID + */ + @JsonProperty("value") + abstract String getMemberId(); + + /** + * The alias of the identity provider that authenticated this user. "uaa" is an internal UAA user. + */ + @JsonProperty("origin") + @JsonInclude(JsonInclude.Include.NON_EMPTY) + abstract Optional getOrigin(); + + /** + * The member type + */ + @JsonProperty("type") + abstract Optional getType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/Entity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/Entity.java new file mode 100644 index 00000000000..f666cc9ef01 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/Entity.java @@ -0,0 +1,22 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +/** + * An Entity for {@link Member} + */ +public interface Entity {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/Groups.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/Groups.java new file mode 100644 index 00000000000..3915cf62c93 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/Groups.java @@ -0,0 +1,132 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Group Management Client API + */ +public interface Groups { + + /** + * Makes the Add Member request + * + * @param request the Add Member request + * @return the response from the Add Member request + */ + Mono addMember(AddMemberRequest request); + + /** + * Makes the Check Membership request + * + * @param request the Check Membership request + * @return the response from the Check Membership request + */ + Mono checkMembership(CheckMembershipRequest request); + + /** + * Makes the Create Group request + * + * @param request the Create Group request + * @return the response from the Create Group request + */ + Mono create(CreateGroupRequest request); + + /** + * Makes the Delete a Group request + * + * @param request the Delete Group request + * @return the response from the Delete Group request + */ + Mono delete(DeleteGroupRequest request); + + /** + * Makes the Retrieve a Group request + * + * @param request the Get Group request + * @return the response from the Get Group request + */ + Mono get(GetGroupRequest request); + + /** + * Makes the List Groups request + * + * @param request the List Groups request + * @return the response from the List Groups request + */ + Mono list(ListGroupsRequest request); + + /** + * Makes the List External Group Mappings request + * + * @param request the List External Group Mappings request + * @return the response from the List External Group Mappings request + */ + Mono listExternalGroupMappings( + ListExternalGroupMappingsRequest request); + + /** + * Makes the List Members request + * + * @param request the List Members request + * @return the response from the List Members request + */ + Mono listMembers(ListMembersRequest request); + + /** + * Makes the Map External Group request + * + * @param request the Map External Group request + * @return the response from the Map External Group request + */ + Mono mapExternalGroup(MapExternalGroupRequest request); + + /** + * Makes the Remove Member request + * + * @param request the Remove Member request + * @return the response from the Remove Member request + */ + Mono removeMember(RemoveMemberRequest request); + + /** + * Makes the Unmap External Group By Group Display Name request + * + * @param request the Unmap External Group By Group Display Name request + * @return the response from the Unmap External Group By Group Display Name request + */ + Mono unmapExternalGroupByGroupDisplayName( + UnmapExternalGroupByGroupDisplayNameRequest request); + + /** + * Makes the Unmap External Group By Group Id request + * + * @param request the Unmap External Group By Group Id request + * @return the response from the Unmap External Group By Group Id request + */ + Mono unmapExternalGroupByGroupId( + UnmapExternalGroupByGroupIdRequest request); + + /** + * Makes the Update Group request + * + * @param request the Update Group request + * @return the response from the Update Group request + */ + Mono update(UpdateGroupRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/MemberType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/MemberType.java new file mode 100644 index 00000000000..71242fe96c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/MemberType.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The member type of the group + */ +public enum MemberType { + + /** + * The group type + */ + GROUP("GROUP"), + + /** + * The user type + */ + USER("USER"); + + private final String value; + + MemberType(String value) { + this.value = value; + } + + @JsonCreator + public static MemberType from(String s) { + switch (s.toLowerCase()) { + case "group": + return GROUP; + case "user": + return USER; + default: + throw new IllegalArgumentException(String.format("Unknown member type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_AddMemberRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_AddMemberRequest.java new file mode 100644 index 00000000000..7e2b7cd2242 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_AddMemberRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload to add a member to a group + */ +@JsonSerialize +@Value.Immutable +abstract class _AddMemberRequest implements IdentityZoned { + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + + /** + * Globally unique identifier of the member, either a user ID or another group ID + */ + @JsonProperty("value") + abstract String getMemberId(); + + /** + * The alias of the identity provider that authenticated this user. "uaa" is an internal UAA user. + */ + @JsonProperty("origin") + abstract String getOrigin(); + + /** + * The member type + */ + @JsonProperty("type") + abstract MemberType getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_AddMemberResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_AddMemberResponse.java new file mode 100644 index 00000000000..a9acb98cf9c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_AddMemberResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload from the add a member to a group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _AddMemberResponse extends AbstractMember { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CheckMembershipRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CheckMembershipRequest.java new file mode 100644 index 00000000000..0ca0bdf3630 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CheckMembershipRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The request payload to check a membership of a group + */ +@JsonDeserialize +@Value.Immutable +abstract class _CheckMembershipRequest { + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + + /** + * The member id + */ + @JsonIgnore + abstract String getMemberId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CheckMembershipResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CheckMembershipResponse.java new file mode 100644 index 00000000000..6ce677a0702 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CheckMembershipResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload from the check a membership of a group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CheckMembershipResponse extends AbstractMember { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CreateGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CreateGroupRequest.java new file mode 100644 index 00000000000..a708002ba95 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CreateGroupRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the create group + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateGroupRequest implements IdentityZoned { + + /** + * Human readable description of the group, displayed e.g. when approving scopes + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The identifier specified upon creation of the group, unique within the identity zone + */ + @JsonProperty("displayName") + abstract String getDisplayName(); + + /** + * Array of group members + */ + @JsonProperty("members") + @Nullable + abstract List getMembers(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CreateGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CreateGroupResponse.java new file mode 100644 index 00000000000..cbb070a63a6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_CreateGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the create group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateGroupResponse extends AbstractGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_DeleteGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_DeleteGroupRequest.java new file mode 100644 index 00000000000..e03fb335cd8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_DeleteGroupRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.Versioned; +import org.immutables.value.Value; + +/** + * The request payload for the delete group + */ +@Value.Immutable +abstract class _DeleteGroupRequest implements Versioned, IdentityZoned { + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_DeleteGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_DeleteGroupResponse.java new file mode 100644 index 00000000000..4224de74962 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_DeleteGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the delete group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteGroupResponse extends AbstractGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ExternalGroupMapping.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ExternalGroupMapping.java new file mode 100644 index 00000000000..c4e3fc4a422 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ExternalGroupMapping.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list external group mappings response + */ +@JsonDeserialize +@Value.Immutable +abstract class _ExternalGroupMapping extends AbstractExternalGroupMapping { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ExternalGroupResource.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ExternalGroupResource.java new file mode 100644 index 00000000000..da0d30d425d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ExternalGroupResource.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list external group mappings response + */ +@JsonDeserialize +@Value.Immutable +abstract class _ExternalGroupResource extends AbstractExternalGroupResource { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GetGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GetGroupRequest.java new file mode 100644 index 00000000000..235c3f4d5ee --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GetGroupRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the get group + */ +@Value.Immutable +abstract class _GetGroupRequest implements IdentityZoned { + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GetGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GetGroupResponse.java new file mode 100644 index 00000000000..0ca8eaa59b5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GetGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the get group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetGroupResponse extends AbstractGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_Group.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_Group.java new file mode 100644 index 00000000000..c3bc61d17ec --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_Group.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource in the list groups response + */ +@JsonDeserialize +@Value.Immutable +abstract class _Group extends AbstractGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GroupEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GroupEntity.java new file mode 100644 index 00000000000..3ac1638fb8c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_GroupEntity.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * A group that is a {@link Member} of a {@link Group} + */ +@JsonDeserialize +@Value.Immutable +abstract class _GroupEntity extends AbstractGroup implements Entity { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListExternalGroupMappingsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListExternalGroupMappingsRequest.java new file mode 100644 index 00000000000..eb41d53b3a1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListExternalGroupMappingsRequest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.PaginatedAndSortedByRequest; +import org.immutables.value.Value; + +/** + * The request payload for the list external group mappings operation + */ +@Value.Immutable +abstract class _ListExternalGroupMappingsRequest extends PaginatedAndSortedByRequest implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListExternalGroupMappingsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListExternalGroupMappingsResponse.java new file mode 100644 index 00000000000..702686c8db2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListExternalGroupMappingsResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.uaa.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response from the list external group mappings request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListExternalGroupMappingsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListGroupsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListGroupsRequest.java new file mode 100644 index 00000000000..447c62bfa88 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListGroupsRequest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.PaginatedAndSortedByRequest; +import org.immutables.value.Value; + +/** + * The request payload for the list groups operation + */ +@Value.Immutable +abstract class _ListGroupsRequest extends PaginatedAndSortedByRequest implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListGroupsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListGroupsResponse.java new file mode 100644 index 00000000000..7f6e70a130d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListGroupsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.uaa.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response from the list Groups request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListGroupsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListMembersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListMembersRequest.java new file mode 100644 index 00000000000..7a6a96f49f1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListMembersRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the list members operation + */ +@Value.Immutable +abstract class _ListMembersRequest implements IdentityZoned { + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + + /** + * Set to true to return the SCIM entities that have membership in the group + */ + @JsonIgnore + @Nullable + @QueryParameter("returnEntities") + abstract Boolean getReturnEntities(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListMembersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListMembersResponse.java new file mode 100644 index 00000000000..5fd9839678c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_ListMembersResponse.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the list Members request + */ +@JsonDeserialize(using = _ListMembersResponse.MembersResponseDeserializer.class) +@Value.Immutable +abstract class _ListMembersResponse { + + /** + * The members + */ + abstract List getMembers(); + + static final class MembersResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = -7093943854627209191L; + + MembersResponseDeserializer() { + super(ListMembersResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListMembersResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListMembersResponse.builder() + .members((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MapExternalGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MapExternalGroupRequest.java new file mode 100644 index 00000000000..2ff3dad87cd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MapExternalGroupRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the map external group request + */ +@JsonSerialize +@Value.Immutable +abstract class _MapExternalGroupRequest implements IdentityZoned { + + /** + * The identifier for the group in external identity provider that needs to be mapped to internal UAA groups + */ + @JsonProperty("externalGroup") + abstract String getExternalGroup(); + + /** + * The group unique ID + */ + @JsonProperty("groupId") + abstract String getGroupId(); + + /** + * Unique alias of the identity provider + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MapExternalGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MapExternalGroupResponse.java new file mode 100644 index 00000000000..b9aa9c693bf --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MapExternalGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the map external group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _MapExternalGroupResponse extends AbstractExternalGroupMapping { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_Member.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_Member.java new file mode 100644 index 00000000000..0c55c497d01 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_Member.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.ObjectCodec; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonNode; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.Optional; + +/** + * A member of a {@link Group} + */ +@JsonDeserialize(using = _Member.MemberDeserializer.class) +@Value.Immutable +abstract class _Member extends AbstractMember { + + /** + * Present only if requested with returnEntities; user or group with membership in the group + */ + abstract Optional getEntity(); + + static final class MemberDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 6109722182337225713L; + + MemberDeserializer() { + super(Member.class); + } + + @Override + public Member deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + Member.Builder builder = Member.builder(); + + ObjectCodec codec = p.getCodec(); + ObjectNode tree = p.readValueAsTree(); + + if (tree.has("entity")) { + JsonNode entity = tree.get("entity"); + String type = tree.get("type").asText(); + + if (MemberType.GROUP.getValue().equalsIgnoreCase(type)) { + builder.entity(codec.treeToValue(entity, GroupEntity.class)); + } else if (MemberType.USER.getValue().equalsIgnoreCase(type)) { + builder.entity(codec.treeToValue(entity, UserEntity.class)); + } else { + throw new IllegalArgumentException(String.format("Unknown member type: %s", type)); + } + } + + builder.memberId(tree.get("value").asText()); + + if (tree.has("origin")) { + builder.origin(tree.get("origin").asText()); + } + + if (tree.has("type")) { + builder.type(codec.treeToValue(tree.get("type"), MemberType.class)); + } + + return builder.build(); + } + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MemberSummary.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MemberSummary.java new file mode 100644 index 00000000000..8d92beda6c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_MemberSummary.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for members in response + */ +@JsonDeserialize +@Value.Immutable +abstract class _MemberSummary extends AbstractMember { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_RemoveMemberRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_RemoveMemberRequest.java new file mode 100644 index 00000000000..4d859f8e25e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_RemoveMemberRequest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the remove member + */ +@Value.Immutable +abstract class _RemoveMemberRequest implements IdentityZoned { + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + + /** + * The member id + */ + @JsonIgnore + abstract String getMemberId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_RemoveMemberResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_RemoveMemberResponse.java new file mode 100644 index 00000000000..d67819ba134 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_RemoveMemberResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload from the remove a member from a group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _RemoveMemberResponse extends AbstractMember { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupDisplayNameRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupDisplayNameRequest.java new file mode 100644 index 00000000000..97c1e4499bc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupDisplayNameRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the unmap external group by group display name request + */ +@Value.Immutable +abstract class _UnmapExternalGroupByGroupDisplayNameRequest implements IdentityZoned { + + /** + * The identifier for the group in external identity provider that needs to be unmapped to internal UAA groups + */ + @JsonIgnore + abstract String getExternalGroup(); + + /** + * The group's displayed name + */ + @JsonIgnore + abstract String getGroupDisplayName(); + + /** + * Unique alias of the identity provider + */ + @JsonIgnore + abstract String getOrigin(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupDisplayNameResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupDisplayNameResponse.java new file mode 100644 index 00000000000..4c1c110e45b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupDisplayNameResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the unmap external group by group display name request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UnmapExternalGroupByGroupDisplayNameResponse extends AbstractExternalGroupMapping { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupIdRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupIdRequest.java new file mode 100644 index 00000000000..cca958d42d3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupIdRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the unmap external group by group id request + */ +@Value.Immutable +abstract class _UnmapExternalGroupByGroupIdRequest implements IdentityZoned { + + /** + * The identifier for the group in external identity provider that needs to be unmapped to internal UAA groups + */ + @JsonIgnore + abstract String getExternalGroup(); + + /** + * The group unique ID + */ + @JsonIgnore + abstract String getGroupId(); + + /** + * Unique alias of the identity provider + */ + @JsonIgnore + abstract String getOrigin(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupIdResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupIdResponse.java new file mode 100644 index 00000000000..02c7cb72384 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UnmapExternalGroupByGroupIdResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response payload for the unmap external group by group id request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UnmapExternalGroupByGroupIdResponse extends AbstractExternalGroupMapping { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UpdateGroupRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UpdateGroupRequest.java new file mode 100644 index 00000000000..935dfaa86df --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UpdateGroupRequest.java @@ -0,0 +1,68 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.Versioned; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the update group + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateGroupRequest implements Versioned, IdentityZoned { + + /** + * The version + */ + @JsonIgnore + @Override + public abstract String getVersion(); + + /** + * Human readable description of the group, displayed e.g. when approving scopes + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The identifier specified upon creation of the group, unique within the identity zone + */ + @JsonProperty("displayName") + abstract String getDisplayName(); + + /** + * The group id + */ + @JsonIgnore + abstract String getGroupId(); + + /** + * Array of group members + */ + @JsonProperty("members") + abstract List getMembers(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UpdateGroupResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UpdateGroupResponse.java new file mode 100644 index 00000000000..eb2076fa078 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UpdateGroupResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the update group request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateGroupResponse extends AbstractGroup { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UserEntity.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UserEntity.java new file mode 100644 index 00000000000..56b8a650b22 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/groups/_UserEntity.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.uaa.users.AbstractUser; +import org.immutables.value.Value; + +/** + * A user that is a {@link Member} of a {@link Group} + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserEntity extends AbstractUser implements Entity { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractAuthenticationConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractAuthenticationConfiguration.java new file mode 100644 index 00000000000..f453ba066c9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractAuthenticationConfiguration.java @@ -0,0 +1,103 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +/** + * The payload for the oauth/oidc identity provider configuration + */ +abstract class AbstractAuthenticationConfiguration + extends AbstractExternalIdentityProviderConfiguration { + + /** + * Determines whether or not shadow users must be created before login by an administrator. + */ + @JsonProperty("addShadowUserOnLogin") + @Nullable + abstract Boolean getAddShadowUserOnLogin(); + + /** + * The OAuth 2.0 authorization endpoint URL + */ + @JsonProperty("authUrl") + abstract String getAuthUrl(); + + /** + * Text to use for the login link to the provider + */ + @JsonProperty("linkText") + @Nullable + abstract String getLinkText(); + + /** + * The client ID which is registered with the external OAuth provider for use by the UAA + */ + @JsonProperty("relyingPartyId") + abstract String getRelyingPartyId(); + + /** + * The client secret of the relying party at the external OAuth provider + */ + @JsonProperty("relyingPartySecret") + @Nullable + abstract String getRelyingPartySecret(); + + /** + * What scopes to request on a call to the external OAuth/OpenID provider. For example, can provide openid, roles, or profile to request ID token, scopes populated in the ID token external groups + * attribute mappings, or the user profile information, respectively. + */ + @JsonProperty("scopes") + @Nullable + abstract List getScopes(); + + /** + * A flag controlling whether a link to this provider’s login will be shown on the UAA login page + */ + @JsonProperty("showLinkText") + @Nullable + abstract Boolean getShowLinkText(); + + /** + * Skips validation of the LDAP cert if set to true. + */ + @JsonProperty("skipSslValidation") + @Nullable + abstract Boolean getSkipSslVerification(); + + /** + * A verification key for validating token signatures + */ + @JsonProperty("tokenKey") + @Nullable + abstract String getTokenKey(); + + /** + * The URL of the token key endpoint which renders a verification key for validating token signatures + */ + @JsonProperty("tokenKeyUrl") + @Nullable + abstract String getTokenKeyUrl(); + + /** + * The OAuth 2.0 authorization endpoint URL + */ + @JsonProperty("tokenUrl") + abstract String getTokenUrl(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractExternalIdentityProviderConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractExternalIdentityProviderConfiguration.java new file mode 100644 index 00000000000..d958c47f50a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractExternalIdentityProviderConfiguration.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +abstract class AbstractExternalIdentityProviderConfiguration + extends AbstractIdentityProviderConfiguration { + + @JsonProperty("attributeMappings") + @Nullable + abstract AttributeMappings getAttributeMappings(); + + /** + * The external group white list + */ + @JsonProperty("externalGroupsWhitelist") + @Nullable + abstract List getExternalGroupsWhitelist(); + + /** + * Set to true, to store custom user attributes to be fetched from the /userinfo endpoint + */ + @JsonProperty("storeCustomAttributes") + @Nullable + abstract Boolean getStoreCustomAttributes(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractIdentityProvider.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractIdentityProvider.java new file mode 100644 index 00000000000..e2b53d7ac26 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractIdentityProvider.java @@ -0,0 +1,115 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonSubTypes; +import com.fasterxml.jackson.annotation.JsonTypeInfo; +import org.cloudfoundry.Nullable; + +/** + * The entity response payload for Identity Provider + */ +abstract class AbstractIdentityProvider { + + /** + * Whether the identity provider is active + */ + @JsonProperty("active") + abstract Boolean getActive(); + + /** + * The configuration of this identity provider + */ + @JsonProperty("config") + @JsonTypeInfo( + use = JsonTypeInfo.Id.NAME, + include = JsonTypeInfo.As.EXTERNAL_PROPERTY, + property = "type") + @JsonSubTypes({ + @JsonSubTypes.Type(name = "keystone", value = KeystoneConfiguration.class), + @JsonSubTypes.Type(name = "ldap", value = LdapConfiguration.class), + @JsonSubTypes.Type(name = "oauth2.0", value = OAuth2Configuration.class), + @JsonSubTypes.Type(name = "oidc1.0", value = OpenIdConnectConfiguration.class), + @JsonSubTypes.Type(name = "saml", value = SamlConfiguration.class), + @JsonSubTypes.Type(name = "uaa", value = InternalConfiguration.class) + }) + @Nullable + abstract IdentityProviderConfiguration getConfiguration(); + + /** + * The creation date of the identity provider + */ + @JsonProperty("created") + abstract Long getCreatedAt(); + + /** + * The id + */ + @JsonProperty("id") + abstract String getId(); + + /** + * The alias id + */ + @JsonProperty("aliasId") + @Nullable + abstract String getAliasId(); + + /** + * The alias Zone id + */ + @JsonProperty("aliasZid") + @Nullable + abstract String getAliasZid(); + + /** + * Set to the zone that this provider will be active in. Determined either by the Host header or the zone switch header. + */ + @JsonProperty("identityZoneId") + abstract String getIdentityZoneId(); + + /** + * The last modification date of the identity provider + */ + @JsonProperty("last_modified") + abstract Long getLastModified(); + + /** + * Human-readable name for this provider + */ + @JsonProperty("name") + abstract String getName(); + + /** + * A unique alias for the provider + */ + @JsonProperty("originKey") + abstract String getOriginKey(); + + /** + * The type of identity provider + */ + @JsonProperty("type") + abstract Type getType(); + + /** + * Version of the identity provider data. Clients can use this to protect against conflicting updates + */ + @JsonProperty("version") + abstract Integer getVersion(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractIdentityProviderConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractIdentityProviderConfiguration.java new file mode 100644 index 00000000000..f1f7cf2856c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/AbstractIdentityProviderConfiguration.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +@JsonIgnoreProperties(value = "additionalConfiguration") +abstract class AbstractIdentityProviderConfiguration implements IdentityProviderConfiguration { + + /** + * List of email domains associated with the provider for the purpose of associating users to the correct origin upon invitation. If empty list, no invitations are accepted. Wildcards supported. + */ + @JsonProperty("emailDomain") + @Nullable + abstract List getEmailDomains(); + + /** + * Human readable name/description of this provider + */ + @JsonProperty("providerDescription") + @Nullable + abstract String getProviderDescription(); + + /** + * explicit method to authenticate against the identity provider. + */ + @JsonProperty("authMethod") + @Nullable + abstract String getAuthMethod(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/ExternalGroupMappingMode.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/ExternalGroupMappingMode.java new file mode 100644 index 00000000000..43e87938b38 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/ExternalGroupMappingMode.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The mapping mode for a {@link SamlConfiguration} + */ +public enum ExternalGroupMappingMode { + + /** + * The explicitly mapped type + */ + EXPLICITLY_MAPPED("EXPLICITLY_MAPPED"), + + /** + * The as scopes type + */ + AS_SCOPES("AS_SCOPES"); + + private final String value; + + ExternalGroupMappingMode(String value) { + this.value = value; + } + + @JsonCreator + public static ExternalGroupMappingMode from(String s) { + switch (s.toLowerCase()) { + case "explicitly_mapped": + return EXPLICITLY_MAPPED; + case "as_scopes": + return AS_SCOPES; + default: + throw new IllegalArgumentException( + String.format("Unknown external group mapping mode: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/IdentityProviderConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/IdentityProviderConfiguration.java new file mode 100644 index 00000000000..b00fafb5bb6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/IdentityProviderConfiguration.java @@ -0,0 +1,22 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +/** + * Configuration for an {@link AbstractIdentityProvider} + */ +public interface IdentityProviderConfiguration {} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/IdentityProviders.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/IdentityProviders.java new file mode 100644 index 00000000000..0203602c9a1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/IdentityProviders.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Identity Provider Management Client API + */ +public interface IdentityProviders { + + /** + * Makes the Create Identity Provider request + * + * @param request the Create Identity Provider request + * @return the response from the Create Identity Provider request + */ + Mono create(CreateIdentityProviderRequest request); + + /** + * Makes the Delete Identity Provider request + * + * @param request the Delete Identity Provider request + * @return the response from the Delete Identity Provider request + */ + Mono delete(DeleteIdentityProviderRequest request); + + /** + * Makes the Get Identity Provider request + * + * @param request the Get Identity Provider request + * @return the response from the Get Identity Provider request + */ + Mono get(GetIdentityProviderRequest request); + + /** + * Makes the List Identity Providers request + * + * @param request the List Identity Providers request + * @return the response from the List Identitys Provider request + */ + Mono list(ListIdentityProvidersRequest request); + + /** + * Makes the Update Identity Provider request + * + * @param request the Update Identity Provider request + * @return the response from the Update Identity Provider request + */ + Mono update(UpdateIdentityProviderRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/LdapGroupFile.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/LdapGroupFile.java new file mode 100644 index 00000000000..807a5fa5a55 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/LdapGroupFile.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The file to be used for group integration. + */ +public enum LdapGroupFile { + GROUPS_AS_SCOPES("ldap/ldap-groups-as-scopes.xml"), + + GROUPS_MAP_TO_SCOPES("ldap/ldap-groups-map-to-scopes.xml"), + + NO_GROUP("ldap/ldap-groups-null.xml"); + + private final String value; + + LdapGroupFile(String value) { + this.value = value; + } + + @JsonCreator + public static LdapGroupFile from(String s) { + switch (s.toLowerCase()) { + case "ldap/ldap-groups-as-scopes.xml": + return GROUPS_AS_SCOPES; + case "ldap/ldap-groups-map-to-scopes.xml": + return GROUPS_MAP_TO_SCOPES; + case "ldap/ldap-groups-null.xml": + return NO_GROUP; + default: + throw new IllegalArgumentException(String.format("Unknown ldap group file: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/LdapProfileFile.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/LdapProfileFile.java new file mode 100644 index 00000000000..559a7fa29de --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/LdapProfileFile.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The file to be used for configuring the LDAP authentication. + */ +public enum LdapProfileFile { + SEARCH_AND_BIND("ldap/ldap-search-and-bind.xml"), + + SEARCH_AND_COMPARE("ldap/ldap-search-and-compare.xml"), + + SIMPLE_BIND("ldap/ldap-simple-bind.xml"); + + private final String value; + + LdapProfileFile(String value) { + this.value = value; + } + + @JsonCreator + public static LdapProfileFile from(String s) { + switch (s.toLowerCase()) { + case "ldap/ldap-search-and-bind.xml": + return SEARCH_AND_BIND; + case "ldap/ldap-search-and-compare.xml": + return SEARCH_AND_COMPARE; + case "ldap/ldap-simple-bind.xml": + return SIMPLE_BIND; + default: + throw new IllegalArgumentException( + String.format("Unknown ldap profile file: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/TlsConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/TlsConfiguration.java new file mode 100644 index 00000000000..bba7384991c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/TlsConfiguration.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The file to be used for group integration. + */ +public enum TlsConfiguration { + NONE("none"), + + SIMPLE("simple"), + + EXTERNAL("external"); + + private final String value; + + TlsConfiguration(String value) { + this.value = value; + } + + @JsonCreator + public static TlsConfiguration from(String s) { + switch (s.toLowerCase()) { + case "none": + return NONE; + case "simple": + return SIMPLE; + case "external": + return EXTERNAL; + default: + throw new IllegalArgumentException( + String.format("Unknown TLS Configuration type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/Type.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/Type.java new file mode 100644 index 00000000000..973f746bc33 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/Type.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of Identity provider in payload + */ +public enum Type { + INTERNAL("uaa"), + + LDAP("ldap"), + + LOGIN_SERVER("login-server"), + + KEYSTONE("keystone"), + + OAUTH2("oauth2.0"), + + OIDC("oidc1.0"), + + SAML("saml"); + + private final String value; + + Type(String value) { + this.value = value; + } + + @JsonCreator + public static Type from(String s) { + switch (s.toLowerCase()) { + case "uaa": + return INTERNAL; + case "keystone": + return KEYSTONE; + case "ldap": + return LDAP; + case "login-server": + return LOGIN_SERVER; + case "oauth2.0": + return OAUTH2; + case "oidc1.0": + return OIDC; + case "saml": + return SAML; + default: + throw new IllegalArgumentException(String.format("Unknown type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_AttributeMappings.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_AttributeMappings.java new file mode 100644 index 00000000000..bbc8c42d772 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_AttributeMappings.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonFormat.Feature; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the identity provider configuration attribute mappings + */ +@JsonDeserialize +@Value.Immutable +abstract class _AttributeMappings { + + /** + * Map email to the attribute for email in the provider assertion. + */ + @JsonProperty("email") + @Nullable + abstract String getEmail(); + + /** + * Map external_groups to the attribute for groups in the provider assertion (can be a list or a string). + */ + @JsonProperty("external_groups") + @JsonFormat(with = Feature.ACCEPT_SINGLE_VALUE_AS_ARRAY) + @Nullable + abstract List getExternalGroups(); + + /** + * Map family_name to the attribute for family name in the provider assertion. + */ + @JsonProperty("family_name") + @Nullable + abstract String getFamilyName(); + + /** + * Map first_name to the attribute for fist name in the provider assertion. + */ + @JsonProperty("first_name") + @Nullable + abstract String getFirstName(); + + /** + * Map given_name to the attribute for given name in the provider assertion. + */ + @JsonProperty("given_name") + @Nullable + abstract String getGivenName(); + + /** + * Map phone_number to the attribute for phone number in the provider assertion. + */ + @JsonProperty("phone_number") + @Nullable + abstract String getPhoneNumber(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_CreateIdentityProviderRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_CreateIdentityProviderRequest.java new file mode 100644 index 00000000000..b6c45691180 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_CreateIdentityProviderRequest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the create identity provider + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateIdentityProviderRequest implements IdentityZoned { + + /** + * Whether the identity provider is active + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * The configuration of this identity provider according to its type. + */ + @JsonProperty("config") + abstract IdentityProviderConfiguration getConfiguration(); + + /** + * Human-readable name for this provider + */ + @JsonProperty("name") + abstract String getName(); + + /** + * A unique alias for the provider + */ + @JsonProperty("originKey") + abstract String getOriginKey(); + + /** + * The type of the identity provider. + */ + @JsonProperty("type") + abstract Type getType(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_CreateIdentityProviderResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_CreateIdentityProviderResponse.java new file mode 100644 index 00000000000..cc9bf14b7f2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_CreateIdentityProviderResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the create identity provider request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateIdentityProviderResponse extends AbstractIdentityProvider { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_DeleteIdentityProviderRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_DeleteIdentityProviderRequest.java new file mode 100644 index 00000000000..cb2908c2fa1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_DeleteIdentityProviderRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the delete identity provider + */ +@Value.Immutable +abstract class _DeleteIdentityProviderRequest implements IdentityZoned { + + /** + * The identity provider id + */ + @JsonIgnore + abstract String getIdentityProviderId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_DeleteIdentityProviderResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_DeleteIdentityProviderResponse.java new file mode 100644 index 00000000000..e0ec9fd475d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_DeleteIdentityProviderResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the delete identity provider request + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteIdentityProviderResponse extends AbstractIdentityProvider { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderRequest.java new file mode 100644 index 00000000000..d8b83bc4274 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the get identity provider + */ +@Value.Immutable +abstract class _GetIdentityProviderRequest implements IdentityZoned { + + /** + * The identity provider id + */ + @JsonIgnore + abstract String getIdentityProviderId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderResponse.java new file mode 100644 index 00000000000..df06d00009b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_GetIdentityProviderResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the get identity provider request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetIdentityProviderResponse extends AbstractIdentityProvider { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_IdentityProvider.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_IdentityProvider.java new file mode 100644 index 00000000000..8b4c179a691 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_IdentityProvider.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The identity provider in list response + */ +@JsonDeserialize +@Value.Immutable +abstract class _IdentityProvider extends AbstractIdentityProvider { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_InternalConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_InternalConfiguration.java new file mode 100644 index 00000000000..d2530453eca --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_InternalConfiguration.java @@ -0,0 +1,68 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the internal identity provider configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _InternalConfiguration extends AbstractIdentityProviderConfiguration { + + /** + * When set to true, user management is disabled for this provider, defaults to false + */ + @JsonProperty("disableInternalUserManagement") + @Nullable + abstract Boolean getDisableInternalUserManagement(); + + /** + * List of email domains associated with the provider for the purpose of associating users to the correct origin upon invitation. If empty list, no invitations are accepted. Wildcards supported. + */ + @JsonProperty("emailDomain") + @Nullable + abstract List getEmailDomains(); + + /** + * The lockout policy + */ + @JsonProperty("lockoutPolicy") + @Nullable + abstract LockoutPolicy getLockoutPolicy(); + + /** + * The password policy + */ + @JsonProperty("passwordPolicy") + @Nullable + abstract PasswordPolicy getPasswordPolicy(); + + /** + * Human readable name/description of this provider + */ + @JsonProperty("providerDescription") + @Nullable + abstract String getProviderDescription(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_KeystoneConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_KeystoneConfiguration.java new file mode 100644 index 00000000000..ea04e8f4814 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_KeystoneConfiguration.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for the keystone identity provider configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _KeystoneConfiguration extends AbstractExternalIdentityProviderConfiguration { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_LdapConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_LdapConfiguration.java new file mode 100644 index 00000000000..75b658b6950 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_LdapConfiguration.java @@ -0,0 +1,214 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the ldap identity provider configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _LdapConfiguration extends AbstractExternalIdentityProviderConfiguration { + + /** + * Determines whether or not shadow users must be created before login by an administrator. + */ + @JsonProperty("addShadowUserOnLogin") + @Nullable + abstract Boolean getAddShadowUserOnLogin(); + + /** + * The auto add group flag + */ + @JsonProperty("autoAddGroups") + @Nullable + abstract Boolean getAutoAddGroups(); + + /** + * The URL to the ldap server, must start with ldap:// or ldaps:// + */ + @JsonProperty("baseUrl") + @Nullable + abstract String getBaseUrl(); + + /** + * If you specified BindUserDN, then specify the corresponding password to be used for binding here. + */ + @JsonProperty("bindPassword") + @Nullable + abstract String getBindPassword(); + + /** + * The distinguished name the gatekeeper uses to bind to the LDAP server. + */ + @JsonProperty("bindUserDn") + @Nullable + abstract String getBindUserDistinguishedName(); + + /** + * The group role attribute + */ + @JsonProperty("groupRoleAttribute") + @Nullable + abstract String getGroupRoleAttribute(); + + /** + * The group search base + */ + @JsonProperty("groupSearchBase") + @Nullable + abstract String getGroupSearchBase(); + + /** + * The maximum group search depth limit + */ + @JsonProperty("maxGroupSearchDepth") + @Nullable + abstract Integer getGroupSearchDepthLimit(); + + /** + * The group search filter + */ + @JsonProperty("groupSearchFilter") + @Nullable + abstract String getGroupSearchFilter(); + + /** + * The group search subtree + */ + @JsonProperty("groupSearchSubTree") + @Nullable + abstract Boolean getGroupSearchSubTree(); + + /** + * The group ignore partial search result flag + */ + @JsonProperty("groupsIgnorePartialResults") + @Nullable + abstract Boolean getGroupsIgnorePartialResults(); + + /** + * The file to be used for group integration. + */ + @JsonProperty("ldapGroupFile") + @Nullable + abstract LdapGroupFile getLdapGroupFile(); + + /** + * The file to be used for configuring the LDAP authentication. + */ + @JsonProperty("ldapProfileFile") + @Nullable + abstract LdapProfileFile getLdapProfileFile(); + + /** + * + */ + @JsonProperty("localPasswordCompare") + @Nullable + abstract Boolean getLocalPasswordCompare(); + + /** + * The name of the LDAP attribute that contains the user’s email address + */ + @JsonProperty("mailAttributeName") + @Nullable + abstract String getMailAttributeName(); + + /** + * Defines an email pattern containing a {0} to generate an email address for an LDAP user during authentication + */ + @JsonProperty("mailSubstitute") + @Nullable + abstract String getMailSubstitute(); + + /** + * Set to true if you wish to override an LDAP user email address with a generated one + */ + @JsonProperty("mailSubstituteOverridesLdap") + @Nullable + abstract Boolean getMailSubstituteOverridesLdap(); + + /** + * The password attribute name + */ + @JsonProperty("passwordAttributeName") + @Nullable + abstract String getPasswordAttributeName(); + + /** + * The password encoder + */ + @JsonProperty("passwordEncoder") + @Nullable + abstract String getPasswordEncoder(); + + /** + * Configures the UAA LDAP referral behavior. The following values are possible: - follow → Referrals are followed - ignore → Referrals are ignored and the partial result is returned - throw → An + * error is thrown and the authentication is aborted + */ + @JsonProperty("referral") + @Nullable + abstract String getReferral(); + + /** + * Skips validation of the LDAP cert if set to true. + */ + @JsonProperty("skipSSLVerification") + @Nullable + abstract Boolean getSkipSSLVerification(); + + /** + * The StartTLS options + */ + @JsonProperty("tlsConfiguration") + @Nullable + abstract TlsConfiguration getTlsConfiguration(); + + /** + * The user distinguished name pattern + */ + @JsonProperty("userDNPattern") + @Nullable + abstract String getUserDistinguishedNamePattern(); + + /** + * The user distinguished name pattern delimiter + */ + @JsonProperty("userDNPatternDelimiter") + @Nullable + abstract String getUserDistinguishedNamePatternDelimiter(); + + /** + * The user search base + */ + @JsonProperty("userSearchBase") + @Nullable + abstract String getUserSearchBase(); + + /** + * The user search filter + */ + @JsonProperty("userSearchFilter") + @Nullable + abstract String getUserSearchFilter(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_ListIdentityProvidersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_ListIdentityProvidersRequest.java new file mode 100644 index 00000000000..e171e2d71fc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_ListIdentityProvidersRequest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the list identity provider + */ +@Value.Immutable +abstract class _ListIdentityProvidersRequest implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_ListIdentityProvidersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_ListIdentityProvidersResponse.java new file mode 100644 index 00000000000..d073bd196da --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_ListIdentityProvidersResponse.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the list identity providers request + */ +@JsonDeserialize(using = _ListIdentityProvidersResponse.ListIdentityProvidersResponseDeserializer.class) +@Value.Immutable +abstract class _ListIdentityProvidersResponse { + + /** + * The identity providers + */ + abstract List getIdentityProviders(); + + static final class ListIdentityProvidersResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 8339177706697811314L; + + ListIdentityProvidersResponseDeserializer() { + super(ListIdentityProvidersResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListIdentityProvidersResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListIdentityProvidersResponse.builder() + .identityProviders((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_LockoutPolicy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_LockoutPolicy.java new file mode 100644 index 00000000000..2de26dc9610 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_LockoutPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for lockout policy in internal identity provider management {@link InternalConfiguration} + */ +@JsonDeserialize +@Value.Immutable +abstract class _LockoutPolicy { + + /** + * Number of seconds to lock out an account when lockoutAfterFailures failures is exceeded (defaults to 300). + */ + @JsonProperty("countFailuresWithin") + abstract Integer getLockAccountPeriodInSecond(); + + /** + * Number of seconds in which lockoutAfterFailures failures must occur in order for account to be locked (defaults to 3600). + */ + @JsonProperty("lockoutPeriodSeconds") + abstract Integer getLockoutPeriodInSecond(); + + /** + * Number of allowed failures before account is locked (defaults to 5). + */ + @JsonProperty("lockoutAfterFailures") + abstract Integer getNumberOfAllowedFailures(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_OAuth2Configuration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_OAuth2Configuration.java new file mode 100644 index 00000000000..209e6a35b23 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_OAuth2Configuration.java @@ -0,0 +1,100 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the OAuth2 identity provider configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _OAuth2Configuration extends AbstractAuthenticationConfiguration { + + /** + * The OAuth check token endpoint URL. Reserved for future OAuth use. + */ + @JsonProperty("checkTokenUrl") + @Nullable + abstract String getCheckTokenUrl(); + + /** + * Send the client credentials in the token retrieval call as body parameters instead of a Basic Authorization header. + */ + @JsonProperty("clientAuthInBody") + @Nullable + abstract Boolean getClientAuthInBody(); + + /** + * The OAuth 2.0 token issuer. + */ + @JsonProperty("issuer") + @Nullable + abstract String getIssuer(); + + /** + * The OAuth 2.0 response type. + */ + @JsonProperty("responseType") + @Nullable + abstract String getResponseType(); + + /** + * A URL for fetching user info attributes when queried with the obtained token authorization. + */ + @JsonProperty("userInfoUrl") + @Nullable + abstract String getUserInfoUrl(); + + /** + * Name of the request parameter that is used to pass a known username when redirecting to this identity provider from the account chooser + */ + @JsonProperty("userPropagationParameter") + @Nullable + abstract String getUserPropagationParameter(); + + /** + * A flag controlling whether PKCE (RFC 7636) is active in authorization code flow when requesting tokens from the external provider. + */ + @JsonProperty("cacheJwks") + @Nullable + abstract Boolean getCacheJwks(); + + /** + * Option to enable caching for the JWKS (verification key for validating token signatures) + */ + @JsonProperty("pkce") + @Nullable + abstract Boolean getPkce(); + + /** + * OAuth 2.0 logout endpoint. + */ + @JsonProperty("logoutUrl") + @Nullable + abstract String getLogoutUrl(); + + /** + * A flag controlling whether to log out of the external provider after a successful UAA logout + */ + @JsonProperty("performRpInitiatedLogout") + @Nullable + abstract Boolean getPerformRpInitiatedLogout(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_OpenIdConnectConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_OpenIdConnectConfiguration.java new file mode 100644 index 00000000000..bd373013edd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_OpenIdConnectConfiguration.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the OpenId Connect (oidc) identity provider configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _OpenIdConnectConfiguration extends AbstractAuthenticationConfiguration { + + /** + * The Open Id user info endpoint URL. Reserved for future OIDC use. + */ + @JsonProperty("userInfoUrl") + @Nullable + abstract String getUserInfoUrl(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_PasswordPolicy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_PasswordPolicy.java new file mode 100644 index 00000000000..e268561366e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_PasswordPolicy.java @@ -0,0 +1,80 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for password policy in internal identity provider management {@link InternalConfiguration} + */ +@JsonDeserialize +@Value.Immutable +abstract class _PasswordPolicy { + + /** + * Maximum number of characters required for password to be considered valid (defaults to 255). + */ + @JsonProperty("maxLength") + abstract Integer getMaximumLength(); + + /** + * Minimum number of digits required for password to be considered valid (defaults to 0). + */ + @JsonProperty("requireDigit") + abstract Integer getMinimumDigit(); + + /** + * Minimum number of characters required for password to be considered valid (defaults to 0). + */ + @JsonProperty("minLength") + abstract Integer getMinimumLength(); + + /** + * Minimum number of lower characters required for password to be considered valid (defaults to 0). + */ + @JsonProperty("requireLowerCaseCharacter") + abstract Integer getMinimumLowerCaseCharacter(); + + /** + * Minimum number of special characters required for password to be considered valid (defaults to 0). + */ + @JsonProperty("requireSpecialCharacter") + abstract Integer getMinimumSpecialCharacter(); + + /** + * Minimum number of uppercase characters required for password to be considered valid (defaults to 0). + */ + @JsonProperty("requireUpperCaseCharacter") + abstract Integer getMinimumUpperCaseCharacter(); + + /** + * Number of months after which current password expires (defaults to 0). + */ + @JsonProperty("expirePasswordInMonths") + abstract Integer getPasswordExpirationInMonth(); + + /** + * This timestamp value can be used to force change password for every user. If the user’s passwordLastModified is older than this value, the password is expired (defaults to null). + */ + @JsonProperty("passwordNewerThan") + @Nullable + abstract Integer getPasswordNewerThan(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_SamlConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_SamlConfiguration.java new file mode 100644 index 00000000000..4e56d9204e0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_SamlConfiguration.java @@ -0,0 +1,131 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the saml identity provider configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _SamlConfiguration extends AbstractExternalIdentityProviderConfiguration { + + /** + * Determines whether or not shadow users must be created before login by an administrator. + */ + @JsonProperty("addShadowUserOnLogin") + @Nullable + abstract Boolean getAddShadowUserOnLogin(); + + /** + * SAML assertion consumer index, default is 0 + */ + @JsonProperty("assertionConsumerIndex") + @Nullable + abstract Integer getAssertionConsumerIndex(); + + /** + * A list of AuthnContextClassRef to include in the SAML request + */ + @JsonProperty("authnContext") + @Nullable + abstract List getAuthnContext(); + + /** + * Either EXPLICITLY_MAPPED in order to map external groups to OAuth scopes using the group mappings, or AS_SCOPES to use SAML group names as scopes. + */ + @JsonProperty("groupMappingMode") + @Nullable + abstract ExternalGroupMappingMode getGroupMappingMode(); + + /** + * Reserved for future use + */ + @JsonProperty("iconUrl") + @Nullable + abstract String getIconUrl(); + + /** + * This will be set to origin by system + */ + @JsonProperty("idpEntityAlias") + @Nullable + abstract String getIdpEntityAlias(); + + /** + * The link text for the SAML IDP on the login page + */ + @JsonProperty("linkText") + @Nullable + abstract String getLinkText(); + + /** + * SAML Metadata - either an XML string or a URL that will deliver XML content + */ + @JsonProperty("metaDataLocation") + abstract String getMetaDataLocation(); + + /** + * Should metadata be validated, defaults to false + */ + @JsonProperty("metadataTrustCheck") + @Nullable + abstract Boolean getMetadataTrustCheck(); + + /** + * The name ID to use for the username, default is “urn:oasis:names:tc:SAML:1.1:nameid-format:unspecifiedâ€. + */ + @JsonProperty("nameID") + @Nullable + abstract String getNameId(); + + /** + * Should the SAML login link be displayed on the login page, defaults to false + */ + @JsonProperty("showSamlLink") + @Nullable + abstract Boolean getShowSamlLink(); + + /** + * Whether to skip SSL validation + */ + @JsonProperty("skipSslValidation") + @Nullable + abstract Boolean getSkipSslValidation(); + + /** + * Either "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory" or"org.apache.commons.httpclient.contrib.ssl.EasySSLProtocolSocketFactory" depending on if the metaDataLocation of + * type URL is HTTP or HTTPS, respectively + */ + @JsonProperty("socketFactoryClassName") + @Nullable + abstract String getSocketFactoryClassName(); + + /** + * This will be set to the ID of the zone where the provider is being created by system + */ + @JsonProperty("zoneId") + @Nullable + abstract String getZoneId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_UpdateIdentityProviderRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_UpdateIdentityProviderRequest.java new file mode 100644 index 00000000000..92d641423f1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_UpdateIdentityProviderRequest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the update identity provider + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateIdentityProviderRequest implements IdentityZoned { + + /** + * Whether the identity provider is active + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * The configuration of this identity provider according to its type. + */ + @JsonProperty("config") + abstract IdentityProviderConfiguration getConfiguration(); + + /** + * The identity provider id + */ + @JsonIgnore + abstract String getIdentityProviderId(); + + /** + * Human-readable name for this provider + */ + @JsonProperty("name") + abstract String getName(); + + /** + * A unique identifier for the IDP. Cannot be updated. + */ + @JsonProperty("originKey") + abstract String getOriginKey(); + + /** + * The type of the identity provider. Cannot be updated. + */ + @JsonProperty("type") + abstract Type getType(); + + /** + * Version of the identity provider data. Clients can use this to protect against conflicting updates. + */ + @JsonProperty("version") + abstract Integer getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_UpdateIdentityProviderResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_UpdateIdentityProviderResponse.java new file mode 100644 index 00000000000..56ae2c25225 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityproviders/_UpdateIdentityProviderResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the update identity provider request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateIdentityProviderResponse extends AbstractIdentityProvider { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/AbstractIdentityZone.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/AbstractIdentityZone.java new file mode 100644 index 00000000000..89c8fd2a9c3 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/AbstractIdentityZone.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * The entity response payload for Identity Zone + */ +public abstract class AbstractIdentityZone { + + /** + * Whether the identity zone is active + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * The configuration + */ + @JsonProperty("config") + @Nullable + abstract IdentityZoneConfiguration getConfiguration(); + + /** + * The creation date of the identity zone + */ + @JsonProperty("created") + abstract Long getCreatedAt(); + + /** + * The description of the identity zone + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The id of the identity zone + */ + @JsonProperty("id") + abstract String getId(); + + /** + * The last modification date of the identity zone + */ + @JsonProperty("last_modified") + abstract Long getLastModified(); + + /** + * The name of the identity zone + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The unique sub domain. It will be converted into lowercase upon creation. + */ + @JsonProperty("subdomain") + abstract String getSubdomain(); + + /** + * The version of the identity zone. + */ + @JsonProperty("version") + @Nullable + abstract Integer getVersion(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/IdentityZones.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/IdentityZones.java new file mode 100644 index 00000000000..32a5a732b06 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/IdentityZones.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Identity Zone Management Client API + */ +public interface IdentityZones { + + /** + * Makes the Create Identity Zone request + * + * @param request the Create Identity Zone request + * @return the response from the Create Identity Zone request + */ + Mono create(CreateIdentityZoneRequest request); + + /** + * Makes the Delete the Identity Zone request + * + * @param request the Delete Identity Zone request + * @return the response from the Delete Identity Zone request + */ + Mono delete(DeleteIdentityZoneRequest request); + + /** + * Makes the Get Identity Zone request + * + * @param request the Get Identity Zone request + * @return the response from the Get Identity Zone request + */ + Mono get(GetIdentityZoneRequest request); + + /** + * Makes the List Identity Zones request + * + * @param request the List Identity Zones request + * @return the response from the List Identity Zones request + */ + Mono list(ListIdentityZonesRequest request); + + /** + * Makes the Update Identity Zone request + * + * @param request the Update Identity Zone request + * @return the response from the Update Identity Zone request + */ + Mono update(UpdateIdentityZoneRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/RefreshTokenFormat.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/RefreshTokenFormat.java new file mode 100644 index 00000000000..2f4e9cac18a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/RefreshTokenFormat.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum RefreshTokenFormat { + JWT("jwt"), + + OPAQUE("opaque"); + + private final String value; + + RefreshTokenFormat(String value) { + this.value = value; + } + + @JsonCreator + public static RefreshTokenFormat from(String s) { + switch (s.toLowerCase()) { + case "jwt": + return JWT; + case "opaque": + return OPAQUE; + default: + throw new IllegalArgumentException( + String.format("Unknown refresh token format: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Banner.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Banner.java new file mode 100644 index 00000000000..5df2f468d4b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Banner.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the identity branding banner configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _Banner { + + /** + * The hexadecimal color code for banner background color + */ + @JsonProperty("backgroundColor") + @Nullable + abstract String getBackgroundColor(); + + /** + * The UAA login banner will be a link pointing to this url + */ + @JsonProperty("link") + @Nullable + abstract String getLink(); + + /** + * The base64 encoded PNG data displayed in a banner at the top of the UAA login page, overrides banner text + */ + @JsonProperty("logo") + @Nullable + abstract String getLogo(); + + /** + * The text displayed in a banner at the top of the UAA login page + */ + @JsonProperty("text") + @Nullable + abstract String getText(); + + /** + * The hexadecimal color code for the banner text color + */ + @JsonProperty("textColor") + @Nullable + abstract String getTextColor(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Branding.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Branding.java new file mode 100644 index 00000000000..a5ff14a9d94 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Branding.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The payload for the identity branding configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _Branding { + + /** + * The banner configuration + */ + @JsonProperty("banner") + @Nullable + abstract Banner getBanner(); + + /** + * This name is used on the UAA Pages and in account management related communication in UAA + */ + @JsonProperty("companyName") + @Nullable + abstract String getCompanyName(); + + /** + * The consent configuration + */ + @JsonProperty("consent") + @Nullable + abstract Consent getConsent(); + + /** + * This text appears on the footer of all UAA pages + */ + @JsonProperty("footerLegalText") + @Nullable + abstract String getFooterLegalText(); + + /** + * These links appear on the footer of all UAA pages. You may choose to add multiple urls for things like Support, Terms of Service etc. + */ + @AllowNulls + @JsonProperty("footerLinks") + @Nullable + abstract Map getFooterLinks(); + + /** + * This is a base64Url encoded PNG image which will be used as the logo on all UAA pages like Login, Sign Up etc. + */ + @JsonProperty("productLogo") + @Nullable + abstract String getProductLogo(); + + /** + * This is a base64 encoded PNG image which will be used as the favicon for the UAA pages + */ + @JsonProperty("squareLogo") + @Nullable + abstract String getSquareLogo(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ClientLockoutPolicy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ClientLockoutPolicy.java new file mode 100644 index 00000000000..28e8d4437f8 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ClientLockoutPolicy.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for the identity zone client lockout policy + */ +@JsonDeserialize +@Value.Immutable +abstract class _ClientLockoutPolicy { + + /** + * Number of seconds in which {@code lockoutAfterFailures} failures must occur in order for account to be locked + */ + @JsonProperty("countFailuresWithin") + abstract Integer getCountFailuresWithin(); + + /** + * Number of allowed failures before account is locked + */ + @JsonProperty("lockoutAfterFailures") + abstract Integer getLockoutAfterFailures(); + + /** + * Number of seconds to lock out an account when lockoutAfterFailures failures is exceeded + */ + @JsonProperty("lockoutPeriodSeconds") + abstract Integer getLockoutPeriodSeconds(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ClientSecretPolicy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ClientSecretPolicy.java new file mode 100644 index 00000000000..651fd07795b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ClientSecretPolicy.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for the identity zone client secret policy + */ +@JsonDeserialize +@Value.Immutable +abstract class _ClientSecretPolicy { + + /** + * Maximum number of characters required for secret to be considered valid + */ + @JsonProperty("maxLength") + abstract Integer getMaximumLength(); + + /** + * Minimum number of characters required for secret to be considered valid + */ + @JsonProperty("minLength") + abstract Integer getMinimumLength(); + + /** + * Minimum number of digits required for secret to be considered valid + */ + @JsonProperty("requireDigit") + abstract Integer getRequireDigit(); + + /** + * Minimum number of lowercase characters required for secret to be considered valid + */ + @JsonProperty("requireLowerCaseCharacter") + abstract Integer getRequireLowerCaseCharacter(); + + /** + * Minimum number of special characters required for secret to be considered valid + */ + @JsonProperty("requireSpecialCharacter") + abstract Integer getRequireSpecialCharacter(); + + /** + * Minimum number of uppercase characters required for secret to be considered valid + */ + @JsonProperty("requireUpperCaseCharacter") + abstract Integer getRequireUpperCaseCharacter(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Consent.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Consent.java new file mode 100644 index 00000000000..3ed519261e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Consent.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for the identity zone consent configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _Consent { + + /** + * The consent link + */ + @JsonProperty("link") + abstract String getLink(); + + /** + * The consent text + */ + @JsonProperty("text") + abstract String getText(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CorsConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CorsConfiguration.java new file mode 100644 index 00000000000..90ae650417a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CorsConfiguration.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the CORS policy configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _CorsConfiguration { + + /** + * Access-Control-Allow-Credentials header. Indicates whether the response to request can be exposed when the omit credentials flag is unset. When part of the response to a preflight request it + * indicates that the actual request can include user credentials. + */ + @JsonProperty("allowedCredentials") + abstract Boolean getAllowedCredentials(); + + /** + * Access-Control-Allow-Headers header. Indicates which header field names can be used during the actual response + */ + @JsonProperty("allowedHeaders") + abstract List getAllowedHeaders(); + + /** + * Access-Control-Allow-Methods header. Indicates which method will be used in the actual request as part of the preflight request. + */ + @JsonProperty("allowedMethods") + abstract List getAllowedMethods(); + + /** + * Indicates whether a resource can be shared based by returning the value of the Origin patterns. + */ + @JsonProperty("allowedOriginPatterns") + abstract List getAllowedOriginPatterns(); + + /** + * Access-Control-Allow-Origin header. Indicates whether a resource can be shared based by returning the value of the Origin request header, “*â€, or “null†in the response. + */ + @JsonProperty("allowedOrigins") + abstract List getAllowedOrigins(); + + /** + * The list of allowed URI patterns. + */ + @JsonProperty("allowedUriPatterns") + abstract List getAllowedUriPatterns(); + + /** + * The list of allowed URIs. + */ + @JsonProperty("allowedUris") + abstract List getAllowedUris(); + + /** + * Access-Control-Max-Age header. Indicates how long the results of a preflight request can be cached in a preflight result cache + */ + @JsonProperty("maxAge") + abstract Long getMaxAge(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CorsPolicy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CorsPolicy.java new file mode 100644 index 00000000000..8ec85603240 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CorsPolicy.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The payload for the identity zone CORS policy + */ +@JsonDeserialize +@Value.Immutable +abstract class _CorsPolicy { + + /** + * The default configuration + */ + @JsonProperty("defaultConfiguration") + abstract CorsConfiguration getDefaultConfiguration(); + + /** + * The XHR configuration + */ + @JsonProperty("xhrConfiguration") + abstract CorsConfiguration getXhrConfiguration(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CreateIdentityZoneRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CreateIdentityZoneRequest.java new file mode 100644 index 00000000000..6b5cc449c72 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CreateIdentityZoneRequest.java @@ -0,0 +1,92 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the create identity zone operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateIdentityZoneRequest { + + /** + * The configuration + */ + @JsonProperty("config") + @Nullable + abstract IdentityZoneConfiguration getConfiguration(); + + /** + * The creation date of the identity zone + */ + @JsonProperty("created") + @Nullable + abstract Long getCreatedAt(); + + /** + * The description of the identity zone + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The id of the identity zone. When not provided, an identifier will be generated + */ + @JsonProperty("id") + @Nullable + abstract String getIdentityZoneId(); + + /** + * The last modification date of the identity zone + */ + @JsonProperty("last_modified") + @Nullable + abstract Long getLastModified(); + + /** + * The name of the identity zone + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The unique subdomain. It will be converted into lowercase upon creation. + */ + @JsonProperty("subdomain") + abstract String getSubdomain(); + + /** + * The version of the identity zone + */ + @JsonProperty("version") + @Nullable + abstract Integer getVersion(); + + /** + * Whether the identity zone is active + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CreateIdentityZoneResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CreateIdentityZoneResponse.java new file mode 100644 index 00000000000..6c605f3d144 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_CreateIdentityZoneResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the create identity zone request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateIdentityZoneResponse extends AbstractIdentityZone { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_DeleteIdentityZoneRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_DeleteIdentityZoneRequest.java new file mode 100644 index 00000000000..59b884f0d14 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_DeleteIdentityZoneRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Delete Identity Zone operation + */ +@Value.Immutable +abstract class _DeleteIdentityZoneRequest { + + /** + * The identity zone id + */ + @JsonIgnore + abstract String getIdentityZoneId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_DeleteIdentityZoneResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_DeleteIdentityZoneResponse.java new file mode 100644 index 00000000000..2b0e4cfa0be --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_DeleteIdentityZoneResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Delete Identity Zone Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteIdentityZoneResponse extends AbstractIdentityZone { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_GetIdentityZoneRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_GetIdentityZoneRequest.java new file mode 100644 index 00000000000..7372c5c6aba --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_GetIdentityZoneRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.immutables.value.Value; + +/** + * The request payload for the Get Identity Zone operation + */ +@Value.Immutable +abstract class _GetIdentityZoneRequest { + + /** + * The identity zone id + */ + @JsonIgnore + abstract String getIdentityZoneId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_GetIdentityZoneResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_GetIdentityZoneResponse.java new file mode 100644 index 00000000000..4071273294f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_GetIdentityZoneResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The resource response payload for the Get Identity Zone Response + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetIdentityZoneResponse extends AbstractIdentityZone { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_IdentityZone.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_IdentityZone.java new file mode 100644 index 00000000000..9abb3bbd2c2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_IdentityZone.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The identity zone + */ +@JsonDeserialize +@Value.Immutable +abstract class _IdentityZone extends AbstractIdentityZone { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_IdentityZoneConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_IdentityZoneConfiguration.java new file mode 100644 index 00000000000..0c98a54a24c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_IdentityZoneConfiguration.java @@ -0,0 +1,124 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the identity zone configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _IdentityZoneConfiguration { + + /** + * This flag is required to enable account choosing functionality for IDP discovery page. + */ + @JsonProperty("accountChooserEnabled") + @Nullable + abstract Boolean getAccountChooserEnabled(); + + /** + * The branding + */ + @JsonProperty("branding") + @Nullable + abstract Branding getBranding(); + + /** + * The client lockout policy + */ + @JsonProperty("clientLockoutPolicy") + @Nullable + abstract ClientLockoutPolicy getClientLockoutPolicy(); + + /** + * The client secret policy + */ + @JsonProperty("clientSecretPolicy") + @Nullable + abstract ClientSecretPolicy getClientSecretPolicy(); + + /** + * The CORS policy + */ + @JsonProperty("corsPolicy") + @Nullable + abstract CorsPolicy getCorsPolicy(); + + /** + * The issuer of this zone + */ + @JsonProperty("issuer") + @Nullable + abstract String getIssuer(); + + /** + * IDP Discovery should be set to true if you have configured more than one identity provider for UAA. The discovery relies on email domain being set for each additional provider. + */ + @JsonProperty("idpDiscoveryEnabled") + @Nullable + abstract Boolean getLdapDiscoveryEnabled(); + + /** + * The links + */ + @JsonProperty("links") + @Nullable + abstract Links getLinks(); + + /** + * The Multi-factor Authentication configuration + */ + @JsonProperty("mfaConfig") + @Nullable + abstract MfaConfig getMfaConfig(); + + /** + * The prompts + */ + @JsonProperty("prompts") + @Nullable + abstract List getPrompts(); + + /** + * The saml configuration + */ + @JsonProperty("samlConfig") + @Nullable + abstract SamlConfiguration getSamlConfiguration(); + + /** + * The token policy + */ + @JsonProperty("tokenPolicy") + @Nullable + abstract TokenPolicy getTokenPolicy(); + + /** + * The user configuration + */ + @JsonProperty("userConfig") + @Nullable + abstract UserConfig getUserConfig(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Key.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Key.java new file mode 100644 index 00000000000..f8a8c18bffa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Key.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the key + */ +@JsonDeserialize +@Value.Immutable +abstract class _Key { + + /** + * The certificate + */ + @JsonProperty("certificate") + @Nullable + abstract String getCertificate(); + + /** + * The SAML provider's private key + */ + @JsonProperty("key") + @Nullable + abstract String getKey(); + + /** + * The SAML provider's private key password + */ + @JsonProperty("passphrase") + @Nullable + abstract String getPassphrase(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Links.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Links.java new file mode 100644 index 00000000000..2aeeb5737d1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Links.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the identity zone links + */ +@JsonDeserialize +@Value.Immutable +abstract class _Links { + + /** + * The URL redirect + */ + @JsonProperty("homeRedirect") + @Nullable + abstract String getHomeRedirect(); + + /** + * The logout link + */ + @JsonProperty("logout") + @Nullable + abstract LogoutLink getLogout(); + + /** + * The self service link + */ + @JsonProperty("selfService") + @Nullable + abstract SelfServiceLink getSelfService(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ListIdentityZonesRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ListIdentityZonesRequest.java new file mode 100644 index 00000000000..08e5b926396 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ListIdentityZonesRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import org.immutables.value.Value; + +/** + * The request payload for the list identity zones operation + */ +@Value.Immutable +abstract class _ListIdentityZonesRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ListIdentityZonesResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ListIdentityZonesResponse.java new file mode 100644 index 00000000000..905de043099 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_ListIdentityZonesResponse.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.core.type.TypeReference; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import com.fasterxml.jackson.databind.deser.std.StdDeserializer; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.io.IOException; +import java.util.List; + +/** + * The response from the list identity zones request + */ +@JsonDeserialize(using = _ListIdentityZonesResponse.ListIdentityZonesResponseDeserializer.class) +@Value.Immutable +abstract class _ListIdentityZonesResponse { + + + /** + * The identity zones + */ + abstract List getIdentityZones(); + + static final class ListIdentityZonesResponseDeserializer extends StdDeserializer { + + private static final long serialVersionUID = 3381296378901733925L; + + ListIdentityZonesResponseDeserializer() { + super(ListIdentityZonesResponse.class); + } + + @Override + @SuppressWarnings("unchecked") + public ListIdentityZonesResponse deserialize(JsonParser p, DeserializationContext ctxt) throws IOException { + return ListIdentityZonesResponse.builder() + .identityZones((List) p.readValueAs(new TypeReference>() { + + })) + .build(); + } + + } + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_LogoutLink.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_LogoutLink.java new file mode 100644 index 00000000000..a79ffd1b65b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_LogoutLink.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the identity zone logout link + */ +@JsonDeserialize +@Value.Immutable +abstract class _LogoutLink { + + /** + * Whether or not to allow the redirect parameter on logout. + */ + @JsonProperty("disableRedirectParameter") + @Nullable + abstract Boolean getDisableRedirectParameter(); + + /** + * Changes the name of the redirect parameter. + */ + @JsonProperty("redirectParameterName") + @Nullable + abstract String getRedirectParameterName(); + + /** + * Logout redirect url. + */ + @JsonProperty("redirectUrl") + @Nullable + abstract String getRedirectUrl(); + + /** + * List of allowed whitelist redirects. + */ + @JsonProperty("whitelist") + @Nullable + abstract List getWhitelist(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_MfaConfig.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_MfaConfig.java new file mode 100644 index 00000000000..e72150e8950 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_MfaConfig.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.identityproviders.Type; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the Multi-factor Authentication configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _MfaConfig { + + @Value.Check + void check() { + if (getEnabled() && getProviderName().isEmpty()) { + throw new IllegalStateException("Cannot build MfaConfig, providerName must be specified if MFA is enabled"); + } + } + + /** + * Whether Multi-factor Authentication is enabled + */ + @JsonProperty("enabled") + @Nullable + abstract Boolean getEnabled(); + + /** + * The identity providers + */ + @JsonProperty("identityProviders") + @Nullable + abstract List getIdentityProviders(); + + /** + * The XHR configuration + */ + @JsonProperty("providerName") + @Nullable + abstract String getProviderName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Prompt.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Prompt.java new file mode 100644 index 00000000000..a1578cf1f6c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_Prompt.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the identity zone saml configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _Prompt { + + /** + * Name of field. + */ + @JsonProperty("name") + @Nullable + abstract String getFieldName(); + + /** + * What kind of field this is (e.g. text or password) + */ + @JsonProperty("type") + @Nullable + abstract String getFieldType(); + + /** + * Actual text displayed on prompt for field. + */ + @JsonProperty("text") + @Nullable + abstract String getText(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_SamlConfiguration.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_SamlConfiguration.java new file mode 100644 index 00000000000..fa7ec44469e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_SamlConfiguration.java @@ -0,0 +1,117 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The payload for the identity zone saml configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _SamlConfiguration { + + /** + * The active key id + */ + @JsonProperty("activeKeyId") + @Nullable + abstract String getActiveKeyId(); + + /** + * If true, the SAML provider will sign all assertions. + */ + @JsonProperty("assertionSigned") + @Nullable + abstract Boolean getAssertionSigned(); + + /** + * The lifetime of a SAML assertion in seconds. + */ + @Nullable + @JsonProperty("assertionTimeToLiveSeconds") + abstract Integer getAssertionTimeToLive(); + + /** + * Exposed SAML metadata property. The certificate used to sign all communications. + */ + @JsonProperty("certificate") + @Nullable + abstract String getCertificate(); + + /** + * If true, this zone will not validate the InResponseToField part of an incoming IDP assertion. + */ + @JsonProperty("disableInResponseToCheck") + @Nullable + abstract Boolean getDisableInResponseToCheck(); + + /** + * Unique ID of the SAML2 entity. + */ + @JsonProperty("entityID") + @Nullable + abstract String getEntityId(); + + /** + * The keys + */ + @Nullable + @JsonProperty("keys") + abstract Map getKeys(); + + /** + * Exposed SAML metadata property. The SAML provider’s private key. + */ + @JsonProperty("privateKey") + @Nullable + abstract String getPrivateKey(); + + /** + * Exposed SAML metadata property. The SAML provider’s private key password. Reserved for future use. + */ + @JsonProperty("privateKeyPassword") + @Nullable + abstract String getPrivateKeyPassword(); + + /** + * Exposed SAML metadata property. If true, the service provider will sign all outgoing authentication requests. + */ + @JsonProperty("requestSigned") + @Nullable + abstract Boolean getRequestSigned(); + + /** + * Exposed SAML metadata property. If true, all assertions received by the SAML provider must be signed. + */ + @JsonProperty("wantAssertionSigned") + @Nullable + abstract Boolean getWantAssertionSigned(); + + /** + * If true, the authentication request from the partner service provider must be signed. + */ + @JsonProperty("wantAuthnRequestSigned") + @Nullable + abstract Boolean getWantPartnerAuthenticationRequestSigned(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_SelfServiceLink.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_SelfServiceLink.java new file mode 100644 index 00000000000..4a460639cbe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_SelfServiceLink.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the identity zone self service link + */ +@JsonDeserialize +@Value.Immutable +abstract class _SelfServiceLink { + + /** + * Where users are directed upon clicking the password reset link. + */ + @JsonProperty("passwd") + @Nullable + abstract String getResetPasswordLink(); + + /** + * Whether or not users are allowed to sign up or reset their passwords via the UI. + */ + @JsonProperty("selfServiceLinksEnabled") + @Nullable + abstract Boolean getSelfServiceLinksEnabled(); + + /** + * Where users are directed upon clicking the account creation link. + */ + @JsonProperty("signup") + @Nullable + abstract String getSignupLink(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_TokenPolicy.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_TokenPolicy.java new file mode 100644 index 00000000000..a8543da72c6 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_TokenPolicy.java @@ -0,0 +1,91 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The payload for the identity zone token policy + */ +@JsonDeserialize +@Value.Immutable +abstract class _TokenPolicy { + + /** + * Time in seconds between when an access token is issued and when it expires + */ + @JsonProperty("accessTokenValidity") + @Nullable + abstract Integer getAccessTokenValidity(); + + /** + * The ID of the key that is used to sign tokens + */ + @JsonProperty("activeKeyId") + @Nullable + abstract String getActiveKeyId(); + + /** + * Whether the JWT token is revocable + */ + @JsonProperty("jwtRevocable") + @Nullable + abstract Boolean getJwtRevocable(); + + /** + * The keys of the token policy + */ + @AllowNulls + @JsonProperty("keys") + @Nullable + abstract Map getKeys(); + + /** + * The format for the refresh token + */ + @JsonProperty("refreshTokenFormat") + @Nullable + abstract RefreshTokenFormat getRefreshTokenFormat(); + + /** + * If true, uaa will only issue one refresh token per client_id/user_id combination + */ + @JsonProperty("refreshTokenUnique") + @Nullable + abstract Boolean getRefreshTokenUnique(); + + /** + * Time in seconds between when a refresh token is issued and when it expires + */ + @JsonProperty("refreshTokenValidity") + @Nullable + abstract Integer getRefreshTokenValidity(); + + /** + * If true, uaa will issue a new refresh token value in grant type refresh_token. + */ + @JsonProperty("refreshTokenRotate") + @Nullable + abstract Boolean getRefreshTokenRotate(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UpdateIdentityZoneRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UpdateIdentityZoneRequest.java new file mode 100644 index 00000000000..c2378a5c0cc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UpdateIdentityZoneRequest.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request payload for the update identity zone operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateIdentityZoneRequest { + + /** + * The configuration + */ + @JsonProperty("config") + @Nullable + abstract IdentityZoneConfiguration getConfiguration(); + + /** + * The creation date of the identity zone + */ + @JsonProperty("created") + @Nullable + abstract Long getCreatedAt(); + + /** + * The description of the identity zone + */ + @JsonProperty("description") + @Nullable + abstract String getDescription(); + + /** + * The id of the identity zone + */ + @JsonIgnore + abstract String getIdentityZoneId(); + + /** + * The last modification date of the identity zone + */ + @JsonProperty("last_modified") + @Nullable + abstract Long getLastModified(); + + /** + * The name of the identity zone + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The unique subdomain. It will be converted into lowercase upon creation. + */ + @JsonProperty("subdomain") + abstract String getSubdomain(); + + /** + * The version of the identity zone + */ + @JsonProperty("version") + @Nullable + abstract Integer getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UpdateIdentityZoneResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UpdateIdentityZoneResponse.java new file mode 100644 index 00000000000..54573304ecb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UpdateIdentityZoneResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the update identity zone request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateIdentityZoneResponse extends AbstractIdentityZone { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java new file mode 100644 index 00000000000..e7b9eaefe4a --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/identityzones/_UserConfig.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the identity zone user configuration + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserConfig { + + /** + * The default groups + */ + @JsonProperty("defaultGroups") + @Nullable + abstract List getDefaultGroups(); + + /** + * The allowed groups + */ + @JsonProperty("allowedGroups") + @Nullable + abstract List getAllowedGroups(); + + /** + * Number of users in the zone. If more than 0, it limits the amount of users in the zone. (defaults to -1, no limit). + */ + @JsonProperty("maxUsers") + @Nullable + abstract Integer getMaxUsers(); + + /** + * Flag for switching on the check if origin is valid when creating or updating users + */ + @JsonProperty("checkOriginEnabled") + @Nullable + abstract Boolean getcheckOriginEnabled(); + + /** + * Flag for switching off the loop over all origins in a zone (defaults to true) + */ + @JsonProperty("allowOriginLoop") + @Nullable + abstract Boolean getAllowOriginLoop(); + + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/Ratelimit.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/Ratelimit.java new file mode 100644 index 00000000000..c277fa7331d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/Ratelimit.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.ratelimit; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Ratelimit Client API + */ +public interface Ratelimit { + + Mono getRatelimit(RatelimitRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_Current.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_Current.java new file mode 100644 index 00000000000..57811e9e59f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_Current.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.ratelimit; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; + +import java.util.Date; + +import org.immutables.value.Value; + +/** + * The payload for the uaa ratelimiting + */ +@JsonDeserialize +@Value.Immutable +abstract class _Current { + + /** + * The number of configured limiter mappings + */ + @JsonProperty("limiterMappings") + abstract Integer getLimiterMappings(); + + /** + * Is ratelimit "ACTIVE" or not? Possible values are DISABLED, PENDING, ACTIVE + */ + @JsonProperty("status") + abstract String getStatus(); + + /** + * Timestamp, when this Current was created. + */ + @JsonProperty("asOf") + abstract Date getTimeOfCurrent(); + + /** + * The credentialIdExtractor + */ + @JsonProperty("credentialIdExtractor") + abstract String getCredentialIdExtractor(); + + /** + * The loggingLevel. Valid values include: "OnlyLimited", "AllCalls" and "AllCallsWithDetails" + */ + @JsonProperty("loggingLevel") + abstract String getLoggingLevel(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_RatelimitRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_RatelimitRequest.java new file mode 100644 index 00000000000..be75d58bfa4 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_RatelimitRequest.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.ratelimit; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _RatelimitRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_RatelimitResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_RatelimitResponse.java new file mode 100644 index 00000000000..0fe927cbf60 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/ratelimit/_RatelimitResponse.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.ratelimit; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _RatelimitResponse { + + @JsonProperty("current") + @Nullable + abstract Current getCurrentData(); + + @JsonProperty("fromSource") + @Nullable + abstract String getFromSource(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/ServerInformation.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/ServerInformation.java new file mode 100644 index 00000000000..7b851df74ff --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/ServerInformation.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Server Information Client API + */ +public interface ServerInformation { + + /** + * Makes the Get Auto Login Authentication Code request + * + * @param request the Get Auto Login Authentication Code request + * @return the response from the Get Auto Login Authentication Code request + */ + Mono getAuthenticationCode( + GetAutoLoginAuthenticationCodeRequest request); + + /** + * Makes the Server Information request + * + * @param request the Get UAA Server Information request + * @return the response from the Get UAA Server Information request + */ + Mono getInfo(GetInfoRequest request); + + /** + * Makes the Perform Auto Login request + * + * @param request the Perform Auto Login request + * @return the response from the Perform Auto Login request + */ + Mono autoLogin(AutoLoginRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_ApplicationInfo.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_ApplicationInfo.java new file mode 100644 index 00000000000..efa36f32e03 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_ApplicationInfo.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the server information application information + */ +@JsonDeserialize +@Value.Immutable +abstract class _ApplicationInfo { + + /** + * The application version + */ + @JsonProperty("version") + @Nullable + abstract String getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_AutoLoginRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_AutoLoginRequest.java new file mode 100644 index 00000000000..9e263aebbc0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_AutoLoginRequest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the Perform Auto Login operation + */ +@Value.Immutable +abstract class _AutoLoginRequest { + + /** + * The client_id that generated the autologin code + */ + @QueryParameter("client_id") + public abstract String getClientId(); + + /** + * The code generated from the POST /autologin + */ + @QueryParameter("code") + public abstract String getCode(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetAutoLoginAuthenticationCodeRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetAutoLoginAuthenticationCodeRequest.java new file mode 100644 index 00000000000..446ab6f52e5 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetAutoLoginAuthenticationCodeRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.immutables.value.Value; + +/** + * The request payload for the Get Auto Login Authentication Code operation + */ +@JsonSerialize +@Value.Immutable +abstract class _GetAutoLoginAuthenticationCodeRequest { + + /** + * The client id + */ + @JsonIgnore + public abstract String getClientId(); + + /** + * The client secret + */ + @JsonIgnore + public abstract String getClientSecret(); + + /** + * The password for the autologin request + */ + @JsonProperty("password") + abstract String getPassword(); + + /** + * The username for the autologin request + */ + @JsonProperty("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetAutoLoginAuthenticationCodeResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetAutoLoginAuthenticationCodeResponse.java new file mode 100644 index 00000000000..961f5658058 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetAutoLoginAuthenticationCodeResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response payload for the Get Auto Login Authentication Code operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetAutoLoginAuthenticationCodeResponse { + + /** + * The code used to authenticate the user. + */ + @JsonProperty("code") + @Nullable + abstract String getCode(); + + /** + * Not used. Hardcoded to /oauth/authorize + */ + @JsonProperty("path") + abstract String getPath(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetInfoRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetInfoRequest.java new file mode 100644 index 00000000000..c520c564088 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetInfoRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import org.immutables.value.Value; + +/** + * The request payload for the Get Info operation + */ +@Value.Immutable +abstract class _GetInfoRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetInfoResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetInfoResponse.java new file mode 100644 index 00000000000..018661777ad --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_GetInfoResponse.java @@ -0,0 +1,96 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The response payload for the Get Info operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetInfoResponse { + + /** + * The UAA application information + */ + @JsonProperty("app") + @Nullable + abstract ApplicationInfo getApp(); + + /** + * The git sha for the UAA version + */ + @JsonProperty("commit_id") + @Nullable + abstract String getCommitId(); + + /** + * The configured SAML entityId + */ + @JsonProperty("entityID") + @Nullable + abstract String getEntityId(); + + /** + * A list of alias/url pairs of SAML IDP providers configured. + */ + @JsonProperty("idpDefinitions") + @Nullable + abstract Map getIdpDefinitions(); + + /** + * A list of alias/url pairs of configured action URLs for the UAA + */ + @JsonProperty("links") + @Nullable + abstract Links getLinks(); + + /** + * Name/value pairs of configured prompts that the UAA will login a user. + */ + @JsonProperty("prompts") + @Nullable + abstract Prompts getPrompts(); + + /** + * Whether login links are shown + */ + @JsonProperty("showLoginLinks") + @Nullable + abstract Boolean getShowLoginLinks(); + + /** + * JSON timestamp for the commit of the UAA version + */ + @JsonProperty("timestamp") + @Nullable + abstract String getTimestamp(); + + /** + * The name of the zone invoked + */ + @JsonProperty("zone_name") + @Nullable + abstract String getZoneName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_Links.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_Links.java new file mode 100644 index 00000000000..4e7c0bd9b58 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_Links.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The payload for the server information links + */ +@JsonDeserialize +@Value.Immutable +abstract class _Links { + + /** + * The link to the login host alias of the UAA + */ + @JsonProperty("login") + @Nullable + abstract String getLogin(); + + /** + * The link to the 'Forgot Password' functionality + */ + @JsonProperty("passwd") + @Nullable + abstract String getPassword(); + + /** + * The link to the 'Create Account' functionality + */ + @JsonProperty("register") + @Nullable + abstract String getRegister(); + + /** + * The link to the uaa alias host of the UAA + */ + @JsonProperty("uaa") + @Nullable + abstract String getUaa(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_Prompts.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_Prompts.java new file mode 100644 index 00000000000..c43d44be838 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/serverinformation/_Prompts.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The payload for the server information prompts + */ +@JsonDeserialize +@Value.Immutable +abstract class _Prompts { + + /** + * If a SAML identity provider is configured, this prompt contains a URL to where the user can initiate the SAML authentication flow + */ + @JsonProperty("passcode") + @Nullable + abstract List getPasscode(); + + /** + * Information about the password prompt + */ + @JsonProperty("password") + @Nullable + abstract List getPassword(); + + /** + * Information about the username prompt + */ + @JsonProperty("username") + @Nullable + abstract List getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/AbstractToken.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/AbstractToken.java new file mode 100644 index 00000000000..f55d84fe325 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/AbstractToken.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The base class for all tokens + */ +public abstract class AbstractToken { + + /** + * The access token + */ + @JsonProperty("access_token") + public abstract String getAccessToken(); + + /** + * The number of seconds until token expiry + */ + @JsonProperty("expires_in") + public abstract Integer getExpiresInSeconds(); + + /** + * The space-delimited list of scopes authorized by the user for this client + */ + @JsonProperty("scope") + public abstract String getScopes(); + + /** + * The identifier for this token + */ + @JsonProperty("jti") + public abstract String getTokenId(); + + /** + * The type of the access token issued + */ + @JsonProperty("token_type") + public abstract String getTokenType(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/AbstractTokenKey.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/AbstractTokenKey.java new file mode 100644 index 00000000000..8e789d55350 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/AbstractTokenKey.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; + +/** + * The base class for token keys + */ +public abstract class AbstractTokenKey { + + /** + * The algorithm + */ + @JsonProperty("alg") + public abstract String getAlgorithm(); + + /** + * The exponent + */ + @JsonProperty("e") + public abstract String getE(); + + /** + * The id + */ + @JsonProperty("kid") + @Nullable + public abstract String getId(); + + /** + * The key type + */ + @JsonProperty("kty") + public abstract KeyType getKeyType(); + + /** + * The modulus + */ + @JsonProperty("n") + public abstract String getN(); + + /** + * The use + */ + @JsonProperty("use") + public abstract String getUse(); + + /** + * The value + */ + @JsonProperty("value") + public abstract String getValue(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/GrantType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/GrantType.java new file mode 100644 index 00000000000..6dd626c52d7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/GrantType.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The grant types that can be used to obtain a token. + */ +public enum GrantType { + + /** + * The authorization code grant type + */ + AUTHORIZATION_CODE("authorization_code"), + + /** + * The client_credentials grant type + */ + CLIENT_CREDENTIALS("client_credentials"), + + /** + * The implicit grant type + */ + IMPLICIT("implicit"), + + /** + * The password grant type + */ + PASSWORD("password"), + + /** + * The refresh token grant type + */ + REFRESH_TOKEN("refresh_token"); + + private final String value; + + GrantType(String value) { + this.value = value; + } + + @JsonCreator + public static GrantType from(String s) { + switch (s.toLowerCase()) { + case "authorization_code": + return AUTHORIZATION_CODE; + case "client_credentials": + return CLIENT_CREDENTIALS; + case "implicit": + return IMPLICIT; + case "password": + return PASSWORD; + case "refresh_token": + return REFRESH_TOKEN; + default: + throw new IllegalArgumentException(String.format("Unknown grant type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/KeyType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/KeyType.java new file mode 100644 index 00000000000..1d2bc61d747 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/KeyType.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The key type + */ +public enum KeyType { + + /** + * The MAC key type + */ + MAC("MAC"), + + /** + * The RSA key type + */ + RSA("RSA"); + + private final String value; + + KeyType(String value) { + this.value = value; + } + + @JsonCreator + public static KeyType from(String s) { + switch (s.toLowerCase()) { + case "mac": + return MAC; + case "rsa": + return RSA; + default: + throw new IllegalArgumentException(String.format("Unknown key type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/TokenFormat.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/TokenFormat.java new file mode 100644 index 00000000000..d32acf6bb19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/TokenFormat.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The format of tokens requested. + */ +public enum TokenFormat { + OPAQUE("opaque"); + + private final String value; + + TokenFormat(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/Tokens.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/Tokens.java new file mode 100644 index 00000000000..750e6a5f257 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/Tokens.java @@ -0,0 +1,100 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Access Token Administration Client API + */ +public interface Tokens { + + /** + * Makes the Check Token request + * + * @param request the Check Token request + * @return the Check Token response + */ + Mono check(CheckTokenRequest request); + + /** + * Makes the Authorization Code Grant request + * + * @param request the Authorization Code request + * @return the response from the Authorization Code request + */ + Mono getByAuthorizationCode( + GetTokenByAuthorizationCodeRequest request); + + /** + * Makes the Client Credentials Grant request + * + * @param request the Client Credentials request + * @return the response from the Client Credentials request + */ + Mono getByClientCredentials( + GetTokenByClientCredentialsRequest request); + + /** + * Makes the One-time Passcode request + * + * @param request the One Time Passcode token request + * @return the response from the One Time Passcode token request + */ + Mono getByOneTimePasscode( + GetTokenByOneTimePasscodeRequest request); + + /** + * Makes the OpenID Connect request + * + * @param request the OpenId request + * @return the response from the OpenId request + */ + Mono getByOpenId(GetTokenByOpenIdRequest request); + + /** + * Makes the Password Grant request + * + * @param request the Password token request + * @return the response from the Password token request + */ + Mono getByPassword(GetTokenByPasswordRequest request); + + /** + * Makes the Token Key request + * + * @param request the Token Key request + * @return the response from the Token Key request + */ + Mono getKey(GetTokenKeyRequest request); + + /** + * Makes the Token Keys request + * + * @param request the Token Keys request + * @return the Token Keys response + */ + Mono listKeys(ListTokenKeysRequest request); + + /** + * Makes the Refresh Token request + * + * @param request the refresh token request + * @return the response from the refresh token request + */ + Mono refresh(RefreshTokenRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_CheckTokenRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_CheckTokenRequest.java new file mode 100644 index 00000000000..24100c65c3c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_CheckTokenRequest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the check token operation + */ +@Value.Immutable +abstract class _CheckTokenRequest { + + /** + * The client id + */ + @JsonIgnore + public abstract String getClientId(); + + /** + * The client secret + */ + @JsonIgnore + public abstract String getClientSecret(); + + /** + * The scopes authorized by the user for this client + */ + @QueryParameter("scopes") + @Nullable + abstract List getScopes(); + + /** + * The token + */ + @QueryParameter("token") + abstract String getToken(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_CheckTokenResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_CheckTokenResponse.java new file mode 100644 index 00000000000..5a977c6f8fd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_CheckTokenResponse.java @@ -0,0 +1,159 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response from the check token request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CheckTokenResponse { + + /** + * The audience claim + */ + @JsonProperty("aud") + abstract List getAudiences(); + + /** + * The authorities + */ + @JsonProperty("authorities") + @Nullable + abstract List getAuthorities(); + + /** + * The auth time + */ + @JsonProperty("auth_time") + @Nullable + abstract Long getAuthorizationTime(); + + /** + * The authorized party + */ + @JsonProperty("azp") + abstract String getAuthorizedParty(); + + /** + * The cid + */ + @JsonProperty("cid") + abstract String getCid(); + + /** + * The client id + */ + @JsonProperty("client_id") + abstract String getClientId(); + + /** + * The email + */ + @JsonProperty("email") + @Nullable + abstract String getEmail(); + + /** + * The expiration time claim + */ + @JsonProperty("exp") + abstract Long getExpirationTime(); + + /** + * The grant type + */ + @JsonProperty("grant_type") + abstract String getGrantType(); + + /** + * The issued at claim + */ + @JsonProperty("iat") + abstract Long getIssuedAt(); + + /** + * The issuer claim + */ + @JsonProperty("iss") + abstract String getIssuer(); + + /** + * The jwt id claim + */ + @JsonProperty("jti") + abstract String getJwtId(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * Whether token is revocable + */ + @JsonProperty("revocable") + abstract Boolean getRevocable(); + + /** + * The revocation signature + */ + @JsonProperty("rev_sig") + abstract String getRevocationSignature(); + + /** + * The scopes authorized by the user for this client + */ + @JsonProperty("scope") + abstract List getScopes(); + + /** + * The subject claim + */ + @JsonProperty("sub") + abstract String getSubject(); + + /** + * The user id + */ + @JsonProperty("user_id") + @Nullable + abstract String getUserId(); + + /** + * The user name + */ + @JsonProperty("user_name") + @Nullable + abstract String getUserName(); + + /** + * The zone id + */ + @JsonProperty("zid") + abstract String getZoneId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByAuthorizationCodeRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByAuthorizationCodeRequest.java new file mode 100644 index 00000000000..767ddd6a779 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByAuthorizationCodeRequest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the get token by authorization code operation + */ +@Value.Immutable +abstract class _GetTokenByAuthorizationCodeRequest { + + /** + * The authorization code + */ + @QueryParameter("code") + abstract String getAuthorizationCode(); + + /** + * The client identifier + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The client's secret passphrase + */ + @QueryParameter("client_secret") + abstract String getClientSecret(); + + /** + * The redirection URI + */ + @Nullable + @QueryParameter("redirect_uri") + abstract String getRedirectUri(); + + /** + * The token format + */ + @Nullable + @QueryParameter("token_format") + abstract TokenFormat getTokenFormat(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByAuthorizationCodeResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByAuthorizationCodeResponse.java new file mode 100644 index 00000000000..0a011e2ec13 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByAuthorizationCodeResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response from the get token by authorization code request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTokenByAuthorizationCodeResponse extends AbstractToken { + + /** + * The OpenId token + */ + @JsonProperty("id_token") + @Nullable + abstract String getOpenIdToken(); + + /** + * The refresh token + */ + @JsonProperty("refresh_token") + abstract String getRefreshToken(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByClientCredentialsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByClientCredentialsRequest.java new file mode 100644 index 00000000000..1cdbd9a2996 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByClientCredentialsRequest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the get token by client credentials operation + */ +@Value.Immutable +abstract class _GetTokenByClientCredentialsRequest { + + /** + * The client identifier + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The client's secret passphrase + */ + @QueryParameter("client_secret") + abstract String getClientSecret(); + + /** + * The token format + */ + @Nullable + @QueryParameter("token_format") + abstract TokenFormat getTokenFormat(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByClientCredentialsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByClientCredentialsResponse.java new file mode 100644 index 00000000000..d3909ae9934 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByClientCredentialsResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the get token by client credentials operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTokenByClientCredentialsResponse extends AbstractToken { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOneTimePasscodeRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOneTimePasscodeRequest.java new file mode 100644 index 00000000000..cbee7b29289 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOneTimePasscodeRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the get token by one-time passcode operation + */ +@Value.Immutable +abstract class _GetTokenByOneTimePasscodeRequest { + + /** + * The client identifier + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The client's secret passphrase + */ + @QueryParameter("client_secret") + abstract String getClientSecret(); + + /** + * The passcode + */ + @QueryParameter("passcode") + abstract String getPasscode(); + + /** + * The token format + */ + @Nullable + @QueryParameter("token_format") + abstract TokenFormat getTokenFormat(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOneTimePasscodeResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOneTimePasscodeResponse.java new file mode 100644 index 00000000000..3fe9d90ed5b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOneTimePasscodeResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response from the get token by passcode operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTokenByOneTimePasscodeResponse extends AbstractToken { + + /** + * The OpenId token + */ + @JsonProperty("id_token") + @Nullable + abstract String getOpenIdToken(); + + /** + * The refresh token + */ + @JsonProperty("refresh_token") + abstract String getRefreshToken(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOpenIdRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOpenIdRequest.java new file mode 100644 index 00000000000..a1c06cabc20 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOpenIdRequest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the get token by OpenId operation + */ +@Value.Immutable +abstract class _GetTokenByOpenIdRequest { + + /** + * The authorization code + */ + @QueryParameter("code") + abstract String getAuthorizationCode(); + + /** + * The client identifier + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The client's secret passphrase + */ + @QueryParameter("client_secret") + abstract String getClientSecret(); + + /** + * The redirection URI + */ + @Nullable + @QueryParameter("redirect_uri") + abstract String getRedirectUri(); + + /** + * The token format + */ + @Nullable + @QueryParameter("token_format") + abstract TokenFormat getTokenFormat(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOpenIdResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOpenIdResponse.java new file mode 100644 index 00000000000..cab5da09af9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByOpenIdResponse.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the get token by OpenId request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTokenByOpenIdResponse extends AbstractToken { + + /** + * The OpenId token + */ + @JsonProperty("id_token") + abstract String getOpenIdToken(); + + /** + * The refresh token + */ + @JsonProperty("refresh_token") + abstract String getRefreshToken(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByPasswordRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByPasswordRequest.java new file mode 100644 index 00000000000..1f5b1c95bc1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByPasswordRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the get token by password operation + */ +@Value.Immutable +abstract class _GetTokenByPasswordRequest { + + /** + * The client identifier + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The client's secret passphrase + */ + @QueryParameter("client_secret") + abstract String getClientSecret(); + + /** + * The password + */ + @QueryParameter("password") + abstract String getPassword(); + + /** + * The token format + */ + @Nullable + @QueryParameter("token_format") + abstract TokenFormat getTokenFormat(); + + /** + * The username + */ + @QueryParameter("username") + abstract String getUsername(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByPasswordResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByPasswordResponse.java new file mode 100644 index 00000000000..e37ffc26f6b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenByPasswordResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response from the get token by password operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTokenByPasswordResponse extends AbstractToken { + + /** + * The OpenId token + */ + @JsonProperty("id_token") + @Nullable + abstract String getOpenIdToken(); + + /** + * The refresh token + */ + @JsonProperty("refresh_token") + abstract String getRefreshToken(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenKeyRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenKeyRequest.java new file mode 100644 index 00000000000..c56a075c240 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenKeyRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.immutables.value.Value; + +/** + * The request payload for the get token key operation + */ +@Value.Immutable +abstract class _GetTokenKeyRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenKeyResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenKeyResponse.java new file mode 100644 index 00000000000..0c968ef8bbe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_GetTokenKeyResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the get token key request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetTokenKeyResponse extends AbstractTokenKey { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_ListTokenKeysRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_ListTokenKeysRequest.java new file mode 100644 index 00000000000..30f6a83cd19 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_ListTokenKeysRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.immutables.value.Value; + +/** + * The request payload for the list token keys operation + */ +@Value.Immutable +abstract class _ListTokenKeysRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_ListTokenKeysResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_ListTokenKeysResponse.java new file mode 100644 index 00000000000..2795b55e9bc --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_ListTokenKeysResponse.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response from the list token keys request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListTokenKeysResponse { + + /** + * The token keys + */ + @JsonProperty("keys") + abstract List getKeys(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_RefreshTokenRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_RefreshTokenRequest.java new file mode 100644 index 00000000000..af32a2d47c7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_RefreshTokenRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +/** + * The request payload for the refresh token operation + */ +@Value.Immutable +abstract class _RefreshTokenRequest { + + /** + * The client identifier + */ + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The client's secret passphrase + */ + @QueryParameter("client_secret") + abstract String getClientSecret(); + + /** + * The password + */ + @QueryParameter("refresh_token") + abstract String getRefreshToken(); + + /** + * The token format + */ + @Nullable + @QueryParameter("token_format") + abstract TokenFormat getTokenFormat(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_RefreshTokenResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_RefreshTokenResponse.java new file mode 100644 index 00000000000..b15945ba737 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_RefreshTokenResponse.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response from the refresh token operation + */ +@JsonDeserialize +@Value.Immutable +abstract class _RefreshTokenResponse extends AbstractToken { + + /** + * The OpenId token + */ + @JsonProperty("id_token") + @Nullable + abstract String getOpenIdToken(); + + /** + * The refresh token + */ + @JsonProperty("refresh_token") + abstract String getRefreshToken(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_TokenKey.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_TokenKey.java new file mode 100644 index 00000000000..f86bdae839f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/tokens/_TokenKey.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The token key + */ +@JsonDeserialize +@Value.Immutable +abstract class _TokenKey extends AbstractTokenKey { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUser.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUser.java new file mode 100644 index 00000000000..55b74ad6f1e --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUser.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +/** + * The entity response payload for User + */ +public abstract class AbstractUser extends AbstractUserSummary { + + /** + * The approvals for the user + */ + @JsonProperty("approvals") + public abstract List getApprovals(); + + /** + * The external id + */ + @JsonProperty("externalId") + @Nullable + public abstract String getExternalId(); + + /** + * The groups for the user + */ + @JsonProperty("groups") + public abstract List getGroups(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUserId.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUserId.java new file mode 100644 index 00000000000..90b0c41014c --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUserId.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; + +/** + * The entity response payload for a userid + */ +public abstract class AbstractUserId { + + /** + * The id + */ + @JsonProperty("id") + public abstract String getId(); + + /** + * The identity provider that authenticated this user + */ + @JsonProperty("origin") + public abstract String getOrigin(); + + /** + * The user name + */ + @JsonProperty("userName") + public abstract String getUserName(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUserSummary.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUserSummary.java new file mode 100644 index 00000000000..8df718d88d1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/AbstractUserSummary.java @@ -0,0 +1,95 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import java.util.List; +import org.cloudfoundry.Nullable; + +/** + * The summary entity response payload for User + */ +public abstract class AbstractUserSummary extends AbstractUserId { + + /** + * Whether the user is active + */ + @JsonProperty("active") + public abstract Boolean getActive(); + + /** + * The emails for the user + */ + @JsonProperty("emails") + public abstract List getEmail(); + + /** + * The unix epoch timestamp of when the user last authenticated + */ + @JsonProperty("lastLogonTime") + @Nullable + public abstract Long getLastLogonTime(); + + /** + * Metadata for the result + */ + @JsonProperty("meta") + public abstract Meta getMeta(); + + /** + * The user's name + */ + @JsonProperty("name") + public abstract Name getName(); + + /** + * The timestamp when the user's password was last modified + */ + @JsonProperty("passwordLastModified") + public abstract String getPasswordLastModified(); + + /** + * The phone numbers for the user + */ + @JsonProperty("phoneNumbers") + public abstract List getPhoneNumbers(); + + /** + * The unix epoch timestamp of when the user last authenticated + */ + @JsonProperty("previousLogonTime") + @Nullable + public abstract Long getPreviousLoginTime(); + + /** + * The schemas + */ + @JsonProperty("schemas") + public abstract List getSchemas(); + + /** + * Whether the user's email is verified + */ + @JsonProperty("verified") + public abstract Boolean getVerified(); + + /** + * The zone id the user belongs to + */ + @JsonProperty("zoneId") + public abstract String getZoneId(); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/ApprovalStatus.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/ApprovalStatus.java new file mode 100644 index 00000000000..98550fb6036 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/ApprovalStatus.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The status of a user's approval + */ +public enum ApprovalStatus { + + /** + * Indicates that the approval was approved + */ + APPROVED("APPROVED"), + + /** + * Indicates that the approval was denied + */ + DENIED("DENIED"); + + private final String value; + + ApprovalStatus(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/MembershipType.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/MembershipType.java new file mode 100644 index 00000000000..e03d9b1cea9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/MembershipType.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The membership type of the user group + */ +public enum MembershipType { + + /** + * Indicates that the user is directly associated with the group + */ + DIRECT("DIRECT"), + + /** + * Indicates that the membership has been inherited from nested groups + */ + INDIRECT("INDIRECT"); + + private final String value; + + MembershipType(String value) { + this.value = value; + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/Users.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/Users.java new file mode 100644 index 00000000000..062b43f0873 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/Users.java @@ -0,0 +1,114 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the UAA Users Client API + */ +public interface Users { + + /** + * Makes the Change User Password request + * + * @param request the Change User Password request + * @return the response from the Change User Password request + */ + Mono changePassword(ChangeUserPasswordRequest request); + + /** + * Makes the Create User request + * + * @param request the Create User request + * @return the response from the Create User request + */ + Mono create(CreateUserRequest request); + + /** + * Makes the Delete User request + * + * @param request the Delete User request + * @return the response from the Delete User request + */ + Mono delete(DeleteUserRequest request); + + /** + * Makes the Force User Password to Expire request + * + * @param request the Expire Password request + * @return the response from the Expire Password request + */ + Mono expirePassword(ExpirePasswordRequest request); + + /** + * Makes the Get User Verification Link request + * + * @param request the Get User Verification Link request + * @return the response from the Get User Verification Link request + */ + Mono getVerificationLink( + GetUserVerificationLinkRequest request); + + /** + * Makes the Invite Users request + * + * @param request the Invite Users request + * @return the response from the Invite Users request + */ + Mono invite(InviteUsersRequest request); + + /** + * Makes the List Users request + * + * @param request the List Users request + * @return the response from the List Users request + */ + Mono list(ListUsersRequest request); + + /** + * Makes the Lookup User IDs/Usernames request + * + * @param request the lookup userid and usernames request + * @return the response from the lookup userid and usernames request + */ + Mono lookup(LookupUserIdsRequest request); + + /** + * Makes the Update User request + * + * @param request the Update User request + * @return the response from the Update User request + */ + Mono update(UpdateUserRequest request); + + /** + * Makes the Retrieve User Info request + * + * @param request the User Info request + * @return the response from the User Info request + */ + Mono userInfo(UserInfoRequest request); + + /** + * Makes the Verify User request + * + * @param request the Verify User request + * @return the response from the Verify User request + */ + Mono verify(VerifyUserRequest request); +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Approval.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Approval.java new file mode 100644 index 00000000000..4e2868ab91b --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Approval.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The approvals for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _Approval { + + /** + * The client id + */ + @JsonProperty("clientId") + abstract String getClientId(); + + /** + * When the approval expires + */ + @JsonProperty("expiresAt") + abstract String getExpiresAt(); + + /** + * When the approval was last updated + */ + @JsonProperty("lastUpdatedAt") + abstract String getLastUpdatedAt(); + + /** + * The scope on the approval + */ + @JsonProperty("scope") + abstract String getScope(); + + /** + * The status of the approval + */ + @JsonProperty("status") + abstract ApprovalStatus getStatus(); + + /** + * The user id + */ + @JsonProperty("userId") + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordRequest.java new file mode 100644 index 00000000000..e86d40c91db --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordRequest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the change user password operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ChangeUserPasswordRequest implements IdentityZoned { + + /** + * The user's existing password + */ + @JsonProperty("oldPassword") + @Nullable + abstract String getOldPassword(); + + /** + * The user's desired password + */ + @JsonProperty("password") + abstract String getPassword(); + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordResponse.java new file mode 100644 index 00000000000..fa9b35f9420 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ChangeUserPasswordResponse.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the change user password request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ChangeUserPasswordResponse { + + /** + * The update message + */ + @JsonProperty("message") + abstract String getMessage(); + + /** + * The update status + */ + @JsonProperty("status") + abstract String getStatus(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_CreateUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_CreateUserRequest.java new file mode 100644 index 00000000000..8bb4682ce52 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_CreateUserRequest.java @@ -0,0 +1,110 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the create user operation + */ +@JsonSerialize +@Value.Immutable +abstract class _CreateUserRequest implements IdentityZoned { + + @Value.Check + void check() { + if (getName() != null && (getName().getFamilyName() == null || getName().getFamilyName().isEmpty())) { + throw new IllegalStateException("Cannot build CreateUserRequest, required attribute familyName is not set, or is empty"); + } + + if (getName() != null && (getName().getGivenName() == null || getName().getGivenName().isEmpty())) { + throw new IllegalStateException("Cannot build CreateUserRequest, required attribute givenName is not set, or is empty"); + } + + if (getEmail().isEmpty()) { + throw new IllegalStateException("Cannot build CreateUserRequest, at least one email address is required"); + } + } + + /** + * Whether the user is active + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * The emails for the user + */ + @JsonProperty("emails") + abstract List getEmail(); + + /** + * The external id + */ + @JsonProperty("externalId") + @Nullable + abstract String getExternalId(); + + /** + * The user's name + */ + @JsonProperty("name") + @Nullable + abstract Name getName(); + + /** + * The identity provider that authenticated this user + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The password + */ + @JsonProperty("password") + @Nullable + abstract String getPassword(); + + /** + * The phone numbers for the user + */ + @JsonProperty("phoneNumbers") + @Nullable + abstract List getPhoneNumbers(); + + /** + * The user name + */ + @JsonProperty("userName") + abstract String getUserName(); + + /** + * Whether the user's email is verified + */ + @JsonProperty("verified") + @Nullable + abstract Boolean getVerified(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_CreateUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_CreateUserResponse.java new file mode 100644 index 00000000000..d97326f65d1 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_CreateUserResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the create user request + */ +@JsonDeserialize +@Value.Immutable +abstract class _CreateUserResponse extends AbstractUser { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_DeleteUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_DeleteUserRequest.java new file mode 100644 index 00000000000..8c3fe0a6efe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_DeleteUserRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.Versioned; +import org.immutables.value.Value; + +/** + * The request payload for the delete user operation + */ +@Value.Immutable +abstract class _DeleteUserRequest implements IdentityZoned, Versioned { + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_DeleteUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_DeleteUserResponse.java new file mode 100644 index 00000000000..07f3e503c44 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_DeleteUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the delete user request + */ +@JsonDeserialize +@Value.Immutable +abstract class _DeleteUserResponse extends AbstractUser { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Email.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Email.java new file mode 100644 index 00000000000..79d48c5e971 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Email.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * An email address for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _Email { + + /** + * Whether this email address is the primary + */ + @JsonProperty("primary") + abstract Boolean getPrimary(); + + /** + * The email address + */ + @JsonProperty("value") + abstract String getValue(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ExpirePasswordRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ExpirePasswordRequest.java new file mode 100644 index 00000000000..126bbe5cc64 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ExpirePasswordRequest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the expire password operation + */ +@JsonSerialize +@Value.Immutable +abstract class _ExpirePasswordRequest implements IdentityZoned { + + /** + * Whether to expire the user's password + */ + @JsonProperty("passwordChangeRequired") + abstract Boolean getPasswordChangeRequired(); + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ExpirePasswordResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ExpirePasswordResponse.java new file mode 100644 index 00000000000..27ea9e85cbb --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ExpirePasswordResponse.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The response from the expire password request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ExpirePasswordResponse { + + /** + * Whether the account is locked + */ + @JsonProperty("locked") + @Nullable + abstract Boolean getLocked(); + + /** + * Whether user's password will be expired + */ + @JsonProperty("passwordChangeRequired") + @Nullable + abstract Boolean getPasswordChangeRequired(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_GetUserVerificationLinkRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_GetUserVerificationLinkRequest.java new file mode 100644 index 00000000000..479110ddb65 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_GetUserVerificationLinkRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +/** + * The request payload for the get user verification link operation + */ +@Value.Immutable +abstract class _GetUserVerificationLinkRequest implements IdentityZoned { + + /** + * The redirect URI + */ + @QueryParameter("redirect_uri") + abstract String getRedirectUri(); + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_GetUserVerificationLinkResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_GetUserVerificationLinkResponse.java new file mode 100644 index 00000000000..6128fa9f069 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_GetUserVerificationLinkResponse.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the get user verification link request + */ +@JsonDeserialize +@Value.Immutable +abstract class _GetUserVerificationLinkResponse { + + /** + * The verification link + */ + @JsonProperty("verify_link") + abstract String getVerifyLink(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Group.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Group.java new file mode 100644 index 00000000000..32c35519e50 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Group.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The groups for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _Group { + + /** + * The client id + */ + @JsonProperty("display") + abstract String getDisplay(); + + /** + * The type of membership + */ + @JsonProperty("type") + abstract MembershipType getType(); + + /** + * The group value + */ + @JsonProperty("value") + abstract String getValue(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Invite.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Invite.java new file mode 100644 index 00000000000..07ef4f80c58 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Invite.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * An invite for a new user + */ +@JsonDeserialize +@Value.Immutable +abstract class _Invite { + + /** + * The email address + */ + @JsonProperty("email") + abstract String getEmail(); + + /** + * The error code + */ + @JsonProperty("errorCode") + @Nullable + abstract String getErrorCode(); + + /** + * The error message + */ + @JsonProperty("errorMessage") + @Nullable + abstract String getErrorMessage(); + + /** + * The invite link + */ + @JsonProperty("inviteLink") + @Nullable + abstract String getInviteLink(); + + /** + * The origin + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * Whether the invite was sent successfully + */ + @JsonProperty("success") + abstract Boolean getSuccess(); + + /** + * The user id + */ + @JsonProperty("userId") + @Nullable + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_InviteUsersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_InviteUsersRequest.java new file mode 100644 index 00000000000..bef0c08c71f --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_InviteUsersRequest.java @@ -0,0 +1,61 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.uaa.IdentityZoned; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the change user password operation + */ +@JsonSerialize +@Value.Immutable +abstract class _InviteUsersRequest implements IdentityZoned { + + @Value.Check + void check() { + if (getEmails().isEmpty()) { + throw new IllegalStateException("Cannot build InviteUsersRequest, at least one email must be provided"); + } + } + + /** + * The client registration information + */ + @Nullable + @QueryParameter("client_id") + abstract String getClientId(); + + /** + * The emails to invite + */ + @JsonProperty("emails") + abstract List getEmails(); + + /** + * The redirect URI + */ + @QueryParameter("redirect_uri") + abstract String getRedirectUri(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_InviteUsersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_InviteUsersResponse.java new file mode 100644 index 00000000000..9fb1607844d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_InviteUsersResponse.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The response from the verify user request + */ +@JsonDeserialize +@Value.Immutable +abstract class _InviteUsersResponse { + + /** + * Failed invites + */ + @JsonProperty("failed_invites") + abstract List getFailedInvites(); + + /** + * Successful invites + */ + @JsonProperty("new_invites") + abstract List getNewInvites(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ListUsersRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ListUsersRequest.java new file mode 100644 index 00000000000..ded2591bcd7 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ListUsersRequest.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.PaginatedAndSortedByRequest; +import org.immutables.value.Value; + +/** + * The request payload for the list users operation + */ +@Value.Immutable +abstract class _ListUsersRequest extends PaginatedAndSortedByRequest implements IdentityZoned { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ListUsersResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ListUsersResponse.java new file mode 100644 index 00000000000..b416fd1ef27 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_ListUsersResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.uaa.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response from the list users request + */ +@JsonDeserialize +@Value.Immutable +abstract class _ListUsersResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_LookupUserIdsRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_LookupUserIdsRequest.java new file mode 100644 index 00000000000..659b6d75d9d --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_LookupUserIdsRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.QueryParameter; +import org.cloudfoundry.uaa.PaginatedAndSortedRequest; +import org.immutables.value.Value; + +/** + * The request payload for the lookup user ids and usernames operation + */ +@Value.Immutable +abstract class _LookupUserIdsRequest extends PaginatedAndSortedRequest { + + /** + * Whether to include users from inactive identity providers + */ + @Nullable + @QueryParameter("includeInactive") + abstract Boolean getIncludeInactive(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_LookupUserIdsResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_LookupUserIdsResponse.java new file mode 100644 index 00000000000..a4b5b570531 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_LookupUserIdsResponse.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.uaa.PaginatedResponse; +import org.immutables.value.Value; + +/** + * The response from the lookup userid and usernames request + */ +@JsonDeserialize +@Value.Immutable +abstract class _LookupUserIdsResponse extends PaginatedResponse { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Meta.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Meta.java new file mode 100644 index 00000000000..8a8a82a93e2 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Meta.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The metadata payload for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _Meta { + + /** + * When the user record was created + */ + @JsonProperty("created") + abstract String getCreated(); + + /** + * When the user record was last modified + */ + @JsonProperty("lastModified") + abstract String getLastModified(); + + /** + * The metadata version + */ + @JsonProperty("version") + abstract Integer getVersion(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Name.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Name.java new file mode 100644 index 00000000000..a3828875616 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_Name.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The name for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _Name { + + /** + * The family name + */ + @JsonProperty("familyName") + @Nullable // required to allow for legacy admin user + abstract String getFamilyName(); + + /** + * The given name + */ + @JsonProperty("givenName") + @Nullable // required to allow for legacy admin user + abstract String getGivenName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_PhoneNumber.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_PhoneNumber.java new file mode 100644 index 00000000000..fab2a4069dd --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_PhoneNumber.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * A phone number for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _PhoneNumber { + + /** + * The phone number + */ + @JsonProperty("value") + abstract String getValue(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UpdateUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UpdateUserRequest.java new file mode 100644 index 00000000000..fe21eaa37fa --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UpdateUserRequest.java @@ -0,0 +1,113 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.Versioned; +import org.immutables.value.Value; + +import java.util.List; + +/** + * The request payload for the update user operation + */ +@JsonSerialize +@Value.Immutable +abstract class _UpdateUserRequest implements IdentityZoned, Versioned { + + /** + * The version + */ + @JsonIgnore + @Override + public abstract String getVersion(); + + @Value.Check + void check() { + if (getName().getFamilyName() == null || getName().getFamilyName().isEmpty()) { + throw new IllegalStateException("Cannot build UpdateUserRequest, required attribute familyName is not set, or is empty"); + } + + if (getName().getGivenName() == null || getName().getGivenName().isEmpty()) { + throw new IllegalStateException("Cannot build UpdateUserRequest, required attribute givenName is not set, or is empty"); + } + } + + /** + * Whether the user is active + */ + @JsonProperty("active") + @Nullable + abstract Boolean getActive(); + + /** + * The emails for the user + */ + @JsonProperty("emails") + abstract List getEmails(); + + /** + * The external id + */ + @JsonProperty("externalId") + @Nullable + abstract String getExternalId(); + + /** + * The id + */ + @JsonProperty("id") + @JsonIgnore + abstract String getId(); + + /** + * The user's name + */ + @JsonProperty("name") + abstract Name getName(); + + /** + * The identity provider that authenticated this user + */ + @JsonProperty("origin") + @Nullable + abstract String getOrigin(); + + /** + * The phone numbers for the user + */ + @JsonProperty("phoneNumbers") + abstract List getPhoneNumbers(); + + /** + * The user name + */ + @JsonProperty("userName") + abstract String getUserName(); + + /** + * Whether the user's email is verified + */ + @JsonProperty("verified") + @Nullable + abstract Boolean getVerified(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UpdateUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UpdateUserResponse.java new file mode 100644 index 00000000000..c7917ca0375 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UpdateUserResponse.java @@ -0,0 +1,29 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the update user request + */ +@JsonDeserialize +@Value.Immutable +abstract class _UpdateUserResponse extends AbstractUser { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_User.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_User.java new file mode 100644 index 00000000000..2ccf6aebcea --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_User.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _User extends AbstractUser { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserId.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserId.java new file mode 100644 index 00000000000..248566646f9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserId.java @@ -0,0 +1,26 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +@JsonDeserialize +@Value.Immutable +abstract class _UserId extends AbstractUserId { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserInfoRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserInfoRequest.java new file mode 100644 index 00000000000..d4c98b3a511 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserInfoRequest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import org.immutables.value.Value; + +/** + * The request payload for the user info operation + */ +@Value.Immutable +abstract class _UserInfoRequest { + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserInfoResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserInfoResponse.java new file mode 100644 index 00000000000..af83aac85b0 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_UserInfoResponse.java @@ -0,0 +1,95 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The info for a user + */ +@JsonDeserialize +@Value.Immutable +abstract class _UserInfoResponse { + + /** + * The user's email address + */ + @JsonProperty("email") + abstract String getEmail(); + + /** + * Whether the user has verified their email address + */ + @JsonProperty("email_verified") + @Nullable + abstract Boolean getEmailVerified(); + + /** + * The user's family name + */ + @JsonProperty("family_name") + abstract String getFamilyName(); + + /** + * The user's given name + */ + @JsonProperty("given_name") + abstract String getGivenName(); + + /** + * The name of the user + */ + @JsonProperty("name") + abstract String getName(); + + /** + * The user's phone number + */ + @JsonProperty("phone_number") + @Nullable + abstract String getPhoneNumber(); + + /** + * When the user last logged on + */ + @JsonProperty("previous_logon_time") + @Nullable + abstract Long getPreviousLogonTime(); + + /** + * The user subject identifier + */ + @JsonProperty("sub") + @Nullable + abstract String getSub(); + + /** + * The user id + */ + @JsonProperty("user_id") + abstract String getUserId(); + + /** + * The user name + */ + @JsonProperty("user_name") + abstract String getUserName(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_VerifyUserRequest.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_VerifyUserRequest.java new file mode 100644 index 00000000000..866b4d971fe --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_VerifyUserRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import com.fasterxml.jackson.annotation.JsonIgnore; +import org.cloudfoundry.uaa.IdentityZoned; +import org.cloudfoundry.uaa.Versioned; +import org.immutables.value.Value; + +/** + * The request payload for the verify user operation + */ +@Value.Immutable +abstract class _VerifyUserRequest implements IdentityZoned, Versioned { + + /** + * The user id + */ + @JsonIgnore + abstract String getUserId(); + +} diff --git a/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_VerifyUserResponse.java b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_VerifyUserResponse.java new file mode 100644 index 00000000000..815d30ed0b9 --- /dev/null +++ b/cloudfoundry-client/src/main/java/org/cloudfoundry/uaa/users/_VerifyUserResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + + +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.immutables.value.Value; + +/** + * The response from the verify user request + */ +@JsonDeserialize +@Value.Immutable +abstract class _VerifyUserResponse extends AbstractUserSummary { + +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/ClientV2ExceptionTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/ClientV2ExceptionTest.java new file mode 100644 index 00000000000..3cc96d0504c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/ClientV2ExceptionTest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +final class ClientV2ExceptionTest { + + @Test + void test() { + assertThat(new ClientV2Exception(-1, -2, "test-description", "test-error-code")) + .hasNoCause() + .hasMessage("test-error-code(-2): test-description") + .extracting("statusCode", "code", "description", "errorCode") + .containsExactly(-1, -2, "test-description", "test-error-code"); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/PaginatedRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/PaginatedRequestTest.java new file mode 100644 index 00000000000..7c1cbdeefdc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/PaginatedRequestTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.v2.OrderDirection.ASCENDING; +import static org.cloudfoundry.client.v2.OrderDirection.DESCENDING; + +import org.junit.jupiter.api.Test; + +final class PaginatedRequestTest { + + @Test + void orderedBy() { + assertThat(ASCENDING.getValue()).isEqualTo("asc"); + assertThat(DESCENDING.getValue()).isEqualTo("desc"); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationEnvironmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationEnvironmentRequestTest.java new file mode 100644 index 00000000000..adacb024343 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationEnvironmentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ApplicationEnvironmentRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationEnvironmentRequest.builder().build(); + }); + } + + @Test + void valid() { + ApplicationEnvironmentRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationInstancesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationInstancesRequestTest.java new file mode 100644 index 00000000000..1540f45d5c8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationInstancesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ApplicationInstancesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationInstancesRequest.builder().build(); + }); + } + + @Test + void valid() { + ApplicationInstancesRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationStatisticsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationStatisticsRequestTest.java new file mode 100644 index 00000000000..98e611e32f0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ApplicationStatisticsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ApplicationStatisticsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationStatisticsRequest.builder().build(); + }); + } + + @Test + void valid() { + ApplicationStatisticsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/AssociateApplicationRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/AssociateApplicationRouteRequestTest.java new file mode 100644 index 00000000000..26793e71ed7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/AssociateApplicationRouteRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateApplicationRouteRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateApplicationRouteRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateApplicationRouteRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void valid() { + AssociateApplicationRouteRequest.builder() + .applicationId("test-application-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/CopyApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/CopyApplicationRequestTest.java new file mode 100644 index 00000000000..2bb87399e57 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/CopyApplicationRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CopyApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + CopyApplicationRequest.builder() + .sourceApplicationId("test-source-application-id") + .build(); + }); + } + + @Test + void noSourceApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + CopyApplicationRequest.builder().applicationId("test-application id").build(); + }); + } + + @Test + void valid() { + CopyApplicationRequest.builder() + .applicationId("test-application-id") + .sourceApplicationId("test-source-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/CreateApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/CreateApplicationRequestTest.java new file mode 100644 index 00000000000..587eb1fe46e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/CreateApplicationRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateApplicationRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateApplicationRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + CreateApplicationRequest.builder().name("test-name").spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DeleteApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DeleteApplicationRequestTest.java new file mode 100644 index 00000000000..10835a705a8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DeleteApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DownloadApplicationDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DownloadApplicationDropletRequestTest.java new file mode 100644 index 00000000000..bfed0672e5d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DownloadApplicationDropletRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DownloadApplicationDropletRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + DownloadApplicationDropletRequest.builder().build(); + }); + } + + @Test + void valid() { + DownloadApplicationDropletRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DownloadApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DownloadApplicationRequestTest.java new file mode 100644 index 00000000000..50f5d3ae66e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/DownloadApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DownloadApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + DownloadApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + DownloadApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/GetApplicationPermissionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/GetApplicationPermissionsRequestTest.java new file mode 100644 index 00000000000..c457960124c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/GetApplicationPermissionsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationPermissionsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationPermissionsRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationPermissionsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/GetApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/GetApplicationRequestTest.java new file mode 100644 index 00000000000..46c46d7a7ef --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/GetApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationRoutesRequestTest.java new file mode 100644 index 00000000000..df360651a81 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationRoutesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationRoutesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationRoutesRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationServiceBindingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationServiceBindingsRequestTest.java new file mode 100644 index 00000000000..d01a1e00736 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationServiceBindingsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationServiceBindingsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationServiceBindingsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationServiceBindingsRequest.builder() + .applicationId("test-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationsRequestTest.java new file mode 100644 index 00000000000..6f15d821a2f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/ListApplicationsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import org.junit.jupiter.api.Test; + +final class ListApplicationsRequestTest { + + @Test + void valid() { + ListApplicationsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RemoveApplicationRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RemoveApplicationRouteRequestTest.java new file mode 100644 index 00000000000..ebe19291e4f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RemoveApplicationRouteRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveApplicationRouteRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveApplicationRouteRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveApplicationRouteRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void valid() { + RemoveApplicationRouteRequest.builder() + .applicationId("test-application-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RemoveApplicationServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RemoveApplicationServiceBindingRequestTest.java new file mode 100644 index 00000000000..c7bb872a09d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RemoveApplicationServiceBindingRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveApplicationServiceBindingRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveApplicationServiceBindingRequest.builder() + .serviceBindingId("test-service-binding-id") + .build(); + }); + } + + @Test + void noServiceBindingId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveApplicationServiceBindingRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void valid() { + RemoveApplicationServiceBindingRequest.builder() + .applicationId("test-application-id") + .serviceBindingId("test-service-binding-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RestageApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RestageApplicationRequestTest.java new file mode 100644 index 00000000000..61ed46a508e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/RestageApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RestageApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + RestageApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + RestageApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/SummaryApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/SummaryApplicationRequestTest.java new file mode 100644 index 00000000000..adefc299d10 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/SummaryApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SummaryApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + SummaryApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + SummaryApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/TerminateApplicationInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/TerminateApplicationInstanceRequestTest.java new file mode 100644 index 00000000000..d7d697f3cc8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/TerminateApplicationInstanceRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class TerminateApplicationInstanceRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationInstanceRequest.builder().index("0").build(); + }); + } + + @Test + void noIndex() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void valid() { + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .index("0") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UpdateApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UpdateApplicationRequestTest.java new file mode 100644 index 00000000000..e35a0a85474 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UpdateApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UploadApplicationDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UploadApplicationDropletRequestTest.java new file mode 100644 index 00000000000..a1e7d91c425 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UploadApplicationDropletRequestTest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class UploadApplicationDropletRequestTest { + + private static final Path TEST_DROPLET = Paths.get("/"); + + @Test + void noApplication() { + assertThrows( + IllegalStateException.class, + () -> { + UploadApplicationDropletRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + UploadApplicationDropletRequest.builder().droplet(TEST_DROPLET).build(); + }); + } + + @Test + void valid() { + UploadApplicationDropletRequest.builder() + .droplet(TEST_DROPLET) + .applicationId("test-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UploadApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UploadApplicationRequestTest.java new file mode 100644 index 00000000000..abf7c1ddbc5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applications/UploadApplicationRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class UploadApplicationRequestTest { + + private static final Path TEST_APPLICATION = Paths.get("/"); + + @Test + void noApplication() { + assertThrows( + IllegalStateException.class, + () -> { + UploadApplicationRequest.builder().applicationId("test-application-id").build(); + }); + } + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + UploadApplicationRequest.builder().application(TEST_APPLICATION).build(); + }); + } + + @Test + void valid() { + UploadApplicationRequest.builder() + .application(TEST_APPLICATION) + .applicationId("test-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/GetApplicationUsageEventRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/GetApplicationUsageEventRequestTest.java new file mode 100644 index 00000000000..7712919ed0d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/GetApplicationUsageEventRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationUsageEventRequestTest { + + @Test + void noApplicationUsageEventId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationUsageEventRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationUsageEventRequest.builder() + .applicationUsageEventId("test-application-usage-event-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/ListApplicationUsageEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/ListApplicationUsageEventsRequestTest.java new file mode 100644 index 00000000000..9d9bce342f5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/ListApplicationUsageEventsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import org.junit.jupiter.api.Test; + +final class ListApplicationUsageEventsRequestTest { + + @Test + void valid() { + ListApplicationUsageEventsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/PurgeAndReseedApplicationUsageEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/PurgeAndReseedApplicationUsageEventsRequestTest.java new file mode 100644 index 00000000000..3478fbac5b0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/applicationusageevents/PurgeAndReseedApplicationUsageEventsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.applicationusageevents; + +import org.junit.jupiter.api.Test; + +final class PurgeAndReseedApplicationUsageEventsRequestTest { + + @Test + void valid() { + PurgeAndReseedApplicationUsageEventsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/blobstores/DeleteBlobstoreBuildpackCachesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/blobstores/DeleteBlobstoreBuildpackCachesRequestTest.java new file mode 100644 index 00000000000..a139f54e117 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/blobstores/DeleteBlobstoreBuildpackCachesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.blobstores; + +import org.junit.jupiter.api.Test; + +final class DeleteBlobstoreBuildpackCachesRequestTest { + + @Test + void valid() { + DeleteBlobstoreBuildpackCachesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/BuildpackEntityTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/BuildpackEntityTest.java new file mode 100644 index 00000000000..19af9c14475 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/BuildpackEntityTest.java @@ -0,0 +1,27 @@ +package org.cloudfoundry.client.v2.buildpacks; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import org.junit.jupiter.api.Test; + +class BuildpackEntityTest { + @Test + void jsonSerialization() throws JsonProcessingException { + ObjectMapper mapper = new ObjectMapper(); + BuildpackEntity originalBuildpack = + BuildpackEntity.builder() + .enabled(false) + .locked(true) + .name("test-buildpack") + .position(42) + .lifecycle(LifecycleType.BUILDPACK) + .build(); + + String serialized = mapper.writeValueAsString(originalBuildpack); + BuildpackEntity deserialized = mapper.readValue(serialized, BuildpackEntity.class); + + assertThat(deserialized).isEqualTo(originalBuildpack); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/CreateBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/CreateBuildpackRequestTest.java new file mode 100644 index 00000000000..649a3b076fc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/CreateBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateBuildpackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateBuildpackRequest.builder().name("test-buildpack-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/DeleteBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/DeleteBuildpackRequestTest.java new file mode 100644 index 00000000000..9511cdab594 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/DeleteBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteBuildpackRequestTest { + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/GetBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/GetBuildpackRequestTest.java new file mode 100644 index 00000000000..ac4b792848c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/GetBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetBuildpackRequestTest { + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + GetBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + GetBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/ListBuildpacksRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/ListBuildpacksRequestTest.java new file mode 100644 index 00000000000..27758c0abf5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/ListBuildpacksRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import org.junit.jupiter.api.Test; + +final class ListBuildpacksRequestTest { + + @Test + void valid() { + ListBuildpacksRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/UpdateBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/UpdateBuildpackRequestTest.java new file mode 100644 index 00000000000..c12780cff97 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/UpdateBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateBuildpackRequestTest { + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/UploadBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/UploadBuildpackRequestTest.java new file mode 100644 index 00000000000..39793fa7b9b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/buildpacks/UploadBuildpackRequestTest.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class UploadBuildpackRequestTest { + + private static final Path TEST_BUILDPACK = Paths.get("/"); + + @Test + void noBuildpack() { + assertThrows( + IllegalStateException.class, + () -> { + UploadBuildpackRequest.builder() + .buildpackId("test-buildpack-id") + .filename("test-filename") + .build(); + }); + } + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + UploadBuildpackRequest.builder() + .buildpack(TEST_BUILDPACK) + .filename("test-filename") + .build(); + }); + } + + @Test + void noFilename() { + assertThrows( + IllegalStateException.class, + () -> { + UploadBuildpackRequest.builder() + .buildpack(TEST_BUILDPACK) + .buildpackId("test-buildpack-id") + .build(); + }); + } + + @Test + void valid() { + UploadBuildpackRequest.builder() + .buildpack(TEST_BUILDPACK) + .buildpackId("test-buildpack-id") + .filename("test-filename") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/CreateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/CreateDomainRequestTest.java new file mode 100644 index 00000000000..f2a9fd3979c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/CreateDomainRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateDomainRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateDomainRequest.builder().wildcard(true).build(); + }); + } + + @Test + void noWildcard() { + assertThrows( + IllegalStateException.class, + () -> { + CreateDomainRequest.builder() + .name("test-name") + .owningOrganizationId("test-owning-organization-id") + .build(); + }); + } + + @Test + void valid() { + CreateDomainRequest.builder().name("test-name").wildcard(true).build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/DeleteDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/DeleteDomainRequestTest.java new file mode 100644 index 00000000000..062eab07921 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/DeleteDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteDomainRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteDomainRequest.builder().domainId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/GetDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/GetDomainRequestTest.java new file mode 100644 index 00000000000..d41f183c055 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/GetDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetDomainRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + GetDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + GetDomainRequest.builder().domainId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/ListDomainSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/ListDomainSpacesRequestTest.java new file mode 100644 index 00000000000..95b6be35757 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/ListDomainSpacesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListDomainSpacesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListDomainSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListDomainSpacesRequest.builder().domainId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/ListDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/ListDomainsRequestTest.java new file mode 100644 index 00000000000..4d8483a1a00 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/domains/ListDomainsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.domains; + +import org.junit.jupiter.api.Test; + +final class ListDomainsRequestTest { + + @Test + void valid() { + ListDomainsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/GetRunningEnvironmentVariablesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/GetRunningEnvironmentVariablesRequestTest.java new file mode 100644 index 00000000000..97ff62d979b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/GetRunningEnvironmentVariablesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import org.junit.jupiter.api.Test; + +final class GetRunningEnvironmentVariablesRequestTest { + + @Test + void valid() { + GetRunningEnvironmentVariablesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/GetStagingEnvironmentVariablesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/GetStagingEnvironmentVariablesRequestTest.java new file mode 100644 index 00000000000..8b631675dbc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/GetStagingEnvironmentVariablesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import org.junit.jupiter.api.Test; + +final class GetStagingEnvironmentVariablesRequestTest { + + @Test + void valid() { + GetStagingEnvironmentVariablesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/UpdateRunningEnvironmentVariablesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/UpdateRunningEnvironmentVariablesRequestTest.java new file mode 100644 index 00000000000..21aa5c58eb6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/UpdateRunningEnvironmentVariablesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import org.junit.jupiter.api.Test; + +final class UpdateRunningEnvironmentVariablesRequestTest { + + @Test + void valid() { + UpdateRunningEnvironmentVariablesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/UpdateStagingEnvironmentVariablesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/UpdateStagingEnvironmentVariablesRequestTest.java new file mode 100644 index 00000000000..212fd6e292c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/environmentvariablegroups/UpdateStagingEnvironmentVariablesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.environmentvariablegroups; + +import org.junit.jupiter.api.Test; + +final class UpdateStagingEnvironmentVariablesRequestTest { + + @Test + void valid() { + UpdateStagingEnvironmentVariablesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/events/GetEventRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/events/GetEventRequestTest.java new file mode 100644 index 00000000000..c2b41af64b6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/events/GetEventRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetEventRequestTest { + + @Test + void noEventId() { + assertThrows( + IllegalStateException.class, + () -> { + GetEventRequest.builder().build(); + }); + } + + @Test + void valid() { + GetEventRequest.builder().eventId("test-event-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/events/ListEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/events/ListEventsRequestTest.java new file mode 100644 index 00000000000..9c21f28e5c2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/events/ListEventsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.events; + +import org.junit.jupiter.api.Test; + +final class ListEventsRequestTest { + + @Test + void valid() { + ListEventsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/GetFeatureFlagRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/GetFeatureFlagRequestTest.java new file mode 100644 index 00000000000..8070a15f5d6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/GetFeatureFlagRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetFeatureFlagRequestTest { + + @Test + void badName1() { + assertThrows( + IllegalStateException.class, + () -> { + GetFeatureFlagRequest.builder() + .name( + "mustn't have spaces or / chars (or quotes, or parentheses, or" + + " commas)") + .build(); + }); + } + + @Test + void badName2() { + assertThrows( + IllegalStateException.class, + () -> { + GetFeatureFlagRequest.builder().name("good_name_with_bad_at_end ").build(); + }); + } + + @Test + void badName3() { + assertThrows( + IllegalStateException.class, + () -> { + GetFeatureFlagRequest.builder().name("good_name_with_bad_at_end.").build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetFeatureFlagRequest.builder().build(); + }); + } + + @Test + void valid() { + GetFeatureFlagRequest.builder().name("test_feature_flag_name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/ListFeatureFlagsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/ListFeatureFlagsRequestTest.java new file mode 100644 index 00000000000..948ce5b5cf9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/ListFeatureFlagsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import org.junit.jupiter.api.Test; + +final class ListFeatureFlagsRequestTest { + + @Test + void valid() { + ListFeatureFlagsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/SetFeatureFlagRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/SetFeatureFlagRequestTest.java new file mode 100644 index 00000000000..c5120a388af --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/featureflags/SetFeatureFlagRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.featureflags; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetFeatureFlagRequestTest { + + @Test + void noEnabled() { + assertThrows( + IllegalStateException.class, + () -> { + SetFeatureFlagRequest.builder().name("test-name").build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + SetFeatureFlagRequest.builder().enabled(false).build(); + }); + } + + @Test + void valid() { + SetFeatureFlagRequest.builder().enabled(false).name("test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/info/GetInfoRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/info/GetInfoRequestTest.java new file mode 100644 index 00000000000..7c632c1a8bc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/info/GetInfoRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.info; + +import org.junit.jupiter.api.Test; + +final class GetInfoRequestTest { + + @Test + void valid() { + GetInfoRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/jobs/GetJobRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/jobs/GetJobRequestTest.java new file mode 100644 index 00000000000..d14bb1108c8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/jobs/GetJobRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.jobs; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetJobRequestTest { + + @Test + void noJobId() { + assertThrows( + IllegalStateException.class, + () -> { + GetJobRequest.builder().build(); + }); + } + + @Test + void valid() { + GetJobRequest.builder().jobId("test-job-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/CreateOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/CreateOrganizationQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..bd12bb48ebc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/CreateOrganizationQuotaDefinitionRequestTest.java @@ -0,0 +1,125 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateOrganizationQuotaDefinitionRequestTest { + + @Test + void noInstanceMemoryLimit() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationQuotaDefinitionRequest.builder() + .memoryLimit(1024) + .name("test-quota-definition-name") + .nonBasicServicesAllowed(false) + .totalRoutes(-1) + .totalServices(-1) + .build(); + }); + } + + @Test + void noMemoryLimit() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .name("test-quota-definition-name") + .nonBasicServicesAllowed(false) + .totalRoutes(-1) + .totalServices(-1) + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .nonBasicServicesAllowed(false) + .totalRoutes(-1) + .totalServices(-1) + .build(); + }); + } + + @Test + void noNonBasicServicesAllowed() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .name("test-quota-definition-name") + .totalRoutes(-1) + .totalServices(-1) + .build(); + }); + } + + @Test + void noTotalRoutes() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .name("test-quota-definition-name") + .totalServices(-1) + .build(); + }); + } + + @Test + void noTotalServices() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .name("test-quota-definition-name") + .nonBasicServicesAllowed(false) + .totalRoutes(-1) + .build(); + }); + } + + @Test + void valid() { + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .name("test-quota-definition-name") + .nonBasicServicesAllowed(false) + .totalRoutes(-1) + .totalServices(-1) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/DeleteOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/DeleteOrganizationQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..5609b11de21 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/DeleteOrganizationQuotaDefinitionRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteOrganizationQuotaDefinitionRequestTest { + + @Test + void noOrganizationQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteOrganizationQuotaDefinitionRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId("test-organization-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/GetOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/GetOrganizationQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..38c45da95af --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/GetOrganizationQuotaDefinitionRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationQuotaDefinitionRequestTest { + + @Test + void noOrganizationQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationQuotaDefinitionRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId("test-organization-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/ListOrganizationQuotaDefinitionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/ListOrganizationQuotaDefinitionsRequestTest.java new file mode 100644 index 00000000000..a2dab33af9b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/ListOrganizationQuotaDefinitionsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationQuotaDefinitionsRequestTest { + + @Test + void valid() { + ListOrganizationQuotaDefinitionsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/UpdateOrganizationQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/UpdateOrganizationQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..e0ebf64096f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizationquotadefinitions/UpdateOrganizationQuotaDefinitionRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizationquotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UpdateOrganizationQuotaDefinitionRequestTest { + + @Test + void noOrganizationQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateOrganizationQuotaDefinitionRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId("test-organization-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationAuditorByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationAuditorByUsernameRequestTest.java new file mode 100644 index 00000000000..be9a68e67fb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationAuditorByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationAuditorByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationAuditorByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationAuditorByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationAuditorByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationAuditorRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationAuditorRequestTest.java new file mode 100644 index 00000000000..806930e9d6a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationAuditorRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationAuditorRequestTest { + + @Test + void noAuditorId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationAuditorRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationAuditorRequest.builder() + .auditorId("test-auditor-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationAuditorRequest.builder() + .auditorId("test-auditor-id") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationBillingManagerByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationBillingManagerByUsernameRequestTest.java new file mode 100644 index 00000000000..ee68672ce74 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationBillingManagerByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationBillingManagerByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationBillingManagerByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationBillingManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationBillingManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationBillingManagerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationBillingManagerRequestTest.java new file mode 100644 index 00000000000..8dd44ef8bc6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationBillingManagerRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationBillingManagerRequestTest { + + @Test + void noBillingManagerId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationBillingManagerRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationBillingManagerRequest.builder() + .billingManagerId("test-billing-manager-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationBillingManagerRequest.builder() + .billingManagerId("test-billing-manager-id") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationManagerByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationManagerByUsernameRequestTest.java new file mode 100644 index 00000000000..366ba6c2757 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationManagerByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationManagerByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationManagerByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationManagerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationManagerRequestTest.java new file mode 100644 index 00000000000..3cf278048d8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationManagerRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationManagerRequestTest { + + @Test + void noManagerId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationManagerRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationManagerRequest.builder() + .managerId("test-manager-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationManagerRequest.builder() + .organizationId("test-organization-id") + .managerId("test-manager-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationPrivateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationPrivateDomainRequestTest.java new file mode 100644 index 00000000000..8dbe8a9f079 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationPrivateDomainRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationPrivateDomainRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationPrivateDomainRequest.builder() + .privateDomainId("test-private-domain-id") + .build(); + }); + } + + @Test + void noPrivateDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationPrivateDomainRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationPrivateDomainRequest.builder() + .organizationId("test-organization-id") + .privateDomainId("test-private-domain-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationUserByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationUserByUsernameRequestTest.java new file mode 100644 index 00000000000..24e84be7c52 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationUserByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationUserByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationUserByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationUserRequestTest.java new file mode 100644 index 00000000000..b51071dea81 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/AssociateOrganizationUserRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateOrganizationUserRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationUserRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateOrganizationUserRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + AssociateOrganizationUserRequest.builder() + .organizationId("test-organization-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/CreateOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/CreateOrganizationRequestTest.java new file mode 100644 index 00000000000..606201208a6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/CreateOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateOrganizationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateOrganizationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/DeleteOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/DeleteOrganizationRequestTest.java new file mode 100644 index 00000000000..ebb435e454e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/DeleteOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteOrganizationRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationInstanceUsageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationInstanceUsageRequestTest.java new file mode 100644 index 00000000000..fd71d36d5fa --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationInstanceUsageRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationInstanceUsageRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationInstanceUsageRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationInstanceUsageRequest.builder() + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationMemoryUsageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationMemoryUsageRequestTest.java new file mode 100644 index 00000000000..babe1ed2af7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationMemoryUsageRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationMemoryUsageRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationMemoryUsageRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationMemoryUsageRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationRequestTest.java new file mode 100644 index 00000000000..e3adfbf00f4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationUserRolesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationUserRolesRequestTest.java new file mode 100644 index 00000000000..dd5fde08dfa --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/GetOrganizationUserRolesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationUserRolesRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationUserRolesRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationUserRolesRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationAuditorsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationAuditorsRequestTest.java new file mode 100644 index 00000000000..70f35491ed2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationAuditorsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationAuditorsRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationAuditorsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationAuditorsRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationBillingManagersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationBillingManagersRequestTest.java new file mode 100644 index 00000000000..c811386e70a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationBillingManagersRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationBillingManagersRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationBillingManagersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationBillingManagersRequest.builder() + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationDomainsRequestTest.java new file mode 100644 index 00000000000..683faf68fd9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationDomainsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationDomainsRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationDomainsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationDomainsRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationManagersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationManagersRequestTest.java new file mode 100644 index 00000000000..7378bab7c6a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationManagersRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationManagersRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationManagersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationManagersRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationPrivateDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationPrivateDomainsRequestTest.java new file mode 100644 index 00000000000..d0d2f757206 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationPrivateDomainsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationPrivateDomainsRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationPrivateDomainsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationPrivateDomainsRequest.builder() + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationServicesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationServicesRequestTest.java new file mode 100644 index 00000000000..ce2e240ff78 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationServicesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationServicesRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationServicesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationServicesRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationSpaceQuotaDefinitionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationSpaceQuotaDefinitionsRequestTest.java new file mode 100644 index 00000000000..cb512c43673 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationSpaceQuotaDefinitionsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationSpaceQuotaDefinitionsRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationSpaceQuotaDefinitionsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationSpacesRequestTest.java new file mode 100644 index 00000000000..d406499507f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationSpacesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationSpacesRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationSpacesRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationUsersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationUsersRequestTest.java new file mode 100644 index 00000000000..7830c40b252 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationUsersRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationUsersRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationUsersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationUsersRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationsRequestTest.java new file mode 100644 index 00000000000..f791761a189 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/ListOrganizationsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationsRequestTest { + + @Test + void valid() { + ListOrganizationsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationAuditorByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationAuditorByUsernameRequestTest.java new file mode 100644 index 00000000000..bef8ab1422b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationAuditorByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationAuditorByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationAuditorByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationAuditorByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationAuditorByUsernameRequest.builder() + .username("test-username") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationAuditorRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationAuditorRequestTest.java new file mode 100644 index 00000000000..ff079221087 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationAuditorRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationAuditorRequestTest { + + @Test + void noAuditorId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationAuditorRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationAuditorRequest.builder().auditorId("test-auditor-id").build(); + }); + } + + @Test + void valid() { + RemoveOrganizationAuditorRequest.builder() + .auditorId("test-auditor-id") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationBillingManagerByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationBillingManagerByUsernameRequestTest.java new file mode 100644 index 00000000000..ae9c64c265b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationBillingManagerByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationBillingManagerByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationBillingManagerByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationBillingManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationBillingManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationBillingManagerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationBillingManagerRequestTest.java new file mode 100644 index 00000000000..a114dac5226 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationBillingManagerRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationBillingManagerRequestTest { + + @Test + void noBillingManagerId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationBillingManagerRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationBillingManagerRequest.builder() + .billingManagerId("test-billing-manager-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationBillingManagerRequest.builder() + .billingManagerId("test-billing-manager-id") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationManagerByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationManagerByUsernameRequestTest.java new file mode 100644 index 00000000000..6b670d7d8ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationManagerByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationManagerByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationManagerByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationManagerByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationManagerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationManagerRequestTest.java new file mode 100644 index 00000000000..cbc6c9086ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationManagerRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationManagerRequestTest { + + @Test + void noManagerId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationManagerRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationManagerRequest.builder().managerId("test-manager-id").build(); + }); + } + + @Test + void valid() { + RemoveOrganizationManagerRequest.builder() + .managerId("test-manager-id") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationPrivateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationPrivateDomainRequestTest.java new file mode 100644 index 00000000000..882f6a477ba --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationPrivateDomainRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationPrivateDomainRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationPrivateDomainRequest.builder() + .privateDomainId("test-private-domain-id") + .build(); + }); + } + + @Test + void noPrivateDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationPrivateDomainRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationPrivateDomainRequest.builder() + .organizationId("test-organization-id") + .privateDomainId("test-private-domain-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationUserByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationUserByUsernameRequestTest.java new file mode 100644 index 00000000000..2bba7bd692a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationUserByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationUserByUsernameRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationUserByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationUserByUsernameRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationUserByUsernameRequest.builder() + .organizationId("test-organization-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationUserRequestTest.java new file mode 100644 index 00000000000..6fc22c80473 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/RemoveOrganizationUserRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveOrganizationUserRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationUserRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveOrganizationUserRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void valid() { + RemoveOrganizationUserRequest.builder() + .organizationId("test-organization-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/SummaryOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/SummaryOrganizationRequestTest.java new file mode 100644 index 00000000000..7327526b3a8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/SummaryOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SummaryOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + SummaryOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + SummaryOrganizationRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/UpdateOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/UpdateOrganizationRequestTest.java new file mode 100644 index 00000000000..0f6b061911a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/organizations/UpdateOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateOrganizationRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/CreatePrivateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/CreatePrivateDomainRequestTest.java new file mode 100644 index 00000000000..3a6512c7c7d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/CreatePrivateDomainRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreatePrivateDomainRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreatePrivateDomainRequest.builder() + .owningOrganizationId("test-owning-organization-id") + .build(); + }); + } + + @Test + void noOwningOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreatePrivateDomainRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + CreatePrivateDomainRequest.builder() + .name("test-name") + .owningOrganizationId("test-owning-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/DeletePrivateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/DeletePrivateDomainRequestTest.java new file mode 100644 index 00000000000..6f7729e90d2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/DeletePrivateDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeletePrivateDomainRequestTest { + + @Test + void noPrivateDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + DeletePrivateDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + DeletePrivateDomainRequest.builder().privateDomainId("test-private-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/GetPrivateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/GetPrivateDomainRequestTest.java new file mode 100644 index 00000000000..5e177b784d6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/GetPrivateDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetPrivateDomainRequestTest { + + @Test + void noPrivateDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + GetPrivateDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + GetPrivateDomainRequest.builder().privateDomainId("test-private-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/ListPrivateDomainSharedOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/ListPrivateDomainSharedOrganizationsRequestTest.java new file mode 100644 index 00000000000..0146b71b6f0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/ListPrivateDomainSharedOrganizationsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListPrivateDomainSharedOrganizationsRequestTest { + + @Test + void noPrivateDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + ListPrivateDomainSharedOrganizationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListPrivateDomainSharedOrganizationsRequest.builder() + .privateDomainId("test-privatedomain-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/ListPrivateDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/ListPrivateDomainsRequestTest.java new file mode 100644 index 00000000000..e023944bbe4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/privatedomains/ListPrivateDomainsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.privatedomains; + +import org.junit.jupiter.api.Test; + +final class ListPrivateDomainsRequestTest { + + @Test + void valid() { + ListPrivateDomainsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/CreateRouteMappingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/CreateRouteMappingRequestTest.java new file mode 100644 index 00000000000..0ccb0e3d07d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/CreateRouteMappingRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateRouteMappingRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteMappingRequest.builder().routeId("route-id").build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteMappingRequest.builder().applicationId("application-id").build(); + }); + } + + @Test + void valid() { + CreateRouteMappingRequest.builder() + .applicationId("application-id") + .routeId("route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/DeleteRouteMappingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/DeleteRouteMappingRequestTest.java new file mode 100644 index 00000000000..d63635a8ac6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/DeleteRouteMappingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteRouteMappingRequestTest { + + @Test + void noRouteMappingId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteRouteMappingRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteRouteMappingRequest.builder().routeMappingId("route-mapping-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/GetRouteMappingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/GetRouteMappingRequestTest.java new file mode 100644 index 00000000000..5a6f689f591 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/GetRouteMappingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetRouteMappingRequestTest { + + @Test + void noRouteMappingId() { + assertThrows( + IllegalStateException.class, + () -> { + GetRouteMappingRequest.builder().build(); + }); + } + + @Test + void valid() { + GetRouteMappingRequest.builder().routeMappingId("route-mapping-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/ListRouteMappingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/ListRouteMappingsRequestTest.java new file mode 100644 index 00000000000..8dcf551d047 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routemappings/ListRouteMappingsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routemappings; + +import org.junit.jupiter.api.Test; + +final class ListRouteMappingsRequestTest { + + @Test + void valid() { + ListRouteMappingsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/AssociateRouteApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/AssociateRouteApplicationRequestTest.java new file mode 100644 index 00000000000..88748e7db34 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/AssociateRouteApplicationRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateRouteApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateRouteApplicationRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateRouteApplicationRequest.builder().applicationId("test-app-id").build(); + }); + } + + @Test + void valid() { + AssociateRouteApplicationRequest.builder() + .applicationId("test-app-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/CreateRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/CreateRouteRequestTest.java new file mode 100644 index 00000000000..1fbc2ecfe87 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/CreateRouteRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateRouteRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder().domainId("test-domain-id").build(); + }); + } + + @Test + void valid() { + CreateRouteRequest.builder().domainId("test-domain-id").spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/DeleteRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/DeleteRouteRequestTest.java new file mode 100644 index 00000000000..63d50c2b4cb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/DeleteRouteRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteRouteRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/GetRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/GetRouteRequestTest.java new file mode 100644 index 00000000000..ba02a7f55e7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/GetRouteRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + GetRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + GetRouteRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRouteApplicationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRouteApplicationsRequestTest.java new file mode 100644 index 00000000000..ae46cbb33c1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRouteApplicationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListRouteApplicationsRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + ListRouteApplicationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListRouteApplicationsRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRouteMappingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRouteMappingsRequestTest.java new file mode 100644 index 00000000000..513ab6221a5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRouteMappingsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListRouteMappingsRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + ListRouteMappingsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListRouteMappingsRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRoutesRequestTest.java new file mode 100644 index 00000000000..8ee1503d76f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/ListRoutesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import org.junit.jupiter.api.Test; + +final class ListRoutesRequestTest { + + @Test + void valid() { + ListRoutesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/RemoveRouteApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/RemoveRouteApplicationRequestTest.java new file mode 100644 index 00000000000..91daa76f681 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/RemoveRouteApplicationRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveRouteApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveRouteApplicationRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveRouteApplicationRequest.builder().applicationId("test-app-id").build(); + }); + } + + @Test + void valid() { + RemoveRouteApplicationRequest.builder() + .applicationId("test-app-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/RouteExistsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/RouteExistsRequestTest.java new file mode 100644 index 00000000000..0a55c965566 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/RouteExistsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RouteExistsRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + RouteExistsRequest.builder().build(); + }); + } + + @Test + void valid() { + RouteExistsRequest.builder().domainId("test-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/UpdateRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/UpdateRouteRequestTest.java new file mode 100644 index 00000000000..6a21d8160ac --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/routes/UpdateRouteRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateRouteRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/AssociateSecurityGroupSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/AssociateSecurityGroupSpaceRequestTest.java new file mode 100644 index 00000000000..eb3dafdf31f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/AssociateSecurityGroupSpaceRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSecurityGroupSpaceRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSecurityGroupSpaceRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSecurityGroupSpaceRequest.builder() + .securityGroupId("test-security-group-id") + .build(); + }); + } + + @Test + void valid() { + AssociateSecurityGroupSpaceRequest.builder() + .securityGroupId("test-security-group-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/CreateSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/CreateSecurityGroupRequestTest.java new file mode 100644 index 00000000000..9ce9d97be82 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/CreateSecurityGroupRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class CreateSecurityGroupRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSecurityGroupRequest.builder() + .rule(RuleEntity.builder().build()) + .spaceId("test-space-id") + .build(); + }); + } + + @Test + void validMax() { + CreateSecurityGroupRequest.builder() + .name("test-security-group-name") + .rule(RuleEntity.builder().build()) + .spaceId("test-space-id") + .build(); + } + + @Test + void validMin() { + CreateSecurityGroupRequest.builder().name("test-security-group-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/DeleteSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/DeleteSecurityGroupRequestTest.java new file mode 100644 index 00000000000..b56fa8ab8a0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/DeleteSecurityGroupRequestTest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteSecurityGroupRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSecurityGroupRequest.builder().async(true).build(); + }); + } + + @Test + void validMax() { + DeleteSecurityGroupRequest.builder() + .securityGroupId("test-security-group-id") + .async(true) + .build(); + } + + @Test + void validMin() { + DeleteSecurityGroupRequest.builder().securityGroupId("test-security-group-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/GetSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/GetSecurityGroupRequestTest.java new file mode 100644 index 00000000000..74342cbe204 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/GetSecurityGroupRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class GetSecurityGroupRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSecurityGroupRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSecurityGroupRequest.builder().securityGroupId("test-security-group-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupRunningDefaultsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupRunningDefaultsRequestTest.java new file mode 100644 index 00000000000..f178dc3cd62 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupRunningDefaultsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.junit.jupiter.api.Test; + +final class ListSecurityGroupRunningDefaultsRequestTest { + + @Test + void valid() { + ListSecurityGroupRunningDefaultsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupSpacesRequestTest.java new file mode 100644 index 00000000000..485783f6e3d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupSpacesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSecurityGroupSpacesRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSecurityGroupSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSecurityGroupSpacesRequest.builder().securityGroupId("test-security-group-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupStagingDefaultsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupStagingDefaultsRequestTest.java new file mode 100644 index 00000000000..af060d20926 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupStagingDefaultsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.junit.jupiter.api.Test; + +final class ListSecurityGroupStagingDefaultsRequestTest { + + @Test + void valid() { + ListSecurityGroupStagingDefaultsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupsRequestTest.java new file mode 100644 index 00000000000..f359244c730 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/ListSecurityGroupsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import org.junit.jupiter.api.Test; + +final class ListSecurityGroupsRequestTest { + + @Test + void valid() { + ListSecurityGroupsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupRunningDefaultRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupRunningDefaultRequestTest.java new file mode 100644 index 00000000000..c00653120d2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupRunningDefaultRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSecurityGroupRunningDefaultRequestTest { + + @Test + void noSecurityGroupRunningDefaultId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSecurityGroupRunningDefaultRequest.builder().build(); + }); + } + + @Test + void valid() { + RemoveSecurityGroupRunningDefaultRequest.builder() + .securityGroupId("test-security-group-default-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupSpaceRequestTest.java new file mode 100644 index 00000000000..34a62bd5f86 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupSpaceRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSecurityGroupSpaceRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSecurityGroupSpaceRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSecurityGroupSpaceRequest.builder() + .securityGroupId("test-security-group-id") + .build(); + }); + } + + @Test + void valid() { + RemoveSecurityGroupSpaceRequest.builder() + .securityGroupId("test-security-group-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupStagingDefaultRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupStagingDefaultRequestTest.java new file mode 100644 index 00000000000..fd7bc5fcc22 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/RemoveSecurityGroupStagingDefaultRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSecurityGroupStagingDefaultRequestTest { + + @Test + void noSecurityGroupStagingDefaultId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSecurityGroupStagingDefaultRequest.builder().build(); + }); + } + + @Test + void valid() { + RemoveSecurityGroupStagingDefaultRequest.builder() + .securityGroupId("test-security-group-default-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/SetSecurityGroupRunningDefaultRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/SetSecurityGroupRunningDefaultRequestTest.java new file mode 100644 index 00000000000..8039cb0ac79 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/SetSecurityGroupRunningDefaultRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetSecurityGroupRunningDefaultRequestTest { + + @Test + void noSecurityGroupRunningDefaultId() { + assertThrows( + IllegalStateException.class, + () -> { + SetSecurityGroupRunningDefaultRequest.builder().build(); + }); + } + + @Test + void valid() { + SetSecurityGroupRunningDefaultRequest.builder() + .securityGroupId("test-security-group-default-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/SetSecurityGroupStagingDefaultRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/SetSecurityGroupStagingDefaultRequestTest.java new file mode 100644 index 00000000000..92c5d21e4ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/SetSecurityGroupStagingDefaultRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetSecurityGroupStagingDefaultRequestTest { + + @Test + void noSecurityGroupStagingDefaultId() { + assertThrows( + IllegalStateException.class, + () -> { + SetSecurityGroupStagingDefaultRequest.builder().build(); + }); + } + + @Test + void valid() { + SetSecurityGroupStagingDefaultRequest.builder() + .securityGroupId("test-security-group-default-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/UpdateSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/UpdateSecurityGroupRequestTest.java new file mode 100644 index 00000000000..314524835c1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/securitygroups/UpdateSecurityGroupRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UpdateSecurityGroupRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateSecurityGroupRequest.builder() + .name("test-security-group-name") + .rule(RuleEntity.builder().build()) + .spaceId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + UpdateSecurityGroupRequest.builder() + .name("test-security-group-name") + .rule(RuleEntity.builder().build()) + .securityGroupId("test-security-group-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/CreateServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/CreateServiceBindingRequestTest.java new file mode 100644 index 00000000000..82bcda07f72 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/CreateServiceBindingRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceBindingRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBindingRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + }); + } + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBindingRequest.builder().applicationId("app-id").build(); + }); + } + + @Test + void valid() { + CreateServiceBindingRequest.builder() + .applicationId("app-id") + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/DeleteServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/DeleteServiceBindingRequestTest.java new file mode 100644 index 00000000000..5ff67177fcf --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/DeleteServiceBindingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceBindingRequestTest { + + @Test + void noServiceBindingId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceBindingRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceBindingRequest.builder().serviceBindingId("test-service-binding-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/GetServiceBindingParametersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/GetServiceBindingParametersRequestTest.java new file mode 100644 index 00000000000..d88fb8f3850 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/GetServiceBindingParametersRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceBindingParametersRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceBindingParametersRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceBindingParametersRequest.builder() + .serviceBindingId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/GetServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/GetServiceBindingRequestTest.java new file mode 100644 index 00000000000..7e8b0c8f0f6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/GetServiceBindingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceBindingRequestTest { + + @Test + void noServiceBindingId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceBindingRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceBindingRequest.builder().serviceBindingId("test-service-binding-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/ListServiceBindingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/ListServiceBindingsRequestTest.java new file mode 100644 index 00000000000..5de3bad21d4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebindings/ListServiceBindingsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebindings; + +import org.junit.jupiter.api.Test; + +final class ListServiceBindingsRequestTest { + + @Test + void valid() { + ListServiceBindingsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/CreateServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/CreateServiceBrokerRequestTest.java new file mode 100644 index 00000000000..9ac37b8d99c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/CreateServiceBrokerRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceBrokerRequestTest { + + @Test + void noAuthenticationPassword() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("name") + .authenticationUsername("username") + .brokerUrl("http://somewhere-over-the-rainbow.org") + .build(); + }); + } + + @Test + void noAuthenticationUsername() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("name") + .authenticationPassword("password") + .brokerUrl("http://somewhere-over-the-rainbow.org") + .build(); + }); + } + + @Test + void noBrokerUrl() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("name") + .authenticationPassword("password") + .authenticationUsername("username") + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .authenticationPassword("password") + .authenticationUsername("username") + .brokerUrl("http://somewhere-over-the-rainbow.org") + .build(); + }); + } + + @Test + void valid() { + CreateServiceBrokerRequest.builder() + .name("name") + .authenticationPassword("password") + .authenticationUsername("username") + .brokerUrl("http://somewhere-over-the-rainbow.org") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/DeleteServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/DeleteServiceBrokerRequestTest.java new file mode 100644 index 00000000000..ddd65ec5897 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/DeleteServiceBrokerRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceBrokerRequestTest { + + @Test + void noServiceBrokerId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceBrokerRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceBrokerRequest.builder().serviceBrokerId("test-service-broker-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/GetServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/GetServiceBrokerRequestTest.java new file mode 100644 index 00000000000..f5f468fab08 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/GetServiceBrokerRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceBrokerRequestTest { + + @Test + void noServiceBrokerId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceBrokerRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceBrokerRequest.builder().serviceBrokerId("test-service-broker-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/ListServiceBrokersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/ListServiceBrokersRequestTest.java new file mode 100644 index 00000000000..b30f7bcde06 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/ListServiceBrokersRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import org.junit.jupiter.api.Test; + +final class ListServiceBrokersRequestTest { + + @Test + void valid() { + ListServiceBrokersRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/UpdateServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/UpdateServiceBrokerRequestTest.java new file mode 100644 index 00000000000..48f21adab62 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicebrokers/UpdateServiceBrokerRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServiceBrokerRequestTest { + + @Test + void noServiceBrokerId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceBrokerRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateServiceBrokerRequest.builder().serviceBrokerId("test-service-broker-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/BindServiceInstanceRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/BindServiceInstanceRouteRequestTest.java new file mode 100644 index 00000000000..c197144da83 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/BindServiceInstanceRouteRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BindServiceInstanceRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + BindServiceInstanceRouteRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + }); + } + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + BindServiceInstanceRouteRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void valid() { + BindServiceInstanceRouteRequest.builder() + .serviceInstanceId("test-service-instance-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/CreateServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/CreateServiceInstanceRequestTest.java new file mode 100644 index 00000000000..dba9d3f0b48 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/CreateServiceInstanceRequestTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceInstanceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder() + .servicePlanId("service-plan-id") + .spaceId("space-id") + .build(); + }); + } + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder().name("name").spaceId("space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder() + .name("name") + .servicePlanId("service-plan-id") + .build(); + }); + } + + @Test + void valid() { + CreateServiceInstanceRequest.builder() + .name("name") + .servicePlanId("service-plan-id") + .spaceId("space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/DeleteServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/DeleteServiceInstanceRequestTest.java new file mode 100644 index 00000000000..c6b6292b057 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/DeleteServiceInstanceRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceInstanceRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstanceParametersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstanceParametersRequestTest.java new file mode 100644 index 00000000000..18f83a12073 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstanceParametersRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceInstanceParametersRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceInstanceParametersRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceInstanceParametersRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstancePermissionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstancePermissionsRequestTest.java new file mode 100644 index 00000000000..89d068da84b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstancePermissionsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceInstancePermissionsRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceInstancePermissionsRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceInstancePermissionsRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstanceRequestTest.java new file mode 100644 index 00000000000..16333855b69 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/GetServiceInstanceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceInstanceRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceInstanceRequest.builder().serviceInstanceId("test-service-instance-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceRoutesRequestTest.java new file mode 100644 index 00000000000..b9aade264cd --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceRoutesRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListServiceInstanceRoutesRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListServiceInstanceRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListServiceInstanceRoutesRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceServiceBindingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceServiceBindingsRequestTest.java new file mode 100644 index 00000000000..fdbf2273fcf --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceServiceBindingsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListServiceInstanceServiceBindingsRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListServiceInstanceServiceBindingsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListServiceInstanceServiceBindingsRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceServiceKeysRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceServiceKeysRequestTest.java new file mode 100644 index 00000000000..9d1b0e59b53 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstanceServiceKeysRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListServiceInstanceServiceKeysRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListServiceInstanceServiceBindingsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListServiceInstanceServiceKeysRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstancesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstancesRequestTest.java new file mode 100644 index 00000000000..39be651b5b4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/ListServiceInstancesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import org.junit.jupiter.api.Test; + +final class ListServiceInstancesRequestTest { + + @Test + void valid() { + ListServiceInstancesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/UnbindServiceInstanceRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/UnbindServiceInstanceRouteRequestTest.java new file mode 100644 index 00000000000..a8b6f06494e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/UnbindServiceInstanceRouteRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnbindServiceInstanceRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindServiceInstanceRouteRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + }); + } + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindServiceInstanceRouteRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void valid() { + UnbindServiceInstanceRouteRequest.builder() + .serviceInstanceId("test-service-instance-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/UpdateServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/UpdateServiceInstanceRequestTest.java new file mode 100644 index 00000000000..40bef084792 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceinstances/UpdateServiceInstanceRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServiceInstanceRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/CreateServiceKeyRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/CreateServiceKeyRequestTest.java new file mode 100644 index 00000000000..390d2118a95 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/CreateServiceKeyRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceKeyRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceKeyRequest.builder() + .serviceInstanceId("service-instance-id") + .build(); + }); + } + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceKeyRequest.builder().name("name").build(); + }); + } + + @Test + void valid() { + CreateServiceKeyRequest.builder() + .name("name") + .serviceInstanceId("service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/DeleteServiceKeyRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/DeleteServiceKeyRequestTest.java new file mode 100644 index 00000000000..f7ce2051226 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/DeleteServiceKeyRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceKeyRequestTest { + + @Test + void noServiceKeyId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceKeyRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceKeyRequest.builder().serviceKeyId("test-service-key-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/GetServiceKeyRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/GetServiceKeyRequestTest.java new file mode 100644 index 00000000000..131c7a6dcc3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/GetServiceKeyRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceKeyRequestTest { + + @Test + void noServiceKeyId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceKeyRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceKeyRequest.builder().serviceKeyId("test-service-key-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/ListServiceKeysRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/ListServiceKeysRequestTest.java new file mode 100644 index 00000000000..37707d54619 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/servicekeys/ListServiceKeysRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.servicekeys; + +import org.junit.jupiter.api.Test; + +final class ListServiceKeysRequestTest { + + @Test + void valid() { + ListServiceKeysRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/DeleteServicePlanRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/DeleteServicePlanRequestTest.java new file mode 100644 index 00000000000..dc6aba9c647 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/DeleteServicePlanRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServicePlanRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServicePlanRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServicePlanRequest.builder().servicePlanId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/GetServicePlanRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/GetServicePlanRequestTest.java new file mode 100644 index 00000000000..6f2b2965e77 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/GetServicePlanRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServicePlanRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServicePlanRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServicePlanRequest.builder().servicePlanId("test-service-plan-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/ListServicePlanServiceInstancesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/ListServicePlanServiceInstancesRequestTest.java new file mode 100644 index 00000000000..c50bf9be5b8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/ListServicePlanServiceInstancesRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListServicePlanServiceInstancesRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + ListServicePlanServiceInstancesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListServicePlanServiceInstancesRequest.builder() + .servicePlanId("test-service-plan-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/ListServicePlansRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/ListServicePlansRequestTest.java new file mode 100644 index 00000000000..64bd98c4605 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/ListServicePlansRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import org.junit.jupiter.api.Test; + +final class ListServicePlansRequestTest { + + @Test + void valid() { + ListServicePlansRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/UpdateServicePlanRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/UpdateServicePlanRequestTest.java new file mode 100644 index 00000000000..7b609a6cdd9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplans/UpdateServicePlanRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServicePlanRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServicePlanRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateServicePlanRequest.builder().servicePlanId("test-service-plan-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/CreateServicePlanVisibilityRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/CreateServicePlanVisibilityRequestTest.java new file mode 100644 index 00000000000..bb5616831d8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/CreateServicePlanVisibilityRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServicePlanVisibilityRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServicePlanVisibilityRequest.builder() + .servicePlanId("service-plan-id") + .build(); + }); + } + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServicePlanVisibilityRequest.builder() + .organizationId("organization-id") + .build(); + }); + } + + @Test + void valid() { + CreateServicePlanVisibilityRequest.builder() + .organizationId("organization-id") + .servicePlanId("service-plan-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/DeleteServicePlanVisibilityRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/DeleteServicePlanVisibilityRequestTest.java new file mode 100644 index 00000000000..7a2f04eea1d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/DeleteServicePlanVisibilityRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServicePlanVisibilityRequestTest { + + @Test + void noServicePlanVisibilityId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServicePlanVisibilityRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServicePlanVisibilityRequest.builder() + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/GetServicePlanVisibilityRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/GetServicePlanVisibilityRequestTest.java new file mode 100644 index 00000000000..3aff415908a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/GetServicePlanVisibilityRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServicePlanVisibilityRequestTest { + + @Test + void noServicePlanVisibilityId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServicePlanVisibilityRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServicePlanVisibilityRequest.builder() + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/ListServicePlanVisibilitiesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/ListServicePlanVisibilitiesRequestTest.java new file mode 100644 index 00000000000..f2a9cd3137d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/ListServicePlanVisibilitiesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import org.junit.jupiter.api.Test; + +final class ListServicePlanVisibilitiesRequestTest { + + @Test + void valid() { + ListServicePlanVisibilitiesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/UpdateServicePlanVisibilityRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/UpdateServicePlanVisibilityRequestTest.java new file mode 100644 index 00000000000..991e0b2d5cc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceplanvisibilities/UpdateServicePlanVisibilityRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceplanvisibilities; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServicePlanVisibilityRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServicePlanVisibilityRequest.builder() + .servicePlanId("service-plan-id") + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build(); + }); + } + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServicePlanVisibilityRequest.builder() + .organizationId("organization-id") + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build(); + }); + } + + @Test + void noServicePlanVisibilityId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServicePlanVisibilityRequest.builder() + .organizationId("organization-id") + .servicePlanId("service-plan-id") + .build(); + }); + } + + @Test + void valid() { + UpdateServicePlanVisibilityRequest.builder() + .organizationId("organization-id") + .servicePlanId("service-plan-id") + .servicePlanVisibilityId("test-service-plan-visibility-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/DeleteServiceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/DeleteServiceRequestTest.java new file mode 100644 index 00000000000..36fc2611de4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/DeleteServiceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceRequestTest { + + @Test + void noServiceId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceRequest.builder().serviceId("test-service-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/GetServiceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/GetServiceRequestTest.java new file mode 100644 index 00000000000..f482cad30a3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/GetServiceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceRequestTest { + + @Test + void noServiceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceRequest.builder().serviceId("test-service-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/ListServiceServicePlansRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/ListServiceServicePlansRequestTest.java new file mode 100644 index 00000000000..6bef9e71f55 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/ListServiceServicePlansRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListServiceServicePlansRequestTest { + + @Test + void noServiceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListServiceServicePlansRequest.builder().build(); + }); + } + + @Test + void valid() { + ListServiceServicePlansRequest.builder().serviceId("test-service-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/ListServicesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/ListServicesRequestTest.java new file mode 100644 index 00000000000..f45b3e02a94 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/services/ListServicesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.services; + +import org.junit.jupiter.api.Test; + +final class ListServicesRequestTest { + + @Test + void valid() { + ListServicesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/GetServiceUsageEventRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/GetServiceUsageEventRequestTest.java new file mode 100644 index 00000000000..d9814893902 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/GetServiceUsageEventRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceUsageEventRequestTest { + + @Test + void noServiceUsageEventId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceUsageEventRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceUsageEventRequest.builder() + .serviceUsageEventId("test-service-usage-event-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/ListServiceUsageEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/ListServiceUsageEventsRequestTest.java new file mode 100644 index 00000000000..93e872c65d8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/ListServiceUsageEventsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import org.junit.jupiter.api.Test; + +final class ListServiceUsageEventsRequestTest { + + @Test + void valid() { + ListServiceUsageEventsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/PurgeAndReseedServiceUsageEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/PurgeAndReseedServiceUsageEventsRequestTest.java new file mode 100644 index 00000000000..c9cdef4a1a1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/serviceusageevents/PurgeAndReseedServiceUsageEventsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.serviceusageevents; + +import org.junit.jupiter.api.Test; + +final class PurgeAndReseedServiceUsageEventsRequestTest { + + @Test + void valid() { + PurgeAndReseedServiceUsageEventsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/CreateSharedDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/CreateSharedDomainRequestTest.java new file mode 100644 index 00000000000..c3ea8d08b9f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/CreateSharedDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateSharedDomainRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSharedDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateSharedDomainRequest.builder().name("test-test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/DeleteSharedDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/DeleteSharedDomainRequestTest.java new file mode 100644 index 00000000000..0e6af6ed0f9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/DeleteSharedDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteSharedDomainRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSharedDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteSharedDomainRequest.builder().sharedDomainId("test-shared-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/GetSharedDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/GetSharedDomainRequestTest.java new file mode 100644 index 00000000000..8ff92993174 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/GetSharedDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSharedDomainRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSharedDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSharedDomainRequest.builder().sharedDomainId("test-shared-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/ListSharedDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/ListSharedDomainsRequestTest.java new file mode 100644 index 00000000000..d49885c0a59 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/shareddomains/ListSharedDomainsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.shareddomains; + +import org.junit.jupiter.api.Test; + +final class ListSharedDomainsRequestTest { + + @Test + void valid() { + ListSharedDomainsRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/AssociateSpaceQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/AssociateSpaceQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..cf41899c990 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/AssociateSpaceQuotaDefinitionRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceQuotaDefinitionRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + }); + } + + @Test + void noSpaceQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceQuotaDefinitionRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + AssociateSpaceQuotaDefinitionRequest.builder() + .spaceId("test-space-id") + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/CreateSpaceQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/CreateSpaceQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..f72b7b5d6b6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/CreateSpaceQuotaDefinitionRequestTest.java @@ -0,0 +1,126 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateSpaceQuotaDefinitionRequestTest { + + @Test + void noMemoryLimit() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceQuotaDefinitionRequest.builder() + .name("test-space-quota-definition-name") + .nonBasicServicesAllowed(true) + .organizationId("test-organization-id") + .totalRoutes(1) + .totalServices(1) + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(100) + .nonBasicServicesAllowed(true) + .organizationId("test-organization-id") + .totalRoutes(1) + .totalServices(1) + .build(); + }); + } + + @Test + void noNonBasicServicesAllowed() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(100) + .name("test-space-quota-definition-name") + .organizationId("test-organization-id") + .totalRoutes(1) + .totalServices(1) + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(100) + .name("test-space-quota-definition-name") + .nonBasicServicesAllowed(true) + .totalRoutes(1) + .totalServices(1) + .build(); + }); + } + + @Test + void noTotalRoutes() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(100) + .name("test-space-quota-definition-name") + .nonBasicServicesAllowed(true) + .organizationId("test-organization-id") + .totalServices(1) + .build(); + }); + } + + @Test + void noTotalServices() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(100) + .name("test-space-quota-definition-name") + .nonBasicServicesAllowed(true) + .organizationId("test-organization-id") + .totalRoutes(1) + .build(); + }); + } + + @Test + void valid() { + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(100) + .name("test-space-quota-definition-name") + .nonBasicServicesAllowed(true) + .organizationId("test-organization-id") + .totalRoutes(1) + .totalServices(1) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/DeleteSpaceQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/DeleteSpaceQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..e7605cda46d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/DeleteSpaceQuotaDefinitionRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteSpaceQuotaDefinitionRequestTest { + + @Test + void noSpaceQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSpaceQuotaDefinitionRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/GetSpaceQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/GetSpaceQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..258f31d481a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/GetSpaceQuotaDefinitionRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceQuotaDefinitionRequestTest { + + @Test + void noSpaceQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSpaceQuotaDefinitionRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/ListSpaceQuotaDefinitionSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/ListSpaceQuotaDefinitionSpacesRequestTest.java new file mode 100644 index 00000000000..3db3e6e982c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/ListSpaceQuotaDefinitionSpacesRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceQuotaDefinitionSpacesRequestTest { + + @Test + void noSpaceQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceQuotaDefinitionSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceQuotaDefinitionSpacesRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/ListSpaceQuotaDefinitionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/ListSpaceQuotaDefinitionsRequestTest.java new file mode 100644 index 00000000000..4cff4f0b88c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/ListSpaceQuotaDefinitionsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import org.junit.jupiter.api.Test; + +final class ListSpaceQuotaDefinitionsRequestTest { + + @Test + void valid() { + ListSpaceQuotaDefinitionsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/RemoveSpaceQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/RemoveSpaceQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..f4ec4643aac --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/RemoveSpaceQuotaDefinitionRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceQuotaDefinitionRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + }); + } + + @Test + void noSpaceQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceQuotaDefinitionRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveSpaceQuotaDefinitionRequest.builder() + .spaceId("test-space-id") + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/UpdateSpaceQuotaDefinitionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/UpdateSpaceQuotaDefinitionRequestTest.java new file mode 100644 index 00000000000..0b860edc49f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spacequotadefinitions/UpdateSpaceQuotaDefinitionRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spacequotadefinitions; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateSpaceQuotaDefinitionRequestTest { + + @Test + void noSpaceQuotaDefinitionId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateSpaceQuotaDefinitionRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId("test-space-quota-definition-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceAuditorByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceAuditorByUsernameRequestTest.java new file mode 100644 index 00000000000..f9825c7e498 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceAuditorByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceAuditorByUsernameRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceAuditorByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceAuditorByUsernameRequest.builder() + .spaceId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateSpaceAuditorByUsernameRequest.builder() + .spaceId("test-space-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceAuditorRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceAuditorRequestTest.java new file mode 100644 index 00000000000..35471eec91d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceAuditorRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceAuditorRequestTest { + + @Test + void noAuditorId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceAuditorRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceAuditorRequest.builder().auditorId("test-auditor-id").build(); + }); + } + + @Test + void valid() { + AssociateSpaceAuditorRequest.builder() + .auditorId("test-auditor-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceDeveloperByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceDeveloperByUsernameRequestTest.java new file mode 100644 index 00000000000..81b01d3f6eb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceDeveloperByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceDeveloperByUsernameRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceDeveloperByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceDeveloperByUsernameRequest.builder() + .spaceId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateSpaceDeveloperByUsernameRequest.builder() + .spaceId("test-space-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceDeveloperRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceDeveloperRequestTest.java new file mode 100644 index 00000000000..e9e145d9e73 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceDeveloperRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceDeveloperRequestTest { + + @Test + void noDeveloperId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceDeveloperRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceDeveloperRequest.builder() + .developerId("test-developer-id") + .build(); + }); + } + + @Test + void valid() { + AssociateSpaceDeveloperRequest.builder() + .developerId("test-developer-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceManagerByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceManagerByUsernameRequestTest.java new file mode 100644 index 00000000000..8cb5e641990 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceManagerByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceManagerByUsernameRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceManagerByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId("test-space-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceManagerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceManagerRequestTest.java new file mode 100644 index 00000000000..743bb785f80 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceManagerRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceManagerRequestTest { + + @Test + void noManagerId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceManagerRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceManagerRequest.builder().managerId("test-manager-id").build(); + }); + } + + @Test + void valid() { + AssociateSpaceManagerRequest.builder() + .managerId("test-manager-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceSecurityGroupRequestTest.java new file mode 100644 index 00000000000..d20f3f21d88 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/AssociateSpaceSecurityGroupRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateSpaceSecurityGroupRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceSecurityGroupRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateSpaceSecurityGroupRequest.builder() + .securityGroupId("test-security-group-id") + .build(); + }); + } + + @Test + void valid() { + AssociateSpaceSecurityGroupRequest.builder() + .securityGroupId("test-security-group-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/CreateSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/CreateSpaceRequestTest.java new file mode 100644 index 00000000000..93d4eb4db48 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/CreateSpaceRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateSpaceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceRequest.builder().organizationId("test-organization-id").build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + CreateSpaceRequest.builder() + .name("test-name") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/DeleteSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/DeleteSpaceRequestTest.java new file mode 100644 index 00000000000..dd9a9ad261c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/DeleteSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteSpaceRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteSpaceRequest.builder().spaceId("space-test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/GetSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/GetSpaceRequestTest.java new file mode 100644 index 00000000000..9006eb4c1dc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/GetSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSpaceRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/GetSpaceSummaryRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/GetSpaceSummaryRequestTest.java new file mode 100644 index 00000000000..afe549dafa2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/GetSpaceSummaryRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceSummaryRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSpaceSummaryRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSpaceSummaryRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceApplicationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceApplicationsRequestTest.java new file mode 100644 index 00000000000..6137ca29561 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceApplicationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceApplicationsRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceApplicationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceApplicationsRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceAuditorsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceAuditorsRequestTest.java new file mode 100644 index 00000000000..a5602392f30 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceAuditorsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceAuditorsRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceAuditorsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceAuditorsRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceDevelopersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceDevelopersRequestTest.java new file mode 100644 index 00000000000..3b9ae1bb7c6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceDevelopersRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceDevelopersRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceDevelopersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceDevelopersRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceDomainsRequestTest.java new file mode 100644 index 00000000000..7bfb2fca328 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceDomainsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceDomainsRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceDomainsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceDomainsRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceEventsRequestTest.java new file mode 100644 index 00000000000..ec24c2e9276 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceEventsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceEventsRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceEventsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceEventsRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceManagersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceManagersRequestTest.java new file mode 100644 index 00000000000..2db92fba0c4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceManagersRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceManagersRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceManagersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceManagersRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceRoutesRequestTest.java new file mode 100644 index 00000000000..9bfe95f3777 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceRoutesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceRoutesRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceRoutesRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceSecurityGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceSecurityGroupsRequestTest.java new file mode 100644 index 00000000000..2ff3d879bab --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceSecurityGroupsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceSecurityGroupsRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceSecurityGroupsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceSecurityGroupsRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceServiceInstancesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceServiceInstancesRequestTest.java new file mode 100644 index 00000000000..5c1e9c49de2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceServiceInstancesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceServiceInstancesRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceServiceInstancesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceServiceInstancesRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceServicesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceServicesRequestTest.java new file mode 100644 index 00000000000..f3994812d51 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceServicesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceServicesRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceServicesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceServicesRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceUserRolesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceUserRolesRequestTest.java new file mode 100644 index 00000000000..531953f0cd4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpaceUserRolesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceUserRolesRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceUserRolesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSpaceUserRolesRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpacesRequestTest.java new file mode 100644 index 00000000000..3d48ca57b80 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/ListSpacesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import org.junit.jupiter.api.Test; + +final class ListSpacesRequestTest { + + @Test + void valid() { + ListSpacesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceAuditorByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceAuditorByUsernameRequestTest.java new file mode 100644 index 00000000000..fa263214b9e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceAuditorByUsernameRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceAuditorByUsernameRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceAuditorByUsernameRequest.builder().username("test-username").build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceAuditorByUsernameRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveSpaceAuditorByUsernameRequest.builder() + .spaceId("test-space-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceAuditorRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceAuditorRequestTest.java new file mode 100644 index 00000000000..68df6faa52a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceAuditorRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceAuditorRequestTest { + + @Test + void noAuditorId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceAuditorRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceAuditorRequest.builder().auditorId("test-auditor-id").build(); + }); + } + + @Test + void valid() { + RemoveSpaceAuditorRequest.builder() + .auditorId("test-auditor-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceDeveloperByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceDeveloperByUsernameRequestTest.java new file mode 100644 index 00000000000..6456412c843 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceDeveloperByUsernameRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceDeveloperByUsernameRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceDeveloperByUsernameRequest.builder() + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceDeveloperByUsernameRequest.builder() + .spaceId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + RemoveSpaceDeveloperByUsernameRequest.builder() + .spaceId("test-space-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceDeveloperRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceDeveloperRequestTest.java new file mode 100644 index 00000000000..d2d4d0190ba --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceDeveloperRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceDeveloperRequestTest { + + @Test + void noDeveloperId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceDeveloperRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceDeveloperRequest.builder().developerId("test-developer-id").build(); + }); + } + + @Test + void valid() { + RemoveSpaceDeveloperRequest.builder() + .developerId("test-developer-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceManagerByUsernameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceManagerByUsernameRequestTest.java new file mode 100644 index 00000000000..42e92a192fc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceManagerByUsernameRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceManagerByUsernameRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceManagerByUsernameRequest.builder().username("test-username").build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceManagerByUsernameRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveSpaceManagerByUsernameRequest.builder() + .spaceId("test-space-id") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceManagerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceManagerRequestTest.java new file mode 100644 index 00000000000..93459f8b278 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceManagerRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceManagerRequestTest { + + @Test + void noManagerId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceManagerRequest.builder().spaceId("test-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceManagerRequest.builder().managerId("test-manager-id").build(); + }); + } + + @Test + void valid() { + RemoveSpaceManagerRequest.builder() + .managerId("test-manager-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceSecurityGroupRequestTest.java new file mode 100644 index 00000000000..4db6a9c135d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/RemoveSpaceSecurityGroupRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceSecurityGroupRequestTest { + + @Test + void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceSecurityGroupRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveSpaceSecurityGroupRequest.builder() + .securityGroupId("test-security-group-id") + .build(); + }); + } + + @Test + void valid() { + RemoveSpaceSecurityGroupRequest.builder() + .securityGroupId("test-security-group-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/UpdateSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/UpdateSpaceRequestTest.java new file mode 100644 index 00000000000..6b8bebbf764 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/spaces/UpdateSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateSpaceRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateSpaceRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/CreateStackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/CreateStackRequestTest.java new file mode 100644 index 00000000000..317ff375c45 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/CreateStackRequestTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateStackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateStackRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateStackRequest.builder() + .description("test-stack-description") + .name("test-stack-name") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/DeleteStackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/DeleteStackRequestTest.java new file mode 100644 index 00000000000..f58750d2562 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/DeleteStackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteStackRequestTest { + + @Test + void noStackId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteStackRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteStackRequest.builder().async(true).stackId("test-stack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/GetStackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/GetStackRequestTest.java new file mode 100644 index 00000000000..2c47ba9a635 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/GetStackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetStackRequestTest { + + @Test + void noStackId() { + assertThrows( + IllegalStateException.class, + () -> { + GetStackRequest.builder().build(); + }); + } + + @Test + void valid() { + GetStackRequest.builder().stackId("test-stack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/ListStacksRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/ListStacksRequestTest.java new file mode 100644 index 00000000000..98ee20c4974 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/stacks/ListStacksRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.stacks; + +import org.junit.jupiter.api.Test; + +final class ListStacksRequestTest { + + @Test + void valid() { + ListStacksRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/AssociateUserProvidedServiceInstanceRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/AssociateUserProvidedServiceInstanceRouteRequestTest.java new file mode 100644 index 00000000000..de93461da52 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/AssociateUserProvidedServiceInstanceRouteRequestTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserProvidedServiceInstanceRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + }); + } + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .routeId("test-route-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .parameter("test-key", "test-value") + .routeId("test-route-id") + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/CreateUserProvidedServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/CreateUserProvidedServiceInstanceRequestTest.java new file mode 100644 index 00000000000..4ee4cf2b63f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/CreateUserProvidedServiceInstanceRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateUserProvidedServiceInstanceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserProvidedServiceInstanceRequest.builder().spaceId("space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserProvidedServiceInstanceRequest.builder().name("name").build(); + }); + } + + @Test + void valid() { + CreateUserProvidedServiceInstanceRequest.builder().name("name").spaceId("space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/DeleteUserProvidedServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/DeleteUserProvidedServiceInstanceRequestTest.java new file mode 100644 index 00000000000..e995ac6e489 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/DeleteUserProvidedServiceInstanceRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteUserProvidedServiceInstanceRequestTest { + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteUserProvidedServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/GetUserProvidedServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/GetUserProvidedServiceInstanceRequestTest.java new file mode 100644 index 00000000000..072903fa268 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/GetUserProvidedServiceInstanceRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetUserProvidedServiceInstanceRequestTest { + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + GetUserProvidedServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + GetUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstanceRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstanceRoutesRequestTest.java new file mode 100644 index 00000000000..c9210e8e99e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstanceRoutesRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserProvidedServiceInstanceRoutesRequestTest { + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserProvidedServiceInstanceRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserProvidedServiceInstanceRoutesRequest.builder() + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstanceServiceBindingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstanceServiceBindingsRequestTest.java new file mode 100644 index 00000000000..869aa2d54d6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstanceServiceBindingsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserProvidedServiceInstanceServiceBindingsRequestTest { + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserProvidedServiceInstanceServiceBindingsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserProvidedServiceInstanceServiceBindingsRequest.builder() + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstancesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstancesRequestTest.java new file mode 100644 index 00000000000..b2621a0d0ad --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/ListUserProvidedServiceInstancesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import org.junit.jupiter.api.Test; + +final class ListUserProvidedServiceInstancesRequestTest { + + @Test + void valid() { + ListUserProvidedServiceInstancesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/RemoveRouteWithUserProvidedServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/RemoveRouteWithUserProvidedServiceInstanceRequestTest.java new file mode 100644 index 00000000000..52db7a3dcaf --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/RemoveRouteWithUserProvidedServiceInstanceRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveRouteWithUserProvidedServiceInstanceRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserProvidedServiceInstanceRouteRequest.builder() + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + }); + } + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserProvidedServiceInstanceRouteRequest.builder() + .routeId("test-route-id") + .build(); + }); + } + + @Test + void valid() { + RemoveUserProvidedServiceInstanceRouteRequest.builder() + .routeId("test-route-id") + .userProvidedServiceInstanceId("test-user-provided-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/UpdateUserProvidedServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/UpdateUserProvidedServiceInstanceRequestTest.java new file mode 100644 index 00000000000..66f532edff2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/userprovidedserviceinstances/UpdateUserProvidedServiceInstanceRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.userprovidedserviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateUserProvidedServiceInstanceRequestTest { + + @Test + void noUserProvidedServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserProvidedServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId("test-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserAuditedOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserAuditedOrganizationRequestTest.java new file mode 100644 index 00000000000..e2b5b90a6cd --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserAuditedOrganizationRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserAuditedOrganizationRequestTest { + + @Test + void noAuditedOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserAuditedOrganizationRequest.builder() + .userId("test-user-id") + .build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserAuditedOrganizationRequest.builder() + .auditedOrganizationId("test-managed-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserAuditedOrganizationRequest.builder() + .auditedOrganizationId("test-managed-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserAuditedSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserAuditedSpaceRequestTest.java new file mode 100644 index 00000000000..e41b002d0ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserAuditedSpaceRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserAuditedSpaceRequestTest { + + @Test + void noAuditedSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserAuditedSpaceRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserAuditedSpaceRequest.builder() + .auditedSpaceId("test-managed-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserAuditedSpaceRequest.builder() + .auditedSpaceId("test-managed-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserBillingManagedOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserBillingManagedOrganizationRequestTest.java new file mode 100644 index 00000000000..7f23a48ed32 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserBillingManagedOrganizationRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserBillingManagedOrganizationRequestTest { + + @Test + void noManagedOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserBillingManagedOrganizationRequest.builder() + .userId("test-user-id") + .build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId("test-managed-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId("test-managed-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserManagedOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserManagedOrganizationRequestTest.java new file mode 100644 index 00000000000..2fa1459ad64 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserManagedOrganizationRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserManagedOrganizationRequestTest { + + @Test + void noManagedOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserManagedOrganizationRequest.builder() + .userId("test-user-id") + .build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserManagedOrganizationRequest.builder() + .managedOrganizationId("test-managed-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserManagedOrganizationRequest.builder() + .managedOrganizationId("test-managed-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserManagedSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserManagedSpaceRequestTest.java new file mode 100644 index 00000000000..8cec84fb09c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserManagedSpaceRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserManagedSpaceRequestTest { + + @Test + void noManagedSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserManagedSpaceRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserManagedSpaceRequest.builder() + .managedSpaceId("test-managed-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserManagedSpaceRequest.builder() + .managedSpaceId("test-managed-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserOrganizationRequestTest.java new file mode 100644 index 00000000000..df031cede18 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserOrganizationRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserOrganizationRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserOrganizationRequest.builder() + .organizationId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + AssociateUserOrganizationRequest.builder() + .organizationId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserSpaceRequestTest.java new file mode 100644 index 00000000000..e9204212f93 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/AssociateUserSpaceRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AssociateUserSpaceRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserSpaceRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + AssociateUserSpaceRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + AssociateUserSpaceRequest.builder().spaceId("test-space-id").userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/CreateUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/CreateUserRequestTest.java new file mode 100644 index 00000000000..eb9afbe10ee --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/CreateUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateUserRequestTest { + + @Test + void noUaaId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder().defaultSpaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + CreateUserRequest.builder().defaultSpaceId("test-space-id").uaaId("test-uaa-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/DeleteUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/DeleteUserRequestTest.java new file mode 100644 index 00000000000..93ae30866c1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/DeleteUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteUserRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteUserRequest.builder().async(true).build(); + }); + } + + @Test + void valid() { + DeleteUserRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/GetUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/GetUserRequestTest.java new file mode 100644 index 00000000000..d2f8302d404 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/GetUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetUserRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + GetUserRequest.builder().build(); + }); + } + + @Test + void valid() { + GetUserRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserAuditedOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserAuditedOrganizationsRequestTest.java new file mode 100644 index 00000000000..0bec49f0323 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserAuditedOrganizationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserAuditedOrganizationsRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserAuditedOrganizationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserAuditedOrganizationsRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserAuditedSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserAuditedSpacesRequestTest.java new file mode 100644 index 00000000000..c7df5296134 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserAuditedSpacesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserAuditedSpacesRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserAuditedSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserAuditedSpacesRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserBillingManagedOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserBillingManagedOrganizationsRequestTest.java new file mode 100644 index 00000000000..6e1c64bd96f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserBillingManagedOrganizationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserBillingManagedOrganizationsRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserBillingManagedOrganizationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserBillingManagedOrganizationsRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserManagedOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserManagedOrganizationsRequestTest.java new file mode 100644 index 00000000000..d8badeacf1b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserManagedOrganizationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserManagedOrganizationsRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserManagedOrganizationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserManagedOrganizationsRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserManagedSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserManagedSpacesRequestTest.java new file mode 100644 index 00000000000..5e42e7311c2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserManagedSpacesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserManagedSpacesRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserManagedSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserManagedSpacesRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserOrganizationsRequestTest.java new file mode 100644 index 00000000000..8436c250ffe --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserOrganizationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserOrganizationsRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserOrganizationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserOrganizationsRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserSpacesRequestTest.java new file mode 100644 index 00000000000..f331c2b03c9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUserSpacesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListUserSpacesRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ListUserSpacesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListUserSpacesRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUsersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUsersRequestTest.java new file mode 100644 index 00000000000..26ebce64b13 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/ListUsersRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import org.junit.jupiter.api.Test; + +final class ListUsersRequestTest { + + @Test + void valid() { + ListUsersRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserAuditedOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserAuditedOrganizationRequestTest.java new file mode 100644 index 00000000000..83089b91ac5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserAuditedOrganizationRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserAuditedOrganizationRequestTest { + + @Test + void noAuditedOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserAuditedOrganizationRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserAuditedOrganizationRequest.builder() + .auditedOrganizationId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + RemoveUserAuditedOrganizationRequest.builder() + .auditedOrganizationId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserAuditedSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserAuditedSpaceRequestTest.java new file mode 100644 index 00000000000..fde7796fa75 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserAuditedSpaceRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserAuditedSpaceRequestTest { + + @Test + void noAuditedSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserAuditedSpaceRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserManagedSpaceRequest.builder().managedSpaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveUserManagedSpaceRequest.builder() + .managedSpaceId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserBillingManagedOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserBillingManagedOrganizationRequestTest.java new file mode 100644 index 00000000000..ee5f967a1f7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserBillingManagedOrganizationRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserBillingManagedOrganizationRequestTest { + + @Test + void noBillingManagedOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserBillingManagedOrganizationRequest.builder() + .userId("test-user-id") + .build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + RemoveUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserManagedOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserManagedOrganizationRequestTest.java new file mode 100644 index 00000000000..2ee5ce01204 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserManagedOrganizationRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserManagedOrganizationRequestTest { + + @Test + void noManagedOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserManagedOrganizationRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserManagedOrganizationRequest.builder() + .managedOrganizationId("test-space-id") + .build(); + }); + } + + @Test + void valid() { + RemoveUserManagedOrganizationRequest.builder() + .managedOrganizationId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserManagedSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserManagedSpaceRequestTest.java new file mode 100644 index 00000000000..a279910d9fd --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserManagedSpaceRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserManagedSpaceRequestTest { + + @Test + void noManagedSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserManagedSpaceRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserManagedSpaceRequest.builder().managedSpaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveUserManagedSpaceRequest.builder() + .managedSpaceId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserOrganizationRequestTest.java new file mode 100644 index 00000000000..cd89a8b57eb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserOrganizationRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserOrganizationRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserOrganizationRequest.builder().organizationId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveUserOrganizationRequest.builder() + .organizationId("test-space-id") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserSpaceRequestTest.java new file mode 100644 index 00000000000..5ff8dddc33c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/RemoveUserSpaceRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveUserSpaceRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserSpaceRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveUserSpaceRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + RemoveUserSpaceRequest.builder().spaceId("test-space-id").userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/SummaryUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/SummaryUserRequestTest.java new file mode 100644 index 00000000000..15cead1bc5b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/SummaryUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SummaryUserRequestTest { + + @Test + void noUaaId() { + assertThrows( + IllegalStateException.class, + () -> { + SummaryUserRequest.builder().build(); + }); + } + + @Test + void valid() { + SummaryUserRequest.builder().userId("test-uaa-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/UpdateUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/UpdateUserRequestTest.java new file mode 100644 index 00000000000..366b83308c4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v2/users/UpdateUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateUserRequestTest { + + @Test + void noUaaId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserRequest.builder().defaultSpaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + UpdateUserRequest.builder().defaultSpaceId("test-space-id").userId("test-uaa-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ClientV3ExceptionTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ClientV3ExceptionTest.java new file mode 100644 index 00000000000..132b276d131 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ClientV3ExceptionTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.util.Arrays; +import org.junit.jupiter.api.Test; + +final class ClientV3ExceptionTest { + + @Test + void test() { + ClientV3Exception exception = + new ClientV3Exception( + -1, + Arrays.asList( + Error.builder() + .code(-2) + .detail("test-detail-1") + .title("test-title-1") + .build(), + Error.builder() + .code(-3) + .detail("test-detail-2") + .title("test-title-2") + .build())); + + assertThat(exception) + .hasNoCause() + .hasMessage("test-title-1(-2): test-detail-1, test-title-2(-3): test-detail-2") + .extracting("statusCode") + .isEqualTo(-1); + + assertThat(exception.getErrors()) + .flatExtracting(Error::getCode, Error::getDetail, Error::getTitle) + .contains(-2, "test-detail-1", "test-title-1", -3, "test-detail-2", "test-title-2"); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/PaginatedRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/PaginatedRequestTest.java new file mode 100644 index 00000000000..0508387587b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/PaginatedRequestTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.immutables.value.Value; +import org.junit.jupiter.api.Test; + +final class PaginatedRequestTest { + + @Test + void excessivePerPage() { + assertThrows( + IllegalStateException.class, + () -> { + StubPaginatedRequest.builder().perPage(10_000).build(); + }); + } + + @Test + void validNoValues() { + StubPaginatedRequest.builder().build(); + } + + @Test + void validValues() { + StubPaginatedRequest.builder().page(10).perPage(10).orderBy("name").build(); + } + + @Test + void zeroPage() { + assertThrows( + IllegalStateException.class, + () -> { + StubPaginatedRequest.builder().page(0).build(); + }); + } + + @Test + void zeroPerPage() { + assertThrows( + IllegalStateException.class, + () -> { + StubPaginatedRequest.builder().perPage(0).build(); + }); + } + + @Value.Immutable + abstract static class _StubPaginatedRequest extends PaginatedRequest {} +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/PaginationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/PaginationTest.java new file mode 100644 index 00000000000..22d093daa68 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/PaginationTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import org.junit.jupiter.api.Test; + +final class PaginationTest { + + @Test + void valid() { + Pagination.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/RelationshipTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/RelationshipTest.java new file mode 100644 index 00000000000..b3c434118b2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/RelationshipTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +final class RelationshipTest { + + @Test + void noId() { + assertThat(Relationship.builder().build().getId()).isNull(); + } + + @Test + void nullId() { + assertThat(Relationship.builder().id(null).build().getId()).isNull(); + } + + @Test + void nonNullId() { + assertThat(Relationship.builder().id("test-id").build().getId()).isEqualTo("test-id"); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ResourceTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ResourceTest.java new file mode 100644 index 00000000000..c719158072c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ResourceTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.immutables.value.Value; +import org.junit.jupiter.api.Test; + +final class ResourceTest { + + @Test + void noCreatedAt() { + assertThrows( + IllegalStateException.class, + () -> { + StubResource.builder().id("test-id").updatedAt("test-updated-at").build(); + }); + } + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + StubResource.builder() + .createdAt("test-created-at") + .updatedAt("test-updated-at") + .build(); + }); + } + + @Test + void valid() { + StubResource.builder() + .createdAt("test-created-at") + .id("test-id") + .updatedAt("test-updated-at") + .build(); + } + + @Value.Immutable + abstract static class _StubResource extends Resource {} +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ToManyRelationshipTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ToManyRelationshipTest.java new file mode 100644 index 00000000000..7bf5aca72a7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ToManyRelationshipTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import org.junit.jupiter.api.Test; + +final class ToManyRelationshipTest { + + @Test + void valid() { + ToManyRelationship.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ToOneRelationshipTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ToOneRelationshipTest.java new file mode 100644 index 00000000000..7811874d968 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/ToOneRelationshipTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import org.junit.jupiter.api.Test; + +final class ToOneRelationshipTest { + + @Test + void valid() { + ToOneRelationship.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/admin/ClearBuildpackCacheRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/admin/ClearBuildpackCacheRequestTest.java new file mode 100644 index 00000000000..b615797fba8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/admin/ClearBuildpackCacheRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.admin; + +import org.junit.jupiter.api.Test; + +class ClearBuildpackCacheRequestTest { + + @Test + void valid() { + ClearBuildpackCacheRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java new file mode 100644 index 00000000000..757e54bada1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/CreateApplicationRequestTest.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateApplicationRequest.builder() + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .currentDroplet( + ToOneRelationship.builder() + .data(Relationship.builder().build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CreateApplicationRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + CreateApplicationRequest.builder() + .name("test-name") + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .currentDroplet( + ToOneRelationship.builder() + .data(Relationship.builder().build()) + .build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/DeleteApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/DeleteApplicationRequestTest.java new file mode 100644 index 00000000000..fd4c6d65634 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/DeleteApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationCurrentDropletRelationshipRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationCurrentDropletRelationshipRequestTest.java new file mode 100644 index 00000000000..0ceef66e61d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationCurrentDropletRelationshipRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationCurrentDropletRelationshipRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationCurrentDropletRelationshipRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationCurrentDropletRelationshipRequest.builder() + .applicationId("test-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationCurrentDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationCurrentDropletRequestTest.java new file mode 100644 index 00000000000..0f0bcd51c56 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationCurrentDropletRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationCurrentDropletRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationCurrentDropletRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationCurrentDropletRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationEnvironmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationEnvironmentRequestTest.java new file mode 100644 index 00000000000..cb5e7d01940 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationEnvironmentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationEnvironmentRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationEnvironmentRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationEnvironmentRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationEnvironmentVariablesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationEnvironmentVariablesRequestTest.java new file mode 100644 index 00000000000..0a798cb24a1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationEnvironmentVariablesRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationEnvironmentVariablesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationEnvironmentVariablesRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationEnvironmentVariablesRequest.builder() + .applicationId("test-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationFeatureRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationFeatureRequestTest.java new file mode 100644 index 00000000000..c93daec7aa7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationFeatureRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationFeatureRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void noFeatureName() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationFeatureRequest.builder().featureName("test-feature-name").build(); + }); + } + + @Test + void valid() { + GetApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .featureName("test-feature-name") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationPermissionRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationPermissionRequestTest.java new file mode 100644 index 00000000000..bda99882973 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationPermissionRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationPermissionRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationPermissionsRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationPermissionsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationProcessRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationProcessRequestTest.java new file mode 100644 index 00000000000..c54a26a852a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationProcessRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationProcessRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationProcessRequest.builder().type("test-type").build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationProcessRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void valid() { + GetApplicationProcessRequest.builder() + .applicationId("test-application-id") + .type("test-type") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationProcessStatisticsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationProcessStatisticsRequestTest.java new file mode 100644 index 00000000000..cf356a499cf --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationProcessStatisticsRequestTest.java @@ -0,0 +1,113 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.processes.ProcessState; +import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; +import org.cloudfoundry.client.v3.processes.ProcessUsage; +import org.junit.jupiter.api.Test; + +final class GetApplicationProcessStatisticsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationProcessStatisticsRequest.builder().type("test-type").build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationProcessStatisticsRequest.builder() + .applicationId("test-id") + .build(); + }); + } + + @Test + void valid() { + GetApplicationProcessStatisticsRequest.builder() + .applicationId("test-id") + .type("test-type") + .build(); + } + + @Test + void validDownResource() { + ProcessStatisticsResource processStatisticsResource = + ProcessStatisticsResource.builder() + .type("web") + .index(0) + .state(ProcessState.DOWN) + .uptime(0L) + .build(); + GetApplicationProcessStatisticsResponse.builder() + .resource(processStatisticsResource) + .build(); + } + + @Test + void invalidRunningResource() { + assertThrows( + IllegalStateException.class, + () -> { + ProcessStatisticsResource processStatisticsResource = + ProcessStatisticsResource.builder() + .type("web") + .index(0) + .state(ProcessState.RUNNING) + .uptime(0L) + .build(); + GetApplicationProcessStatisticsResponse.builder() + .resource(processStatisticsResource) + .build(); + }); + } + + @Test + void validRunningResponse() { + ProcessUsage processUsage = + ProcessUsage.builder() + .time("") + .cpu(Double.valueOf("0.00038711029163348665")) + .memory(19177472L) + .disk(69705728L) + .build(); + ProcessStatisticsResource processStatisticsResource = + ProcessStatisticsResource.builder() + .type("web") + .index(0) + .state(ProcessState.RUNNING) + .host("10.244.16.10") + .usage(processUsage) + .uptime(9042L) + .memoryQuota(268435456L) + .diskQuota(1073741824L) + .fileDescriptorQuota(16384L) + .build(); + GetApplicationProcessStatisticsResponse.builder() + .resource(processStatisticsResource) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationRequestTest.java new file mode 100644 index 00000000000..5da0ace17e2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationSshEnabledRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationSshEnabledRequestTest.java new file mode 100644 index 00000000000..dfc67c22b3f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/GetApplicationSshEnabledRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationSshEnabledRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationSshEnabledRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationSshEnabledRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationBuildsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationBuildsRequestTest.java new file mode 100644 index 00000000000..d36ef9cebf9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationBuildsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationBuildsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationBuildsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationBuildsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationDropletsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationDropletsRequestTest.java new file mode 100644 index 00000000000..b5fc29a7216 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationDropletsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationDropletsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationDropletsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationDropletsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationFeaturesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationFeaturesRequestTest.java new file mode 100644 index 00000000000..829f029c3cd --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationFeaturesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationFeaturesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationFeaturesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationFeaturesRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationPackagesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationPackagesRequestTest.java new file mode 100644 index 00000000000..a4d304a35b9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationPackagesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationPackagesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationPackagesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationPackagesRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationProcessesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationProcessesRequestTest.java new file mode 100644 index 00000000000..f4698c080c1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationProcessesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationProcessesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationProcessesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationProcessesRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationRoutesRequestTest.java new file mode 100644 index 00000000000..4661c3aafa7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationRoutesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationRoutesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationRoutesRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationTasksRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationTasksRequestTest.java new file mode 100644 index 00000000000..219f0bab753 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationTasksRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationTasksRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationTasksRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationTasksRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationsRequestTest.java new file mode 100644 index 00000000000..0873397aa9d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ListApplicationsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import org.junit.jupiter.api.Test; + +final class ListApplicationsRequestTest { + + @Test + void valid() { + ListApplicationsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java new file mode 100644 index 00000000000..4515b31fdc1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RelationshipsTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class RelationshipsTest { + + @Test + void noSpace() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationRelationships.builder().build(); + }); + } + + @Test + void valid() { + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .currentDroplet( + ToOneRelationship.builder().data(Relationship.builder().build()).build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RestartApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RestartApplicationRequestTest.java new file mode 100644 index 00000000000..4ef6b0ae4a4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/RestartApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RestartApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + RestartApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + RestartApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ScaleApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ScaleApplicationRequestTest.java new file mode 100644 index 00000000000..3be74cb2839 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/ScaleApplicationRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ScaleApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ScaleApplicationRequest.builder().type("web").build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + ScaleApplicationRequest.builder().applicationId("test-application-id").build(); + }); + } + + @Test + void valid() { + ScaleApplicationRequest.builder().applicationId("test-application-id").type("web").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/SetApplicationCurrentDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/SetApplicationCurrentDropletRequestTest.java new file mode 100644 index 00000000000..f4e418f549c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/SetApplicationCurrentDropletRequestTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +final class SetApplicationCurrentDropletRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + SetApplicationCurrentDropletRequest.builder() + .data(Relationship.builder().id("test-droplet-id").build()) + .build(); + }); + } + + @Test + void noDropletId() { + assertThrows( + IllegalStateException.class, + () -> { + SetApplicationCurrentDropletRequest.builder() + .applicationId("test-application-id") + .build(); + }); + } + + @Test + void valid() { + SetApplicationCurrentDropletRequest.builder() + .applicationId("test-application-id") + .data(Relationship.builder().id("test-droplet-id").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/StartApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/StartApplicationRequestTest.java new file mode 100644 index 00000000000..808a72ec47a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/StartApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class StartApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + StartApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + StartApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/StopApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/StopApplicationRequestTest.java new file mode 100644 index 00000000000..d3a3e8db4d6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/StopApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class StopApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + StopApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + StopApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/TerminateApplicationInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/TerminateApplicationInstanceRequestTest.java new file mode 100644 index 00000000000..69ce66acb4f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/TerminateApplicationInstanceRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class TerminateApplicationInstanceRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationInstanceRequest.builder() + .index("test-index") + .type("test-type") + .build(); + }); + } + + @Test + void noIndex() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .type("test-type") + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .index("test-index") + .build(); + }); + } + + @Test + void valid() { + TerminateApplicationInstanceRequest.builder() + .applicationId("test-application-id") + .index("test-index") + .type("test-type") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationEnvironmentVariablesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationEnvironmentVariablesRequestTest.java new file mode 100644 index 00000000000..c682248dbc4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationEnvironmentVariablesRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateApplicationEnvironmentVariablesRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateApplicationEnvironmentVariablesRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateApplicationEnvironmentVariablesRequest.builder() + .applicationId("test-application-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationFeatureRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationFeatureRequestTest.java new file mode 100644 index 00000000000..25bffaaba8b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationFeatureRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateApplicationFeatureRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .enabled(true) + .build(); + }); + } + + @Test + void noEnabled() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .featureName("test-feature-name") + .build(); + }); + } + + @Test + void noFeatureName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateApplicationFeatureRequest.builder() + .enabled(true) + .featureName("test-feature-name") + .build(); + }); + } + + @Test + void valid() { + UpdateApplicationFeatureRequest.builder() + .applicationId("test-application-id") + .enabled(true) + .featureName("test-feature-name") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationRequestTest.java new file mode 100644 index 00000000000..e89fba24795 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/applications/UpdateApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateApplicationRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateApplicationRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/auditevents/GetAuditEventRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/auditevents/GetAuditEventRequestTest.java new file mode 100644 index 00000000000..8df04f393c7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/auditevents/GetAuditEventRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetAuditEventRequestTest { + + @Test + void invalid() { + assertThrows( + IllegalStateException.class, + () -> { + GetAuditEventRequest.builder().build(); + }); + } + + @Test + void valid() { + GetAuditEventRequest.builder().eventId("test-event-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/auditevents/ListAuditEventsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/auditevents/ListAuditEventsRequestTest.java new file mode 100644 index 00000000000..a9c2ed2c803 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/auditevents/ListAuditEventsRequestTest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.auditevents; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ListAuditEventsRequestTest { + + @Test + void invalidWithNullableCollection() { + assertThrows( + Exception.class, + () -> { + ListAuditEventsRequest.builder().organizationIds((String[]) null).build(); + }); + } + + @Test + void valid() { + ListAuditEventsRequest.builder() + .organizationIds("organization-id-1", "organization-id-2") + .type("test-type") + .orderBy("nothing") + .targetId("test-target-id") + .build(); + } + + @Test + void validWithEmptyCollections() { + ListAuditEventsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/CreateBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/CreateBuildpackRequestTest.java new file mode 100644 index 00000000000..d651d79d3d8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/CreateBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateBuildpackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateBuildpackRequest.builder().name("test-buildpack-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/DeleteBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/DeleteBuildpackRequestTest.java new file mode 100644 index 00000000000..bfd20111da2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/DeleteBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteBuildpackRequestTest { + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/GetBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/GetBuildpackRequestTest.java new file mode 100644 index 00000000000..056a192d61d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/GetBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetBuildpackRequestTest { + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + GetBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + GetBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/ListBuildpacksRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/ListBuildpacksRequestTest.java new file mode 100644 index 00000000000..133a26e0a79 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/ListBuildpacksRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import org.junit.jupiter.api.Test; + +final class ListBuildpacksRequestTest { + + @Test + void valid() { + ListBuildpacksRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/UpdateBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/UpdateBuildpackRequestTest.java new file mode 100644 index 00000000000..a867cbc2960 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/UpdateBuildpackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateBuildpackRequestTest { + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/UploadBuildpackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/UploadBuildpackRequestTest.java new file mode 100644 index 00000000000..41ce1f0e316 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/buildpacks/UploadBuildpackRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class UploadBuildpackRequestTest { + + private static final Path TEST_BUILDPACK = Paths.get("/"); + + @Test + void noBits() { + assertThrows( + IllegalStateException.class, + () -> { + UploadBuildpackRequest.builder().buildpackId("test-buildpack-id").build(); + }); + } + + @Test + void noBuildpackId() { + assertThrows( + IllegalStateException.class, + () -> { + UploadBuildpackRequest.builder().bits(TEST_BUILDPACK).build(); + }); + } + + @Test + void valid() { + UploadBuildpackRequest.builder() + .bits(TEST_BUILDPACK) + .buildpackId("test-buildpack-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/CreateBuildRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/CreateBuildRequestTest.java new file mode 100644 index 00000000000..b8d90feea92 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/CreateBuildRequestTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +final class CreateBuildRequestTest { + + @Test + void noPackage() { + assertThrows( + IllegalStateException.class, + () -> { + CreateBuildRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateBuildRequest.builder() + .getPackage(Relationship.builder().id("test-id").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/GetBuildRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/GetBuildRequestTest.java new file mode 100644 index 00000000000..92da8db1803 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/GetBuildRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetBuildRequestTest { + + @Test + void noBuildId() { + assertThrows( + IllegalStateException.class, + () -> { + GetBuildRequest.builder().build(); + }); + } + + @Test + void valid() { + GetBuildRequest.builder().buildId("test-build-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/ListBuildsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/ListBuildsRequestTest.java new file mode 100644 index 00000000000..2b86372df57 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/builds/ListBuildsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.builds; + +import org.junit.jupiter.api.Test; + +final class ListBuildsRequestTest { + + @Test + void valid() { + ListBuildsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/CancelDeploymentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/CancelDeploymentRequestTest.java new file mode 100644 index 00000000000..548b0d152f4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/CancelDeploymentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CancelDeploymentRequestTest { + + @Test + void noDeploymentId() { + assertThrows( + IllegalStateException.class, + () -> { + CancelDeploymentRequest.builder().build(); + }); + } + + @Test + void valid() { + CancelDeploymentRequest.builder().deploymentId("test-deployment-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/CreateDeploymentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/CreateDeploymentRequestTest.java new file mode 100644 index 00000000000..12f08517607 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/CreateDeploymentRequestTest.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateDeploymentRequestTest { + + @Test + void noDropletValid() { + CreateDeploymentRequest.builder() + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data(Relationship.builder().id("app-id").build()) + .build()) + .build()) + .build(); + } + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CreateDeploymentRequest.builder() + .droplet(Relationship.builder().id("droplet-id").build()) + .build(); + }); + } + + @Test + void valid() { + CreateDeploymentRequest.builder() + .droplet(Relationship.builder().id("droplet-id").build()) + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data(Relationship.builder().id("app-id").build()) + .build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/GetDeploymentTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/GetDeploymentTest.java new file mode 100644 index 00000000000..c8d6e7185cc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/GetDeploymentTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetDeploymentTest { + + @Test + void noDeploymentId() { + assertThrows( + IllegalStateException.class, + () -> { + GetDeploymentRequest.builder().build(); + }); + } + + @Test + void valid() { + GetDeploymentRequest.builder().deploymentId("deployment-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/ListDeploymentsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/ListDeploymentsRequestTest.java new file mode 100644 index 00000000000..d53ff39a44b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/deployments/ListDeploymentsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.deployments; + +import org.junit.jupiter.api.Test; + +final class ListDeploymentsRequestTest { + + @Test + void valid() { + ListDeploymentsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/CheckReservedRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/CheckReservedRoutesRequestTest.java new file mode 100644 index 00000000000..7ea33ab19f0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/CheckReservedRoutesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CheckReservedRoutesRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + CheckReservedRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + CheckReservedRoutesRequest.builder().domainId("test-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/CreateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/CreateDomainRequestTest.java new file mode 100644 index 00000000000..eb7b345d796 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/CreateDomainRequestTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateDomainRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateDomainRequest.builder() + .name("test-domain-name") + .internal(true) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-org-id") + .build()) + .build()) + .sharedOrganizations( + ToManyRelationship.builder() + .data( + Relationship.builder() + .id("shared-org-id-1") + .build()) + .data( + Relationship.builder() + .id("shared-org-id-2") + .build()) + .build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/DeleteDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/DeleteDomainRequestTest.java new file mode 100644 index 00000000000..4d04cb22058 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/DeleteDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteDomainRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteDomainRequest.builder().domainId("test-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/GetDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/GetDomainRequestTest.java new file mode 100644 index 00000000000..59c05097259 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/GetDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetDomainRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + GetDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + GetDomainRequest.builder().domainId("test-domain-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/ListDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/ListDomainsRequestTest.java new file mode 100644 index 00000000000..deec018d139 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/ListDomainsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import org.junit.jupiter.api.Test; + +final class ListDomainsRequestTest { + + @Test + void valid() { + ListDomainsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/ShareDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/ShareDomainRequestTest.java new file mode 100644 index 00000000000..5f8e27bcd3f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/ShareDomainRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +final class ShareDomainRequestTest { + + @Test + void emptyRelationship() { + ShareDomainRequest.builder() + .domainId("test-domain-id") + .data(Relationship.builder().build()) + .build(); + } + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + ShareDomainRequest.builder() + .data(Relationship.builder().id("shared-organization-id").build()) + .build(); + }); + } + + @Test + void valid() { + ShareDomainRequest.builder() + .domainId("test-domain-id") + .data(Relationship.builder().id("shared-organization-id").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/UnshareDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/UnshareDomainRequestTest.java new file mode 100644 index 00000000000..62528c20f8b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/UnshareDomainRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnshareDomainRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + UnshareDomainRequest.builder().organizationId("test-org-id").build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + UnshareDomainRequest.builder().domainId("test-domain-id").build(); + }); + } + + @Test + void valid() { + UnshareDomainRequest.builder() + .domainId("test-domain-id") + .organizationId("test-org-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/UpdateDomainRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/UpdateDomainRequestTest.java new file mode 100644 index 00000000000..06c1b56cb1a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/domains/UpdateDomainRequestTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Metadata; +import org.junit.jupiter.api.Test; + +final class UpdateDomainRequestTest { + + @Test + void noDomainId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateDomainRequest.builder() + .domainId("test-domain-id") + .metadata(Metadata.builder().label("test-label-key", "test-label-value").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/CopyDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/CopyDropletRequestTest.java new file mode 100644 index 00000000000..58216e90025 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/CopyDropletRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CopyDropletRequestTest { + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CopyDropletRequest.builder().sourceDropletId("test-source-id").build(); + }); + } + + @Test + void noSourceDropletId() { + assertThrows( + IllegalStateException.class, + () -> { + CopyDropletRequest.builder() + .relationships( + DropletRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void valid() { + CopyDropletRequest.builder() + .relationships( + DropletRelationships.builder() + .application( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build()) + .sourceDropletId("test-source-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/DeleteDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/DeleteDropletRequestTest.java new file mode 100644 index 00000000000..f9954e1ad99 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/DeleteDropletRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteDropletRequestTest { + + @Test + void noDropletId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteDropletRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteDropletRequest.builder().dropletId("test-droplet-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/GetDropletRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/GetDropletRequestTest.java new file mode 100644 index 00000000000..99d5688c685 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/GetDropletRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetDropletRequestTest { + + @Test + void noDropletId() { + assertThrows( + IllegalStateException.class, + () -> { + GetDropletRequest.builder().build(); + }); + } + + @Test + void valid() { + GetDropletRequest.builder().dropletId("test-droplet-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/ListDropletsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/ListDropletsRequestTest.java new file mode 100644 index 00000000000..020c4ae483e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/droplets/ListDropletsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.droplets; + +import org.junit.jupiter.api.Test; + +final class ListDropletsRequestTest { + + @Test + void valid() { + ListDropletsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/AddIsolationSegmentOrganizationEntitlementRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/AddIsolationSegmentOrganizationEntitlementRequestTest.java new file mode 100644 index 00000000000..34a1ab0f5e8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/AddIsolationSegmentOrganizationEntitlementRequestTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +final class AddIsolationSegmentOrganizationEntitlementRequestTest { + + @Test + void noIsolationSegmentId() { + assertThrows( + IllegalStateException.class, + () -> { + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .data(Relationship.builder().id("test-organization-id").build()) + .build(); + }); + } + + @Test + void valid() { + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/CreateIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/CreateIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..c057c8f79f5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/CreateIsolationSegmentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateIsolationSegmentRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateIsolationSegmentRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateIsolationSegmentRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/DeleteIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/DeleteIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..42e2e0514f8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/DeleteIsolationSegmentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteIsolationSegmentRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteIsolationSegmentRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteIsolationSegmentRequest.builder().isolationSegmentId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/GetIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/GetIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..52a974f12dc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/GetIsolationSegmentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetIsolationSegmentRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + GetIsolationSegmentRequest.builder().build(); + }); + } + + @Test + void valid() { + GetIsolationSegmentRequest.builder().isolationSegmentId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentEntitledOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentEntitledOrganizationsRequestTest.java new file mode 100644 index 00000000000..b5b274323b8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentEntitledOrganizationsRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListIsolationSegmentEntitledOrganizationsRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + ListIsolationSegmentEntitledOrganizationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListIsolationSegmentEntitledOrganizationsRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentOrganizationsRelationshipRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentOrganizationsRelationshipRequestTest.java new file mode 100644 index 00000000000..16bb9b2c318 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentOrganizationsRelationshipRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListIsolationSegmentOrganizationsRelationshipRequestTest { + + @Test + void noIsolationSegmentId() { + assertThrows( + IllegalStateException.class, + () -> { + ListIsolationSegmentOrganizationsRelationshipRequest.builder().build(); + }); + } + + @Test + void valid() { + ListIsolationSegmentOrganizationsRelationshipRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentSpacesRelationshipRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentSpacesRelationshipRequestTest.java new file mode 100644 index 00000000000..30bdc449792 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentSpacesRelationshipRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListIsolationSegmentSpacesRelationshipRequestTest { + + @Test + void noIsolationSegmentId() { + assertThrows( + IllegalStateException.class, + () -> { + ListIsolationSegmentSpacesRelationshipRequest.builder().build(); + }); + } + + @Test + void valid() { + ListIsolationSegmentSpacesRelationshipRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentsRequestTest.java new file mode 100644 index 00000000000..5ef5d75cf94 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/ListIsolationSegmentsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import org.junit.jupiter.api.Test; + +final class ListIsolationSegmentsRequestTest { + + @Test + void valid() { + ListIsolationSegmentsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/RemoveIsolationSegmentOrganizationEntitlementRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/RemoveIsolationSegmentOrganizationEntitlementRequestTest.java new file mode 100644 index 00000000000..1e16c49d757 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/RemoveIsolationSegmentOrganizationEntitlementRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveIsolationSegmentOrganizationEntitlementRequestTest { + + @Test + void noIsolationSegmentId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveIsolationSegmentOrganizationEntitlementRequest.builder() + .organizationId("test-organization-id") + .build(); + }); + } + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .build(); + }); + } + + @Test + void valid() { + RemoveIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId("test-isolation-segment-id") + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/UpdateIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/UpdateIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..088e67daa93 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/isolationsegments/UpdateIsolationSegmentRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.isolationsegments; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateIsolationSegmentRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIsolationSegmentRequest.builder().name("test-name").build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIsolationSegmentRequest.builder().isolationSegmentId("test-id").build(); + }); + } + + @Test + void valid() { + UpdateIsolationSegmentRequest.builder() + .isolationSegmentId("test-id") + .name("test-name") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/AssignOrganizationDefaultIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/AssignOrganizationDefaultIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..f41911de2a5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/AssignOrganizationDefaultIsolationSegmentRequestTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +final class AssignOrganizationDefaultIsolationSegmentRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssignOrganizationDefaultIsolationSegmentRequest.builder() + .data(Relationship.builder().id("test-isolation-segment-id").build()) + .build(); + }); + } + + @Test + void validData() { + AssignOrganizationDefaultIsolationSegmentRequest.builder() + .data(Relationship.builder().id("test-isolation-segment-id").build()) + .organizationId("test-organization-id") + .build(); + } + + @Test + void validNoData() { + AssignOrganizationDefaultIsolationSegmentRequest.builder() + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/CreateOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/CreateOrganizationRequestTest.java new file mode 100644 index 00000000000..36f9e8e5a6e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/CreateOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateOrganizationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateOrganizationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/DeleteOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/DeleteOrganizationRequestTest.java new file mode 100644 index 00000000000..2e5eeec0922 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/DeleteOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteOrganizationRequest.builder().organizationId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationDefaultIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationDefaultIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..aa469ff4ef5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationDefaultIsolationSegmentRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationDefaultIsolationSegmentRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationDefaultIsolationSegmentRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationDefaultIsolationSegmentRequest.builder() + .organizationId("test-organization-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationRequestTest.java new file mode 100644 index 00000000000..647a9f73ccc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationRequest.builder().organizationId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationUsageSummaryRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationUsageSummaryRequestTest.java new file mode 100644 index 00000000000..539c717d092 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/GetOrganizationUsageSummaryRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationUsageSummaryRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + GetOrganizationRequest.builder().organizationId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/ListOrganizationDomainsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/ListOrganizationDomainsRequestTest.java new file mode 100644 index 00000000000..8cfe13ae8c7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/ListOrganizationDomainsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationDomainsRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationDomainsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationDomainsRequest.builder().organizationId("test-organization-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/ListOrganizationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/ListOrganizationsRequestTest.java new file mode 100644 index 00000000000..c13dd848c9f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/organizations/ListOrganizationsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.organizations; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationsRequestTest { + + @Test + void valid() { + ListOrganizationsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/CopyPackageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/CopyPackageRequestTest.java new file mode 100644 index 00000000000..61e3308ecf6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/CopyPackageRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CopyPackageRequestTest { + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CopyPackageRequest.builder().sourcePackageId("test-source-package-id").build(); + }); + } + + @Test + void noSourcePackageId() { + assertThrows( + IllegalStateException.class, + () -> { + CopyPackageRequest.builder() + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void valid() { + CopyPackageRequest.builder() + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build()) + .sourcePackageId("test-source-package-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/CreatePackageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/CreatePackageRequestTest.java new file mode 100644 index 00000000000..3e53eae93e0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/CreatePackageRequestTest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.cloudfoundry.client.v3.packages.PackageType.BITS; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreatePackageRequestTest { + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CreatePackageRequest.builder() + .data(BitsData.builder().build()) + .type(BITS) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + CreatePackageRequest.builder() + .data(BitsData.builder().build()) + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void valid() { + CreatePackageRequest.builder() + .data(BitsData.builder().build()) + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build()) + .type(BITS) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/DeletePackageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/DeletePackageRequestTest.java new file mode 100644 index 00000000000..62aad388674 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/DeletePackageRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeletePackageRequestTest { + + @Test + void noPackageId() { + assertThrows( + IllegalStateException.class, + () -> { + DeletePackageRequest.builder().build(); + }); + } + + @Test + void valid() { + DeletePackageRequest.builder().packageId("test-package-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/DownloadPackageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/DownloadPackageRequestTest.java new file mode 100644 index 00000000000..f3554b4b63a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/DownloadPackageRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DownloadPackageRequestTest { + + @Test + void noPackageId() { + assertThrows( + IllegalStateException.class, + () -> { + DownloadPackageRequest.builder().build(); + }); + } + + @Test + void valid() { + DownloadPackageRequest.builder().packageId("test-package-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/GetPackageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/GetPackageRequestTest.java new file mode 100644 index 00000000000..5edc4f7ec01 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/GetPackageRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetPackageRequestTest { + + @Test + void noPackageId() { + assertThrows( + IllegalStateException.class, + () -> { + GetPackageRequest.builder().build(); + }); + } + + @Test + void valid() { + GetPackageRequest.builder().packageId("test-package-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/ListPackageDropletsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/ListPackageDropletsRequestTest.java new file mode 100644 index 00000000000..26c192d3c83 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/ListPackageDropletsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListPackageDropletsRequestTest { + + @Test + void noPackageId() { + assertThrows( + IllegalStateException.class, + () -> { + ListPackageDropletsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListPackageDropletsRequest.builder().packageId("test-package-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/ListPackagesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/ListPackagesRequestTest.java new file mode 100644 index 00000000000..ce69b412f28 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/ListPackagesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import org.junit.jupiter.api.Test; + +final class ListPackagesRequestTest { + + @Test + void valid() { + ListPackagesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/UploadPackageRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/UploadPackageRequestTest.java new file mode 100644 index 00000000000..2c35a6654b1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/packages/UploadPackageRequestTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.packages; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Path; +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class UploadPackageRequestTest { + + private static final Path TEST_PACKAGE = Paths.get("/"); + + @Test + void neitherBitsNorResources() { + assertThrows( + IllegalStateException.class, + () -> { + UploadPackageRequest.builder().packageId("test-package-id").build(); + }); + } + + @Test + void noPackageId() { + assertThrows( + IllegalStateException.class, + () -> { + UploadPackageRequest.builder().bits(TEST_PACKAGE).build(); + }); + } + + @Test + void valid() { + UploadPackageRequest.builder().bits(TEST_PACKAGE).packageId("test-package-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/GetProcessRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/GetProcessRequestTest.java new file mode 100644 index 00000000000..543f6bb8e89 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/GetProcessRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetProcessRequestTest { + + @Test + void noProcessId() { + assertThrows( + IllegalStateException.class, + () -> { + GetProcessRequest.builder().build(); + }); + } + + @Test + void valid() { + GetProcessRequest.builder().processId("test-process-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/GetProcessStatisticsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/GetProcessStatisticsRequestTest.java new file mode 100644 index 00000000000..bd0b94f369d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/GetProcessStatisticsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetProcessStatisticsRequestTest { + + @Test + void noProcessId() { + assertThrows( + IllegalStateException.class, + () -> { + GetProcessStatisticsRequest.builder().build(); + }); + } + + @Test + void valid() { + GetProcessStatisticsRequest.builder().processId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/ListProcessesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/ListProcessesRequestTest.java new file mode 100644 index 00000000000..abb468de440 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/ListProcessesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import org.junit.jupiter.api.Test; + +final class ListProcessesRequestTest { + + @Test + void valid() { + ListProcessesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/ScaleProcessRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/ScaleProcessRequestTest.java new file mode 100644 index 00000000000..0e9772d3222 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/ScaleProcessRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ScaleProcessRequestTest { + + @Test + void noProcessId() { + assertThrows( + IllegalStateException.class, + () -> { + ScaleProcessRequest.builder().build(); + }); + } + + @Test + void valid() { + ScaleProcessRequest.builder().processId("test-process-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/TerminateProcessInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/TerminateProcessInstanceRequestTest.java new file mode 100644 index 00000000000..ed9c253d378 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/TerminateProcessInstanceRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class TerminateProcessInstanceRequestTest { + + @Test + void noIndex() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateProcessInstanceRequest.builder().processId("test-process-id").build(); + }); + } + + @Test + void noProcessId() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateProcessInstanceRequest.builder().index("test-index").build(); + }); + } + + @Test + void valid() { + TerminateProcessInstanceRequest.builder() + .index("test-index") + .processId("test-process-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/UpdateProcessRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/UpdateProcessRequestTest.java new file mode 100644 index 00000000000..9a1527a75e4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/processes/UpdateProcessRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.processes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateProcessRequestTest { + + @Test + void noProcessId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateProcessRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateProcessRequest.builder().processId("test-process-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ApplyOrganizationQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ApplyOrganizationQuotaRequestTest.java new file mode 100644 index 00000000000..6a572188c93 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ApplyOrganizationQuotaRequestTest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.junit.jupiter.api.Test; + +final class ApplyOrganizationQuotaRequestTest { + + @Test + void noOrganizationRelationships() { + assertThrows( + IllegalStateException.class, + () -> + ApplyOrganizationQuotaRequest.builder() + .organizationQuotaId("quota-id") + .build()); + } + + @Test + void noOrganizationQuotaId() { + Relationship organizationRelationship = + Relationship.builder().id("organization-id").build(); + ToManyRelationship organizationRelationships = + ToManyRelationship.builder().data(organizationRelationship).build(); + + assertThrows( + IllegalStateException.class, + () -> + ApplyOrganizationQuotaRequest.builder() + .organizationRelationships(organizationRelationships) + .build()); + } + + @Test + void valid() { + Relationship organizationRelationship = + Relationship.builder().id("organization-id").build(); + ToManyRelationship organizationRelationships = + ToManyRelationship.builder().data(organizationRelationship).build(); + ApplyOrganizationQuotaRequest.builder() + .organizationQuotaId("quota-id") + .organizationRelationships(organizationRelationships) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/CreateOrganizationQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/CreateOrganizationQuotaRequestTest.java new file mode 100644 index 00000000000..082b814e552 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/CreateOrganizationQuotaRequestTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateOrganizationQuotaRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> CreateOrganizationQuotaRequest.builder().build()); + } + + @Test + void valid() { + CreateOrganizationQuotaRequest.builder().name("test-quota").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/DeleteOrganizationQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/DeleteOrganizationQuotaRequestTest.java new file mode 100644 index 00000000000..1626d86b797 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/DeleteOrganizationQuotaRequestTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteOrganizationQuotaRequestTest { + + @Test + void noOrganizationQuotaId() { + assertThrows( + IllegalStateException.class, + () -> DeleteOrganizationQuotaRequest.builder().build()); + } + + @Test + void valid() { + DeleteOrganizationQuotaRequest.builder().organizationQuotaId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/GetOrganizationQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/GetOrganizationQuotaRequestTest.java new file mode 100644 index 00000000000..2f1892937e3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/GetOrganizationQuotaRequestTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetOrganizationQuotaRequestTest { + + @Test + void noOrganizationQuotaId() { + assertThrows( + IllegalStateException.class, () -> GetOrganizationQuotaRequest.builder().build()); + } + + @Test + void valid() { + GetOrganizationQuotaRequest.builder().organizationQuotaId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ListOrganizationQuotasRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ListOrganizationQuotasRequestTest.java new file mode 100644 index 00000000000..18a5a9da45a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/ListOrganizationQuotasRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import org.junit.jupiter.api.Test; + +public class ListOrganizationQuotasRequestTest { + + @Test + void valid() { + ListOrganizationQuotasRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/UpdateOrganizationQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/UpdateOrganizationQuotaRequestTest.java new file mode 100644 index 00000000000..3b1b606f625 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/organizations/UpdateOrganizationQuotaRequestTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateOrganizationQuotaRequestTest { + + @Test + void noOrganizationQuotaId() { + assertThrows( + IllegalStateException.class, + () -> UpdateOrganizationQuotaRequest.builder().build()); + } + + @Test + void valid() { + UpdateOrganizationQuotaRequest.builder().organizationQuotaId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ApplySpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ApplySpaceQuotaRequestTest.java new file mode 100644 index 00000000000..63b8b8061d0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ApplySpaceQuotaRequestTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.junit.jupiter.api.Test; + +final class ApplySpaceQuotaRequestTest { + + @Test + void noSpaceRelationships() { + assertThrows( + IllegalStateException.class, + () -> ApplySpaceQuotaRequest.builder().spaceQuotaId("quota-id").build()); + } + + @Test + void noSpaceQuotaId() { + Relationship spaceRelationship = Relationship.builder().id("space-id").build(); + ToManyRelationship spaceRelationships = + ToManyRelationship.builder().data(spaceRelationship).build(); + + assertThrows( + IllegalStateException.class, + () -> + ApplySpaceQuotaRequest.builder() + .spaceRelationships(spaceRelationships) + .build()); + } + + @Test + void valid() { + Relationship spaceRelationship = Relationship.builder().id("space-id").build(); + ToManyRelationship spaceRelationships = + ToManyRelationship.builder().data(spaceRelationship).build(); + ApplySpaceQuotaRequest.builder() + .spaceQuotaId("quota-id") + .spaceRelationships(spaceRelationships) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/CreateSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/CreateSpaceQuotaRequestTest.java new file mode 100644 index 00000000000..70972980d6e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/CreateSpaceQuotaRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.UUID; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateSpaceQuotaRequestTest { + + @Test + void noName() { + assertThrows(IllegalStateException.class, () -> CreateSpaceQuotaRequest.builder().build()); + } + + @Test + void noOrganizationsRelationship() { + assertThrows( + IllegalStateException.class, + () -> CreateSpaceQuotaRequest.builder().name("test-quota").build()); + } + + @Test + void valid() { + + String organizationGuid = UUID.randomUUID().toString(); + ToOneRelationship organizationsRelationship = + ToOneRelationship.builder() + .data(Relationship.builder().id(organizationGuid).build()) + .build(); + SpaceQuotaRelationships relationships = + SpaceQuotaRelationships.builder().organization(organizationsRelationship).build(); + CreateSpaceQuotaRequest.builder().name("test-quota").relationships(relationships).build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/DeleteSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/DeleteSpaceQuotaRequestTest.java new file mode 100644 index 00000000000..dc682c01ac4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/DeleteSpaceQuotaRequestTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteSpaceQuotaRequestTest { + + @Test + void noSpaceQuotaId() { + assertThrows(IllegalStateException.class, () -> DeleteSpaceQuotaRequest.builder().build()); + } + + @Test + void valid() { + DeleteSpaceQuotaRequest.builder().spaceQuotaId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/GetSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/GetSpaceQuotaRequestTest.java new file mode 100644 index 00000000000..bd9a36181bd --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/GetSpaceQuotaRequestTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceQuotaRequestTest { + + @Test + void noSpaceQuotaId() { + assertThrows(IllegalStateException.class, () -> GetSpaceQuotaRequest.builder().build()); + } + + @Test + void valid() { + GetSpaceQuotaRequest.builder().spaceQuotaId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ListSpaceQuotasRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ListSpaceQuotasRequestTest.java new file mode 100644 index 00000000000..5e65214896d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/ListSpaceQuotasRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import org.junit.jupiter.api.Test; + +public class ListSpaceQuotasRequestTest { + + @Test + void valid() { + ListSpaceQuotasRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/RemoveSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/RemoveSpaceQuotaRequestTest.java new file mode 100644 index 00000000000..64f8490b07f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/RemoveSpaceQuotaRequestTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveSpaceQuotaRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> RemoveSpaceQuotaRequest.builder().spaceQuotaId("quota-id").build()); + } + + @Test + void noSpaceQuotaId() { + assertThrows( + IllegalStateException.class, + () -> RemoveSpaceQuotaRequest.builder().spaceId("space-guid").build()); + } + + @Test + void valid() { + RemoveSpaceQuotaRequest.builder().spaceQuotaId("quota-id").spaceId("space-guid").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/UpdateSpaceQuotaRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/UpdateSpaceQuotaRequestTest.java new file mode 100644 index 00000000000..0c80b5ec545 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/quotas/spaces/UpdateSpaceQuotaRequestTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.quotas.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateSpaceQuotaRequestTest { + + @Test + void noSpaceQuotaId() { + assertThrows(IllegalStateException.class, () -> UpdateSpaceQuotaRequest.builder().build()); + } + + @Test + void valid() { + UpdateSpaceQuotaRequest.builder().spaceQuotaId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/resourcematch/ListMatchingResourcesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/resourcematch/ListMatchingResourcesRequestTest.java new file mode 100644 index 00000000000..89c64c1fbb3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/resourcematch/ListMatchingResourcesRequestTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.resourcematch; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Checksum; +import org.junit.jupiter.api.Test; + +class ListMatchingResourcesRequestTest { + + @Test + void noResources() { + assertThrows( + IllegalStateException.class, + () -> { + ListMatchingResourcesRequest.builder().build(); + }); + } + + @Test + void valid() { + ListMatchingResourcesRequest.builder() + .resource( + MatchedResource.builder() + .checksum(Checksum.builder().value("test-checksum").build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/CreateRoleRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/CreateRoleRequestTest.java new file mode 100644 index 00000000000..a1ff887af1a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/CreateRoleRequestTest.java @@ -0,0 +1,201 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +class CreateRoleRequestTest { + + @Test + void invalidWithMissingOrgRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRoleRequest.builder() + .type(RoleType.ORGANIZATION_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void invalidWithMissingSpaceRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRoleRequest.builder() + .type(RoleType.SPACE_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void invalidWithNoRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRoleRequest.builder().type(RoleType.ORGANIZATION_AUDITOR).build(); + }); + } + + @Test + void invalidWithOrgRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRoleRequest.builder() + .type(RoleType.SPACE_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-org-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void invalidWithSpaceRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRoleRequest.builder() + .type(RoleType.ORGANIZATION_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void invalidWithoutType() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRoleRequest.builder() + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void validOrgRole() { + CreateRoleRequest.builder() + .type(RoleType.ORGANIZATION_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-org-id") + .build()) + .build()) + .build()) + .build(); + } + + @Test + void validSpaceRole() { + CreateRoleRequest.builder() + .type(RoleType.SPACE_AUDITOR) + .relationships( + RoleRelationships.builder() + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-user-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/DeleteRoleRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/DeleteRoleRequestTest.java new file mode 100644 index 00000000000..0c0835b15ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/DeleteRoleRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteRoleRequestTest { + + @Test + void noRoleId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteRoleRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteRoleRequest.builder().roleId("test-role-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/GetRoleRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/GetRoleRequestTest.java new file mode 100644 index 00000000000..5cd3a835120 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/GetRoleRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class GetRoleRequestTest { + + @Test + void noRoleId() { + assertThrows( + IllegalStateException.class, + () -> { + GetRoleRequest.builder().build(); + }); + } + + @Test + void valid() { + GetRoleRequest.builder().roleId("test-role-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/ListRolesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/ListRolesRequestTest.java new file mode 100644 index 00000000000..165f7fc0f2d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/roles/ListRolesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.roles; + +import org.junit.jupiter.api.Test; + +class ListRolesRequestTest { + + @Test + void valid() { + ListRolesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/CreateRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/CreateRouteRequestTest.java new file mode 100644 index 00000000000..602ec57f849 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/CreateRouteRequestTest.java @@ -0,0 +1,97 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateRouteRequestTest { + + @Test + void invalidWithMissingDomainRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder() + .relationships( + RouteRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void invalidWithMissingRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder().build(); + }); + } + + @Test + void invalidWithMissingSpaceRelationship() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder() + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-domain-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void valid() { + CreateRouteRequest.builder() + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-domain-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/DeleteRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/DeleteRouteRequestTest.java new file mode 100644 index 00000000000..d0c38ee743a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/DeleteRouteRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteRouteRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/GetRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/GetRouteRequestTest.java new file mode 100644 index 00000000000..bab26f4dce5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/GetRouteRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class GetRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + GetRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + GetRouteRequest.builder().routeId("test-route-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/InsertRouteDestinationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/InsertRouteDestinationsRequestTest.java new file mode 100644 index 00000000000..423247ca4cc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/InsertRouteDestinationsRequestTest.java @@ -0,0 +1,125 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class InsertRouteDestinationsRequestTest { + + @Test + void noApplication() { + assertThrows( + IllegalStateException.class, + () -> { + InsertRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .destinationId("test-destination-id") + .port(999) + .build()) + .routeId("test-route-id") + .build(); + }); + } + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + InsertRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .process( + Process.builder() + .type("test-type") + .build()) + .build()) + .destinationId("test-destination-id") + .port(999) + .build()) + .routeId("test-route-id") + .build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + InsertRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .applicationId("test-application-id") + .process( + Process.builder() + .type("test-type") + .build()) + .build()) + .destinationId("test-destination-id") + .port(999) + .build()) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + InsertRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .applicationId("test-application-id") + .process(Process.builder().build()) + .build()) + .destinationId("test-destination-id") + .port(999) + .build()) + .routeId("test-route-id") + .build(); + }); + } + + @Test + void valid() { + InsertRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .applicationId("test-application-id") + .process( + Process.builder().type("test-type").build()) + .build()) + .destinationId("test-destination-id") + .port(999) + .build()) + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/ListRouteDestinationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/ListRouteDestinationsRequestTest.java new file mode 100644 index 00000000000..c3b9d09ac6c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/ListRouteDestinationsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ListRouteDestinationsRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + ListRouteDestinationsRequest.builder().build(); + }); + } + + @Test + void valid() { + ListRouteDestinationsRequest.builder().routeId("test-route-destination-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/RemoveRouteDestinationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/RemoveRouteDestinationsRequestTest.java new file mode 100644 index 00000000000..515e261da91 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/RemoveRouteDestinationsRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class RemoveRouteDestinationsRequestTest { + + @Test + void noDestinationId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveRouteDestinationsRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveRouteDestinationsRequest.builder().routeId("test-route-id").build(); + }); + } + + @Test + void valid() { + RemoveRouteDestinationsRequest.builder() + .destinationId("test-destination-id") + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/ReplaceRouteDestinationsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/ReplaceRouteDestinationsRequestTest.java new file mode 100644 index 00000000000..147477a3492 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/ReplaceRouteDestinationsRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ReplaceRouteDestinationsRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + ReplaceRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .applicationId("test-application-id") + .process( + Process.builder() + .type("test-type") + .build()) + .build()) + .destinationId("test-destination-id") + .port(999) + .build()) + .build(); + }); + } + + @Test + void valid() { + ReplaceRouteDestinationsRequest.builder().routeId("test-route-destination-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/UpdateRouteRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/UpdateRouteRequestTest.java new file mode 100644 index 00000000000..10e0f1eb0a0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/routes/UpdateRouteRequestTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Metadata; +import org.junit.jupiter.api.Test; + +class UpdateRouteRequestTest { + + @Test + void noRouteId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateRouteRequest.builder() + .metadata(Metadata.builder().label("test-key", "test-value").build()) + .routeId("test-route-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/BindRunningSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/BindRunningSecurityGroupRequestTest.java new file mode 100644 index 00000000000..8c3e12640e7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/BindRunningSecurityGroupRequestTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +public class BindRunningSecurityGroupRequestTest { + + @Test + public void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + BindRunningSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void valid() { + BindRunningSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .boundSpaces(Relationship.builder().id("space-guid-1").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/BindStagingSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/BindStagingSecurityGroupRequestTest.java new file mode 100644 index 00000000000..ff5a4f3ba96 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/BindStagingSecurityGroupRequestTest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +public class BindStagingSecurityGroupRequestTest { + + @Test + public void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + BindStagingSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void valid() { + BindStagingSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .boundSpaces(Relationship.builder().id("space-guid-1").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/CreateSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/CreateSecurityGroupRequestTest.java new file mode 100644 index 00000000000..292cec1b67d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/CreateSecurityGroupRequestTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class CreateSecurityGroupRequestTest { + + @Test + public void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSecurityGroupRequest.builder().rule(Rule.builder().build()).build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/DeleteSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/DeleteSecurityGroupRequestTest.java new file mode 100644 index 00000000000..d3fb5b8bec9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/DeleteSecurityGroupRequestTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class DeleteSecurityGroupRequestTest { + + @Test + public void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void valid() { + DeleteSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/GetSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/GetSecurityGroupRequestTest.java new file mode 100644 index 00000000000..435873e76a8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/GetSecurityGroupRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class GetSecurityGroupRequestTest { + + @Test + public void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void valid() { + GetSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListRunningSecurityGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListRunningSecurityGroupsRequestTest.java new file mode 100644 index 00000000000..3f60cfc93f1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListRunningSecurityGroupsRequestTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class ListRunningSecurityGroupsRequestTest { + + @Test + public void noSpaceID() { + assertThrows( + IllegalStateException.class, + () -> { + ListRunningSecurityGroupsRequest.builder().build(); + }); + } + + @Test + public void valid() { + ListRunningSecurityGroupsRequest.builder().spaceId("space-giud1").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListSecurityGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListSecurityGroupsRequestTest.java new file mode 100644 index 00000000000..9d8ccd1f696 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListSecurityGroupsRequestTest.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import org.junit.jupiter.api.Test; + +public class ListSecurityGroupsRequestTest { + + @Test + public void valid() { + ListSecurityGroupsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListStagingSecurityGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListStagingSecurityGroupsRequestTest.java new file mode 100644 index 00000000000..9ffde0a435f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/ListStagingSecurityGroupsRequestTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class ListStagingSecurityGroupsRequestTest { + + @Test + public void noSpaceID() { + assertThrows( + IllegalStateException.class, + () -> { + ListStagingSecurityGroupsRequest.builder().build(); + }); + } + + @Test + public void valid() { + ListStagingSecurityGroupsRequest.builder().spaceId("space-giud1").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UnbindRunningSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UnbindRunningSecurityGroupRequestTest.java new file mode 100644 index 00000000000..6bacd1e034e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UnbindRunningSecurityGroupRequestTest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class UnbindRunningSecurityGroupRequestTest { + + @Test + public void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindRunningSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindRunningSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .build(); + }); + } + + @Test + public void valid() { + UnbindRunningSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .spaceId("space-guid2") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UnbindStagingSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UnbindStagingSecurityGroupRequestTest.java new file mode 100644 index 00000000000..9ab1c7fa1d4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UnbindStagingSecurityGroupRequestTest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class UnbindStagingSecurityGroupRequestTest { + + @Test + public void noSecurityGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindStagingSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindStagingSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .build(); + }); + } + + @Test + public void valid() { + UnbindStagingSecurityGroupRequest.builder() + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .spaceId("space-guid2") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UpdateSecurityGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UpdateSecurityGroupRequestTest.java new file mode 100644 index 00000000000..d0b18172b85 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/securitygroups/UpdateSecurityGroupRequestTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ +package org.cloudfoundry.client.v3.securitygroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class UpdateSecurityGroupRequestTest { + + @Test + public void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateSecurityGroupRequest.builder().build(); + }); + } + + @Test + public void valid() { + UpdateSecurityGroupRequest.builder() + .name("my-group0") + .securityGroupId("b85a788e-671f-4549-814d-e34cdb2f539a") + .globallyEnabled(GloballyEnabled.builder().running(true).build()) + .rules( + Rule.builder() + .protocol(Protocol.TCP) + .destination("10.10.10.0/24") + .ports("443,80,8080") + .build()) + .rules( + Rule.builder() + .protocol(Protocol.ICMP) + .destination("10.10.10.0/24") + .description("Allow ping requests to private services") + .type(8) + .code(0) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/CreateServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/CreateServiceBindingRequestTest.java new file mode 100644 index 00000000000..4358afb9a6e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/CreateServiceBindingRequestTest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateServiceBindingRequestTest { + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBindingRequest.builder() + .type(ServiceBindingType.APPLICATION) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBindingRequest.builder() + .relationships( + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void valid() { + CreateServiceBindingRequest.builder() + .relationships( + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build()) + .type(ServiceBindingType.APPLICATION) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/DeleteServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/DeleteServiceBindingRequestTest.java new file mode 100644 index 00000000000..436c6c31252 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/DeleteServiceBindingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceBindingRequestTest { + + @Test + void noServiceBindingId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceBindingRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceBindingRequest.builder().serviceBindingId("test-service-binding-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/GetServiceBindingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/GetServiceBindingRequestTest.java new file mode 100644 index 00000000000..7526ce4b3ac --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/GetServiceBindingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceBindingRequestTest { + + @Test + void noServiceBindingId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceBindingRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceBindingRequest.builder().serviceBindingId("test-service-binding-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/ListServiceBindingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/ListServiceBindingsRequestTest.java new file mode 100644 index 00000000000..e9d52e2c6e2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/ListServiceBindingsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import org.junit.jupiter.api.Test; + +final class ListServiceBindingsRequestTest { + + @Test + void valid() { + ListServiceBindingsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/RelationshipsTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/RelationshipsTest.java new file mode 100644 index 00000000000..8fbb5efc484 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebindings/RelationshipsTest.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.servicebindings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class RelationshipsTest { + + @Test + void noApplication() { + ServiceBindingRelationships.builder() + .serviceInstance( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build(); + } + + @Test + void noServiceInstance() { + assertThrows( + IllegalStateException.class, + () -> { + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build(); + }); + } + + @Test + void valid() { + ServiceBindingRelationships.builder() + .application( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .serviceInstance( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/CreateServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/CreateServiceBrokerRequestTest.java new file mode 100644 index 00000000000..f7c637cbaf5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/CreateServiceBrokerRequestTest.java @@ -0,0 +1,65 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceBrokerRequestTest { + + @Test + void valid() { + CreateServiceBrokerRequest.builder() + .authentication( + BasicAuthentication.builder() + .username("test-username") + .password("test-password") + .build()) + .name("test-service-broker") + .url("test-service-broker-url") + .build(); + } + + @Test + void noAuthentication() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("test-service-broker") + .url("test-service-broker-url") + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .authentication( + BasicAuthentication.builder() + .username("test-username") + .password("test-password") + .build()) + .url("test-service-broker-url") + .build(); + }); + } + + @Test + void noUrl() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .authentication( + BasicAuthentication.builder() + .username("test-username") + .password("test-password") + .build()) + .name("test-service-broker") + .build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/DeleteServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/DeleteServiceBrokerRequestTest.java new file mode 100644 index 00000000000..998a2528754 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/DeleteServiceBrokerRequestTest.java @@ -0,0 +1,22 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceBrokerRequestTest { + + @Test + void valid() { + DeleteServiceBrokerRequest.builder().serviceBrokerId("test-service-broker-id").build(); + } + + @Test + void noServiceBrokerId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceBrokerRequest.builder().build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/GetServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/GetServiceBrokerRequestTest.java new file mode 100644 index 00000000000..3616c56a5c0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/GetServiceBrokerRequestTest.java @@ -0,0 +1,22 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceBrokerRequestTest { + + @Test + void valid() { + GetServiceBrokerRequest.builder().serviceBrokerId("test-service-broker-id").build(); + } + + @Test + void noServiceBrokerId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceBrokerRequest.builder().build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/ListServiceBrokersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/ListServiceBrokersRequestTest.java new file mode 100644 index 00000000000..36df59d6f05 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/ListServiceBrokersRequestTest.java @@ -0,0 +1,11 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import org.junit.jupiter.api.Test; + +final class ListServiceBrokersRequestTest { + + @Test + void valid() { + ListServiceBrokersRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/UpdateServiceBrokerRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/UpdateServiceBrokerRequestTest.java new file mode 100644 index 00000000000..372ccc27567 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/servicebrokers/UpdateServiceBrokerRequestTest.java @@ -0,0 +1,22 @@ +package org.cloudfoundry.client.v3.servicebrokers; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServiceBrokerRequestTest { + + @Test + void valid() { + UpdateServiceBrokerRequest.builder().serviceBrokerId("test-service-broker-id").build(); + } + + @Test + void noServiceBrokerId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceBrokerRequest.builder().build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/CreateServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/CreateServiceInstanceRequestTest.java new file mode 100644 index 00000000000..e7d332cbe98 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/CreateServiceInstanceRequestTest.java @@ -0,0 +1,95 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +class CreateServiceInstanceRequestTest { + + @Test + void validManagedServiceInstance() { + CreateServiceInstanceRequest.builder() + .type(ServiceInstanceType.MANAGED) + .name("test-service-instance-name") + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-service-plan-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .tags("foo", "bar") + .parameter("key", "value") + .build(); + } + + @Test + void validUserProvidedServiceInstance() { + CreateServiceInstanceRequest.builder() + .type(ServiceInstanceType.USER_PROVIDED) + .syslogDrainUrl("https://syslog.com") + .routeServiceUrl("https://route.com") + .credential("key", "value") + .name("test-user-provided-name") + .build(); + } + + @Test + void withMissingName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder() + .type(ServiceInstanceType.MANAGED) + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + "test-service-plan-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .tags("foo", "bar") + .parameter("key", "value") + .build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/GetManagedServiceParametersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/GetManagedServiceParametersRequestTest.java new file mode 100644 index 00000000000..7af7090a464 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/GetManagedServiceParametersRequestTest.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import org.junit.jupiter.api.Test; + +class GetManagedServiceParametersRequestTest { + + @Test + void valid() { + GetManagedServiceParametersRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/GetUserProvidedCredentialsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/GetUserProvidedCredentialsRequestTest.java new file mode 100644 index 00000000000..93d1d7813ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/GetUserProvidedCredentialsRequestTest.java @@ -0,0 +1,13 @@ +package org.cloudfoundry.client.v3.serviceinstances; + +import org.junit.jupiter.api.Test; + +class GetUserProvidedCredentialsRequestTest { + + @Test + void valid() { + GetUserProvidedCredentialsRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ListServiceInstancesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ListServiceInstancesRequestTest.java new file mode 100644 index 00000000000..a39b7434d68 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ListServiceInstancesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import org.junit.jupiter.api.Test; + +class ListServiceInstancesRequestTest { + + @Test + void valid() { + ListServiceInstancesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ListSharedSpacesRelationshipTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ListSharedSpacesRelationshipTest.java new file mode 100644 index 00000000000..79bfdbc973b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ListSharedSpacesRelationshipTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ListSharedSpacesRelationshipTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ListSharedSpacesRelationshipRequest.builder().build(); + }); + } + + @Test + void valid() { + ListSharedSpacesRelationshipRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ShareServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ShareServiceInstanceRequestTest.java new file mode 100644 index 00000000000..f4b2aae344e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/ShareServiceInstanceRequestTest.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +class ShareServiceInstanceRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + ShareServiceInstanceRequest.builder() + .data(Relationship.builder().id("test-space-id").build()) + .build(); + }); + } + + @Test + void valid() { + ShareServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .data(Relationship.builder().id("test-space-id").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/UnshareServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/UnshareServiceInstanceRequestTest.java new file mode 100644 index 00000000000..bcc88bf2db0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/UnshareServiceInstanceRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UnshareServiceInstanceRequestTest { + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + UnshareServiceInstanceRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + UnshareServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + }); + } + + @Test + void valid() { + UnshareServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .spaceId("test-space-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/UpdateServiceInstanceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/UpdateServiceInstanceRequestTest.java new file mode 100644 index 00000000000..ba697de0200 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceinstances/UpdateServiceInstanceRequestTest.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceinstances; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +class UpdateServiceInstanceRequestTest { + + @Test + void serviceInstanceIdOnly() { + UpdateServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build(); + } + + @Test + void noServiceInstanceId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceInstanceRequest.builder() + .metadata(Metadata.builder().build()) + .build(); + }); + } + + @Test + void validManagedServiceInstance() { + UpdateServiceInstanceRequest.builder() + .metadata(Metadata.builder().build()) + .serviceInstanceId("test-service-instance-id") + .name("test-service-instance-name") + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-service-plan-id") + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-space-id") + .build()) + .build()) + .build()) + .tags("foo", "bar") + .parameter("key", "value") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/DeleteServiceOfferingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/DeleteServiceOfferingRequestTest.java new file mode 100644 index 00000000000..7d37e2b29d0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/DeleteServiceOfferingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceOfferingRequestTest { + + @Test + void noServiceOfferingId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceOfferingRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceOfferingRequest.builder().serviceOfferingId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/GetServiceOfferingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/GetServiceOfferingRequestTest.java new file mode 100644 index 00000000000..a1637502f0e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/GetServiceOfferingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceOfferingRequestTest { + + @Test + void noServiceOfferingId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceOfferingRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceOfferingRequest.builder().serviceOfferingId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/ListServiceOfferingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/ListServiceOfferingsRequestTest.java new file mode 100644 index 00000000000..b3d79cde5d2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/ListServiceOfferingsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import org.junit.jupiter.api.Test; + +final class ListServiceOfferingsRequestTest { + + @Test + void valid() { + ListServiceOfferingsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/UpdateServiceOfferingRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/UpdateServiceOfferingRequestTest.java new file mode 100644 index 00000000000..1b0320c2d78 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceofferings/UpdateServiceOfferingRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceofferings; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServiceOfferingRequestTest { + + @Test + void noServiceOfferingId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceOfferingRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateServiceOfferingRequest.builder().serviceOfferingId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/DeleteServicePlanRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/DeleteServicePlanRequestTest.java new file mode 100644 index 00000000000..1a196a3acce --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/DeleteServicePlanRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServicePlanRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServicePlanRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServicePlanRequest.builder().servicePlanId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/GetServicePlanRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/GetServicePlanRequestTest.java new file mode 100644 index 00000000000..ec920f5c028 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/GetServicePlanRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServicePlanRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + GetServicePlanRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServicePlanRequest.builder().servicePlanId("test-service-plan-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/ListServicePlansRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/ListServicePlansRequestTest.java new file mode 100644 index 00000000000..4f0c8a03739 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/ListServicePlansRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import org.junit.jupiter.api.Test; + +final class ListServicePlansRequestTest { + + @Test + void valid() { + ListServicePlansRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/UpdateServicePlanRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/UpdateServicePlanRequestTest.java new file mode 100644 index 00000000000..f7f611bda6e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/UpdateServicePlanRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServicePlanRequestTest { + + @Test + void noServicePlanId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServicePlanRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateServicePlanRequest.builder().servicePlanId("test-service-plan-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/UpdateServicePlanVisibilityTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/UpdateServicePlanVisibilityTest.java new file mode 100644 index 00000000000..a380eed2daa --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/serviceplans/UpdateServicePlanVisibilityTest.java @@ -0,0 +1,53 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.serviceplans; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UpdateServicePlanVisibilityTest { + + @Test + void valid() { + UpdateServicePlanVisibilityRequest.builder() + .servicePlanId("test-service-plan-id") + .type(Visibility.ORGANIZATION) + .organization( + Organization.builder() + .name("test-organization") + .guid("test-organization-id") + .build()) + .build(); + } + + @Test + void invalid() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServicePlanVisibilityRequest.builder() + .servicePlanId("test-service-plan-id") + .organization( + Organization.builder() + .name("test-organization") + .guid("test-organization-id") + .build()) + .build(); + }); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/ApplyManifestRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/ApplyManifestRequestTest.java new file mode 100644 index 00000000000..94806dd88fb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/ApplyManifestRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ApplyManifestRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + ApplyManifestRequest.builder().manifest("test-manifest".getBytes()).build(); + }); + } + + @Test + void noManifest() { + assertThrows( + IllegalStateException.class, + () -> { + ApplyManifestRequest.builder().spaceId("test-space-id").build(); + }); + } + + @Test + void valid() { + ApplyManifestRequest.builder() + .spaceId("test-space-id") + .manifest("test-manifest".getBytes()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/AssignSpaceIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/AssignSpaceIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..f8624025cf4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/AssignSpaceIsolationSegmentRequestTest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.junit.jupiter.api.Test; + +final class AssignSpaceIsolationSegmentRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + AssignSpaceIsolationSegmentRequest.builder() + .data(Relationship.builder().id("test-isolation-segment-id").build()) + .build(); + }); + } + + @Test + void validData() { + AssignSpaceIsolationSegmentRequest.builder() + .data(Relationship.builder().id("test-isolation-segment-id").build()) + .spaceId("test-space-id") + .build(); + } + + @Test + void validNoData() { + AssignSpaceIsolationSegmentRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/CreateSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/CreateSpaceRequestTest.java new file mode 100644 index 00000000000..f6cd2ce9355 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/CreateSpaceRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.junit.jupiter.api.Test; + +final class CreateSpaceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceRequest.builder() + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id("test-id") + .build()) + .build()) + .build()) + .build(); + }); + } + + @Test + void noRelationships() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + CreateSpaceRequest.builder() + .name("test-name") + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data(Relationship.builder().id("test-id").build()) + .build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/DeleteSpaceRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/DeleteSpaceRequestTest.java new file mode 100644 index 00000000000..a07f80aea82 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/DeleteSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteSpaceRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteSpaceRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/DeleteUnmappedRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/DeleteUnmappedRoutesRequestTest.java new file mode 100644 index 00000000000..80914abd57b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/DeleteUnmappedRoutesRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteUnmappedRoutesRequestTest { + + @Test + void noSpaceId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteUnmappedRoutesRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteUnmappedRoutesRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/GetSpaceIsolationSegmentRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/GetSpaceIsolationSegmentRequestTest.java new file mode 100644 index 00000000000..f15481844e7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/GetSpaceIsolationSegmentRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceIsolationSegmentRequestTest { + + @Test + void noOrganizationId() { + assertThrows( + IllegalStateException.class, + () -> { + GetSpaceIsolationSegmentRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSpaceIsolationSegmentRequest.builder().spaceId("test-space-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/ListSpacesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/ListSpacesRequestTest.java new file mode 100644 index 00000000000..b7a5ae1d618 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/spaces/ListSpacesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.spaces; + +import org.junit.jupiter.api.Test; + +final class ListSpacesRequestTest { + + @Test + void valid() { + ListSpacesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/CreateStackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/CreateStackRequestTest.java new file mode 100644 index 00000000000..aaf0dec6a8a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/CreateStackRequestTest.java @@ -0,0 +1,98 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.stream.Collectors; +import java.util.stream.Stream; +import org.cloudfoundry.client.v3.Metadata; +import org.junit.jupiter.api.Test; + +class CreateStackRequestTest { + + @Test + void invalidNameLengthTest() { + assertThrows( + IllegalStateException.class, + () -> { + String invalidName = + Stream.generate(() -> "aaa").limit(251).collect(Collectors.joining()); + + CreateStackRequest.builder().name(invalidName).build(); + }); + } + + @Test + void invalidDescriptionLengthTest() { + assertThrows( + IllegalStateException.class, + () -> { + String invalidDescription = + Stream.generate(() -> "aaa").limit(251).collect(Collectors.joining()); + + CreateStackRequest.builder() + .name("valid name") + .description(invalidDescription) + .build(); + }); + } + + @Test + void invalidNameAndDescriptionLengthTest() { + assertThrows( + IllegalStateException.class, + () -> { + String invalidName = + Stream.generate(() -> "aaa").limit(251).collect(Collectors.joining()); + String invalidDescription = + Stream.generate(() -> "aaa").limit(251).collect(Collectors.joining()); + + CreateStackRequest.builder() + .name(invalidName) + .description(invalidDescription) + .build(); + }); + } + + @Test + void validRequestTest() { + CreateStackRequest.builder().name("valid name").build(); + } + + @Test + void validRequestWithDescriptionTest() { + CreateStackRequest.builder().name("valid name").description("valid description").build(); + } + + @Test + void validRequestWithMetadataTest() { + CreateStackRequest.builder() + .name("valid name") + .metadata(Metadata.builder().label("label-key", "label-value").build()) + .build(); + } + + @Test + void validRequestWithAllFieldsTest() { + CreateStackRequest.builder() + .name("valid name") + .description("valid description") + .metadata(Metadata.builder().label("label-key", "label-value").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/DeleteStackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/DeleteStackRequestTest.java new file mode 100644 index 00000000000..09c38bc64b0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/DeleteStackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteStackRequestTest { + + @Test + void noStackId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteStackRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteStackRequest.builder().stackId("test-stack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/GetStackRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/GetStackRequestTest.java new file mode 100644 index 00000000000..48d0b7f3d24 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/stacks/GetStackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class GetStackRequestTest { + + @Test + void noStackId() { + assertThrows( + IllegalStateException.class, + () -> { + GetStackRequest.builder().build(); + }); + } + + @Test + void valid() { + GetStackRequest.builder().stackId("test-stack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/CancelTaskRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/CancelTaskRequestTest.java new file mode 100644 index 00000000000..ee97d7c7a0e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/CancelTaskRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CancelTaskRequestTest { + + @Test + void noTaskId() { + assertThrows( + IllegalStateException.class, + () -> { + CancelTaskRequest.builder().build(); + }); + } + + @Test + void valid() { + CancelTaskRequest.builder().taskId("test-task-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/CreateTaskRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/CreateTaskRequestTest.java new file mode 100644 index 00000000000..20debb3ee4f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/CreateTaskRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateTaskRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTaskRequest.builder().command("test-command").build(); + }); + } + + @Test + void noCommand() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTaskRequest.builder().applicationId("test-application-id").build(); + }); + } + + @Test + void valid() { + CreateTaskRequest.builder() + .applicationId("test-application-id") + .command("test-command") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/GetTaskRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/GetTaskRequestTest.java new file mode 100644 index 00000000000..1b8b3b25b0c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/GetTaskRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetTaskRequestTest { + + @Test + void noTaskId() { + assertThrows( + IllegalStateException.class, + () -> { + GetTaskRequest.builder().build(); + }); + } + + @Test + void valid() { + GetTaskRequest.builder().taskId("test-task-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/ListTasksRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/ListTasksRequestTest.java new file mode 100644 index 00000000000..ac38606634c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/tasks/ListTasksRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.tasks; + +import org.junit.jupiter.api.Test; + +final class ListTasksRequestTest { + + @Test + void valid() { + ListTasksRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/CreateUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/CreateUserRequestTest.java new file mode 100644 index 00000000000..66ad42259b5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/CreateUserRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import org.junit.jupiter.api.Test; + +class CreateUserRequestTest { + + @Test + void valid() { + CreateUserRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/DeleteUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/DeleteUserRequestTest.java new file mode 100644 index 00000000000..6d65354fb32 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/DeleteUserRequestTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +public class DeleteUserRequestTest { + + @Test + void noUserId() { + assertThrows(IllegalStateException.class, () -> DeleteUserRequest.builder().build()); + } + + @Test + void valid() { + DeleteUserRequest.builder().userId("test-stack-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/GetUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/GetUserRequestTest.java new file mode 100644 index 00000000000..83bb8541b99 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/GetUserRequestTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class GetUserRequestTest { + + @Test + void noUserId() { + assertThrows(IllegalStateException.class, () -> GetUserRequest.builder().build()); + } + + @Test + void valid() { + GetUserRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/ListUsersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/ListUsersRequestTest.java new file mode 100644 index 00000000000..bf30fb14ff2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/ListUsersRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import org.junit.jupiter.api.Test; + +public class ListUsersRequestTest { + + @Test + void valid() { + ListUsersRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/UpdateUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/UpdateUserRequestTest.java new file mode 100644 index 00000000000..8a1c131cda3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/client/v3/users/UpdateUserRequestTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateUserRequestTest { + + @Test + void noOrganizationQuotaId() { + assertThrows(IllegalStateException.class, () -> UpdateUserRequest.builder().build()); + } + + @Test + void valid() { + UpdateUserRequest.builder().userId("test-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ContainerMetricTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ContainerMetricTest.java new file mode 100644 index 00000000000..659649eaf46 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ContainerMetricTest.java @@ -0,0 +1,117 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ContainerMetricTest { + + @Test + void dropsonde() { + ContainerMetric.from( + new org.cloudfoundry.dropsonde.events.ContainerMetric.Builder() + .applicationId("test-application-id") + .cpuPercentage(0.0) + .diskBytes(0L) + .instanceIndex(0) + .memoryBytes(0L) + .build()); + } + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ContainerMetric.builder() + .cpuPercentage(0.0) + .diskBytes(0L) + .instanceIndex(0) + .memoryBytes(0L) + .build(); + }); + } + + @Test + void noCpuPercentage() { + assertThrows( + IllegalStateException.class, + () -> { + ContainerMetric.builder() + .applicationId("test-application-id") + .diskBytes(0L) + .instanceIndex(0) + .memoryBytes(0L) + .build(); + }); + } + + @Test + void noDiskBytes() { + assertThrows( + IllegalStateException.class, + () -> { + ContainerMetric.builder() + .applicationId("test-application-id") + .cpuPercentage(0.0) + .instanceIndex(0) + .memoryBytes(0L) + .build(); + }); + } + + @Test + void noInstanceIndex() { + assertThrows( + IllegalStateException.class, + () -> { + ContainerMetric.builder() + .applicationId("test-application-id") + .cpuPercentage(0.0) + .diskBytes(0L) + .memoryBytes(0L) + .build(); + }); + } + + @Test + void noMemoryBytes() { + assertThrows( + IllegalStateException.class, + () -> { + ContainerMetric.builder() + .applicationId("test-application-id") + .cpuPercentage(0.0) + .diskBytes(0L) + .instanceIndex(0) + .build(); + }); + } + + @Test + void valid() { + ContainerMetric.builder() + .applicationId("test-application-id") + .cpuPercentage(0.0) + .diskBytes(0L) + .instanceIndex(0) + .memoryBytes(0L) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ContainerMetricsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ContainerMetricsRequestTest.java new file mode 100644 index 00000000000..6666ffbce8c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ContainerMetricsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ContainerMetricsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + ContainerMetricsRequest.builder().build(); + }); + } + + @Test + void valid() { + ContainerMetricsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/CounterEventTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/CounterEventTest.java new file mode 100644 index 00000000000..90df2c25274 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/CounterEventTest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CounterEventTest { + + @Test + void dropsonde() { + CounterEvent.from( + new org.cloudfoundry.dropsonde.events.CounterEvent.Builder() + .delta(0L) + .name("test-name") + .build()); + } + + @Test + void noDelta() { + assertThrows( + IllegalStateException.class, + () -> { + CounterEvent.builder().name("test-name").build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CounterEvent.builder().delta(0L).build(); + }); + } + + @Test + void valid() { + CounterEvent.builder().delta(0L).name("test-name").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ErrorTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ErrorTest.java new file mode 100644 index 00000000000..1199da090bf --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ErrorTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ErrorTest { + + @Test + void dropsonde() { + Error.from( + new org.cloudfoundry.dropsonde.events.Error.Builder() + .code(0) + .message("test-message") + .source("test-source") + .build()); + } + + @Test + void noCode() { + assertThrows( + IllegalStateException.class, + () -> { + Error.builder().message("test-message").source("test-source").build(); + }); + } + + @Test + void noMessage() { + assertThrows( + IllegalStateException.class, + () -> { + Error.builder().code(0).source("test-source").build(); + }); + } + + @Test + void noSource() { + assertThrows( + IllegalStateException.class, + () -> { + Error.builder().code(0).message("test-message").build(); + }); + } + + @Test + void valid() { + Error.builder().code(0).message("test-message").source("test-source").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/FirehoseRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/FirehoseRequestTest.java new file mode 100644 index 00000000000..49f352488a2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/FirehoseRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class FirehoseRequestTest { + + @Test + void noSubscriptionId() { + assertThrows( + IllegalStateException.class, + () -> { + FirehoseRequest.builder().build(); + }); + } + + @Test + void valid() { + FirehoseRequest.builder().subscriptionId("test-subscription-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/HttpStartStopTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/HttpStartStopTest.java new file mode 100644 index 00000000000..194cc621a97 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/HttpStartStopTest.java @@ -0,0 +1,223 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.util.UUID; +import org.junit.jupiter.api.Test; + +final class HttpStartStopTest { + + @Test + void dropsonde() { + HttpStartStop.from( + new org.cloudfoundry.dropsonde.events.HttpStartStop.Builder() + .contentLength(0L) + .method(org.cloudfoundry.dropsonde.events.Method.GET) + .peerType(org.cloudfoundry.dropsonde.events.PeerType.Client) + .remoteAddress("test-remote-address") + .requestId( + new org.cloudfoundry.dropsonde.events.UUID.Builder() + .high(0L) + .low(0L) + .build()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build()); + } + + @Test + void noContentLength() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noPeerType() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noRemoteAddress() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noRequestId() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noStartTimestamp() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noStatusCode() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noStopTimestamp() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noUri() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .userAgent("test-user-agent") + .build(); + }); + } + + @Test + void noUserAgent() { + assertThrows( + IllegalStateException.class, + () -> { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .build(); + }); + } + + @Test + void valid() { + HttpStartStop.builder() + .contentLength(0L) + .peerType(PeerType.CLIENT) + .remoteAddress("test-remote-address") + .requestId(UUID.randomUUID()) + .startTimestamp(0L) + .statusCode(0) + .stopTimestamp(0L) + .uri("test-uri") + .userAgent("test-user-agent") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/LogMessageTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/LogMessageTest.java new file mode 100644 index 00000000000..1049e242cd5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/LogMessageTest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import okio.ByteString; +import org.junit.jupiter.api.Test; + +final class LogMessageTest { + + @Test + void dropsonde() { + LogMessage.from( + new org.cloudfoundry.dropsonde.events.LogMessage.Builder() + .message(ByteString.encodeUtf8("test-message")) + .message_type(org.cloudfoundry.dropsonde.events.LogMessage.MessageType.ERR) + .timestamp(0L) + .build()); + } + + @Test + void noMessage() { + assertThrows( + IllegalStateException.class, + () -> { + LogMessage.builder().messageType(MessageType.ERR).timestamp(0L).build(); + }); + } + + @Test + void noMessageType() { + assertThrows( + IllegalStateException.class, + () -> { + LogMessage.builder().message("test-message").timestamp(0L).build(); + }); + } + + @Test + void noTimestamp() { + assertThrows( + IllegalStateException.class, + () -> { + LogMessage.builder() + .message("test-message") + .messageType(MessageType.ERR) + .build(); + }); + } + + @Test + void valid() { + LogMessage.builder() + .message("test-message") + .messageType(MessageType.ERR) + .timestamp(0L) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/RecentLogsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/RecentLogsRequestTest.java new file mode 100644 index 00000000000..fa3f02c6c9d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/RecentLogsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RecentLogsRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + RecentLogsRequest.builder().build(); + }); + } + + @Test + void valid() { + RecentLogsRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/StreamRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/StreamRequestTest.java new file mode 100644 index 00000000000..625da4cba97 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/StreamRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class StreamRequestTest { + + @Test + void noApplicationId() { + assertThrows( + IllegalStateException.class, + () -> { + StreamRequest.builder().build(); + }); + } + + @Test + void valid() { + StreamRequest.builder().applicationId("test-application-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/UuidUtilsTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/UuidUtilsTest.java new file mode 100644 index 00000000000..1d9bbca065e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/UuidUtilsTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import java.util.UUID; +import org.junit.jupiter.api.Test; + +final class UuidUtilsTest { + + @Test + void from() { + org.cloudfoundry.dropsonde.events.UUID dropsondeUuid = + new org.cloudfoundry.dropsonde.events.UUID.Builder() + .high(0x79d4c3b2020e67a5L) + .low(0x7243cc580bc17af4L) + .build(); + + assertEquals( + UUID.fromString("f47ac10b-58cc-4372-a567-0e02b2c3d479"), + UuidUtils.from(dropsondeUuid)); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ValueMetricTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ValueMetricTest.java new file mode 100644 index 00000000000..204a9978933 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/doppler/ValueMetricTest.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.doppler; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ValueMetricTest { + + @Test + void dropsonde() { + ValueMetric.from( + new org.cloudfoundry.dropsonde.events.ValueMetric.Builder() + .name("test-name") + .unit("test-unit") + .value(0.0) + .build()); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + ValueMetric.builder().unit("test-unit").value(0.0).build(); + }); + } + + @Test + void noUnit() { + assertThrows( + IllegalStateException.class, + () -> { + ValueMetric.builder().name("test-name").value(0.0).build(); + }); + } + + @Test + void noValue() { + assertThrows( + IllegalStateException.class, + () -> { + ValueMetric.builder().name("test-name").unit("test-unit").build(); + }); + } + + @Test + void valid() { + ValueMetric.builder().name("test-name").unit("test-unit").value(0.0).build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/CounterTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/CounterTest.java new file mode 100644 index 00000000000..507b268f3b3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/CounterTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class CounterTest { + + @Test + void valid() { + Counter.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EnvelopeBatchTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EnvelopeBatchTest.java new file mode 100644 index 00000000000..3758990383d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EnvelopeBatchTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class EnvelopeBatchTest { + + @Test + void valid() { + EnvelopeBatch.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EnvelopeTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EnvelopeTest.java new file mode 100644 index 00000000000..ac6dc93f6ed --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EnvelopeTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class EnvelopeTest { + + @Test + void valid() { + Envelope.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EventTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EventTest.java new file mode 100644 index 00000000000..9f44751c808 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/EventTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class EventTest { + + @Test + void valid() { + Event.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/GaugeTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/GaugeTest.java new file mode 100644 index 00000000000..b280e8bf0c6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/GaugeTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class GaugeTest { + + @Test + void valid() { + Gauge.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/InfoRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/InfoRequestTest.java new file mode 100644 index 00000000000..860b1deaa66 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/InfoRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class InfoRequestTest { + + @Test + void valid() { + InfoRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/InfoResponseTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/InfoResponseTest.java new file mode 100644 index 00000000000..0196a23356c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/InfoResponseTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class InfoResponseTest { + + @Test + void valid() { + InfoResponse.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/LogTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/LogTest.java new file mode 100644 index 00000000000..756f3fb9428 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/LogTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.nio.charset.StandardCharsets; +import java.util.Base64; +import org.junit.jupiter.api.Test; + +class LogTest { + + @Test + void valid() { + Log.builder().build(); + } + + @Test + void getPayloadAsText() { + final String payload = "This is a test."; + final String encodedPayload = + Base64.getEncoder().encodeToString(payload.getBytes(StandardCharsets.UTF_8)); + + assertThat(Log.builder().payload(encodedPayload).build().getPayloadAsText()) + .isEqualTo(payload); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetaResponseTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetaResponseTest.java new file mode 100644 index 00000000000..10259b3b23b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetaResponseTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class MetaResponseTest { + + @Test + void valid() { + MetaResponse.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetadataTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetadataTest.java new file mode 100644 index 00000000000..0e1b5e39b7f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetadataTest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class MetadataTest { + + @Test + void missingCount() { + assertThrows( + IllegalStateException.class, + () -> { + Metadata.builder().expired(1L).newestTimestamp(1L).oldestTimestamp(1L).build(); + }); + } + + @Test + void missingNewestTimestamp() { + assertThrows( + IllegalStateException.class, + () -> { + Metadata.builder().count(1L).expired(1L).oldestTimestamp(1L).build(); + }); + } + + @Test + void missingOldestTimestamp() { + assertThrows( + IllegalStateException.class, + () -> { + Metadata.builder().count(1L).expired(1L).newestTimestamp(1L).build(); + }); + } + + @Test + void valid() { + Metadata.builder().count(1L).expired(1L).newestTimestamp(1L).oldestTimestamp(1L).build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetricTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetricTest.java new file mode 100644 index 00000000000..8fbeb6da1d9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/MetricTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class MetricTest { + + @Test + void valid() { + Metric.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/ReadRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/ReadRequestTest.java new file mode 100644 index 00000000000..18d5f0e52eb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/ReadRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ReadRequestTest { + + @Test + void noSourceId() { + assertThrows( + IllegalStateException.class, + () -> { + ReadRequest.builder().build(); + }); + } + + @Test + void valid() { + ReadRequest.builder().sourceId("test").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/ReadResponseTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/ReadResponseTest.java new file mode 100644 index 00000000000..f593be0a6b6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/ReadResponseTest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +class ReadResponseTest { + + @Test + void missingEnvelopes() { + assertThat(ReadResponse.builder().build().getEnvelopes()).isNotNull(); + } + + @Test + void valid() { + ReadResponse.builder().envelopes(EnvelopeBatch.builder().build()).build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/TimerTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/TimerTest.java new file mode 100644 index 00000000000..a6dc7773b28 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/logcache/v1/TimerTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.junit.jupiter.api.Test; + +class TimerTest { + + @Test + void valid() { + Timer.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/CreatePoliciesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/CreatePoliciesRequestTest.java new file mode 100644 index 00000000000..62571081a24 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/CreatePoliciesRequestTest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class CreatePoliciesRequestTest { + + @Test + void noPolicy() { + assertThrows( + IllegalStateException.class, + () -> { + CreatePoliciesRequest.builder().build(); + }); + } + + @Test + void valid() { + CreatePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination.builder() + .id("test-destination-id") + .ports(Ports.builder().end(2).start(1).build()) + .protocol("test-protocol") + .build()) + .source(Source.builder().id("test-source-id").build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/DeletePoliciesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/DeletePoliciesRequestTest.java new file mode 100644 index 00000000000..b2fdcdd5d3a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/DeletePoliciesRequestTest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeletePoliciesRequestTest { + + @Test + void noPolicy() { + assertThrows( + IllegalStateException.class, + () -> { + DeletePoliciesRequest.builder().build(); + }); + } + + @Test + void valid() { + DeletePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination.builder() + .id("test-destination-id") + .ports(Ports.builder().end(2).start(1).build()) + .protocol("test-protocol") + .build()) + .source(Source.builder().id("test-source-id").build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/ListPoliciesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/ListPoliciesRequestTest.java new file mode 100644 index 00000000000..694c7936714 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/policies/ListPoliciesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.policies; + +import org.junit.jupiter.api.Test; + +class ListPoliciesRequestTest { + + @Test + void valid() { + ListPoliciesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/tags/ListTagsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/tags/ListTagsRequestTest.java new file mode 100644 index 00000000000..fc090a6cb9d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/networking/v1/tags/ListTagsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1.tags; + +import org.junit.jupiter.api.Test; + +class ListTagsRequestTest { + + @Test + void valid() { + ListTagsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/routergroups/ListRouterGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/routergroups/ListRouterGroupsRequestTest.java new file mode 100644 index 00000000000..97a77ad6482 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/routergroups/ListRouterGroupsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import org.junit.jupiter.api.Test; + +class ListRouterGroupsRequestTest { + + @Test + void valid() { + ListRouterGroupsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/routergroups/UpdateRouterGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/routergroups/UpdateRouterGroupRequestTest.java new file mode 100644 index 00000000000..08063674d42 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/routergroups/UpdateRouterGroupRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.routergroups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UpdateRouterGroupRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateRouterGroupRequest.builder().reservablePorts("999-9999").build(); + }); + } + + @Test + void noReservablePorts() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateRouterGroupRequest.builder() + .routerGroupId("test-router-group-id") + .build(); + }); + } + + @Test + void valid() { + UpdateRouterGroupRequest.builder() + .reservablePorts("999-9999") + .routerGroupId("test-router-group-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/CreateTcpRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/CreateTcpRoutesRequestTest.java new file mode 100644 index 00000000000..ab6331528db --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/CreateTcpRoutesRequestTest.java @@ -0,0 +1,123 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class CreateTcpRoutesRequestTest { + + @Test + void noBackendIp() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendPort(9999) + .port(999) + .routerGroupId("test-router-group-id") + .ttl(99) + .build()) + .build(); + }); + } + + @Test + void noBackendPort() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp("test-backend-ip") + .port(999) + .routerGroupId("test-router-group-id") + .ttl(99) + .build()) + .build(); + }); + } + + @Test + void noPort() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .routerGroupId("test-router-group-id") + .ttl(99) + .build()) + .build(); + }); + } + + @Test + void noRouterGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .port(999) + .ttl(99) + .build()) + .build(); + }); + } + + @Test + void noTtl() { + assertThrows( + IllegalStateException.class, + () -> { + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .port(999) + .routerGroupId("test-router-group-id") + .build()) + .build(); + }); + } + + @Test + void valid() { + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .port(999) + .routerGroupId("test-router-group-id") + .ttl(99) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/DeleteTcpRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/DeleteTcpRoutesRequestTest.java new file mode 100644 index 00000000000..1fcae6c6b3d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/DeleteTcpRoutesRequestTest.java @@ -0,0 +1,101 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteTcpRoutesRequestTest { + + @Test + void noBackendIp() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendPort(9999) + .port(999) + .routerGroupId("test-router-group-id") + .build()) + .build(); + }); + } + + @Test + void noBackendPort() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendIp("test-backend-ip") + .port(999) + .routerGroupId("test-router-group-id") + .build()) + .build(); + }); + } + + @Test + void noPort() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .routerGroupId("test-router-group-id") + .build()) + .build(); + }); + } + + @Test + void noRouterGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .port(999) + .build()) + .build(); + }); + } + + @Test + void valid() { + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendIp("test-backend-ip") + .backendPort(9999) + .port(999) + .routerGroupId("test-router-group-id") + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/ListTcpRoutesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/ListTcpRoutesRequestTest.java new file mode 100644 index 00000000000..cbe0d3bc3e3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/routing/v1/tcproutes/ListTcpRoutesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1.tcproutes; + +import org.junit.jupiter.api.Test; + +class ListTcpRoutesRequestTest { + + @Test + void valid() { + ListTcpRoutesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/SortOrderTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/SortOrderTest.java new file mode 100644 index 00000000000..fe31082074d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/SortOrderTest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.uaa.SortOrder.ASCENDING; +import static org.cloudfoundry.uaa.SortOrder.DESCENDING; + +import org.junit.jupiter.api.Test; + +final class SortOrderTest { + + @Test + void sortOrder() { + assertThat(ASCENDING.getValue()).isEqualTo("ascending"); + assertThat(DESCENDING.getValue()).isEqualTo("descending"); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/UaaExceptionTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/UaaExceptionTest.java new file mode 100644 index 00000000000..9307b404449 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/UaaExceptionTest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +final class UaaExceptionTest { + + @Test + void test() { + assertThat( + new UaaException( + -1, "test-error", "test-error-description", "some error payload")) + .hasNoCause() + .hasMessage("test-error: test-error-description") + .extracting("statusCode", "error", "errorDescription", "payload") + .containsExactly(-1, "test-error", "test-error-description", "some error payload"); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantApiRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantApiRequestTest.java new file mode 100644 index 00000000000..a099b93307b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantApiRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByAuthorizationCodeGrantApiRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .redirectUri("http://redirect.to/app") + .state("test-state") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .state("test-state") + .build(); + } + + @Test + void validMin() { + AuthorizeByAuthorizationCodeGrantApiRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantBrowserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantBrowserRequestTest.java new file mode 100644 index 00000000000..4aa8c21793b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantBrowserRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByAuthorizationCodeGrantBrowserRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByAuthorizationCodeGrantBrowserRequest.builder() + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByAuthorizationCodeGrantBrowserRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + AuthorizeByAuthorizationCodeGrantBrowserRequest.builder() + .clientId("test-client-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantHybridRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantHybridRequestTest.java new file mode 100644 index 00000000000..9eb1f7021d5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByAuthorizationCodeGrantHybridRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByAuthorizationCodeGrantHybridRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByAuthorizationCodeGrantHybridRequest.builder() + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByAuthorizationCodeGrantHybridRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + AuthorizeByAuthorizationCodeGrantHybridRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByImplicitGrantBrowserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByImplicitGrantBrowserRequestTest.java new file mode 100644 index 00000000000..af9f338aeff --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByImplicitGrantBrowserRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByImplicitGrantBrowserRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByImplicitGrantBrowserRequest.builder() + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByImplicitGrantBrowserRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + AuthorizeByImplicitGrantBrowserRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithAuthorizationCodeGrantRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithAuthorizationCodeGrantRequestTest.java new file mode 100644 index 00000000000..8099169de38 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithAuthorizationCodeGrantRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByOpenIdWithAuthorizationCodeGrantRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.builder() + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.builder() + .clientId("test-client-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithIdTokenRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithIdTokenRequestTest.java new file mode 100644 index 00000000000..05d4b95172a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithIdTokenRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByOpenIdWithIdTokenRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByOpenIdWithIdTokenRequest.builder() + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByOpenIdWithIdTokenRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + AuthorizeByOpenIdWithIdTokenRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithImplicitGrantRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithImplicitGrantRequestTest.java new file mode 100644 index 00000000000..cd2e3d41c65 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/AuthorizeByOpenIdWithImplicitGrantRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AuthorizeByOpenIdWithImplicitGrantRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AuthorizeByOpenIdWithImplicitGrantRequest.builder() + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + AuthorizeByOpenIdWithImplicitGrantRequest.builder() + .clientId("test-client-id") + .redirectUri("http://redirect.to/app") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + AuthorizeByOpenIdWithImplicitGrantRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/GetOpenIdProviderConfigurationRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/GetOpenIdProviderConfigurationRequestTest.java new file mode 100644 index 00000000000..b1ca3c0ce77 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/authorizations/GetOpenIdProviderConfigurationRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.authorizations; + +import org.junit.jupiter.api.Test; + +final class GetOpenIdProviderConfigurationRequestTest { + + @Test + void valid() { + GetOpenIdProviderConfigurationRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchChangeSecretRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchChangeSecretRequestTest.java new file mode 100644 index 00000000000..86e987d2eb2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchChangeSecretRequestTest.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BatchChangeSecretRequestTest { + + @Test + void emptyChangeSecrets() { + assertThrows( + IllegalStateException.class, + () -> { + BatchChangeSecretRequest.builder().changeSecrets().build(); + }); + } + + @Test + void noChangeSecrets() { + assertThrows( + IllegalStateException.class, + () -> { + BatchChangeSecretRequest.builder().build(); + }); + } + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + BatchChangeSecretRequest.builder() + .changeSecret(ChangeSecret.builder().secret("test-secret").build()) + .build(); + }); + } + + @Test + void noSecret() { + assertThrows( + IllegalStateException.class, + () -> { + BatchChangeSecretRequest.builder() + .changeSecret(ChangeSecret.builder().clientId("test-client-id").build()) + .build(); + }); + } + + @Test + void valid() { + BatchChangeSecretRequest.builder() + .changeSecret( + ChangeSecret.builder() + .clientId("test-client-id") + .oldSecret("test-old-secret") + .secret("test-secret") + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchCreateClientsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchCreateClientsRequestTest.java new file mode 100644 index 00000000000..4fd51d5ee2c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchCreateClientsRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BatchCreateClientsRequestTest { + + @Test + void emptyClient() { + assertThrows( + IllegalStateException.class, + () -> { + BatchCreateClientsRequest.builder().clients().build(); + }); + } + + @Test + void noClient() { + assertThrows( + IllegalStateException.class, + () -> { + BatchCreateClientsRequest.builder().build(); + }); + } + + @Test + void valid() { + BatchCreateClientsRequest.builder() + .client( + CreateClient.builder() + .clientId("test-client-id") + .authorizedGrantType(CLIENT_CREDENTIALS) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchDeleteClientsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchDeleteClientsRequestTest.java new file mode 100644 index 00000000000..dd9669c82bd --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchDeleteClientsRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BatchDeleteClientsRequestTest { + + @Test + void emptyClientIds() { + assertThrows( + IllegalStateException.class, + () -> { + BatchDeleteClientsRequest.builder().clientIds().build(); + }); + } + + @Test + void noClientIds() { + assertThrows( + IllegalStateException.class, + () -> { + BatchDeleteClientsRequest.builder().build(); + }); + } + + @Test + void valid() { + BatchDeleteClientsRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchUpdateClientsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchUpdateClientsRequestTest.java new file mode 100644 index 00000000000..0b3a2ebc8b3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/BatchUpdateClientsRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BatchUpdateClientsRequestTest { + + @Test + void emptyClient() { + assertThrows( + IllegalStateException.class, + () -> { + BatchUpdateClientsRequest.builder().clients().build(); + }); + } + + @Test + void noClient() { + assertThrows( + IllegalStateException.class, + () -> { + BatchUpdateClientsRequest.builder().build(); + }); + } + + @Test + void valid() { + BatchUpdateClientsRequest.builder() + .client( + UpdateClient.builder() + .clientId("test-client-id") + .authorizedGrantType(CLIENT_CREDENTIALS) + .build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ChangeSecretRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ChangeSecretRequestTest.java new file mode 100644 index 00000000000..856c22d0e35 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ChangeSecretRequestTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ChangeSecretRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + ChangeSecretRequest.builder().secret("test-secret").build(); + }); + } + + @Test + void noSecret() { + assertThrows( + IllegalStateException.class, + () -> { + ChangeSecretRequest.builder().clientId("test-client-id").build(); + }); + } + + @Test + void valid() { + ChangeSecretRequest.builder() + .clientId("test-client-id") + .oldSecret("test-old-secret") + .secret("test-secret") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/CreateClientRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/CreateClientRequestTest.java new file mode 100644 index 00000000000..32a79bfed23 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/CreateClientRequestTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateClientRequestTest { + + @Test + void noAuthorizedGrantType() { + assertThrows( + IllegalStateException.class, + () -> { + CreateClientRequest.builder().clientId("test-client-id").build(); + }); + } + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + CreateClientRequest.builder().authorizedGrantType(CLIENT_CREDENTIALS).build(); + }); + } + + @Test + void valid() { + CreateClientRequest.builder() + .clientId("test-client-id") + .authorizedGrantType(CLIENT_CREDENTIALS) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/DeleteClientRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/DeleteClientRequestTest.java new file mode 100644 index 00000000000..66cff72e393 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/DeleteClientRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteClientRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteClientRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteClientRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/GetClientRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/GetClientRequestTest.java new file mode 100644 index 00000000000..9aec7dbbcad --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/GetClientRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetClientRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + GetClientRequest.builder().build(); + }); + } + + @Test + void valid() { + GetClientRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/GetMetadataRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/GetMetadataRequestTest.java new file mode 100644 index 00000000000..94923f0374f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/GetMetadataRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetMetadataRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetMetadataRequest.builder().build(); + }); + } + + @Test + void valid() { + GetMetadataRequest.builder().clientId("test-client-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ListClientsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ListClientsRequestTest.java new file mode 100644 index 00000000000..0216011daf8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ListClientsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.junit.jupiter.api.Test; + +final class ListClientsRequestTest { + + @Test + void valid() { + ListClientsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ListMetadatasRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ListMetadatasRequestTest.java new file mode 100644 index 00000000000..55fe77835c0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/ListMetadatasRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.junit.jupiter.api.Test; + +final class ListMetadatasRequestTest { + + @Test + void valid() { + ListMetadatasRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/MixedActionsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/MixedActionsRequestTest.java new file mode 100644 index 00000000000..af908bda02d --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/MixedActionsRequestTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.cloudfoundry.uaa.tokens.GrantType.IMPLICIT; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class MixedActionsRequestTest { + + @Test + void emptyAction() { + assertThrows( + IllegalStateException.class, + () -> { + MixedActionsRequest.builder().actions().build(); + }); + } + + @Test + void noAction() { + assertThrows( + IllegalStateException.class, + () -> { + MixedActionsRequest.builder().build(); + }); + } + + @Test + void valid() { + MixedActionsRequest.builder() + .action( + CreateClientAction.builder() + .authorizedGrantType(IMPLICIT) + .clientId("test-client-id") + .build()) + .action(DeleteClientAction.builder().clientId("test-client-id").build()) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/UpdateClientRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/UpdateClientRequestTest.java new file mode 100644 index 00000000000..fb3ddf0e77c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/UpdateClientRequestTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateClientRequestTest { + + @Test + void noAuthorizedGrantType() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateClientRequest.builder().clientId("test-client-id").build(); + }); + } + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateClientRequest.builder().authorizedGrantType(CLIENT_CREDENTIALS).build(); + }); + } + + @Test + void valid() { + UpdateClientRequest.builder() + .authorizedGrantType(CLIENT_CREDENTIALS) + .clientId("test-client-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/UpdateMetadataRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/UpdateMetadataRequestTest.java new file mode 100644 index 00000000000..7b4015b17d3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/clients/UpdateMetadataRequestTest.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.clients; + +import org.junit.jupiter.api.Test; + +final class UpdateMetadataRequestTest { + + @Test + void valid() { + UpdateMetadataRequest.builder() + .appIcon("test-icon") + .appLaunchUrl("test-app-launch-url") + .showOnHomePage(true) + .clientId("test-client-id") + .clientName("test-client-name") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/AddMemberRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/AddMemberRequestTest.java new file mode 100644 index 00000000000..1eb7dd2e424 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/AddMemberRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AddMemberRequestTest { + + @Test + void noGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + AddMemberRequest.builder() + .origin("test-origin") + .memberId("test-member-id") + .type(MemberType.USER) + .build(); + }); + } + + @Test + void noMemberId() { + assertThrows( + IllegalStateException.class, + () -> { + AddMemberRequest.builder() + .groupId("test-group-id") + .origin("test-origin") + .type(MemberType.USER) + .build(); + }); + } + + @Test + void noOrigin() { + assertThrows( + IllegalStateException.class, + () -> { + AddMemberRequest.builder() + .groupId("test-group-id") + .memberId("test-member-id") + .type(MemberType.USER) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + AddMemberRequest.builder() + .groupId("test-group-id") + .memberId("test-member-id") + .origin("test-origin") + .build(); + }); + } + + @Test + void valid() { + AddMemberRequest.builder() + .groupId("test-group-id") + .memberId("test-member-id") + .origin("test-origin") + .type(MemberType.USER) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/CheckMembershipRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/CheckMembershipRequestTest.java new file mode 100644 index 00000000000..39b4946e0eb --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/CheckMembershipRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CheckMembershipRequestTest { + + @Test + void noGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + CheckMembershipRequest.builder().memberId("test-member-id").build(); + }); + } + + @Test + void noMemberId() { + assertThrows( + IllegalStateException.class, + () -> { + CheckMembershipRequest.builder().groupId("test-group-id").build(); + }); + } + + @Test + void valid() { + CheckMembershipRequest.builder() + .groupId("test-group-id") + .memberId("test-member-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/CreateGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/CreateGroupRequestTest.java new file mode 100644 index 00000000000..4c4abdd8ff1 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/CreateGroupRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateGroupRequestTest { + + @Test + void noDisplayName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateGroupRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateGroupRequest.builder().displayName("group-test").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/DeleteGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/DeleteGroupRequestTest.java new file mode 100644 index 00000000000..24c918fa0ca --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/DeleteGroupRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteGroupRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteGroupRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteGroupRequest.builder().groupId("test-group-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/GetGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/GetGroupRequestTest.java new file mode 100644 index 00000000000..acdbb4d32ae --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/GetGroupRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetGroupRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + GetGroupRequest.builder().build(); + }); + } + + @Test + void valid() { + GetGroupRequest.builder().groupId("test-group-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListExternalGroupMappingsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListExternalGroupMappingsRequestTest.java new file mode 100644 index 00000000000..a61fb8a4805 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListExternalGroupMappingsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import org.junit.jupiter.api.Test; + +final class ListExternalGroupMappingsRequestTest { + + @Test + void valid() { + ListExternalGroupMappingsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListGroupsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListGroupsRequestTest.java new file mode 100644 index 00000000000..568435bfda4 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListGroupsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import org.junit.jupiter.api.Test; + +class ListGroupsRequestTest { + + @Test + void valid() { + ListGroupsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListMembersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListMembersRequestTest.java new file mode 100644 index 00000000000..85a25d5a859 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/ListMembersRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListMembersRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + ListMembersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListMembersRequest.builder().groupId("test-group-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/MapExternalGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/MapExternalGroupRequestTest.java new file mode 100644 index 00000000000..4801ed1ccb9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/MapExternalGroupRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class MapExternalGroupRequestTest { + + @Test + void noExternalGroup() { + assertThrows( + IllegalStateException.class, + () -> { + MapExternalGroupRequest.builder().groupId("test-group-id").build(); + }); + } + + @Test + void noGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + MapExternalGroupRequest.builder().externalGroup("test-external-group").build(); + }); + } + + @Test + void valid() { + MapExternalGroupRequest.builder() + .groupId("test-group-id") + .externalGroup("test-external-group") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/RemoveMemberRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/RemoveMemberRequestTest.java new file mode 100644 index 00000000000..9a9d22cd2c3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/RemoveMemberRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveMemberRequestTest { + + @Test + void noGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveMemberRequest.builder().memberId("test-member-id").build(); + }); + } + + @Test + void noMemberId() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveMemberRequest.builder().groupId("test-group-id").build(); + }); + } + + @Test + void valid() { + RemoveMemberRequest.builder().groupId("test-group-id").memberId("test-member-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UnmapExternalGroupByGroupDisplayNameRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UnmapExternalGroupByGroupDisplayNameRequestTest.java new file mode 100644 index 00000000000..6fe98536c98 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UnmapExternalGroupByGroupDisplayNameRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnmapExternalGroupByGroupDisplayNameRequestTest { + + @Test + void noExternalGroup() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapExternalGroupByGroupDisplayNameRequest.builder() + .groupDisplayName("test-group-display-name") + .origin("test-origin") + .build(); + }); + } + + @Test + void noGroupDisplayName() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapExternalGroupByGroupDisplayNameRequest.builder() + .externalGroup("test-external-group") + .origin("test-origin") + .build(); + }); + } + + @Test + void noOrigin() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapExternalGroupByGroupDisplayNameRequest.builder() + .groupDisplayName("test-group-display-name") + .externalGroup("test-external-group") + .build(); + }); + } + + @Test + void valid() { + UnmapExternalGroupByGroupDisplayNameRequest.builder() + .groupDisplayName("test-group-display-name") + .externalGroup("test-external-group") + .origin("test-origin") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UnmapExternalGroupByGroupIdRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UnmapExternalGroupByGroupIdRequestTest.java new file mode 100644 index 00000000000..56d2fa643b2 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UnmapExternalGroupByGroupIdRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnmapExternalGroupByGroupIdRequestTest { + + @Test + void noExternalGroup() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapExternalGroupByGroupIdRequest.builder() + .groupId("test-group-id") + .origin("test-origin") + .build(); + }); + } + + @Test + void noGroupId() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapExternalGroupByGroupIdRequest.builder() + .externalGroup("test-external-group") + .origin("test-origin") + .build(); + }); + } + + @Test + void noOrigin() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapExternalGroupByGroupIdRequest.builder() + .groupId("test-group-id") + .externalGroup("test-external-group") + .build(); + }); + } + + @Test + void valid() { + UnmapExternalGroupByGroupIdRequest.builder() + .groupId("test-group-id") + .externalGroup("test-external-group") + .origin("test-origin") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UpdateGroupRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UpdateGroupRequestTest.java new file mode 100644 index 00000000000..f5adfe2228a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/groups/UpdateGroupRequestTest.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.groups; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateGroupRequestTest { + + @Test + void noDisplayName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateGroupRequest.builder().groupId("test-group-id").version("*").build(); + }); + } + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateGroupRequest.builder() + .identityZoneId("test-identity-zone-id") + .displayName("group-test") + .version("*") + .build(); + }); + } + + @Test + void noIdentityZoneId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateGroupRequest.builder().displayName("group-test").version("*").build(); + }); + } + + @Test + void noVersion() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateGroupRequest.builder() + .identityZoneId("test-identity-zone-id") + .displayName("group-test") + .groupId("test-group-id") + .build(); + }); + } + + @Test + void valid() { + UpdateGroupRequest.builder() + .identityZoneId("test-identity-zone-id") + .displayName("group-test") + .groupId("test-group-id") + .version("*") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/AttributeMappingsTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/AttributeMappingsTest.java new file mode 100644 index 00000000000..89d1324b6b0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/AttributeMappingsTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import org.junit.jupiter.api.Test; + +final class AttributeMappingsTest { + + @Test + void valid() { + AttributeMappings.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/CreateIdentityProviderRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/CreateIdentityProviderRequestTest.java new file mode 100644 index 00000000000..144bc658733 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/CreateIdentityProviderRequestTest.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateIdentityProviderRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateIdentityProviderRequest.builder() + .configuration( + SamlConfiguration.builder() + .metaDataLocation("test-metadata-location") + .build()) + .identityZoneId("test-identity-zone-id") + .type(Type.SAML) + .originKey("test-origin-key") + .build(); + }); + } + + @Test + void noOriginKey() { + assertThrows( + IllegalStateException.class, + () -> { + CreateIdentityProviderRequest.builder() + .configuration( + SamlConfiguration.builder() + .metaDataLocation("test-metadata-location") + .build()) + .identityZoneId("test-identity-zone-id") + .name("test-name") + .type(Type.SAML) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + CreateIdentityProviderRequest.builder() + .configuration( + SamlConfiguration.builder() + .metaDataLocation("test-metadata-location") + .build()) + .identityZoneId("test-identity-zone-id") + .name("test-name") + .originKey("test-origin-key") + .build(); + }); + } + + @Test + void valid() { + CreateIdentityProviderRequest.builder() + .configuration( + SamlConfiguration.builder() + .metaDataLocation("test-metadata-location") + .build()) + .identityZoneId("test-identity-zone-id") + .name("test-name") + .originKey("test-origin-key") + .type(Type.SAML) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/DeleteIdentityProviderRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/DeleteIdentityProviderRequestTest.java new file mode 100644 index 00000000000..348ccdded6e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/DeleteIdentityProviderRequestTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteIdentityProviderRequestTest { + + @Test + void noIdentityProviderId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteIdentityProviderRequest.builder() + .identityZoneId("test-identity-zone-id") + .build(); + }); + } + + @Test + void valid() { + DeleteIdentityProviderRequest.builder() + .identityProviderId("test-identity-provider-id") + .identityZoneId("test-identity-zone-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/GetIdentityProviderRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/GetIdentityProviderRequestTest.java new file mode 100644 index 00000000000..03e8e775dab --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/GetIdentityProviderRequestTest.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetIdentityProviderRequestTest { + + @Test + void noIdentityProviderId() { + assertThrows( + IllegalStateException.class, + () -> { + GetIdentityProviderRequest.builder() + .identityZoneId("test-identity-zone-id") + .build(); + }); + } + + @Test + void valid() { + GetIdentityProviderRequest.builder() + .identityProviderId("test-identity-provider-id") + .identityZoneId("test-identity-zone-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/InternalConfigurationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/InternalConfigurationTest.java new file mode 100644 index 00000000000..490c597d02c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/InternalConfigurationTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import org.junit.jupiter.api.Test; + +final class InternalConfigurationTest { + + @Test + void valid() { + InternalConfiguration.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/KeystoneConfigurationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/KeystoneConfigurationTest.java new file mode 100644 index 00000000000..b1c3bc9f23b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/KeystoneConfigurationTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import org.junit.jupiter.api.Test; + +final class KeystoneConfigurationTest { + + @Test + void valid() { + KeystoneConfiguration.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/LdapConfigurationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/LdapConfigurationTest.java new file mode 100644 index 00000000000..70325c9e75c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/LdapConfigurationTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import org.junit.jupiter.api.Test; + +final class LdapConfigurationTest { + + @Test + void valid() { + LdapConfiguration.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/ListIdentityProvidersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/ListIdentityProvidersRequestTest.java new file mode 100644 index 00000000000..37f2be26984 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/ListIdentityProvidersRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import org.junit.jupiter.api.Test; + +final class ListIdentityProvidersRequestTest { + + @Test + void valid() { + ListIdentityProvidersRequest.builder().identityZoneId("text-identity-zone-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/LockoutPolicyTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/LockoutPolicyTest.java new file mode 100644 index 00000000000..047282f2a10 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/LockoutPolicyTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class LockoutPolicyTest { + + @Test + void noLockAccountPeriodInSecond() { + assertThrows( + IllegalStateException.class, + () -> { + LockoutPolicy.builder() + .lockoutPeriodInSecond(0) + .numberOfAllowedFailures(0) + .build(); + }); + } + + @Test + void noLockoutPeriodInSecond() { + assertThrows( + IllegalStateException.class, + () -> { + LockoutPolicy.builder() + .lockAccountPeriodInSecond(0) + .numberOfAllowedFailures(0) + .build(); + }); + } + + @Test + void noNumberOfAllowedFailures() { + assertThrows( + IllegalStateException.class, + () -> { + LockoutPolicy.builder() + .lockAccountPeriodInSecond(0) + .lockoutPeriodInSecond(0) + .build(); + }); + } + + @Test + void valid() { + LockoutPolicy.builder() + .lockAccountPeriodInSecond(0) + .lockoutPeriodInSecond(0) + .numberOfAllowedFailures(0) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/OAuth2ConfigurationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/OAuth2ConfigurationTest.java new file mode 100644 index 00000000000..36ca277a697 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/OAuth2ConfigurationTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class OAuth2ConfigurationTest { + + @Test + void noAuthUrl() { + assertThrows( + IllegalStateException.class, + () -> { + OAuth2Configuration.builder() + .tokenUrl("test-token-url") + .relyingPartyId("test-relying-party-id") + .build(); + }); + } + + @Test + void noRelyingPartyId() { + assertThrows( + IllegalStateException.class, + () -> { + OAuth2Configuration.builder() + .authUrl("test-auth-url") + .tokenUrl("test-token-url") + .build(); + }); + } + + @Test + void noTokenUrl() { + assertThrows( + IllegalStateException.class, + () -> { + OAuth2Configuration.builder() + .authUrl("test-auth-url") + .relyingPartyId("test-relying-party-id") + .build(); + }); + } + + @Test + void valid() { + OAuth2Configuration.builder() + .authUrl("test-auth-url") + .tokenUrl("test-token-url") + .relyingPartyId("test-relying-party-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/OpenIdConnectConfigurationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/OpenIdConnectConfigurationTest.java new file mode 100644 index 00000000000..d405ec64716 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/OpenIdConnectConfigurationTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class OpenIdConnectConfigurationTest { + + @Test + void noAuthUrl() { + assertThrows( + IllegalStateException.class, + () -> { + OpenIdConnectConfiguration.builder() + .tokenUrl("test-token-url") + .relyingPartyId("test-relying-party-id") + .build(); + }); + } + + @Test + void noRelyingPartyId() { + assertThrows( + IllegalStateException.class, + () -> { + OpenIdConnectConfiguration.builder() + .authUrl("test-auth-url") + .tokenUrl("test-token-url") + .build(); + }); + } + + @Test + void noTokenUrl() { + assertThrows( + IllegalStateException.class, + () -> { + OpenIdConnectConfiguration.builder() + .authUrl("test-auth-url") + .relyingPartyId("test-relying-party-id") + .build(); + }); + } + + @Test + void valid() { + OpenIdConnectConfiguration.builder() + .authUrl("test-auth-url") + .tokenUrl("test-token-url") + .relyingPartyId("test-relying-party-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/PasswordPolicyTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/PasswordPolicyTest.java new file mode 100644 index 00000000000..2b70dd8cd52 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/PasswordPolicyTest.java @@ -0,0 +1,149 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class PasswordPolicyTest { + + @Test + void noMaximumLength() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .minimumDigit(0) + .minimumLength(0) + .minimumLowerCaseCharacter(0) + .minimumSpecialCharacter(0) + .minimumUpperCaseCharacter(0) + .passwordExpirationInMonth(0) + .build(); + }); + } + + @Test + void noMinimumDigit() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .maximumLength(0) + .minimumLength(0) + .minimumLowerCaseCharacter(0) + .minimumSpecialCharacter(0) + .minimumUpperCaseCharacter(0) + .passwordExpirationInMonth(0) + .build(); + }); + } + + @Test + void noMinimumLength() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .maximumLength(0) + .minimumDigit(0) + .minimumLowerCaseCharacter(0) + .minimumSpecialCharacter(0) + .minimumUpperCaseCharacter(0) + .passwordExpirationInMonth(0) + .build(); + }); + } + + @Test + void noMinimumLowerCaseCharacter() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .maximumLength(0) + .minimumDigit(0) + .minimumLength(0) + .minimumSpecialCharacter(0) + .minimumUpperCaseCharacter(0) + .passwordExpirationInMonth(0) + .build(); + }); + } + + @Test + void noMinimumSpecialCharacter() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .maximumLength(0) + .minimumDigit(0) + .minimumLength(0) + .minimumLowerCaseCharacter(0) + .minimumUpperCaseCharacter(0) + .passwordExpirationInMonth(0) + .build(); + }); + } + + @Test + void noMinimumUpperCaseCharacter() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .maximumLength(0) + .minimumDigit(0) + .minimumLength(0) + .minimumLowerCaseCharacter(0) + .minimumSpecialCharacter(0) + .passwordExpirationInMonth(0) + .build(); + }); + } + + @Test + void noPasswordExpirationInMonth() { + assertThrows( + IllegalStateException.class, + () -> { + PasswordPolicy.builder() + .maximumLength(0) + .minimumDigit(0) + .minimumLength(0) + .minimumLowerCaseCharacter(0) + .minimumSpecialCharacter(0) + .minimumUpperCaseCharacter(0) + .build(); + }); + } + + @Test + void valid() { + PasswordPolicy.builder() + .maximumLength(0) + .minimumDigit(0) + .minimumLength(0) + .minimumLowerCaseCharacter(0) + .minimumSpecialCharacter(0) + .minimumUpperCaseCharacter(0) + .passwordExpirationInMonth(0) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/SamlConfigurationTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/SamlConfigurationTest.java new file mode 100644 index 00000000000..5f38e778c59 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/SamlConfigurationTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SamlConfigurationTest { + + @Test + void noMetadataLocation() { + assertThrows( + IllegalStateException.class, + () -> { + SamlConfiguration.builder().build(); + }); + } + + @Test + void valid() { + SamlConfiguration.builder().metaDataLocation("test-metadata-location").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/UpdateIdentityProviderRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/UpdateIdentityProviderRequestTest.java new file mode 100644 index 00000000000..e2a7cbd17a6 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityproviders/UpdateIdentityProviderRequestTest.java @@ -0,0 +1,117 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityproviders; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateIdentityProviderRequestTest { + + @Test + void noIdentityProviderId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityProviderRequest.builder() + .configuration(InternalConfiguration.builder().build()) + .identityZoneId("test-identity-zone-id") + .name("test-name") + .originKey("test-origin-key") + .type(Type.INTERNAL) + .version(0) + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityProviderRequest.builder() + .configuration(InternalConfiguration.builder().build()) + .identityZoneId("test-identity-zone-id") + .identityProviderId("test-identity-provider-id") + .originKey("test-origin-key") + .type(Type.INTERNAL) + .version(0) + .build(); + }); + } + + @Test + void noOriginKey() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityProviderRequest.builder() + .configuration(InternalConfiguration.builder().build()) + .identityZoneId("test-identity-zone-id") + .identityProviderId("test-identity-provider-id") + .name("test-name") + .type(Type.INTERNAL) + .version(0) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityProviderRequest.builder() + .configuration(InternalConfiguration.builder().build()) + .identityZoneId("test-identity-zone-id") + .identityProviderId("test-identity-provider-id") + .name("test-name") + .originKey("test-origin-key") + .version(0) + .build(); + }); + } + + @Test + void noVersion() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityProviderRequest.builder() + .configuration(InternalConfiguration.builder().build()) + .identityZoneId("test-identity-zone-id") + .identityProviderId("test-identity-provider-id") + .name("test-name") + .originKey("test-origin-key") + .type(Type.INTERNAL) + .build(); + }); + } + + @Test + void valid() { + UpdateIdentityProviderRequest.builder() + .configuration(InternalConfiguration.builder().build()) + .identityZoneId("test-identity-zone-id") + .identityProviderId("test-identity-provider-id") + .name("test-name") + .originKey("test-origin-key") + .type(Type.INTERNAL) + .version(0) + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/CreateIdentityZoneRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/CreateIdentityZoneRequestTest.java new file mode 100644 index 00000000000..4229a1abf5e --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/CreateIdentityZoneRequestTest.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateIdentityZoneRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-description") + .identityZoneId("test-identity-zone-id") + .subdomain("test-sub-domain") + .version(1) + .build(); + }); + } + + @Test + void noSubdomain() { + assertThrows( + IllegalStateException.class, + () -> { + CreateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-description") + .identityZoneId("test-identity-zone-id") + .name("test-name") + .version(1) + .build(); + }); + } + + @Test + void validMax() { + CreateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-description") + .identityZoneId("test-identity-zone-id") + .name("test-name") + .subdomain("test-sub-domain") + .version(1) + .build(); + } + + @Test + void validMin() { + CreateIdentityZoneRequest.builder().name("test-name").subdomain("test-sub-domain").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/DeleteIdentityZoneRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/DeleteIdentityZoneRequestTest.java new file mode 100644 index 00000000000..bbc67172427 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/DeleteIdentityZoneRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteIdentityZoneRequestTest { + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteIdentityZoneRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteIdentityZoneRequest.builder().identityZoneId("test-identity-zone-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/GetIdentityZoneRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/GetIdentityZoneRequestTest.java new file mode 100644 index 00000000000..c2009063b6b --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/GetIdentityZoneRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetIdentityZoneRequestTest { + + @Test + void noIdentityZoneId() { + assertThrows( + IllegalStateException.class, + () -> { + GetIdentityZoneRequest.builder().build(); + }); + } + + @Test + void valid() { + GetIdentityZoneRequest.builder().identityZoneId("test-identity-zone-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/ListIdentityZonesRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/ListIdentityZonesRequestTest.java new file mode 100644 index 00000000000..7c1b234d631 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/ListIdentityZonesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import org.junit.jupiter.api.Test; + +final class ListIdentityZonesRequestTest { + + @Test + void valid() { + ListIdentityZonesRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/UpdateIdentityZoneRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/UpdateIdentityZoneRequestTest.java new file mode 100644 index 00000000000..05a021e93b3 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/identityzones/UpdateIdentityZoneRequestTest.java @@ -0,0 +1,90 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.identityzones; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UpdateIdentityZoneRequestTest { + + @Test + void noIdentityZoneId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-new-description") + .name("test-name") + .subdomain("test-sub-domain") + .version(1) + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-new-description") + .identityZoneId("test-id") + .subdomain("test-sub-domain") + .version(1) + .build(); + }); + } + + @Test + void noSubdomain() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-new-description") + .identityZoneId("test-id") + .name("test-name") + .version(1) + .build(); + }); + } + + @Test + void validMax() { + UpdateIdentityZoneRequest.builder() + .configuration(IdentityZoneConfiguration.builder().build()) + .description("test-new-description") + .identityZoneId("test-id") + .name("test-name") + .subdomain("test-sub-domain") + .version(1) + .build(); + } + + @Test + void validMin() { + UpdateIdentityZoneRequest.builder() + .identityZoneId("test-id") + .name("test-name") + .subdomain("test-sub-domain") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/AutoLoginRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/AutoLoginRequestTest.java new file mode 100644 index 00000000000..a8a7440b75a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/AutoLoginRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AutoLoginRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + AutoLoginRequest.builder().code("test-code").build(); + }); + } + + @Test + void noCode() { + assertThrows( + IllegalStateException.class, + () -> { + AutoLoginRequest.builder().clientId("test-client-id").build(); + }); + } + + @Test + void valid() { + AutoLoginRequest.builder().clientId("test-client-id").code("test-code").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/GetAutoLoginAuthenticationCodeRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/GetAutoLoginAuthenticationCodeRequestTest.java new file mode 100644 index 00000000000..ab8c7de6d37 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/GetAutoLoginAuthenticationCodeRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetAutoLoginAuthenticationCodeRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetAutoLoginAuthenticationCodeRequest.builder() + .clientSecret("test-client-secret") + .password("test-password") + .username("test-username") + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId("test-client-id") + .password("test-password") + .username("test-username") + .build(); + }); + } + + @Test + void noPassword() { + assertThrows( + IllegalStateException.class, + () -> { + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .password("test-password") + .build(); + }); + } + + @Test + void valid() { + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .password("test-password") + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/GetInfoRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/GetInfoRequestTest.java new file mode 100644 index 00000000000..8c3a1776863 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/serverinformation/GetInfoRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.serverinformation; + +import org.junit.jupiter.api.Test; + +final class GetInfoRequestTest { + + @Test + void valid() { + GetInfoRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/CheckTokenRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/CheckTokenRequestTest.java new file mode 100644 index 00000000000..77c80f31683 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/CheckTokenRequestTest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CheckTokenRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + CheckTokenRequest.builder() + .clientSecret("test-client-secret") + .token("test-token") + .scope("test-scope") + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + CheckTokenRequest.builder() + .clientId("test-client-id") + .token("test-token") + .scope("test-scope") + .build(); + }); + } + + @Test + void noToken() { + assertThrows( + IllegalStateException.class, + () -> { + CheckTokenRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .scope("test-scope") + .build(); + }); + } + + @Test + void validMax() { + CheckTokenRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .token("test-token") + .scope("test-scope") + .build(); + } + + @Test + void validMin() { + CheckTokenRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .token("test-token") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByAuthorizationCodeRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByAuthorizationCodeRequestTest.java new file mode 100644 index 00000000000..38f63c12948 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByAuthorizationCodeRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetTokenByAuthorizationCodeRequestTest { + + @Test + void noAuthorizationCode() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByAuthorizationCodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .build(); + }); + } + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByAuthorizationCodeRequest.builder() + .authorizationCode("test-authorization-code") + .clientSecret("test-client-secret") + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByAuthorizationCodeRequest.builder() + .authorizationCode("test-authorization-code") + .clientId("test-client-id") + .build(); + }); + } + + @Test + void valid() { + GetTokenByAuthorizationCodeRequest.builder() + .authorizationCode("test-authorization-code") + .clientId("test-client-id") + .clientSecret("test-client-secret") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByClientCredentialsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByClientCredentialsRequestTest.java new file mode 100644 index 00000000000..b9fd3e27e41 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByClientCredentialsRequestTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetTokenByClientCredentialsRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByClientCredentialsRequest.builder() + .clientSecret("test-client-secret") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByClientCredentialsRequest.builder() + .clientId("test-client-id") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void validMax() { + GetTokenByClientCredentialsRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + } + + @Test + void validMin() { + GetTokenByClientCredentialsRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByOneTimePasscodeRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByOneTimePasscodeRequestTest.java new file mode 100644 index 00000000000..e037320cc32 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByOneTimePasscodeRequestTest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetTokenByOneTimePasscodeRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByOneTimePasscodeRequest.builder() + .clientSecret("test-client-secret") + .passcode("test-passcode") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByOneTimePasscodeRequest.builder() + .clientId("test-client-id") + .passcode("test-passcode") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noPasscode() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByOneTimePasscodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void validMax() { + GetTokenByOneTimePasscodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .passcode("test-passcode") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + } + + @Test + void validMin() { + GetTokenByOneTimePasscodeRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .passcode("test-passcode") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByOpenIdRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByOpenIdRequestTest.java new file mode 100644 index 00000000000..64c4edffea8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByOpenIdRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetTokenByOpenIdRequestTest { + + @Test + void noAuthorizationCode() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByOpenIdRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .redirectUri("test-redirect-uri") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByOpenIdRequest.builder() + .authorizationCode("test-authorization-code") + .clientSecret("test-client-secret") + .redirectUri("test-redirect-uri") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByOpenIdRequest.builder() + .authorizationCode("test-authorization-code") + .clientId("test-client-id") + .redirectUri("test-redirect-uri") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void validMax() { + GetTokenByOpenIdRequest.builder() + .authorizationCode("test-authorization-code") + .clientId("test-client-id") + .clientSecret("test-client-secret") + .redirectUri("test-redirect-uri") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + } + + @Test + void validMin() { + GetTokenByOpenIdRequest.builder() + .authorizationCode("test-authorization-code") + .clientId("test-client-id") + .clientSecret("test-client-secret") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByPasswordRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByPasswordRequestTest.java new file mode 100644 index 00000000000..69d47bc217a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenByPasswordRequestTest.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetTokenByPasswordRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByPasswordRequest.builder() + .clientSecret("test-client-secret") + .password("test-password") + .username("test-username") + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByPasswordRequest.builder() + .clientId("test-client-id") + .password("test-password") + .username("test-username") + .build(); + }); + } + + @Test + void noPassword() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByPasswordRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + GetTokenByPasswordRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .password("test-password") + .build(); + }); + } + + @Test + void valid() { + GetTokenByPasswordRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .password("test-password") + .tokenFormat(TokenFormat.OPAQUE) + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenKeyRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenKeyRequestTest.java new file mode 100644 index 00000000000..15eb6c6e63f --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/GetTokenKeyRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.junit.jupiter.api.Test; + +final class GetTokenKeyRequestTest { + + @Test + void valid() { + GetTokenKeyRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/ListTokenKeysRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/ListTokenKeysRequestTest.java new file mode 100644 index 00000000000..9277de41c90 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/ListTokenKeysRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import org.junit.jupiter.api.Test; + +final class ListTokenKeysRequestTest { + + @Test + void valid() { + ListTokenKeysRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/RefreshTokenRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/RefreshTokenRequestTest.java new file mode 100644 index 00000000000..cc962b9f4e9 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/tokens/RefreshTokenRequestTest.java @@ -0,0 +1,82 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.tokens; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RefreshTokenRequestTest { + + @Test + void noClientId() { + assertThrows( + IllegalStateException.class, + () -> { + RefreshTokenRequest.builder() + .clientSecret("test-client-secret") + .refreshToken("test-refresh-token") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noClientSecret() { + assertThrows( + IllegalStateException.class, + () -> { + RefreshTokenRequest.builder() + .clientId("test-client-id") + .refreshToken("test-refresh-token") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void noRefreshToken() { + assertThrows( + IllegalStateException.class, + () -> { + RefreshTokenRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + }); + } + + @Test + void validMax() { + RefreshTokenRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .refreshToken("test-refresh-token") + .tokenFormat(TokenFormat.OPAQUE) + .build(); + } + + @Test + void validMin() { + RefreshTokenRequest.builder() + .clientId("test-client-id") + .clientSecret("test-client-secret") + .refreshToken("test-refresh-token") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ChangeUserPasswordRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ChangeUserPasswordRequestTest.java new file mode 100644 index 00000000000..2d56e68fe45 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ChangeUserPasswordRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ChangeUserPasswordRequestTest { + + @Test + void noPassword() { + assertThrows( + IllegalStateException.class, + () -> { + ChangeUserPasswordRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ChangeUserPasswordRequest.builder().password("test-password").build(); + }); + } + + @Test + void valid() { + ChangeUserPasswordRequest.builder() + .password("test-password") + .userId("test-user-id") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/CreateUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/CreateUserRequestTest.java new file mode 100644 index 00000000000..7f22792e28a --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/CreateUserRequestTest.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateUserRequestTest { + + @Test + void incompleteName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder() + .email(Email.builder().primary(true).value("test-email").build()) + .name(Name.builder().familyName("test-family-name").build()) + .userName("test-userName") + .build(); + }); + } + + @Test + void noEmail() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder().userName("test-userName").build(); + }); + } + + @Test + void noUserName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder() + .email(Email.builder().primary(true).value("test-email").build()) + .build(); + }); + } + + @Test + void valid() { + CreateUserRequest.builder() + .email(Email.builder().primary(true).value("test-email").build()) + .userName("test-userName") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/DeleteUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/DeleteUserRequestTest.java new file mode 100644 index 00000000000..a3306488c87 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/DeleteUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteUserRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteUserRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteUserRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ExpirePasswordRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ExpirePasswordRequestTest.java new file mode 100644 index 00000000000..ade301fc0a8 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ExpirePasswordRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ExpirePasswordRequestTest { + + @Test + void noPasswordChangeRequired() { + assertThrows( + IllegalStateException.class, + () -> { + ExpirePasswordRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + ExpirePasswordRequest.builder().passwordChangeRequired(true).build(); + }); + } + + @Test + void valid() { + ExpirePasswordRequest.builder().passwordChangeRequired(true).userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/GetUserVerificationLinkRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/GetUserVerificationLinkRequestTest.java new file mode 100644 index 00000000000..caae97a3301 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/GetUserVerificationLinkRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetUserVerificationLinkRequestTest { + + @Test + void noRedirectUri() { + assertThrows( + IllegalStateException.class, + () -> { + GetUserVerificationLinkRequest.builder().userId("test-user-id").build(); + }); + } + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + GetUserVerificationLinkRequest.builder() + .redirectUri("test-redirect-uri") + .build(); + }); + } + + @Test + void valid() { + GetUserVerificationLinkRequest.builder() + .userId("test-user-id") + .redirectUri("test-redirect-uri") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/InviteUsersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/InviteUsersRequestTest.java new file mode 100644 index 00000000000..b39aa0a6a4c --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/InviteUsersRequestTest.java @@ -0,0 +1,57 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class InviteUsersRequestTest { + + @Test + void noEmails() { + assertThrows( + IllegalStateException.class, + () -> { + InviteUsersRequest.builder() + .clientId("test-client-id") + .redirectUri("test-redirect-uri") + .build(); + }); + } + + @Test + void noRedirectId() { + assertThrows( + IllegalStateException.class, + () -> { + InviteUsersRequest.builder() + .clientId("test-client-id") + .email("test-email") + .build(); + }); + } + + @Test + void valid() { + InviteUsersRequest.builder() + .clientId("test-client-id") + .email("test-email") + .redirectUri("test-redirect-uri") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ListUsersRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ListUsersRequestTest.java new file mode 100644 index 00000000000..0a1c1481fdc --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/ListUsersRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import org.junit.jupiter.api.Test; + +final class ListUsersRequestTest { + + @Test + void valid() { + ListUsersRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/LookupUserIdsRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/LookupUserIdsRequestTest.java new file mode 100644 index 00000000000..aca3df20963 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/LookupUserIdsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import org.junit.jupiter.api.Test; + +final class LookupUserIdsRequestTest { + + @Test + void valid() { + LookupUserIdsRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/UpdateUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/UpdateUserRequestTest.java new file mode 100644 index 00000000000..dac4c4e3dc7 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/UpdateUserRequestTest.java @@ -0,0 +1,132 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateUserRequestTest { + + @Test + void incompleteName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserRequest.builder() + .active(true) + .email( + Email.builder() + .primary(true) + .value("john.doe@pivotal.io") + .build()) + .id("user-id") + .version("*") + .name(Name.builder().givenName("John").build()) + .userName("jdoe") + .build(); + }); + } + + @Test + void noId() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserRequest.builder() + .active(true) + .email( + Email.builder() + .primary(true) + .value("john.doe@pivotal.io") + .build()) + .version("*") + .name(Name.builder().familyName("Doe").givenName("John").build()) + .userName("jdoe") + .build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserRequest.builder() + .active(true) + .email( + Email.builder() + .primary(true) + .value("john.doe@pivotal.io") + .build()) + .id("user-id") + .version("*") + .userName("jdoe") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserRequest.builder() + .active(true) + .email( + Email.builder() + .primary(true) + .value("john.doe@pivotal.io") + .build()) + .id("user-id") + .version("*") + .name(Name.builder().familyName("Doe").givenName("John").build()) + .build(); + }); + } + + @Test + void noVersion() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateUserRequest.builder() + .active(true) + .email( + Email.builder() + .primary(true) + .value("john.doe@pivotal.io") + .build()) + .id("user-id") + .name(Name.builder().familyName("Doe").givenName("John").build()) + .userName("jdoe") + .build(); + }); + } + + @Test + void valid() { + UpdateUserRequest.builder() + .active(true) + .email(Email.builder().primary(true).value("john.doe@pivotal.io").build()) + .id("user-id") + .version("*") + .name(Name.builder().familyName("Doe").givenName("John").build()) + .userName("jdoe") + .build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/UserInfoRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/UserInfoRequestTest.java new file mode 100644 index 00000000000..a2d7a4971f0 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/UserInfoRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import org.junit.jupiter.api.Test; + +final class UserInfoRequestTest { + + @Test + void valid() { + UserInfoRequest.builder().build(); + } +} diff --git a/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/VerifyUserRequestTest.java b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/VerifyUserRequestTest.java new file mode 100644 index 00000000000..de9d69692e5 --- /dev/null +++ b/cloudfoundry-client/src/test/java/org/cloudfoundry/uaa/users/VerifyUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa.users; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class VerifyUserRequestTest { + + @Test + void noUserId() { + assertThrows( + IllegalStateException.class, + () -> { + VerifyUserRequest.builder().build(); + }); + } + + @Test + void valid() { + VerifyUserRequest.builder().userId("test-user-id").build(); + } +} diff --git a/cloudfoundry-gradle-plugin/.gitignore b/cloudfoundry-gradle-plugin/.gitignore deleted file mode 100644 index 4502f3962e8..00000000000 --- a/cloudfoundry-gradle-plugin/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.gradle -build/ - diff --git a/cloudfoundry-gradle-plugin/LICENSE b/cloudfoundry-gradle-plugin/LICENSE deleted file mode 100644 index f49a4e16e68..00000000000 --- a/cloudfoundry-gradle-plugin/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. \ No newline at end of file diff --git a/cloudfoundry-gradle-plugin/README.md b/cloudfoundry-gradle-plugin/README.md deleted file mode 100644 index f0f6265c6f4..00000000000 --- a/cloudfoundry-gradle-plugin/README.md +++ /dev/null @@ -1,355 +0,0 @@ -Cloud Foundry Gradle Plugin -=========================== - -This plugin allows you to deploy and manage applications with Gradle tasks. It is intended as an alternative -to `cf` for managing applications built with Gradle. - -## Installing the plugin - -To install the Cloud Foundry Gradle plugin, add it as a dependency in the `buildscript` section of your `build.gradle` file: - -~~~ -buildscript { - repositories { - mavenCentral() - } - dependencies { - classpath group: 'org.cloudfoundry', name: 'cf-gradle-plugin', version: '1.0.3' - } -} - -apply plugin: 'cloudfoundry' - -~~~ - -## Using the plugin - -The Cloud Foundry Gradle plugin adds several tasks to the build. Specify one or more of these tasks on the `gradle` command line: - -~~~ -$ gradle cfPush -~~~ - -The plugin adds the following tasks: - -* cfTarget - Displays information about the target Cloud Foundry platform -* cfApp - Displays information about the application deployment -* cfApps - Lists applications running on the targeted Cloud Foundry platform -* cfPush - Pushes an application -* cfDelete - Deletes an application deployment -* cfStart - Starts an application -* cfStop - Stops an application -* cfRestart - Restarts an application -* cfScale - Scales application instances up or down -* cfLogs - Tails application logs -* cfRecentLogs - Displays recent application logs -* cfServices - Displays information about service instances -* cfServicePlans - Displays information about available service offerings -* cfCreateService - Creates a service, optionally binding it to an application -* cfDeleteService - Deletes a service -* cfBind - Binds a service to an application -* cfUnbind - Unbinds a service from an application -* cfEnv - List application environment variables -* cfSetEnv - Sets environment variables to an application -* cfUnsetEnv - Deletes environment variables from an application -* cfMap - Maps a URI to an application -* cfUnmap - Unmaps a URI from application -* cfLogin - Logs in and saves authentication tokens -* cfLogout - Logs out and removes authentication tokens - -## Configuring the plugin - -The Cloud Foundry Gradle plugin is configured using a `cloudfoundry` configuration section in `build.gradle`: - -~~~ -cloudfoundry { - target = 'https://api.run.pivotal.io' - space = 'development' - username = 'user@example.com' - password = 's3cr3t' - file = file("${war.archivePath}") - uri = 'http://my-app.run.pivotal.io' - env = [ - "key": "value" - ] -} -~~~ - -Configuration options are: -* target - the URL of the target API (defaults to http://api.run.pivotal.io) -* organization - the name of the Cloud Foundry organization to target -* space - the name of the Cloud Foundry space to target -* username - your username on the target platform -* password - your password on the target platform -* application - the name of your application (defaults to the Gradle project name) -* file (type: File) - path to the JAR or WAR file to be deployed (defaults to the primary build artifact) -* memory - amount of memory in megabytes to allocate to an application -* diskQuota - amount of disk space in megabytes to allocate to an application -* healthCheckTimeout - the amount of time in seconds that Cloud Foundry should wait for the application to start -* instances - number of instances (defaults to 1) -* uri - a URI to map to the application -* uris (type: List) - a list of URIs to map to the application -* host - combined with `domain` to specify a URI to map to the application (defaults to application name) -* hosts (type: List) - combined with `domain` to specify a list of URIs to map to the application -* domain - the domain part of URIs to map to the application (defaults to the default domain) -* command - the command to run when the application is started -* buildpack - the URL of a buildpack to use to stage the application -* env (type: Map) - environment variables to set for the application -* startApp (type: boolean) - start the application on push (defaults to true) - -### Configuring services - -The configuration can contain information about system-provisioned services that should be bound to the application or otherwise -managed by tasks. One or more services can be nested in the `cloudfoundry` configuration: - -~~~ -cloudfoundry { - username = 'user@example.com' - password = 's3cr3t' - application = 'app-name' - file = new File('build/libs/my-app.war') - uri = 'http://app-name.run.pivotal.io' - - services { - 'my-mongodb' { - label = 'mongolab' - plan = 'sandbox' - bind = true - } - } -} -~~~ - -The configuration options for system-provisioned services are: -* label - the type of the service -* plan - the tier option of the service -* bind (type: boolean) - bind the service to the application on push (defaults to true) - -Use the `cfServicePlans` task to see the valid values for service configuration. - -The configuration can also contain information about user-provided service instances, where service credentials are -specified by the user. In this case, the `label` must be `user-provided`. - -~~~ -cloudfoundry { - username = 'user@example.com' - password = 's3cr3t' - application = 'app-name' - file = new File('build/libs/my-app.war') - uri = 'http://app-name.run.pivotal.io' - - services { - 'my-web-service' { - label = 'user-provided' - userProvidedCredentials = [ - 'uri': 'http://example.com/service', - 'accessKey': 'abc123' - ] - bind = true - } - } -} -~~~ - -### Overriding configuration from command line - -In addition to the `build.gradle` file-based configuration, it is also possible to use command line options to set -properties. To set options from the command line, use the Gradle `-P` flag and prefix property names with `cf`. For -example, to set the username and password on the command line instead of having them visible in `build.gradle`: - -~~~ -$ gradle cfTarget -PcfUsername='user@example.com' -PcfPassword='s3cr3t' -~~~ - -## Authentication - -The Cloud Foundry username and password can be set in the `cloudfoundry` configuration section in `build.gradle`, but -storing passwords in a build file like this is not usually a good idea. There are a few different ways you can keep -from storing login credentials in `build.gradle`. - -### Passing credentials on the command line - -Login credentials can be passed as command-line properties with each invoked task, as show above: - -~~~ -$ gradle cfTarget -PcfUsername='user@example.com' -PcfPassword='s3cr3t' -PcfSpace='staging' -~~~ - -### Configuring credentials in `gradle.properties` - -The `gradle.properties` file can be used to store properties as an alternative to passing them on the command line. This -file can be placed in a user's home directory (e.g. `~/.gradle/gradle.properties`) or in your project directory. - -An example `gradle.properties` file might look like this: - -~~~ -cf.username='user@example.com' -cf.password='s3cr3t' -~~~ - -### Using saved tokens - -The `cfLogin` task can be used to log into Cloud Foundry and save the authentication tokens to a file. After logging in -with `cfLogin`, the username and password will not be required for other tasks. - -~~~ -$ gradle cfLogin -PcfUsername='user@example.com' -PcfPassword='s3cr3t' -PcfSpace='staging' -~~~ - -The `cfLogout` task can be used to clear the saved tokens: - -~~~ -$ gradle cfLogout -~~~ - -The tokens are saved in a way that is compatible with the `cf` command-line tool, so you can also use `cf login` and then -run other tasks without providing credentials. - -## Advanced configuration - -### HTTP Proxies - -By default, the Cloud Foundry Gradle Plugin will honor the Gradle HTTP proxy configuration when communicating with the -target Cloud Foundry service. See http://www.gradle.org/docs/current/userguide/userguide_single.html#sec:accessing_the_web_via_a_proxy -for more information on configuring Gradle to use an HTTP proxy. - -If Gradle needs a proxy to resolve build dependencies but you do not want to use the proxy to communicate to the target -Cloud Foundry service, include the configuration setting `useSystemProxy=false` in your Cloud Foundry plugin configuration. - -### Self-signed SSL Certificates - -Some Cloud Foundry deployments, such as those deployed using Pivotal CF, use a self-signed certificate for SSL -connectivity. If you attempt to target a Cloud Foundry service that is using self-signed certificates, you may get an -error containing the text `javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated`. - -To instruct the Cloud Foundry Gradle plugin to accept self-signed certificates from the Cloud Foundry target endpoint, -add `trustSelfSignedCerts=true` to the plugin configuration block. - -### Configuration variables - -#### randomWord - -The `${randomWord}` variable is replaced with a randomly-generated set of characters. This can be useful to make application -URIs and service names unique: - -~~~ -cloudfoundry { - ... - uri = "http://app-name-${randomWord}.run.pivotal.io" - ... - - serviceInfos { - "mongodb-${randomWord}" { - ... - } - } -} -~~~ - -### Conditional configuration based on properties - -Command-line properties can be used to conditionally set configuration options in `build.gradle`. This can be used to -support multiple Cloud Foundry targets from a single `build.gradle` file, to select an organization and space, or to -customize other configuration options. - -Selecting an organization and space based on a property might like like this: - -~~~ -if (project.hasProperty('dev')) { - cloudfoundry { - organization = 'my-org' - space = 'development' - } -} - -if (project.hasProperty('staging')) { - cloudfoundry { - organization = 'my-org' - space = 'staging' - } -} - -if (project.hasProperty('prod')) { - cloudfoundry { - organization = 'production-org' - space = 'production' - } -} - -cloudfoundry { - target = 'https://api.run.pivotal.io' - application = 'my-app' - file = file('build/libs/my-app.war') - ... -} -~~~ - -The organization and space would then be selected from the command line: - -~~~ -$ gradle cfPush -Pdev -$ gradle cfPush -Pprod -~~~ - -### Zero-downtime deployment - -The Cloud Foundry Gradle plugin has support for zero-downtime deployments using the [blue-green deployment technique](http://docs.cloudfoundry.org/devguide/deploy-apps/blue-green.html). - -These tasks should be considered *experimental*. Zero-downtime deployment features are planned for future versions of Cloud Foundry, at which time the semantics and behavior of these tasks will be adapted to the platform's capabilities as appropriate. - -The zero-downtime deployment tasks rely on a `variants` field being configured in the CF Gradle plugin configuration: - -~~~ -cloudfoundry { - target = "https://api.run.pivotal.io" - organization = "my-org" - space = "development" - - file = file("${war.archivePath}") - host = "my-app" - domain = "cfapps.io" - memory = 512 - instances = 1 - - variants = ['-blue', '-green'] -} -~~~ - -Three additional Gradle tasks can be used to manage the deployment: - -* cfDeploy - -The plugin detects which `variant` is currently running and mapped to the canonical route (determined by combining `host` and `domain`), and pushes the app using the “other†variant. Both the application name and the route are decorated with the chosen variant string. If `my-app-blue` is running and mapped to the well-known route (e.g. `my-app.cfapps.io`) then the app is pushed with the name `my-app-green` and mapped to `my-app-green.cfapps.io`. If no version is currently running or mapped to the canonical route, the first variant in the list is used. - -Multiple routes can be assigned to an application using the `hosts = [‘my-app’, ‘www-my-app’]` syntax. In this case, the decoration of routes and mapping/unmapping applies to each route. - -The plugin also allows setting routes using `uri` and `uris` fields. These fields can be used with the deployment tasks, but will not be decorated with the variant values. Using `host` and `domain` together with `uri` give a high degree of control over how routes are configured. - -After deployment, the new variant can then be tested using the decorated URL. - -* cfSwapDeployed - -Variants that are not currently mapped to the canonical `my-app.cfapps.io` route are mapped to it. Variants that are currently mapped to `my-app.cfapps.io` have that route removed from them. This effectively swaps the newer variant into service and the older variant out of service. - -* cfUndeploy - -All running variants that are not mapped to the canonical route are deleted. - -# History - -## Changes in 1.0.3 - -* Tasks were renamed to use the form "cfTask" instead of "cf-task" -* Properties were changed to use the form "cfProperty" instead of "cf.property" -* Changed "cfLogs" task to tail logs from Loggregator. Added "cfRecentLogs" task -* The "host", "domain", and "url" configuration properties are now optional (defaults to a app name and default domain) -* The "file" configuration property is not optional (defaults to the build artifact) -* Plugin now supports uploading a directory or a single file - -## Changes in 1.0.2 - -* Added HTTP Proxy support for targeting CF platforms from behind a proxy -* Added support for user-provided service instances -* Added support for `healthCheckTimeout` and `diskQuota` application parameters -* Removed defaulting of `memory` app setting to prefer the default configured in Cloud Controller -* Added `trustSelfSignedCerts` plugin parameter diff --git a/cloudfoundry-gradle-plugin/build.gradle b/cloudfoundry-gradle-plugin/build.gradle deleted file mode 100644 index 50ebfd79c73..00000000000 --- a/cloudfoundry-gradle-plugin/build.gradle +++ /dev/null @@ -1,120 +0,0 @@ -import org.gradle.api.artifacts.maven.MavenDeployment - -/* -* Copyright 2012 the original author or authors. -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -*/ - -apply plugin: 'groovy' -apply plugin: 'idea' -apply plugin: 'maven' -apply plugin: 'signing' - -repositories { - mavenCentral() - mavenLocal() -} - -dependencies { - compile gradleApi() - compile 'org.cloudfoundry:cloudfoundry-client-lib:1.0.3' - compile 'org.codehaus.groovy:groovy:2.1.6' - testCompile 'junit:junit:4.8.2' -} - -group = 'org.cloudfoundry' -version = '1.0.4.BUILD-SNAPSHOT' - -// custom tasks for creating source/javadoc jars -task sourcesJar(type: Jar, dependsOn:classes) { - classifier = 'sources' - from sourceSets.main.allSource -} - -task javadocJar(type: Jar, dependsOn:javadoc) { - classifier = 'javadoc' - from javadoc.destinationDir -} - -task wrapper(type: Wrapper) { - gradleVersion = '1.8' -} - -// add javadoc/source jar tasks as artifacts -artifacts { - archives jar - archives sourcesJar - archives javadocJar -} - -if (project.hasProperty('performRelease')) { - signing { - sign configurations.archives - } -} - -def credentials = [ : ] -if (project.hasProperty('deployUser') && project.hasProperty('deployPassword')) { - credentials << [userName: deployUser, password: deployPassword] -} - -uploadArchives { - repositories { - mavenDeployer { - beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) } - - repository(id:'sonatype-nexus-staging',url: uri('https://oss.sonatype.org/service/local/staging/deploy/maven2'), authentication: credentials) - snapshotRepository(id:'sonatype-nexus-snapshots', url: uri('https://oss.sonatype.org/content/repositories/snapshots'), authentication: credentials) - pom.project { - name 'Cloud Foundry Gradle Plugin' - parent { - groupId 'org.sonatype.oss' - artifactId 'oss-parent' - version '7' - } - licenses { - license { - name 'The Apache Software License, Version 2.0' - url 'http://www.apache.org/licenses/LICENSE-2.0.txt' - distribution 'repo' - } - } - scm( - url:'git@github.com:cloudfoundry/cf-java-client.git', - connection:'scm:git:git@github.com:cloudfoundry/cf-java-client.git', - developerConnection:'scm:git:git@github.com:cloudfoundry/cf-java-client.git') - developers { - developer(id:'melix', name:'Cédric Champeau') - developer(id:'scottfrederick', name:'Scott Frederick') - } - description('A Gradle plugin that makes it easy to deploy Gradle-based applications to Cloud Foundry instances.') - url('https://github.com/cloudfoundry/cf-java-client/cloudfoundry-gradle-plugin') - } - - // courtesy of http://jedicoder.blogspot.com/2011/11/automated-gradle-project-deployment-to.html - pom.withXml { XmlProvider xmlProvider -> - def xml = xmlProvider.asString() - def pomXml = new XmlParser().parse(new ByteArrayInputStream(xml.toString().bytes)) - - pomXml.version[0] + { packaging('jar') } - - def newXml = new StringWriter() - def printer = new XmlNodePrinter(new PrintWriter(newXml)) - printer.preserveWhitespace = true - printer.print(pomXml) - xml.setLength(0) - xml.append(newXml.toString()) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/settings.gradle b/cloudfoundry-gradle-plugin/settings.gradle deleted file mode 100644 index c0c92e3b462..00000000000 --- a/cloudfoundry-gradle-plugin/settings.gradle +++ /dev/null @@ -1,16 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -rootProject.name = 'cf-gradle-plugin' diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryExtension.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryExtension.groovy deleted file mode 100644 index 0cabbdc4af9..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryExtension.groovy +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle - -import org.gradle.api.Project - -/** - * Configuration for the Cloud Foundry plugin. - * - * @author Cedric Champeau - * @author Scott Frederick - */ -class CloudFoundryExtension { - // primary config options - String target = 'http://api.run.pivotal.io' - String organization - String space - String username - String password - - // application configuration - String application - String command - String buildpack - String stack - Integer healthCheckTimeout - boolean startApp = true - Integer memory - Integer diskQuota - int instances = 1 - String uri - List uris = [] - String host - List hosts - String domain - File file - Map env = [:] - - List variants = [] - - // plugin configuration - Integer appStartupTimeout - - boolean useSystemProxy = true - boolean trustSelfSignedCerts = false; - - CloudFoundryExtension(Project project) { - application = project.name - } - - protected String getRandomWord() { - def generator = { String alphabet, int n -> - new Random().with { - (1..n).collect { alphabet[nextInt(alphabet.length())] }.join() - } - } - - generator((('a'..'z') + ('0'..'9')).join(), 5) - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryPlugin.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryPlugin.groovy deleted file mode 100644 index ea2f31dfbf6..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryPlugin.groovy +++ /dev/null @@ -1,98 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle - -import org.cloudfoundry.gradle.tasks.RecentLogsCloudFoundryTask -import org.gradle.api.DefaultTask -import org.gradle.api.Plugin -import org.gradle.api.Project - -import org.cloudfoundry.gradle.tasks.AppCloudFoundryTask -import org.cloudfoundry.gradle.tasks.AppsCloudFoundryTask -import org.cloudfoundry.gradle.tasks.BindServiceCloudFoundryTask -import org.cloudfoundry.gradle.tasks.CreateServiceCloudFoundryTask -import org.cloudfoundry.gradle.tasks.DeleteApplicationCloudFoundryTask -import org.cloudfoundry.gradle.tasks.DeleteServiceCloudFoundryTask -import org.cloudfoundry.gradle.tasks.DeployCloudFoundryTask -import org.cloudfoundry.gradle.tasks.EnvCloudFoundryTask -import org.cloudfoundry.gradle.tasks.InfoCloudFoundryTask -import org.cloudfoundry.gradle.tasks.LogsCloudFoundryTask -import org.cloudfoundry.gradle.tasks.LoginCloudFoundryTask -import org.cloudfoundry.gradle.tasks.LogoutCloudFoundryTask -import org.cloudfoundry.gradle.tasks.MapCloudFoundryTask -import org.cloudfoundry.gradle.tasks.PushCloudFoundryTask -import org.cloudfoundry.gradle.tasks.RestartApplicationCloudFoundryTask -import org.cloudfoundry.gradle.tasks.ScaleCloudFoundryTask -import org.cloudfoundry.gradle.tasks.ServicesCloudFoundryTask -import org.cloudfoundry.gradle.tasks.ServiceOfferingsCloudFoundryTask -import org.cloudfoundry.gradle.tasks.SetEnvCloudFoundryTask -import org.cloudfoundry.gradle.tasks.SpacesCloudFoundryTask -import org.cloudfoundry.gradle.tasks.StartApplicationCloudFoundryTask -import org.cloudfoundry.gradle.tasks.StopApplicationCloudFoundryTask -import org.cloudfoundry.gradle.tasks.SwapDeployedCloudFoundryTask -import org.cloudfoundry.gradle.tasks.UnbindServiceCloudFoundryTask -import org.cloudfoundry.gradle.tasks.UndeployCloudFoundryTask -import org.cloudfoundry.gradle.tasks.UnmapCloudFoundryTask -import org.cloudfoundry.gradle.tasks.UnsetEnvCloudFoundryTask - -/** - * The main Cloud Foundry plugin class. - * - * @author Cedric Champeau - * @author Scott Frederick - */ -class CloudFoundryPlugin implements Plugin { - - @Override - void apply(Project project) { - project.extensions.create("cloudfoundry", CloudFoundryExtension, project) - project.cloudfoundry.extensions.services = project.container(CloudFoundryServiceExtension) - - // register tasks - createTask(project, 'Target', InfoCloudFoundryTask) - createTask(project, 'Login', LoginCloudFoundryTask) - createTask(project, 'Logout', LogoutCloudFoundryTask) - createTask(project, 'Spaces', SpacesCloudFoundryTask) - createTask(project, 'Push', PushCloudFoundryTask) - createTask(project, 'Delete', DeleteApplicationCloudFoundryTask) - createTask(project, 'Start', StartApplicationCloudFoundryTask) - createTask(project, 'Restart', RestartApplicationCloudFoundryTask) - createTask(project, 'Stop', StopApplicationCloudFoundryTask) - createTask(project, 'Deploy', DeployCloudFoundryTask) - createTask(project, 'Undeploy', UndeployCloudFoundryTask) - createTask(project, 'SwapDeployed', SwapDeployedCloudFoundryTask) - createTask(project, 'Scale', ScaleCloudFoundryTask) - createTask(project, 'Apps', AppsCloudFoundryTask) - createTask(project, 'App', AppCloudFoundryTask) - createTask(project, 'Logs', LogsCloudFoundryTask) - createTask(project, 'RecentLogs', RecentLogsCloudFoundryTask) - createTask(project, 'Services', ServicesCloudFoundryTask) - createTask(project, 'ServicePlans', ServiceOfferingsCloudFoundryTask) - createTask(project, 'CreateService', CreateServiceCloudFoundryTask) - createTask(project, 'DeleteService', DeleteServiceCloudFoundryTask) - createTask(project, 'Bind', BindServiceCloudFoundryTask) - createTask(project, 'Unbind', UnbindServiceCloudFoundryTask) - createTask(project, 'Env', EnvCloudFoundryTask) - createTask(project, 'SetEnv', SetEnvCloudFoundryTask) - createTask(project, 'UnsetEnv', UnsetEnvCloudFoundryTask) - createTask(project, 'Map', MapCloudFoundryTask) - createTask(project, 'Unmap', UnmapCloudFoundryTask) - } - - private void createTask(Project project, String name, Class clazz) { - project.tasks.create("cf${name}", clazz) - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryServiceExtension.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryServiceExtension.groovy deleted file mode 100644 index 461ea942d01..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/CloudFoundryServiceExtension.groovy +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle - -/** - * Configuration options used for creation of services. - */ -class CloudFoundryServiceExtension { - String name - String label - String provider - String plan - String version - Map userProvidedCredentials = [:] - boolean bind = true - - CloudFoundryServiceExtension(String name) { - this.name = name - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/GradlePluginRestLogCallback.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/GradlePluginRestLogCallback.groovy deleted file mode 100644 index 082a10f23b5..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/GradlePluginRestLogCallback.groovy +++ /dev/null @@ -1,18 +0,0 @@ -package org.cloudfoundry.gradle - -import org.cloudfoundry.client.lib.RestLogCallback -import org.cloudfoundry.client.lib.RestLogEntry - -class GradlePluginRestLogCallback implements RestLogCallback { - private def logger - - GradlePluginRestLogCallback(def logger) { - this.logger = logger - } - - @Override - void onNewLogEntry(RestLogEntry logEntry) { - logger.debug "REQUEST: ${logEntry.method} ${logEntry.uri}" - logger.debug "RESPONSE: ${logEntry.httpStatus} ${logEntry.status} ${logEntry.message}" - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractCloudFoundryTask.groovy deleted file mode 100644 index f5070266c9f..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractCloudFoundryTask.groovy +++ /dev/null @@ -1,371 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.CloudCredentials -import org.cloudfoundry.client.lib.CloudFoundryClient -import org.cloudfoundry.client.lib.CloudFoundryException -import org.cloudfoundry.client.lib.CloudFoundryOperations -import org.cloudfoundry.client.lib.HttpProxyConfiguration -import org.cloudfoundry.client.lib.RestLogCallback -import org.cloudfoundry.client.lib.domain.CloudSpace -import org.cloudfoundry.client.lib.tokens.TokensFile -import org.gradle.api.DefaultTask -import org.cloudfoundry.gradle.GradlePluginRestLogCallback -import org.gradle.api.Task -import org.gradle.api.plugins.JavaPlugin -import org.gradle.api.plugins.WarPlugin -import org.springframework.http.HttpStatus -import org.springframework.security.oauth2.common.OAuth2AccessToken -import org.springframework.web.client.ResourceAccessException -import org.gradle.api.GradleException - -abstract class AbstractCloudFoundryTask extends DefaultTask { - protected CloudFoundryOperations client - protected WarningBypassingResponseErrorHandler errorHandler - protected String currentVariantSuffix - - AbstractCloudFoundryTask() { - super() - group = 'Cloud Foundry' - } - - protected void log(msg) { - logger.quiet msg - } - - protected boolean isVerboseEnabled() { - logger.infoEnabled - } - - protected void logVerbose(msg) { - logger.info msg - } - - protected def withCloudFoundryClient(Closure c, Object[] args) { - try { - validateConfiguration() - connectToCloudFoundry() - if (client) { - setupLogging() - - c.call(args) - - disconnectFromCloudFoundry() - } - } catch (CloudFoundryException cfe) { - throw new GradleException("Error calling Cloud Foundry: ${cfe.message}: ${cfe.description}") - } catch (Exception e) { - throw e - } - } - - private void validateConfiguration() { - if (target == null) { - throw new GradleException("The Cloud Foundry target must be configured.") - } - - if (space == null) { - throw new GradleException("The Cloud Foundry space must be configured.") - } - } - - private void connectToCloudFoundry() { - if (username != null && password != null) { - client = createClientWithUsernamePassword() - } else { - client = createClientWithToken() - } - errorHandler = new WarningBypassingResponseErrorHandler() - client.responseErrorHandler = errorHandler - } - - private void disconnectFromCloudFoundry() { - try { - if (username != null && password != null) { - client.logout() - } - } finally { - client = null - } - } - - protected CloudFoundryClient createClientWithUsernamePassword() { - try { - if (logger.infoEnabled) { - logger.info "Connecting to '${target}' with username '${username}'" - } - - CloudCredentials credentials = new CloudCredentials(username, password) - CloudFoundryClient localClient = createClient(credentials) - - login(localClient) - - localClient - } catch (MalformedURLException e) { - throw new GradleException("Incorrect Cloud Foundry target URL '${target}'. Make sure the URL contains a scheme, e.g. http://...", e) - } - } - - private CloudFoundryClient createClientWithToken() { - try { - if (verboseEnabled) { - logVerbose "Connecting to '${target}' with stored token" - } - - CloudCredentials credentials = new CloudCredentials(retrieveToken()) - return createClient(credentials) - } catch (MalformedURLException e) { - throw new GradleException("Incorrect Cloud Foundry target URL '${target}'. Make sure the URL contains a scheme, e.g. http://...", e) - } - } - - private CloudFoundryClient createClient(CloudCredentials credentials) { - HttpProxyConfiguration proxyConfiguration = getHttpProxyConfiguration() - URL targetUrl = target.toURL() - new CloudFoundryClient(credentials, targetUrl, organization, space, proxyConfiguration, trustSelfSignedCerts) - } - - private HttpProxyConfiguration getHttpProxyConfiguration() { - if (useSystemProxy) { - String proxyHost = System.getProperty("http.proxyHost") - String proxyPort = System.getProperty("http.proxyPort") - if (proxyHost != null && proxyPort != null) { - return new HttpProxyConfiguration(proxyHost, Integer.parseInt(proxyPort)) - } - } - null - } - - private OAuth2AccessToken retrieveToken() { - TokensFile tokensFile = new TokensFile() - OAuth2AccessToken token = tokensFile.retrieveToken(target.toURI()) - - if (token == null) { - throw new GradleException("Can not authenticate to target ${target}. " + - "Configure a username and password, or use the login task.") - } - - token - } - - private void login(localClient) { - try { - localClient.login() - } catch (CloudFoundryException e) { - if (HttpStatus.FORBIDDEN == e.statusCode) { - throw new GroovyRuntimeException("Login failed to '${target}'. Please verify your login credentials.", e) - } else if (HttpStatus.NOT_FOUND == e.statusCode) { - throw new GradleException("The target host '${target}' exists but it does not appear to be a valid Cloud Foundry target url.", e) - } else { - throw e - } - } catch (ResourceAccessException e) { - throw new GradleException("Cannot access host at '${target}'.", e) - } - } - - private def setupLogging() { - if (logger.debugEnabled) { - RestLogCallback callback = new GradlePluginRestLogCallback(logger) - client.registerRestLogListener(callback) - } - } - - protected def withApplication(Closure c, Object[] args) { - try { - c.call(args) - } catch (CloudFoundryException e) { - if (e.statusCode == HttpStatus.NOT_FOUND) { - throw new GradleException("Application ${application} not found") - } else { - throw e - } - } - } - - protected def withApplicationIfExists(Closure c, Object[] args) { - if (application) { - try { - c.call(args) - } catch (CloudFoundryException e) { - if (e.statusCode == HttpStatus.NOT_FOUND) { - // do nothing, continue execution after closure - } else { - throw e - } - } - } - } - - protected CloudSpace getCurrentSpace(CloudFoundryOperations c = client) { - List spaces = c.spaces - spaces.find { it.name.equals(space) } - } - - protected void applyVariantSuffix(String variant) { - currentVariantSuffix = variant - } - - protected void removeVariantSuffix() { - currentVariantSuffix = null - } - - // extension accessors - - String getTarget() { - propertyOrExtension('target') - } - - String getOrganization() { - propertyOrExtension('organization') - } - - String getSpace() { - propertyOrExtension('space') - } - - String getUsername() { - propertyOrExtension('username') - } - - String getPassword() { - propertyOrExtension('password') - } - - String getApplication() { - def appName = propertyOrExtension('application') - appName + (currentVariantSuffix ?: "") - } - - String getCommand() { - propertyOrExtension('command') - } - - String getBuildpack() { - propertyOrExtension('buildpack') - } - - String getStack() { - propertyOrExtension('stack') - } - - Integer getHealthCheckTimeout() { - propertyOrExtension('healthCheckTimeout') - } - - boolean getStartApp() { - propertyOrExtension('startApp') - } - - Integer getDiskQuota() { - propertyOrExtension('diskQuota') - } - - Integer getMemory() { - propertyOrExtension('memory') - } - - int getInstances() { - propertyOrExtension('instances') as int - } - - List getAllUris() { - String uri = propertyOrExtension('uri') - List uris = project.cloudfoundry.uris - - String domain = propertyOrExtension('domain') - String host = propertyOrExtension('host') - List hosts = project.cloudfoundry.hosts - - if (!uri && !uris) { - if (!domain) { - domain = client.defaultDomain.name - } - if (!hosts && !host) { - host = application - } - } - - def allUris = [] - - if (!currentVariantSuffix) { - allUris += uris.collect { it.toString() } - if (uri) { - allUris << uri.toString() - } - } - if (domain) { - if (host) { - allUris << "${host}${(currentVariantSuffix ?: "")}.${domain}".toString() - } - if (hosts) { - allUris += hosts.collect { "${it}${(currentVariantSuffix ?: "")}.${domain}".toString() } - } - } - - allUris as List - } - - File getFile() { - ((project.cloudfoundry.file ?: - getDefaultArchiveForTask(WarPlugin.WAR_TASK_NAME)) ?: - getDefaultArchiveForTask(JavaPlugin.JAR_TASK_NAME)) - } - - File getDefaultArchiveForTask(String taskName) { - project.tasks.findByName(taskName)?.archivePath - } - - Map getEnv() { - project.cloudfoundry.env.collectEntries { key, value -> [(key.toString()): value.toString()] } - } - - List getVariants() { - project.cloudfoundry.variants - } - - Integer getAppStartupTimeout() { - propertyOrExtension('appStartupTimeout') - } - - boolean getUseSystemProxy() { - propertyOrExtension('useSystemProxy') - } - - boolean getTrustSelfSignedCerts() { - propertyOrExtension('trustSelfSignedCerts') - } - - def getServiceInfos() { - project.cloudfoundry.services - } - - def propertyOrExtension(String name) { - projectProperty(name) ?: project.cloudfoundry[name] - } - - def projectProperty(String name) { - def propertyName = 'cf' + name.capitalize() - if (project.hasProperty(propertyName)) { - def propertyValue = project.property(propertyName) - if (!(propertyValue instanceof Task)) { - return propertyValue - } - } - null - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractEnvCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractEnvCloudFoundryTask.groovy deleted file mode 100644 index 1dcfe68b84a..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractEnvCloudFoundryTask.groovy +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication - -abstract class AbstractEnvCloudFoundryTask extends AbstractCloudFoundryTask { - AbstractEnvCloudFoundryTask() { - super() - } - - protected void listEnvironmentVariables(def env) { - StringBuilder sb = new StringBuilder("Environment variables for ${application}\n") - - if (env.isEmpty()) { - sb << 'No environment variables set\n' - } - env.each { key, value -> - sb << "$key=$value\n" - } - - log sb.toString() - } - - protected def modifyAppEnv(CloudApplication app, Closure c) { - def newEnv = c.call(app.getEnvAsMap(), env) - - client.updateApplicationEnv(application, newEnv) - - newEnv - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractMapCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractMapCloudFoundryTask.groovy deleted file mode 100644 index c80603c683a..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AbstractMapCloudFoundryTask.groovy +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication - -abstract class AbstractMapCloudFoundryTask extends AbstractCloudFoundryTask { - AbstractMapCloudFoundryTask() { - super() - } - - protected List mapUrisToApplication() { - def applicationUris = updateApplicationUris { existingUris, passedUris -> - existingUris + passedUris - } - applicationUris as List - } - - - protected List unmapUrisFromApplication() { - def applicationUris = updateApplicationUris { existingUris, passedUris -> - existingUris - passedUris - } - applicationUris as List - } - - protected List updateApplicationUris(Closure c) { - CloudApplication app = client.getApplication(application) - List applicationUris = c.call(app.uris, allUris.collect { it as String }).unique() - client.updateApplicationUris(application, applicationUris) - applicationUris - } - - protected void listUriMappings(def uris) { - if (verboseEnabled) { - StringBuilder sb = new StringBuilder("Current uri mappings for ${application}\n") - - if (uris.isEmpty()) { - sb << ' none\n' - } - for (uri in uris) { - sb << " ${uri}\n" - } - - logVerbose sb.toString() - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppCloudFoundryTask.groovy deleted file mode 100644 index 1147885f973..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppCloudFoundryTask.groovy +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.ApplicationStats -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.cloudfoundry.client.lib.domain.InstanceStats -import org.cloudfoundry.gradle.text.FlexibleTableOutput -import org.gradle.api.tasks.TaskAction - -/** - * A basic task which can be used to display information about an application. - */ -@Mixin(AppStatusCloudFoundryHelper) -class AppCloudFoundryTask extends AbstractCloudFoundryTask { - AppCloudFoundryTask() { - super() - description = 'Displays information about the application deployment' - } - - @TaskAction - void status() { - withCloudFoundryClient { - withApplication { - CloudApplication app = client.getApplication(application) - - StringBuilder sb = new StringBuilder("Application ${app.name}\n") - sb << "status: ${health(app)}\n" - sb << "instances: ${app.runningInstances}/${app.instances}\n" - sb << "usage: ${app.memory}M x ${app.instances} instances\n" - sb << "uris: ${app.uris ? app.uris.join(', ') : 'none'}\n" - - List services = app.services - if (!services.isEmpty()) { - sb << "services: ${services.join(', ')}" - } - - FlexibleTableOutput output = new FlexibleTableOutput() - - ApplicationStats stats = client.getApplicationStats(application) - stats.records.each { InstanceStats instance -> - output.addRow(instance: "${instance.id}", - state: instance.state.toString().toLowerCase(), - cpu: "${formatPercentage(instance.usage.cpu * 100)}%", - memory: "${formatBytes(instance.usage.mem)} of ${formatBytes(instance.memQuota)}", - disk: "${formatBytes(instance.usage.disk)} of ${formatBytes(instance.diskQuota)}") - } - - sb << "\n" - sb << output.toString() - - log sb.toString() - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppStatusCloudFoundryHelper.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppStatusCloudFoundryHelper.groovy deleted file mode 100644 index b65353f7964..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppStatusCloudFoundryHelper.groovy +++ /dev/null @@ -1,63 +0,0 @@ -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication - -import java.text.DecimalFormat - -class AppStatusCloudFoundryHelper { - String health(CloudApplication app) { - String state = app.state - - if (state == "STARTED") { - def running_instances = app.runningInstances - def expected_instances = app.instances - - if (expected_instances > 0) { - float ratio = running_instances / expected_instances - if (ratio == 1.0) - "running" - else - "${(ratio * 100).toInteger()}%" - } else { - 'n/a' - } - } else { - state.toLowerCase() - } - } - - String formatPercentage(double value) { - DecimalFormat dec = new DecimalFormat("0.00") - return dec.format(value) - } - - String formatMBytes(int size) { - double g = size / 1024 - - DecimalFormat dec = new DecimalFormat("0") - - if (g > 1) { - return dec.format(g).concat("G") - } else { - return dec.format(size).concat("M") - } - } - - String formatBytes(double size) { - double k = size / 1024.0 - double m = k / 1024.0 - double g = m / 1024.0 - - DecimalFormat dec = new DecimalFormat("0") - - if (g > 1) { - return dec.format(g).concat("G") - } else if (m > 1) { - return dec.format(m).concat("M") - } else if (k > 1) { - return dec.format(k).concat("K") - } else { - return dec.format(size).concat("B") - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppsCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppsCloudFoundryTask.groovy deleted file mode 100644 index e5a1735195c..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/AppsCloudFoundryTask.groovy +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.gradle.text.FlexibleTableOutput -import org.gradle.api.tasks.TaskAction -import org.cloudfoundry.client.lib.domain.CloudApplication - -/** - * Task which lists applications deployed on CloudFoundry. - */ -@Mixin(AppStatusCloudFoundryHelper) -class AppsCloudFoundryTask extends AbstractCloudFoundryTask { - AppsCloudFoundryTask() { - super() - description = 'Lists applications running on the targeted Cloud Foundry platform' - } - - @TaskAction - void showApps() { - withCloudFoundryClient { - List apps = client.applications - - if (apps.isEmpty()) { - log 'No applications' - } else { - FlexibleTableOutput output = new FlexibleTableOutput() - - apps.sort { it.name } - apps.each { CloudApplication app -> - output.addRow(name: app.name, - status: health(app), - instances: "${app.runningInstances}/${app.instances}", - memory: "${formatMBytes(app.memory)}", - disk: "${formatMBytes(app.diskQuota)}", - uris: "${app.uris ? app.uris.join(', ') : 'none'}") - } - - log 'Applications\n\n' + output.toString() - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/BindServiceCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/BindServiceCloudFoundryTask.groovy deleted file mode 100644 index a1ee2a7aec9..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/BindServiceCloudFoundryTask.groovy +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * Task used to bind a service to an application. - * - * @author Cedric Champeau - */ -class BindServiceCloudFoundryTask extends AbstractCloudFoundryTask { - BindServiceCloudFoundryTask() { - super() - description = 'Binds services to an application' - } - - @TaskAction - void bindService() { - withCloudFoundryClient { - withApplication { - CloudApplication app = client.getApplication(application) - List servicesNames = app.services - - serviceInfos.each { serviceInfo -> - String serviceName = serviceInfo.name - - if (!client.getService(serviceName)) { - log "Service ${serviceName} does not exist" - } else if (servicesNames.contains(serviceName)) { - log "Service ${serviceName} is already bound to ${application}" - } else { - log "Binding service ${serviceName} to application ${application}" - client.bindService(application, serviceName) - } - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/CreateServiceCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/CreateServiceCloudFoundryTask.groovy deleted file mode 100644 index 376121da9f0..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/CreateServiceCloudFoundryTask.groovy +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * Task used to add a service. - * - * @author Cedric Champeau - * @author Scott Frederick - */ -@Mixin(ServiceCloudFoundryHelper) -class CreateServiceCloudFoundryTask extends AbstractCloudFoundryTask { - CreateServiceCloudFoundryTask() { - super() - description = 'Creates a service, optionally binding it to an application' - } - - @TaskAction - void createService() { - withCloudFoundryClient { - createServices(serviceInfos) - - withApplicationIfExists { - client.getApplication(application) - - serviceInfos.each { service -> - if (service.bind) { - log "Binding service ${service.name} to application ${application}" - client.bindService(application, service.name) - } - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DebugCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DebugCloudFoundryTask.groovy deleted file mode 100644 index 8ba565a07f9..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DebugCloudFoundryTask.groovy +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -class DebugCloudFoundryTask extends AbstractCloudFoundryTask { - DebugCloudFoundryTask() { - super() - description = 'Debugging' - } - - @TaskAction - void debug() { - println "$application, $target, $space, $organization, $file, $uri" - - println "Services: " - serviceInfos.each { service -> - println "$service.name, $service.label, $service.provider, $service.version" - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeleteApplicationCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeleteApplicationCloudFoundryTask.groovy deleted file mode 100644 index f1886ec05a4..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeleteApplicationCloudFoundryTask.groovy +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * Task used to delete an application. If the application name is '*', then - * all applications are deleted. - */ -@Mixin(PushCloudFoundryHelper) -class DeleteApplicationCloudFoundryTask extends AbstractCloudFoundryTask { - DeleteApplicationCloudFoundryTask() { - super() - description = 'Deletes an application deployment' - } - - @TaskAction - void deleteApplication() { - withCloudFoundryClient { - if ('*' == application) { - log "Deleting all applications" - client.deleteAllApplications() - log "Deleted successfully" - } else { - if (applicationExists(application)) { - log "Deleting application ${application}" - client.deleteApplication(application) - log "Deleted successfully" - } else { - log "Application ${application} not found" - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeleteServiceCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeleteServiceCloudFoundryTask.groovy deleted file mode 100644 index c18249c4578..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeleteServiceCloudFoundryTask.groovy +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.cloudfoundry.gradle.CloudFoundryServiceExtension -import org.gradle.api.tasks.TaskAction - -/** - * Task used to delete a service. - */ -class DeleteServiceCloudFoundryTask extends AbstractCloudFoundryTask { - DeleteServiceCloudFoundryTask() { - super() - description = 'Deletes a service' - } - - @TaskAction - void deleteService() { - withCloudFoundryClient { - List appServiceNames = [] - withApplicationIfExists { - CloudApplication app = client.getApplication(application) - appServiceNames = app.services - } - - serviceInfos.each { CloudFoundryServiceExtension service -> - if (appServiceNames.contains(service.name)) { - log "Unbinding service ${service.name} from application ${application}" - client.unbindService(application, service.name) - } - - log "Deleting service ${service.name}" - client.deleteService(service.name) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeployCloudFoundryHelper.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeployCloudFoundryHelper.groovy deleted file mode 100644 index e48d1ed0673..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeployCloudFoundryHelper.groovy +++ /dev/null @@ -1,75 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.GradleException - -class DeployCloudFoundryHelper { - void validateVariantsForDeploy() { - if (!variants || variants.size() < 2) { - throw new GradleException("At least two 'variants' suffixes must be specified.") - } - } - - String findNextVariantToDeploy(String appName, List apps) { - variants.reverse().find { String variant -> - boolean notUsed = !apps.any { app -> appHasDecoratedName(app, appName, variant) } - boolean usedButUnmapped = apps.any { app -> appVariantExistsAndUnmapped(app, appName, variant) } - notUsed || usedButUnmapped - } - } - - List findMappedVariants(String appName, List apps) { - def appNames = [] - - variants.each { String variant -> - appNames += apps.findAll { app -> - appVariantExistsAndMapped(app, appName, variant) - }.collect { app -> - app.name - } - } - - appNames - } - - List findUnmappedVariants(String appName, List apps) { - def appNames = [] - - variants.each { String variant -> - appNames += apps.findAll { app -> - appVariantExistsAndUnmapped(app, appName, variant) - }.collect { app -> - app.name - } - } - - appNames - } - - boolean appVariantExistsAndMapped(CloudApplication app, String appName, String variant) { - appHasDecoratedName(app, appName, variant) && app.uris.containsAll(allUris) - } - - boolean appVariantExistsAndUnmapped(CloudApplication app, String appName, String variant) { - appHasDecoratedName(app, appName, variant) && app.uris.disjoint(allUris) - } - - boolean appHasDecoratedName(CloudApplication app, String appName, String variant) { - app.name == appName + variant - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeployCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeployCloudFoundryTask.groovy deleted file mode 100644 index db7924b495d..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/DeployCloudFoundryTask.groovy +++ /dev/null @@ -1,72 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.GradleException -import org.gradle.api.tasks.TaskAction - -/** - * Tasks used to deploy variants of an application to a Cloud Foundry cloud. - * - * @author Scott Frederick - */ -@Mixin(ServiceCloudFoundryHelper) -@Mixin(PushCloudFoundryHelper) -@Mixin(DeployCloudFoundryHelper) -@Mixin(StartCloudFoundryHelper) -class DeployCloudFoundryTask extends AbstractCloudFoundryTask { - DeployCloudFoundryTask() { - super() - description = 'Deploys a variants of an application' - } - - @TaskAction - void deploy() { - withCloudFoundryClient { - validateApplicationConfig() - validateVariantsForDeploy() - - def apps = client.applications - - String next = findNextVariantToDeploy(application, apps) - - List mappedAppVariants = findMappedVariants(application, apps) - - if (!next) { - throw new GradleException("All variants are active, none available for deployment") - } - - applyVariantSuffix(next) - - if (mappedAppVariants) - log "Currently active variants are ${mappedAppVariants}, deploying ${application}" - else - log "No currently active variants, deploying ${application}" - - createServices(serviceInfos) - - createApplication() - - uploadApplication() - - if (startApp) { - startApplication() - } - - removeVariantSuffix() - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/EnvCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/EnvCloudFoundryTask.groovy deleted file mode 100644 index f2766e9b01f..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/EnvCloudFoundryTask.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * A basic task which can be used to List application environment variables from CloudFoundry platform. - */ -class EnvCloudFoundryTask extends AbstractEnvCloudFoundryTask { - EnvCloudFoundryTask() { - super() - description = 'List application environment variables' - } - - @TaskAction - void listEnvironmentVariables() { - withCloudFoundryClient { - withApplication { - CloudApplication app = client.getApplication(application) - listEnvironmentVariables(app.envAsMap) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/InfoCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/InfoCloudFoundryTask.groovy deleted file mode 100644 index a9eed585f88..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/InfoCloudFoundryTask.groovy +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudInfo -import org.cloudfoundry.client.lib.domain.CloudSpace -import org.gradle.api.tasks.TaskAction - -/** - * A basic task which can be used to get info from Cloud Foundry platform. - */ -class InfoCloudFoundryTask extends AbstractCloudFoundryTask { - - InfoCloudFoundryTask() { - super() - description = 'Displays information about the target Cloud Foundry platform' - } - - @TaskAction - void info() { - withCloudFoundryClient { - CloudInfo info = client.cloudInfo - CloudSpace space = currentSpace - log """ -API Endpoint: $target (API version: $info.version) -User: $info.user -Org: ${space?.organization?.name ?: 'n/a'} -Space: ${space?.name ?: 'n/a'} -""" - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LoginCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LoginCloudFoundryTask.groovy deleted file mode 100644 index bf1f5747f61..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LoginCloudFoundryTask.groovy +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.CloudFoundryClient -import org.cloudfoundry.client.lib.tokens.TokensFile -import org.gradle.api.GradleException -import org.gradle.api.tasks.TaskAction -import org.springframework.security.oauth2.common.OAuth2AccessToken - -/** - * Logs in and saves access token. - */ -class LoginCloudFoundryTask extends AbstractCloudFoundryTask { - - LoginCloudFoundryTask() { - super() - description = 'Logs in to the target Cloud Foundry platform' - } - - @TaskAction - void login() { - if (username == null || password == null) { - throw new GradleException("The Cloud Foundry username and password must be configured.") - } - - log "Authenticating to '${target}' with username '${username}'" - - CloudFoundryClient client = createClientWithUsernamePassword() - OAuth2AccessToken token = client.login() - - TokensFile tokensFile = new TokensFile() - tokensFile.saveToken(target.toURI(), token, client.cloudInfo, getCurrentSpace(client)) - - log "Authentication successful" - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogoutCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogoutCloudFoundryTask.groovy deleted file mode 100644 index 930e5dbedbc..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogoutCloudFoundryTask.groovy +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.tokens.TokensFile -import org.gradle.api.tasks.TaskAction - -/** - * Logs out and removes access token. - */ -class LogoutCloudFoundryTask extends AbstractCloudFoundryTask { - - LogoutCloudFoundryTask() { - super() - description = 'Logs out of the target Cloud Foundry platform' - } - - @TaskAction - void logout() { - log "Logging out" - - TokensFile tokensFile = new TokensFile() - tokensFile.removeToken(target.toURI()) - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogsCloudFoundryHelper.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogsCloudFoundryHelper.groovy deleted file mode 100644 index 194e54b6c42..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogsCloudFoundryHelper.groovy +++ /dev/null @@ -1,25 +0,0 @@ -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.ApplicationLog - -class LogsCloudFoundryHelper { - String formatLogEntry(ApplicationLog logEntry) { - "${formatTimestamp(logEntry.timestamp)} ${formatSource(logEntry.sourceName, logEntry.sourceId)} ${formatType(logEntry.messageType)} ${logEntry.message}" - } - - String formatTimestamp(Date timestamp) { - timestamp.format("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - } - - String formatSource(String sourceName, String sourceId) { - String source = sourceName - if (source.equals("App")) { - source += "/${sourceId}" - } - "[${source}]".padRight(10) - } - - String formatType(def messageType) { - messageType.toString() - 'STD' - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogsCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogsCloudFoundryTask.groovy deleted file mode 100644 index b5a93692b16..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/LogsCloudFoundryTask.groovy +++ /dev/null @@ -1,67 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.ApplicationLogListener -import org.cloudfoundry.client.lib.domain.ApplicationLog -import org.gradle.api.GradleException -import org.gradle.api.tasks.TaskAction - -/** - * Task which displays log files. - */ -@Mixin(LogsCloudFoundryHelper) -class LogsCloudFoundryTask extends AbstractCloudFoundryTask { - LogsCloudFoundryTask() { - super() - description = 'Shows a tail of log entries' - } - - @TaskAction - void showLogs() { - withCloudFoundryClient { - log "Getting logs for ${application}\n" - - withApplication { - def listener = new LoggingListener() - client.streamLogs(application, listener) - synchronized (listener) { - listener.wait() - } - } - } - } - - private class LoggingListener implements ApplicationLogListener { - public void onMessage(ApplicationLog logEntry) { - log formatLogEntry(logEntry) - } - - public void onError(Throwable e) { - synchronized (this) { - this.notify() - } - throw new GradleException("Error streaming logs", e) - } - - public void onComplete() { - synchronized (this) { - this.notify() - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/MapCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/MapCloudFoundryTask.groovy deleted file mode 100644 index 42bfc3c69b7..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/MapCloudFoundryTask.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * A Basic task which can be used to map the application to the url on Cloud Foundry platform. - * - * Preserves any URIs the already exist. - */ -class MapCloudFoundryTask extends AbstractMapCloudFoundryTask { - - MapCloudFoundryTask() { - super() - description = 'Maps a URI to an application' - } - - @TaskAction - void mapApplicationUris() { - withCloudFoundryClient { - log "Mapping uris ${allUris} for ${application}" - - withApplication { - List applicationUris = mapUrisToApplication() - - listUriMappings(applicationUris) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryHelper.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryHelper.groovy deleted file mode 100644 index 5162cb6c1a2..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryHelper.groovy +++ /dev/null @@ -1,85 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.CloudFoundryException -import org.cloudfoundry.client.lib.domain.Staging -import org.gradle.api.GradleException -import org.springframework.http.HttpStatus - -class PushCloudFoundryHelper { - void createApplication() { - - Staging staging = new Staging(command, buildpack, stack, healthCheckTimeout) - List serviceNames = serviceInfos.collect { it.name } - - if (applicationExists(application)) { - log "Updating application ${application}" - client.stopApplication(application) - client.updateApplicationStaging(application, staging) - if (memory) { - client.updateApplicationMemory(application, memory) - } - if (diskQuota) { - client.updateApplicationDiskQuota(application, diskQuota) - } - client.updateApplicationUris(application, allUris) - client.updateApplicationServices(application, serviceNames) - } else { - log "Creating application ${application}" - client.createApplication(application, staging, diskQuota, memory, allUris, serviceNames) - } - - if (env) { - client.updateApplicationEnv(application, env) - } - - client.updateApplicationInstances(application, instances) - } - - boolean applicationExists(String appName) { - try { - client.getApplication(appName) - return true - } catch (CloudFoundryException e) { - if (e.statusCode == HttpStatus.NOT_FOUND) { - return false - } else { - throw e - } - } - } - - void uploadApplication() { - if (file.isDirectory()) { - log "Uploading from ${file}" - } else { - log "Uploading file ${file}" - } - - client.uploadApplication(application, file) - } - - void validateApplicationConfig() { - ensureFileExists() - } - - void ensureFileExists() { - if (!file || !file.exists()) { - throw new GradleException("You must specify a valid file ('${file}' is not valid)") - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryTask.groovy deleted file mode 100644 index 97e57477d98..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/PushCloudFoundryTask.groovy +++ /dev/null @@ -1,51 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * Tasks used to push an application to a Cloud Foundry cloud. - * - * @author Cedric Champeau - * @author Scott Frederick - */ -@Mixin(ServiceCloudFoundryHelper) -@Mixin(PushCloudFoundryHelper) -@Mixin(StartCloudFoundryHelper) -class PushCloudFoundryTask extends AbstractCloudFoundryTask { - PushCloudFoundryTask() { - super() - description = 'Pushes an application' - } - - @TaskAction - void push() { - withCloudFoundryClient { - validateApplicationConfig() - - createServices(serviceInfos) - - createApplication() - - uploadApplication() - - if (startApp) { - startApplication() - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/RecentLogsCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/RecentLogsCloudFoundryTask.groovy deleted file mode 100644 index 5729cb7a96a..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/RecentLogsCloudFoundryTask.groovy +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.ApplicationLog -import org.gradle.api.tasks.TaskAction - -/** - * Task which displays log files. - */ -@Mixin(LogsCloudFoundryHelper) -class RecentLogsCloudFoundryTask extends AbstractCloudFoundryTask { - RecentLogsCloudFoundryTask() { - super() - description = 'Shows recent log entries' - } - - @TaskAction - void showRecentLogs() { - withCloudFoundryClient { - log "Getting logs for ${application}\n" - - withApplication { - List logs = client.getRecentLogs(application) - logs.each { logEntry -> - log formatLogEntry(logEntry) - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/RestartApplicationCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/RestartApplicationCloudFoundryTask.groovy deleted file mode 100644 index 5fef02463ed..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/RestartApplicationCloudFoundryTask.groovy +++ /dev/null @@ -1,41 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.StartingInfo -import org.gradle.api.tasks.TaskAction - -/** - * Task used to restart an application. - */ -@Mixin(StartCloudFoundryHelper) -class RestartApplicationCloudFoundryTask extends AbstractCloudFoundryTask { - RestartApplicationCloudFoundryTask() { - super() - description = 'Restarts an application' - } - - @TaskAction - void restart() { - withCloudFoundryClient { - log "Restarting ${application}" - withApplication { - StartingInfo startingInfo = client.restartApplication(application) - showAppStartup(startingInfo) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ScaleCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ScaleCloudFoundryTask.groovy deleted file mode 100644 index b95c1d27d55..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ScaleCloudFoundryTask.groovy +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * A basic task which can be used to add an environment variable to an application on CloudFoundry platform. - */ -class ScaleCloudFoundryTask extends AbstractEnvCloudFoundryTask { - ScaleCloudFoundryTask() { - super() - description = 'Scales application instances up or down' - } - - @TaskAction - void scale() { - withCloudFoundryClient { - log "Setting number of instances of application ${application} to ${instances}" - - withApplication { - client.updateApplicationInstances(application, instances as Integer) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServiceCloudFoundryHelper.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServiceCloudFoundryHelper.groovy deleted file mode 100644 index ccc7d77f16a..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServiceCloudFoundryHelper.groovy +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudService -import org.cloudfoundry.client.lib.domain.CloudServiceOffering -import org.gradle.api.GradleException -import org.cloudfoundry.gradle.CloudFoundryServiceExtension - -class ServiceCloudFoundryHelper { - void createServices(def services) { - services.each { CloudFoundryServiceExtension service -> - createService(service) - } - } - - void createService(CloudFoundryServiceExtension service) { - List services = client.services - CloudService foundService = services.find { - it.name.equals(service.name) - } - if (foundService) { - if (verboseEnabled) { - logVerbose "Service ${service.name} already exists, not creating" - } - return - } - - if (service.label == 'user-provided') { - log "Creating service ${service.name}" - CloudService cloudService = new CloudService(name: service.name) - client.createUserProvidedService(cloudService, service.userProvidedCredentials as Map) - } else { - List offerings = client.serviceOfferings - CloudServiceOffering offering = offerings.find { - it.label == service.label - } - if (!offering) { - throw new GradleException("No matching service with label '${service.label}' found") - } - - String ver = service.version ?: offering.version - - log "Creating service ${service.name}" - CloudService cloudService = new CloudService(name: service.name, label: service.label, - provider: service.provider, version: ver, plan: service.plan) - client.createService(cloudService) - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServiceOfferingsCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServiceOfferingsCloudFoundryTask.groovy deleted file mode 100644 index bdf81ba66ca..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServiceOfferingsCloudFoundryTask.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudServiceOffering -import org.cloudfoundry.gradle.text.FlexibleTableOutput -import org.gradle.api.tasks.TaskAction - -/** - * Task used to display service offerings. - */ -class ServiceOfferingsCloudFoundryTask extends AbstractCloudFoundryTask { - ServiceOfferingsCloudFoundryTask() { - super() - description = 'Displays information about service offerings' - } - - @TaskAction - void showServiceOfferings() { - withCloudFoundryClient { - List services = client.serviceOfferings - - if (services.isEmpty()) { - log 'No services available' - } else { - FlexibleTableOutput output = new FlexibleTableOutput() - - services.each { CloudServiceOffering service -> - def plans = service.cloudServicePlans.collect { it.name } - - output.addRow(service: service.name, - plans: plans.join(', '), - description: service.description) - } - - log 'Services\n' + output.toString() - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServicesCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServicesCloudFoundryTask.groovy deleted file mode 100644 index dbfc72840f2..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/ServicesCloudFoundryTask.groovy +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.cloudfoundry.client.lib.domain.CloudService -import org.cloudfoundry.gradle.text.FlexibleTableOutput -import org.gradle.api.tasks.TaskAction - -/** - * Task used to display service instances. - */ -class ServicesCloudFoundryTask extends AbstractCloudFoundryTask { - ServicesCloudFoundryTask() { - super() - description = 'Displays information about service instances' - } - - @TaskAction - void showServices() { - withCloudFoundryClient { - List services = client.services - - if (services.isEmpty()) { - log 'No services' - } else { - def servicesToApps = mapServicesToApps(services) - - FlexibleTableOutput output = new FlexibleTableOutput() - - services.each { CloudService service -> - output.addRow(name: service.name, - service: service.isUserProvided() ? 'user-provided' : service.label, - plan: service.isUserProvided() ? '' : service.plan, - 'bound apps': servicesToApps[service.name].join(', ')) - } - log 'Services\n' + output.toString() - } - } - } - - protected def mapServicesToApps(def services) { - def servicesToApps = [:] - services.each { servicesToApps[it.name] = [] } - - List apps = client.applications - apps.each { app -> - app.services.each { serviceName -> servicesToApps[serviceName] << app.name } - } - servicesToApps - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SetEnvCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SetEnvCloudFoundryTask.groovy deleted file mode 100644 index f2522bb07bd..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SetEnvCloudFoundryTask.groovy +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * A basic task which can be used to add an environment variable to an application on CloudFoundry platform. - */ -class SetEnvCloudFoundryTask extends AbstractEnvCloudFoundryTask { - SetEnvCloudFoundryTask() { - super() - description = 'Sets environment variables to an application' - } - - @TaskAction - void setEnvironmentVariables() { - withCloudFoundryClient { - log "Setting environment variables for ${application}" - - withApplication { - CloudApplication app = client.getApplication(application) - - def newEnv = modifyAppEnv(app) { existingEnv, passedEnv -> - existingEnv + passedEnv.collectEntries { key, value -> [(key.toString()): value.toString()] } - } - - if (verboseEnabled) { - listEnvironmentVariables(newEnv) - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SpacesCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SpacesCloudFoundryTask.groovy deleted file mode 100644 index 1a7973c7d42..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SpacesCloudFoundryTask.groovy +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudSpace -import org.cloudfoundry.gradle.text.FlexibleTableOutput -import org.gradle.api.tasks.TaskAction - -/** - * A task used to display available spaces. - * - * @author Scott Frederick - */ -@Mixin(AppStatusCloudFoundryHelper) -class SpacesCloudFoundryTask extends AbstractCloudFoundryTask { - SpacesCloudFoundryTask() { - super() - description = 'Displays available spaces' - } - - @TaskAction - void showSpaces() { - withCloudFoundryClient { - List spaces = client.spaces - CloudSpace current = currentSpace - - FlexibleTableOutput output = new FlexibleTableOutput() - - spaces.findAll { space -> - space.organization.name == current.organization.name - } - .each { space -> - output.addRow(name: space.name) - } - - log "Spaces in org ${current.organization.name}\n\n" + output.toString() - } - } -} - diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StartApplicationCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StartApplicationCloudFoundryTask.groovy deleted file mode 100644 index 9b7f5977428..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StartApplicationCloudFoundryTask.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * Task used to start an application. - */ -@Mixin(StartCloudFoundryHelper) -class StartApplicationCloudFoundryTask extends AbstractCloudFoundryTask { - StartApplicationCloudFoundryTask() { - super() - description = 'Starts an application' - } - - @TaskAction - void start() { - withCloudFoundryClient { - withApplication { - CloudApplication app = client.getApplication(application) - if (app.runningInstances > 0) { - log "Application ${application} is already started" - } else { - startApplication() - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StartCloudFoundryHelper.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StartCloudFoundryHelper.groovy deleted file mode 100644 index a3fa7b58404..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StartCloudFoundryHelper.groovy +++ /dev/null @@ -1,145 +0,0 @@ -package org.cloudfoundry.gradle.tasks - -import groovy.time.TimeCategory -import org.cloudfoundry.client.lib.StartingInfo -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.cloudfoundry.client.lib.domain.InstanceInfo -import org.cloudfoundry.client.lib.domain.InstanceState -import org.cloudfoundry.client.lib.domain.InstancesInfo -import org.gradle.api.GradleException -import org.springframework.http.HttpStatus - -class StartCloudFoundryHelper { - void startApplication() { - log "Starting ${application}" - StartingInfo startingInfo = client.startApplication(application) - showAppStartup(startingInfo) - } - - void showAppStartup(StartingInfo startingInfo) { - CloudApplication app = client.getApplication(application) - - showStagingStatus(startingInfo) - showStartingStatus(app) - showStartResults(app) - } - - void showStagingStatus(StartingInfo startingInfo) { - if (startingInfo) { - errorHandler.addExpectedStatus(HttpStatus.NOT_FOUND) - - int offset = 0 - String staging = client.getStagingLogs(startingInfo, offset) - while (staging != null) { - log staging - offset += staging.size() - staging = client.getStagingLogs(startingInfo, offset) - } - - errorHandler.clearExpectedStatus() - } - } - - void showStartingStatus(CloudApplication app) { - log "Checking status of ${app.name}" - - errorHandler.addExpectedStatus(HttpStatus.BAD_REQUEST) - - Date startTimeout = calcStartTimeout() - - while (true) { - List instances = getApplicationInstances(app) - - if (instances) { - def expectedInstances = getExpectedInstances(instances) - def runningInstances = getRunningInstances(instances) - def flappingInstances = getFlappingInstances(instances) - - showInstancesStatus(instances, runningInstances, expectedInstances) - - if (flappingInstances > 0) - break - - if (runningInstances == expectedInstances) - break - } - - Date now = new Date() - if (now.after(startTimeout)) { - throw new GradleException("Application ${application} start timed out") - } - - sleep 1000 - } - - errorHandler.clearExpectedStatus() - } - - void showInstancesStatus(List instances, runningInstances, expectedInstances) { - def stateCounts = [:].withDefault { 0 } - instances.each { instance -> - stateCounts[instance.state] += 1 - } - - def stateStrings = [] - stateCounts.each { state, count -> - stateStrings << "${count} ${state.toString().toLowerCase()}" - } - - def expectedString = "${expectedInstances}" - def runningString = "${runningInstances}".padLeft(expectedString.length()) - log " ${runningString} of ${expectedString} instances running (${stateStrings.join(", ")})" - } - - void showStartResults(CloudApplication app) { - List instances = getApplicationInstances(app) - - if (!instances) { - throw new GradleException("Application ${application} start unsuccessful") - } - - def runningInstances = getRunningInstances(instances) - def flappingInstances = getFlappingInstances(instances) - - if (flappingInstances > 0 || runningInstances == 0) { - throw new GradleException("Application ${application} start unsuccessful") - } else if (runningInstances > 0) { - List uris = allUris - if (uris.empty) { - log "Application ${application} is available" - } else { - log "Application ${application} is available at ${uris.collect{"http://$it"}.join(',')}" - } - } - } - - List getApplicationInstances(CloudApplication app) { - InstancesInfo instancesInfo = client.getApplicationInstances(app) - instancesInfo?.instances - } - - def getExpectedInstances(List instances) { - instances.size() - } - - def getRunningInstances(List instances) { - instances.count { instance -> instance.state == InstanceState.RUNNING } - } - - def getFlappingInstances(List instances) { - instances.count { instance -> instance.state == InstanceState.FLAPPING } - } - - def calcStartTimeout() { - def startTimeout = new Date() - use(TimeCategory) { - if (appStartupTimeout) - startTimeout += appStartupTimeout.minutes - else if (healthCheckTimeout) - startTimeout += healthCheckTimeout.seconds - else - startTimeout += 5.minutes - } - startTimeout - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StopApplicationCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StopApplicationCloudFoundryTask.groovy deleted file mode 100644 index 5aa9258f6a5..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/StopApplicationCloudFoundryTask.groovy +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * Task used to stop an application. - */ -class StopApplicationCloudFoundryTask extends AbstractCloudFoundryTask { - StopApplicationCloudFoundryTask() { - super() - description = 'Stops an application' - } - - @TaskAction - void stopApplication() { - withCloudFoundryClient { - log "Stopping ${application}" - withApplication { client.stopApplication(application) } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SwapDeployedCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SwapDeployedCloudFoundryTask.groovy deleted file mode 100644 index 99f1227f025..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/SwapDeployedCloudFoundryTask.groovy +++ /dev/null @@ -1,64 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * A Basic task which can be used to map the application to the url on Cloud Foundry platform. - * - * @author Scott Frederick - */ -@Mixin(DeployCloudFoundryHelper) -class SwapDeployedCloudFoundryTask extends AbstractMapCloudFoundryTask { - - SwapDeployedCloudFoundryTask() { - super() - description = 'Swaps the URIs for deployed variants of an application' - } - - @TaskAction - void swapDeployedUris() { - withCloudFoundryClient { - validateVariantsForDeploy() - - List apps = client.applications - - List mappedAppVariants = findMappedVariants(application, apps) - List unmappedAppVariants = findUnmappedVariants(application, apps) - - if (unmappedAppVariants) { - log "Mapping URIs ${allUris} for ${unmappedAppVariants}" - } - if (mappedAppVariants) { - log "Unmapping URIs ${allUris} for ${mappedAppVariants}" - } - - withApplication { - unmappedAppVariants.each { appName -> - project.cloudfoundry.application = appName - mapUrisToApplication() - } - - mappedAppVariants.each { appName -> - project.cloudfoundry.application = appName - unmapUrisFromApplication() - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnbindServiceCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnbindServiceCloudFoundryTask.groovy deleted file mode 100644 index ad40bf393bd..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnbindServiceCloudFoundryTask.groovy +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.cloudfoundry.gradle.CloudFoundryServiceExtension -import org.gradle.api.tasks.TaskAction - -/** - * Task used to unbind a service from an application. - * - * @author Cedric Champeau - */ -class UnbindServiceCloudFoundryTask extends AbstractCloudFoundryTask { - UnbindServiceCloudFoundryTask() { - super() - description = 'Unbinds services from an application' - } - - @TaskAction - void unbindService() { - withCloudFoundryClient { - withApplication { - CloudApplication app = client.getApplication(application) - List servicesNames = app.services - - serviceInfos.each { CloudFoundryServiceExtension service -> - String serviceName = service.name - - if (!servicesNames.contains(serviceName)) { - log "Service ${serviceName} is not bound to ${application}" - } else { - log "Unbinding service ${serviceName} from application ${application}" - client.unbindService(application, serviceName) - } - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UndeployCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UndeployCloudFoundryTask.groovy deleted file mode 100644 index 8878854e4e9..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UndeployCloudFoundryTask.groovy +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * Tasks used to undeploy unused variants of an application to a Cloud Foundry cloud. - * - * @author Scott Frederick - */ -@Mixin(DeployCloudFoundryHelper) -class UndeployCloudFoundryTask extends AbstractCloudFoundryTask { - UndeployCloudFoundryTask() { - super() - description = 'Undeploys variants of an application' - } - - @TaskAction - void undeploy() { - withCloudFoundryClient { - validateVariantsForDeploy() - - List runningApps = client.applications - - List unmappedAppVariants = findUnmappedVariants(application, runningApps) - - if (unmappedAppVariants.isEmpty()) { - log "No candidates for undeploying found" - } - - unmappedAppVariants.each { String appName -> - project.cloudfoundry.application = appName - log "Deleting application ${appName}" - withApplication { - client.deleteApplication(appName) - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnmapCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnmapCloudFoundryTask.groovy deleted file mode 100644 index 399d8d76d0a..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnmapCloudFoundryTask.groovy +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.gradle.api.tasks.TaskAction - -/** - * A Basic task which can be used to unmap the application to the url on Cloud Foundry platform. - * - * * Preserves any URIs the already exist. - */ -class UnmapCloudFoundryTask extends AbstractMapCloudFoundryTask { - - UnmapCloudFoundryTask() { - super() - description = 'Unmaps a URI from application' - } - - @TaskAction - void unmapApplicationUris() { - withCloudFoundryClient { - log "Unmapping uris ${allUris} for ${application}" - - withApplication { - List applicationUris = unmapUrisFromApplication() - - listUriMappings(applicationUris) - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnsetEnvCloudFoundryTask.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnsetEnvCloudFoundryTask.groovy deleted file mode 100644 index ca41a016aad..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/UnsetEnvCloudFoundryTask.groovy +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.domain.CloudApplication -import org.gradle.api.tasks.TaskAction - -/** - * A basic task which can be used to delete an environment variable to an application on CloudFoundry platform. - */ -class UnsetEnvCloudFoundryTask extends AbstractEnvCloudFoundryTask { - UnsetEnvCloudFoundryTask() { - super() - description = 'Deletes environment variables from an application' - } - - @TaskAction - void deleteEnvironmentVariables() { - withCloudFoundryClient { - log "Deleting environment variables for ${application}" - - withApplication { - CloudApplication app = client.getApplication(application) - - def newEnv = modifyAppEnv(app) { existingEnv, passedEnv -> - existingEnv - passedEnv - } - - if (verboseEnabled) { - listEnvironmentVariables(newEnv) - } - } - } - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/WarningBypassingResponseErrorHandler.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/WarningBypassingResponseErrorHandler.groovy deleted file mode 100644 index be7e5ee8e20..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/tasks/WarningBypassingResponseErrorHandler.groovy +++ /dev/null @@ -1,29 +0,0 @@ -package org.cloudfoundry.gradle.tasks - -import org.cloudfoundry.client.lib.CloudFoundryException -import org.cloudfoundry.client.lib.rest.CloudControllerResponseErrorHandler -import org.springframework.http.HttpStatus - -/** - * This class is used to override the default error handling for REST responses in RestTemplate. The main - * goal is to keep RestTemplate from logging warnings for expected HTTP "errors". - */ -class WarningBypassingResponseErrorHandler extends CloudControllerResponseErrorHandler { - private List expectedStatusCodes = [] - - public void addExpectedStatus(HttpStatus status) { - expectedStatusCodes << status - } - - public void clearExpectedStatus() { - expectedStatusCodes.clear() - } - - @Override - protected boolean hasError(HttpStatus statusCode) { - if (expectedStatusCodes.contains(statusCode)) { - throw new CloudFoundryException(statusCode) - } - return super.hasError(statusCode) - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/text/FlexibleTableOutput.groovy b/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/text/FlexibleTableOutput.groovy deleted file mode 100644 index c4fc0dd9a13..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/groovy/org/cloudfoundry/gradle/text/FlexibleTableOutput.groovy +++ /dev/null @@ -1,45 +0,0 @@ -package org.cloudfoundry.gradle.text - -class FlexibleTableOutput { - private def rows = [] - private def columns = [:] - - public void addRow(def values) { - rows << values - - values.each { name, value -> - if (columns[name]) { - columns[name] << value.length() - } else { - columns[name] = [name.length(), value.length()] - } - } - } - - public String toString() { - StringBuilder sb = new StringBuilder() - - def columnSizes = [:] - - columns.each { name, sizes -> - def max = sizes.max() - columnSizes[name] = max - sb.append(name.padRight(max)).append(' ') - } - sb.append('\n') - - columnSizes.each { name, size -> - sb.append('-' * size).append(' ') - } - sb.append('\n') - - rows.each { row -> - row.each { name, value -> - sb.append(value.padRight(columnSizes[name])).append(' ') - } - sb.append('\n') - } - - sb.toString() - } -} diff --git a/cloudfoundry-gradle-plugin/src/main/resources/META-INF/gradle-plugins/cloudfoundry.properties b/cloudfoundry-gradle-plugin/src/main/resources/META-INF/gradle-plugins/cloudfoundry.properties deleted file mode 100644 index e6c9d4e4644..00000000000 --- a/cloudfoundry-gradle-plugin/src/main/resources/META-INF/gradle-plugins/cloudfoundry.properties +++ /dev/null @@ -1,17 +0,0 @@ -# -# Copyright 2012 the original author or authors. -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -implementation-class=org.cloudfoundry.gradle.CloudFoundryPlugin - diff --git a/cloudfoundry-gradle-plugin/src/test/groovy/org/cloudfoundry/gradle/CloudFoundryPluginTest.groovy b/cloudfoundry-gradle-plugin/src/test/groovy/org/cloudfoundry/gradle/CloudFoundryPluginTest.groovy deleted file mode 100644 index 1e810a56d3b..00000000000 --- a/cloudfoundry-gradle-plugin/src/test/groovy/org/cloudfoundry/gradle/CloudFoundryPluginTest.groovy +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2012 the original author or authors. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.gradle - -import org.cloudfoundry.client.lib.CloudFoundryOperations -import org.cloudfoundry.client.lib.domain.CloudEntity -import org.cloudfoundry.client.lib.domain.CloudInfo -import org.cloudfoundry.client.lib.domain.CloudOrganization -import org.cloudfoundry.client.lib.domain.CloudSpace -import org.cloudfoundry.gradle.tasks.AbstractCloudFoundryTask -import org.gradle.api.Task -import org.junit.Test -import org.gradle.testfixtures.ProjectBuilder -import org.gradle.api.Project -import static org.junit.Assert.* -import org.junit.Before -import static org.hamcrest.CoreMatchers.* - -class CloudFoundryPluginTest { - private Project project - - private StringBuilder logOutput - private def mockClient = [:] - - @Before - public void setUp() { - project = ProjectBuilder.builder().build() - project.apply plugin: 'cloudfoundry' - - project.cloudfoundry.with { - target = 'https://api.run.pivotal.io' - username = 'test-user' - password = 'test-password' - space = 'test-space' - } - - mockClient << [ - login: { "login" }, - logout: { "logout" }, - ] - - logOutput = new StringBuilder() - - AbstractCloudFoundryTask.metaClass.connectToCloudFoundry = { - client = mockClient as CloudFoundryOperations - } - } - - @Test - public void configuration() { - assertTrue(project.cloudfoundry instanceof CloudFoundryExtension) - } - - @Test - public void target() { - def meta = new CloudEntity.Meta(UUID.randomUUID(), new Date(), new Date()) - def cloudInfo = { new CloudInfo(version: 2) } - def spaces = { [new CloudSpace(meta, 'test-space', new CloudOrganization(meta, 'test-org'))] as List } - mockClient << [ - getCloudInfo: cloudInfo, - getSpaces: spaces - ] - - withTask('cf-target').execute() - - assertThat(logOutput.toString(), containsString(project.cloudfoundry.target)) - assertThat(logOutput.toString(), containsString(project.cloudfoundry.username)) - assertThat(logOutput.toString(), containsString(project.cloudfoundry.space)) - } - - private Task withTask(String taskName) { - Task task = project.tasks[taskName] - - task.metaClass.log = { message -> - println message - logOutput << message - } - - task - } -} diff --git a/cloudfoundry-gradle-plugin/src/test/groovy/org/cloudfoundry/gradle/text/FlexibleTableOutputTest.groovy b/cloudfoundry-gradle-plugin/src/test/groovy/org/cloudfoundry/gradle/text/FlexibleTableOutputTest.groovy deleted file mode 100644 index 9c6f0a81faa..00000000000 --- a/cloudfoundry-gradle-plugin/src/test/groovy/org/cloudfoundry/gradle/text/FlexibleTableOutputTest.groovy +++ /dev/null @@ -1,22 +0,0 @@ -package org.cloudfoundry.gradle.text - -import org.junit.Test - -class FlexibleTableOutputTest { - @Test - void testAdd() { - FlexibleTableOutput output = new FlexibleTableOutput() - - output.addRow(first: 'a', second: '1234567890', longcolumname: 'zyxwvut') - output.addRow(first: 'abcdefg', second: '123', longcolumname: 'zyxwvutsrqp') - output.addRow(first: 'abcdefghijklmnop', second: '12345', longcolumname: 'zyx') - - assert output.toString() == """\ -first second longcolumnname ----------------- ---------- -------------- -a 1234567890 zyxwvut -abcdefg 123 zyxwvutsrqp -abcdefghijklmnop 12345 zyx -""" - } -} diff --git a/cloudfoundry-maven-plugin/.gitignore b/cloudfoundry-maven-plugin/.gitignore deleted file mode 100644 index e88b874590b..00000000000 --- a/cloudfoundry-maven-plugin/.gitignore +++ /dev/null @@ -1,12 +0,0 @@ -target -log.roo -.project -.classpath -.settings -.springBeans -.DS_Store -*.iml -*.iws -*.ipr -release.properties -pom.xml.releaseBackup/*.iml diff --git a/cloudfoundry-maven-plugin/README.md b/cloudfoundry-maven-plugin/README.md deleted file mode 100644 index 26e9cb7d0cc..00000000000 --- a/cloudfoundry-maven-plugin/README.md +++ /dev/null @@ -1,316 +0,0 @@ -# Cloud Foundry Maven Plugin - -## Introduction - -Since Maven is one of the dominant build and deployment tools in the Java world, we made the core functionality of the [Cloud Foundry cf command line tool](http://docs.cloudfoundry.com/docs/using/managing-apps/cf/) also available to Maven users. - -## Configuration - -In order to get started you must as a minimum add the **cf-maven-plugin** to your project's pom.xml: - -~~~xml - - org.cloudfoundry - cf-maven-plugin - 1.0.3 - -~~~ - -### A complete configuration example for a web application - -Following is a typical configuration example, which uses most of the available configuration parameters. Use `cf:help` to see a complete list of configuration options. - -~~~xml - - ... - - - - org.cloudfoundry - cf-maven-plugin - 1.0.3 - - mycloudfoundry-instance - http://api.run.pivotal.io - mycloudfoundry-org - development - my-app - my-app.cfapps.io - 512 - 1024 - 60 - - env-var-value - - - - postgres-test - - turtle - - - web-service - - - http://example.com/service - abc123 - - - - - - - - ... - -~~~ - -in `settings.xml`: - -~~~xml - - - - mycloudfoundry-instance - myname@email.com - s3cr3t - - - ... - -~~~ - -## Command Line Usage - -### Overview - -The following Maven *goals* are available for the Cloud Foundry Maven Plugin: - - - - - - - - - - - - - - - - - - - - - - - - -
cf:apps List deployed applications.
cf:app Show details of an application.
cf:delete Delete an application.
cf:env Show an application's environment variables.
cf:help Show documentation for all available commands.
cf:push Push and optionally start an application.
cf:push-only Push and optionally start an application, without packaging.
cf:restart Restart an application.
cf:start Start an application.
cf:stop Stop an application.
cf:target Show information about the target Cloud Foundry service.
cf:logs Tail application logs.
cf:recentLogs Show recent application logs.
cf:scale Scale the application instances up or down.
cf:services Show a list of provisioned services.
cf:service-plans Show a list of available service plans.
cf:create-services Create services defined in the pom.
cf:delete-services Delete services defined in the pom.
cf:bind-services Bind services to an application.
cf:unbind-services Unbind services from an application.
cf:login Log in to the target Cloud Foundry service and save access tokens.
cf:logout Log out of the target Cloud Foundry service and remove access tokens.
- -### Usage Examples - -**Show documentation for all available commands** - - $ mvn cf:help - -**List deployed applications** - - $ mvn cf:apps - -**Delete an application** - - $ mvn cf:delete [-Dcf.appname] - -**Show target service information** - - $ mvn cf:target - -**Scale the application instances up or down** - - $ mvn cf:scale [-Dcf.appname] [-Dcf.instances] - -**Push and optionally start an application** - - $ mvn cf:push [-Dcf.appname] [-Dcf.path] [-Dcf.url] [-Dcf.instances] [-Dcf.memory] [-Dcf.no-start] - -**Restart the application** - - $ mvn cf:restart [-Dcf.appname] - -**Start the application** - - $ mvn cf:start [-Dcf.appname] - -**Stop the application** - - $ mvn cf:stop [-Dcf.appname] - -## Sensible Defaults - -### Precedence - -As the same configuration parameters can be provided either through system properties, -configuration elements in the the `pom.xml` and through the `settings.xml` file (username and -password information only), the following precedence rules apply (starting with the highest precedence): - -1. **System Properties** e.g. `mvn cf:start -Dcf.appname` -2. **setting.xml parameters** for username and password -3. **pom.xml** Configuration parameters e.g. `myApp` -4. **pom.xml** Properties e.g. `myApp` - -> **INFO** The implemented behavior deviates slightly from standard Maven behavior. - Usually Maven configuration parameters in the pom take precedence over system - properties passed in via the command line. Within the scope of the Cloud Foundry - Maven Plugin, however, system properties passed in via e.g. `-Dcf.appname` take precedence - over pom configuration parameters. - -Additional certain configuration parameter will fall back to using default values in case **no configuration value was provided**: - -### Defaults - -+ `appname`: If no app name is specified, the Maven artifact id is being used -+ `instances`: Defaults to *1* -+ `no-start`: Defaults to *false* -+ `memory`: Defaults to Cloud Controller value -+ `diskQuota`: Defaults to Cloud Controller value -+ `healthCheckTimeout`: Defaults to Cloud Controller value -+ `path`: Defaults to *${project.build.directory}/${project.build.finalName}.war* -+ `url`: Defaults to the appname and the default domain -+ `server`: Special parameter to tell Maven which server element in `settings.xml` - holds the credentials for Cloud Foundry. Defaults to *cloud-foundry-credentials* - -> The parameters `username`, `password`, `target`, and `space` don't have default values and you are required to provide them. - -## Advanced Configuration - -The Cloud Foundry Maven Plugin can be configured either by providing relevant information in the `pom.xml` file and/or via *command line* parameters (system properties). This allows users to chose the configuration path most appropriate to their business needs. In most cases though, we expect users to configure the static and non-security-sensitive parameters in the `pom.xml` file. - -### Security and Storing of Cloud Foundry Credentials - -While it is possible to configure Cloud Foundry security credentials within the pom.xml file, this is discouraged as this makes it likely that credentials will be publicly visible. A better option is to configure credentials using system properties. However, even better, the security credentials for your Cloud Foundry instance can also be configured using the standard `server` XML configuration element ([http://maven.apache.org/settings.html#Servers]). This allows for keeping out security-sensitive information from the `pom.xml` file, yet eliminating the need to provide the security credential every time you interact with Cloud Foundry. In that case, the username and password information is stored in the `settings.xml` file, which is usually placed under `~/.m2/settings.xml` (home directory). The following example illustrated the necessary configuration: - -Plugin configuration in `pom.xml`: - -~~~xml - - org.cloudfoundry - cf-maven-plugin - 1.0.2 - - mycloudfoundry-instance - http://api.run.pivotal.io - - -~~~ - -> The `server` configuration element is optional. If not explicitly set, its value will default to `cloud-foundry-credentials`: - -Configuration of `mycloudfoundry-instance` in `settings.xml`: - -~~~xml - - ... - - ... - - mycloudfoundry-instance - myname@email.com - s3cr3t - - ... - - ... - -~~~ - -As mentioned previously, you can also provide the user credentials through the following command line parameters instead: - -* `cf.username` -* `cf.password` - -e.g. by using: - - $ mvn cf:info -Dcf.username=myusername -Dcf.password=s3cr3t -Dcf.target=http://api.cloudfoundry.com - -> If the credentials are defined via the server element (in `settings.xml`) AND through the command line, then the command line parameter takes the precedence. - -Another alternative is to use the `login` and `logout` goals to authenticate with a user name and password, and allow all other goals to use access tokens saved by `login`. - - $ mvn cf:login -Dcf.username=myusername -Dcf.password=s3cr3t -Dcf.target=http://api.cloudfoundry.com - -After the `login` goal is executed in this way, it is not necessary to have a user name or password configured. - -Finally, describing probably a rather rare use-case: If you have multiple Cloud Foundry specific `server` elements defined in your `settings.xml`, you can address those through command line parameters as well using: - -* cf.server (e.g. *mvn push -Dcf.server=mycloudfoundry-instance*) - -### HTTP Proxies - -The Cloud Foundry Maven Plugin will honor the Maven HTTP proxy configuration when communicating with the target Cloud Foundry service. See https://maven.apache.org/guides/mini/guide-proxies.html for more information on configuring HTTP proxies in Maven. - -If a proxy is configured in the Maven `settings.xml`, it will be used by the plugin unless the Cloud Foundry target URL is included in the `nonProxyHosts` section of the proxy configuration. - -### Self-signed SSL Certificates - -Some Cloud Foundry deployments, such as those deployed using Pivotal CF, use a self-signed certificate for SSL connectivity. If you attempt to target a Cloud Foundry service that is using self-signed certificates, you may get an error containing the text `javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated`. - -To instruct the Cloud Foundry Maven plugin to accept self-signed certificates from the Cloud Foundry target endpoint, add `true` to the plugin configuration block. - -# History - -## Changes from version 1.0.2 to 1.0.3 - -* Changed `cf:logs` to tail logs from Loggregator -* Added `cf:recentLogs` -* Fixed defaulting of `url` - -## Changes from version 1.0.0 to 1.0.2 - -* Added HTTP Proxy support for targeting CF platforms from behind a proxy -* Added support for user-provided service instances -* Added support for `healthCheckTimeout` and `diskQuota` application parameters -* Removed defaulting of `memory` app setting to prefer the default configured in Cloud Controller -* Added `trustSelfSignedCerts` plugin parameter - -## Changes from version 1.0.0.M4 to 1.0.0 - -* Upgraded to cloudfoundry-client-lib 1.0.0 -* Removed v1 support and all v1 concepts (update goal, runtime and framework parameters) -* Added support for buildpacks -* Renamed goals and parameters for consistency with 'cf' and Cloud Foundry Gradle Plugin -* Changed login and logout goals to save tokens to the file `~/.cf/tokens.yml` instead of `~/.mvn-cf.xml`, for compatibility with the cf CLI - -## Changes from version 1.0.0.M3 to 1.0.0.M4 - -* Upgraded to cloudfoundry-client-lib 0.8.2 -* Modified the output from older grid style to cleaner column style -* Added Cloud Controller v1 / v2 (cloud\_controller\_ng) detection -* Added support for org and space in v2 (cloud\_controller\_ng) -* Added support for push and delete app to v2 (cloud\_controller\_ng) -* Added show log for v2 (cloud\_controller\_ng) -* Added support for create-services for v2 (cloud\_controller\_ng) - -## Changes from version 1.0.0.M2 to 1.0.0.M3 - -* Added support for one or more **service** child elements for the element. This allows to create and delete services. The required config options for a service are *name* and *vendor* with *version* and *tier* being optional. -* Modified the **cf:push** goal to take the services configuration and create the services, if they don't exist, and bind them to the application. -* Added **cf:logs** goal which shows the log files of the application specified in either the configuration parameter or in the pom file. -* Added **cf:services** goal which shows the list of available services along with provisioned ones. -* Added **cf:create-services** goal which creates services specified in the configuration parameter or in the pom file. -* Added **cf:delete-services** goal which deletes the services created using the services configuration in the pom file. - -## Changes from version 1.0.0.M1 to 1.0.0.M2 - -* Added **Framework** configuration parameter (-Dcf.framework) which allows to set the framework for the application. It defaults to *spring*. -* Added ability to deploy not only war-files but also point to directories and deploy those -* Added support for deployments of stand-alone applications by specifying **standalone** as the *framework* -* Deprecated **warfile** as now you can deploy stand-alone applications as well. Behavior is equal to the **path** property. -* Added **path** configuration property (-Dcf.path). -* Added **Runtime** property (-Dcf.runtime). It defaults to 'java' but technically you could also use the Maven Plugin to deploy e.g. Node and Ruby applications. -* Improved **cf:info** Maven goal. It will now show a list of available **frameworks** and **system services**, as well as a list of available **runtimes*** -* **instances** property now defaults to *1*. - diff --git a/cloudfoundry-maven-plugin/pom.xml b/cloudfoundry-maven-plugin/pom.xml deleted file mode 100644 index a54a604fc3b..00000000000 --- a/cloudfoundry-maven-plugin/pom.xml +++ /dev/null @@ -1,211 +0,0 @@ - - 4.0.0 - org.cloudfoundry - cf-maven-plugin - maven-plugin - 1.0.4.BUILD-SNAPSHOT - Cloud Foundry Maven Plugin - https://github.com/cloudfoundry/cf-java-client/cloudfoundry-maven-plugin - - - A Maven plugin that makes it easy to deploy Maven-based applications to Cloud Foundry instances. - - - - 2.2.1 - - - - UTF-8 - 1.7 - 1.5.6 - - - - http://github.com/cloudfoundry/cf-java-client - scm:git:git@github.com/cloudfoundry/cf-java-client - scm:git:git@github.com/cloudfoundry/cf-java-client - - - - - Apache 2.0 License - http://www.apache.org/licenses/LICENSE-2.0 - repo - - - - - - release-sign-artifacts - - - performRelease - true - - - - - - org.apache.maven.plugins - maven-gpg-plugin - 1.4 - - - sign-artifacts - verify - - sign - - - - - - - - - - - - - org.springframework.build.aws - org.springframework.build.aws.maven - 3.0.0.RELEASE - - - - - org.apache.maven.plugins - maven-compiler-plugin - 2.4 - - ${java-version} - ${java-version} - -Xlint:all - true - true - - - - org.apache.maven.plugins - maven-release-plugin - 2.3 - - false - - - - - - - - org.cloudfoundry - cloudfoundry-client-lib - 1.0.3 - - - - org.apache.maven - maven-plugin-api - 2.0 - - - org.apache.maven.wagon - wagon-provider-api - 2.2 - - - org.apache.maven - maven-core - 2.2.1 - - - slf4j-nop - org.slf4j - - - wagon-webdav-jackrabbit - org.apache.maven.wagon - - - - - org.apache.maven - maven-artifact-manager - 2.2.1 - - - - junit - junit - 4.10 - test - - - - org.apache.maven.shared - maven-plugin-testing-harness - 1.1 - test - - - org.mockito - mockito-all - 1.9.0 - test - - - - - - org.slf4j - slf4j-api - ${slf4j-version} - test - - - org.slf4j - log4j-over-slf4j - ${slf4j-version} - test - - - org.slf4j - jcl-over-slf4j - ${slf4j-version} - test - - - - - - ghillert - Gunnar Hillert - ghillert at vmware.com - - - amoghadam - Ali Moghadam - amoghadam at rbcon.com - - - sfrederick - Scott Frederick - sfrederick at gopivotal.com - - - - - - sonatype-ossrh-staging - Sonatype OSSRH - http://oss.sonatype.org/service/local/staging/deploy/maven2 - - - spring-snapshot - Spring Snapshot Repository - s3://maven.springframework.org/snapshot - - - diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractApplicationAwareCloudFoundryMojo.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractApplicationAwareCloudFoundryMojo.java deleted file mode 100644 index 7436270b2b0..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractApplicationAwareCloudFoundryMojo.java +++ /dev/null @@ -1,763 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.concurrent.TimeUnit; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.artifact.factory.ArtifactFactory; -import org.apache.maven.artifact.repository.ArtifactRepository; -import org.apache.maven.artifact.resolver.ArtifactNotFoundException; -import org.apache.maven.artifact.resolver.ArtifactResolutionException; -import org.apache.maven.artifact.resolver.ArtifactResolver; -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.StartingInfo; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.InstanceInfo; -import org.cloudfoundry.client.lib.domain.InstanceState; -import org.cloudfoundry.client.lib.domain.InstancesInfo; -import org.cloudfoundry.maven.common.Assert; -import org.cloudfoundry.client.lib.CloudFoundryClient; - -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.client.lib.domain.CloudService; - -import org.cloudfoundry.maven.common.CommonUtils; -import org.cloudfoundry.maven.common.DefaultConstants; -import org.cloudfoundry.maven.common.SystemProperties; -import org.codehaus.plexus.util.StringUtils; -import org.springframework.http.HttpStatus; - -/** - * Abstract goal for the Cloud Foundry Maven plugin that bundles access to commonly - * used plugin parameters. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Ali Moghadam - * @author Scott Frederick - * - * @since 1.0.0 - * - */ -@SuppressWarnings("UnusedDeclaration") -abstract class AbstractApplicationAwareCloudFoundryMojo extends AbstractCloudFoundryMojo { - private static final int DEFAULT_APP_STARTUP_TIMEOUT = 5; - - /** - * @parameter expression="${cf.appname}" - */ - private String appname; - - /** - * @parameter expression="${cf.url}" - */ - private String url; - - /** - * @parameter expression="${cf.urls}" - */ - private List urls; - - /** - * A string of the form groupId:artifactId:version:packaging[:classifier]. - * @parameter expression = "${cf.artifact}" default-value="${project.groupId}:${project.artifactId}:${project.version}:${project.packaging}" - */ - private String artifact; - - /** - * The path of one of the following: - * - *
    - *
  • War file to deploy
  • - *
  • Zip or Jar file to deploy
  • - *
  • Exploded War directory
  • - *
  • Directory containing a stand-alone application to deploy
  • - *
- * - * @parameter expression = "${cf.path}" - */ - private File path; - - /** - * The start command to use for the application. - * - * @parameter expression = "${cf.command}" - */ - private String command; - - /** - * The buildpack to use for the application. - * - * @parameter expression = "${cf.buildpack}" - */ - private String buildpack; - - /** - * The stack to use for the application. - * - * @parameter expression = "${cf.stack}" - */ - private String stack; - - /** - * The health check timeout to use for the application. - * - * @parameter expression = "${cf.healthCheckTimeout}" - */ - private Integer healthCheckTimeout; - - /** - * The app startup timeout to use for the application. - * - * @parameter expression = "${cf.appStartupTimeout}" - */ - private Integer appStartupTimeout; - - /** - * Set the disk quota for the application - * - * @parameter expression="${cf.diskQuota}" - */ - private Integer diskQuota; - - /** - * Set the memory reservation for the application - * - * @parameter expression="${cf.memory}" - */ - private Integer memory; - - /** - * Set the expected number of instances - * - * @parameter expression="${cf.instances}" - */ - private Integer instances; - - /** - * list of services to use by the application. - * - * @parameter expression="${services}" - */ - private List services; - - /** - * list of domains to use by the application. - * - * @parameter expression="${domains}" - */ - private List domains; - - /** - * Environment variables - * - * @parameter expression="${cf.env}" - */ - private Map env = new HashMap(); - - /** - * Do not auto-start the application - * - * @parameter expression="${cf.no-start}" - */ - private Boolean noStart; - - /** - * @parameter default-value="${localRepository}" - * @readonly - * @required - */ - protected ArtifactRepository localRepository; - - /** - * @parameter default-value="${project.remoteArtifactRepositories}" - * @readonly - * @required - */ - protected java.util.List remoteRepositories; - - /** - * @component - */ - private ArtifactFactory artifactFactory; - - /** - * @component - */ - private ArtifactResolver artifactResolver; - - //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - /** - * If the application name was specified via the command line ({@link SystemProperties}) - * then use that property. Otherwise return the appname as injected via Maven or - * if appname is Null return the artifactId instead. - * - * @return Returns the appName, will never return Null. - */ - public String getAppname() { - - final String property = getCommandlineProperty(SystemProperties.APP_NAME); - - if (property != null) { - return property; - } else if (this.appname == null) { - return getArtifactId(); - } else { - return appname; - } - - } - - /** - * Environment properties can only be specified from the maven pom. - * - * Example: - * - * {code} - * - * -XX:MaxPermSize=256m - * - * {code} - * - * @return Returns the env, will never return Null. - */ - public Map getEnv() { - return this.env; - } - - /** - * If the application name was specified via the command line ({@link SystemProperties}) - * then that property is used. Otherwise return the appname. - * - * @return Returns the Cloud Foundry application url. - */ - public String getUrl() { - - final String property = getCommandlineProperty(SystemProperties.URL); - - if (property != null) { - return property; - } else { - return this.url; - } - - } - - /** - * Validate that the path denoting a directory or file does exists. - * - * @param path Must not be null - */ - protected void validatePath(File path) { - - Assert.notNull(path, "A path could not be found to deploy. Please specify a path or artifact GAV."); - - final String absolutePath = path.getAbsolutePath(); - - if (!path.exists()) { - throw new IllegalStateException(String.format("The file or directory does not exist at '%s'.", absolutePath)); - } - - if (path.isDirectory() && path.list().length == 0) { - throw new IllegalStateException(String.format("No files found in directory '%s'.", absolutePath)); - } - - } - - /** - * Returns the diskQuota parameter. - * - * @return Returns the configured disk quota choice - */ - public Integer getDiskQuota() { - final String property = getCommandlineProperty(SystemProperties.DISK_QUOTA); - return property != null ? Integer.valueOf(property) : this.diskQuota; - } - - /** - * Returns the memory-parameter. - * - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * If the value is not defined, null is returned. Triggering an empty value - * to be sent to the Cloud Controller where its default will be used. - * - * @return Returns the configured memory choice - */ - public Integer getMemory() { - final String property = getCommandlineProperty(SystemProperties.MEMORY); - return property != null ? Integer.valueOf(property) : this.memory; - } - - /** - * Specifies the file or directory that shall be pushed to Cloud Foundry. - * - * This property defaults to the Maven property - * "${project.build.directory}/${project.build.finalName}.war" - * - * - * @return null if not found. - */ - public File getPath() throws MojoExecutionException { - final String property = getCommandlineProperty(SystemProperties.PATH); - - if (property != null) { - final File path = new File(property); - validatePath(path); - return path; - } else if (this.path != null) { - return this.path; - } else { - File resolvedArtifact = this.getArtifact(); - if (resolvedArtifact != null) { - return resolvedArtifact; - } - return null; - } - } - - /** - * Provides the File to deploy based on the GAV set in the "artifact" property. - * - * @return Returns null of no artifact specified. - */ - private File getArtifact() throws MojoExecutionException { - if (artifact != null) { - Artifact resolvedArtifact = createArtifactFromGAV(); - - try { - artifactResolver.resolve(resolvedArtifact, remoteRepositories, localRepository ); - } catch (ArtifactNotFoundException ex) { - throw new MojoExecutionException("Could not find deploy artifact ["+artifact+"]", ex); - } catch (ArtifactResolutionException ex) { - throw new MojoExecutionException("Could not resolve deploy artifact ["+artifact+"]", ex); - } - return resolvedArtifact.getFile(); - } - return null; - } - - Artifact createArtifactFromGAV() throws MojoExecutionException { - String[] tokens = StringUtils.split(artifact, ":"); - if (tokens.length < 4 || tokens.length > 5) { - throw new MojoExecutionException( - "Invalid artifact, you must specify groupId:artifactId:version:packaging[:classifier] " - + artifact); - } - String groupId = tokens[0]; - String artifactId = tokens[1]; - String version = tokens[2]; - String packaging = null; - if (tokens.length >= 4) { - packaging = tokens[3]; - } - String classifier = null; - if (tokens.length == 5) { - classifier = tokens[4]; - } - return (classifier == null - ? artifactFactory.createBuildArtifact( groupId, artifactId, version, packaging ) - : artifactFactory.createArtifactWithClassifier( groupId, artifactId, version, packaging, classifier)); - } - - /** - * Returns the start command to use, if set. Otherwise Null is returned. - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * For a list of available properties see {@link SystemProperties}. - * - * @return Returns the command or null - */ - public String getCommand() { - final String property = getCommandlineProperty(SystemProperties.COMMAND); - return property != null ? property : this.command; - } - - /** - * Returns the buildpack to use, if set. Otherwise Null is returned. - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * For a list of available properties see {@link SystemProperties}. - * - * @return Returns the buildpack or null - */ - public String getBuildpack() { - final String property = getCommandlineProperty(SystemProperties.BUILDPACK); - return property != null ? property : this.buildpack; - } - - /** - * Returns the stack to use, if set. Otherwise Null is returned. - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * For a list of available properties see {@link SystemProperties}. - * - * @return Returns the stack or null - */ - public String getStack() { - final String property = getCommandlineProperty(SystemProperties.STACK); - return property != null ? property : this.stack; - } - - /** - * Returns the health check timeout to use, if set. Otherwise Null is returned. - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * For a list of available properties see {@link SystemProperties}. - * - * @return Returns the health check timeout or null - */ - public Integer getHealthCheckTimeout() { - final String property = getCommandlineProperty(SystemProperties.HEALTH_CHECK_TIMEOUT); - return property != null ? Integer.valueOf(property) : this.healthCheckTimeout; - } - - /** - * Returns the app startup timeout to use, if set. Otherwise Null is returned. - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * For a list of available properties see {@link SystemProperties}. - * - * @return Returns the app startup timeout or null - */ - public Integer getAppStartupTimeout() { - final String property = getCommandlineProperty(SystemProperties.APP_STARTUP_TIMEOUT); - return property != null ? Integer.valueOf(property) : this.appStartupTimeout; - } - - /** - * Returns the number of instances-parameter, if set. Otherwise Null is returned. - * If the parameter is set via the command line (aka system property, then - * that value is used). If not the pom.xml configuration parameter is used, - * if available. - * - * For a list of available properties see {@link SystemProperties} - * - * @return Returns the number of configured instance or null - */ - public Integer getInstances() { - final String property = getCommandlineProperty(SystemProperties.INSTANCES); - - if (property != null) { - return Integer.valueOf(property); - } else if (this.instances == null) { - return DefaultConstants.DEFAULT_INSTANCE; - } else { - return this.instances; - } - } - - /** - * Returns the services names that shall be bound to the application. - * - * @return Never null - */ - public List getServices() { - return this.services == null ? new ArrayList(0) : this.services; - } - - /** - * Returns the custom domain names that shall be created and added to the application. - * - * @return Never null - */ - public List getCustomDomains() { - return this.domains == null ? new ArrayList(0) : this.domains; - } - - /** - * Returns the list of urls that shall be associated with the application. - * - * @return Never null - */ - public List getUrls() { - return this.urls == null ? new ArrayList(0) : this.urls; - } - - /** - * If true, this property specifies that the application shall not automatically - * started upon "push". If not set, this property defaults to false - * - * @return Never null - */ - public Boolean isNoStart() { - final String property = getCommandlineProperty(SystemProperties.NO_START); - - if (property != null) { - return Boolean.valueOf(property); - } - else if (this.noStart == null) { - return DefaultConstants.NO_START; - } else { - return this.noStart; - } - } - - public void createServices() throws MojoExecutionException { - List currentServices = getClient().getServices(); - List currentServicesNames = new ArrayList(currentServices.size()); - - for (CloudService currentService : currentServices) { - currentServicesNames.add(currentService.getName()); - } - - for (CloudServiceWithUserProvided service: getServices()) { - if (currentServicesNames.contains(service.getName())) { - getLog().debug(String.format("Service '%s' already exists", service.getName())); - } - else { - getLog().info(String.format("Creating Service '%s'", service.getName())); - Assert.configurationServiceNotNull(service, null); - - try { - if (service.getLabel().equals("user-provided")) { - service.setLabel(null); - client.createUserProvidedService(service, service.getUserProvidedCredentials()); - } else { - client.createService(service); - } - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Not able to create service '%s'.", service.getName())); - } - } - } - } - - /** - * Executes the actual war deployment to Cloud Foundry. - * - * @param client The Cloud Foundry client to use - * @param file The file or directory to upload - * @param appName The name of the application this file upload is for - */ - protected void uploadApplication(CloudFoundryClient client, File file, String appName) { - - boolean isDirectory = file.isDirectory(); - - if (isDirectory) { - getLog().debug(String.format("Deploying directory %s to %s.", file.getAbsolutePath(), appName)); - } else { - getLog().debug(String.format("Deploying file %s (%s Kb) to %s.", file.getAbsolutePath(), file.length() / 1024, appName)); - } - - try { - client.uploadApplication(appName, file); - } catch (IOException e) { - throw new IllegalStateException("Error while uploading application.", e); - } - } - - protected void showStagingStatus(StartingInfo startingInfo) { - if (startingInfo != null) { - responseErrorHandler.addExpectedStatus(HttpStatus.NOT_FOUND); - - int offset = 0; - String staging = client.getStagingLogs(startingInfo, offset); - while (staging != null) { - getLog().info(staging); - offset += staging.length(); - staging = client.getStagingLogs(startingInfo, offset); - } - - responseErrorHandler.clearExpectedStatus(); - } - } - - protected void showStartingStatus(CloudApplication app) { - getLog().info(String.format("Checking status of application '%s'", getAppname())); - - responseErrorHandler.addExpectedStatus(HttpStatus.BAD_REQUEST); - - long appStartupExpiry = getAppStartupExpiry(); - - while (System.currentTimeMillis() < appStartupExpiry) { - List instances = getApplicationInstances(app); - - if (instances != null) { - int expectedInstances = getExpectedInstances(instances); - int runningInstances = getRunningInstances(instances); - int flappingInstances = getFlappingInstances(instances); - - showInstancesStatus(instances, runningInstances, expectedInstances); - - if (flappingInstances > 0) - break; - - if (runningInstances == expectedInstances) - break; - } - - try { - Thread.sleep(1000); - } catch (InterruptedException e) { - // ignore - } - } - - responseErrorHandler.clearExpectedStatus(); - } - - protected void showInstancesStatus(List instances, int runningInstances, int expectedInstances) { - Map stateCounts = new HashMap(); - - for (InstanceInfo instance : instances) { - final String state = instance.getState().toString(); - final Integer stateCount = stateCounts.get(state); - if (stateCount == null) { - stateCounts.put(state, 1); - } else { - stateCounts.put(state, stateCount + 1); - } - } - - List stateStrings = new ArrayList(); - for (Map.Entry stateCount : stateCounts.entrySet()) { - stateStrings.add(String.format("%s %s", stateCount.getValue(), stateCount.getKey().toLowerCase())); - } - - getLog().info(String.format(" %d of %d instances running (%s)", runningInstances, expectedInstances, - CommonUtils.collectionToCommaDelimitedString(stateStrings))); - } - - protected void showStartResults(CloudApplication app, List uris) throws MojoExecutionException { - List instances = getApplicationInstances(app); - - int expectedInstances = getExpectedInstances(instances); - int runningInstances = getRunningInstances(instances); - int flappingInstances = getFlappingInstances(instances); - - if (flappingInstances > 0) { - throw new MojoExecutionException("Application start unsuccessful"); - } - else if (runningInstances == 0) { - throw new MojoExecutionException("Application start timed out"); - } else if (runningInstances > 0) { - if (uris.isEmpty()) { - getLog().info(String.format("Application '%s' is available", app.getName())); - } else { - getLog().info(String.format("Application '%s' is available at '%s'", - app.getName(), CommonUtils.collectionToCommaDelimitedString(uris, "http://"))); - } - } - } - - /** - * Adds custom domains when provided in the pom file. - */ - protected void addDomains() { - List domains = getClient().getDomains(); - - List currentDomains = new ArrayList(domains.size()); - for (CloudDomain domain : domains) { - currentDomains.add(domain.getName()); - } - - for (String domain : getCustomDomains()) { - if (!currentDomains.contains(domain)) { - getClient().addDomain(domain); - } - } - } - - private List getApplicationInstances(CloudApplication app) { - InstancesInfo instancesInfo = client.getApplicationInstances(app); - if (instancesInfo != null) { - return instancesInfo.getInstances(); - } - return null; - } - - private int getExpectedInstances(List instances) { - return instances == null ? 0 : instances.size(); - } - - private int getRunningInstances(List instances) { - return getInstanceCount(instances, InstanceState.RUNNING); - } - - private int getFlappingInstances(List instances) { - return getInstanceCount(instances, InstanceState.FLAPPING); - } - - private int getInstanceCount(List instances, InstanceState state) { - int count = 0; - if (instances != null) { - for (InstanceInfo instance : instances) { - if (instance.getState().equals(state)) { - count++; - } - } - } - return count; - } - - protected List getAllUris() throws MojoExecutionException { - Assert.configurationUrls(getUrl(), getUrls()); - - if (getUrl() != null) { - return Arrays.asList(getUrl()); - } else if (!getUrls().isEmpty()) { - return getUrls(); - } else { - String defaultUri = getAppname() + "." + getClient().getDefaultDomain().getName(); - return Arrays.asList(defaultUri); - } - } - - private long getAppStartupExpiry() { - long timeout = System.currentTimeMillis(); - if (getAppStartupTimeout() != null) { - timeout += minutesToMillis(getAppStartupTimeout()); - } else if (getHealthCheckTimeout() != null) { - timeout += secondsToMillis(getHealthCheckTimeout()); - } else { - timeout += minutesToMillis(DEFAULT_APP_STARTUP_TIMEOUT); - } - - return timeout; - } - - private long minutesToMillis(Integer duration) { - return TimeUnit.MINUTES.toMillis(duration); - } - - private long secondsToMillis(Integer duration) { - return TimeUnit.SECONDS.toMillis(duration); - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractCloudFoundryMojo.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractCloudFoundryMojo.java deleted file mode 100644 index 6e97bae6114..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractCloudFoundryMojo.java +++ /dev/null @@ -1,457 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import java.net.MalformedURLException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Arrays; -import java.util.List; - -import org.apache.maven.artifact.manager.WagonManager; -import org.apache.maven.execution.MavenSession; -import org.apache.maven.plugin.AbstractMojo; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.apache.maven.settings.Proxy; -import org.apache.maven.wagon.authentication.AuthenticationInfo; -import org.cloudfoundry.client.lib.CloudCredentials; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.HttpProxyConfiguration; -import org.cloudfoundry.client.lib.tokens.TokensFile; -import org.cloudfoundry.maven.common.Assert; -import org.cloudfoundry.maven.common.DefaultConstants; -import org.cloudfoundry.maven.common.SystemProperties; -import org.cloudfoundry.maven.common.WarningBypassingResponseErrorHandler; -import org.springframework.http.HttpStatus; -import org.springframework.security.oauth2.common.OAuth2AccessToken; -import org.springframework.web.client.ResourceAccessException; - -/** - * Abstract goal that provides common configuration for the Cloud Foundry Maven - * Plugin. - * - * @author Gunnar Hillert - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - */ -@SuppressWarnings("UnusedDeclaration") -public abstract class AbstractCloudFoundryMojo extends AbstractMojo { - - /** - * @parameter expression="${project.artifactId}" - */ - private String artifactId; - - protected CloudFoundryClient client; - protected TokensFile tokensFile = new TokensFile(); - protected WarningBypassingResponseErrorHandler responseErrorHandler = new WarningBypassingResponseErrorHandler(); - - /** - * @parameter expression="${cf.password}" - */ - protected String password; - - /** - * @parameter expression="${cf.server}" - */ - private String server; - - /** - * @parameter expression="${session}" - */ - private MavenSession session; - - /** - * @parameter expression="${cf.target}" - */ - private String target; - - /** - * @parameter expression="${cf.username}" - */ - protected String username; - - /** - * @parameter expression="${cf.org}" - */ - private String org; - - /** - * @parameter expression="${cf.space}" - */ - private String space; - - /** - * @parameter expression="${cf.trustSelfSignedCerts}" - */ - private boolean trustSelfSignedCerts; - - /** - * Skip any and all execution of this plugin. - * @parameter expression="${cf.skip}" default-value="false" - */ - private boolean skip; - - /** - * The Maven Wagon manager to use when obtaining server authentication details. - * - * @component role="org.apache.maven.artifact.manager.WagonManager" - * @required - * @readonly - */ - private WagonManager wagonManager; - - /** - * Default Constructor. - */ - public AbstractCloudFoundryMojo() { - super(); - } - - public AbstractCloudFoundryMojo(TokensFile tokensFile) { - this.tokensFile = tokensFile; - } - - /** - * Retrieve Token from ~/.cf/tokens.yml - * - * @return token (String) - */ - protected OAuth2AccessToken retrieveToken() throws MojoExecutionException { - final OAuth2AccessToken token = tokensFile.retrieveToken(getTarget()); - - if (token == null) { - throw new MojoExecutionException(String.format("Can not authenticate to target '%s'. " + - "Configure a username and password, or use the login goal.", getTarget().toString())); - } - - return token; - } - - /** - * Cloud Controller Version 2 Client (Token) - */ - protected CloudFoundryClient createCloudFoundryClient(OAuth2AccessToken token, URI target, String org, String space, boolean trustSelfSignedCerts) - throws MojoExecutionException { - - Assert.configurationNotNull(org, "org", SystemProperties.ORG); - Assert.configurationNotNull(space, "space", SystemProperties.SPACE); - - getLog().debug(String.format("Connecting to Cloud Foundry at '%s' using token", target.toString())); - - final CloudCredentials credentials = new CloudCredentials(token); - return createConnection(credentials, target, org, space, trustSelfSignedCerts); - } - - /** - * Cloud Controller Version 2 Client - */ - protected CloudFoundryClient createCloudFoundryClient(String username, String password, URI target, String org, String space, boolean trustSelfSignedCerts) - throws MojoExecutionException { - - Assert.configurationNotNull(username, "username", SystemProperties.USERNAME); - Assert.configurationNotNull(password, "password", SystemProperties.PASSWORD); - Assert.configurationNotNull(org, "org", SystemProperties.ORG); - Assert.configurationNotNull(space, "space", SystemProperties.SPACE); - - getLog().debug(String.format( - "Connecting to Cloud Foundry at '%s' with username: '%s'", - target, username)); - - final CloudCredentials credentials = new CloudCredentials(username, password); - CloudFoundryClient client = createConnection(credentials, target, org, space, trustSelfSignedCerts); - connectToCloudFoundry(client); - return client; - } - - private CloudFoundryClient createConnection(CloudCredentials credentials, URI target, String org, String space, boolean trustSelfSignedCert) - throws MojoExecutionException { - try { - CloudFoundryClient cloudFoundryClient = - new CloudFoundryClient(credentials, target.toURL(), org, space, getHttpProxyConfiguration(target), trustSelfSignedCert); - cloudFoundryClient.setResponseErrorHandler(responseErrorHandler); - return cloudFoundryClient; - } catch (MalformedURLException e) { - throw new MojoExecutionException( - String.format("Incorrect Cloud Foundry target URL '%s'. Make sure the URL contains a scheme, e.g. http://...", target), e); - } - } - - private HttpProxyConfiguration getHttpProxyConfiguration(URI target) { - Proxy proxy = getMavenProxy(); - if (proxy != null) { - if (!targetIsExcludedFromProxy(target.getHost(), proxy)) { - return new HttpProxyConfiguration(proxy.getHost(), proxy.getPort()); - } - } - return null; - } - - protected Proxy getMavenProxy() { - List proxies = session.getSettings().getProxies(); - if (proxies == null || proxies.isEmpty()) - return null; - - for (Proxy proxy : proxies) { - if (proxy.isActive() && "http".equalsIgnoreCase(proxy.getProtocol())) { - return proxy; - } - } - - return null; - } - - private boolean targetIsExcludedFromProxy(String targetHost, Proxy proxy) { - if (proxy.getNonProxyHosts() != null) { - List nonProxyHosts = Arrays.asList(proxy.getNonProxyHosts().split("\\|")); - return nonProxyHosts.contains(targetHost); - } - return false; - } - - /** - * Cloud Foundry Connection Login - */ - protected void connectToCloudFoundry(CloudFoundryClient client) throws MojoExecutionException { - try { - client.login(); - } catch (CloudFoundryException e) { - if (HttpStatus.FORBIDDEN.equals(e.getStatusCode())) { - throw new MojoExecutionException( - String.format("Login failed to '%s' using username '%s'. Please verify your login credentials.", target, username), e); - } else if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - throw new MojoExecutionException( - String.format("The target host '%s' exists but it does not appear to be a valid Cloud Foundry target url.", target), e); - } else { - throw e; - } - } catch (ResourceAccessException e) { - throw new MojoExecutionException( - String.format("Cannot access host at '%s'.", target), e); - } - } - - /** - * Goals will typically override this method. - */ - protected abstract void doExecute() throws MojoExecutionException, MojoFailureException; - - /** - * Base execute method. Will perform the login and logout into Cloud Foundry. - * Delegates to doExecute() for the actual business logic. - */ - public void execute() throws MojoExecutionException, MojoFailureException { - if (skip) { - getLog().info("Skipping execution of Cloud Foundry Maven Plugin"); - return; - } - - Assert.configurationNotNull(target, "target", SystemProperties.TARGET); - - try { - if (getUsername() != null && getPassword() != null) { - client = createCloudFoundryClient(getUsername(), getPassword(), getTarget(), getOrg(), getSpace(), getTrustSelfSignedCerts()); - } else { - client = createCloudFoundryClient(retrieveToken(), getTarget(), getOrg(), getSpace(), getTrustSelfSignedCerts()); - } - - doExecute(); - } catch (RuntimeException e) { - throw new MojoExecutionException("An exception was caught while executing Mojo.", e); - } - } - - //~~~~Getters~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - - /** - * @return Returns the Maven artifactId. Will never return null. - */ - public String getArtifactId() { - Assert.notNull(artifactId, "The artifactId is not set."); - return artifactId; - } - - public CloudFoundryClient getClient() { - return client; - } - - /** - * See http://maven.apache.org/plugin-developers/common-bugs.html#Using_System_Properties - * - * @param property Supported system properties - * @return Null if the property is not found, otherwise returns the property - */ - public String getCommandlineProperty(SystemProperties property) { - return session.getExecutionProperties().getProperty(property.getProperty()); - } - - public String getPassword() { - - final String passwordProperty = getCommandlineProperty(SystemProperties.PASSWORD); - - if (passwordProperty != null) { - return passwordProperty; - } - - if (this.password == null) { - - getLog().debug("No password defined in pom.xml and " + - "no system property defined either. Trying to look up " + - "password in settings.xml under server element " + this.getServer()); - - AuthenticationInfo authenticationInfo = this.wagonManager.getAuthenticationInfo(this.getServer()); - - if (authenticationInfo == null) { - getLog().debug(String.format( - "In settings.xml server element '%s' was not defined.", this.getServer())); - return null; - } - - if (authenticationInfo.getPassword() != null) { - return authenticationInfo.getPassword(); - } else { - getLog().debug(String.format( - "In settings.xml no password was found for server element '%s'. Does the element exist?", this.getServer())); - return null; - } - - } else { - return this.password; - } - - } - - /** - * Maven allows for externalizing the credential for server connections to - * be externalized into settings.xml. - * - * If a property was provided on the command line, use that property. Otherwise - * use the property that was injected via Maven. If that is Null as well, default - * to the value specified in {@link DefaultConstants} - * - * @return The name of the Maven Server property used to resolved Cloud Foundry credentials. Never returns null. - * - */ - public String getServer() { - - final String serverProperty = getCommandlineProperty(SystemProperties.SETTINGS_SERVER); - - if (serverProperty != null) { - return serverProperty; - } - - if (this.server == null) { - return DefaultConstants.MAVEN_DEFAULT_SERVER; - } - - return this.server; - } - - /** - * If the target property was provided via the command line, use that property. - * Otherwise use the property that was injected via Maven. If that is Null - * as well, Null is returned. - * - * @return Returns the Cloud Foundry Target Url - Can return Null. - * - */ - public URI getTarget() { - - final String targetProperty = getCommandlineProperty(SystemProperties.TARGET); - - if (targetProperty != null) { - try { - - URI uri = new URI(targetProperty); - - if (uri.isAbsolute()) { - return uri; - } else { - throw new URISyntaxException(targetProperty, "URI is not opaque."); - } - - } catch (URISyntaxException e) { - throw new IllegalStateException(String.format("The Url parameter '%s' " + - "which was passed in as system property is not valid.", targetProperty)); - } - } - - if (this.target == null) { - return null; - } - - try { - return new URI(this.target); - } catch (URISyntaxException e) { - throw new IllegalStateException(String.format("The Url parameter '%s' " + - "which was passed in as pom.xml configiuration parameter is not valid.", this.target)); - } - - } - - public String getUsername() { - - final String usernameProperty = getCommandlineProperty(SystemProperties.USERNAME); - - if (usernameProperty != null) { - return usernameProperty; - } - - if (this.username == null) { - - getLog().debug("No username defined in pom.xml and " + - "no system property defined either. Trying to look up " + - "username in settings.xml under server element " + this.getServer()); - - AuthenticationInfo authenticationInfo = this.wagonManager.getAuthenticationInfo(this.getServer()); - - if (authenticationInfo == null) { - getLog().debug(String.format( - "In settings.xml server element '%s' was not defined.", this.getServer())); - return null; - } - - if (authenticationInfo.getUserName() != null) { - return authenticationInfo.getUserName(); - } else { - super.getLog().debug(String.format( - "In settings.xml no username was found for server element '%s'. Does the element exist?", this.getServer())); - return null; - } - - } else { - return username; - } - - } - - public String getOrg() { - Assert.notNull(org, "The org is not set."); - return org; - } - - public String getSpace() { - Assert.notNull(space, "The space is not set."); - return space; - } - - public boolean getTrustSelfSignedCerts() { - return trustSelfSignedCerts; - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractPush.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractPush.java deleted file mode 100644 index 42d7927eb17..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/AbstractPush.java +++ /dev/null @@ -1,175 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import java.io.File; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import org.apache.maven.plugin.MojoExecutionException; - -import org.cloudfoundry.client.lib.CloudFoundryException; - -import org.cloudfoundry.client.lib.StartingInfo; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.Staging; - -import org.springframework.http.HttpStatus; - -/** - * Push and optionally start an application. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - */ -public class AbstractPush extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - final String appname = getAppname(); - final String command = getCommand(); - final String buildpack = getBuildpack(); - final String stack = getStack(); - final Integer healthCheckTimeout = getHealthCheckTimeout(); - final Map env = getEnv(); - final Integer instances = getInstances(); - final Integer memory = getMemory(); - final Integer disk = getDiskQuota(); - final File path = getPath(); - final List uris = getAllUris(); - final List serviceNames = getServiceNames(); - - validatePath(path); - - addDomains(); - - createServices(); - - getLog().debug(String.format( - "Pushing App - Appname: %s," + - " Command: %s," + - " Env: %s," + - " Instances: %s," + - " Memory: %s," + - " DiskQuota: %s," + - " Path: %s," + - " Services: %s," + - " Uris: %s,", - appname, command, env, instances, memory, disk, path, serviceNames, uris)); - - getLog().info(String.format("Creating application '%s'", appname)); - - createApplication(appname, command, buildpack, stack, healthCheckTimeout, disk, memory, uris, serviceNames); - - getLog().debug("Updating application env..."); - - try { - getClient().updateApplicationEnv(appname, env); - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Error while updating application env '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - - getLog().info(String.format("Uploading '%s'", path)); - - try { - uploadApplication(getClient(), path, appname); - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Error while creating application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - - if (instances != null) { - getLog().debug("Setting the number of instances to " + instances); - - try { - getClient().updateApplicationInstances(appname, instances); - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Error while setting number of instances for application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } - - if (!isNoStart()) { - getLog().info("Starting application"); - - try { - final StartingInfo startingInfo = getClient().startApplication(appname); - showStagingStatus(startingInfo); - - final CloudApplication app = getClient().getApplication(appname); - showStartingStatus(app); - showStartResults(app, uris); - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Error while creating application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } - } - - private void createApplication(String appname, String command, String buildpack, String stack, Integer healthCheckTimeout, - Integer diskQuota, Integer memory, List uris, List serviceNames) throws MojoExecutionException { - boolean found; - try { - getClient().getApplication(appname); - found = true; - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - found = false; - } else { - throw new MojoExecutionException(String.format("Error while checking for existing application '%s'. Error message: '%s'. Description: '%s'", - appname, e.getMessage(), e.getDescription()), e); - } - } - - try { - final Staging staging = new Staging(command, buildpack, stack, healthCheckTimeout); - if (!found) { - getClient().createApplication(appname, staging, diskQuota, memory, uris, serviceNames); - } else { - client.stopApplication(appname); - client.updateApplicationStaging(appname, staging); - if (memory != null) { - client.updateApplicationMemory(appname, memory); - } - if (diskQuota != null) { - client.updateApplicationDiskQuota(appname, diskQuota); - } - client.updateApplicationUris(appname, uris); - client.updateApplicationServices(appname, serviceNames); - } - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Error while creating application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } - - private List getServiceNames() { - final List services = getServices(); - List serviceNames = new ArrayList(); - - for (CloudService service : services) { - serviceNames.add(service.getName()); - } - return serviceNames; - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/App.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/App.java deleted file mode 100644 index 714b4fc03a8..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/App.java +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.maven.common.UiUtils; - -/** - * Application information. Displays the info of deployed application via name, along with - * information about health, instance count, bound services, and associated URLs. - * - * @author Ali Moghadam - * @since 1.0.0 - * - * @goal app - * @phase process-sources - */ -public class App extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() { - try { - final CloudApplication application = getClient().getApplication(getAppname()); - final ApplicationStats stats = getClient().getApplicationStats(getAppname()); - getLog().info("\n" + UiUtils.renderCloudApplicationDataAsTable(application, stats)); - } catch (CloudFoundryException e) { - getLog().info(String.format("Application '%s' doesn't exist", getAppname())); - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Apps.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Apps.java deleted file mode 100644 index eb01282c6ad..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Apps.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import java.util.List; - -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.maven.common.UiUtils; - -/** - * Lists your applications. Displays all deployed applications, along with - * information about health, instance count, bound services, and associated URLs. - * - * @author Gunnar Hillert - * @since 1.0.0 - * - * @goal apps - * @phase process-sources - */ -public class Apps extends AbstractCloudFoundryMojo { - - @Override - protected void doExecute() { - - final List applications = getClient().getApplications(); - - getLog().info("\n" + UiUtils.renderCloudApplicationsDataAsTable(applications)); - - } - -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/BindServices.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/BindServices.java deleted file mode 100644 index c5d84481e51..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/BindServices.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudService; - -/** - * Bind Services - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - * - * @goal bind-services - * @phase process-sources - */ - -public class BindServices extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - for (CloudService service : getServices()) { - if (getClient().getService(service.getName()) == null) { - throw new MojoExecutionException(String.format("Service '%s' does not exist", service.getName())); - } - - try { - final CloudApplication application = getClient().getApplication(getAppname()); - if (application.getServices().contains(service.getName())) { - getLog().info(String.format("Service '%s' is already bound to application '%s'", - service.getName(), application.getName())); - } else { - getClient().bindService(getAppname(), service.getName()); - getLog().info(String.format("Binding Service '%s'", service.getName())); - } - } - catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", getAppname())); - } - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/CloudServiceWithUserProvided.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/CloudServiceWithUserProvided.java deleted file mode 100644 index fd50824a1f4..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/CloudServiceWithUserProvided.java +++ /dev/null @@ -1,21 +0,0 @@ -package org.cloudfoundry.maven; - -import org.cloudfoundry.client.lib.domain.CloudService; - -import java.util.Map; - -public class CloudServiceWithUserProvided extends CloudService { - private Map userProvidedCredentials; - - public CloudServiceWithUserProvided() { - super(); - } - - public Map getUserProvidedCredentials() { - return userProvidedCredentials; - } - - public void setUserProvidedCredentials(Map userProvidedCredentials) { - this.userProvidedCredentials = userProvidedCredentials; - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/CreateServices.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/CreateServices.java deleted file mode 100644 index 3e77faade5e..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/CreateServices.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; - -/** - * Create Services - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - * - * @goal create-services - * @phase process-sources - */ - -public class CreateServices extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - createServices(); - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Delete.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Delete.java deleted file mode 100644 index 8cdc26b84fa..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Delete.java +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.springframework.http.HttpStatus; - -/** - * Deletes an application. - * - * @author Gunnar Hillert - * @since 1.0.0 - * - * @goal delete - * @phase process-sources - */ -public class Delete extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - getLog().info("Deleting application '" + getAppname() + "'"); - - try { - getClient().getApplication(getAppname()); - getClient().deleteApplication(getAppname()); - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - getLog().info("Application '" + getAppname() + "' does not exist"); - } else { - throw new MojoExecutionException(String.format("Error while deleting application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/DeleteServices.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/DeleteServices.java deleted file mode 100644 index f8d587bac53..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/DeleteServices.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.domain.CloudService; - -/** - * Delete Services - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - * - * @goal delete-services - * @phase process-sources - */ - -public class DeleteServices extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - for (CloudService service : getServices()) { - try { - getLog().info(String.format("Deleting service '%s'", service.getName())); - getClient().deleteService(service.getName()); - } catch (NullPointerException e) { - getLog().info(String.format("Service '%s' does not exist", service.getName())); - } - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Env.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Env.java deleted file mode 100644 index 7958423b78a..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Env.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.maven.common.UiUtils; - -/** - * Display environment variables set for the application. - * - * @author Scott Frederick - * - * @since 1.0.0 - * - * @goal env - * @requiresProject false - */ -public class Env extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() { - try { - final CloudApplication application = getClient().getApplication(getAppname()); - getLog().info("\n" + UiUtils.renderEnvVarDataAsTable(application)); - } catch (CloudFoundryException e) { - getLog().info(String.format("Application '%s' doesn't exist", getAppname())); - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Help.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Help.java deleted file mode 100644 index 8ded60f255c..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Help.java +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Copyright 2009-2012 The Apache Software Foundation. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.Reader; -import java.util.Map; -import java.util.TreeMap; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.cloudfoundry.maven.common.Assert; -import org.cloudfoundry.maven.common.CommonUtils; -import org.cloudfoundry.maven.common.SystemProperties; -import org.cloudfoundry.maven.common.UiUtils; - -/** - * Documentation for all available commands. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Scott Frederick - * - * @since 1.0.0 - * - * @goal help - * @requiresProject true - */ -public class Help extends AbstractApplicationAwareCloudFoundryMojo { - - public static final String HELP_TEXT = "/help.txt"; - public static final String NOT_AVAILABLE = "N/A"; - - /** - * @FIXME Not sure whether one should be able to overwrite execute() - * - * The help goal does not require an interaction with Cloud Foundry. A - * login is not necessary. Therefore, this method is overwritten. - * - */ - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - doExecute(); - } - - /** - * - * @return - */ - private Map getParameterMap() throws MojoExecutionException { - final Map parameterMap = new TreeMap(); - - parameterMap.put("appname", getAppname() != null ? getAppname() : NOT_AVAILABLE); - parameterMap.put("command", getCommand() != null ? getCommand() : NOT_AVAILABLE); - parameterMap.put("instances", getInstances() != null ? String.valueOf(getInstances()) : NOT_AVAILABLE); - parameterMap.put("memory (in MB)", getMemory() != null ? String.valueOf(getMemory()) : NOT_AVAILABLE); - parameterMap.put("diskQuota (in MB)", getDiskQuota() != null ? String.valueOf(getDiskQuota()) : NOT_AVAILABLE); - parameterMap.put("healthCheckTimeout", getHealthCheckTimeout() != null ? String.valueOf(getHealthCheckTimeout()) : NOT_AVAILABLE); - parameterMap.put("url", getUrl() != null ? getUrl() : NOT_AVAILABLE); - parameterMap.put("urls", getUrls().isEmpty() ? NOT_AVAILABLE : CommonUtils.collectionToCommaDelimitedString(getUrls())); - parameterMap.put("path", getPath() != null ? getPath().getAbsolutePath() : NOT_AVAILABLE); - - parameterMap.put("env", getEnv() != null ? String.valueOf(getEnv()) : NOT_AVAILABLE); - parameterMap.put("services", getServices().isEmpty() ? NOT_AVAILABLE : CommonUtils.collectionServicesToCommaDelimitedString(getServices())); - parameterMap.put("noStart", isNoStart() != null ? String.valueOf(isNoStart()) : NOT_AVAILABLE); - - parameterMap.put("server", getServer()); - parameterMap.put("target", getTarget() != null ? getTarget().toString() : NOT_AVAILABLE); - parameterMap.put("org", getOrg() != null ? getOrg() : NOT_AVAILABLE); - parameterMap.put("space", getSpace() != null ? getSpace() : NOT_AVAILABLE); - parameterMap.put("username", getUsername() != null ? getUsername() : NOT_AVAILABLE); - parameterMap.put("password", getPassword() != null ? CommonUtils.maskPassword(getPassword()) : NOT_AVAILABLE); - - parameterMap.put("trustSelfSignedCerts", String.valueOf(getTrustSelfSignedCerts())); - - return parameterMap; - } - - @Override - protected void doExecute() throws MojoExecutionException { - Assert.configurationNotNull(getTarget(), "target", SystemProperties.TARGET); - - final StringBuilder sb = new StringBuilder(); - - sb.append("\n" + UiUtils.HORIZONTAL_LINE); - sb.append("\nCloud Foundry Maven Plugin detected parameters and/or default values:\n\n"); - - sb.append(UiUtils.renderParameterInfoDataAsTable(getParameterMap())); - - Reader reader = null; - BufferedReader in = null; - - try { - final InputStream is = Help.class.getResourceAsStream(HELP_TEXT); - reader = new InputStreamReader(is); - in = new BufferedReader(reader); - - final StringBuilder helpTextStringBuilder = new StringBuilder(); - - String line = ""; - - while (line != null) { - try { - line = in.readLine(); - } catch (IOException e) { - throw new IllegalStateException("Problem reading internal '" + HELP_TEXT + "' file. This is a bug.", e); - } - - if (line != null) { - helpTextStringBuilder.append(line).append("\n"); - } - } - sb.append(helpTextStringBuilder); - } finally { - CommonUtils.closeReader(in); - CommonUtils.closeReader(reader); - } - - getLog().info(sb); - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Login.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Login.java deleted file mode 100644 index e36a220f375..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Login.java +++ /dev/null @@ -1,80 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; - -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.maven.common.Assert; -import org.cloudfoundry.client.lib.tokens.TokensFile; -import org.cloudfoundry.maven.common.SystemProperties; - -import org.springframework.security.oauth2.common.OAuth2AccessToken; - -import java.util.List; - -/** - * Writes the user's token into ~/.cf/tokens.yml file. - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - * - * @goal login - * @requiresProject false - */ -public class Login extends AbstractCloudFoundryMojo { - public Login() { - } - - public Login(TokensFile tokensFile) { - this.tokensFile = tokensFile; - } - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - Assert.configurationNotNull(getUsername(), "username", SystemProperties.USERNAME); - Assert.configurationNotNull(getPassword(), "password", SystemProperties.PASSWORD); - Assert.configurationNotNull(getTarget(), "target", SystemProperties.TARGET); - - super.execute(); - } - - @Override - protected void doExecute() throws MojoExecutionException { - final OAuth2AccessToken token = getClient().login(); - final CloudInfo cloudInfo = getClient().getCloudInfo(); - final CloudSpace space = getCurrentSpace(); - - tokensFile.saveToken(getTarget(), token, cloudInfo, space); - - getLog().info("Authentication successful"); - } - - protected CloudSpace getCurrentSpace() { - List spaces = client.getSpaces(); - for (CloudSpace space : spaces) { - if (space.getName().equals(getSpace())) { - return space; - } - } - return null; - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Logout.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Logout.java deleted file mode 100644 index eca56db0b48..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Logout.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.cloudfoundry.client.lib.tokens.TokensFile; - -/** - * Performs logout and removes the target info from ~/.cf/tokens.yml. - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - * - * @goal logout - * @requiresProject false - */ -public class Logout extends AbstractCloudFoundryMojo { - public Logout() { - } - - public Logout(TokensFile tokensFile) { - super(tokensFile); - } - - @Override - public void execute() throws MojoExecutionException, MojoFailureException { - if (getClient() != null) { - getClient().logout(); - } - doExecute(); - } - - @Override - protected void doExecute() throws MojoExecutionException { - tokensFile.removeToken(getTarget()); - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Logs.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Logs.java deleted file mode 100644 index c398c27a5a4..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Logs.java +++ /dev/null @@ -1,87 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.ApplicationLogListener; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.maven.common.UiUtils; -import org.springframework.http.HttpStatus; - -import java.util.Map; - -import static org.cloudfoundry.maven.common.UiUtils.renderApplicationLogEntry; - -/** - * Streams a tail of application logs - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - - * @goal logs - * @phase process-sources - */ - -public class Logs extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - - try { - getLog().info(String.format("Getting logs for '%s'", getAppname())); - - LoggingListener listener = new LoggingListener(); - getClient().streamLogs(getAppname(), listener); - synchronized (listener) { - try { - listener.wait(); - } catch (InterruptedException e) { - throw new MojoExecutionException("Interrupted while streaming logs", e); - } - } - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", - getAppname()), e); - } else { - throw new MojoExecutionException(String.format("Error getting logs for application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } - } - - private class LoggingListener implements ApplicationLogListener { - public void onMessage(ApplicationLog logEntry) { - getLog().info(renderApplicationLogEntry(logEntry)); - } - - public void onError(Throwable e) { - synchronized (this) { - this.notify(); - } - } - - public void onComplete() { - synchronized (this) { - this.notify(); - } - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Push.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Push.java deleted file mode 100644 index 19b5f217fe5..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Push.java +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -/** - * Push and optionally start an application. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Ali Moghadam - * @author Scott Frederick - * - * @since 1.0.0 - * - * @goal push - * - * @execute phase="package" - * * - */ -public class Push extends AbstractPush { - -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/PushOnly.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/PushOnly.java deleted file mode 100644 index 7d9a9fbae61..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/PushOnly.java +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -/** - * Push and optionally start an application without forking the build to execute 'package'. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Ali Moghadam - * @author Mike Youngstrom - * - * @since 1.0.0 - * - * @goal push-only - */ -public class PushOnly extends AbstractPush { -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/RecentLogs.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/RecentLogs.java deleted file mode 100644 index 630a32b5e3f..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/RecentLogs.java +++ /dev/null @@ -1,62 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.ApplicationLogListener; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.springframework.http.HttpStatus; - -import java.util.List; - -import static org.cloudfoundry.maven.common.UiUtils.renderApplicationLogEntry; - -/** - * Shows recent application logs - * - * @author Scott Frederick - * @since 1.0.3 - - * @goal recentLogs - * @phase process-sources - */ - -public class RecentLogs extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - - try { - getLog().info(String.format("Getting logs for '%s'", getAppname())); - - List logEntries = getClient().getRecentLogs(getAppname()); - for (ApplicationLog logEntry : logEntries) { - getLog().info(renderApplicationLogEntry(logEntry)); - } - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", - getAppname()), e); - } else { - throw new MojoExecutionException(String.format("Error getting logs for application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Restart.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Restart.java deleted file mode 100644 index 11eb5293462..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Restart.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.StartingInfo; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.springframework.http.HttpStatus; - -/** - * Restarts an application. - * - * @author Gunnar Hillert - * @author Scott Frederick - * @since 1.0.0 - * - * @goal restart - * @phase process-sources - */ -public class Restart extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - try { - getLog().info(String.format("Restarting application '%s'", getAppname())); - - final StartingInfo startingInfo = getClient().restartApplication(getAppname()); - showStagingStatus(startingInfo); - - final CloudApplication application = getClient().getApplication(getAppname()); - showStartingStatus(application); - showStartResults(application, getAllUris()); - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", - getAppname()), e); - } - } - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Scale.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Scale.java deleted file mode 100644 index 35b523d85a9..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Scale.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.maven.common.Assert; -import org.cloudfoundry.maven.common.SystemProperties; - -/** - * Scale the application instances up or down. - * - * @author Gunnar Hillert - * @since 1.0.0 - * - * @goal scale - * @phase process-sources - */ -public class Scale extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - - final Integer instances = getInstances(); - final String appname = getAppname(); - - Assert.configurationNotNull(instances, "instances", SystemProperties.INSTANCES); - - getLog().info(String.format("Setting number of instances for application '%s' to '%s'", appname, instances)); - - try { - getClient().updateApplicationInstances(appname, instances); - } catch (CloudFoundryException e) { - throw new MojoExecutionException( - String.format("Error setting number of instances for " + - "application '%s'. Error message: '%s'. Description: '%s'", - getAppname(), e.getMessage(), e.getDescription()), e); - } - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/ServicePlans.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/ServicePlans.java deleted file mode 100644 index 044d56168e9..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/ServicePlans.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.maven.common.UiUtils; - -import java.util.List; - -/** - * Displays information about available services. - * - * @author Scott Frederick - * @since 1.0.0 - * - * @goal service-plans - * @phase process-sources - */ - -public class ServicePlans extends AbstractCloudFoundryMojo { - - @Override - protected void doExecute() { - final List serviceOfferings = getClient().getServiceOfferings(); - getLog().info("Available Services"); - getLog().info("\n" + UiUtils.renderServiceOfferingDataAsTable(serviceOfferings)); - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Services.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Services.java deleted file mode 100644 index 951f3aef1be..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Services.java +++ /dev/null @@ -1,68 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudService; - -import org.cloudfoundry.maven.common.UiUtils; - -/** - * Displays information about provisioned service instances. - * - * @author Ali Moghadam - * @author Scott Frederick - * @since 1.0.0 - * - * @goal services - * @phase process-sources - */ - -public class Services extends AbstractCloudFoundryMojo { - - @Override - protected void doExecute() { - final List services = getClient().getServices(); - final List apps = getClient().getApplications(); - final Map> servicesToApps = mapServicesToApps(services, apps); - getLog().info("Services instances"); - getLog().info("\n" + UiUtils.renderServiceDataAsTable(services, servicesToApps)); - } - - protected Map> mapServicesToApps(List services, List apps) { - Map> servicesToApps = new HashMap>(services.size()); - - for (CloudApplication app : apps) { - for (String serviceName : app.getServices()) { - List appNames = servicesToApps.get(serviceName); - if (appNames == null) { - appNames = new ArrayList(); - } - appNames.add(app.getName()); - servicesToApps.put(serviceName, appNames); - } - } - - return servicesToApps; - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Start.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Start.java deleted file mode 100644 index 33bad7f95e0..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Start.java +++ /dev/null @@ -1,61 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.StartingInfo; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.springframework.http.HttpStatus; - -/** - * Starts an application. - * - * @author Gunnar Hillert - * @author Scott Frederick - * @since 1.0.0 - * - * @goal start - * @phase process-sources - */ -public class Start extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - - try { - CloudApplication application = getClient().getApplication(getAppname()); - - if (application.getRunningInstances() > 0) { - getLog().info(String.format("Application '%s' is already started", getAppname())); - } else { - getLog().info(String.format("Starting application '%s'", getAppname())); - - final StartingInfo startingInfo = getClient().startApplication(getAppname()); - showStagingStatus(startingInfo); - - application = getClient().getApplication(getAppname()); - showStartingStatus(application); - showStartResults(application, getAllUris()); - } - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", - getAppname()), e); - } - } - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Stop.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Stop.java deleted file mode 100644 index c9405139c3d..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Stop.java +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.springframework.http.HttpStatus; - -/** - * Stops an application. - * - * @author Gunnar Hillert - * @since 1.0.0 - * - * @goal stop - * @phase process-sources - */ -public class Stop extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - - getLog().info(String.format("Stopping application '%s'", getAppname())); - - try { - getClient().stopApplication(getAppname()); - } catch (CloudFoundryException e) { - if (HttpStatus.NOT_FOUND.equals(e.getStatusCode())) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", - getAppname()), e); - } - } - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Target.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Target.java deleted file mode 100644 index af99b6ce5b0..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/Target.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; - -import org.cloudfoundry.client.lib.domain.CloudInfo; - -import org.cloudfoundry.maven.common.UiUtils; - -/** - * Provide general usage information about the used Cloud Foundry environment. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Ali Moghadam - * @author Scott Frederick - * - * @since 1.0.0 - * - * @goal target - * @requiresProject false - */ -public class Target extends AbstractCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - final CloudInfo cloudInfo = getClient().getCloudInfo(); - getLog().info(UiUtils.renderCloudInfoFormattedAsString(cloudInfo, getTarget().toString(), getOrg(), getSpace())); - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/UnbindServices.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/UnbindServices.java deleted file mode 100644 index 6b4d8bc7aec..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/UnbindServices.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import org.apache.maven.plugin.MojoExecutionException; -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudService; - -/** - * Unbind Services - * - * @author Ali Moghadam - * @author Scott Frederick - - * @goal unbind-services - * @phase process-sources - * @since 1.0.0 - */ - -public class UnbindServices extends AbstractApplicationAwareCloudFoundryMojo { - - @Override - protected void doExecute() throws MojoExecutionException { - for (CloudService service : getServices()) { - if (getClient().getService(service.getName()) == null) { - throw new MojoExecutionException(String.format("Service '%s' does not exist", service.getName())); - } - - try { - final CloudApplication application = getClient().getApplication(getAppname()); - if (application.getServices().contains(service.getName())) { - getLog().info(String.format("Unbinding Service '%s'", service.getName())); - getClient().unbindService(getAppname(), service.getName()); - } else { - getLog().info(String.format("Service '%s' is not bound to application '%s'", - service.getName(), application.getName())); - } - } catch (CloudFoundryException e) { - throw new MojoExecutionException(String.format("Application '%s' does not exist", getAppname())); - } - - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/Assert.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/Assert.java deleted file mode 100644 index b1dce684055..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/Assert.java +++ /dev/null @@ -1,152 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.util.List; - -import org.apache.maven.plugin.MojoExecutionException; - -import org.cloudfoundry.client.lib.domain.CloudService; - -/** - * Various helper methods that help with the validation of parameters. - * - * @author Gunnar Hillert - * @author Scott Frederick - * @since 1.0.0 - * - */ -public final class Assert { - - /** - * Prevent instantiation. - */ - private Assert() { - throw new AssertionError(); - } - - /** - * Assert that an object is not null . - *
Assert.notNull(clazz, "The class must not be null");
- * @param object the object to check - * @param message the exception message to use if the assertion fails - * @throws IllegalArgumentException if the object is null - */ - public static void notNull(Object object, String message) { - if (object == null) { - throw new IllegalArgumentException(message); - } - } - - /** - * - * @param object - * @param objectName - * @param property - */ - public static void configurationNotNull(Object object, String objectName, - SystemProperties property) throws MojoExecutionException { - configurationNotNull(object, objectName, property, null); - } - - /** - * - * @param object - * @param objectName - * @param property - * @param additionalDescription - */ - public static void configurationNotNull(Object object, String objectName, - SystemProperties property, String additionalDescription) throws MojoExecutionException { - - if (object == null) { - - final StringBuilder message = new StringBuilder("\n\n"); - - message.append(UiUtils.HORIZONTAL_LINE); - message.append(String.format("\nRequired argument '%s' is missing.\n", objectName)); - message.append("========================================================================\n\n"); - message.append(String.format("Did you configure the parameter? You " - +"can provide the parameter either as:\n\n" - + "- System Property using: -D%1$s= or \n" - + "- Add the parameter to the pom.xml under the plugin's configuration element:\n\n" - + " \n" - + " <%2$s>provide value\n" - + " \n" - + "\n", property.getProperty(), property.getXmlElement())); - message.append(UiUtils.HORIZONTAL_LINE); - - if (additionalDescription != null) { - message.append(additionalDescription).append("\n"); - message.append(UiUtils.HORIZONTAL_LINE); - } - - throw new MojoExecutionException(message.toString()); - } - - } - - /** - * - * @param cloudService Object - * @param additionalDescription - */ - public static void configurationServiceNotNull(CloudService cloudService, - String additionalDescription) throws MojoExecutionException { - - if (cloudService.getName() == null || cloudService.getLabel() == null) { - - final StringBuilder message = new StringBuilder("\n\n"); - - message.append(UiUtils.HORIZONTAL_LINE); - message.append(String.format("\nRequired arguments for '%s' are missing.\n", cloudService.getName())); - message.append("========================================================================\n\n"); - message.append("Did you configure the parameter? You "); - message.append("can provide the parameter in the pom.xml under the plugin's configuration element:\n\n"); - message.append("\n"); - message.append(" \n"); - message.append(" \n"); - message.append(" provide value\n"); - message.append(" \n"); - message.append(" \n"); - message.append(" \n"); - message.append("\n\n"); - message.append(UiUtils.HORIZONTAL_LINE); - - if (additionalDescription != null) { - message.append(additionalDescription).append("\n"); - message.append(UiUtils.HORIZONTAL_LINE); - } - - throw new MojoExecutionException(message.toString()); - } - } - - /** - * Cannot use elements url and urls together - */ - public static void configurationUrls(String url, List urls) throws MojoExecutionException { - if (url != null && !urls.isEmpty()) { - final String message = "\n\n" + - "Both url and urls elements are specified at the same level\n" + - "========================================================================\n\n" + - "The element should be nested inside a element or specified alone without a element present.\n" + - UiUtils.HORIZONTAL_LINE; - - throw new MojoExecutionException(message); - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/CommonUtils.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/CommonUtils.java deleted file mode 100644 index 1a1197de4d5..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/CommonUtils.java +++ /dev/null @@ -1,187 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.io.IOException; -import java.io.Reader; -import java.util.ArrayList; -import java.util.Collection; -import java.util.Iterator; -import java.util.List; - -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.springframework.util.StringUtils; - -/** - * Contains common non-ui related helper methods for the Cloud Foundry Maven - * Plugin. - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Scott Frederick - * - * @since 1.0.0 - */ -public final class CommonUtils { - - /** - * Prevent instantiation. - */ - private CommonUtils() { - throw new AssertionError(); - } - - /** - * Right-pad a String with a configurable padding character. - * - * @param string The String to pad - * @param size Pad String by the number of characters. - * @param paddingChar The character to pad the String with. - * @return The padded String. If the provided String is null, an empty String is returned. - */ - public static String padRight(String string, int size, char paddingChar) { - - if (string == null) { - return ""; - } - - StringBuilder padded = new StringBuilder(string); - while (padded.length() < size) { - padded.append(paddingChar); - } - return padded.toString(); - } - - /** - * Right-pad the provided String with empty spaces. - * - * @param string The String to pad - * @param size Pad String by the number of characters. - * @return The padded String. If the provided String is null, an empty String is returned. - */ - public static String padRight(String string, int size) { - return padRight(string, size, ' '); - } - - /** - * Convert a List of Strings to a comma delimited String. - * - * @param list - * @return Returns the List as a comma delimited String. Returns an empty - * String for a Null or empty list. - */ - public static String collectionToCommaDelimitedString(Collection list) { - return StringUtils.collectionToDelimitedString(list, ", "); - } - - /** - * Convert a List of Strings to a comma delimited String. - * - * @param list - * @return Returns the List as a comma delimited String. Returns an empty - * String for a Null or empty list. - */ - public static String collectionToCommaDelimitedString(Collection list, String prefix) { - return StringUtils.collectionToDelimitedString(list, ", ", prefix, ""); - } - - /** - * Convert a List of CloudServices to a comma delimited String using their names. - * - * @param list - * @return Returns the List as a comma delimited String. Returns an empty - * String for a Null or empty list. - */ - public static String collectionServicesToCommaDelimitedString(Collection list) { - if (list == null || list.isEmpty()) { - return ""; - } - - List sb = new ArrayList(); - - for (CloudService service : list) { - sb.add(service.getName()); - } - - return sb.toString(); - } - - /** - * @param reader - */ - public static void closeReader(Reader reader) { - if (reader != null) { - try { - reader.close(); - } catch (IOException e) { - throw new IllegalStateException("Encountered problem closing Reader.", e); - } - } - } - - /** - * @param emailAddress - * @return - */ - public static boolean isValidEmail(String emailAddress) { - final String regex = "^[_A-Za-z0-9-+]+(\\.[_A-Za-z0-9-+]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*(\\.[A-Za-z]{2,})$"; - return emailAddress.matches(regex); - } - - /** - * Simple method to replace characters in a String with Stars to mask the - * password. - * - * @param password The password to mask - */ - public static String maskPassword(String password) { - int lengthOfPassword = password.length(); - StringBuilder stringBuilder = new StringBuilder(lengthOfPassword); - - for (int i = 0; i < lengthOfPassword; i++) { - stringBuilder.append('*'); - } - - return stringBuilder.toString(); - } - - /** - * Formats the supported frameworks as a command separated list. - * - * @param offerings List of services - * @return a String but never null - */ - public static String serviceOfferingsToCommaDelimitedString(final Collection offerings) { - - if (offerings == null || offerings.isEmpty()) { - return ""; - } - - StringBuilder sb = new StringBuilder(); - final Iterator it = offerings.iterator(); - - while (it.hasNext()) { - CloudServiceOffering offering = it.next(); - sb.append(offering.getLabel()); - - if (it.hasNext()) { - sb.append(", "); - } - } - return sb.toString(); - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/DefaultConstants.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/DefaultConstants.java deleted file mode 100644 index 5c3bec138b1..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/DefaultConstants.java +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - - -/** - * Provides Default values for several Maven plugin configuration parameters. - * - * For instance if for certain parameters neither system properties nor pom.xml - * configarion parameters are provided, then the below default values are used. - * - * See {@link SystemProperties} - * - * @author Gunnar Hillert - * @author Scott Frederick - * @since 1.0.0 - * - */ -public final class DefaultConstants { - - public static final String MAVEN_DEFAULT_SERVER = "cloud-foundry-credentials"; - public static final Boolean NO_START = Boolean.FALSE; - public static final Integer DEFAULT_INSTANCE = 1; - - /** - * Prevent instantiation. - */ - private DefaultConstants() { - throw new AssertionError(); - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/SystemProperties.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/SystemProperties.java deleted file mode 100644 index 27892cfe8f8..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/SystemProperties.java +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -/** - * - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Scott Frederick - * - * @since 1.0.0 - * - */ -public enum SystemProperties { - - APP_NAME("appname"), - APP_STARTUP_TIMEOUT("appStartupTimeout"), - COMMAND("command"), - BUILDPACK("buildpack"), - DISK_QUOTA("diskQuota"), - HEALTH_CHECK_TIMEOUT("healthCheckTimeout"), - INSTANCES("instances"), - MEMORY("memory"), - NO_START("no-start"), - ORG("org"), - PASSWORD("password"), - PATH("path"), - SETTINGS_SERVER("server", "server"), - SPACE("space"), - STACK("stack"), - TARGET("target"), - URL("url"), - USERNAME("username"); - - private String property; - private String xmlElement; - - private SystemProperties(String xmlElement) { - this.property = "cf." + xmlElement; - this.xmlElement = xmlElement; - } - - private SystemProperties(String property, String xmlElement) { - this.property = property; - this.xmlElement = xmlElement; - } - - public String getProperty() { - return property; - } - - public String getXmlElement() { - return xmlElement; - } - -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/Table.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/Table.java deleted file mode 100644 index 351f6fd24ba..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/Table.java +++ /dev/null @@ -1,50 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.util.ArrayList; -import java.util.List; -import java.util.Map; -import java.util.TreeMap; - -/** - * Provide a basic concept of a table structure containing a map of column headers - * and a collection of rows. Used to render text-based tables (console output). - * - * {@link UiUtils} - * - * @author Gunnar Hillert - * @since 1.0.0 - * - */ -public class Table { - - private Map headers = new TreeMap(); - private List rows = new ArrayList(0); - - public List getRows() { - return rows; - } - - public void setRows(List rows) { - this.rows = rows; - } - - public Map getHeaders() { - return headers; - } - -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/TableHeader.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/TableHeader.java deleted file mode 100644 index 6c12e0c5ee3..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/TableHeader.java +++ /dev/null @@ -1,94 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -/** - * Defines table column headers used by {@link Table}. - * - * {@link UiUtils} - * - * @author Gunnar Hillert - * @since 1.0.0 - * - */ -public class TableHeader { - - private int width = 0; - private String name; - - /** - * Constructor that initializes the table header with the provided header name - * and the with of the table header. - * - * @param name - * @param width - */ - public TableHeader(String name, int width) { - - super(); - this.width = width; - this.name = name; - - } - - /** - * Constructor that initializes the table header with the provided header name. - * The with of the table header is calculated and assigned based on the provided - * header name. - * - * @param name - */ - public TableHeader(String name) { - super(); - this.name = name; - - if (name == null) { - this.width = 0; - } else { - this.width = name.length(); - } - - } - - public int getWidth() { - return width; - } - - public void setWidth(int width) { - this.width = width; - } - - /** - * Updated the width for this particular column, but only if the value of the - * passed-in width is higher than the value of the pre-existing width. - * - * @param width - */ - public void updateWidth(int width) { - if (this.width < width) { - this.width = width; - } - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/TableRow.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/TableRow.java deleted file mode 100644 index 8c082788379..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/TableRow.java +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.util.HashMap; -import java.util.Map; - -/** - * Holds the table rows used by {@link Table}. - * - * {@link UiUtils} - * - * @author Gunnar Hillert - * @since 1.0.0 - * - */ -public class TableRow { - - /** Holds the data for the column */ - private Map data = new HashMap(); - - public void setData(Map data) { - this.data = data; - } - - /** - * Return a value from this row. - * - * @param key Column for which to return the value for - * @return Value of the specified column within this row - * - */ - public String getValue(Integer key) { - return data.get(key); - } - - /** - * Add a value to the to the specified column within this row. - * - * @param column - * @param value - */ - public void addValue(Integer column, String value) { - this.data.put(column, value); - } - -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/UiUtils.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/UiUtils.java deleted file mode 100644 index fe06bd518bf..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/UiUtils.java +++ /dev/null @@ -1,495 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.text.DecimalFormat; -import java.text.SimpleDateFormat; -import java.util.ArrayList; -import java.util.Collections; -import java.util.Comparator; -import java.util.Date; -import java.util.List; -import java.util.Map; -import java.util.Map.Entry; - -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.domain.ApplicationLog; -import org.cloudfoundry.client.lib.domain.ApplicationStats; -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudService; -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; -import org.cloudfoundry.client.lib.domain.CloudServicePlan; -import org.cloudfoundry.client.lib.domain.InstanceStats; - -/** - * Contains utility methods for rendering data to a formatted console output. - * E.g. it provides helper methods for rendering ASCII-based data tables. - * - * @author Gunnar Hillert - * @author Scott Frederick - * @since 1.0.0 - * - */ -public final class UiUtils { - public static final String HORIZONTAL_LINE = "-------------------------------------------------------------------------------\n"; - - public static final int COLUMN_1 = 1; - public static final int COLUMN_2 = 2; - public static final int COLUMN_3 = 3; - public static final int COLUMN_4 = 4; - public static final int COLUMN_5 = 5; - public static final int COLUMN_6 = 6; - - /** - * Prevent instantiation. - * - */ - private UiUtils() { - throw new AssertionError(); - } - - /** - * Renders a textual representation of a Application {@link CloudApplication} - * - *
    - *
  • Names of the Applications
  • - *
  • Number of Instances
  • - *
  • Current State (Health)
  • - *
  • Used Memory
  • - *
  • The comma-separated list of Uris
  • - *
  • The comma-separated list of Services
  • - *
      - */ - public static String renderCloudApplicationDataAsTable(CloudApplication application, ApplicationStats stats) { - StringBuilder sb = new StringBuilder("\n"); - - sb.append(String.format("application: %s\n", application.getName())); - sb.append(String.format("state: %s\n", application.getState())); - sb.append(String.format("instances: %d/%d\n", application.getRunningInstances(), application.getInstances())); - sb.append(String.format("usage: %s x %s instance\n", formatMBytes(application.getMemory()), application.getInstances())); - sb.append(String.format("urls: %s\n", CommonUtils.collectionToCommaDelimitedString(application.getUris()))); - sb.append(String.format("services: %s\n", CommonUtils.collectionToCommaDelimitedString(application.getServices()))); - - Table table = new Table(); - - table.getHeaders().put(COLUMN_1, new TableHeader("instance")); - table.getHeaders().put(COLUMN_2, new TableHeader("state")); - table.getHeaders().put(COLUMN_3, new TableHeader("cpu")); - table.getHeaders().put(COLUMN_4, new TableHeader("memory")); - table.getHeaders().put(COLUMN_5, new TableHeader("disk")); - - for (InstanceStats instance : stats.getRecords()) { - TableRow tableRow = new TableRow(); - - String index = instance.getId(); - table.getHeaders().get(COLUMN_1).updateWidth(String.valueOf(index).length()); - tableRow.addValue(COLUMN_1, String.valueOf(index)); - - String state = instance.getState().toString().toLowerCase(); - table.getHeaders().get(COLUMN_2).updateWidth(String.valueOf(state).length()); - tableRow.addValue(COLUMN_2, String.valueOf(state)); - - String cpu = String.format("%.2f%%", instance.getUsage().getCpu() * 100); - table.getHeaders().get(COLUMN_3).updateWidth(String.valueOf(cpu).length()); - tableRow.addValue(COLUMN_3, String.valueOf(cpu)); - - String memory = String.format("%s of %s", - formatBytes(instance.getUsage().getMem()), - formatBytes(instance.getMemQuota())); - table.getHeaders().get(COLUMN_4).updateWidth(String.valueOf(memory).length()); - tableRow.addValue(COLUMN_4, String.valueOf(memory)); - - String disk = String.format("%s of %s", - formatBytes(instance.getUsage().getDisk()), - formatBytes(instance.getDiskQuota())); - table.getHeaders().get(COLUMN_5).updateWidth(String.valueOf(disk).length()); - tableRow.addValue(COLUMN_5, String.valueOf(disk)); - - table.getRows().add(tableRow); - } - - sb.append("\n").append(renderTextTable(table)); - - return sb.toString(); - } - - /** - * Renders a textual representation of the list of provided {@link CloudApplication} - * - * The following information is shown: - * - *
        - *
      • Names of the Applications
      • - *
      • Number of Instances
      • - *
      • Current State (Health)
      • - *
      • Used Memory
      • - *
      • The comma-separated list of Uris
      • - *
      • The comma-separated list of Services
      • - *
          - * - * @param applications List of {@CloudApplication} - * @return The rendered table representation as String - * - */ - public static String renderCloudApplicationsDataAsTable(List applications) { - - Table table = new Table(); - - table.getHeaders().put(COLUMN_1, new TableHeader("name")); - table.getHeaders().put(COLUMN_2, new TableHeader("status")); - table.getHeaders().put(COLUMN_3, new TableHeader("instances")); - table.getHeaders().put(COLUMN_4, new TableHeader("memory")); - table.getHeaders().put(COLUMN_5, new TableHeader("disk")); - table.getHeaders().put(COLUMN_6, new TableHeader("url")); - - Comparator nameComparator = new Comparator() { - public int compare(CloudApplication a, CloudApplication b) { - return a.getName().compareTo(b.getName()); - } - }; - - Collections.sort(applications, nameComparator); - - for (CloudApplication application : applications) { - - TableRow tableRow = new TableRow(); - - table.getHeaders().get(COLUMN_1).updateWidth(application.getName().length()); - tableRow.addValue(COLUMN_1, application.getName()); - - String status = renderHealthStatus(application); - table.getHeaders().get(COLUMN_2).updateWidth(status.length()); - tableRow.addValue(COLUMN_2, status); - - String instances = String.format("%d/%d", application.getRunningInstances(), application.getInstances()); - table.getHeaders().get(COLUMN_3).updateWidth(String.valueOf(instances).length()); - tableRow.addValue(COLUMN_3, String.valueOf(instances)); - - String memory = formatMBytes(application.getMemory()); - table.getHeaders().get(COLUMN_4).updateWidth(String.valueOf(memory).length()); - tableRow.addValue(COLUMN_4, String.valueOf(memory)); - - String disk = formatMBytes(application.getDiskQuota()); - table.getHeaders().get(COLUMN_5).updateWidth(String.valueOf(disk).length()); - tableRow.addValue(COLUMN_5, String.valueOf(disk)); - - String uris = CommonUtils.collectionToCommaDelimitedString(application.getUris()); - - table.getHeaders().get(COLUMN_6).updateWidth(uris.length()); - tableRow.addValue(COLUMN_6, uris); - - table.getRows().add(tableRow); - } - - return renderTextTable(table); - } - - private static String renderHealthStatus(CloudApplication app) { - String state = app.getState().toString(); - - if (state.equals("STARTED")) { - int running_instances = app.getRunningInstances(); - int expected_instances = app.getInstances(); - - if (expected_instances > 0) { - float ratio = running_instances / expected_instances; - if (ratio == 1.0) - return "running"; - else - return new Float((ratio * 100)).intValue() + "%"; - } else { - return "n/a"; - } - } else { - return state.toLowerCase(); - } - } - - /** - * Renders a textual representation of a application's environment variables - */ - public static String renderEnvVarDataAsTable(CloudApplication application) { - StringBuilder sb = new StringBuilder("\n"); - - sb.append(String.format("Environment for application '%s'\n", application.getName())); - final List envVars = application.getEnv(); - for (String envVar : envVars) { - sb.append(envVar).append("\n"); - } - - return sb.toString(); - } - - /** - * Renders a sorted textual representation of the list of provided {@link CloudFoundryClient, @link CloudServiceOffering} - * - * @param serviceOfferings - * @return The rendered table representation as String - * - */ - public static String renderServiceOfferingDataAsTable(List serviceOfferings) { - Comparator labelComparator = new Comparator() { - public int compare(CloudServiceOffering a, CloudServiceOffering b) { - return a.getLabel().compareTo(b.getLabel()); - } - }; - Collections.sort(serviceOfferings, labelComparator); - - Table table = new Table(); - table.getHeaders().put(COLUMN_1, new TableHeader("service")); - table.getHeaders().put(COLUMN_2, new TableHeader("plans")); - table.getHeaders().put(COLUMN_3, new TableHeader("description")); - - List CloudServicePlanNames; - - for (CloudServiceOffering serviceOffering : serviceOfferings) { - TableRow tableRow = new TableRow(); - - table.getHeaders().get(COLUMN_1).updateWidth(serviceOffering.getLabel().length()); - tableRow.addValue(COLUMN_1, serviceOffering.getLabel()); - - CloudServicePlanNames = new ArrayList(); - for (CloudServicePlan servicePlan : serviceOffering.getCloudServicePlans()) { - CloudServicePlanNames.add(servicePlan.getName()); - } - table.getHeaders().get(COLUMN_2).updateWidth(CloudServicePlanNames.toString().length() - 1); - tableRow.addValue(COLUMN_2, CloudServicePlanNames.toString().substring(1, CloudServicePlanNames.toString().length() - 1)); - - table.getHeaders().get(COLUMN_3).updateWidth(serviceOffering.getDescription().length()); - tableRow.addValue(COLUMN_3, serviceOffering.getDescription()); - - table.getRows().add(tableRow); - } - - return renderTextTable(table); - } - - /** - * Renders a sorted textual representation of the list of provided {@link CloudService} - * - * The following information is shown: - * - * - * @param services - * @param servicesToApps - * @return The rendered table representation as String - * - */ - public static String renderServiceDataAsTable(List services, Map> servicesToApps) { - Comparator nameComparator = new Comparator() { - public int compare(CloudService a, CloudService b) { - return a.getName().compareTo(b.getName()); - } - }; - Collections.sort(services, nameComparator); - - Table table = new Table(); - table.getHeaders().put(COLUMN_1, new TableHeader("name")); - table.getHeaders().put(COLUMN_2, new TableHeader("service")); - table.getHeaders().put(COLUMN_3, new TableHeader("plan")); - table.getHeaders().put(COLUMN_4, new TableHeader("bound apps")); - - for (CloudService service : services) { - TableRow tableRow = new TableRow(); - - String name = service.getName(); - - String label; - String plan; - if (service.isUserProvided()) { - label = "user-provided"; - plan = ""; - } else { - label = service.getLabel(); - plan = service.getPlan(); - } - - table.getHeaders().get(COLUMN_1).updateWidth(name.length()); - tableRow.addValue(COLUMN_1, name); - - table.getHeaders().get(COLUMN_2).updateWidth(label.length()); - tableRow.addValue(COLUMN_2, label); - - table.getHeaders().get(COLUMN_3).updateWidth(plan.length()); - tableRow.addValue(COLUMN_3, plan); - - final List appNames = servicesToApps.get(name); - final String appNamesString = CommonUtils.collectionToCommaDelimitedString(appNames); - table.getHeaders().get(COLUMN_4).updateWidth(appNamesString.length()); - tableRow.addValue(COLUMN_4, appNamesString); - - table.getRows().add(tableRow); - } - return renderTextTable(table); - } - - /** - * Renders a textual representation of provided parameter map. - * - * @param parameters Map of parameters (key, value) - * @return The rendered table representation as String - * - */ - public static String renderParameterInfoDataAsTable(Map parameters) { - final Table table = new Table(); - - table.getHeaders().put(COLUMN_1, new TableHeader("Parameter")); - table.getHeaders().put(COLUMN_2, new TableHeader("Value (Configured or Default)")); - - for (Entry entry : parameters.entrySet()) { - - final TableRow tableRow = new TableRow(); - - table.getHeaders().get(COLUMN_1).updateWidth(entry.getKey().length()); - tableRow.addValue(COLUMN_1, entry.getKey()); - - table.getHeaders().get(COLUMN_2).updateWidth(entry.getValue() != null ? entry.getValue().length() : 0); - tableRow.addValue(COLUMN_2, entry.getValue()); - - table.getRows().add(tableRow); - } - - return renderTextTable(table); - } - - /** - * Renders a textual representation of the provided {@link Table} - * - * @param table Table data {@link Table} - * @return The rendered table representation as String - */ - public static String renderTextTable(Table table) { - final String padding = " "; - final String headerBorder = getHeaderBorder(table.getHeaders()); - final StringBuilder textTable = new StringBuilder(); - - for (TableHeader header : table.getHeaders().values()) { - textTable.append(padding + CommonUtils.padRight(header.getName(), header.getWidth())); - } - - textTable.append("\n"); - - textTable.append(headerBorder); - - for (TableRow row : table.getRows()) { - for (Entry entry : table.getHeaders().entrySet()) { - textTable.append(padding + CommonUtils.padRight(row.getValue(entry.getKey()), entry.getValue().getWidth())); - } - textTable.append("\n"); - } - - return textTable.toString(); - } - - /** - * Renders the help text. If the callers is logged in successfully the full - * information is rendered if not only basic Cloud Foundry information is - * rendered and returned as String. - * - * - * - * @param cloudInfo Contains the information about the Cloud Foundry environment - * @param target The target Url from which the information was obtained - * @param org - * @param space - * @return Returns a formatted String for console output - */ - public static String renderCloudInfoFormattedAsString(CloudInfo cloudInfo, String target, String org, String space) { - - final String cloudInfoMessage = "\n" + - UiUtils.HORIZONTAL_LINE + - String.format("API endpoint: %s (API version: %s) \n", target, cloudInfo.getVersion()) + - String.format("user: %s\n", cloudInfo.getUser()) + - String.format("org: %s\n", org) + - String.format("space: %s\n", space) + - UiUtils.HORIZONTAL_LINE; - - return cloudInfoMessage; - } - - /** - * Renders a line of application logging output. - */ - public static String renderApplicationLogEntry(ApplicationLog logEntry) { - StringBuilder logLine = new StringBuilder(); - - SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); - logLine.append(dateFormat.format(logEntry.getTimestamp())).append(" "); - - String source; - if (logEntry.getSourceName().equals("App")) { - source = String.format("[%s/%s]", logEntry.getSourceName(), logEntry.getSourceId()); - } else { - source = String.format("[%s]", logEntry.getSourceName()); - } - logLine.append(String.format("%-10s", source)); - - logLine.append(logEntry.getMessageType().name().substring("STD".length())).append(" "); - - logLine.append(logEntry.getMessage()); - - return logLine.toString(); - } - - /** - * Renders the Table header border, based on the map of provided headers. - * - * @param headers Map of headers containing meta information e.g. name+width of header - * @return Returns the rendered header border as String - */ - public static String getHeaderBorder(Map headers) { - - final StringBuilder headerBorder = new StringBuilder(); - - for (TableHeader header : headers.values()) { - headerBorder.append(CommonUtils.padRight(" ", header.getWidth() + 2, '-')); - } - headerBorder.append("\n"); - - return headerBorder.toString(); - } - - public static String formatMBytes(int size) { - int g = size / 1024; - - DecimalFormat dec = new DecimalFormat("0"); - - if (g > 1) { - return dec.format(g).concat("G"); - } else { - return dec.format(size).concat("M"); - } - } - - public static String formatBytes(double size) { - double k = size / 1024.0; - double m = k / 1024.0; - double g = m / 1024.0; - - DecimalFormat dec = new DecimalFormat("0"); - - if (g > 1) { - return dec.format(g).concat("G"); - } else if (m > 1) { - return dec.format(m).concat("M"); - } else if (k > 1) { - return dec.format(k).concat("K"); - } else { - return dec.format(size).concat("B"); - } - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/WarningBypassingResponseErrorHandler.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/WarningBypassingResponseErrorHandler.java deleted file mode 100644 index 17dd1ef62f0..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/WarningBypassingResponseErrorHandler.java +++ /dev/null @@ -1,28 +0,0 @@ -package org.cloudfoundry.maven.common; - -import org.cloudfoundry.client.lib.CloudFoundryException; -import org.cloudfoundry.client.lib.rest.CloudControllerResponseErrorHandler; -import org.springframework.http.HttpStatus; - -import java.util.ArrayList; -import java.util.List; - -public class WarningBypassingResponseErrorHandler extends CloudControllerResponseErrorHandler { - private List expectedStatusCodes = new ArrayList(); - - public void addExpectedStatus(HttpStatus status) { - expectedStatusCodes.add(status); - } - - public void clearExpectedStatus() { - expectedStatusCodes.clear(); - } - - @Override - protected boolean hasError(HttpStatus statusCode) { - if (expectedStatusCodes.contains(statusCode)) { - throw new CloudFoundryException(statusCode); - } - return super.hasError(statusCode); - } -} diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/package-info.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/package-info.java deleted file mode 100644 index 06f109992fa..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/common/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Contains Util classes and common constants. - * - * @author Gunnar Hillert - */ -package org.cloudfoundry.maven.common; diff --git a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/package-info.java b/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/package-info.java deleted file mode 100644 index 82d161dbc3e..00000000000 --- a/cloudfoundry-maven-plugin/src/main/java/org/cloudfoundry/maven/package-info.java +++ /dev/null @@ -1,6 +0,0 @@ -/** - * Contains the available Maven Plugin goals (mojos) - * - * @author Gunnar Hillert - */ -package org.cloudfoundry.maven; diff --git a/cloudfoundry-maven-plugin/src/main/resources/help.txt b/cloudfoundry-maven-plugin/src/main/resources/help.txt deleted file mode 100644 index 523d57d70ae..00000000000 --- a/cloudfoundry-maven-plugin/src/main/resources/help.txt +++ /dev/null @@ -1,36 +0,0 @@ - -Usage: mvn cf:command [command_options] - -Currently available Cloud Foundry Maven Plugin Goals are: - - Getting Started - target Show information about the target Cloud Foundry service - login Log into the Cloud Foundry service - logout Log out of the Cloud Foundry service - - Applications - apps List deployed applications - app Show details of the application - - Application Operations - push Create, push, map, and start a new application - push-only Create, push, map, and start a new application (without packaging the app first) - start Start the application - stop Stop the application - restart Restart the application - delete Delete the application - scale Scale the application instances up or down - logs Show application logs - env Show application environment variables - - Services - services List the provisioned services - service-plans List the available services plans - create-services Create services defined in the pom file - delete-services Delete services defined in the pom file - bind-services Bind services defined in the pom file to the application - unbind-services Unbind services defined in the pom file to the application - - Help - help Get general help - diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/AbstractApplicationAwareCloudFoundryMojoTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/AbstractApplicationAwareCloudFoundryMojoTest.java deleted file mode 100644 index 8d02cc1e8b4..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/AbstractApplicationAwareCloudFoundryMojoTest.java +++ /dev/null @@ -1,243 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import static org.mockito.Mockito.*; - -import java.io.File; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.apache.maven.artifact.Artifact; -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.apache.maven.plugin.testing.stubs.StubArtifactRepository; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.maven.common.SystemProperties; - -/** - * - * @author Gunnar Hillert - * @author Scott Frederick - * @since 1.0.0 - * - */ -public class AbstractApplicationAwareCloudFoundryMojoTest extends AbstractMojoTestCase { - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - } - - /** - * @throws Exception - */ - public void testGetUrlDefaultNoAppName() throws Exception { - - Push mojo = setupMojo(); - - setupClient(mojo); - - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.URL); - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.APP_NAME); - - List uris = mojo.getAllUris(); - assertEquals(1, uris.size()); - assertEquals("cf-maven-tests.apps.cloudfoundry.com", uris.get(0)); - - } - - public void testGetUrlDefaultAppName() throws Exception { - - Push mojo = setupMojo(); - - setupClient(mojo); - - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.URL); - doReturn("myapp").when(mojo).getCommandlineProperty(SystemProperties.APP_NAME); - - List uris = mojo.getAllUris(); - assertEquals(1, uris.size()); - assertEquals("myapp.apps.cloudfoundry.com", uris.get(0)); - - } - - public void testGetUrlSpecified() throws Exception { - - Push mojo = setupMojo(); - - doReturn("custom.expliciturl.com").when(mojo).getCommandlineProperty(SystemProperties.URL); - - List uris = mojo.getAllUris(); - assertEquals(1, uris.size()); - assertEquals("custom.expliciturl.com", uris.get(0)); - - } - - public void testGetNoStart() throws Exception { - - File testPom = new File( getBasedir(), "src/test/resources/test-pom.xml" ); - - Push unspiedMojo = (Push) lookupMojo ( "push", testPom ); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject( mojo, "noStart", Boolean.TRUE ); - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.NO_START); - - assertEquals(Boolean.TRUE, mojo.isNoStart()); - - } - - public void testGetNoStartPrecedence() throws Exception { - - File testPom = new File( getBasedir(), "src/test/resources/test-pom.xml" ); - - Push unspiedMojo = (Push) lookupMojo ( "push", testPom ); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject( mojo, "noStart", Boolean.FALSE ); - doReturn("false").when(mojo).getCommandlineProperty(SystemProperties.NO_START); - - assertEquals(Boolean.FALSE, mojo.isNoStart()); - - } - - public void testGetEnv() throws Exception { - File testPom = new File( getBasedir(), "src/test/resources/test-pom.xml" ); - - Push unspiedMojo = (Push) lookupMojo ( "push", testPom ); - - Push mojo = spy(unspiedMojo); - - Map env = new HashMap(); - env.put("JAVA_OPTS", "-XX:MaxPermSize=256m"); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject( mojo, "env", env); - - assertEquals("-XX:MaxPermSize=256m", mojo.getEnv().get("JAVA_OPTS")); - } - - public void testRepositoryArtifactResolution() throws Exception { - Push mojo = setupMojo(); - - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.PATH); - doReturn("http://api.cloudfoundry.com").when(mojo).getCommandlineProperty(SystemProperties.TARGET); - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.APP_NAME); - - setVariableValueToObject(mojo, "artifact", "groupId:artifactId:version:type"); - - final File file = File.createTempFile("cf-maven-plugin", "testrepo"); - file.delete(); - file.mkdir(); - file.deleteOnExit(); - - final File artifactFile = File.createTempFile( - "test", "artifact", file); - artifactFile.deleteOnExit(); - - setVariableValueToObject(mojo, "localRepository", - new StubArtifactRepository(file.getAbsolutePath()) { - @Override - public String pathOf(Artifact artifact) { - //Return tmp file name - return artifactFile.getName(); - } - }); - assertEquals(mojo.getPath(), artifactFile); - } - - public void testGAVProcessing() throws Exception { - Push mojo = setupMojo(); - - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.PATH); - doReturn("http://api.cloudfoundry.com").when(mojo).getCommandlineProperty(SystemProperties.TARGET); - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.APP_NAME); - - { //Test No Classifier or Type - setVariableValueToObject(mojo, "artifact", "groupId:artifactId:version"); - - boolean exception = false; - try { - mojo.createArtifactFromGAV(); - } catch(MojoExecutionException e) { - exception = true; - } - if(!exception) { - fail("Should have thrown a MojoExcecutionException"); - } - } - - { //Test No Classifier - setVariableValueToObject(mojo, "artifact", "groupId:artifactId:version:type"); - - Artifact artifact = mojo.createArtifactFromGAV(); - assertEquals("groupId", artifact.getGroupId()); - assertEquals("artifactId", artifact.getArtifactId()); - assertEquals("version", artifact.getVersion()); - assertEquals("type", artifact.getType()); - assertNull(artifact.getClassifier()); - } - - { //All - setVariableValueToObject(mojo, "artifact", "groupId:artifactId:version:type:classifier"); - - Artifact artifact = mojo.createArtifactFromGAV(); - assertEquals("groupId", artifact.getGroupId()); - assertEquals("artifactId", artifact.getArtifactId()); - assertEquals("version", artifact.getVersion()); - assertEquals("type", artifact.getType()); - assertEquals("classifier", artifact.getClassifier()); - } - - } - - private Push setupMojo() throws Exception { - File testPom = new File( getBasedir(), "src/test/resources/test-pom.xml" ); - - Push unspiedMojo = (Push) lookupMojo ( "push", testPom ); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject( mojo, "artifactId", "cf-maven-tests" ); - - return mojo; - } - - private void setupClient(Push mojo) { - CloudFoundryClient client = mock(CloudFoundryClient.class); - doReturn(new CloudDomain(null, "apps.cloudfoundry.com", null)).when(client).getDefaultDomain(); - doReturn(client).when(mojo).getClient(); - } - -} diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/AbstractCloudFoundryMojoTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/AbstractCloudFoundryMojoTest.java deleted file mode 100644 index dd0ffcaa672..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/AbstractCloudFoundryMojoTest.java +++ /dev/null @@ -1,293 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.doThrow; -import static org.mockito.Mockito.spy; - -import java.io.File; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.cloudfoundry.maven.common.Assert; -import org.cloudfoundry.maven.common.SystemProperties; - -/** - * @author Gunnar Hillert - * @since 1.0.0 - */ -public class AbstractCloudFoundryMojoTest extends AbstractMojoTestCase { - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - } - - /** - * @throws Exception - */ - public void testSkip() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push mojo = (Push) lookupMojo("push", testPom); - - setVariableValueToObject(mojo, "skip", true); - - mojo.execute(); - } - - /** - * @throws Exception - */ - public void testGetTarget() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject(mojo, "artifactId", "cf-maven-tests"); - - doReturn("http://api.run.pivotal.io").when(mojo).getCommandlineProperty(SystemProperties.TARGET); - - assertEquals("http://api.run.pivotal.io", mojo.getTarget().toString()); - - } - - /** - * @throws Exception - */ - public void testGetTargetWithMalformedUrl() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject(mojo, "artifactId", "cf-maven-tests"); - - doReturn("api.run.pivotal.io").when(mojo).getCommandlineProperty(SystemProperties.TARGET); - - try { - mojo.getTarget(); - } - catch (IllegalStateException e) { - - String expectedMessage = "The Url parameter 'api.run.pivotal.io' " - + "which was passed in as system property is not valid."; - - assertEquals(expectedMessage, e.getMessage()); - return; - } - - fail("Was a expecting an exception being thrown."); - - } - - /** - * @throws Exception - */ - public void testGetTargetWithMalformedUrl2() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject(mojo, "artifactId", "cf-maven-tests"); - - doReturn("/some/path").when(mojo).getCommandlineProperty(SystemProperties.TARGET); - - try { - mojo.getTarget(); - } - catch (IllegalStateException e) { - - String expectedMessage = "The Url parameter '/some/path' " - + "which was passed in as system property is not valid."; - - assertEquals(expectedMessage, e.getMessage()); - return; - } - - fail("Was a expecting an exception being thrown."); - - } - - /** - * @throws Exception - */ - public void testPrecedenceWhenExecutingGetTarget() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject(mojo, "artifactId", "cf-maven-tests"); - setVariableValueToObject(mojo, "target", "http://blog.hillert.com/"); - doReturn("http://api.run.pivotal.io").when(mojo).getCommandlineProperty(SystemProperties.TARGET); - - assertEquals("http://api.run.pivotal.io", mojo.getTarget().toString()); - - } - - /** - * @throws Exception - */ - public void testPrecedenceWhenExecutingGetTarget2() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject(mojo, "artifactId", "cf-maven-tests"); - setVariableValueToObject(mojo, "target", "http://blog.hillert.com/"); - doReturn(null).when(mojo).getCommandlineProperty(SystemProperties.TARGET); - - assertEquals("http://blog.hillert.com/", mojo.getTarget().toString()); - - } - - /** - * @throws Exception - */ - public void testParameterValidationWhenConnectingToCF() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - setVariableValueToObject(mojo, "target", "https://api.run.pivotal.io"); - setVariableValueToObject(mojo, "org", "my-org"); - setVariableValueToObject(mojo, "space", "development"); - - doReturn(null).when(mojo).getCommandlineProperty(any(SystemProperties.class)); - doThrow(new MojoExecutionException("Retrieve token failed")).when(mojo).retrieveToken(); - - // TODO May need to think about handling parameter validation more intelligently - - try { - mojo.execute(); - } - catch (MojoExecutionException e) { - assertEquals("Retrieve token failed", e.getMessage()); - return; - } - - fail(); - } - - /** - * @throws Exception - */ - public void testParameterValidationWhenConnectingToCF2() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - setVariableValueToObject(mojo, "target", "https://api.run.pivotal.io"); - setVariableValueToObject(mojo, "org", "my-org"); - setVariableValueToObject(mojo, "space", "development"); - setVariableValueToObject(mojo, "username", "tester@test.com"); - - doReturn(null).when(mojo).getCommandlineProperty(any(SystemProperties.class)); - doThrow(new MojoExecutionException("Retrieve token failed")).when(mojo).retrieveToken(); - - // TODO May need to think about handling parameter validation more intelligently - - try { - mojo.execute(); - } - catch (MojoExecutionException e) { - assertEquals("Retrieve token failed", e.getMessage()); - return; - } - - fail(); - - } - - /** - * @throws Exception - */ - public void testParameterValidationWhenConnctingtoCF3() throws Exception { - - File testPom = new File(getBasedir(), "src/test/resources/test-pom.xml"); - - Push unspiedMojo = (Push) lookupMojo("push", testPom); - - Push mojo = spy(unspiedMojo); - - setVariableValueToObject(mojo, "username", "tester@test.com"); - setVariableValueToObject(mojo, "password", "secret"); - setVariableValueToObject(mojo, "org", "my-org"); - setVariableValueToObject(mojo, "space", "development"); - - doReturn(null).when(mojo).getCommandlineProperty(any(SystemProperties.class)); - - // TODO May need to think about handling parameter validation more intelligently - - String expectedErrorMessage = null; - try { - Assert.configurationNotNull(null, "target", SystemProperties.TARGET); - } - catch (MojoExecutionException e) { - expectedErrorMessage = e.getMessage(); - } - - try { - mojo.execute(); - } - catch (MojoExecutionException e) { - assertEquals(expectedErrorMessage, e.getMessage()); - return; - } - - fail(); - } -} diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/CheckDefaultParametersMojosTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/CheckDefaultParametersMojosTest.java deleted file mode 100644 index 01a6092e332..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/CheckDefaultParametersMojosTest.java +++ /dev/null @@ -1,77 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.mock; -import static org.mockito.Mockito.spy; - -import java.io.File; - -import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.domain.CloudDomain; -import org.cloudfoundry.maven.common.SystemProperties; - -/** - * Test the existence of several default parameter values. - * - * @author Gunnar Hillert - * @since 1.0.0 - * - */ -public class CheckDefaultParametersMojosTest extends AbstractMojoTestCase { - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - } - - /** - * @throws Exception - */ - public void testDefaultParametersOfPushMojoGoal() throws Exception { - - File testPom = new File( getBasedir(), "src/test/resources/test-pom.xml" ); - - Push unspiedMojo = (Push) lookupMojo ( "push", testPom ); - - Push mojo = spy(unspiedMojo); - - /** - * Injecting some test values as expressions are not evaluated. - */ - setVariableValueToObject( mojo, "artifactId", "cf-maven-tests" ); - setVariableValueToObject( mojo, "artifact", "someGAV"); - - CloudFoundryClient client = mock(CloudFoundryClient.class); - doReturn(new CloudDomain(null, "apps.cloudfoundry.com", null)).when(client).getDefaultDomain(); - doReturn(client).when(mojo).getClient(); - - doReturn(null).when(mojo).getCommandlineProperty(any(SystemProperties.class)); - - assertEquals("cf-maven-tests", mojo.getAppname()); - assertNull(mojo.getMemory()); - assertNull("Password by default is null.", mojo.getPassword()); - assertEquals("cloud-foundry-credentials", mojo.getServer()); - assertTrue(mojo.getServices().isEmpty()); - assertNull("Target Url is not backed by a default value.", mojo.getTarget()); - assertNull("Username by default is null.", mojo.getUsername()); - } -} diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/CheckExistenceOfMojosTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/CheckExistenceOfMojosTest.java deleted file mode 100644 index ffb36528929..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/CheckExistenceOfMojosTest.java +++ /dev/null @@ -1,124 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import java.io.File; - -import org.apache.maven.plugin.Mojo; -import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.codehaus.plexus.component.repository.exception.ComponentLookupException; - -public class CheckExistenceOfMojosTest extends AbstractMojoTestCase { - - private static final String testPomXmlPath = "src/test/resources/test-pom.xml"; - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - } - - public void testExistenceOfAppsMojo() throws Exception { - assertMojoExists("apps", Apps.class); - } - - public void testExistenceOfAppMojo() throws Exception { - assertMojoExists("app", App.class); - } - - public void testExistenceOfDeleteMojo() throws Exception { - assertMojoExists("delete", Delete.class); - } - - public void testExistenceOfEnvMojo() throws Exception { - assertMojoExists("env", Env.class); - } - - public void testExistenceOfHelpMojo() throws Exception { - assertMojoExists("help", Help.class); - } - - public void testExistenceOfTargetMojo() throws Exception { - assertMojoExists("target", Target.class); - } - - public void testExistenceOfScaleMojo() throws Exception { - assertMojoExists("scale", Scale.class); - } - - public void testExistenceOfPushMojo() throws Exception { - assertMojoExists("push", Push.class); - } - - public void testExistenceOfRestartMojo() throws Exception { - assertMojoExists("restart", Restart.class); - } - - public void testExistenceOfStartMojo() throws Exception { - assertMojoExists("start", Start.class); - } - - public void testExistenceOfStopMojo() throws Exception { - assertMojoExists("stop", Stop.class); - } - - public void testExistenceOfServicesMojo() throws Exception { - assertMojoExists("services", Services.class); - } - - public void testExistenceOfServicePlanssMojo() throws Exception { - assertMojoExists("service-plans", ServicePlans.class); - } - - public void testExistenceOfCreateServicesMojo() throws Exception { - assertMojoExists("create-services", CreateServices.class); - } - - public void testExistenceOfDeleteServicesMojo() throws Exception { - assertMojoExists("delete-services", DeleteServices.class); - } - - public void testExistenceOfLogsMojo() throws Exception { - assertMojoExists("logs", Logs.class); - } - - public void testExistenceOfBindServicesMojo() throws Exception { - assertMojoExists("bind-services", BindServices.class); - } - - public void testExistenceOfUnbindServicesMojo() throws Exception { - assertMojoExists("unbind-services", UnbindServices.class); - } - - public void testNonExistingMojo() throws Exception { - File testPom = new File(getBasedir(), testPomXmlPath); - - try { - lookupMojo("something", testPom); - fail("A ComponentLookupException should have been thrown."); - } catch (ComponentLookupException e) { - } - } - - private void assertMojoExists(String mojoName, Class mojoType) throws Exception { - File testPom = new File(getBasedir(), testPomXmlPath); - Mojo mojo = lookupMojo(mojoName, testPom); - - assertTrue(mojoType.isInstance(mojo)); - assertNotNull(mojo); - } -} diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/LoginAndLogoutTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/LoginAndLogoutTest.java deleted file mode 100644 index 3e2dfcf90a6..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/LoginAndLogoutTest.java +++ /dev/null @@ -1,184 +0,0 @@ -/* - - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -package org.cloudfoundry.maven; - -import java.io.IOException; -import java.net.URI; -import java.net.URISyntaxException; -import java.util.Arrays; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.UUID; - -import org.apache.maven.plugin.MojoExecutionException; -import org.apache.maven.plugin.MojoFailureException; -import org.cloudfoundry.client.lib.CloudFoundryClient; -import org.cloudfoundry.client.lib.domain.CloudEntity; -import org.cloudfoundry.client.lib.domain.CloudInfo; -import org.cloudfoundry.client.lib.domain.CloudOrganization; -import org.cloudfoundry.client.lib.domain.CloudSpace; -import org.cloudfoundry.client.lib.tokens.TokensFile; -import org.junit.Before; -import org.junit.ClassRule; -import org.junit.Ignore; -import org.junit.Test; -import org.junit.rules.TemporaryFolder; -import org.mockito.Mock; -import org.springframework.security.oauth2.common.DefaultOAuth2AccessToken; -import org.springframework.security.oauth2.common.DefaultOAuth2RefreshToken; - -import static org.junit.Assert.*; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.mockito.Mockito.when; -/** -* -* @author Ali Moghadam -* @since 1.0.0 -* -*/ -public class LoginAndLogoutTest { - - private TestableLogin login; - - private TestableLogout logout; - - private TestableCloudFoundryMojo cloudFoundryMojo; - - @ClassRule - public static TemporaryFolder tempFolder = new TemporaryFolder(); - - @Mock - private CloudFoundryClient client; - - @Before - public void setup() throws Exception { - initMocks(this); - - TestableTokensFile authTokens = new TestableTokensFile(); - - cloudFoundryMojo = new TestableCloudFoundryMojo(authTokens); - - login = new TestableLogin(client, authTokens); - logout = new TestableLogout(authTokens); - } - - @Test - public void tokenSavedOnLogin() throws MojoExecutionException, IOException, URISyntaxException { - DefaultOAuth2RefreshToken refreshToken = new DefaultOAuth2RefreshToken("refreshtoken"); - DefaultOAuth2AccessToken accessToken = new DefaultOAuth2AccessToken("accesstoken"); - accessToken.setRefreshToken(refreshToken); - when(client.login()).thenReturn(accessToken); - - HashMap info = new HashMap(1); - info.put("version", "2"); - when(client.getCloudInfo()).thenReturn(new CloudInfo(info)); - - Date date = new Date(); - CloudOrganization org = new CloudOrganization(new CloudEntity.Meta(UUID.randomUUID(), date, date), "my-org"); - CloudSpace space = new CloudSpace(new CloudEntity.Meta(UUID.randomUUID(), date, date), "my-space", org); - List spaces = Arrays.asList(space); - when(client.getSpaces()).thenReturn(spaces); - - login.doExecute(); - - assertEquals(cloudFoundryMojo.retrieveToken().getValue(), "accesstoken"); - - logout.doExecute(); - - try { - cloudFoundryMojo.retrieveToken(); - fail(); - } catch (MojoExecutionException e) { - assertTrue(e.getMessage().contains("Can not authenticate to target")); - } - } -} - -@Ignore -class TestableTokensFile extends TokensFile { - @Override - public String getTokensFilePath() { - try { - return LoginAndLogoutTest.tempFolder.newFile("tokens.yml").getAbsolutePath(); - } catch (IOException e) { - throw new RuntimeException(e); - } - } -} - -@Ignore -class TestableLogin extends Login { - - public TestableLogin(CloudFoundryClient client, TokensFile tokensFile) { - super(tokensFile); - this.client = client; - } - - @Override - public URI getTarget() { - try { - return new URI("https://api.example.com"); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - } - - @Override - public String getSpace() { - return "my-space"; - } -} - -@Ignore -class TestableLogout extends Logout { - - public TestableLogout(TokensFile tokensFile) { - super(tokensFile); - } - - @Override - public URI getTarget() { - try { - return new URI("https://api.example.com"); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - } -} - -@Ignore -class TestableCloudFoundryMojo extends AbstractCloudFoundryMojo { - - public TestableCloudFoundryMojo(TokensFile tokensFile) { - this.tokensFile = tokensFile; - } - - @Override - public URI getTarget() { - try { - return new URI("https://api.example.com"); - } catch (URISyntaxException e) { - throw new RuntimeException(e); - } - } - - @Override - protected void doExecute() throws MojoExecutionException, MojoFailureException { - } -} \ No newline at end of file diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/ScaleTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/ScaleTest.java deleted file mode 100644 index 9d504f5fe09..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/ScaleTest.java +++ /dev/null @@ -1,59 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven; - -import static org.mockito.Matchers.any; -import static org.mockito.Mockito.doReturn; -import static org.mockito.Mockito.spy; - -import java.io.File; - -import org.apache.maven.plugin.testing.AbstractMojoTestCase; -import org.cloudfoundry.maven.common.SystemProperties; - -/** - * - * @author Gunnar Hillert - * @since 1.0.0 - * - */ -public class ScaleTest extends AbstractMojoTestCase { - - /** - * @see junit.framework.TestCase#setUp() - */ - protected void setUp() throws Exception { - super.setUp(); - } - - /** - * @throws Exception - */ - public void testDefaultParameter() throws Exception { - - File testPom = new File( getBasedir(), "src/test/resources/test-pom.xml" ); - - Scale unspiedMojo = (Scale) lookupMojo ( "scale", testPom ); - - Scale mojo = spy(unspiedMojo); - - doReturn(null).when(mojo).getCommandlineProperty(any(SystemProperties.class)); - - junit.framework.Assert.assertEquals("Instances should default to 1.", Integer.valueOf(1), mojo.getInstances()); - - } - -} diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/common/CommonUtilsTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/common/CommonUtilsTest.java deleted file mode 100644 index 1efbb66f04e..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/common/CommonUtilsTest.java +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright 2009-2012 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.util.ArrayList; -import java.util.List; - -import junit.framework.Assert; - -import org.cloudfoundry.client.lib.domain.CloudServiceOffering; - -import org.junit.Test; - -/** - * @author Gunnar Hillert - * @author Stephan Oudmaijer - * @author Scott Frederick - * - */ -public class CommonUtilsTest { - - @Test - public void testValidEmailAddress() { - Assert.assertTrue(CommonUtils.isValidEmail("test@cloudfoundry.com")); - } - - @Test - public void testInValidEmailAddress() { - Assert.assertFalse(CommonUtils.isValidEmail("test123")); - } - - @Test - public void testServiceConfigurationsToCommaDelimitedString() { - List list = new ArrayList(); - list.add(new CloudServiceOffering(null, "mysql", "vendor", "version")); - - Assert.assertEquals(CommonUtils.serviceOfferingsToCommaDelimitedString(list), "mysql"); - - list.add(new CloudServiceOffering(null, "mysql", "vendor", "version")); - Assert.assertEquals(CommonUtils.serviceOfferingsToCommaDelimitedString(list), "mysql, mysql"); - } -} diff --git a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/common/UiUtilsTest.java b/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/common/UiUtilsTest.java deleted file mode 100644 index f8788a39a5a..00000000000 --- a/cloudfoundry-maven-plugin/src/test/java/org/cloudfoundry/maven/common/UiUtilsTest.java +++ /dev/null @@ -1,79 +0,0 @@ -/* - * Copyright 2009-2013 the original author or authors. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package org.cloudfoundry.maven.common; - -import java.io.IOException; -import java.io.InputStreamReader; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.List; - -import junit.framework.Assert; - -import org.cloudfoundry.client.lib.domain.CloudApplication; -import org.cloudfoundry.client.lib.domain.CloudApplication.AppState; - -import org.junit.Test; -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.springframework.util.FileCopyUtils; - -/** - * @author Gunnar Hillert - */ -public class UiUtilsTest { - - private static final Logger LOGGER = LoggerFactory.getLogger(UiUtilsTest.class); - - @Test - public void testRenderTextTable() { - final List services = new ArrayList(); - - services.add("mysql"); - services.add("MyMongoInstance"); - - final List uris = new ArrayList(); - - uris.add("cf-rocks.api.run.pivotal.io"); - uris.add("spring-rocks.api.run.pivotal.io"); - - String expectedTableAsString = null; - - try { - expectedTableAsString = FileCopyUtils.copyToString(new InputStreamReader( - UiUtilsTest.class.getResourceAsStream("testRenderTextTable-expected-output.txt"))); - } catch (IOException e) { - e.printStackTrace(); - Assert.fail(); - } - - Assert.assertNotNull(expectedTableAsString); - - final CloudApplication app1 = new CloudApplication("first", "command", - "buildpack", 512, 1, uris, services, AppState.STARTED); - final CloudApplication app2 = new CloudApplication("second", "command", - "buildpack", 1024, 2, uris, services, AppState.STOPPED); - - final List applications = Arrays.asList(app1, app2); - - final String renderedTableAsString = UiUtils.renderCloudApplicationsDataAsTable(applications); - - LOGGER.info("\n" + renderedTableAsString); - - Assert.assertEquals(expectedTableAsString, renderedTableAsString); - } - -} diff --git a/cloudfoundry-maven-plugin/src/test/resources/logback-test.xml b/cloudfoundry-maven-plugin/src/test/resources/logback-test.xml deleted file mode 100644 index e0c46d793c8..00000000000 --- a/cloudfoundry-maven-plugin/src/test/resources/logback-test.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - %d %5p | %t | %-55logger{55} | %m %n - - - - - - - - - - - - - diff --git a/cloudfoundry-maven-plugin/src/test/resources/org/cloudfoundry/maven/common/testRenderTextTable-expected-output.txt b/cloudfoundry-maven-plugin/src/test/resources/org/cloudfoundry/maven/common/testRenderTextTable-expected-output.txt deleted file mode 100644 index 62a652eca26..00000000000 --- a/cloudfoundry-maven-plugin/src/test/resources/org/cloudfoundry/maven/common/testRenderTextTable-expected-output.txt +++ /dev/null @@ -1,4 +0,0 @@ - name status instances memory disk url - ------ ------- --------- ------ ---- ------------------------------------------------------------ - first 0% 0/1 512M 0M cf-rocks.api.run.pivotal.io, spring-rocks.api.run.pivotal.io - second stopped 0/2 1024M 0M cf-rocks.api.run.pivotal.io, spring-rocks.api.run.pivotal.io diff --git a/cloudfoundry-maven-plugin/src/test/resources/test-pom.xml b/cloudfoundry-maven-plugin/src/test/resources/test-pom.xml deleted file mode 100644 index 89eff899958..00000000000 --- a/cloudfoundry-maven-plugin/src/test/resources/test-pom.xml +++ /dev/null @@ -1,232 +0,0 @@ - - - 4.0.0 - com.testing - cf-maven-tests - Cloud Foundry Maven Tests - war - 1.0.0-BUILD-SNAPSHOT - - 1.7 - 3.0.5.RELEASE - 1.0.2.RELEASE - 1.6.9 - 1.5.10 - - - - - org.springframework - spring-context - ${org.springframework-version} - - - - commons-logging - commons-logging - - - - - org.springframework - spring-webmvc - ${org.springframework-version} - - - - org.springframework.roo - org.springframework.roo.annotations - ${org.springframework.roo-version} - provided - - - - - org.aspectj - aspectjrt - ${org.aspectj-version} - - - - - org.slf4j - slf4j-api - ${org.slf4j-version} - - - org.slf4j - jcl-over-slf4j - ${org.slf4j-version} - runtime - - - org.slf4j - slf4j-log4j12 - ${org.slf4j-version} - runtime - - - log4j - log4j - 1.2.15 - - - javax.mail - mail - - - javax.jms - jms - - - com.sun.jdmk - jmxtools - - - com.sun.jmx - jmxri - - - runtime - - - - - javax.inject - javax.inject - 1 - - - - - javax.servlet - servlet-api - 2.5 - provided - - - javax.servlet.jsp - jsp-api - 2.1 - provided - - - javax.servlet - jstl - 1.2 - - - - - junit - junit - 4.7 - test - - - - - - - org.springframework.maven.snapshot - Spring Maven Snapshot Repository - http://maven.springframework.org/snapshot - - false - - - true - - - - - org.springframework.maven.milestone - Spring Maven Milestone Repository - http://maven.springframework.org/milestone - - false - - - - - - - org.cloudfoundry.maven - cf-maven-plugin - 1.0.0.BUILD-SNAPSHOT - - - - - org.apache.maven.plugins - maven-compiler-plugin - - ${java-version} - ${java-version} - - - - org.apache.maven.plugins - maven-dependency-plugin - - - install - install - - sources - - - - - - org.codehaus.mojo - aspectj-maven-plugin - - 1.2 - - - - org.aspectj - aspectjrt - ${org.aspectj-version} - - - org.aspectj - aspectjtools - ${org.aspectj-version} - - - - - - compile - test-compile - - - - - true - ${java-version} - ${java-version} - - - - org.apache.maven.plugins - maven-surefire-plugin - - junit:junit - - **/*_Roo_* - - - - - org.codehaus.mojo - tomcat-maven-plugin - 1.0-beta-1 - - - - diff --git a/cloudfoundry-operations/pom.xml b/cloudfoundry-operations/pom.xml new file mode 100644 index 00000000000..1bc8c7cb1b1 --- /dev/null +++ b/cloudfoundry-operations/pom.xml @@ -0,0 +1,154 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + cloudfoundry-operations + Cloud Foundry Java Operations + jar + + + + com.fasterxml.jackson.core + jackson-annotations + provided + + + com.fasterxml.jackson.core + jackson-databind + + + io.projectreactor + reactor-test + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.assertj + assertj-core + test + + + org.hamcrest + hamcrest-junit + 2.0.0.0 + test + + + junit + junit + + + + + org.cloudfoundry + cloudfoundry-client + ${project.version} + + + org.cloudfoundry + cloudfoundry-util + ${project.version} + + + org.immutables + value + provided + + + org.mockito + mockito-core + test + + + org.slf4j + slf4j-api + + + org.springframework.boot + spring-boot-starter-logging + test + + + org.yaml + snakeyaml + + + org.apache.commons + commons-lang3 + test + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.cloudfoundry.operations + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + -missing + + **\/Default*.java,org.cloudfoundry.operations.util + + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/CloudFoundryOperations.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/CloudFoundryOperations.java new file mode 100644 index 00000000000..903aa728dd1 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/CloudFoundryOperations.java @@ -0,0 +1,141 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import org.cloudfoundry.operations.advanced.Advanced; +import org.cloudfoundry.operations.applications.Applications; +import org.cloudfoundry.operations.buildpacks.Buildpacks; +import org.cloudfoundry.operations.domains.Domains; +import org.cloudfoundry.operations.networkpolicies.NetworkPolicies; +import org.cloudfoundry.operations.organizationadmin.OrganizationAdmin; +import org.cloudfoundry.operations.organizations.Organizations; +import org.cloudfoundry.operations.routes.Routes; +import org.cloudfoundry.operations.serviceadmin.ServiceAdmin; +import org.cloudfoundry.operations.services.Services; +import org.cloudfoundry.operations.spaceadmin.SpaceAdmin; +import org.cloudfoundry.operations.spaces.Spaces; +import org.cloudfoundry.operations.stacks.Stacks; +import org.cloudfoundry.operations.useradmin.UserAdmin; + +/** + * Main entry point to the Cloud Foundry Operations API + */ +public interface CloudFoundryOperations { + + /** + * The currently supported Cloud Foundry CLI version + */ + String SUPPORTED_CLI_VERSION = "6.16.1"; + + /** + * Main entry point to the Cloud Foundry Advanced Operations API + * + * @return the Cloud Foundry Advanced Operations API + */ + Advanced advanced(); + + /** + * Main entry point to the Cloud Foundry Applications Operations API + * + * @return the Cloud Foundry Applications Operations API + */ + Applications applications(); + + /** + * Main entry point to the Cloud Foundry Buildpacks Operations API + * + * @return the Cloud Foundry Buildpacks Operations API + */ + Buildpacks buildpacks(); + + /** + * Main entry point to the Cloud Foundry Domains Operations API + * + * @return the Cloud Foundry Domains Operations API + */ + Domains domains(); + + /** + * Main entry point to the Cloud Foundry Networking Policies Operations API + * + * @return the Cloud Foundry Networking Policies Operations API + */ + NetworkPolicies networkPolicies(); + + /** + * Main entry point to the Cloud Foundry Organization Admin Operations API + * + * @return the Cloud Foundry Organization Admin Operations API + */ + OrganizationAdmin organizationAdmin(); + + /** + * Main entry point to the Cloud Foundry Organizations Operations API + * + * @return the Cloud Foundry Organizations Operations API + */ + Organizations organizations(); + + /** + * Main entry point to the Cloud Foundry Routes Operations API + * + * @return the Cloud Foundry Routes Operations API + */ + Routes routes(); + + /** + * Main entry point to the Cloud Foundry Service Admin Operations API + * + * @return the Cloud Foundry Service Admin Operations API + */ + ServiceAdmin serviceAdmin(); + + /** + * Main entry point to the Cloud Foundry Services Operations API + * + * @return the Cloud Foundry Services Operations API + */ + Services services(); + + /** + * Main entry point to the Cloud Foundry Space Admin Operations API + * + * @return the Cloud Foundry Space Admin Operations API + */ + SpaceAdmin spaceAdmin(); + + /** + * Main entry point to the Cloud Foundry Spaces Operations API + * + * @return the Cloud Foundry Spaces Operations API + */ + Spaces spaces(); + + /** + * Main entry point to the Cloud Foundry Stacks Operations API + * + * @return the Cloud Foundry Stacks Operations API + */ + Stacks stacks(); + + /** + * Main entry point to the Cloud Foundry User Admin Operations API + * + * @return the Cloud Foundry User Admin Operations API + */ + UserAdmin userAdmin(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/_DefaultCloudFoundryOperations.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/_DefaultCloudFoundryOperations.java new file mode 100644 index 00000000000..1d21f29b2b8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/_DefaultCloudFoundryOperations.java @@ -0,0 +1,340 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.client.v3.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v3.spaces.SpaceResource; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.operations.advanced.Advanced; +import org.cloudfoundry.operations.advanced.DefaultAdvanced; +import org.cloudfoundry.operations.applications.Applications; +import org.cloudfoundry.operations.applications.DefaultApplications; +import org.cloudfoundry.operations.buildpacks.Buildpacks; +import org.cloudfoundry.operations.buildpacks.DefaultBuildpacks; +import org.cloudfoundry.operations.domains.DefaultDomains; +import org.cloudfoundry.operations.domains.Domains; +import org.cloudfoundry.operations.networkpolicies.DefaultNetworkPolicies; +import org.cloudfoundry.operations.networkpolicies.NetworkPolicies; +import org.cloudfoundry.operations.organizationadmin.DefaultOrganizationAdmin; +import org.cloudfoundry.operations.organizationadmin.OrganizationAdmin; +import org.cloudfoundry.operations.organizations.DefaultOrganizations; +import org.cloudfoundry.operations.organizations.Organizations; +import org.cloudfoundry.operations.routes.DefaultRoutes; +import org.cloudfoundry.operations.routes.Routes; +import org.cloudfoundry.operations.serviceadmin.DefaultServiceAdmin; +import org.cloudfoundry.operations.serviceadmin.ServiceAdmin; +import org.cloudfoundry.operations.services.DefaultServices; +import org.cloudfoundry.operations.services.Services; +import org.cloudfoundry.operations.spaceadmin.DefaultSpaceAdmin; +import org.cloudfoundry.operations.spaceadmin.SpaceAdmin; +import org.cloudfoundry.operations.spaces.DefaultSpaces; +import org.cloudfoundry.operations.spaces.Spaces; +import org.cloudfoundry.operations.stacks.DefaultStacks; +import org.cloudfoundry.operations.stacks.Stacks; +import org.cloudfoundry.operations.useradmin.DefaultUserAdmin; +import org.cloudfoundry.operations.useradmin.UserAdmin; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.immutables.value.Value; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +import java.time.Duration; +import java.util.NoSuchElementException; +import java.util.Optional; + +/** + * The default implementation of the {@link CloudFoundryOperations} interface + */ +@Value.Immutable +abstract class _DefaultCloudFoundryOperations implements CloudFoundryOperations { + + @Override + @Value.Derived + public Advanced advanced() { + return new DefaultAdvanced(getUaaClientPublisher()); + } + + @Override + @Value.Derived + public Applications applications() { + return new DefaultApplications(getCloudFoundryClientPublisher(), getDopplerClientPublisher(), getSpaceId()); + } + + @Override + @Value.Derived + public Buildpacks buildpacks() { + CloudFoundryClient cloudFoundryClient = getCloudFoundryClient(); + if (cloudFoundryClient == null) { + throw new IllegalStateException("CloudFoundryClient must be set"); + } + return new DefaultBuildpacks(cloudFoundryClient); + } + + @Override + @Value.Derived + public Domains domains() { + CloudFoundryClient cloudFoundryClient = getCloudFoundryClient(); + if (cloudFoundryClient == null) { + throw new IllegalStateException("CloudFoundryClient must be set"); + } + RoutingClient routingClient = getRoutingClient(); + if (routingClient == null) { + throw new IllegalStateException("RoutingClient must be set"); + } + return new DefaultDomains(cloudFoundryClient, routingClient); + } + + @Override + @Value.Derived + public NetworkPolicies networkPolicies() { + return new DefaultNetworkPolicies(getCloudFoundryClientPublisher(), getNetworkingClientPublisher(), getSpaceId()); + } + + @Override + @Value.Derived + public OrganizationAdmin organizationAdmin() { + return new DefaultOrganizationAdmin(getCloudFoundryClientPublisher()); + } + + @Override + @Value.Derived + public Organizations organizations() { + return new DefaultOrganizations(getCloudFoundryClientPublisher(), getUsername()); + } + + @Override + @Value.Derived + public Routes routes() { + return new DefaultRoutes(getCloudFoundryClientPublisher(), getOrganizationId(), getSpaceId()); + } + + @Override + @Value.Derived + public ServiceAdmin serviceAdmin() { + return new DefaultServiceAdmin(getCloudFoundryClientPublisher(), getSpaceId()); + } + + @Override + @Value.Derived + public Services services() { + return new DefaultServices(getCloudFoundryClientPublisher(), getOrganizationId(), getSpaceId()); + } + + @Override + @Value.Derived + public SpaceAdmin spaceAdmin() { + return new DefaultSpaceAdmin(getCloudFoundryClientPublisher(), getOrganizationId()); + } + + @Override + @Value.Derived + public Spaces spaces() { + return new DefaultSpaces(getCloudFoundryClientPublisher(), getOrganizationId(), getUsername()); + } + + @Override + @Value.Derived + public Stacks stacks() { + return new DefaultStacks(getCloudFoundryClientPublisher()); + } + + @Override + @Value.Derived + public UserAdmin userAdmin() { + return new DefaultUserAdmin(getCloudFoundryClientPublisher(), getUaaClientPublisher()); + } + + /** + * The duration that stable responses like the organization and space id should be cached + */ + abstract Optional getCacheDuration(); + + /** + * The {@link CloudFoundryClient} to use for operations functionality + */ + @Nullable + abstract CloudFoundryClient getCloudFoundryClient(); + + @Value.Derived + Mono getCloudFoundryClientPublisher() { + return Optional.ofNullable(getCloudFoundryClient()) + .map(Mono::just) + .orElse(Mono.error(new IllegalStateException("CloudFoundryClient must be set"))); + } + + /** + * The {@link DopplerClient} to use for operations functionality + */ + @Nullable + abstract DopplerClient getDopplerClient(); + + @Value.Derived + Mono getDopplerClientPublisher() { + return Optional.ofNullable(getDopplerClient()) + .map(Mono::just) + .orElse(Mono.error(new IllegalStateException("DopplerClient must be set"))); + } + + /** + * The {@link NetworkingClient} to use for operations functionality + */ + @Nullable + abstract NetworkingClient getNetworkingClient(); + + @Value.Derived + Mono getNetworkingClientPublisher() { + return Optional.ofNullable(getNetworkingClient()) + .map(Mono::just) + .orElse(Mono.error(new IllegalStateException("NetworkingClient must be set"))); + } + + /** + * The organization to target + */ + @Nullable + abstract String getOrganization(); + + @Value.Derived + Mono getOrganizationId() { + String organization = getOrganization(); + + if (hasText(organization)) { + Mono cached = getOrganization(getCloudFoundryClientPublisher(), organization) + .map(OrganizationResource::getId); + + return getCacheDuration() + .map(cached::cache) + .orElseGet(cached::cache); + } else { + return Mono.error(new IllegalStateException("No organization targeted")); + } + } + + /** + * The {@link RoutingClient} to use for operations functionality + */ + @Nullable + abstract RoutingClient getRoutingClient(); + + @Value.Derived + Mono getRoutingClientPublisher() { + return Optional.ofNullable(getRoutingClient()) + .map(Mono::just) + .orElse(Mono.error(new IllegalStateException("RoutingClient must be set"))); + } + + /** + * The space to target + */ + @Nullable + abstract String getSpace(); + + @Value.Derived + Mono getSpaceId() { + String space = getSpace(); + + if (hasText(getSpace())) { + Mono cached = getOrganizationId() + .flatMap(organizationId -> getSpace(getCloudFoundryClientPublisher(), organizationId, space)) + .map(SpaceResource::getId); + + return getCacheDuration() + .map(cached::cache) + .orElseGet(cached::cache); + } else { + return Mono.error(new IllegalStateException("No space targeted")); + } + } + + /** + * The {@link UaaClient} to use for operations functionality + */ + @Nullable + abstract UaaClient getUaaClient(); + + @Value.Derived + Mono getUaaClientPublisher() { + return Optional.ofNullable(getUaaClient()) + .map(Mono::just) + .orElse(Mono.error(new IllegalStateException("UaaClient must be set"))); + } + + @Value.Derived + Mono getUsername() { + return getUaaClientPublisher() + .flatMap(UaaClient::getUsername); + } + + private static Mono getOrganization(Mono cloudFoundryClient, String organization) { + return requestOrganizations(cloudFoundryClient, organization) + .single() + .onErrorResume(NoSuchElementException.class, t -> ExceptionUtils.illegalArgument("Organization %s does not exist", organization)); + } + + private static Mono getSpace(Mono cloudFoundryClient, String organizationId, String space) { + return requestSpaces(cloudFoundryClient, organizationId, space) + .single() + .onErrorResume(NoSuchElementException.class, t -> ExceptionUtils.illegalArgument("Space %s does not exist", space)); + } + + private static boolean hasLength(CharSequence str) { + return (str != null && str.length() > 0); + } + + private static boolean hasText(CharSequence str) { + if (!hasLength(str)) { + return false; + } + int strLen = str.length(); + for (int i = 0; i < strLen; i++) { + if (!Character.isWhitespace(str.charAt(i))) { + return true; + } + } + return false; + } + + private static Flux requestOrganizations(Mono cloudFoundryClientPublisher, String organization) { + return cloudFoundryClientPublisher + .flatMapMany(cloudFoundryClient -> PaginationUtils + .requestClientV3Resources(page -> cloudFoundryClient.organizationsV3() + .list(ListOrganizationsRequest.builder() + .name(organization) + .page(page) + .build()))); + } + + private static Flux requestSpaces(Mono cloudFoundryClientPublisher, String organizationId, String space) { + return cloudFoundryClientPublisher + .flatMapMany(cloudFoundryClient -> PaginationUtils + .requestClientV3Resources(page -> cloudFoundryClient.spacesV3() + .list(ListSpacesRequest.builder() + .organizationId(organizationId) + .name(space) + .page(page) + .build()))); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/advanced/Advanced.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/advanced/Advanced.java new file mode 100644 index 00000000000..24cdbe7a472 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/advanced/Advanced.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.advanced; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Advanced Operations API + */ +public interface Advanced { + + Mono sshCode(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/advanced/DefaultAdvanced.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/advanced/DefaultAdvanced.java new file mode 100644 index 00000000000..d6abe89de89 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/advanced/DefaultAdvanced.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.advanced; + +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantApiRequest; +import reactor.core.publisher.Mono; + +public final class DefaultAdvanced implements Advanced { + + private final Mono uaaClient; + + public DefaultAdvanced(Mono uaaClient) { + this.uaaClient = uaaClient; + } + + @Override + public Mono sshCode() { + return this.uaaClient + .flatMap(DefaultAdvanced::requestAuthorizeByAuthorizationCodeGrantApi) + .transform(OperationsLogging.log("Get SSH Code")) + .checkpoint(); + } + + private static Mono requestAuthorizeByAuthorizationCodeGrantApi(UaaClient uaaClient) { + return uaaClient + .authorizations() + .authorizationCodeGrantApi( + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .clientId("ssh-proxy") + .build()); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/AbstractApplicationSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/AbstractApplicationSummary.java new file mode 100644 index 00000000000..f2df38279e5 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/AbstractApplicationSummary.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import java.util.List; + +/** + * A Cloud Foundry Application summary base class + */ +public abstract class AbstractApplicationSummary { + + /** + * The disk quota in bytes + */ + public abstract Integer getDiskQuota(); + + /** + * The id + */ + public abstract String getId(); + + /** + * The number of instances + */ + public abstract Integer getInstances(); + + /** + * The memory limit in bytes + */ + public abstract Integer getMemoryLimit(); + + /** + * The name + */ + public abstract String getName(); + + /** + * The requested state + */ + public abstract String getRequestedState(); + + /** + * The number of running instances + */ + public abstract Integer getRunningInstances(); + + /** + * The list of bound urls + */ + public abstract List getUrls(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationHealthCheck.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationHealthCheck.java new file mode 100644 index 00000000000..dc886a05da3 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationHealthCheck.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The health check type of an application + */ +public enum ApplicationHealthCheck { + + /** + * HTTP health check + */ + HTTP("http"), + + /** + * No health check + */ + NONE("none"), + + /** + * Process health check + */ + PROCESS("process"), + + /** + * Port health check + */ + PORT("port"); + + private final String value; + + ApplicationHealthCheck(String value) { + this.value = value; + } + + @JsonCreator + public static ApplicationHealthCheck from(String s) { + switch (s.toLowerCase()) { + case "http": + return HTTP; + case "none": + return NONE; + case "port": + return PORT; + case "process": + return PROCESS; + default: + throw new IllegalArgumentException( + String.format("Unknown application health check: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationLogType.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationLogType.java new file mode 100644 index 00000000000..1c49f4ba424 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationLogType.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +public enum ApplicationLogType { + /** + * {@code STDERR} + */ + ERR("ERR"), + + /** + * {@code STDOUT} + */ + OUT("OUT"); + + private final String value; + + ApplicationLogType(String value) { + this.value = value; + } + + @JsonCreator + public static ApplicationLogType from(String s) { + switch (s.toLowerCase()) { + case "err": + return ERR; + case "out": + return OUT; + default: + throw new IllegalArgumentException(String.format("Unknown log type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java new file mode 100644 index 00000000000..a82bd806083 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtils.java @@ -0,0 +1,174 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static java.util.Collections.emptyMap; +import static java.util.stream.Collectors.toMap; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; +import java.util.stream.Stream; +import reactor.core.Exceptions; + +/** + * Utilities for dealing with {@link ApplicationManifest}s. Includes the functionality to transform to and from standard CLI YAML files. + */ +public final class ApplicationManifestUtils extends ApplicationManifestUtilsCommon { + private ApplicationManifestUtils() {} + + /** + * Reads a YAML manifest file (defined by the CLI) from a {@link Path} and converts it into a collection of {@link + * ApplicationManifest}s. Note that all resolution (both inheritance and common) is performed during read. + * + * @param path the path to read from + * @return the resolved manifests + */ + public static List read(Path path) { + return doRead(path.toAbsolutePath(), emptyMap()); + } + + /** + * Reads a YAML manifest file (defined by the CLI) from a {@link Path} and converts it into a collection of {@link + * ApplicationManifest}s. Note that all resolution (both inheritance and common) is performed during read. + * + * @param path the path to read from + * @param variablesPath use variable substitution (described in Add Variables to a Manifest) + * @return the resolved manifests + */ + public static List read(Path path, Path variablesPath) { + Map variables = + deserialize(variablesPath.toAbsolutePath()).entrySet().stream() + .collect(toMap(Map.Entry::getKey, e -> String.valueOf(e.getValue()))); + + return doRead(path.toAbsolutePath(), variables); + } + + /** + * Write {@link ApplicationManifest}s to a {@link Path} + * + * @param path the path to write to + * @param applicationManifests the manifests to write + */ + public static void write(Path path, ApplicationManifest... applicationManifests) { + write(path, Arrays.asList(applicationManifests)); + } + + /** + * Write {@link ApplicationManifest}s to a {@link Path} + * + * @param path the path to write to + * @param applicationManifests the manifests to write + */ + public static void write(Path path, List applicationManifests) { + try (OutputStream out = + Files.newOutputStream(path, StandardOpenOption.CREATE, StandardOpenOption.WRITE)) { + write(out, applicationManifests); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + /** + * Write {@link ApplicationManifest}s to an {@link OutputStream} + * + * @param out the {@link OutputStream} to write to + * @param applicationManifests the manifests to write + */ + public static void write(OutputStream out, ApplicationManifest... applicationManifests) { + write(out, Arrays.asList(applicationManifests)); + } + + /** + * Write {@link ApplicationManifest}s to an {@link OutputStream} + * + * @param out the {@link OutputStream} to write to + * @param applicationManifests the manifests to write + */ + public static void write(OutputStream out, List applicationManifests) { + try (Writer writer = new OutputStreamWriter(out)) { + YAML.dump( + Collections.singletonMap( + "applications", + applicationManifests.stream() + .map(ApplicationManifestUtils::toYaml) + .collect(Collectors.toList())), + writer); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + private static ApplicationManifest getTemplate( + Path path, Map root, Map variables) { + return toApplicationManifest(root, variables, ApplicationManifest.builder(), path) + .name("template") + .build(); + } + + @SuppressWarnings("unchecked") + private static ApplicationManifest.Builder toApplicationManifest( + Map application, + Map variables, + ApplicationManifest.Builder builder, + Path root) { + toApplicationManifestCommon(application, variables, builder, root); + asListOfString(application, "services", variables, builder::service); + + return builder; + } + + private static Map toYaml(ApplicationManifest applicationManifest) { + Map yaml = + ApplicationManifestUtilsCommon.toApplicationYaml(applicationManifest); + putIfPresent(yaml, "services", applicationManifest.getServices()); + return yaml; + } + + @SuppressWarnings("unchecked") + private static List doRead(Path path, Map variables) { + Map root = deserialize(path); + + ApplicationManifest template = getTemplate(path, root, variables); + + return Optional.ofNullable(root.get("applications")) + .map(value -> ((List>) value).stream()) + .orElseGet(Stream::empty) + .map( + application -> { + String name = getName(application); + return toApplicationManifest( + application, + variables, + ApplicationManifest.builder().from(template), + path) + .name(name) + .build(); + }) + .collect(Collectors.toList()); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsCommon.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsCommon.java new file mode 100644 index 00000000000..79b50ab809d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsCommon.java @@ -0,0 +1,478 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static java.util.Collections.emptyMap; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.Collection; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.TreeMap; +import java.util.concurrent.atomic.AtomicReference; +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import org.cloudfoundry.util.tuple.Consumer2; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; +import reactor.core.Exceptions; + +/** + * Common base class for dealing with manifests + */ +abstract class ApplicationManifestUtilsCommon { + + static final int GIBI = 1_024; + + static final Yaml YAML; + + static { + DumperOptions dumperOptions = new DumperOptions(); + dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); + dumperOptions.setExplicitStart(true); + + YAML = new Yaml(dumperOptions); + } + + static final Pattern FIND_VARIABLE_REGEX = Pattern.compile("\\(\\(([a-zA-Z]\\w+)\\)\\)"); + + @SuppressWarnings("unchecked") + static T toApplicationManifestCommon( + Map application, Map variables, T builder, Path root) { + asListOfString(application, "buildpacks", variables, builder::buildpacks); + asString(application, "buildpack", variables, builder::buildpacks); + asString(application, "command", variables, builder::command); + asMemoryInteger(application, "disk_quota", variables, builder::disk); + asDocker(application, "docker", variables, builder::docker); + asString(application, "domain", variables, builder::domain); + asListOfString(application, "domains", variables, builder::domain); + asMapOfStringString(application, "env", variables, builder::environmentVariable); + asString( + application, + "health-check-http-endpoint", + variables, + builder::healthCheckHttpEndpoint); + asString( + application, + "health-check-type", + variables, + healthCheckType -> + builder.healthCheckType(ApplicationHealthCheck.from(healthCheckType))); + asString(application, "host", variables, builder::host); + asListOfString(application, "hosts", variables, builder::host); + asInteger(application, "instances", variables, builder::instances); + asMemoryInteger(application, "memory", variables, builder::memory); + asString(application, "name", variables, builder::name); + asBoolean(application, "no-hostname", variables, builder::noHostname); + asBoolean(application, "no-route", variables, builder::noRoute); + asString( + application, + "path", + variables, + path -> builder.path(root.getParent().resolve(path))); + asBoolean(application, "random-route", variables, builder::randomRoute); + asList( + application, + "routes", + variables, + raw -> getRoute((Map) raw, variables), + builder::route); + asString(application, "stack", variables, builder::stack); + asInteger(application, "timeout", variables, builder::timeout); + + return builder; + } + + static void as( + Map payload, + String key, + Map variables, + Function mapper, + Consumer consumer) { + Optional.ofNullable(payload.get(key)) + .map( + o -> { + if (o instanceof String) { + Matcher m = FIND_VARIABLE_REGEX.matcher((String) o); + StringBuffer stringBuffer = new StringBuffer(); + while (m.find()) { + m.appendReplacement( + stringBuffer, + Optional.ofNullable(variables.get(m.group(1))) + .orElseThrow( + () -> + new NoSuchElementException( + "Expected to find" + + " variable: " + + m.group(1)))); + } + m.appendTail(stringBuffer); + return stringBuffer.toString(); + } + return o; + }) + .map(mapper) + .ifPresent(consumer); + } + + static void asBoolean( + Map payload, + String key, + Map variables, + Consumer consumer) { + as(payload, key, variables, Boolean.class::cast, consumer); + } + + @SuppressWarnings("unchecked") + static void asDocker( + Map payload, + String key, + Map variables, + Consumer consumer) { + as( + payload, + key, + variables, + value -> { + Map docker = ((Map) value); + return Docker.builder() + .image(docker.get("image")) + .password(docker.get("password")) + .username(docker.get("username")) + .build(); + }, + consumer); + } + + static void asInteger( + Map payload, + String key, + Map variables, + Consumer consumer) { + as( + payload, + key, + variables, + (e) -> { + if (e instanceof String) { + return Integer.parseInt((String) e); + } + return (Integer) e; + }, + consumer); + } + + @SuppressWarnings("unchecked") + static void asList( + Map payload, + String key, + Map variables, + Function mapper, + Consumer consumer) { + as( + payload, + key, + variables, + value -> ((List) value).stream(), + values -> values.map(mapper).forEach(consumer)); + } + + static void asListOfString( + Map payload, + String key, + Map variables, + Consumer consumer) { + asList(payload, key, variables, String.class::cast, consumer); + } + + @SuppressWarnings("unchecked") + static void asMap( + Map payload, + String key, + Map variables, + Function valueMapper, + Consumer2 consumer) { + as( + payload, + key, + variables, + value -> ((Map) value), + values -> values.forEach((k, v) -> consumer.accept(k, valueMapper.apply(v)))); + } + + static void asMapOfStringString( + Map payload, + String key, + Map variables, + Consumer2 consumer) { + asMap(payload, key, variables, String::valueOf, consumer); + } + + @SuppressWarnings("unchecked") + static void asMemoryInteger( + Map payload, + String key, + Map variables, + Consumer consumer) { + as( + payload, + key, + variables, + raw -> { + if (raw instanceof Integer) { + return (Integer) raw; + } else if (raw instanceof String) { + String text = ((String) raw).toUpperCase(); + + if (text.endsWith("G")) { + return Integer.parseInt(text.substring(0, text.length() - 1)) * GIBI; + } else if (text.endsWith("GB")) { + return Integer.parseInt(text.substring(0, text.length() - 2)) * GIBI; + } else if (text.endsWith("M")) { + return Integer.parseInt(text.substring(0, text.length() - 1)); + } else if (text.endsWith("MB")) { + return Integer.parseInt(text.substring(0, text.length() - 2)); + } else { + return 0; + } + } else { + return 0; + } + }, + consumer); + } + + static void asString( + Map payload, + String key, + Map variables, + Consumer consumer) { + as(payload, key, variables, String.class::cast, consumer); + } + + @SuppressWarnings("unchecked") + static Map deserialize(Path path) { + AtomicReference> root = new AtomicReference<>(); + + try (InputStream in = Files.newInputStream(path, StandardOpenOption.READ)) { + root.set((Map) YAML.load(in)); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + asString( + root.get(), + "inherit", + emptyMap(), + inherit -> { + Map inherited = deserialize(path.getParent().resolve(inherit)); + merge(inherited, root.get()); + root.set(inherited); + }); + + return root.get(); + } + + static Object getEmptyNamedObject(List array, String name) { + Map value = new HashMap<>(); + value.put("name", name); + array.add(value); + return value; + } + + static String getName(Map raw) { + return Optional.ofNullable(raw.get("name")) + .map(String.class::cast) + .orElseThrow( + () -> + new IllegalStateException( + "Application does not contain required 'name' value")); + } + + @SuppressWarnings("unchecked") + static Map getNamedObject(List array, String name) { + return (Map) + array.stream() + .filter( + value -> + value instanceof Map + && name.equals( + ((Map) value).get("name"))) + .findFirst() + .orElseGet(() -> getEmptyNamedObject(array, name)); + } + + @SuppressWarnings("unchecked") + static Route getRoute(Map raw, Map variables) { + Route.Builder builder = Route.builder(); + asString(raw, "route", variables, builder::route); + asString( + raw, "protocol", variables, p -> builder.protocol(ManifestV3RouteProtocol.from(p))); + return builder.build(); + } + + @SuppressWarnings("unchecked") + static void merge(Map first, Map second) { + second.forEach( + (key, value) -> + first.merge( + key, + value, + (firstValue, secondValue) -> { + if (secondValue instanceof Map) { + merge( + (Map) firstValue, + (Map) secondValue); + return firstValue; + } else if (secondValue instanceof List) { + merge( + (List) firstValue, + (List) secondValue); + return firstValue; + } else { + return secondValue; + } + })); + } + + @SuppressWarnings("unchecked") + static void merge(List first, List second) { + second.forEach( + element -> { + if (element instanceof Map) { + Object name = ((Map) element).get("name"); + + if (name != null) { + Map named = getNamedObject(first, (String) name); + merge(named, (Map) element); + } else { + first.add(element); + } + } else { + first.add(element); + } + }); + } + + static Function pathToString() { + return path -> Optional.ofNullable(path).map(Path::toString).orElse(null); + } + + static Function protectApplicationHealthCheck() { + return applicationHealthCheck -> + Optional.ofNullable(applicationHealthCheck) + .map(ApplicationHealthCheck::getValue) + .orElse(null); + } + + static void putIfPresent(Map yaml, String key, Object value) { + putIfPresent(yaml, key, value, Function.identity()); + } + + static void putIfPresent( + Map yaml, String key, T value, Function valueMapper) { + Optional.ofNullable(value).map(valueMapper).ifPresent(v -> yaml.put(key, v)); + } + + static List> toRoutesYaml(List routes) { + return routes.stream() + .map( + route -> { + Map yaml = new TreeMap<>(); + yaml.put("route", route.getRoute()); + putIfPresent( + yaml, + "protocol", + route.getProtocol(), + ManifestV3RouteProtocol::getValue); + return yaml; + }) + .collect(Collectors.toList()); + } + + static Map toApplicationYaml(_ApplicationManifestCommon applicationManifest) { + Map yaml = new TreeMap<>(); + + putIfPresent(yaml, "buildpacks", applicationManifest.getBuildpacks()); + putIfPresent(yaml, "command", applicationManifest.getCommand()); + Integer disk = applicationManifest.getDisk(); + if (null != disk) { + putIfPresent(yaml, "disk_quota", applicationManifest.getDisk().toString() + "M"); + } + putIfPresent( + yaml, + "docker", + applicationManifest.getDocker(), + ApplicationManifestUtilsCommon::toDockerYaml); + putIfPresent(yaml, "domains", applicationManifest.getDomains()); + putIfPresent(yaml, "env", applicationManifest.getEnvironmentVariables()); + putIfPresent( + yaml, + "health-check-http-endpoint", + applicationManifest.getHealthCheckHttpEndpoint()); + putIfPresent( + yaml, + "health-check-type", + applicationManifest.getHealthCheckType(), + protectApplicationHealthCheck()); + putIfPresent(yaml, "hosts", applicationManifest.getHosts()); + putIfPresent(yaml, "instances", applicationManifest.getInstances()); + Integer memory = applicationManifest.getMemory(); + if (null != memory) { + putIfPresent(yaml, "memory", memory + "M"); + } + putIfPresent(yaml, "name", applicationManifest.getName()); + putIfPresent(yaml, "no-hostname", applicationManifest.getNoHostname()); + putIfPresent(yaml, "no-route", applicationManifest.getNoRoute()); + putIfPresent(yaml, "path", applicationManifest.getPath(), pathToString()); + putIfPresent(yaml, "random-route", applicationManifest.getRandomRoute()); + putIfPresent(yaml, "route-path", applicationManifest.getRoutePath()); + putIfPresent( + yaml, + "routes", + applicationManifest.getRoutes(), + ApplicationManifestUtilsCommon::toRoutesYaml); + putIfPresent(yaml, "stack", applicationManifest.getStack()); + putIfPresent(yaml, "timeout", applicationManifest.getTimeout()); + + return yaml; + } + + static Map toDockerYaml(Docker docker) { + if (docker == null) return null; + Map yaml = new TreeMap<>(); + putIfPresent(yaml, "image", docker.getImage()); + putIfPresent(yaml, "username", docker.getUsername()); + putIfPresent(yaml, "password", docker.getPassword()); + return yaml; + } + + static List convertCollection(Collection collection, Function converter) { + if (collection == null) return null; + return collection.stream().map(converter).collect(Collectors.toList()); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java new file mode 100644 index 00000000000..da335ae704d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3.java @@ -0,0 +1,381 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static java.util.Collections.emptyMap; +import static java.util.stream.Collectors.toMap; + +import java.io.IOException; +import java.io.OutputStream; +import java.io.OutputStreamWriter; +import java.io.Writer; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.StandardOpenOption; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.TreeMap; +import java.util.regex.Pattern; +import java.util.stream.Stream; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.processes.HealthCheckType; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; +import org.yaml.snakeyaml.DumperOptions; +import org.yaml.snakeyaml.Yaml; +import reactor.core.Exceptions; + +/** + * Utilities for dealing with {@link ManifestV3}s. Includes the functionality to transform to and from standard CLI YAML files. + */ +public final class ApplicationManifestUtilsV3 extends ApplicationManifestUtilsCommon { + private static final Yaml YAML; + + static { + DumperOptions dumperOptions = new DumperOptions(); + dumperOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK); + dumperOptions.setExplicitStart(true); + + YAML = new Yaml(dumperOptions); + } + + private static final Pattern FIND_VARIABLE_REGEX = + Pattern.compile("\\(\\(([a-zA-Z]\\w+)\\)\\)"); + + private ApplicationManifestUtilsV3() {} + + /** + * Reads a YAML manifest file (defined by the CC API) from a {@link Path} and converts it into a {@link + * ManifestV3} object. Note that all resolution (both inheritance and common) is performed during read. + * + * @param path the path to read from + * @return the resolved manifest + */ + public static ManifestV3 read(Path path) { + return doRead(path.toAbsolutePath(), emptyMap()); + } + + /** + * Reads a YAML manifest file (defined by the CC API) from a {@link Path} and converts it into a {@link + * ManifestV3} object. Note that all resolution (both inheritance and common) is performed during read. + * + * @param path the path to read from + * @param variablesPath use variable substitution (described in Add Variables to a Manifest) + * @return the resolved manifest + */ + public static ManifestV3 read(Path path, Path variablesPath) { + Map variables = + deserialize(variablesPath.toAbsolutePath()).entrySet().stream() + .collect(toMap(Map.Entry::getKey, e -> String.valueOf(e.getValue()))); + + return doRead(path.toAbsolutePath(), variables); + } + + /** + * Write a {@link ManifestV3} to a {@link Path} + * + * @param path the path to write to + * @param manifest the manifest to write + */ + public static void write(Path path, ManifestV3 manifest) { + try (OutputStream out = + Files.newOutputStream(path, StandardOpenOption.CREATE, StandardOpenOption.WRITE)) { + write(out, manifest); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + /** + * Write a {@link ManifestV3} to an {@link OutputStream} + * + * @param out the {@link OutputStream} to write to + * @param manifest the manifest to write + */ + public static void write(OutputStream out, ManifestV3 manifest) { + try (Writer writer = new OutputStreamWriter(out)) { + YAML.dump(toYaml(manifest), writer); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + @SuppressWarnings("unchecked") + private static ManifestV3 doRead(Path path, Map variables) { + Map root = deserialize(path); + + ManifestV3.Builder builder = ManifestV3.builder(); + asInteger(root, "version", variables, builder::version); + + ManifestV3Application template = getTemplate(path, root, variables); + Optional.ofNullable(root.get("applications")) + .map(value -> ((List>) value).stream()) + .orElseGet(Stream::empty) + .map( + application -> { + String name = getName(application); + return toApplicationManifest( + application, + variables, + ManifestV3Application.builder().from(template), + path) + .name(name) + .build(); + }) + .forEach(builder::application); + return builder.build(); + } + + private static ManifestV3Application getTemplate( + Path path, Map root, Map variables) { + return toApplicationManifest(root, variables, ManifestV3Application.builder(), path) + .name("template") + .build(); + } + + @SuppressWarnings("unchecked") + private static ManifestV3Application.Builder toApplicationManifest( + Map application, + Map variables, + ManifestV3Application.Builder builder, + Path root) { + toApplicationManifestCommon(application, variables, builder, root); + + asList( + application, + "processes", + variables, + raw -> getProcess((Map) raw, variables), + builder::processe); + asList( + application, + "services", + variables, + raw -> getService(raw, variables), + builder::service); + asList( + application, + "sidecars", + variables, + raw -> getSidecar((Map) raw, variables), + builder::sidecar); + + as( + application, + "metadata", + variables, + raw -> getMetadata((Map) raw, variables), + builder::metadata); + + asBoolean(application, "default-route", variables, builder::defaultRoute); + + return builder; + } + + private static ManifestV3Sidecar getSidecar( + Map raw, Map variables) { + ManifestV3Sidecar.Builder builder = ManifestV3Sidecar.builder(); + + asString(raw, "name", variables, builder::name); + asString(raw, "command", variables, builder::command); + asListOfString(raw, "process_types", variables, builder::processType); + asInteger(raw, "memory", variables, builder::memory); + + return builder.build(); + } + + private static ManifestV3Process getProcess( + Map raw, Map variables) { + ManifestV3Process.Builder builder = ManifestV3Process.builder(); + + asString(raw, "type", variables, builder::type); + asString(raw, "command", variables, builder::command); + asString(raw, "disk_quota", variables, builder::disk); + asString(raw, "health-check-http-endpoint", variables, builder::healthCheckHttpEndpoint); + asInteger( + raw, + "health-check-invocation-timeout", + variables, + builder::healthCheckInvocationTimeout); + as( + raw, + "health-check-type", + variables, + s -> HealthCheckType.from((String) s), + builder::healthCheckType); + asString( + raw, + "readiness-health-check-http-endpoint", + variables, + builder::readinessHealthCheckHttpEndpoint); + asInteger( + raw, + "readiness-health-check-invocation-timeout", + variables, + builder::readinessHealthCheckInvocationTimeout); + asInteger( + raw, + "readiness-health-check-interval", + variables, + builder::readinessHealthCheckInterval); + as( + raw, + "readiness-health-check-type", + variables, + s -> ReadinessHealthCheckType.from((String) s), + builder::readinessHealthCheckType); + asInteger(raw, "instances", variables, builder::instances); + asString(raw, "memory", variables, builder::memory); + asInteger(raw, "timeout", variables, builder::timeout); + + return builder.build(); + } + + private static ManifestV3Service getService(Object raw, Map variables) { + ManifestV3Service.Builder builder = ManifestV3Service.builder(); + if (raw instanceof String) { + builder.name((String) raw); + } else if (raw instanceof Map) { + @SuppressWarnings("unchecked") + Map map = (Map) raw; + + asString(map, "name", variables, builder::name); + asString(map, "bindingName", variables, builder::bindingName); + builder.parameters((map).get("parameters")); + } + return builder.build(); + } + + private static Metadata getMetadata(Map raw, Map variables) { + + if (raw == null) return null; + + Map labels = new HashMap<>(); + Map annotations = new HashMap<>(); + + asMap(raw, "labels", variables, String.class::cast, labels::put); + + asMap(raw, "annotations", variables, String.class::cast, annotations::put); + + if (labels.isEmpty() && annotations.isEmpty()) { + return null; + } + + Metadata.Builder builder = Metadata.builder(); + if (!labels.isEmpty()) { + builder.labels(labels); + } + if (!annotations.isEmpty()) { + builder.annotations(annotations); + } + return builder.build(); + } + + private static Map toYaml(ManifestV3 manifest) { + Map yaml = new TreeMap<>(); + yaml.put("version", manifest.getVersion()); + yaml.put( + "applications", + convertCollection( + manifest.getApplications(), ApplicationManifestUtilsV3::toApplicationYaml)); + return yaml; + } + + private static Map toApplicationYaml(ManifestV3Application application) { + Map yaml = ApplicationManifestUtilsCommon.toApplicationYaml(application); + + putIfPresent( + yaml, + "processes", + convertCollection( + application.getProcesses(), ApplicationManifestUtilsV3::toProcessYaml)); + putIfPresent(yaml, "default-route", application.getDefaultRoute()); + putIfPresent( + yaml, + "services", + convertCollection( + application.getServices(), ApplicationManifestUtilsV3::toServiceYaml)); + putIfPresent( + yaml, + "sidecars", + convertCollection( + application.getSidecars(), ApplicationManifestUtilsV3::toSidecarsYaml)); + + putIfPresent(yaml, "metadata", toMetadataYaml(application.getMetadata())); + return yaml; + } + + private static Map toSidecarsYaml(ManifestV3Sidecar sidecar) { + if (sidecar == null) return null; + Map yaml = new TreeMap<>(); + putIfPresent(yaml, "name", sidecar.getName()); + putIfPresent(yaml, "command", sidecar.getCommand()); + putIfPresent(yaml, "process_types", sidecar.getProcessTypes()); + putIfPresent(yaml, "memory", sidecar.getMemory()); + return yaml; + } + + private static Map toServiceYaml(ManifestV3Service service) { + if (service == null) return null; + Map yaml = new TreeMap<>(); + putIfPresent(yaml, "name", service.getName()); + putIfPresent(yaml, "binding_name", service.getBindingName()); + putIfPresent(yaml, "parameters", service.getParameters()); + return yaml; + } + + private static Map toProcessYaml(ManifestV3Process process) { + if (process == null) return null; + Map yaml = new TreeMap<>(); + putIfPresent(yaml, "type", process.getType()); + putIfPresent(yaml, "command", process.getCommand()); + putIfPresent(yaml, "disk_quota", process.getDisk()); + putIfPresent(yaml, "health-check-http-endpoint", process.getHealthCheckHttpEndpoint()); + putIfPresent( + yaml, "health-check-invocation-timeout", process.getHealthCheckInvocationTimeout()); + putIfPresent( + yaml, "health-check-type", process.getHealthCheckType(), HealthCheckType::getValue); + putIfPresent( + yaml, + "readiness-health-check-type", + process.getReadinessHealthCheckType(), + ReadinessHealthCheckType::getValue); + putIfPresent( + yaml, + "readiness-health-check-http-endpoint", + process.getReadinessHealthCheckHttpEndpoint()); + putIfPresent( + yaml, + "readiness-health-check-invocation-timeout", + process.getReadinessHealthCheckInvocationTimeout()); + putIfPresent( + yaml, "readiness-health-check-interval", process.getReadinessHealthCheckInterval()); + putIfPresent(yaml, "instances", process.getInstances()); + putIfPresent(yaml, "memory", process.getMemory()); + putIfPresent(yaml, "timeout", process.getTimeout()); + return yaml; + } + + private static Map toMetadataYaml(Metadata metadata) { + if (metadata == null) return null; + Map map = new HashMap<>(); + putIfPresent(map, "labels", metadata.getLabels()); + putIfPresent(map, "annotations", metadata.getAnnotations()); + return map.isEmpty() ? null : map; + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/Applications.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/Applications.java new file mode 100644 index 00000000000..5196fef6c87 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/Applications.java @@ -0,0 +1,266 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.doppler.LogMessage; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Applications Operations API + */ +public interface Applications { + + /** + * Copy the source code from this application to another. + * + * @param request the copy source application request + * @return a completion indicator + */ + Mono copySource(CopySourceApplicationRequest request); + + /** + * Deletes a specific application and, optionally, all routes mapped to the application. + *

          + * Warning: deleting routes mapped to the application deletes them even if they are mapped to other applications. + * + * @param request the delete application request + * @return a completion indicator + */ + Mono delete(DeleteApplicationRequest request); + + /** + * Disable SSH for a specific application + * + * @param request the disable application ssh request + * @return a completion indicator + */ + Mono disableSsh(DisableApplicationSshRequest request); + + /** + * Enable SSH for a specific application + * + * @param request the enable application ssh request + * @return a completion indicator + */ + Mono enableSsh(EnableApplicationSshRequest request); + + /** + * Gets information for a specific application + * + * @param request the get application request + * @return the application + */ + Mono get(GetApplicationRequest request); + + /** + * Gets the manifest for a specific application + * + * @param request the get application manifest request + * @return the application manifest + */ + Mono getApplicationManifest(GetApplicationManifestRequest request); + + /** + * Gets the environment variables for an application + * + * @param request the get application environments request + * @return the application environments + */ + Mono getEnvironments(GetApplicationEnvironmentsRequest request); + + /** + * Gets recent events of an application. + * + * @param request the get application events request + * @return the events + */ + Flux getEvents(GetApplicationEventsRequest request); + + /** + * Retrieve the Health Check Type of an application + * + * @param request the get health check request + * @return the health check + */ + Mono getHealthCheck(GetApplicationHealthCheckRequest request); + + /** + * Lists the applications + * + * @return the applications + */ + Flux list(); + + /** + * Lists the tasks for an application + * + * @param request the list tasks request + * @return the tasks + */ + Flux listTasks(ListApplicationTasksRequest request); + + /** + * List the applications logs. Uses Doppler under the hood. + * Only works with {@code Loggregator < 107.0}, shipped in {@code CFD < 24.3} + * and {@code TAS < 4.0}. + * + * @param request the application logs request + * @return the applications logs + * @deprecated Use {@link #logs(ApplicationLogsRequest)} instead. + */ + @Deprecated + Flux logs(LogsRequest request); + + /** + * List the applications logs. + * Only works with {@code Loggregator < 107.0}, shipped in {@code CFD < 24.3} + * and {@code TAS < 4.0}. + * + * @param request the application logs request + * @return the applications logs + */ + Flux logs(ApplicationLogsRequest request); + + /** + * Push a specific application + * + * @param request the push application request + * @return a completion indicator + */ + Mono push(PushApplicationRequest request); + + /** + * Push a manifest + * + * @param request the push manifest request + * @return a completion indicator + */ + Mono pushManifest(PushApplicationManifestRequest request); + + /** + * Push a manifest using the V3 API + * + * @param request the push manifest V3 request + * @return a completion indicator + */ + Mono pushManifestV3(PushManifestV3Request request); + + /** + * Rename a specific application + * + * @param request the rename application request + * @return a completion indicator + */ + Mono rename(RenameApplicationRequest request); + + /** + * Restarts a specific application + * + * @param request the restart application request + * @return a completion indicator + */ + Mono restage(RestageApplicationRequest request); + + /** + * Restarts a specific application + * + * @param request the restart application request + * @return a completion indicator + */ + Mono restart(RestartApplicationRequest request); + + /** + * Restart a specific application instance + * + * @param request the restart application instance request + * @return a completion indicator + */ + Mono restartInstance(RestartApplicationInstanceRequest request); + + /** + * Run a one-off task on an application + * + * @param request the run task request + * @return the task + */ + Mono runTask(RunApplicationTaskRequest request); + + /** + * Terminate a running task of an application + * + * @param request the terminate task request + * @return a completion indicator + */ + Mono terminateTask(TerminateApplicationTaskRequest request); + + /** + * Scales a specific application + * + * @param request the scale application request + * @return a completion indicator + */ + Mono scale(ScaleApplicationRequest request); + + /** + * Set an environment variable of an application + * + * @param request the set environment variable request + * @return a completion indicator + */ + Mono setEnvironmentVariable(SetEnvironmentVariableApplicationRequest request); + + /** + * Set the Health Check Type of an application + * + * @param request the set health check request + * @return a completion indicator + */ + Mono setHealthCheck(SetApplicationHealthCheckRequest request); + + /** + * Check if SSH is enabled for a specific application + * + * @param request the check application ssh enabled request + * @return Boolean is ssh enabled on the application + */ + Mono sshEnabled(ApplicationSshEnabledRequest request); + + /** + * Starts a specific application or, if the application is already started, simply returns. + * + * @param request the start application request + * @return a completion indicator + */ + Mono start(StartApplicationRequest request); + + /** + * Stops a specific application or, if the application is already stopped, simply returns. + * + * @param request the stop application request + * @return a completion indicator + */ + Mono stop(StopApplicationRequest request); + + /** + * Unset an environment variable of an application + * + * @param request the unset environment variable request + * @return a completion indicator + */ + Mono unsetEnvironmentVariable(UnsetEnvironmentVariableApplicationRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java new file mode 100644 index 00000000000..e51ddbb472f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/DefaultApplications.java @@ -0,0 +1,3407 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.cloudfoundry.client.v3.LifecycleType.BUILDPACK; +import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; +import static org.cloudfoundry.util.tuple.TupleUtils.function; +import static org.cloudfoundry.util.tuple.TupleUtils.predicate; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.time.Duration; +import java.util.Collections; +import java.util.Comparator; +import java.util.Date; +import java.util.EnumSet; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Objects; +import java.util.Optional; +import java.util.function.BiFunction; +import java.util.function.Predicate; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.OrderDirection; +import org.cloudfoundry.client.v2.applications.AbstractApplicationResource; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationInstanceInfo; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesResponse; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsRequest; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsResponse; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.CopyApplicationRequest; +import org.cloudfoundry.client.v2.applications.CopyApplicationResponse; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.applications.DockerCredentials; +import org.cloudfoundry.client.v2.applications.InstanceStatistics; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationServiceBindingRequest; +import org.cloudfoundry.client.v2.applications.RestageApplicationResponse; +import org.cloudfoundry.client.v2.applications.Statistics; +import org.cloudfoundry.client.v2.applications.SummaryApplicationRequest; +import org.cloudfoundry.client.v2.applications.SummaryApplicationResponse; +import org.cloudfoundry.client.v2.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationResponse; +import org.cloudfoundry.client.v2.applications.Usage; +import org.cloudfoundry.client.v2.events.EventEntity; +import org.cloudfoundry.client.v2.events.EventResource; +import org.cloudfoundry.client.v2.events.ListEventsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainEntity; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v2.routes.DeleteRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstance; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainEntity; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.SpaceApplicationSummary; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.stacks.GetStackRequest; +import org.cloudfoundry.client.v2.stacks.GetStackResponse; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.stacks.StackResource; +import org.cloudfoundry.client.v3.BuildpackData; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.Resource; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.applications.ApplicationFeature; +import org.cloudfoundry.client.v3.applications.ApplicationResource; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationProcessesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureRequest; +import org.cloudfoundry.client.v3.builds.BuildState; +import org.cloudfoundry.client.v3.builds.CreateBuildRequest; +import org.cloudfoundry.client.v3.builds.CreateBuildResponse; +import org.cloudfoundry.client.v3.builds.GetBuildRequest; +import org.cloudfoundry.client.v3.builds.GetBuildResponse; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.domains.ListDomainsRequest; +import org.cloudfoundry.client.v3.packages.BitsData; +import org.cloudfoundry.client.v3.packages.CreatePackageRequest; +import org.cloudfoundry.client.v3.packages.CreatePackageResponse; +import org.cloudfoundry.client.v3.packages.DockerData; +import org.cloudfoundry.client.v3.packages.GetPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageResponse; +import org.cloudfoundry.client.v3.packages.PackageRelationships; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.packages.UploadPackageRequest; +import org.cloudfoundry.client.v3.processes.GetProcessStatisticsRequest; +import org.cloudfoundry.client.v3.processes.GetProcessStatisticsResponse; +import org.cloudfoundry.client.v3.processes.ProcessState; +import org.cloudfoundry.client.v3.processes.ProcessStatisticsResource; +import org.cloudfoundry.client.v3.resourcematch.MatchedResource; +import org.cloudfoundry.client.v3.spaces.ApplyManifestRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskResponse; +import org.cloudfoundry.client.v3.tasks.CreateTaskRequest; +import org.cloudfoundry.client.v3.tasks.CreateTaskResponse; +import org.cloudfoundry.client.v3.tasks.TaskResource; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.doppler.Envelope; +import org.cloudfoundry.doppler.EventType; +import org.cloudfoundry.doppler.LogMessage; +import org.cloudfoundry.doppler.RecentLogsRequest; +import org.cloudfoundry.doppler.StreamRequest; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.DateUtils; +import org.cloudfoundry.util.DelayTimeoutException; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.FileUtils; +import org.cloudfoundry.util.FluentMap; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceMatchingUtils; +import org.cloudfoundry.util.ResourceMatchingUtilsV3; +import org.cloudfoundry.util.ResourceUtils; +import org.cloudfoundry.util.SortingUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuple5; +import reactor.util.function.Tuples; + +public final class DefaultApplications implements Applications { + + private static final int CF_APP_STOPPED_STATS_ERROR = 200003; + + private static final int CF_BUILDPACK_COMPILED_FAILED = 170004; + + private static final int CF_INSTANCES_ERROR = 220001; + + private static final int CF_SERVICE_ALREADY_BOUND = 90003; + + private static final int CF_STAGING_ERROR = 170001; + + private static final int CF_STAGING_NOT_FINISHED = 170002; + + private static final int CF_STAGING_TIME_EXPIRED = 170007; + + private static final int CF_INSUFFICIENT_RESOURCES = 170008; + + private static final String[] ENTRY_FIELDS_CRASH = {"index", "reason", "exit_description"}; + + private static final String[] ENTRY_FIELDS_NORMAL = { + "instances", "memory", "state", "environment_json" + }; + + private static final Comparator LOG_MESSAGE_COMPARATOR = + Comparator.comparing(LogMessage::getTimestamp); + + private static final Duration LOG_MESSAGE_TIMESPAN = Duration.ofMillis(500); + + private static final int MAX_NUMBER_OF_RECENT_EVENTS = 50; + + private static final String STARTED_STATE = "STARTED"; + + private static final String STOPPED_STATE = "STOPPED"; + + private static final String APP_FEATURE_SSH = "ssh"; + + private final Mono cloudFoundryClient; + + private final Mono dopplerClient; + + private final RandomWords randomWords; + + private final Mono spaceId; + + public DefaultApplications( + Mono cloudFoundryClient, + Mono dopplerClient, + Mono spaceId) { + this(cloudFoundryClient, dopplerClient, new WordListRandomWords(), spaceId); + } + + DefaultApplications( + Mono cloudFoundryClient, + Mono dopplerClient, + RandomWords randomWords, + Mono spaceId) { + this.cloudFoundryClient = cloudFoundryClient; + this.dopplerClient = dopplerClient; + this.randomWords = randomWords; + this.spaceId = spaceId; + } + + @Override + public Mono copySource(CopySourceApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId), + getApplicationIdFromOrgSpace( + cloudFoundryClient, + request.getTargetName(), + spaceId, + request.getTargetOrganization(), + request.getTargetSpace())))) + .flatMap( + function( + (cloudFoundryClient, sourceApplicationId, targetApplicationId) -> + copyBits( + cloudFoundryClient, + request.getStagingTimeout(), + sourceApplicationId, + targetApplicationId) + .thenReturn( + Tuples.of( + cloudFoundryClient, + targetApplicationId)))) + .filter( + predicate( + (cloudFoundryClient, targetApplicationId) -> + Optional.ofNullable(request.getRestart()).orElse(false))) + .flatMap( + function( + (cloudFoundryClient, targetApplicationId) -> + restartApplication( + cloudFoundryClient, + request.getTargetName(), + targetApplicationId, + request.getStagingTimeout(), + request.getStartupTimeout()))) + .transform(OperationsLogging.log("Copy Application Source")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + getRoutesAndApplicationId( + cloudFoundryClient, + request, + spaceId, + Optional.ofNullable( + request.getDeleteRoutes()) + .orElse(false)) + .map( + function( + (routes, applicationId) -> + Tuples.of( + cloudFoundryClient, + routes, + applicationId))))) + .flatMap( + function( + (cloudFoundryClient, routes, applicationId) -> + deleteRoutes( + cloudFoundryClient, + request.getCompletionTimeout(), + routes) + .thenReturn( + Tuples.of( + cloudFoundryClient, + applicationId)))) + .delayUntil(function(DefaultApplications::removeServiceBindings)) + .flatMap(function(DefaultApplications::requestDeleteApplication)) + .transform(OperationsLogging.log("Delete Application")) + .checkpoint(); + } + + @Override + public Mono disableSsh(DisableApplicationSshRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(applicationId), + getSshEnabled(cloudFoundryClient, applicationId)))) + .filter( + predicate( + (cloudFoundryClient, applicationId, sshEnabled) -> + sshEnabled.equals(true))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + requestUpdateApplicationSsh( + cloudFoundryClient, applicationId, false))) + .then() + .transform(OperationsLogging.log("Disable Application SSH")) + .checkpoint(); + } + + @Override + public Mono enableSsh(EnableApplicationSshRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(applicationId), + getSshEnabled(cloudFoundryClient, applicationId)))) + .filter( + predicate( + (cloudFoundryClient, applicationId, sshEnabled) -> + sshEnabled.equals(false))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + requestUpdateApplicationSsh( + cloudFoundryClient, applicationId, true))) + .then() + .transform(OperationsLogging.log("Enable Application SSH")) + .checkpoint(); + } + + @Override + public Mono get(GetApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplication( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap(function(DefaultApplications::getAuxiliaryContent)) + .map(function(DefaultApplications::toApplicationDetail)) + .transform(OperationsLogging.log("Get Application")) + .checkpoint(); + } + + @Override + public Mono getApplicationManifest(GetApplicationManifestRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(applicationId), + requestApplicationSummary( + cloudFoundryClient, applicationId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId, response) -> + Mono.zip( + getApplicationBuildpacks( + cloudFoundryClient, applicationId), + Mono.just(response), + getStackName( + cloudFoundryClient, + response.getStackId())))) + .flatMap(function(DefaultApplications::toApplicationManifest)) + .transform(OperationsLogging.log("Get Application Manifest")) + .checkpoint(); + } + + @Override + public Mono getEnvironments( + GetApplicationEnvironmentsRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap(function(DefaultApplications::requestApplicationEnvironment)) + .map(DefaultApplications::toApplicationEnvironments) + .transform(OperationsLogging.log("Get Application Environments")) + .checkpoint(); + } + + @Override + public Flux getEvents(GetApplicationEventsRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMapMany( + function( + (cloudFoundryClient, applicationId) -> + requestEvents(applicationId, cloudFoundryClient) + .take( + Optional.ofNullable( + request + .getMaxNumberOfEvents()) + .orElse( + MAX_NUMBER_OF_RECENT_EVENTS)))) + .map(DefaultApplications::convertToApplicationEvent) + .transform(OperationsLogging.log("Get Application Events")) + .checkpoint(); + } + + @Override + public Mono getHealthCheck(GetApplicationHealthCheckRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + getApplication( + cloudFoundryClient, request.getName(), spaceId))) + .map(DefaultApplications::toHealthCheck) + .transform(OperationsLogging.log("Get Application Health Check")) + .checkpoint(); + } + + @Override + public Flux list() { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap(function(DefaultApplications::requestSpaceSummary)) + .flatMapMany(DefaultApplications::extractApplications) + .map(DefaultApplications::toApplicationSummary) + .transform(OperationsLogging.log("List Applications")) + .checkpoint(); + } + + @Override + public Flux listTasks(ListApplicationTasksRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMapMany( + function( + (cloudFoundryClient, applicationId) -> + requestListTasks(cloudFoundryClient, applicationId))) + .map(DefaultApplications::toTask) + .transform(OperationsLogging.log("List Application Tasks")) + .checkpoint(); + } + + @Override + public Flux logs(LogsRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + getApplicationId( + cloudFoundryClient, request.getName(), spaceId))) + .flatMapMany( + applicationId -> + getLogs(this.dopplerClient, applicationId, request.getRecent())) + .transform(OperationsLogging.log("Get Application Logs")) + .checkpoint(); + } + + @Override + public Flux logs(ApplicationLogsRequest request) { + return logs(LogsRequest.builder() + .name(request.getName()) + .recent(request.getRecent()) + .build()) + .map( + logMessage -> + ApplicationLog.builder() + .sourceId(logMessage.getApplicationId()) + .sourceType(logMessage.getSourceType()) + .instanceId(logMessage.getSourceInstance()) + .message(logMessage.getMessage()) + .timestamp(logMessage.getTimestamp()) + .logType( + ApplicationLogType.from( + logMessage.getMessageType().name())) + .build()); + } + + @Override + @SuppressWarnings("deprecation") + public Mono push(PushApplicationRequest request) { + ApplicationManifest.Builder builder = + ApplicationManifest.builder() + .buildpacks(request.getBuildpacks()) + .command(request.getCommand()) + .disk(request.getDiskQuota()) + .docker( + Docker.builder() + .image(request.getDockerImage()) + .password(request.getDockerPassword()) + .username(request.getDockerUsername()) + .build()) + .healthCheckHttpEndpoint(request.getHealthCheckHttpEndpoint()) + .healthCheckType(request.getHealthCheckType()) + .instances(request.getInstances()) + .memory(request.getMemory()) + .name(request.getName()) + .noHostname(request.getNoHostname()) + .noRoute(request.getNoRoute()) + .path( + Optional.ofNullable(request.getPath()) + .orElse(request.getApplication())) + .randomRoute(request.getRandomRoute()) + .routePath(request.getRoutePath()) + .stack(request.getStack()) + .timeout(request.getTimeout()); + + Optional.ofNullable(request.getDomain()).ifPresent(builder::domain); + + Optional.ofNullable(request.getHost()).ifPresent(builder::host); + + return pushManifest( + PushApplicationManifestRequest.builder() + .manifest(builder.build()) + .dockerPassword(request.getDockerPassword()) + .dockerUsername(request.getDockerUsername()) + .noStart(request.getNoStart()) + .stagingTimeout(request.getStagingTimeout()) + .startupTimeout(request.getStartupTimeout()) + .build()) + .transform(OperationsLogging.log("Push")) + .checkpoint(); + } + + @Override + public Mono pushManifest(PushApplicationManifestRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceOrganizationId(cloudFoundryClient, spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + listAvailableDomains( + cloudFoundryClient, organizationId), + Mono.just(spaceId)))) + .flatMapMany( + function( + (cloudFoundryClient, availableDomains, spaceId) -> + Flux.fromIterable(request.getManifests()) + .flatMap( + manifest -> { + if (manifest.getPath() != null) { + return pushApplication( + cloudFoundryClient, + availableDomains, + manifest, + this.randomWords, + request, + spaceId); + } else if (!manifest.getDocker() + .getImage() + .isEmpty()) { + return pushDocker( + cloudFoundryClient, + availableDomains, + manifest, + this.randomWords, + request, + spaceId); + } else { + throw new IllegalStateException( + "One of application or" + + " dockerImage must be" + + " supplied"); + } + }))) + .then() + .transform(OperationsLogging.log("Push Manifest")) + .checkpoint(); + } + + @Override + public Mono pushManifestV3(PushManifestV3Request request) { + byte[] manifestSerialized; + try (ByteArrayOutputStream baos = new ByteArrayOutputStream()) { + ApplicationManifestUtilsV3.write(baos, request.getManifest()); + manifestSerialized = baos.toByteArray(); + } catch (IOException e) { + throw new RuntimeException("Could not serialize manifest", e); + } + + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + applyManifestAndWaitForCompletion( + cloudFoundryClient, + spaceId, + manifestSerialized) + .then( + Mono.just( + Tuples.of( + cloudFoundryClient, + spaceId))))) + .flatMapMany( + function( + (cloudFoundryClient, spaceId) -> + Flux.fromIterable(request.getManifest().getApplications()) + .map( + manifestApp -> + Tuples.of( + cloudFoundryClient, + spaceId, + manifestApp)))) + .flatMap( + function( + (cloudFoundryClient, spaceId, manifestApp) -> + getApplicationIdV3( + cloudFoundryClient, + manifestApp.getName(), + spaceId) + .flatMap( + appId -> + Mono.zip( + Mono.just(appId), + createPackage( + cloudFoundryClient, + appId, + manifestApp))) + .flatMap( + function( + (appId, packageId) -> + buildAndStageAndWaitForRunning( + cloudFoundryClient, + manifestApp, + packageId, + appId))))) + .then(); + } + + @Override + public Mono rename(RenameApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + requestUpdateApplicationName( + cloudFoundryClient, + applicationId, + request.getNewName()))) + .then() + .transform(OperationsLogging.log("Rename Application")) + .checkpoint(); + } + + @Override + public Mono restage(RestageApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + restageApplication( + cloudFoundryClient, + request.getName(), + applicationId, + request.getStagingTimeout(), + request.getStartupTimeout()))) + .transform(OperationsLogging.log("Restage Application")) + .checkpoint(); + } + + @Override + public Mono restart(RestartApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplication( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + Mono.zip( + Mono.just(cloudFoundryClient), + stopApplicationIfNotStopped( + cloudFoundryClient, resource)))) + .flatMap( + function( + (cloudFoundryClient, stoppedApplication) -> + startApplicationAndWait( + cloudFoundryClient, + request.getName(), + ResourceUtils.getId(stoppedApplication), + request.getStagingTimeout(), + request.getStartupTimeout()))) + .transform(OperationsLogging.log("Restart Application")) + .checkpoint(); + } + + @Override + public Mono restartInstance(RestartApplicationInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + requestTerminateApplicationInstance( + cloudFoundryClient, + applicationId, + String.valueOf(request.getInstanceIndex())))) + .transform(OperationsLogging.log("Restart Application Instance")) + .checkpoint(); + } + + @Override + public Mono runTask(RunApplicationTaskRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getApplicationName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + requestCreateTask( + cloudFoundryClient, applicationId, request))) + .map(DefaultApplications::toTask) + .transform(OperationsLogging.log("Run Application Task Instance")) + .checkpoint(); + } + + @Override + public Mono scale(ScaleApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .filter(predicate((cloudFoundryClient, spaceId) -> areModifiersPresent(request))) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + requestUpdateApplicationScale( + cloudFoundryClient, + applicationId, + request.getDiskLimit(), + request.getInstances(), + request.getMemoryLimit())))) + .filter( + predicate( + (cloudFoundryClient, resource) -> + isRestartRequired(request, resource))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + restartApplication( + cloudFoundryClient, + request.getName(), + ResourceUtils.getId(resource), + request.getStagingTimeout(), + request.getStartupTimeout()))) + .transform(OperationsLogging.log("Scale Application")) + .checkpoint(); + } + + @Override + public Mono setEnvironmentVariable(SetEnvironmentVariableApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplication( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + requestUpdateApplicationEnvironment( + cloudFoundryClient, + ResourceUtils.getId(resource), + addToEnvironment( + getEnvironment(resource), + request.getVariableName(), + request.getVariableValue())))) + .then() + .transform(OperationsLogging.log("Set Application Environment Variable")) + .checkpoint(); + } + + @Override + public Mono setHealthCheck(SetApplicationHealthCheckRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + requestUpdateApplicationHealthCheckType( + cloudFoundryClient, + applicationId, + request.getType()))) + .then() + .transform(OperationsLogging.log("Set Application Health Check")) + .checkpoint(); + } + + @Override + public Mono sshEnabled(ApplicationSshEnabledRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap(function(DefaultApplications::getSshEnabled)) + .transform(OperationsLogging.log("Is Application SSH Enabled")) + .checkpoint(); + } + + private static Mono getSshEnabled( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .getSshEnabled( + GetApplicationSshEnabledRequest.builder() + .applicationId(applicationId) + .build()) + .map(GetApplicationSshEnabledResponse::getEnabled); + } + + @Override + public Mono start(StartApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdWhere( + cloudFoundryClient, + request.getName(), + spaceId, + isNotIn(STARTED_STATE))))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + startApplicationAndWait( + cloudFoundryClient, + request.getName(), + applicationId, + request.getStagingTimeout(), + request.getStartupTimeout()))) + .transform(OperationsLogging.log("Start Application")) + .checkpoint(); + } + + @Override + public Mono stop(StopApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdWhere( + cloudFoundryClient, + request.getName(), + spaceId, + isNotIn(STOPPED_STATE))))) + .flatMap(function(DefaultApplications::stopApplication)) + .then() + .transform(OperationsLogging.log("Stop Application")) + .checkpoint(); + } + + @Override + public Mono terminateTask(TerminateApplicationTaskRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationIdV3( + cloudFoundryClient, + request.getApplicationName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getTaskId( + cloudFoundryClient, + applicationId, + request.getSequenceId())))) + .flatMap(function(DefaultApplications::requestTerminateTask)) + .then() + .transform(OperationsLogging.log("Terminate Application Task Instance")) + .checkpoint(); + } + + @Override + public Mono unsetEnvironmentVariable(UnsetEnvironmentVariableApplicationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplication( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + requestUpdateApplicationEnvironment( + cloudFoundryClient, + ResourceUtils.getId(resource), + removeFromEnvironment( + getEnvironment(resource), + request.getVariableName())))) + .then() + .transform(OperationsLogging.log("Unset Application Environment Variable")) + .checkpoint(); + } + + private static Map addToEnvironment( + Map environment, String variableName, Object variableValue) { + return FluentMap.builder() + .entries(environment) + .entry(variableName, variableValue) + .build(); + } + + private static Mono applyDropletAndWaitForRunning( + CloudFoundryClient cloudFoundryClient, String appname, String appId, String dropletId) { + return cloudFoundryClient + .applicationsV3() + .setCurrentDroplet( + SetApplicationCurrentDropletRequest.builder() + .applicationId(appId) + .data(Relationship.builder().id(dropletId).build()) + .build()) + .then( + cloudFoundryClient + .applicationsV3() + .restart( + org.cloudfoundry.client.v3.applications + .RestartApplicationRequest.builder() + .applicationId(appId) + .build())) + .then(waitForRunningV3(cloudFoundryClient, appname, appId, null)); + } + + private static Mono applyManifestAndWaitForCompletion( + CloudFoundryClient cloudFoundryClient, String spaceId, byte[] manifestSerialized) { + return cloudFoundryClient + .spacesV3() + .applyManifest( + ApplyManifestRequest.builder() + .manifest(manifestSerialized) + .spaceId(spaceId) + .build()) + .map( + response -> + response.getJobId() + .orElseThrow( + () -> + new IllegalStateException( + "No jobId returned for applying v3" + + " manifest"))) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), jobId)); + } + + private static boolean areModifiersPresent(ScaleApplicationRequest request) { + return request.getMemoryLimit() != null + || request.getDiskLimit() != null + || request.getInstances() != null; + } + + private static Flux associateDefaultDomain( + CloudFoundryClient cloudFoundryClient, + String applicationId, + List availableDomains, + ApplicationManifest manifest, + RandomWords randomWords, + String spaceId) { + return getDefaultDomainId(cloudFoundryClient) + .flatMapMany( + domainId -> + getPushRouteIdFromDomain( + cloudFoundryClient, + availableDomains, + domainId, + manifest, + randomWords, + spaceId)) + .flatMap( + routeId -> + requestAssociateRoute(cloudFoundryClient, applicationId, routeId)) + .map(ResourceUtils::getId); + } + + private static Mono bindServices( + CloudFoundryClient cloudFoundryClient, + String applicationId, + ApplicationManifest manifest, + String spaceId) { + if (manifest.getServices() == null || manifest.getServices().size() == 0) { + return Mono.empty(); + } + + return Flux.fromIterable(manifest.getServices()) + .flatMap( + serviceInstanceName -> + getServiceId(cloudFoundryClient, serviceInstanceName, spaceId)) + .flatMap( + serviceInstanceId -> + requestCreateServiceBinding( + cloudFoundryClient, + applicationId, + serviceInstanceId) + .onErrorResume( + ExceptionUtils.statusCode(CF_SERVICE_ALREADY_BOUND), + t -> Mono.empty())) + .then(); + } + + private static Mono buildAndStageAndWaitForRunning( + CloudFoundryClient cloudFoundryClient, + ManifestV3Application manifestApp, + String packageId, + String appId) { + return buildAndStage(cloudFoundryClient, manifestApp, packageId) + .flatMap( + dropletId -> + applyDropletAndWaitForRunning( + cloudFoundryClient, + manifestApp.getName(), + appId, + dropletId)); + } + + private static Mono buildAndStage( + CloudFoundryClient cloudFoundryClient, + ManifestV3Application manifestApp, + String packageId) { + return cloudFoundryClient + .builds() + .create( + CreateBuildRequest.builder() + .getPackage(Relationship.builder().id(packageId).build()) + .build()) + .map(CreateBuildResponse::getId) + .flatMap( + buildId -> + waitForBuildStaging( + cloudFoundryClient, buildId, manifestApp.getName(), null)) + .map(build -> build.getDroplet().getId()); + } + + private static String cleanName(ApplicationManifest manifest) { + return manifest.getName().replaceAll("\\.", ""); + } + + private static BiFunction collectStates() { + return (totalState, instanceState) -> { + if ("RUNNING".equals(instanceState) || "RUNNING".equals(totalState)) { + return "RUNNING"; + } + + if ("FLAPPING".equals(instanceState) || "CRASHED".equals(instanceState)) { + return "FAILED"; + } + + return totalState; + }; + } + + private static ApplicationEvent convertToApplicationEvent(EventResource resource) { + EventEntity entity = resource.getEntity(); + Date timestamp = null; + try { + timestamp = DateUtils.parseFromIso8601(entity.getTimestamp()); + } catch (IllegalArgumentException iae) { + // do not set time + } + return ApplicationEvent.builder() + .actor(entity.getActorName()) + .description( + eventDescription( + getMetadataRequest(entity), getEntryNames(entity.getType()))) + .id(ResourceUtils.getId(resource)) + .event(entity.getType()) + .time(timestamp) + .build(); + } + + private static Mono copyBits( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + String sourceApplicationId, + String targetApplicationId) { + return requestCopyBits(cloudFoundryClient, sourceApplicationId, targetApplicationId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono createPackage( + CloudFoundryClient cloudFoundryClient, + String appId, + ManifestV3Application manifestApp) { + if (manifestApp.getDocker() != null) { + return cloudFoundryClient + .packages() + .create( + CreatePackageRequest.builder() + .type(PackageType.DOCKER) + .data( + DockerData.builder() + .image(manifestApp.getDocker().getImage()) + .username(manifestApp.getDocker().getUsername()) + .password(manifestApp.getDocker().getPassword()) + .build()) + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(appId) + .build()) + .build()) + .build()) + .build()) + .map(CreatePackageResponse::getId); + } else { + return cloudFoundryClient + .packages() + .create( + CreatePackageRequest.builder() + .type(PackageType.BITS) + .data(BitsData.builder().build()) + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(appId) + .build()) + .build()) + .build()) + .build()) + .filter(p -> p.getState() == PackageState.AWAITING_UPLOAD) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Newly created package of application %s is not in state" + + " AWAITING_UPLOAD", + manifestApp.getName())) + .map(CreatePackageResponse::getId) + .flatMap( + packageId -> + ResourceMatchingUtilsV3.getMatchedResources( + cloudFoundryClient, manifestApp.getPath()) + .flatMap( + matchedResources -> + uploadPackageBitsAndWait( + cloudFoundryClient, + packageId, + manifestApp.getPath(), + matchedResources, + Duration.ofMinutes(5))) + .map(GetPackageResponse::getId)); + } + } + + private static Mono deleteRoute( + CloudFoundryClient cloudFoundryClient, String routeId, Duration completionTimeout) { + return requestDeleteRoute(cloudFoundryClient, routeId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono deleteRoutes( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + Optional> routes) { + return routes.map(Flux::fromIterable) + .orElse(Flux.empty()) + .map(org.cloudfoundry.client.v2.routes.Route::getId) + .flatMap(routeId -> deleteRoute(cloudFoundryClient, routeId, completionTimeout)) + .then(); + } + + private static String deriveHostname( + String host, ApplicationManifest manifest, RandomWords randomWords) { + if (Optional.ofNullable(manifest.getNoHostname()).orElse(false)) { + return ""; + } else if (host != null) { + return host; + } else if (Optional.ofNullable(manifest.getRandomRoute()).orElse(false)) { + return String.join( + "-", cleanName(manifest), randomWords.getAdjective(), randomWords.getNoun()); + } else { + return cleanName(manifest); + } + } + + private static Statistics emptyApplicationStatistics() { + return Statistics.builder().usage(emptyApplicationUsage()).build(); + } + + private static Usage emptyApplicationUsage() { + return Usage.builder().build(); + } + + private static InstanceStatistics emptyInstanceStats() { + return InstanceStatistics.builder().statistics(emptyApplicationStatistics()).build(); + } + + private static String eventDescription(Map request, String... entryNames) { + if (request == null) { + return ""; + } + boolean first = true; + StringBuilder sb = new StringBuilder(); + for (String entryName : entryNames) { + Object value = request.get(entryName); + if (value == null) { + continue; + } + if (!first) { + sb.append(", "); + } + first = false; + sb.append(entryName).append(": ").append(String.valueOf(value)); + } + return sb.toString(); + } + + private static Flux extractApplications( + GetSpaceSummaryResponse getSpaceSummaryResponse) { + return Flux.fromIterable(getSpaceSummaryResponse.getApplications()); + } + + private static Mono getApplication( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return requestApplications(cloudFoundryClient, application, spaceId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Application %s does not exist", application)); + } + + private static Mono> getApplicationBuildpacks( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .get( + org.cloudfoundry.client.v3.applications.GetApplicationRequest.builder() + .applicationId(applicationId) + .build()) + .map(GetApplicationResponse::getLifecycle) + .filter(lifecycle -> BUILDPACK == lifecycle.getType()) + .map(Lifecycle::getData) + .cast(BuildpackData.class) + .map(BuildpackData::getBuildpacks) + .defaultIfEmpty(Collections.emptyList()); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return getApplication(cloudFoundryClient, application, spaceId).map(ResourceUtils::getId); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, + ApplicationManifest manifest, + String spaceId, + String stackId) { + return requestApplications(cloudFoundryClient, manifest.getName(), spaceId) + .singleOrEmpty() + .flatMap( + application -> { + HashMap merge = new HashMap<>(); + Optional.ofNullable( + ResourceUtils.getEntity(application) + .getEnvironmentJsons()) + .ifPresent(merge::putAll); + Optional.ofNullable(manifest.getEnvironmentVariables()) + .ifPresent(merge::putAll); + + return requestUpdateApplication( + cloudFoundryClient, + ResourceUtils.getId(application), + merge, + manifest, + stackId) + .map(ResourceUtils::getId); + }) + .switchIfEmpty( + requestCreateApplication(cloudFoundryClient, manifest, spaceId, stackId) + .map(ResourceUtils::getId)); + } + + private static Mono getApplicationIdFromOrgSpace( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + String organization, + String space) { + return getSpaceOrganizationId(cloudFoundryClient, spaceId) + .flatMap( + organizationId -> + organization != null + ? getOrganizationId(cloudFoundryClient, organization) + : Mono.just(organizationId)) + .flatMap( + organizationId -> + space != null + ? getSpaceId(cloudFoundryClient, organizationId, space) + : Mono.just(spaceId)) + .flatMap(spaceId1 -> getApplicationId(cloudFoundryClient, application, spaceId1)); + } + + private static Mono getApplicationIdV3( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return getApplicationV3(cloudFoundryClient, applicationName, spaceId) + .map(ApplicationResource::getId); + } + + private static Mono getApplicationIdWhere( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + Predicate predicate) { + return getApplication(cloudFoundryClient, application, spaceId) + .filter(predicate) + .map(ResourceUtils::getId); + } + + private static Mono getApplicationInstances( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestApplicationInstances(cloudFoundryClient, applicationId) + .onErrorResume( + ExceptionUtils.statusCode( + CF_BUILDPACK_COMPILED_FAILED, + CF_INSTANCES_ERROR, + CF_STAGING_NOT_FINISHED, + CF_STAGING_TIME_EXPIRED, + CF_INSUFFICIENT_RESOURCES, + CF_STAGING_ERROR), + t -> Mono.just(ApplicationInstancesResponse.builder().build())); + } + + private static Mono> getApplicationRoutes( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestApplicationRoutes(cloudFoundryClient, applicationId).collectList(); + } + + private static Mono getApplicationStatistics( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestApplicationStatistics(cloudFoundryClient, applicationId) + .onErrorResume( + ExceptionUtils.statusCode(CF_APP_STOPPED_STATS_ERROR), + t -> Mono.just(ApplicationStatisticsResponse.builder().build())); + } + + private static Mono getApplicationV3( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return requestApplicationsV3(cloudFoundryClient, application, spaceId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Application %s does not exist", application)); + } + + private static Mono< + Tuple5< + List, + SummaryApplicationResponse, + GetStackResponse, + List, + List>> + getAuxiliaryContent( + CloudFoundryClient cloudFoundryClient, + AbstractApplicationResource applicationResource) { + String applicationId = ResourceUtils.getId(applicationResource); + String stackId = ResourceUtils.getEntity(applicationResource).getStackId(); + + return Mono.zip( + getApplicationStatistics(cloudFoundryClient, applicationId), + requestApplicationSummary(cloudFoundryClient, applicationId), + getApplicationInstances(cloudFoundryClient, applicationId)) + .flatMap( + function( + (applicationStatisticsResponse, + summaryApplicationResponse, + applicationInstancesResponse) -> + Mono.zip( + getApplicationBuildpacks( + cloudFoundryClient, applicationId), + Mono.just(summaryApplicationResponse), + requestStack(cloudFoundryClient, stackId), + toInstanceDetailList( + applicationInstancesResponse, + applicationStatisticsResponse), + toUrls(summaryApplicationResponse.getRoutes())))); + } + + private static Mono getDefaultDomainId(CloudFoundryClient cloudFoundryClient) { + return requestSharedDomains(cloudFoundryClient) + .filter( + resource -> + !Optional.ofNullable( + ResourceUtils.getEntity(resource).getInternal()) + .orElse(false)) + .map(ResourceUtils::getId) + .next() + .switchIfEmpty(ExceptionUtils.illegalArgument("No default domain found")); + } + + private static String getDomainId(List availableDomains, String domainName) { + return availableDomains.stream() + .filter(domain -> domainName.equals(domain.getName())) + .map(DomainSummary::getId) + .findFirst() + .orElseThrow( + () -> + new IllegalArgumentException( + String.format("Domain %s not found", domainName))); + } + + private static String[] getEntryNames(String type) { + return type.contains("crash") ? ENTRY_FIELDS_CRASH : ENTRY_FIELDS_NORMAL; + } + + private static Map getEnvironment(AbstractApplicationResource resource) { + return ResourceUtils.getEntity(resource).getEnvironmentJsons(); + } + + private static int getInstances(AbstractApplicationResource resource) { + return Optional.ofNullable(resource.getEntity()) + .map(ApplicationEntity::getInstances) + .orElse(0); + } + + private static Flux getLogs( + Mono dopplerClient, String applicationId, Boolean recent) { + if (Optional.ofNullable(recent).orElse(false)) { + return requestLogsRecent(dopplerClient, applicationId) + .filter(e -> EventType.LOG_MESSAGE == e.getEventType()) + .map(Envelope::getLogMessage) + .collectSortedList(LOG_MESSAGE_COMPARATOR) + .flatMapIterable(d -> d); + } else { + return requestLogsStream(dopplerClient, applicationId) + .filter(e -> EventType.LOG_MESSAGE == e.getEventType()) + .map(Envelope::getLogMessage) + .transformDeferred( + SortingUtils.timespan(LOG_MESSAGE_COMPARATOR, LOG_MESSAGE_TIMESPAN)); + } + } + + @SuppressWarnings("unchecked") + private static Map getMetadataRequest(EventEntity entity) { + Map> metadata = + Optional.ofNullable(entity.getMetadatas()).orElse(Collections.emptyMap()); + + if (metadata.get("request") != null) { + return metadata.get("request") + .map(m -> (Map) m) + .orElse(Collections.emptyMap()); + } else if (metadata.get("instance") != null) { + return metadata.entrySet().stream() + .collect(Collectors.toMap(Map.Entry::getKey, v -> v.getValue().orElse(""))); + } else { + return Collections.emptyMap(); + } + } + + private static Mono>> getOptionalRoutes( + CloudFoundryClient cloudFoundryClient, boolean deleteRoutes, String applicationId) { + if (deleteRoutes) { + return getRoutes(cloudFoundryClient, applicationId).map(Optional::of); + } else { + return Mono.just(Optional.empty()); + } + } + + private static Mono> getOptionalStackId( + CloudFoundryClient cloudFoundryClient, String stack) { + return Optional.ofNullable(stack) + .map(stack1 -> getStackId(cloudFoundryClient, stack1).map(Optional::of)) + .orElse(Mono.just(Optional.empty())); + } + + private static Mono getOrganization( + CloudFoundryClient cloudFoundryClient, String organization) { + return requestOrganizations(cloudFoundryClient, organization) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Organization %s not found", organization)); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String organization) { + return getOrganization(cloudFoundryClient, organization).map(ResourceUtils::getId); + } + + private static Mono getOrganizationSpaceByName( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return requestOrganizationSpacesByName(cloudFoundryClient, organizationId, space) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Space %s not found", space)); + } + + private static String getPassword(DockerCredentials dockerCredentials) { + return Optional.ofNullable(dockerCredentials) + .map(DockerCredentials::getPassword) + .orElse(null); + } + + private static Flux getPushRouteIdFromDomain( + CloudFoundryClient cloudFoundryClient, + List availableDomains, + String domainId, + ApplicationManifest manifest, + RandomWords randomWords, + String spaceId) { + if (isTcpDomain(availableDomains, domainId)) { + return requestCreateTcpRoute(cloudFoundryClient, domainId, spaceId) + .map(ResourceUtils::getId) + .flux(); + } + + List hosts; + if (Optional.ofNullable(manifest.getNoHostname()).orElse(false)) { + hosts = Collections.singletonList(""); + } else if (Optional.ofNullable(manifest.getRandomRoute()).orElse(false) + && manifest.getHosts() == null) { + hosts = + Collections.singletonList( + String.join( + "-", + cleanName(manifest), + randomWords.getAdjective(), + randomWords.getNoun())); + } else if (manifest.getHosts() == null || manifest.getHosts().isEmpty()) { + hosts = Collections.singletonList(cleanName(manifest)); + } else { + hosts = manifest.getHosts(); + } + + return Flux.fromIterable(hosts) + .flatMap( + host -> + getRouteId( + cloudFoundryClient, + domainId, + host, + manifest.getRoutePath()) + .switchIfEmpty( + requestCreateRoute( + cloudFoundryClient, + domainId, + host, + manifest.getRoutePath(), + spaceId) + .map(ResourceUtils::getId))); + } + + private static Flux getPushRouteIdFromRoute( + CloudFoundryClient cloudFoundryClient, + List availableDomains, + ApplicationManifest manifest, + RandomWords randomWords, + String spaceId) { + return Flux.fromIterable(manifest.getRoutes()) + .flatMap( + route -> + RouteUtils.decomposeRoute( + availableDomains, + route.getRoute(), + manifest.getRoutePath())) + .flatMap( + decomposedRoute -> { + String domainId = + getDomainId(availableDomains, decomposedRoute.getDomain()); + if (isTcpDomain(availableDomains, domainId)) { + return getRouteIdForTcpRoute( + cloudFoundryClient, + decomposedRoute, + domainId, + manifest, + spaceId); + } else { + return getRouteIdForHttpRoute( + cloudFoundryClient, + decomposedRoute, + domainId, + manifest, + randomWords, + spaceId); + } + }); + } + + private static Mono getRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String routePath) { + return requestRoutes(cloudFoundryClient, domainId, host, null, routePath) + .filter(resource -> isIdentical(host, ResourceUtils.getEntity(resource).getHost())) + .filter( + resource -> + isIdentical( + Optional.ofNullable(routePath).orElse(""), + ResourceUtils.getEntity(resource).getPath())) + .singleOrEmpty() + .map(ResourceUtils::getId); + } + + private static Mono getRouteIdForHttpRoute( + CloudFoundryClient cloudFoundryClient, + DecomposedRoute decomposedRoute, + String domainId, + ApplicationManifest manifest, + RandomWords randomWords, + String spaceId) { + String derivedHost = deriveHostname(decomposedRoute.getHost(), manifest, randomWords); + return getRouteId(cloudFoundryClient, domainId, derivedHost, decomposedRoute.getPath()) + .switchIfEmpty( + requestCreateRoute( + cloudFoundryClient, + domainId, + derivedHost, + decomposedRoute.getPath(), + spaceId) + .map(ResourceUtils::getId)); + } + + private static Mono getRouteIdForTcpRoute( + CloudFoundryClient cloudFoundryClient, + DecomposedRoute decomposedRoute, + String domainId, + ApplicationManifest manifest, + String spaceId) { + if (Optional.ofNullable(manifest.getRandomRoute()).orElse(false)) { + return requestCreateTcpRoute(cloudFoundryClient, domainId, spaceId) + .map(ResourceUtils::getId); + } + + return getTcpRouteId(cloudFoundryClient, domainId, decomposedRoute.getPort()) + .switchIfEmpty( + requestCreateTcpRoute( + cloudFoundryClient, + domainId, + decomposedRoute.getPort(), + spaceId) + .map(ResourceUtils::getId)); + } + + private static Mono> getRoutes( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestApplicationSummary(cloudFoundryClient, applicationId) + .map(SummaryApplicationResponse::getRoutes); + } + + private static Mono>, String>> + getRoutesAndApplicationId( + CloudFoundryClient cloudFoundryClient, + DeleteApplicationRequest request, + String spaceId, + boolean deleteRoutes) { + return getApplicationId(cloudFoundryClient, request.getName(), spaceId) + .flatMap( + applicationId -> + getOptionalRoutes(cloudFoundryClient, deleteRoutes, applicationId) + .zipWith(Mono.just(applicationId))); + } + + private static Mono getServiceId( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return requestListServiceInstances(cloudFoundryClient, serviceInstanceName, spaceId) + .map(ResourceUtils::getId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Service instance %s could not be found", + serviceInstanceName)); + } + + private static Mono getSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return getOrganizationSpaceByName(cloudFoundryClient, organizationId, space) + .map(ResourceUtils::getId); + } + + private static Mono getSpaceOrganizationId( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestSpace(cloudFoundryClient, spaceId) + .map(response -> ResourceUtils.getEntity(response).getOrganizationId()); + } + + private static Mono getStackId(CloudFoundryClient cloudFoundryClient, String stack) { + return requestStacks(cloudFoundryClient, stack) + .map(ResourceUtils::getId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Stack %s does not exist", stack)); + } + + private static Mono getStackName( + CloudFoundryClient cloudFoundryClient, String stackId) { + return requestStack(cloudFoundryClient, stackId) + .map(getStackResponse -> getStackResponse.getEntity().getName()); + } + + private static Mono getTaskId( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer sequenceId) { + return listTasks(cloudFoundryClient, applicationId, sequenceId) + .single() + .map(Resource::getId) + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Task with sequence id of %s does not exist", sequenceId)); + } + + private static Mono getTcpRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, Integer port) { + return requestRoutes(cloudFoundryClient, domainId, null, port, null) + .singleOrEmpty() + .map(ResourceUtils::getId); + } + + private static String getUsername(DockerCredentials dockerCredentials) { + return Optional.ofNullable(dockerCredentials) + .map(DockerCredentials::getUsername) + .orElse(null); + } + + private static boolean isIdentical(String s, String t) { + return Objects.equals(s, t); + } + + private static Predicate isInstanceComplete() { + return state -> "RUNNING".equals(state) || "FAILED".equals(state); + } + + private static Predicate isNotIn(String expectedState) { + return resource -> isNotIn(resource, expectedState); + } + + private static boolean isNotIn(AbstractApplicationResource resource, String expectedState) { + return !expectedState.equals(ResourceUtils.getEntity(resource).getState()); + } + + private static boolean isRestartRequired( + ScaleApplicationRequest request, AbstractApplicationResource applicationResource) { + return (request.getDiskLimit() != null || request.getMemoryLimit() != null) + && STARTED_STATE.equals(ResourceUtils.getEntity(applicationResource).getState()); + } + + private static Predicate isRunning() { + return "RUNNING"::equals; + } + + private static Predicate isStaged() { + return "STAGED"::equals; + } + + private static Predicate isStagingComplete() { + return state -> "STAGED".equals(state) || "FAILED".equals(state); + } + + private static boolean isTcpDomain(List availableDomains, String domainId) { + List tcpDomainIds = + availableDomains.stream() + .filter(domain -> "tcp".equals(domain.getType())) + .map(DomainSummary::getId) + .collect(Collectors.toList()); + + return tcpDomainIds.contains(domainId); + } + + private static Mono> listAvailableDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListPrivateDomains(cloudFoundryClient, organizationId) + .map(DefaultApplications::toDomain) + .mergeWith( + requestListSharedDomains(cloudFoundryClient) + .map(DefaultApplications::toDomain)) + .collectList(); + } + + private static Flux listTasks( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer sequenceId) { + return requestListTasks(cloudFoundryClient, applicationId, sequenceId) + .cast(org.cloudfoundry.client.v3.tasks.Task.class); + } + + private static Mono prepareDomainsAndRoutes( + CloudFoundryClient cloudFoundryClient, + String applicationId, + List availableDomains, + ApplicationManifest manifest, + List existingRoutes, + RandomWords randomWords, + String spaceId) { + if (Optional.ofNullable(manifest.getNoRoute()).orElse(false)) { + return Flux.fromIterable(existingRoutes) + .map(ResourceUtils::getId) + .flatMap( + routeId -> + requestRemoveRouteFromApplication( + cloudFoundryClient, applicationId, routeId)) + .then(); + } + + if (manifest.getRoutes() == null) { + if (manifest.getDomains() == null) { + if (existingRoutes.isEmpty()) { + return associateDefaultDomain( + cloudFoundryClient, + applicationId, + availableDomains, + manifest, + randomWords, + spaceId) + .then(); + } + return Mono.empty(); // A route already exists for the application, do nothing + } + return Flux.fromIterable(manifest.getDomains()) + .flatMap( + domain -> + getPushRouteIdFromDomain( + cloudFoundryClient, + availableDomains, + getDomainId(availableDomains, domain), + manifest, + randomWords, + spaceId) + .flatMap( + routeId -> + requestAssociateRoute( + cloudFoundryClient, + applicationId, + routeId))) + .then(); + } + + List existingRouteIds = + existingRoutes.stream().map(ResourceUtils::getId).collect(Collectors.toList()); + + return getPushRouteIdFromRoute( + cloudFoundryClient, availableDomains, manifest, randomWords, spaceId) + .filter(routeId -> !existingRouteIds.contains(routeId)) + .flatMapSequential( + routeId -> + requestAssociateRoute(cloudFoundryClient, applicationId, routeId), + 1) + .then(); + } + + private static Flux pushApplication( + CloudFoundryClient cloudFoundryClient, + List availableDomains, + ApplicationManifest manifest, + RandomWords randomWords, + PushApplicationManifestRequest request, + String spaceId) { + + return getOptionalStackId(cloudFoundryClient, manifest.getStack()) + .flatMapMany( + stackId -> + getApplicationId( + cloudFoundryClient, + manifest, + spaceId, + stackId.orElse(null))) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getApplicationRoutes(cloudFoundryClient, applicationId), + ResourceMatchingUtils.getMatchedResources( + cloudFoundryClient, manifest.getPath()))) + .flatMap( + function( + (applicationId, existingRoutes, matchedResources) -> + prepareDomainsAndRoutes( + cloudFoundryClient, + applicationId, + availableDomains, + manifest, + existingRoutes, + randomWords, + spaceId) + .thenReturn( + Tuples.of( + applicationId, matchedResources)))) + .flatMap( + function( + (applicationId, matchedResources) -> + Mono.when( + bindServices( + cloudFoundryClient, + applicationId, + manifest, + spaceId), + updateBuildpacks( + cloudFoundryClient, + applicationId, + manifest), + uploadApplicationAndWait( + cloudFoundryClient, + applicationId, + manifest.getPath(), + matchedResources, + request.getStagingTimeout())) + .thenReturn(applicationId))) + .flatMap( + applicationId -> + stopAndStartApplication( + cloudFoundryClient, + applicationId, + manifest.getName(), + request)); + } + + private static Flux pushDocker( + CloudFoundryClient cloudFoundryClient, + List availableDomains, + ApplicationManifest manifest, + RandomWords randomWords, + PushApplicationManifestRequest request, + String spaceId) { + + return getOptionalStackId(cloudFoundryClient, manifest.getStack()) + .flatMapMany( + stackId -> + getApplicationId( + cloudFoundryClient, + manifest, + spaceId, + stackId.orElse(null))) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getApplicationRoutes(cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, existingRoutes) -> + prepareDomainsAndRoutes( + cloudFoundryClient, + applicationId, + availableDomains, + manifest, + existingRoutes, + randomWords, + spaceId) + .thenReturn(applicationId))) + .delayUntil( + applicationId -> + bindServices(cloudFoundryClient, applicationId, manifest, spaceId)) + .flatMap( + applicationId -> + stopAndStartApplication( + cloudFoundryClient, + applicationId, + manifest.getName(), + request)); + } + + private static Map removeFromEnvironment( + Map environment, String variableName) { + Map modified = new HashMap<>(environment); + modified.remove(variableName); + return modified; + } + + private static Mono removeServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestListServiceBindings(cloudFoundryClient, applicationId) + .map(ResourceUtils::getId) + .flatMap( + serviceBindingId -> + requestRemoveServiceBinding( + cloudFoundryClient, applicationId, serviceBindingId)) + .then(); + } + + private static Mono requestApplicationEnvironment( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .getEnvironment( + GetApplicationEnvironmentRequest.builder() + .applicationId(applicationId) + .build()); + } + + private static Mono requestApplicationInstances( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder().applicationId(applicationId).build()); + } + + private static Flux requestApplicationRoutes( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest.builder() + .applicationId(applicationId) + .page(page) + .build())); + } + + private static Mono requestApplicationStatistics( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build()); + } + + private static Mono requestApplicationSummary( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .summary(SummaryApplicationRequest.builder().applicationId(applicationId).build()); + } + + private static Flux requestApplications( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .spaceId(spaceId) + .page(page) + .build())) + .cast(AbstractApplicationResource.class); + } + + private static Flux requestApplicationsV3( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest.builder() + .name(application) + .spaceId(spaceId) + .page(page) + .build())); + } + + private static Mono requestAssociateRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .applicationsV2() + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestCopyBits( + CloudFoundryClient cloudFoundryClient, + String sourceApplicationId, + String targetApplicationId) { + return cloudFoundryClient + .applicationsV2() + .copy( + CopyApplicationRequest.builder() + .applicationId(targetApplicationId) + .sourceApplicationId(sourceApplicationId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, + ApplicationManifest manifest, + String spaceId, + String stackId) { + CreateApplicationRequest.Builder builder = + CreateApplicationRequest.builder() + .command(manifest.getCommand()) + .diskQuota(manifest.getDisk()) + .environmentJsons(manifest.getEnvironmentVariables()) + .healthCheckHttpEndpoint(manifest.getHealthCheckHttpEndpoint()) + .healthCheckTimeout(manifest.getTimeout()) + .healthCheckType( + Optional.ofNullable(manifest.getHealthCheckType()) + .map(ApplicationHealthCheck::getValue) + .orElse(null)) + .instances(manifest.getInstances()) + .memory(manifest.getMemory()) + .name(manifest.getName()) + .spaceId(spaceId) + .stackId(stackId); + + if (manifest.getBuildpacks() != null && manifest.getBuildpacks().size() == 1) { + builder.buildpack(manifest.getBuildpacks().get(0)); + } + + if (manifest.getDocker() != null) { + Optional.ofNullable(manifest.getDocker().getImage()) + .ifPresent( + image -> { + builder.diego(true).dockerImage(image); + + String username = manifest.getDocker().getUsername(); + String password = manifest.getDocker().getPassword(); + builder.dockerCredentials( + DockerCredentials.builder() + .username(username) + .password(password) + .build()); + }); + } + + return cloudFoundryClient.applicationsV2().create(builder.build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String routePath, + String spaceId) { + return cloudFoundryClient + .routes() + .create( + org.cloudfoundry.client.v2.routes.CreateRouteRequest.builder() + .domainId(domainId) + .host(host) + .path(routePath) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateTask( + CloudFoundryClient cloudFoundryClient, + String applicationId, + RunApplicationTaskRequest request) { + return cloudFoundryClient + .tasks() + .create( + CreateTaskRequest.builder() + .applicationId(applicationId) + .command(request.getCommand()) + .diskInMb(request.getDisk()) + .memoryInMb(request.getMemory()) + .name(request.getTaskName()) + .build()); + } + + private static Mono requestCreateTcpRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String spaceId) { + return cloudFoundryClient + .routes() + .create( + org.cloudfoundry.client.v2.routes.CreateRouteRequest.builder() + .domainId(domainId) + .generatePort(true) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateTcpRoute( + CloudFoundryClient cloudFoundryClient, String domainId, Integer port, String spaceId) { + return cloudFoundryClient + .routes() + .create( + org.cloudfoundry.client.v2.routes.CreateRouteRequest.builder() + .domainId(domainId) + .port(port) + .spaceId(spaceId) + .build()); + } + + private static Mono requestDeleteApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .delete( + org.cloudfoundry.client.v2.applications.DeleteApplicationRequest.builder() + .applicationId(applicationId) + .build()); + } + + private static Mono requestDeleteRoute( + CloudFoundryClient cloudFoundryClient, String routeId) { + return cloudFoundryClient + .routes() + .delete(DeleteRouteRequest.builder().async(true).routeId(routeId).build()); + } + + private static Flux requestEvents( + String applicationId, CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .actee(applicationId) + .orderDirection(OrderDirection.DESCENDING) + .resultsPerPage(50) + .page(page) + .build())); + } + + private static Mono requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .get( + org.cloudfoundry.client.v2.applications.GetApplicationRequest.builder() + .applicationId(applicationId) + .build()) + .cast(AbstractApplicationResource.class); + } + + private static Flux requestListDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .domainsV3() + .list(ListDomainsRequest.builder().page(page).build())); + } + + private static Flux requestListPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .applicationId(applicationId) + .page(page) + .build())); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .page(page) + .returnUserProvidedServiceInstances(true) + .name(serviceInstanceName) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSharedDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private static Flux requestListTasks( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .listTasks( + org.cloudfoundry.client.v3.applications + .ListApplicationTasksRequest.builder() + .applicationId(applicationId) + .page(page) + .build())); + } + + private static Flux requestListTasks( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer sequenceId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .listTasks( + org.cloudfoundry.client.v3.applications + .ListApplicationTasksRequest.builder() + .applicationId(applicationId) + .page(page) + .sequenceId(sequenceId.toString()) + .build())); + } + + private static Flux requestLogsRecent( + Mono dopplerClient, String applicationId) { + return dopplerClient.flatMapMany( + client -> + client.recentLogs( + RecentLogsRequest.builder().applicationId(applicationId).build())); + } + + private static Flux requestLogsStream( + Mono dopplerClient, String applicationId) { + return dopplerClient.flatMapMany( + client -> + client.stream( + StreamRequest.builder().applicationId(applicationId).build())); + } + + private static Flux requestOrganizationSpacesByName( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organization) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organization) + .page(page) + .build())); + } + + private static Mono requestRemoveRouteFromApplication( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .applicationsV2() + .removeRoute( + RemoveApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestRemoveServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceBindingId) { + return cloudFoundryClient + .applicationsV2() + .removeServiceBinding( + RemoveApplicationServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceBindingId(serviceBindingId) + .build()); + } + + private static Mono requestRestageApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .restage( + org.cloudfoundry.client.v2.applications.RestageApplicationRequest.builder() + .applicationId(applicationId) + .build()); + } + + private static Flux requestRoutes( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + Integer port, + String routePath) { + ListRoutesRequest.Builder requestBuilder = ListRoutesRequest.builder().domainId(domainId); + Optional.ofNullable(host).ifPresent(requestBuilder::host); + Optional.ofNullable(routePath).ifPresent(requestBuilder::path); + Optional.ofNullable(port).ifPresent(requestBuilder::port); + + return PaginationUtils.requestClientV2Resources( + page -> cloudFoundryClient.routes().list(requestBuilder.page(page).build())); + } + + private static Flux requestSharedDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private static Mono requestSpace( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return cloudFoundryClient.spaces().get(GetSpaceRequest.builder().spaceId(spaceId).build()); + } + + private static Mono requestSpaceSummary( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build()); + } + + private static Mono requestStack( + CloudFoundryClient cloudFoundryClient, String stackId) { + return cloudFoundryClient.stacks().get(GetStackRequest.builder().stackId(stackId).build()); + } + + private static Flux requestStacks( + CloudFoundryClient cloudFoundryClient, String stack) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .stacks() + .list(ListStacksRequest.builder().page(page).name(stack).build())); + } + + private static Mono requestTerminateApplicationInstance( + CloudFoundryClient cloudFoundryClient, String applicationId, String instanceIndex) { + return cloudFoundryClient + .applicationsV2() + .terminateInstance( + TerminateApplicationInstanceRequest.builder() + .applicationId(applicationId) + .index(instanceIndex) + .build()); + } + + private static Mono requestTerminateTask( + CloudFoundryClient cloudFoundryClient, String taskId) { + return cloudFoundryClient + .tasks() + .cancel(CancelTaskRequest.builder().taskId(taskId).build()); + } + + private static Mono requestUpdateApplication( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Map environmentJsons, + ApplicationManifest manifest, + String stackId) { + return requestUpdateApplication( + cloudFoundryClient, + applicationId, + builder -> { + builder.command(manifest.getCommand()) + .diskQuota(manifest.getDisk()) + .environmentJsons(environmentJsons) + .healthCheckHttpEndpoint(manifest.getHealthCheckHttpEndpoint()) + .healthCheckTimeout(manifest.getTimeout()) + .healthCheckType( + Optional.ofNullable(manifest.getHealthCheckType()) + .map(ApplicationHealthCheck::getValue) + .orElse(null)) + .instances(manifest.getInstances()) + .memory(manifest.getMemory()) + .name(manifest.getName()) + .stackId(stackId); + + if (manifest.getBuildpacks() != null && manifest.getBuildpacks().size() == 1) { + builder.buildpack(manifest.getBuildpacks().get(0)); + } + + if (manifest.getDocker() != null) { + Optional.ofNullable(manifest.getDocker().getImage()) + .ifPresent( + image -> { + builder.diego(true).dockerImage(image); + + String username = manifest.getDocker().getUsername(); + String password = manifest.getDocker().getPassword(); + builder.dockerCredentials( + DockerCredentials.builder() + .username(username) + .password(password) + .build()); + }); + } + + return builder; + }); + } + + private static Mono requestUpdateApplication( + CloudFoundryClient cloudFoundryClient, + String applicationId, + UnaryOperator modifier) { + return cloudFoundryClient + .applicationsV2() + .update( + modifier.apply( + UpdateApplicationRequest.builder() + .applicationId(applicationId)) + .build()) + .cast(AbstractApplicationResource.class); + } + + private static Mono requestUpdateApplicationEnvironment( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Map environment) { + return requestUpdateApplication( + cloudFoundryClient, + applicationId, + builder -> builder.environmentJsons(environment)); + } + + private static Mono requestUpdateApplicationHealthCheckType( + CloudFoundryClient cloudFoundryClient, + String applicationId, + ApplicationHealthCheck type) { + return requestUpdateApplication( + cloudFoundryClient, + applicationId, + builder -> builder.healthCheckType(type.getValue())); + } + + private static Mono requestUpdateApplicationName( + CloudFoundryClient cloudFoundryClient, String applicationId, String name) { + return requestUpdateApplication( + cloudFoundryClient, applicationId, builder -> builder.name(name)); + } + + private static Mono requestUpdateApplicationSsh( + CloudFoundryClient cloudFoundryClient, String applicationId, boolean enabled) { + return requestUpdateApplicationFeature( + cloudFoundryClient, + applicationId, + builder -> builder.featureName(APP_FEATURE_SSH).enabled(enabled)); + } + + private static Mono requestUpdateApplicationFeature( + CloudFoundryClient cloudFoundryClient, + String applicationId, + UnaryOperator modifier) { + return cloudFoundryClient + .applicationsV3() + .updateFeature( + modifier.apply( + org.cloudfoundry.client.v3.applications + .UpdateApplicationFeatureRequest.builder() + .applicationId(applicationId)) + .build()) + .cast(ApplicationFeature.class); + } + + private static Mono requestUpdateApplicationScale( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Integer disk, + Integer instances, + Integer memory) { + return requestUpdateApplication( + cloudFoundryClient, + applicationId, + builder -> builder.diskQuota(disk).instances(instances).memory(memory)); + } + + private static Mono requestUpdateApplicationSsh( + CloudFoundryClient cloudFoundryClient, String applicationId, Boolean enabled) { + return requestUpdateApplication( + cloudFoundryClient, applicationId, builder -> builder.enableSsh(enabled)); + } + + private static Mono requestUpdateApplicationState( + CloudFoundryClient cloudFoundryClient, String applicationId, String state) { + return requestUpdateApplication( + cloudFoundryClient, applicationId, builder -> builder.state(state)); + } + + private static Mono requestUploadApplication( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Path application, + List matchedResources) { + UploadApplicationRequest request = + matchedResources.stream() + .reduce( + UploadApplicationRequest.builder() + .application(application) + .applicationId(applicationId) + .async(true), + (builder, artifactMetadata) -> + builder.resource( + org.cloudfoundry.client.v2.applications.Resource + .builder() + .hash(artifactMetadata.getHash()) + .mode(artifactMetadata.getPermissions()) + .path(artifactMetadata.getPath()) + .size(artifactMetadata.getSize()) + .build()), + (a, b) -> a) + .build(); + + return cloudFoundryClient.applicationsV2().upload(request); + } + + private static Mono requestUploadPackage( + CloudFoundryClient cloudFoundryClient, + String packageId, + Path bits, + List matchedResources) { + return cloudFoundryClient + .packages() + .upload( + UploadPackageRequest.builder() + .packageId(packageId) + .bits(bits) + .resources(matchedResources) + .build()) + .then(); + } + + private static Mono restageApplication( + CloudFoundryClient cloudFoundryClient, + String application, + String applicationId, + Duration stagingTimeout, + Duration startupTimeout) { + return requestRestageApplication(cloudFoundryClient, applicationId) + .flatMap( + response -> + waitForStaging( + cloudFoundryClient, + application, + applicationId, + stagingTimeout)) + .then( + waitForRunning( + cloudFoundryClient, application, applicationId, startupTimeout)); + } + + private static Mono restartApplication( + CloudFoundryClient cloudFoundryClient, + String application, + String applicationId, + Duration stagingTimeout, + Duration startupTimeout) { + return stopApplication(cloudFoundryClient, applicationId) + .then( + startApplicationAndWait( + cloudFoundryClient, + application, + applicationId, + stagingTimeout, + startupTimeout)); + } + + private static boolean shouldStartApplication( + PushApplicationManifestRequest request, AbstractApplicationResource resource) { + return shouldStartApplication(request) && getInstances(resource) > 0; + } + + private static boolean shouldStartApplication(PushApplicationManifestRequest request) { + return !Optional.ofNullable(request.getNoStart()).orElse(false); + } + + private static Mono startApplicationAndWait( + CloudFoundryClient cloudFoundryClient, + String application, + String applicationId, + Duration stagingTimeout, + Duration startupTimeout) { + return requestUpdateApplicationState(cloudFoundryClient, applicationId, STARTED_STATE) + .flatMap( + response -> + waitForStaging( + cloudFoundryClient, + application, + applicationId, + stagingTimeout)) + .then( + waitForRunning( + cloudFoundryClient, application, applicationId, startupTimeout)); + } + + private static Mono stopAndStartApplication( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String name, + PushApplicationManifestRequest request) { + return stopApplication(cloudFoundryClient, applicationId) + .filter(resource -> shouldStartApplication(request, resource)) + .flatMap( + resource -> + startApplicationAndWait( + cloudFoundryClient, + name, + applicationId, + request.getStagingTimeout(), + request.getStartupTimeout())); + } + + private static Mono stopApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestUpdateApplicationState(cloudFoundryClient, applicationId, STOPPED_STATE); + } + + private static Mono stopApplicationIfNotStopped( + CloudFoundryClient cloudFoundryClient, AbstractApplicationResource resource) { + return isNotIn(resource, STOPPED_STATE) + ? stopApplication(cloudFoundryClient, ResourceUtils.getId(resource)) + : Mono.just(resource); + } + + private static ApplicationDetail toApplicationDetail( + List buildpacks, + SummaryApplicationResponse summaryApplicationResponse, + GetStackResponse getStackResponse, + List instanceDetails, + List urls) { + if (buildpacks.size() == 0) { + buildpacks = + Collections.singletonList(summaryApplicationResponse.getDetectedBuildpack()); + } + + return ApplicationDetail.builder() + .buildpacks(buildpacks) + .diskQuota(summaryApplicationResponse.getDiskQuota()) + .id(summaryApplicationResponse.getId()) + .instanceDetails(instanceDetails) + .instances(summaryApplicationResponse.getInstances()) + .lastUploaded(toDate(summaryApplicationResponse.getPackageUpdatedAt())) + .memoryLimit(summaryApplicationResponse.getMemory()) + .name(summaryApplicationResponse.getName()) + .requestedState(summaryApplicationResponse.getState()) + .runningInstances(summaryApplicationResponse.getRunningInstances()) + .stack(getStackResponse.getEntity().getName()) + .urls(urls) + .build(); + } + + private static ApplicationEnvironments toApplicationEnvironments( + GetApplicationEnvironmentResponse response) { + return ApplicationEnvironments.builder() + .running(response.getRunningEnvironmentVariables()) + .staging(response.getStagingEnvironmentVariables()) + .systemProvided(response.getSystemEnvironmentVariables()) + .userProvided(response.getEnvironmentVariables()) + .build(); + } + + private static Mono toApplicationManifest( + List buildpacks, SummaryApplicationResponse response, String stackName) { + ApplicationManifest.Builder builder = + ApplicationManifest.builder() + .command(response.getCommand()) + .disk(response.getDiskQuota()) + .environmentVariables(response.getEnvironmentJsons()) + .healthCheckHttpEndpoint(response.getHealthCheckHttpEndpoint()) + .healthCheckType(ApplicationHealthCheck.from(response.getHealthCheckType())) + .instances(response.getInstances()) + .memory(response.getMemory()) + .docker(toDocker(response)) + .name(response.getName()) + .stack(stackName) + .timeout(response.getHealthCheckTimeout()); + + if (buildpacks != null && !buildpacks.isEmpty()) { + builder.buildpacks(buildpacks); + } + + for (org.cloudfoundry.client.v2.routes.Route route : + Optional.ofNullable(response.getRoutes()).orElse(Collections.emptyList())) { + builder.route(Route.builder().route(toUrl(route)).build()); + } + + if (Optional.ofNullable(response.getRoutes()).orElse(Collections.emptyList()).isEmpty()) { + builder.noRoute(true); + } + + for (ServiceInstance service : + Optional.ofNullable(response.getServices()).orElse(Collections.emptyList())) { + Optional.ofNullable(service.getName()).ifPresent(builder::service); + } + + return Mono.just(builder.build()); + } + + private static ApplicationSummary toApplicationSummary( + SpaceApplicationSummary spaceApplicationSummary) { + return ApplicationSummary.builder() + .diskQuota(spaceApplicationSummary.getDiskQuota()) + .id(spaceApplicationSummary.getId()) + .instances(spaceApplicationSummary.getInstances()) + .memoryLimit(spaceApplicationSummary.getMemory()) + .name(spaceApplicationSummary.getName()) + .requestedState(spaceApplicationSummary.getState()) + .runningInstances(spaceApplicationSummary.getRunningInstances()) + .urls(spaceApplicationSummary.getUrls()) + .build(); + } + + private static Date toDate(String date) { + return date == null ? null : DateUtils.parseFromIso8601(date); + } + + private static Date toDate(Double date) { + return date == null ? null : DateUtils.parseSecondsFromEpoch(date); + } + + private static Docker toDocker(SummaryApplicationResponse response) { + if (response.getDockerImage() == null) { + return null; + } + return Docker.builder() + .image(response.getDockerImage()) + .username(getUsername(response.getDockerCredentials())) + .password(getPassword(response.getDockerCredentials())) + .build(); + } + + private static DomainSummary toDomain(SharedDomainResource resource) { + SharedDomainEntity entity = ResourceUtils.getEntity(resource); + + return DomainSummary.builder() + .id(ResourceUtils.getId(resource)) + .name(entity.getName()) + .type(entity.getRouterGroupType()) + .build(); + } + + private static DomainSummary toDomain(PrivateDomainResource resource) { + PrivateDomainEntity entity = ResourceUtils.getEntity(resource); + + return DomainSummary.builder() + .id(ResourceUtils.getId(resource)) + .name(entity.getName()) + .build(); + } + + private static ApplicationHealthCheck toHealthCheck(AbstractApplicationResource resource) { + String type = resource.getEntity().getHealthCheckType(); + + if (ApplicationHealthCheck.HTTP.getValue().equals(type)) { + return ApplicationHealthCheck.HTTP; + } else if (ApplicationHealthCheck.NONE.getValue().equals(type)) { + return ApplicationHealthCheck.NONE; + } else if (ApplicationHealthCheck.PORT.getValue().equals(type)) { + return ApplicationHealthCheck.PORT; + } else if (ApplicationHealthCheck.PROCESS.getValue().equals(type)) { + return ApplicationHealthCheck.PROCESS; + } else { + return null; + } + } + + private static InstanceDetail toInstanceDetail( + Map.Entry entry, + ApplicationStatisticsResponse statisticsResponse) { + InstanceStatistics instanceStatistics = + Optional.ofNullable(statisticsResponse.getInstances().get(entry.getKey())) + .orElse(emptyInstanceStats()); + Statistics stats = + Optional.ofNullable(instanceStatistics.getStatistics()) + .orElse(emptyApplicationStatistics()); + Usage usage = Optional.ofNullable(stats.getUsage()).orElse(emptyApplicationUsage()); + + return InstanceDetail.builder() + .index(entry.getKey()) + .state(entry.getValue().getState()) + .since(toDate(entry.getValue().getSince())) + .cpu(usage.getCpu()) + .memoryUsage(usage.getMemory()) + .diskUsage(usage.getDisk()) + .diskQuota(stats.getDiskQuota()) + .memoryQuota(stats.getMemoryQuota()) + .build(); + } + + private static Mono> toInstanceDetailList( + ApplicationInstancesResponse instancesResponse, + ApplicationStatisticsResponse statisticsResponse) { + return Flux.fromIterable(instancesResponse.getInstances().entrySet()) + .map(entry -> toInstanceDetail(entry, statisticsResponse)) + .collectList(); + } + + private static Task toTask(org.cloudfoundry.client.v3.tasks.Task task) { + return Task.builder() + .command(task.getCommand()) + .sequenceId(task.getSequenceId()) + .name(task.getName()) + .startTime(task.getCreatedAt()) + .state(TaskState.valueOf(task.getState().getValue())) + .build(); + } + + private static String toUrl(org.cloudfoundry.client.v2.routes.Route route) { + StringBuilder sb = new StringBuilder(); + if (route.getHost() != null && !route.getHost().isEmpty()) { + sb.append(route.getHost()).append("."); + } + Optional.ofNullable(route.getDomain().getName()).ifPresent(sb::append); + + if (route.getPort() == null) { + Optional.ofNullable(route.getPath()).ifPresent(sb::append); + } else { + sb.append(":").append(route.getPort()); + } + + return sb.toString(); + } + + private static Mono> toUrls(List routes) { + return Flux.fromIterable(routes).map(DefaultApplications::toUrl).collectList(); + } + + private static Mono updateBuildpacks( + CloudFoundryClient cloudFoundryClient, + String applicationId, + ApplicationManifest manifest) { + if (manifest.getBuildpacks() == null || manifest.getBuildpacks().size() < 2) { + return Mono.empty(); + } + + return cloudFoundryClient + .applicationsV3() + .update( + org.cloudfoundry.client.v3.applications.UpdateApplicationRequest.builder() + .applicationId(applicationId) + .lifecycle( + Lifecycle.builder() + .data( + BuildpackData.builder() + .addAllBuildpacks( + manifest.getBuildpacks()) + .build()) + .type(BUILDPACK) + .build()) + .build()) + .then(); + } + + private static Mono uploadApplicationAndWait( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Path application, + List matchedResources, + Duration stagingTimeout) { + return Mono.defer( + () -> { + if (matchedResources.isEmpty()) { + return requestUploadApplication( + cloudFoundryClient, + applicationId, + application, + matchedResources); + } else { + List paths = + matchedResources.stream() + .map( + ResourceMatchingUtils.ArtifactMetadata + ::getPath) + .collect(Collectors.toList()); + + return FileUtils.compress(application, p -> !paths.contains(p)) + .flatMap( + filteredApplication -> + requestUploadApplication( + cloudFoundryClient, + applicationId, + filteredApplication, + matchedResources) + .doOnTerminate( + () -> { + try { + Files.delete( + filteredApplication); + } catch ( + IOException e) { + throw Exceptions + .propagate( + e); + } + })); + } + }) + .flatMap( + job -> JobUtils.waitForCompletion(cloudFoundryClient, stagingTimeout, job)); + } + + private static Mono uploadPackageBitsAndWait( + CloudFoundryClient cloudFoundryClient, + String packageId, + Path application, + List matchedResources, + Duration processingTimeout) { + return Mono.defer( + () -> { + if (matchedResources.isEmpty()) { + return requestUploadPackage( + cloudFoundryClient, + packageId, + application, + matchedResources); + } else { + List paths = + matchedResources.stream() + .map(MatchedResource::getPath) + .collect(Collectors.toList()); + + return FileUtils.compress(application, p -> !paths.contains(p)) + .flatMap( + filteredApplication -> + requestUploadPackage( + cloudFoundryClient, + packageId, + filteredApplication, + matchedResources) + .doOnTerminate( + () -> { + try { + Files.delete( + filteredApplication); + } catch ( + IOException e) { + throw Exceptions + .propagate( + e); + } + })); + } + }) + .then( + waitForUploadProcessingCompleted( + cloudFoundryClient, packageId, processingTimeout)); + } + + private static Mono waitForBuildStaging( + CloudFoundryClient cloudFoundryClient, + String buildId, + String applicationName, + Duration stagingTimeout) { + Duration timeout = Optional.ofNullable(stagingTimeout).orElse(Duration.ofMinutes(15)); + return cloudFoundryClient + .builds() + .get(GetBuildRequest.builder().buildId(buildId).build()) + .filter( + build -> + EnumSet.of(BuildState.STAGED, BuildState.FAILED) + .contains(build.getState())) + .repeatWhenEmpty( + exponentialBackOff(Duration.ofSeconds(1), Duration.ofSeconds(15), timeout)) + .filter(build -> build.getState() == BuildState.STAGED) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Build %s of Application %s failed during staging", + buildId, applicationName)) + .onErrorResume( + DelayTimeoutException.class, + t -> + ExceptionUtils.illegalState( + "Build %s of Application %s timed out during staging", + buildId, applicationName)); + } + + private static Mono waitForRunning( + CloudFoundryClient cloudFoundryClient, + String application, + String applicationId, + Duration startupTimeout) { + Duration timeout = Optional.ofNullable(startupTimeout).orElse(Duration.ofMinutes(5)); + + return requestApplicationInstances(cloudFoundryClient, applicationId) + .flatMapMany(response -> Flux.fromIterable(response.getInstances().values())) + .map(ApplicationInstanceInfo::getState) + .reduce("UNKNOWN", collectStates()) + .filter(isInstanceComplete()) + .repeatWhenEmpty( + exponentialBackOff(Duration.ofSeconds(1), Duration.ofSeconds(15), timeout)) + .filter(isRunning()) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Application %s failed during start", application)) + .onErrorResume( + DelayTimeoutException.class, + t -> + ExceptionUtils.illegalState( + "Application %s timed out during start", application)) + .then(); + } + + private static Mono waitForRunningV3( + CloudFoundryClient cloudFoundryClient, + String applicationName, + String applicationId, + Duration startupTimeout) { + Duration timeout = Optional.ofNullable(startupTimeout).orElse(Duration.ofMinutes(5)); + + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .listProcesses( + ListApplicationProcessesRequest.builder() + .applicationId(applicationId) + .page(page) + .build())) + .filter(p -> p.getInstances() != 0) + .flatMap( + process -> + cloudFoundryClient + .processes() + .getStatistics( + GetProcessStatisticsRequest.builder() + .processId(process.getId()) + .build()) + .flatMapIterable(GetProcessStatisticsResponse::getResources) + .map(ProcessStatisticsResource::getState) + .filter( + state -> + EnumSet.of( + ProcessState.RUNNING, + ProcessState.CRASHED) + .contains(state)) + .reduce( + (totalState, instanceState) -> + totalState.ordinal() + < instanceState.ordinal() + ? totalState + : instanceState) // CRASHED takes + // precedence over + // RUNNING + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + timeout)) + .filter(state -> state == ProcessState.RUNNING) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Process %s of Application %s failed during" + + " start", + process.getId(), applicationName)) + .onErrorResume( + DelayTimeoutException.class, + t -> + ExceptionUtils.illegalState( + "Process %s of Application %s timed" + + " out during start", + process.getId(), applicationName))) + .then(); + } + + private static Mono waitForStaging( + CloudFoundryClient cloudFoundryClient, + String application, + String applicationId, + Duration stagingTimeout) { + Duration timeout = Optional.ofNullable(stagingTimeout).orElse(Duration.ofMinutes(15)); + + return requestGetApplication(cloudFoundryClient, applicationId) + .map(response -> ResourceUtils.getEntity(response).getPackageState()) + .filter(isStagingComplete()) + .repeatWhenEmpty( + exponentialBackOff(Duration.ofSeconds(1), Duration.ofSeconds(15), timeout)) + .filter(isStaged()) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Application %s failed during staging", application)) + .onErrorResume( + DelayTimeoutException.class, + t -> + ExceptionUtils.illegalState( + "Application %s timed out during staging", application)) + .then(); + } + + private static Mono waitForUploadProcessingCompleted( + CloudFoundryClient cloudFoundryClient, String packageId, Duration processingTimeout) { + return cloudFoundryClient + .packages() + .get(GetPackageRequest.builder().packageId(packageId).build()) + .filter( + packageResponse -> + EnumSet.of( + PackageState.READY, + PackageState.FAILED, + PackageState.EXPIRED) + .contains(packageResponse.getState())) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), Duration.ofSeconds(15), processingTimeout)) + .filter(packageResponse -> packageResponse.getState() == PackageState.READY) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Package %s failed upload processing", packageId)) + .onErrorResume( + DelayTimeoutException.class, + t -> + ExceptionUtils.illegalState( + "Package %s timed out during upload processing", + packageId)); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ManifestV3RouteProtocol.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ManifestV3RouteProtocol.java new file mode 100644 index 00000000000..7e825897709 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/ManifestV3RouteProtocol.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The protocol of a {@link ManifestV3Route} + */ +public enum ManifestV3RouteProtocol { + + /** + * TCP protocol + */ + TCP("tcp"), + + /** + * HTTP1 protocol + */ + HTTP1("http1"), + + /** + * HTTP2 protocol + */ + HTTP2("http2"); + + private final String value; + + ManifestV3RouteProtocol(String value) { + this.value = value; + } + + @JsonCreator + public static ManifestV3RouteProtocol from(String s) { + switch (s.toLowerCase()) { + case "http1": + return HTTP1; + case "http2": + return HTTP2; + case "tcp": + return TCP; + default: + throw new IllegalArgumentException(String.format("Unknown protocol: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/RandomWords.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/RandomWords.java new file mode 100644 index 00000000000..6494b72f763 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/RandomWords.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +interface RandomWords { + + /** + * Returns a random adjective + * + * @return a random adjective + */ + String getAdjective(); + + /** + * Returns a random noun + * + * @return a random noun + */ + String getNoun(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/RouteUtils.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/RouteUtils.java new file mode 100644 index 00000000000..7a0c4940963 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/RouteUtils.java @@ -0,0 +1,107 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import java.util.Comparator; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; +import java.util.stream.Collectors; +import reactor.core.publisher.Mono; + +final class RouteUtils { + + private RouteUtils() {} + + static Mono decomposeRoute( + List availableDomains, String route, String routePath) { + String domain = null; + String host = null; + String path = null; + Integer port = null; + String routeWithoutSuffix = route; + + if (availableDomains.size() == 0) { + throw new IllegalArgumentException( + String.format("The route %s did not match any existing domains", route)); + } + + List sortedDomains = + availableDomains.stream() + .sorted( + Comparator.comparingInt( + domainSummary -> domainSummary.getName().length()) + .reversed()) + .collect(Collectors.toList()); + + if (route.contains("/")) { + int index = route.indexOf("/"); + path = routePath != null ? routePath : route.substring(index); + routeWithoutSuffix = route.substring(0, index); + } else if (hasPort(route)) { + port = getPort(route); + routeWithoutSuffix = route.substring(0, route.indexOf(":")); + } + + for (DomainSummary item : sortedDomains) { + if (isDomainMatch(routeWithoutSuffix, item.getName())) { + domain = item.getName(); + if (domain.length() < routeWithoutSuffix.length()) { + host = + routeWithoutSuffix.substring( + 0, routeWithoutSuffix.lastIndexOf(domain) - 1); + } + break; + } + } + + if (domain == null) { + throw new IllegalArgumentException( + String.format("The route %s did not match any existing domains", route)); + } + + if ((host != null || path != null) && port != null) { + throw new IllegalArgumentException( + String.format( + "The route %s is invalid: Host/path cannot be set with port", route)); + } + + return Mono.just( + DecomposedRoute.builder().domain(domain).host(host).path(path).port(port).build()); + } + + private static Integer getPort(String route) { + Pattern pattern = Pattern.compile(":\\d+$"); + Matcher matcher = pattern.matcher(route); + + matcher.find(); + return Integer.valueOf(route.substring(matcher.start() + 1, matcher.end())); + } + + private static Boolean hasPort(String route) { + Pattern pattern = Pattern.compile("^.+?:\\d+$"); + Matcher matcher = pattern.matcher(route); + + return matcher.matches(); + } + + private static boolean isDomainMatch(String route, String domain) { + return route.equals(domain) + || route.endsWith(domain) + && route.charAt(route.length() - domain.length() - 1) == '.'; + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/TaskState.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/TaskState.java new file mode 100644 index 00000000000..52435492937 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/TaskState.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; +import org.cloudfoundry.client.v3.tasks.Task; + +/** + * The state of the {@link Task} + */ +public enum TaskState { + + /** + * The canceling state + */ + CANCELING("CANCELING"), + + /** + * The failed state + */ + FAILED("FAILED"), + + /** + * The pending state + */ + PENDING("PENDING"), + + /** + * The running state + */ + RUNNING("RUNNING"), + + /** + * The succeeded state + */ + SUCCEEDED("SUCCEEDED"); + + private final String value; + + TaskState(String value) { + this.value = value; + } + + @JsonCreator + public static TaskState from(String s) { + switch (s) { + case "canceling": + return CANCELING; + case "failed": + return FAILED; + case "pending": + return PENDING; + case "running": + return RUNNING; + case "succeeded": + return SUCCEEDED; + default: + throw new IllegalArgumentException(String.format("Unknown task state: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return getValue(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/WordListRandomWords.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/WordListRandomWords.java new file mode 100644 index 00000000000..a21ad43b21c --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/WordListRandomWords.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import java.io.BufferedReader; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.security.SecureRandom; +import java.util.List; +import java.util.Random; +import java.util.stream.Collectors; +import java.util.stream.Stream; + +final class WordListRandomWords implements RandomWords { + + private static final Random RANDOM = new SecureRandom(); + + @Override + public String getAdjective() { + return Adjectives.WORDS.get(RANDOM.nextInt(Adjectives.WORDS.size())); + } + + @Override + public String getNoun() { + return Nouns.WORDS.get(RANDOM.nextInt(Nouns.WORDS.size())); + } + + private static BufferedReader getReader(String resourceName) { + InputStream inputStream = + WordListRandomWords.class.getClassLoader().getResourceAsStream(resourceName); + return new BufferedReader(new InputStreamReader(inputStream)); + } + + private static List getWordList(String resourceName) { + try (Stream stream = getReader(resourceName).lines()) { + return stream.map(String::trim).collect(Collectors.toList()); + } + } + + private static final class Adjectives { + + private static List WORDS = getWordList("adjectives.txt"); + } + + private static final class Nouns { + + private static List WORDS = getWordList("nouns.txt"); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationDetail.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationDetail.java new file mode 100644 index 00000000000..65ebcda873e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationDetail.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Date; +import java.util.List; + +/** + * A Cloud Foundry Application as returned by get + */ +@Value.Immutable +abstract class _ApplicationDetail extends AbstractApplicationSummary { + + /** + * The buildpacks, if any, used to stage this application + */ + @AllowNulls + @Nullable + abstract List getBuildpacks(); + + /** + * The list of instances + */ + abstract List getInstanceDetails(); + + /** + * The time the application was last updated + */ + @Nullable + abstract Date getLastUploaded(); + + /** + * The name of the stack running the application + */ + abstract String getStack(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationEnvironments.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationEnvironments.java new file mode 100644 index 00000000000..110bbc7c07e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationEnvironments.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * An environment of an application + */ +@Value.Immutable +abstract class _ApplicationEnvironments { + + /** + * The running environment variables + */ + @AllowNulls + abstract Map getRunning(); + + /** + * The staging environment variables + */ + @AllowNulls + abstract Map getStaging(); + + /** + * The system provided environment variables + */ + @AllowNulls + abstract Map getSystemProvided(); + + /** + * The user defined environment variables + */ + @AllowNulls + abstract Map getUserProvided(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationEvent.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationEvent.java new file mode 100644 index 00000000000..d86c8afe26c --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationEvent.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Date; + +/** + * An event of an application + */ +@Value.Immutable +abstract class _ApplicationEvent { + + /** + * The actor + */ + abstract String getActor(); + + /** + * The description + */ + abstract String getDescription(); + + /** + * The event + */ + abstract String getEvent(); + + /** + * The id + */ + abstract String getId(); + + /** + * The time + */ + @Nullable + abstract Date getTime(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationLog.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationLog.java new file mode 100644 index 00000000000..f8c805db0f5 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationLog.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * Represents an application log. + */ +@Value.Immutable +abstract class _ApplicationLog { + abstract String getSourceId(); + + abstract String getInstanceId(); + + abstract String getSourceType(); + + abstract String getMessage(); + + abstract ApplicationLogType getLogType(); + + abstract Long getTimestamp(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationLogsRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationLogsRequest.java new file mode 100644 index 00000000000..3cef13b20fc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationLogsRequest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a request for logs. + */ +@Value.Immutable +abstract class _ApplicationLogsRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * Whether only recent logs should be retrieved + */ + @Nullable + abstract Boolean getRecent(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationManifest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationManifest.java new file mode 100644 index 00000000000..1db2d4daf92 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationManifest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * An application manifest that captures some of the details of how an application is deployed. See the manifest + * definition for more details. + */ +@Value.Immutable +abstract class _ApplicationManifest extends _ApplicationManifestCommon { + + public abstract static class Builder implements _ApplicationManifestCommon.Builder{} + + /** + * The collection of service names bound to the application + */ + @Nullable + abstract List getServices(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationManifestCommon.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationManifestCommon.java new file mode 100644 index 00000000000..95d53c69302 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationManifestCommon.java @@ -0,0 +1,228 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.nio.file.Path; +import java.util.List; +import java.util.Map; + +/** + * An application manifest that captures some of the details of how an application is deployed. See the manifest + * definition for more details. + */ +abstract class _ApplicationManifestCommon { + interface Builder { + Builder buildpack(String element); + Builder buildpacks(String... elements); + Builder buildpacks(@Nullable Iterable elements); + Builder addAllBuildpacks(Iterable elements); + Builder command(@Nullable String command); + Builder disk(@Nullable Integer disk); + Builder docker(@Nullable Docker docker); + Builder domain(String element); + Builder domains(String... elements); + Builder domains(@Nullable Iterable elements); + Builder addAllDomains(Iterable elements); + Builder environmentVariable(String key, Object value); + Builder environmentVariable(Map.Entry entry); + Builder environmentVariables(@Nullable Map entries); + Builder putAllEnvironmentVariables(Map entries); + Builder healthCheckHttpEndpoint(@Nullable String healthCheckHttpEndpoint); + Builder healthCheckType(@Nullable ApplicationHealthCheck healthCheckType); + Builder host(String element); + Builder hosts(String... elements); + Builder hosts(@Nullable Iterable elements); + Builder addAllHosts(Iterable elements); + Builder instances(@Nullable Integer instances); + Builder memory(@Nullable Integer memory); + Builder name(String name); + Builder noHostname(@Nullable Boolean noHostname); + Builder noRoute(@Nullable Boolean noRoute); + Builder path(@Nullable Path path); + Builder randomRoute(@Nullable Boolean randomRoute); + Builder routePath(@Nullable String routePath); + Builder route(Route element); + Builder routes(Route... elements); + Builder routes(@Nullable Iterable elements); + Builder addAllRoutes(Iterable elements); + Builder stack(@Nullable String stack); + Builder timeout(@Nullable Integer timeout); + _ApplicationManifestCommon build(); + } + + @Value.Check + void check() { + if (getRoutes() != null) { + if (getHosts() != null) { + throw new IllegalStateException("routes and hosts cannot both be set"); + } + if (getDomains() != null) { + throw new IllegalStateException("routes and domains cannot both be set"); + } + if (getNoHostname() != null) { + throw new IllegalStateException("routes and noHostname cannot both be set"); + } + } + if (getDocker() != null) { + if (getDocker().getImage() != null && getBuildpacks() != null && !getBuildpacks().isEmpty()) { + throw new IllegalStateException("docker image and buildpack cannot both be set"); + } + + if (getDocker().getImage() != null && getPath() != null) { + throw new IllegalStateException("docker image and path cannot both be set"); + } + + if (getDocker().getImage() == null && (getDocker().getUsername() != null || getDocker().getPassword() != null)) { + throw new IllegalStateException("docker credentials require docker image to be set"); + } + + if (getDocker().getPassword() != null && getDocker().getUsername() == null) { + throw new IllegalStateException("Docker password requires username"); + } + + if (getDocker().getPassword() == null && getDocker().getUsername() != null) { + throw new IllegalStateException("Docker username requires password"); + } + } + } + + /** + * The buildpacks used by the application + */ + @Nullable + abstract List getBuildpacks(); + + /** + * The command used to execute the application + */ + @Nullable + abstract String getCommand(); + + /** + * The disk quota in megabytes + */ + @Nullable + abstract Integer getDisk(); + + /** + * The docker information + */ + @Nullable + abstract Docker getDocker(); + + /** + * The collection of domains bound to the application + */ + @Nullable + abstract List getDomains(); + + /** + * The environment variables to set on the application + */ + @AllowNulls + @Nullable + abstract Map getEnvironmentVariables(); + + /** + * The HTTP health check endpoint + */ + @Nullable + abstract String getHealthCheckHttpEndpoint(); + + /** + * The health check type + */ + @Nullable + abstract ApplicationHealthCheck getHealthCheckType(); + + /** + * The collection of hosts bound to the application + */ + @Nullable + abstract List getHosts(); + + /** + * The number of instances of the application + */ + @Nullable + abstract Integer getInstances(); + + /** + * The memory quota in megabytes + */ + @Nullable + abstract Integer getMemory(); + + /** + * The name of the application + */ + abstract String getName(); + + /** + * Map the the root domain to the app + */ + @Nullable + abstract Boolean getNoHostname(); + + /** + * Prevent a route being created for the app + */ + @Nullable + abstract Boolean getNoRoute(); + + /** + * The location of the application + */ + @Nullable + abstract Path getPath(); + + /** + * Generate a random route + */ + @Nullable + abstract Boolean getRandomRoute(); + + /** + * The route path for all applications + */ + @Nullable + abstract String getRoutePath(); + + /** + * The collection of routes bound to the application + */ + @Nullable + abstract List getRoutes(); + + /** + * The stack used to run the application + */ + @Nullable + abstract String getStack(); + + /** + * The number of seconds allowed for application start + */ + @Nullable + abstract Integer getTimeout(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationSshEnabledRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationSshEnabledRequest.java new file mode 100644 index 00000000000..2eaf80fc043 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationSshEnabledRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the check application ssh enabled operation + */ +@Value.Immutable +abstract class _ApplicationSshEnabledRequest { + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationSummary.java new file mode 100644 index 00000000000..c071f3c73ce --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ApplicationSummary.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Application as returned by list + */ +@Value.Immutable +abstract class _ApplicationSummary extends AbstractApplicationSummary { + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_CopySourceApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_CopySourceApplicationRequest.java new file mode 100644 index 00000000000..0ddfa1dcf59 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_CopySourceApplicationRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the copy source application operation + */ +@Value.Immutable +abstract class _CopySourceApplicationRequest { + + @Value.Check + void check() { + if (getTargetOrganization() != null && getTargetSpace() == null) { + throw new IllegalStateException("Cannot build CopySourceApplicationRequest, attribute targetSpace must be specified with targetOrganization"); + } + } + + /** + * The name of the application + */ + abstract String getName(); + + /** + * Whether to restart the target application + */ + @Nullable + abstract Boolean getRestart(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The name of the target application + */ + abstract String getTargetName(); + + /** + * The organization of the target application + */ + @Nullable + abstract String getTargetOrganization(); + + /** + * The space of the target application + */ + @Nullable + abstract String getTargetSpace(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DecomposedRoute.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DecomposedRoute.java new file mode 100644 index 00000000000..00e40629d16 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DecomposedRoute.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The components of a manifest route + */ +@Value.Immutable +abstract class _DecomposedRoute { + + /** + * The domain + */ + abstract String getDomain(); + + /** + * The host + */ + @Nullable + abstract String getHost(); + + /** + * The path + */ + @Nullable + abstract String getPath(); + + /** + * The port + */ + @Nullable + abstract Integer getPort(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DeleteApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DeleteApplicationRequest.java new file mode 100644 index 00000000000..b177bb518cb --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DeleteApplicationRequest.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the delete application operation + */ +@Value.Immutable +abstract class _DeleteApplicationRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * Whether to delete mapped routes + */ + @Nullable + abstract Boolean getDeleteRoutes(); + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DisableApplicationSshRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DisableApplicationSshRequest.java new file mode 100644 index 00000000000..1b05c762489 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DisableApplicationSshRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the disable application ssh operation + */ +@Value.Immutable +abstract class _DisableApplicationSshRequest { + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Docker.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Docker.java new file mode 100644 index 00000000000..2a8091a01f8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Docker.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Docker object representation + */ +@Value.Immutable +abstract class _Docker { + + /** + * The docker image + */ + @JsonProperty("image") + @Nullable + abstract String getImage(); + + /** + * The password for the docker repository + */ + @JsonProperty("password") + @Nullable + abstract String getPassword(); + + /** + * The username for the docker repository + */ + @JsonProperty("username") + @Nullable + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DomainSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DomainSummary.java new file mode 100644 index 00000000000..d4581b3c1e6 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_DomainSummary.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Domain object representation + */ +@Value.Immutable +abstract class _DomainSummary { + + /** + * The id of the domain + */ + abstract String getId(); + + /** + * The name of the domain + */ + abstract String getName(); + + /** + * The type of the domain + */ + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_EnableApplicationSshRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_EnableApplicationSshRequest.java new file mode 100644 index 00000000000..81ed2cd94af --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_EnableApplicationSshRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the enable application ssh operation + */ +@Value.Immutable +abstract class _EnableApplicationSshRequest { + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationEnvironmentsRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationEnvironmentsRequest.java new file mode 100644 index 00000000000..414fe752f12 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationEnvironmentsRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the get application environments operation + */ +@Value.Immutable +abstract class _GetApplicationEnvironmentsRequest { + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationEventsRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationEventsRequest.java new file mode 100644 index 00000000000..5db6986b064 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationEventsRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the get application events operation + */ +@Value.Immutable +abstract class _GetApplicationEventsRequest { + + /** + * The maximum number of events + */ + @Nullable + abstract Integer getMaxNumberOfEvents(); + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationHealthCheckRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationHealthCheckRequest.java new file mode 100644 index 00000000000..ddd2a5e901d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationHealthCheckRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the get health check operation + */ +@Value.Immutable +abstract class _GetApplicationHealthCheckRequest { + + /** + * The name of the application + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationManifestRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationManifestRequest.java new file mode 100644 index 00000000000..57b29734618 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationManifestRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the get application manifest operation + */ +@Value.Immutable +abstract class _GetApplicationManifestRequest { + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationRequest.java new file mode 100644 index 00000000000..852a2d8f40e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_GetApplicationRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the get application operation + */ +@Value.Immutable +abstract class _GetApplicationRequest { + + /** + * The application name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_InstanceDetail.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_InstanceDetail.java new file mode 100644 index 00000000000..c0a146668ab --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_InstanceDetail.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Date; + +/** + * Information about an instance of an application + */ +@Value.Immutable +abstract class _InstanceDetail { + + /** + * The CPU consumption of this instance + */ + @Nullable + abstract Double getCpu(); + + /** + * The diskUsage quota, in bytes, of this instance + */ + @Nullable + abstract Long getDiskQuota(); + + /** + * The disk usage, in bytes, of this instance + */ + @Nullable + abstract Long getDiskUsage(); + + /** + * The index of this instance + */ + abstract String getIndex(); + + /** + * The memoryUsage quota, in bytes, of this instance + */ + @Nullable + abstract Long getMemoryQuota(); + + /** + * The memory usage, in bytes, of this instance + */ + @Nullable + abstract Long getMemoryUsage(); + + /** + * The time this instance was created + */ + @Nullable + abstract Date getSince(); + + /** + * The state of the instance + */ + @Nullable + abstract String getState(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ListApplicationTasksRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ListApplicationTasksRequest.java new file mode 100644 index 00000000000..4972d2f1d7e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ListApplicationTasksRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the list application tasks operation + */ +@Value.Immutable +abstract class _ListApplicationTasksRequest { + + /** + * The name of the application + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_LogsRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_LogsRequest.java new file mode 100644 index 00000000000..76e5e3deb7b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_LogsRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the application logs operation + */ +@Value.Immutable +abstract class _LogsRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * Whether only recent logs should be retrieved + */ + @Nullable + abstract Boolean getRecent(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3.java new file mode 100644 index 00000000000..48188fc4cee --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + + +import org.immutables.value.Value; + +import java.util.List; + +/** + * An application manifest that captures some of the details of how an application is deployed. See the manifest + * definition for more details. + */ +@Value.Immutable +abstract class _ManifestV3 { + + public abstract List getApplications(); + + @Value.Default + public Integer getVersion() { + return 1; + } + + @Value.Check + void check() { + if (getVersion() != 1) { + throw new IllegalStateException("Only version 1 is allowed"); + } + if (getApplications().isEmpty()) { + throw new IllegalStateException("At least one application is required"); + } + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Application.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Application.java new file mode 100644 index 00000000000..b235a1eb5de --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Application.java @@ -0,0 +1,66 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; +import org.cloudfoundry.client.v3.Metadata; + +import java.util.List; +import java.util.Map; + +/** + * An application manifest that captures some of the details of how an application is deployed. See the manifest + * definition for more details. + */ +@Value.Immutable +abstract class _ManifestV3Application extends _ApplicationManifestCommon { + + /** + * Generate a default route based on the application name + */ + @Nullable + abstract Boolean getDefaultRoute(); + + /** + * The metadata for this application + */ + @Nullable + abstract Metadata getMetadata(); + + /** + * The collection of processes configured for this application + */ + @Nullable + abstract List getProcesses(); + + /** + * The collection of services bound to the application + */ + @Nullable + abstract List getServices(); + + /** + * The collection of sidecars configured for this application + */ + @Nullable + abstract List getSidecars(); + + public abstract static class Builder implements _ApplicationManifestCommon.Builder { + + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java new file mode 100644 index 00000000000..0504676d8b9 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Process.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + + +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v3.processes.HealthCheckType; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _ManifestV3Process { + + /** + * The command to launch this process + */ + @Nullable + abstract String getCommand(); + + /** + * The disk quota of this process + */ + @Nullable + abstract String getDisk(); + + /** + * The HTTP health check endpoint + */ + @Nullable + abstract String getHealthCheckHttpEndpoint(); + + /** + * The timeout in seconds for individual health check requests for http and port health checks + */ + @Nullable + abstract Integer getHealthCheckInvocationTimeout(); + + /** + * Type of health check to perform + */ + @Nullable + abstract HealthCheckType getHealthCheckType(); + + /** + * Type of rediness health check to perform + */ + @Nullable + abstract ReadinessHealthCheckType getReadinessHealthCheckType(); + + /** + * The HTTP rediness health check endpoint + */ + @Nullable + abstract String getReadinessHealthCheckHttpEndpoint(); + + /** + * The timeout in seconds for individual rediness health check requests for http and port health checks + */ + @Nullable + abstract Integer getReadinessHealthCheckInvocationTimeout(); + + /** + * The timeout in seconds for individual rediness health check requests for http and port health checks + */ + @Nullable + abstract Integer getReadinessHealthCheckInterval(); + + /** + * The number of instances of this process + */ + @Nullable + abstract Integer getInstances(); + + /** + * The memory quota of this process + */ + @Nullable + abstract String getMemory(); + + /** + * Time in seconds at which the health-check will report failure + */ + @Nullable + abstract Integer getTimeout(); + + /** + * The type of this process + */ + abstract String getType(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Service.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Service.java new file mode 100644 index 00000000000..bc0df847a7c --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Service.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _ManifestV3Service { + + @Nullable + abstract String getBindingName(); + + abstract String getName(); + + @Nullable + abstract Object getParameters(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Sidecar.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Sidecar.java new file mode 100644 index 00000000000..6dc2f6db64d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ManifestV3Sidecar.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _ManifestV3Sidecar { + + /** + * The command to launch this sidecar + */ + @Nullable + abstract String getCommand(); + + /** + * Memory in MB that the sidecar will be allocated + */ + @Nullable + abstract Integer getMemory(); + + /** + * The route URI + */ + abstract String getName(); + + /** + * List of processes to associate sidecar with + */ + @Nullable + abstract List getProcessTypes(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushApplicationManifestRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushApplicationManifestRequest.java new file mode 100644 index 00000000000..c8fbe537528 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushApplicationManifestRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; +import java.util.List; + +/** + * The request options for the push application operation + */ +@Value.Immutable +abstract class _PushApplicationManifestRequest { + + @Value.Check + void check() { + if (getDockerPassword() != null && getDockerUsername() == null) { + throw new IllegalStateException("Docker password requires username"); + } + + if (getDockerUsername() != null && getDockerPassword() == null) { + throw new IllegalStateException("Docker username requires password"); + } + } + + /** + * The Docker repository password + */ + @Nullable + abstract String getDockerPassword(); + + /** + * The Docker repository username + */ + @Nullable + abstract String getDockerUsername(); + + /** + * The manifests to be pushed + */ + abstract List getManifests(); + + /** + * Do not start the application after pushing + */ + @Nullable + abstract Boolean getNoStart(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushApplicationRequest.java new file mode 100644 index 00000000000..e30a537b4b4 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushApplicationRequest.java @@ -0,0 +1,207 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.List; + +/** + * The request options for the push application operation + */ +@Value.Immutable +abstract class _PushApplicationRequest { + + @SuppressWarnings("deprecation") + @Value.Check + void check() { + if (getApplication() == null && getPath() == null && getDockerImage() == null) { + throw new IllegalStateException("One of path or dockerImage must be supplied"); + } + + if ((getApplication() != null || getPath() != null) && getDockerImage() != null) { + throw new IllegalStateException("Only one of path or dockerImage can be supplied"); + } + + if (getDockerImage() == null && (getDockerPassword() != null || getDockerUsername() != null)) { + throw new IllegalStateException("Docker credentials require docker image to be set"); + } + + if (getDockerPassword() != null && getDockerUsername() == null) { + throw new IllegalStateException("Docker password requires username"); + } + + if (getDockerPassword() == null && getDockerUsername() != null) { + throw new IllegalStateException("Docker username requires password"); + } + } + + /** + * The path to the application + * + * @see #getPath() + * @see PushApplicationRequest.Builder#path(Path) + * @deprecated in favor of variants of {@code path} + */ + @Deprecated + @Nullable + abstract Path getApplication(); + + /** + * The buildpacks for the application + */ + @Nullable + abstract List getBuildpacks(); + + /** + * The custom start command for the application + */ + @Nullable + abstract String getCommand(); + + /** + * The disk quota in megabytes for the application + */ + @Nullable + abstract Integer getDiskQuota(); + + /** + * The Docker image for the application + */ + @Nullable + abstract String getDockerImage(); + + /** + * The Docker repository password + */ + @Nullable + abstract String getDockerPassword(); + + /** + * The Docker repository username + */ + @Nullable + abstract String getDockerUsername(); + + /** + * The domain for the application + */ + @Nullable + abstract String getDomain(); + + /** + * The HTTP health check endpoint + */ + @Nullable + abstract String getHealthCheckHttpEndpoint(); + + /** + * The health check type for the application + */ + @Nullable + abstract ApplicationHealthCheck getHealthCheckType(); + + /** + * The host for the application + */ + @Nullable + abstract String getHost(); + + /** + * The number of instances for the application + */ + @Nullable + abstract Integer getInstances(); + + /** + * The memory in megabytes for the application + */ + @Nullable + abstract Integer getMemory(); + + /** + * The name for the application + */ + abstract String getName(); + + /** + * Map the root domain to the application + */ + @Nullable + abstract Boolean getNoHostname(); + + /** + * Do not create a route for the application + */ + @Nullable + abstract Boolean getNoRoute(); + + /** + * Do not start the application after pushing + */ + @Nullable + abstract Boolean getNoStart(); + + /** + * The path for the application + */ + @Nullable + abstract Path getPath(); + + /** + * Use a random route for the application + */ + @Nullable + abstract Boolean getRandomRoute(); + + /** + * The route path for the application + */ + @Nullable + abstract String getRoutePath(); + + /** + * The stack for the application + */ + @Nullable + abstract String getStack(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The health check timeout + */ + @Nullable + abstract Integer getTimeout(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushManifestV3Request.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushManifestV3Request.java new file mode 100644 index 00000000000..17923a10653 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_PushManifestV3Request.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the push application operation + */ +@Value.Immutable +abstract class _PushManifestV3Request { + abstract ManifestV3 getManifest(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RenameApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RenameApplicationRequest.java new file mode 100644 index 00000000000..e6613583537 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RenameApplicationRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the rename application operation + */ +@Value.Immutable +abstract class _RenameApplicationRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * The new name of the application + */ + abstract String getNewName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestageApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestageApplicationRequest.java new file mode 100644 index 00000000000..b7d048c52df --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestageApplicationRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the restage application operation + */ +@Value.Immutable +abstract class _RestageApplicationRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestartApplicationInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestartApplicationInstanceRequest.java new file mode 100644 index 00000000000..ea3e4e74959 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestartApplicationInstanceRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the restart application instance operation + */ +@Value.Immutable +abstract class _RestartApplicationInstanceRequest { + + /** + * The index of the instance + */ + abstract Integer getInstanceIndex(); + + /** + * The name of the application + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestartApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestartApplicationRequest.java new file mode 100644 index 00000000000..8e86f5c98e5 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RestartApplicationRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the restart application operation + */ +@Value.Immutable +abstract class _RestartApplicationRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Route.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Route.java new file mode 100644 index 00000000000..a57090ad7dc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Route.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonDeserialize; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a route + */ +@JsonDeserialize +@Value.Immutable +abstract class _Route { + + /** + * The protocol + */ + @JsonProperty("protocol") + @Nullable + abstract ManifestV3RouteProtocol getProtocol(); + + /** + * The route + */ + @JsonProperty("route") + abstract String getRoute(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RunApplicationTaskRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RunApplicationTaskRequest.java new file mode 100644 index 00000000000..ac62a4bef4e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_RunApplicationTaskRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the run application task operation + */ +@Value.Immutable +abstract class _RunApplicationTaskRequest { + + /** + * The name of the application + */ + abstract String getApplicationName(); + + /** + * The command for the task + */ + abstract String getCommand(); + + /** + * The disk limit in megabytes + */ + @Nullable + abstract Integer getDisk(); + + /** + * The memory limit in megabytes + */ + @Nullable + abstract Integer getMemory(); + + /** + * The name of the task + */ + @Nullable + abstract String getTaskName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ScaleApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ScaleApplicationRequest.java new file mode 100644 index 00000000000..a2b3ae907f8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_ScaleApplicationRequest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the scale application operation + */ +@Value.Immutable +abstract class _ScaleApplicationRequest { + + /** + * The disk limit in MB + */ + @Nullable + abstract Integer getDiskLimit(); + + /** + * The number of instances + */ + @Nullable + abstract Integer getInstances(); + + /** + * The memory limit in MB + */ + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name of the application + */ + abstract String getName(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_SetApplicationHealthCheckRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_SetApplicationHealthCheckRequest.java new file mode 100644 index 00000000000..2c585e68408 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_SetApplicationHealthCheckRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the get health check operation + */ +@Value.Immutable +abstract class _SetApplicationHealthCheckRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * The health check type + */ + abstract ApplicationHealthCheck getType(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_SetEnvironmentVariableApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_SetEnvironmentVariableApplicationRequest.java new file mode 100644 index 00000000000..5fcdc978cf7 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_SetEnvironmentVariableApplicationRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the set environment variable of an application operation + */ +@Value.Immutable +abstract class _SetEnvironmentVariableApplicationRequest { + + /** + * The application name + */ + abstract String getName(); + + /** + * The variable name + */ + abstract String getVariableName(); + + /** + * The variable value + */ + abstract String getVariableValue(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_StartApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_StartApplicationRequest.java new file mode 100644 index 00000000000..81e411be042 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_StartApplicationRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the start application operation + */ +@Value.Immutable +abstract class _StartApplicationRequest { + + /** + * The name of the application + */ + abstract String getName(); + + /** + * How long to wait for staging + */ + @Value.Default + Duration getStagingTimeout() { + return Duration.ofMinutes(5); + } + + /** + * How long to wait for startup + */ + @Value.Default + Duration getStartupTimeout() { + return Duration.ofMinutes(5); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_StopApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_StopApplicationRequest.java new file mode 100644 index 00000000000..7b7c41238dd --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_StopApplicationRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the stop application operation + */ +@Value.Immutable +abstract class _StopApplicationRequest { + + /** + * The name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Task.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Task.java new file mode 100644 index 00000000000..e3cc5200cb7 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_Task.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Represents a task + */ +@Value.Immutable +abstract class _Task { + + /** + * The command for the task + */ + @Nullable + abstract String getCommand(); + + /** + * The name of the task + */ + abstract String getName(); + + /** + * The sequence id of the task + */ + abstract Integer getSequenceId(); + + /** + * The start time of the task + */ + abstract String getStartTime(); + + /** + * The state of the task + */ + abstract TaskState getState(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_TerminateApplicationTaskRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_TerminateApplicationTaskRequest.java new file mode 100644 index 00000000000..d8f379add18 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_TerminateApplicationTaskRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the terminate application task operation + */ +@Value.Immutable +abstract class _TerminateApplicationTaskRequest { + + /** + * The name of the application + */ + abstract String getApplicationName(); + + /** + * The sequence id of the task + */ + abstract Integer getSequenceId(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_UnsetEnvironmentVariableApplicationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_UnsetEnvironmentVariableApplicationRequest.java new file mode 100644 index 00000000000..575353132c3 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/applications/_UnsetEnvironmentVariableApplicationRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import org.immutables.value.Value; + +/** + * The request options for the set environment variable of an application operation + */ +@Value.Immutable +abstract class _UnsetEnvironmentVariableApplicationRequest { + + /** + * The application name + */ + abstract String getName(); + + /** + * The variable name + */ + abstract String getVariableName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/Buildpacks.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/Buildpacks.java new file mode 100644 index 00000000000..7a7db1a55ad --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/Buildpacks.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Buildpacks Operations API + */ +public interface Buildpacks { + + /** + * Create a new Buildpack + * + * @param request The Create Buildpack request + * @return a completion indicator + */ + Mono create(CreateBuildpackRequest request); + + /** + * Delete a Buildpack + * + * @param request The Delete Buildpack request + * @return a completion indicator + */ + Mono delete(DeleteBuildpackRequest request); + + /** + * Lists the buildpacks + * + * @return the buildpacks + */ + Flux list(); + + /** + * Rename a Buildpack + * + * @param request The Rename Buildpack request + * @return a completion indicator + */ + Mono rename(RenameBuildpackRequest request); + + /** + * Update a Buildpack + * + * @param request The Update Buildpack request + * @return a completion indicator + */ + Mono update(UpdateBuildpackRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/DefaultBuildpacks.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/DefaultBuildpacks.java new file mode 100644 index 00000000000..862992e1b15 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/DefaultBuildpacks.java @@ -0,0 +1,247 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.Optional; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.buildpacks.BuildpackResource; +import org.cloudfoundry.client.v3.buildpacks.BuildpackState; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackResponse; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; +import reactor.util.retry.Retry; + +public final class DefaultBuildpacks implements Buildpacks { + + private final CloudFoundryClient cloudFoundryClient; + + public DefaultBuildpacks(CloudFoundryClient cloudFoundryClient) { + this.cloudFoundryClient = cloudFoundryClient; + } + + /** + * Create a new instance. + * + * @deprecated Use {@link DefaultBuildpacks(CloudFoundryClient)} instead. + */ + @Deprecated + public DefaultBuildpacks(Mono cloudFoundryClient) { + this.cloudFoundryClient = + cloudFoundryClient.subscribeOn(Schedulers.boundedElastic()).block(); + } + + @Override + public Mono create(CreateBuildpackRequest request) { + return requestCreateBuildpack( + this.cloudFoundryClient, + request.getName(), + request.getPosition(), + request.getEnable()) + .flatMap( + response -> + requestUploadBuildpackBits( + response.getId(), request.getBuildpack())) + .map(UploadBuildpackResponse::getId) + .flatMap(this::waitForBuildpackReady) + .transform(OperationsLogging.log("Create Buildpack")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteBuildpackRequest request) { + return getBuildPackId(request.getName()) + .flatMap( + buildpackId -> deleteBuildpack(buildpackId, request.getCompletionTimeout())) + .transform(OperationsLogging.log("Delete Buildpack")) + .checkpoint(); + } + + @Override + public Flux list() { + return requestBuildpacks(this.cloudFoundryClient) + .map(this::toBuildpackResource) + .transform(OperationsLogging.log("List Buildpacks")) + .checkpoint(); + } + + @Override + public Mono rename(RenameBuildpackRequest request) { + return getBuildPackId(request.getName()) + .flatMap(buildpackId -> requestUpdateBuildpack(buildpackId, request.getNewName())) + .then() + .transform(OperationsLogging.log("Rename Buildpack")) + .checkpoint(); + } + + @Override + public Mono update(UpdateBuildpackRequest request) { + return getBuildPackId(request.getName()) + .flatMap( + buildpackId -> + Mono.when( + requestUpdateBuildpack(buildpackId, request), + uploadBuildpackBits(buildpackId, request)) + .then(Mono.just(buildpackId))) + .flatMap(this::waitForBuildpackReady) + .then() + .transform(OperationsLogging.log("Update Buildpack")) + .checkpoint(); + } + + private Mono deleteBuildpack(String buildpackId, Duration timeout) { + return requestDeleteBuildpack(buildpackId) + .flatMap(job -> JobUtils.waitForCompletion(this.cloudFoundryClient, timeout, job)); + } + + private Mono getBuildPackId(String name) { + return requestBuildpacks(name) + .singleOrEmpty() + .map(BuildpackResource::getId) + .switchIfEmpty(ExceptionUtils.illegalArgument("Buildpack %s not found", name)); + } + + private Flux requestBuildpacks(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .buildpacksV3() + .list(ListBuildpacksRequest.builder().page(page).build())); + } + + private Flux requestBuildpacks(String name) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .buildpacksV3() + .list( + ListBuildpacksRequest.builder() + .name(name) + .page(page) + .build())); + } + + private Mono requestCreateBuildpack( + CloudFoundryClient cloudFoundryClient, + String buildpackName, + Integer position, + Boolean enable) { + return cloudFoundryClient + .buildpacksV3() + .create( + org.cloudfoundry.client.v3.buildpacks.CreateBuildpackRequest.builder() + .name(buildpackName) + .position(position) + .enabled(Optional.ofNullable(enable).orElse(true)) + .build()); + } + + private Mono requestDeleteBuildpack(String buildpackId) { + return cloudFoundryClient + .buildpacksV3() + .delete( + org.cloudfoundry.client.v3.buildpacks.DeleteBuildpackRequest.builder() + .buildpackId(buildpackId) + .build()); + } + + private Mono requestUpdateBuildpack( + String buildpackId, UpdateBuildpackRequest request) { + return cloudFoundryClient + .buildpacksV3() + .update( + org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest.builder() + .buildpackId(buildpackId) + .enabled(request.getEnable()) + .locked(request.getLock()) + .position(request.getPosition()) + .build()); + } + + private Mono requestUpdateBuildpack(String buildpackId, String name) { + return cloudFoundryClient + .buildpacksV3() + .update( + org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest.builder() + .buildpackId(buildpackId) + .name(name) + .build()); + } + + private Mono requestUploadBuildpackBits( + String buildpackId, Path buildpack) { + return cloudFoundryClient + .buildpacksV3() + .upload( + UploadBuildpackRequest.builder() + .buildpackId(buildpackId) + .bits(buildpack) + .build()); + } + + private Buildpack toBuildpackResource(BuildpackResource entity) { + return Buildpack.builder() + .enabled(entity.getEnabled()) + .filename(entity.getFilename()) + .id(entity.getId()) + .locked(entity.getLocked()) + .name(entity.getName()) + .position(entity.getPosition()) + .stack(entity.getStack()) + .build(); + } + + private Mono uploadBuildpackBits(String buildpackId, UpdateBuildpackRequest request) { + if (request.getBuildpack() != null) { + return requestUploadBuildpackBits(buildpackId, request.getBuildpack()) + .then(Mono.empty()); + } + + return Mono.empty(); + } + + private Mono waitForBuildpackReady(String buildpackId) { + return requestBuildpack(buildpackId) + .flatMap( + buildpack -> { + if (!buildpack.getState().equals(BuildpackState.READY)) { + return Mono.error(new IllegalStateException("Not ready")); + } + return Mono.empty(); + }) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(1))) + .then(); + } + + private Mono requestBuildpack(String buildpackId) { + return cloudFoundryClient + .buildpacksV3() + .get(GetBuildpackRequest.builder().buildpackId(buildpackId).build()); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_Buildpack.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_Buildpack.java new file mode 100644 index 00000000000..f89c7b1d0d9 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_Buildpack.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * A Cloud Foundry Buildpack + */ +@Value.Immutable +abstract class _Buildpack { + + /** + * The enabled flag + */ + abstract Boolean getEnabled(); + + /** + * The filename + */ + @Nullable + abstract String getFilename(); + + /** + * The id + */ + abstract String getId(); + + /** + * The locked flag + */ + abstract Boolean getLocked(); + + /** + * The name + */ + abstract String getName(); + + /** + * The position + */ + abstract Integer getPosition(); + + /** + * The stack + */ + @Nullable + abstract String getStack(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_CreateBuildpackRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_CreateBuildpackRequest.java new file mode 100644 index 00000000000..7ba174bbbc1 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_CreateBuildpackRequest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.nio.file.Path; + +/** + * The request options for the create buildpack operation + */ +@Value.Immutable +abstract class _CreateBuildpackRequest { + + /** + * The path to the buildpack + */ + abstract Path getBuildpack(); + + /** + * Enables the buildpack to be used for staging + */ + @Nullable + abstract Boolean getEnable(); + + /** + * The buildpack name + */ + abstract String getName(); + + /** + * The buildpack position + */ + abstract Integer getPosition(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_DeleteBuildpackRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_DeleteBuildpackRequest.java new file mode 100644 index 00000000000..d56f004a7cc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_DeleteBuildpackRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the delete buildpack operation + */ +@Value.Immutable +abstract class _DeleteBuildpackRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The buildpack name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_RenameBuildpackRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_RenameBuildpackRequest.java new file mode 100644 index 00000000000..29d5fc553ef --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_RenameBuildpackRequest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import org.immutables.value.Value; + +/** + * The request options for the rename buildpack operation + */ +@Value.Immutable +abstract class _RenameBuildpackRequest { + + /** + * The buildpack name + */ + abstract String getName(); + + /** + * The new buildpack name + */ + abstract String getNewName(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_UpdateBuildpackRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_UpdateBuildpackRequest.java new file mode 100644 index 00000000000..7a4852aed8c --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/buildpacks/_UpdateBuildpackRequest.java @@ -0,0 +1,59 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.nio.file.Path; + +/** + * The request options for the update buildpack operation + */ +@Value.Immutable +abstract class _UpdateBuildpackRequest { + + /** + * The path to the buildpack + */ + @Nullable + abstract Path getBuildpack(); + + /** + * Enables the buildpack to be used for staging + */ + @Nullable + abstract Boolean getEnable(); + + /** + * Locks the buildpack to prevent changes + */ + @Nullable + abstract Boolean getLock(); + + /** + * The buildpack name + */ + abstract String getName(); + + /** + * The buildpack position + */ + @Nullable + abstract Integer getPosition(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/DefaultDomains.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/DefaultDomains.java new file mode 100644 index 00000000000..3df9c0d4a07 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/DefaultDomains.java @@ -0,0 +1,337 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.stream.Collectors; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsRequest; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.domains.ListDomainsRequest; +import org.cloudfoundry.client.v3.domains.ShareDomainResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsResponse; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DefaultDomains implements Domains { + + private final CloudFoundryClient cloudFoundryClient; + + private final RoutingClient routingClient; + + public DefaultDomains(CloudFoundryClient cloudFoundryClient, RoutingClient routingClient) { + this.cloudFoundryClient = cloudFoundryClient; + this.routingClient = routingClient; + } + + /** + * @deprecated use {@link DefaultDomains(CloudFoundryClient, RoutingClient)} instead. + */ + @Deprecated + public DefaultDomains( + Mono cloudFoundryClient, Mono routingClient) { + this.cloudFoundryClient = cloudFoundryClient.block(); + this.routingClient = routingClient.block(); + } + + @Override + public Mono create(CreateDomainRequest request) { + Mono> organizationId = + Mono.justOrEmpty(request.getOrganization()) + .flatMap(this::getOrganization) + .map(OrganizationResource::getId) + .map(Optional::of) + .defaultIfEmpty(Optional.empty()); + + Mono> groupId = + Mono.justOrEmpty(request.getRouterGroup()) + .flatMap(this::getRouterGroupId) + .map(Optional::of) + .defaultIfEmpty(Optional.empty()); + + return Mono.zip(organizationId, groupId) + .flatMap( + function( + (oId, gId) -> + requestCreateDomain( + request.getDomain(), + oId.orElse(null), + gId.orElse(null)))) + .then() + .transform(OperationsLogging.log("Create Domain")) + .checkpoint(); + } + + @Override + @Deprecated + public Mono createShared(CreateSharedDomainRequest request) { + return create( + CreateDomainRequest.builder() + .domain(request.getDomain()) + .routerGroup(request.getRouterGroup()) + .build()); + } + + @Override + public Flux list() { + return requestListRouterGroups() + .map(ListRouterGroupsResponse::getRouterGroups) + .map(DefaultDomains::indexRouterGroupsById) + .flatMapMany( + routerGroupsIndexedById -> + requestListDomains() + .map( + domain -> + DefaultDomains.toDomain( + domain, routerGroupsIndexedById))) + .transform(OperationsLogging.log("List Domains")) + .checkpoint(); + } + + @Override + public Flux listRouterGroups() { + return requestListRouterGroups() + .flatMapIterable(ListRouterGroupsResponse::getRouterGroups) + .map(DefaultDomains::toRouterGroup) + .transform(OperationsLogging.log("List Router Groups")) + .checkpoint(); + } + + @Override + public Mono share(ShareDomainRequest request) { + return Mono.zip( + getDomainId(request.getDomain()), + getOrganizationId(request.getOrganization())) + .flatMap(function(this::requestShareDomain)) + .then() + .transform(OperationsLogging.log("Share Domain")) + .checkpoint(); + } + + @Override + public Mono unshare(UnshareDomainRequest request) { + return Mono.zip( + getDomainId(request.getDomain()), + getOrganizationId(request.getOrganization())) + .flatMap(function(this::requestUnshareDomain)) + .transform(OperationsLogging.log("Unshare Domain")) + .checkpoint(); + } + + private Mono getOrganization(String organization) { + return requestOrganizations(organization) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Organization %s does not exist", organization)); + } + + private Mono getOrganizationId(String organization) { + return getOrganization(organization).map(OrganizationResource::getId); + } + + private Mono getDomainId(String domain) { + return this.requestListDomains() + .filter(d -> d.getName().equals(domain)) + .map(DomainResource::getId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Private domain %s does not exist", domain)); + } + + private Mono getPrivateDomain(String domain) { + return requestListPrivateDomains(domain) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Private domain %s does not exist", domain)); + } + + private Mono getPrivateDomainId(String domain) { + return getPrivateDomain(domain).map(ResourceUtils::getId); + } + + private Mono getRouterGroupId(String routerGroup) { + return requestListRouterGroups() + .flatMapIterable(ListRouterGroupsResponse::getRouterGroups) + .filter(group -> routerGroup.equals(group.getName())) + .single() + .map(org.cloudfoundry.routing.v1.routergroups.RouterGroup::getRouterGroupId); + } + + private Mono requestShareDomain(String domainId, String organizationId) { + return this.cloudFoundryClient + .domainsV3() + .share( + org.cloudfoundry.client.v3.domains.ShareDomainRequest.builder() + .domainId(domainId) + .data(Relationship.builder().id(organizationId).build()) + .build()); + } + + private Mono requestCreateDomain( + String domain, String organizationId, String routerGroupId) { + org.cloudfoundry.client.v3.domains.CreateDomainRequest.Builder createDomainRequest = + org.cloudfoundry.client.v3.domains.CreateDomainRequest.builder().name(domain); + if (organizationId != null) { + createDomainRequest.relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data(Relationship.builder().id(organizationId).build()) + .build()) + .build()); + } + if (routerGroupId != null) { + createDomainRequest.routerGroup( + org.cloudfoundry.client.v3.domains.RouterGroup.builder() + .id(routerGroupId) + .build()); + } + return this.cloudFoundryClient.domainsV3().create(createDomainRequest.build()); + } + + private Mono requestCreateSharedDomain( + String domain, String routerGroupId) { + return this.cloudFoundryClient + .sharedDomains() + .create( + org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainRequest.builder() + .name(domain) + .routerGroupId(routerGroupId) + .build()); + } + + private Flux requestListPrivateDomains(String domain) { + return PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .list( + ListPrivateDomainsRequest.builder() + .name(domain) + .page(page) + .build())); + } + + private Flux requestListDomains() { + return PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .domainsV3() + .list(ListDomainsRequest.builder().page(page).build())); + } + + private Mono requestListRouterGroups() { + return this.routingClient + .routerGroups() + .list( + org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsRequest.builder() + .build()); + } + + private Flux requestListSharedDomains() { + return PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private Flux requestOrganizations(String organization) { + return PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .list( + ListOrganizationsRequest.builder() + .name(organization) + .page(page) + .build())); + } + + private Mono requestUnshareDomain(String domainId, String organizationId) { + return this.cloudFoundryClient + .domainsV3() + .unshare( + org.cloudfoundry.client.v3.domains.UnshareDomainRequest.builder() + .organizationId(organizationId) + .domainId(domainId) + .build()); + } + + private static Domain toDomain(DomainResource entity, Map type) { + return Domain.builder() + .id(entity.getId()) + .name(entity.getName()) + .status( + entity.getRelationships().getOrganization().getData() != null + ? Status.OWNED + : Status.SHARED) + .type( + entity.getRouterGroup() != null + ? type.get(entity.getRouterGroup().getId()) + : null) + .build(); + } + + private static Map indexRouterGroupsById( + List routeGroups) { + return routeGroups.stream() + .collect( + Collectors.toMap( + org.cloudfoundry.routing.v1.routergroups.RouterGroup + ::getRouterGroupId, + org.cloudfoundry.routing.v1.routergroups.RouterGroup::getType)); + } + + private static RouterGroup toRouterGroup( + org.cloudfoundry.routing.v1.routergroups.RouterGroup group) { + return RouterGroup.builder() + .id(group.getRouterGroupId()) + .name(group.getName()) + .type(group.getType()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/Domains.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/Domains.java new file mode 100644 index 00000000000..e32fc01eada --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/Domains.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Domains Operations API + */ +public interface Domains { + + /** + * Create a new domain + * + * @param request The Create Domain request + * @return a completion indicator + */ + Mono create(CreateDomainRequest request); + + /** + * Create a new shared domain + * + * @param request the Create Shared Domain request + * @return a completion indicator + * @deprecated use {@link #create} instead + */ + @Deprecated + Mono createShared(CreateSharedDomainRequest request); + + /** + * Lists the domains + * + * @return the Domains + */ + Flux list(); + + /** + * Lists the router groups + * + * @return the Router Groups + */ + Flux listRouterGroups(); + + /** + * Share a private domain + * + * @param request The Share Domain request + * @return a completion indicator + */ + Mono share(ShareDomainRequest request); + + /** + * Unshare a private domain + * + * @param request The Unshare Domain request + * @return a completion indicator + */ + Mono unshare(UnshareDomainRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/Status.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/Status.java new file mode 100644 index 00000000000..d4355fc5b39 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/Status.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +/** + * The statuses of domains + */ +public enum Status { + + /** + * Domain is privately owned + */ + OWNED, + + /** + * Domain is shared + */ + SHARED +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_CreateDomainRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_CreateDomainRequest.java new file mode 100644 index 00000000000..04d4d2bcfc2 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_CreateDomainRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the create domain operation + */ +@Value.Immutable +abstract class _CreateDomainRequest { + + /** + * The domain name + */ + abstract String getDomain(); + + /** + * The organization name of the domain + */ + @Nullable + abstract String getOrganization(); + + /** + * The router group of the domain + */ + @Nullable + abstract String getRouterGroup(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_CreateSharedDomainRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_CreateSharedDomainRequest.java new file mode 100644 index 00000000000..d685de5ca6a --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_CreateSharedDomainRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the create shared domain operation + */ +@Value.Immutable +abstract class _CreateSharedDomainRequest { + + /** + * The domain name + */ + abstract String getDomain(); + + /** + * The router group name + */ + @Nullable + abstract String getRouterGroup(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_Domain.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_Domain.java new file mode 100644 index 00000000000..6eb5ebf0c8d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_Domain.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Domain object representation + */ +@Value.Immutable +abstract class _Domain { + + /** + * The id of the domain + */ + abstract String getId(); + + /** + * The name of the domain + */ + abstract String getName(); + + /** + * The status of the domain indicating shared or private ('owned') + */ + abstract Status getStatus(); + + /** + * The type of the domain + */ + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_RouterGroup.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_RouterGroup.java new file mode 100644 index 00000000000..d8bd022c45a --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_RouterGroup.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import org.immutables.value.Value; + +/** + * A Router Group + */ +@Value.Immutable +abstract class _RouterGroup { + + /** + * The id + */ + abstract String getId(); + + /** + * The name of the router group + */ + abstract String getName(); + + /** + * Type of the router group, e.g. tcp + */ + abstract String getType(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_ShareDomainRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_ShareDomainRequest.java new file mode 100644 index 00000000000..73eaf7a12f7 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_ShareDomainRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import org.immutables.value.Value; + +/** + * The request options for the share domain operation + */ +@Value.Immutable +abstract class _ShareDomainRequest { + + /** + * The domain name + */ + abstract String getDomain(); + + /** + * The organization name of the domain + */ + abstract String getOrganization(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_UnshareDomainRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_UnshareDomainRequest.java new file mode 100644 index 00000000000..b442ffb55aa --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/domains/_UnshareDomainRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import org.immutables.value.Value; + +/** + * The request options for the unshare domain operation + */ +@Value.Immutable +abstract class _UnshareDomainRequest { + + /** + * The domain name + */ + abstract String getDomain(); + + /** + * The organization name of the domain + */ + abstract String getOrganization(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/DefaultNetworkPolicies.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/DefaultNetworkPolicies.java new file mode 100644 index 00000000000..1865deb2c66 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/DefaultNetworkPolicies.java @@ -0,0 +1,286 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.util.List; +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.ApplicationResource; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.networking.v1.policies.CreatePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.DeletePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.Destination; +import org.cloudfoundry.networking.v1.policies.ListPoliciesRequest; +import org.cloudfoundry.networking.v1.policies.ListPoliciesResponse; +import org.cloudfoundry.networking.v1.policies.Ports; +import org.cloudfoundry.networking.v1.policies.Source; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.PaginationUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuples; + +public final class DefaultNetworkPolicies implements NetworkPolicies { + + private static final Integer DEFAULT_PORT = 8080; + + private static final String DEFAULT_PROTOCOL = "tcp"; + + private final Mono cloudFoundryClient; + + private final Mono networkingClient; + + private final Mono spaceId; + + public DefaultNetworkPolicies( + Mono cloudFoundryClient, + Mono networkingClient, + Mono spaceId) { + this.cloudFoundryClient = cloudFoundryClient; + this.networkingClient = networkingClient; + this.spaceId = spaceId; + } + + @Override + public Flux add(AddNetworkPolicyRequest request) { + return Mono.zip(this.cloudFoundryClient, this.networkingClient, this.spaceId) + .flatMapMany( + function( + (cloudFoundryClient, networkingClient, spaceId) -> + Mono.zip( + Mono.just(networkingClient), + getApplicationsByName( + cloudFoundryClient, spaceId)))) + .flatMap( + function( + (networkingClient, applications) -> + requestAddPolicy(networkingClient, applications, request))) + .transform(OperationsLogging.log("Add Network Policy")) + .checkpoint(); + } + + @Override + public Flux list(ListNetworkPoliciesRequest request) { + return Mono.zip(this.cloudFoundryClient, this.networkingClient, this.spaceId) + .flatMapMany( + function( + (cloudFoundryClient, networkingClient, spaceId) -> + Mono.zip( + getApplicationsById(cloudFoundryClient, spaceId), + getPolicies(networkingClient)))) + .flatMap( + function( + (applications, policies) -> + toPolicy(applications, policies, request))) + .transform(OperationsLogging.log("List Network Policies")) + .checkpoint(); + } + + @Override + public Flux remove(RemoveNetworkPolicyRequest request) { + return Mono.zip(this.cloudFoundryClient, this.networkingClient, this.spaceId) + .flatMapMany( + function( + (cloudFoundryClient, networkingClient, spaceId) -> + Mono.zip( + Mono.just(networkingClient), + getApplicationsByName( + cloudFoundryClient, spaceId)))) + .flatMap( + function( + (networkingClient, applications) -> + requestRemovePolicy( + networkingClient, applications, request))) + .transform(OperationsLogging.log("Remove Network Policy")) + .checkpoint(); + } + + private static Mono> getApplicationsById( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListApplications(cloudFoundryClient, spaceId) + .map(resource -> Tuples.of(resource.getId(), resource.getName())) + .collectMap(function((id, name) -> id), function((id, name) -> name)); + } + + private static Mono> getApplicationsByName( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListApplications(cloudFoundryClient, spaceId) + .map(resource -> Tuples.of(resource.getId(), resource.getName())) + .collectMap(function((id, name) -> name), function((id, name) -> id)); + } + + private static Mono> getPolicies( + NetworkingClient networkingClient) { + return requestListNetworkPolicies(networkingClient).map(ListPoliciesResponse::getPolicies); + } + + private static Mono requestAddPolicy( + NetworkingClient networkingClient, + Map applications, + AddNetworkPolicyRequest request) { + return networkingClient + .policies() + .create( + CreatePoliciesRequest.builder() + .policy( + org.cloudfoundry.networking.v1.policies.Policy.builder() + .destination( + Destination.builder() + .id( + applications.get( + request + .getDestination())) + .ports( + Ports.builder() + .end( + Optional + .ofNullable( + request + .getEndPort()) + .orElse( + request + .getStartPort() + != null + ? request + .getStartPort() + : DEFAULT_PORT)) + .start( + Optional + .ofNullable( + request + .getStartPort()) + .orElse( + request + .getEndPort() + != null + ? request + .getEndPort() + : DEFAULT_PORT)) + .build()) + .protocol( + Optional.ofNullable( + request + .getProtocol()) + .orElse( + DEFAULT_PROTOCOL)) + .build()) + .source( + Source.builder() + .id( + applications.get( + request + .getSource())) + .build()) + .build()) + .build()); + } + + private static Flux requestListApplications( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Mono requestListNetworkPolicies( + NetworkingClient networkingClient) { + return networkingClient.policies().list(ListPoliciesRequest.builder().build()); + } + + private static Mono requestRemovePolicy( + NetworkingClient networkingClient, + Map applications, + RemoveNetworkPolicyRequest request) { + return networkingClient + .policies() + .delete( + DeletePoliciesRequest.builder() + .policy( + org.cloudfoundry.networking.v1.policies.Policy.builder() + .destination( + Destination.builder() + .id( + applications.get( + request + .getDestination())) + .ports( + Ports.builder() + .end( + Optional + .ofNullable( + request + .getEndPort()) + .orElse( + request + .getStartPort())) + .start( + request + .getStartPort()) + .build()) + .protocol(request.getProtocol()) + .build()) + .source( + Source.builder() + .id( + applications.get( + request + .getSource())) + .build()) + .build()) + .build()); + } + + private static Flux toPolicy( + Map applications, + List policies, + ListNetworkPoliciesRequest request) { + return Flux.fromIterable(policies) + .filter( + policy -> + null != applications.get(policy.getSource().getId()) + && null + != applications.get( + policy.getDestination().getId())) + .filter( + policy -> + request.getSource() == null + || request.getSource() + .equals( + applications.get( + policy.getSource().getId()))) + .map( + policy -> + Policy.builder() + .destination( + applications.get(policy.getDestination().getId())) + .endPort(policy.getDestination().getPorts().getEnd()) + .startPort(policy.getDestination().getPorts().getStart()) + .protocol(policy.getDestination().getProtocol()) + .source(applications.get(policy.getSource().getId())) + .build()); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/NetworkPolicies.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/NetworkPolicies.java new file mode 100644 index 00000000000..a355e72935c --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/NetworkPolicies.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import reactor.core.publisher.Flux; + +/** + * Main entry point to the Cloud Foundry Network Policies Operations API + */ +public interface NetworkPolicies { + + /** + * Add a network policy + */ + Flux add(AddNetworkPolicyRequest request); + + /** + * Lists the network policies + * + * @return the network policies + */ + Flux list(ListNetworkPoliciesRequest request); + + /** + * Remove a network policy + */ + Flux remove(RemoveNetworkPolicyRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_AddNetworkPolicyRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_AddNetworkPolicyRequest.java new file mode 100644 index 00000000000..51994515628 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_AddNetworkPolicyRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the add network policy operation + */ +@Value.Immutable +abstract class _AddNetworkPolicyRequest { + + /** + * Name of the destination + */ + abstract String getDestination(); + + /** + * End of the port range + */ + @Nullable + abstract Integer getEndPort(); + + /** + * The protocol + */ + @Nullable + abstract String getProtocol(); + + /** + * Name of the source + */ + abstract String getSource(); + + /** + * Start of the port range + */ + @Nullable + abstract Integer getStartPort(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_ListNetworkPoliciesRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_ListNetworkPoliciesRequest.java new file mode 100644 index 00000000000..a4a64e8e63b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_ListNetworkPoliciesRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the list network policies operation + */ +@Value.Immutable +abstract class _ListNetworkPoliciesRequest { + + /** + * Name of the source to filter on + */ + @Nullable + abstract String getSource(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_Policy.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_Policy.java new file mode 100644 index 00000000000..5e91973d1ef --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_Policy.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Network Policy + */ +@Value.Immutable +abstract class _Policy { + + /** + * The destination + */ + abstract String getDestination(); + + /** + * The ending port + */ + abstract Integer getEndPort(); + + /** + * The protocol + */ + abstract String getProtocol(); + + /** + * The source + */ + abstract String getSource(); + + /** + * The starting port + */ + abstract Integer getStartPort(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_RemoveNetworkPolicyRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_RemoveNetworkPolicyRequest.java new file mode 100644 index 00000000000..69f02e93f43 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/networkpolicies/_RemoveNetworkPolicyRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the remove network policy operation + */ +@Value.Immutable +abstract class _RemoveNetworkPolicyRequest { + + /** + * Name of the destination + */ + abstract String getDestination(); + + /** + * End of the port range + */ + @Nullable + abstract Integer getEndPort(); + + /** + * The protocol + */ + abstract String getProtocol(); + + /** + * Name of the source + */ + abstract String getSource(); + + /** + * Start of the port range + */ + abstract Integer getStartPort(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/DefaultOrganizationAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/DefaultOrganizationAdmin.java new file mode 100644 index 00000000000..b6db6b32798 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/DefaultOrganizationAdmin.java @@ -0,0 +1,336 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.NoSuchElementException; +import java.util.Optional; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizationquotadefinitions.AbstractOrganizationQuotaDefinition; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DefaultOrganizationAdmin implements OrganizationAdmin { + + private final Mono cloudFoundryClient; + + public DefaultOrganizationAdmin(Mono cloudFoundryClient) { + this.cloudFoundryClient = cloudFoundryClient; + } + + @Override + public Mono createQuota(CreateQuotaRequest request) { + return this.cloudFoundryClient + .flatMap(cloudFoundryClient -> createOrganizationQuota(cloudFoundryClient, request)) + .map(DefaultOrganizationAdmin::toOrganizationQuota) + .transform(OperationsLogging.log("Create Organization Quota")) + .checkpoint(); + } + + @Override + public Mono deleteQuota(DeleteQuotaRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + getOrganizationQuotaId( + cloudFoundryClient, request.getName()))) + .flatMap(function(DefaultOrganizationAdmin::deleteOrganizationQuota)) + .transform(OperationsLogging.log("Delete Organization Quota")) + .checkpoint(); + } + + @Override + public Mono getQuota(GetQuotaRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + getOrganizationQuota(cloudFoundryClient, request.getName())) + .map(DefaultOrganizationAdmin::toOrganizationQuota) + .transform(OperationsLogging.log("Get Organization Quota")) + .checkpoint(); + } + + @Override + public Flux listQuotas() { + return this.cloudFoundryClient + .flatMapMany(DefaultOrganizationAdmin::requestListOrganizationQuotas) + .map(DefaultOrganizationAdmin::toOrganizationQuota) + .transform(OperationsLogging.log("List Organization Quotas")) + .checkpoint(); + } + + @Override + public Mono setQuota(SetQuotaRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, request.getOrganizationName()), + getOrganizationQuotaId( + cloudFoundryClient, request.getQuotaName()))) + .flatMap(function((DefaultOrganizationAdmin::requestUpdateOrganization))) + .then() + .transform(OperationsLogging.log("Set Organization Quota")) + .checkpoint(); + } + + @Override + public Mono updateQuota(UpdateQuotaRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationQuota( + cloudFoundryClient, request.getName()))) + .flatMap( + function( + (cloudFoundryClient, exitingQuotaDefinition) -> + updateOrganizationQuota( + cloudFoundryClient, + request, + exitingQuotaDefinition))) + .map(DefaultOrganizationAdmin::toOrganizationQuota) + .transform(OperationsLogging.log("Update Organization Quota")) + .checkpoint(); + } + + private static Mono createOrganizationQuota( + CloudFoundryClient cloudFoundryClient, CreateQuotaRequest request) { + return requestCreateOrganizationQuota( + cloudFoundryClient, + Optional.ofNullable(request.getApplicationInstanceLimit()).orElse(-1), + Optional.ofNullable(request.getInstanceMemoryLimit()).orElse(-1), + Optional.ofNullable(request.getMemoryLimit()).orElse(0), + request.getName(), + Optional.ofNullable(request.getAllowPaidServicePlans()).orElse(false), + Optional.ofNullable(request.getTotalReservedRoutePorts()).orElse(0), + Optional.ofNullable(request.getTotalRoutes()).orElse(0), + Optional.ofNullable(request.getTotalServices()).orElse(0)); + } + + private static Mono deleteOrganizationQuota( + CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String quotaId) { + return requestDeleteOrganizationQuota(cloudFoundryClient, quotaId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String name) { + return requestListOrganizations(cloudFoundryClient, name) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Organization %s does not exist", name)) + .map(ResourceUtils::getId); + } + + private static Mono getOrganizationQuota( + CloudFoundryClient cloudFoundryClient, String name) { + return requestListOrganizationQuotas(cloudFoundryClient, name) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Quota %s does not exist", name)); + } + + private static Mono getOrganizationQuotaId( + CloudFoundryClient cloudFoundryClient, String name) { + return getOrganizationQuota(cloudFoundryClient, name).map(ResourceUtils::getId); + } + + private static Mono requestCreateOrganizationQuota( + CloudFoundryClient cloudFoundryClient, + Integer applicationInstanceLimit, + Integer instanceMemoryLimit, + Integer memoryLimit, + String name, + Boolean nonBasicServicesAllowed, + Integer totalReservedRoutePorts, + Integer totalRoutes, + Integer totalServices) { + return cloudFoundryClient + .organizationQuotaDefinitions() + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(applicationInstanceLimit) + .instanceMemoryLimit(instanceMemoryLimit) + .memoryLimit(memoryLimit) + .name(name) + .nonBasicServicesAllowed(nonBasicServicesAllowed) + .totalReservedRoutePorts(totalReservedRoutePorts) + .totalRoutes(totalRoutes) + .totalServices(totalServices) + .build()); + } + + private static Mono requestDeleteOrganizationQuota( + CloudFoundryClient cloudFoundryClient, String quotaId) { + return cloudFoundryClient + .organizationQuotaDefinitions() + .delete( + DeleteOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId(quotaId) + .async(true) + .build()); + } + + private static Flux requestListOrganizationQuotas( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .page(page) + .build())); + } + + private static Flux requestListOrganizationQuotas( + CloudFoundryClient cloudFoundryClient, String name) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .name(name) + .page(page) + .build())); + } + + private static Flux requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String name) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(name) + .page(page) + .build())); + } + + private static Mono requestUpdateOrganization( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String quotaDefinitionId) { + return cloudFoundryClient + .organizations() + .update( + UpdateOrganizationRequest.builder() + .organizationId(organizationId) + .quotaDefinitionId(quotaDefinitionId) + .build()); + } + + private static Mono requestUpdateOrganizationQuota( + CloudFoundryClient cloudFoundryClient, + Integer applicationInstanceLimit, + Integer instanceMemoryLimit, + Integer memoryLimit, + String name, + Boolean nonBasicServicesAllowed, + String organizationQuotaDefinitionId, + Integer totalReservedRoutePorts, + Integer totalRoutes, + Integer totalServices) { + return cloudFoundryClient + .organizationQuotaDefinitions() + .update( + UpdateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(applicationInstanceLimit) + .instanceMemoryLimit(instanceMemoryLimit) + .memoryLimit(memoryLimit) + .name(name) + .organizationQuotaDefinitionId(organizationQuotaDefinitionId) + .nonBasicServicesAllowed(nonBasicServicesAllowed) + .totalReservedRoutePorts(totalReservedRoutePorts) + .totalRoutes(totalRoutes) + .totalServices(totalServices) + .build()); + } + + private static OrganizationQuota toOrganizationQuota( + AbstractOrganizationQuotaDefinition resource) { + OrganizationQuotaDefinitionEntity entity = ResourceUtils.getEntity(resource); + + return OrganizationQuota.builder() + .allowPaidServicePlans(entity.getNonBasicServicesAllowed()) + .applicationInstanceLimit(entity.getApplicationInstanceLimit()) + .id(ResourceUtils.getId(resource)) + .instanceMemoryLimit(entity.getInstanceMemoryLimit()) + .memoryLimit(entity.getMemoryLimit()) + .name(entity.getName()) + .totalReservedRoutePorts(entity.getTotalReservedRoutePorts()) + .totalRoutes(entity.getTotalRoutes()) + .totalServices(entity.getTotalServices()) + .build(); + } + + private static Mono updateOrganizationQuota( + CloudFoundryClient cloudFoundryClient, + UpdateQuotaRequest request, + OrganizationQuotaDefinitionResource resource) { + OrganizationQuotaDefinitionEntity existing = ResourceUtils.getEntity(resource); + + return requestUpdateOrganizationQuota( + cloudFoundryClient, + Optional.ofNullable(request.getApplicationInstanceLimit()).orElse(-1), + Optional.ofNullable(request.getInstanceMemoryLimit()) + .orElse(existing.getInstanceMemoryLimit()), + Optional.ofNullable(request.getMemoryLimit()).orElse(existing.getMemoryLimit()), + Optional.ofNullable(request.getNewName()).orElse(existing.getName()), + Optional.ofNullable(request.getAllowPaidServicePlans()) + .orElse(existing.getNonBasicServicesAllowed()), + ResourceUtils.getId(resource), + Optional.ofNullable(request.getTotalReservedRoutePorts()).orElse(0), + Optional.ofNullable(request.getTotalRoutes()).orElse(existing.getTotalRoutes()), + Optional.ofNullable(request.getTotalServices()) + .orElse(existing.getTotalServices())); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/OrganizationAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/OrganizationAdmin.java new file mode 100644 index 00000000000..d98b27216a9 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/OrganizationAdmin.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Organization Admin Operations API + */ +public interface OrganizationAdmin { + + /** + * Create an organization quota + * + * @param request The Create Quota request + * @return the organization quota + */ + Mono createQuota(CreateQuotaRequest request); + + /** + * Delete an organization quota + * + * @param request The Delete Quota request + * @return a completion indicator + */ + Mono deleteQuota(DeleteQuotaRequest request); + + /** + * Get the organization quota + * + * @param request The Get Quota request + * @return the organization quota + */ + Mono getQuota(GetQuotaRequest request); + + /** + * Lists the organization quotas + * + * @return the organization quotas + */ + Flux listQuotas(); + + /** + * Set the organization quota + * + * @param request The Set Quota request + * @return a completion indicator + */ + Mono setQuota(SetQuotaRequest request); + + /** + * Update an organization quota + * + * @param request The Update Quota request + * @return the organization quota + */ + Mono updateQuota(UpdateQuotaRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_CreateQuotaRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_CreateQuotaRequest.java new file mode 100644 index 00000000000..0b00fce8def --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_CreateQuotaRequest.java @@ -0,0 +1,75 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the create quota operation + */ +@Value.Immutable +abstract class _CreateQuotaRequest { + + /** + * Can provision instances of paid service plans + */ + @Nullable + abstract Boolean getAllowPaidServicePlans(); + + /** + * Total number of application instances + */ + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The application instance memory limit in mb + */ + @Nullable + abstract Integer getInstanceMemoryLimit(); + + /** + * Total amount of memory a space can have in mb + */ + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name + */ + abstract String getName(); + + /** + * Maximum number of routes that may be created with reserved ports + */ + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total number of routes + */ + @Nullable + abstract Integer getTotalRoutes(); + + /** + * Total number of service instances + */ + @Nullable + abstract Integer getTotalServices(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_DeleteQuotaRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_DeleteQuotaRequest.java new file mode 100644 index 00000000000..ee401813737 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_DeleteQuotaRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the delete quota operation + */ +@Value.Immutable +abstract class _DeleteQuotaRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The name of the quota + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_GetQuotaRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_GetQuotaRequest.java new file mode 100644 index 00000000000..21884f2f4b5 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_GetQuotaRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import org.immutables.value.Value; + +/** + * The request options for the get quota operation + */ +@Value.Immutable +abstract class _GetQuotaRequest { + + /** + * The name of the quota + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_OrganizationQuota.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_OrganizationQuota.java new file mode 100644 index 00000000000..8b597095d0b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_OrganizationQuota.java @@ -0,0 +1,72 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Quota + */ +@Value.Immutable +abstract class _OrganizationQuota { + + /** + * The allow paid service plans flag + */ + abstract Boolean getAllowPaidServicePlans(); + + /** + * The application instance limit + */ + abstract Integer getApplicationInstanceLimit(); + + /** + * The id + */ + abstract String getId(); + + /** + * The instance memory limit + */ + abstract Integer getInstanceMemoryLimit(); + + /** + * The memory limit + */ + abstract Integer getMemoryLimit(); + + /** + * The name + */ + abstract String getName(); + + /** + * Maximum number of routes that may be created with reserved ports + */ + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total routes + */ + abstract Integer getTotalRoutes(); + + /** + * The total services + */ + abstract Integer getTotalServices(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_SetQuotaRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_SetQuotaRequest.java new file mode 100644 index 00000000000..d5dce7190fd --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_SetQuotaRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import org.immutables.value.Value; + +/** + * The request options for the set quota operation + */ +@Value.Immutable +abstract class _SetQuotaRequest { + + /** + * The name of the organization on which the quota must be set + */ + abstract String getOrganizationName(); + + /** + * The name of the quota that will be set + */ + abstract String getQuotaName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_UpdateQuotaRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_UpdateQuotaRequest.java new file mode 100644 index 00000000000..a95c6f1592f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizationadmin/_UpdateQuotaRequest.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the update quota operation + */ +@Value.Immutable +abstract class _UpdateQuotaRequest { + + /** + * The allow paid service plans flag + */ + @Nullable + abstract Boolean getAllowPaidServicePlans(); + + /** + * Total number of application instances + */ + @Nullable + abstract Integer getApplicationInstanceLimit(); + + /** + * The instance memory limit + */ + @Nullable + abstract Integer getInstanceMemoryLimit(); + + /** + * The memory limit + */ + @Nullable + abstract Integer getMemoryLimit(); + + /** + * The name + */ + abstract String getName(); + + /** + * The new name + */ + @Nullable + abstract String getNewName(); + + /** + * Maximum number of routes that may be created with reserved ports + */ + @Nullable + abstract Integer getTotalReservedRoutePorts(); + + /** + * The total routes + */ + @Nullable + abstract Integer getTotalRoutes(); + + /** + * The total services + */ + @Nullable + abstract Integer getTotalServices(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/DefaultOrganizations.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/DefaultOrganizations.java new file mode 100644 index 00000000000..ab8c4eae51f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/DefaultOrganizations.java @@ -0,0 +1,515 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; +import static org.cloudfoundry.util.tuple.TupleUtils.predicate; + +import java.time.Duration; +import java.util.List; +import java.util.NoSuchElementException; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.operations.spaceadmin.SpaceQuota; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuple4; + +public final class DefaultOrganizations implements Organizations { + + private static final String SET_ROLES_BY_USERNAME_FEATURE_FLAG = "set_roles_by_username"; + + private final Mono cloudFoundryClient; + + private final Mono username; + + public DefaultOrganizations( + Mono cloudFoundryClient, Mono username) { + this.cloudFoundryClient = cloudFoundryClient; + this.username = username; + } + + @Override + public Mono create(CreateOrganizationRequest request) { + return Mono.zip(this.cloudFoundryClient, this.username) + .flatMap( + function( + (cloudFoundryClient, username) -> + Mono.zip( + Mono.just(cloudFoundryClient), + createOrganization(cloudFoundryClient, request), + getFeatureFlagEnabled( + cloudFoundryClient, + SET_ROLES_BY_USERNAME_FEATURE_FLAG), + Mono.just(username)))) + .filter( + predicate( + (cloudFoundryClient, + organizationId, + setRolesByUsernameEnabled, + username) -> setRolesByUsernameEnabled)) + .flatMap( + function( + (cloudFoundryClient, + organizationId, + setRolesByUsernameEnabled, + username) -> + setOrganizationManager( + cloudFoundryClient, organizationId, username))) + .transform(OperationsLogging.log("Create Organization")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteOrganizationRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + getOrganizationId(cloudFoundryClient, request.getName()))) + .flatMap(function(DefaultOrganizations::deleteOrganization)) + .transform(OperationsLogging.log("Delete Organization")) + .checkpoint(); + } + + @Override + public Mono get(OrganizationInfoRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganization(cloudFoundryClient, request.getName()))) + .flatMap( + function( + (cloudFoundryClient, organizationResource) -> + getAuxiliaryContent( + cloudFoundryClient, organizationResource) + .map( + function( + (domains, + organizationQuota, + spacesQuotas, + spaces) -> + toOrganizationDetail( + domains, + organizationQuota, + spacesQuotas, + spaces, + organizationResource, + request))))) + .transform(OperationsLogging.log("Get Organization")) + .checkpoint(); + } + + @Override + public Flux list() { + return this.cloudFoundryClient + .flatMapMany(DefaultOrganizations::requestOrganizations) + .map(DefaultOrganizations::toOrganizationSummary) + .transform(OperationsLogging.log("List Organizations")) + .checkpoint(); + } + + @Override + public Mono rename(RenameOrganizationRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId(cloudFoundryClient, request.getName()))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + requestUpdateOrganization( + cloudFoundryClient, + organizationId, + request.getNewName()))) + .then() + .transform(OperationsLogging.log("Rename Organization")) + .checkpoint(); + } + + private static Mono createOrganization( + CloudFoundryClient cloudFoundryClient, CreateOrganizationRequest request) { + return Mono.justOrEmpty(request.getQuotaDefinitionName()) + .flatMap( + quotaDefinitionName -> + getOrganizationQuotaDefinitionId( + cloudFoundryClient, quotaDefinitionName)) + .flatMap( + organizationQuotaDefinitionId -> + getCreateOrganizationId( + cloudFoundryClient, + request.getOrganizationName(), + organizationQuotaDefinitionId)) + .switchIfEmpty( + getCreateOrganizationId( + cloudFoundryClient, request.getOrganizationName(), null)); + } + + private static Mono deleteOrganization( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + String organizationId) { + return requestDeleteOrganization(cloudFoundryClient, organizationId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono, OrganizationQuota, List, List>> + getAuxiliaryContent( + CloudFoundryClient cloudFoundryClient, + OrganizationResource organizationResource) { + String organizationId = ResourceUtils.getId(organizationResource); + + return Mono.zip( + getDomainNames(cloudFoundryClient, organizationId), + getOrganizationQuota(cloudFoundryClient, organizationResource), + getSpaceQuotas(cloudFoundryClient, organizationId), + getSpaceNames(cloudFoundryClient, organizationId)); + } + + private static Mono getCreateOrganizationId( + CloudFoundryClient cloudFoundryClient, String organization, String quotaDefinitionId) { + return requestCreateOrganization(cloudFoundryClient, organization, quotaDefinitionId) + .map(ResourceUtils::getId); + } + + private static Mono> getDomainNames( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListPrivateDomains(cloudFoundryClient, organizationId) + .map(resource -> resource.getEntity().getName()) + .mergeWith( + requestListSharedDomains(cloudFoundryClient) + .map(resource -> resource.getEntity().getName())) + .collectList(); + } + + private static Mono getFeatureFlagEnabled( + CloudFoundryClient cloudFoundryClient, String featureFlag) { + return requestGetFeatureFlag(cloudFoundryClient, featureFlag) + .map(GetFeatureFlagResponse::getEnabled); + } + + private static Mono getOrganization( + CloudFoundryClient cloudFoundryClient, String organization) { + return requestOrganizations(cloudFoundryClient, organization) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Organization %s does not exist", organization)); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String organization) { + return getOrganization(cloudFoundryClient, organization).map(ResourceUtils::getId); + } + + private static Mono getOrganizationQuota( + CloudFoundryClient cloudFoundryClient, OrganizationResource resource) { + return requestOrganizationQuotaDefinition( + cloudFoundryClient, + ResourceUtils.getEntity(resource).getQuotaDefinitionId()) + .map(response -> toOrganizationQuota(response, resource)); + } + + private static Mono getOrganizationQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String quotaDefinitionName) { + return requestOrganizationQuotaDefinitions(cloudFoundryClient, quotaDefinitionName) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Organization quota %s does not exist", + quotaDefinitionName)); + } + + private static Mono getOrganizationQuotaDefinitionId( + CloudFoundryClient cloudFoundryClient, String quotaDefinitionName) { + return getOrganizationQuotaDefinition(cloudFoundryClient, quotaDefinitionName) + .map(ResourceUtils::getId); + } + + private static Mono> getSpaceNames( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestSpaces(cloudFoundryClient, organizationId) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .collectList(); + } + + private static Mono> getSpaceQuotas( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestSpaceQuotaDefinitions(cloudFoundryClient, organizationId) + .map(DefaultOrganizations::toSpaceQuota) + .collectList(); + } + + private static Mono + requestAssociateOrganizationManagerByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + return cloudFoundryClient + .organizations() + .associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build()); + } + + private static Mono + requestAssociateOrganizationUserByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + return cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organization, String quotaDefinitionId) { + return cloudFoundryClient + .organizations() + .create( + org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest.builder() + .name(organization) + .quotaDefinitionId(quotaDefinitionId) + .build()); + } + + private static Mono requestDeleteOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return cloudFoundryClient + .organizations() + .delete( + org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest.builder() + .organizationId(organizationId) + .async(true) + .build()); + } + + private static Mono requestGetFeatureFlag( + CloudFoundryClient cloudFoundryClient, String featureFlag) { + return cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(featureFlag).build()); + } + + private static Flux requestListPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListSharedDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private static Mono requestOrganizationQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String quotaDefinitionId) { + return cloudFoundryClient + .organizationQuotaDefinitions() + .get( + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId(quotaDefinitionId) + .build()); + } + + private static Flux requestOrganizationQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, String organizationQuotaDefinition) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .name(organizationQuotaDefinition) + .page(page) + .build())); + } + + private static Flux requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .build())); + } + + private static Flux requestOrganizations( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list(ListOrganizationsRequest.builder().page(page).build())); + } + + private static Flux requestSpaceQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Flux requestSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Mono requestUpdateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String newName) { + return cloudFoundryClient + .organizations() + .update( + UpdateOrganizationRequest.builder() + .organizationId(organizationId) + .name(newName) + .build()); + } + + private static Mono setOrganizationManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + return Mono.zip( + requestAssociateOrganizationManagerByUsername( + cloudFoundryClient, organizationId, username), + requestAssociateOrganizationUserByUsername( + cloudFoundryClient, organizationId, username)) + .then(); + } + + private static OrganizationDetail toOrganizationDetail( + List domains, + OrganizationQuota organizationQuota, + List spacesQuotas, + List spaces, + OrganizationResource organizationResource, + OrganizationInfoRequest organizationInfoRequest) { + return OrganizationDetail.builder() + .domains(domains) + .id(ResourceUtils.getId(organizationResource)) + .name(organizationInfoRequest.getName()) + .quota(organizationQuota) + .spaceQuotas(spacesQuotas) + .spaces(spaces) + .build(); + } + + private static OrganizationQuota toOrganizationQuota( + GetOrganizationQuotaDefinitionResponse response, OrganizationResource resource) { + return OrganizationQuota.builder() + .id(ResourceUtils.getId(response)) + .organizationId(ResourceUtils.getId(resource)) + .name(ResourceUtils.getEntity(response).getName()) + .totalMemoryLimit(ResourceUtils.getEntity(response).getMemoryLimit()) + .instanceMemoryLimit(ResourceUtils.getEntity(response).getInstanceMemoryLimit()) + .totalRoutes(ResourceUtils.getEntity(response).getTotalRoutes()) + .totalServiceInstances(ResourceUtils.getEntity(response).getTotalServices()) + .paidServicePlans(ResourceUtils.getEntity(response).getNonBasicServicesAllowed()) + .build(); + } + + private static OrganizationSummary toOrganizationSummary(OrganizationResource resource) { + return OrganizationSummary.builder() + .id(ResourceUtils.getId(resource)) + .name(ResourceUtils.getEntity(resource).getName()) + .build(); + } + + private static SpaceQuota toSpaceQuota(SpaceQuotaDefinitionResource resource) { + return SpaceQuota.builder() + .id(ResourceUtils.getId(resource)) + .organizationId(ResourceUtils.getEntity(resource).getOrganizationId()) + .name(ResourceUtils.getEntity(resource).getName()) + .totalMemoryLimit(ResourceUtils.getEntity(resource).getMemoryLimit()) + .instanceMemoryLimit(ResourceUtils.getEntity(resource).getInstanceMemoryLimit()) + .totalRoutes(ResourceUtils.getEntity(resource).getTotalRoutes()) + .totalServiceInstances(ResourceUtils.getEntity(resource).getTotalServices()) + .paidServicePlans(ResourceUtils.getEntity(resource).getNonBasicServicesAllowed()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/Organizations.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/Organizations.java new file mode 100644 index 00000000000..452ae31885a --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/Organizations.java @@ -0,0 +1,65 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Organizations operations API + */ +public interface Organizations { + + /** + * Creates a new organization. + * + * @param request the create organization request + * @return completion indicator + */ + Mono create(CreateOrganizationRequest request); + + /** + * Deletes a specific organization + * + * @param request the delete organization request + * @return completion indicator + */ + Mono delete(DeleteOrganizationRequest request); + + /** + * Gets an Organization's Information + * + * @param request the organization info request + * @return the organizations info + */ + Mono get(OrganizationInfoRequest request); + + /** + * Lists the organizations + * + * @return the organizations + */ + Flux list(); + + /** + * Renames a specific organization + * + * @param request the rename organization request + * @return completion indicator + */ + Mono rename(RenameOrganizationRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_CreateOrganizationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_CreateOrganizationRequest.java new file mode 100644 index 00000000000..de7331acc57 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_CreateOrganizationRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the create org operation + */ +@Value.Immutable +abstract class _CreateOrganizationRequest { + + /** + * The organization name + */ + abstract String getOrganizationName(); + + /** + * The quota definition name + */ + @Nullable + abstract String getQuotaDefinitionName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_DeleteOrganizationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_DeleteOrganizationRequest.java new file mode 100644 index 00000000000..e80d1ddeded --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_DeleteOrganizationRequest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the Delete Organization Operation + */ +@Value.Immutable +abstract class _DeleteOrganizationRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The name of the organization + */ + abstract String getName(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationDetail.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationDetail.java new file mode 100644 index 00000000000..5391c8617e9 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationDetail.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.cloudfoundry.operations.spaceadmin.SpaceQuota; +import org.immutables.value.Value; + +import java.util.List; + +/** + * A Cloud Foundry Organization + */ +@Value.Immutable +abstract class _OrganizationDetail { + + /** + * The domains bound to this organization + */ + abstract List getDomains(); + + /** + * The id + */ + abstract String getId(); + + /** + * The name + */ + abstract String getName(); + + /** + * The organization quota + */ + abstract OrganizationQuota getQuota(); + + /** + * The space quota of the organizations quota + */ + abstract List getSpaceQuotas(); + + /** + * The spaces in this organization + */ + abstract List getSpaces(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationInfoRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationInfoRequest.java new file mode 100644 index 00000000000..612a158439a --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationInfoRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.immutables.value.Value; + +/** + * The request options for the Organization Information Operation + */ +@Value.Immutable +abstract class _OrganizationInfoRequest { + + /** + * The name of the organization to get information about + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationQuota.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationQuota.java new file mode 100644 index 00000000000..45c729d7d02 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationQuota.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Quota + */ +@Value.Immutable +abstract class _OrganizationQuota { + + /** + * The id + */ + abstract String getId(); + + /** + * The instance memory limit + */ + abstract Integer getInstanceMemoryLimit(); + + /** + * The name + */ + abstract String getName(); + + /** + * The organization id + */ + abstract String getOrganizationId(); + + /** + * Whether paid service plans are allowed + */ + abstract Boolean getPaidServicePlans(); + + /** + * The total memory limit + */ + abstract Integer getTotalMemoryLimit(); + + /** + * The total number of routes + */ + abstract Integer getTotalRoutes(); + + /** + * The total number of service instances + */ + abstract Integer getTotalServiceInstances(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationSummary.java new file mode 100644 index 00000000000..3720a07ce98 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_OrganizationSummary.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Organization + */ +@Value.Immutable +abstract class _OrganizationSummary { + + /** + * The id + */ + abstract String getId(); + + /** + * The name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_RenameOrganizationRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_RenameOrganizationRequest.java new file mode 100644 index 00000000000..50aa75babfe --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/organizations/_RenameOrganizationRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import org.immutables.value.Value; + +/** + * The request options for the rename organization operation + */ +@Value.Immutable +abstract class _RenameOrganizationRequest { + + /** + * The name of the organization + */ + abstract String getName(); + + /** + * The new name of the organization + */ + abstract String getNewName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/DefaultRoutes.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/DefaultRoutes.java new file mode 100644 index 00000000000..776ac8cfcd9 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/DefaultRoutes.java @@ -0,0 +1,815 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.function.Function; +import java.util.function.UnaryOperator; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.Resource; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.routes.AbstractRouteResource; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsRequest; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesRequest; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v3.spaces.DeleteUnmappedRoutesRequest; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuples; + +public final class DefaultRoutes implements Routes { + + private final Mono cloudFoundryClient; + + private final Mono organizationId; + + private final Mono spaceId; + + public DefaultRoutes( + Mono cloudFoundryClient, + Mono organizationId, + Mono spaceId) { + this.cloudFoundryClient = cloudFoundryClient; + this.organizationId = organizationId; + this.spaceId = spaceId; + } + + @Override + public Mono check(CheckRouteRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (client, organizationId) -> + Mono.zip( + this.cloudFoundryClient, + getOptionalDomainIdByName( + client, + organizationId, + request.getDomain())))) + .flatMap( + function( + (client, domainId) -> + routeExists( + client, + domainId, + request.getHost(), + request.getPath()))) + .defaultIfEmpty(false) + .transform(OperationsLogging.log("Check Route Exists")) + .checkpoint(); + } + + private static Mono routeExists( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String path) { + return cloudFoundryClient + .domainsV3() + .checkReservedRoutes( + CheckReservedRoutesRequest.builder() + .domainId(domainId) + .host(host) + .path(path) + .build()) + .flatMap(response -> Mono.just(response.getMatchingRoute())); + } + + private static Mono getOptionalDomainIdByName( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + return listDomains(cloudFoundryClient, organizationId, new String[] {domain}) + .singleOrEmpty() + .map(resource -> resource.getId()); + } + + private static Flux listDomains( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String[] domainNamesFilter) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest.builder() + .names(domainNamesFilter) + .page(page) + .organizationId(organizationId) + .build())); + } + + @Override + public Mono create(CreateRouteRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceId( + cloudFoundryClient, + organizationId, + request.getSpace()), + getDomainId( + cloudFoundryClient, + organizationId, + request.getDomain())))) + .flatMap( + function( + (cloudFoundryClient, spaceId, domainId) -> + requestCreateRoute( + cloudFoundryClient, + domainId, + request.getHost(), + request.getPath(), + request.getPort(), + request.getRandomPort(), + spaceId) + .map(ResourceUtils::getEntity) + .flatMap( + routeEntity -> + Mono.justOrEmpty( + routeEntity.getPort())))) + .transform(OperationsLogging.log("Create Route")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteRouteRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getDomainId( + cloudFoundryClient, + organizationId, + request.getDomain())))) + .flatMap( + function( + (cloudFoundryClient, domainId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + getRouteId( + cloudFoundryClient, + request.getHost(), + request.getDomain(), + domainId, + request.getPath(), + request.getPort())))) + .flatMap(function(DefaultRoutes::deleteRoute)) + .transform(OperationsLogging.log("Delete Route")) + .checkpoint(); + } + + @Override + public Mono deleteOrphanedRoutes(DeleteOrphanedRoutesRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (client, spaceId) -> + Mono.zip( + this.cloudFoundryClient, + client.spacesV3() + .deleteUnmappedRoutes( + DeleteUnmappedRoutesRequest + .builder() + .spaceId(spaceId) + .build())))) + .flatMap( + function( + (client, job) -> + JobUtils.waitForCompletion( + client, request.getCompletionTimeout(), job))) + .transform(OperationsLogging.log("Delete Orphaned Routes")) + .checkpoint(); + } + + @Override + public Flux list(ListRoutesRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getAllDomains(cloudFoundryClient, organizationId), + getAllSpaces(cloudFoundryClient, organizationId)))) + .flatMapMany( + function( + (cloudFoundryClient, domains, spaces) -> + getRoutes( + cloudFoundryClient, + request, + this.organizationId, + this.spaceId) + .map( + route -> + Tuples.of( + cloudFoundryClient, + domains, + route, + spaces)))) + .flatMap( + function( + (cloudFoundryClient, domains, route, spaces) -> + Mono.zip( + getApplicationNames( + cloudFoundryClient, + ResourceUtils.getId(route)), + getDomainName( + domains, + ResourceUtils.getEntity(route) + .getDomainId()), + Mono.just(route), + getServiceName( + cloudFoundryClient, + ResourceUtils.getEntity(route)), + getSpaceName( + spaces, + ResourceUtils.getEntity(route) + .getSpaceId())))) + .map(function(DefaultRoutes::toRoute)) + .transform(OperationsLogging.log("List Routes")) + .checkpoint(); + } + + @Override + public Mono map(MapRouteRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrCreateRoute( + cloudFoundryClient, + organizationId, + spaceId, + request.getDomain(), + request.getHost(), + request.getPath(), + request.getPort(), + request.getRandomPort()), + getApplicationId( + cloudFoundryClient, + request.getApplicationName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, routeResource, applicationId) -> + requestAssociateRoute( + cloudFoundryClient, + applicationId, + ResourceUtils.getId(routeResource)))) + .then(Mono.justOrEmpty(request.getPort())) + .transform(OperationsLogging.log("Map Route")) + .checkpoint(); + } + + @Override + public Mono unmap(UnmapRouteRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getApplicationName(), + spaceId), + getDomainId( + cloudFoundryClient, + organizationId, + request.getDomain()) + .flatMap( + domainId -> + getRouteId( + cloudFoundryClient, + request.getHost(), + request.getDomain(), + domainId, + request.getPath(), + request + .getPort()))))) + .flatMap(function(DefaultRoutes::requestRemoveRouteFromApplication)) + .transform(OperationsLogging.log("Unmap Route")) + .checkpoint(); + } + + private static Mono> getAllDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestAllPrivateDomains(cloudFoundryClient, organizationId) + .map( + resource -> + Tuples.of( + ResourceUtils.getId(resource), + ResourceUtils.getEntity(resource).getName())) + .mergeWith( + requestAllSharedDomains(cloudFoundryClient) + .map( + resource -> + Tuples.of( + ResourceUtils.getId(resource), + ResourceUtils.getEntity(resource) + .getName()))) + .collectMap(function((id, name) -> id), function((id, name) -> name)); + } + + private static Mono> getAllSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestAllSpaces(cloudFoundryClient, organizationId) + .map( + resource -> + Tuples.of( + ResourceUtils.getId(resource), + ResourceUtils.getEntity(resource).getName())) + .collectMap(function((id, name) -> id), function((id, name) -> name)); + } + + private static Mono getApplication( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return requestApplications(cloudFoundryClient, application, spaceId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Application %s does not exist", application)); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return getApplication(cloudFoundryClient, application, spaceId).map(ResourceUtils::getId); + } + + private static Mono> getApplicationNames( + CloudFoundryClient cloudFoundryClient, String routeId) { + return requestApplications(cloudFoundryClient, routeId) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .collectList(); + } + + private static Mono> getDomain( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + return getDomains(cloudFoundryClient, organizationId, domain) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Domain %s does not exist", domain)); + } + + private static Mono getDomainId( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + return getDomain(cloudFoundryClient, organizationId, domain).map(ResourceUtils::getId); + } + + private static Mono getDomainName(Map domains, String domainId) { + return Mono.just(domains.get(domainId)); + } + + private static Flux> getDomains( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + return requestPrivateDomains(cloudFoundryClient, organizationId, domain) + .map((Function>) in -> in) + .switchIfEmpty(requestSharedDomains(cloudFoundryClient, domain)); + } + + private static Mono getOrCreateRoute( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String spaceId, + String domain, + String host, + String path, + Integer port, + Boolean randomPort) { + if (randomPort != null) { + return getDomainId(cloudFoundryClient, organizationId, domain) + .flatMap( + domainId -> + requestCreateRoute( + cloudFoundryClient, + domainId, + host, + path, + port, + randomPort, + spaceId)); + } + + return getDomainId(cloudFoundryClient, organizationId, domain) + .flatMap( + domainId -> + getRoute(cloudFoundryClient, domainId, host, path, port) + .cast(AbstractRouteResource.class) + .switchIfEmpty( + requestCreateRoute( + cloudFoundryClient, + domainId, + host, + path, + port, + randomPort, + spaceId))); + } + + private static Mono getRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String domain, + String host, + String path, + Integer port) { + return getRoute(cloudFoundryClient, domainId, host, path, port) + .switchIfEmpty( + ExceptionUtils.illegalArgument("Route for %s does not exist", domain)); + } + + private static Mono getRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port) { + if (port != null) { + return requestRoutes(cloudFoundryClient, domainId, null, null, port).singleOrEmpty(); + } else { + return requestRoutes(cloudFoundryClient, domainId, host, path, port) + .filter( + resource -> + isIdentical( + nullSafe(host), + ResourceUtils.getEntity(resource).getHost())) + .filter( + resource -> + isIdentical( + Optional.ofNullable(path).orElse(""), + ResourceUtils.getEntity(resource).getPath())) + .singleOrEmpty(); + } + } + + private static Mono getRouteId( + CloudFoundryClient cloudFoundryClient, + String host, + String domain, + String domainId, + String path, + Integer port) { + return getRoute(cloudFoundryClient, domainId, domain, host, path, port) + .map(ResourceUtils::getId); + } + + private static Flux getRoutes( + CloudFoundryClient cloudFoundryClient, + ListRoutesRequest request, + Mono organizationId, + Mono spaceId) { + if (Level.ORGANIZATION == request.getLevel()) { + return organizationId.flatMapMany( + organizationId1 -> + requestRoutes( + cloudFoundryClient, + builder -> builder.organizationId(organizationId1))); + } else { + return spaceId.flatMapMany( + spaceId1 -> requestSpaceRoutes(cloudFoundryClient, spaceId1)); + } + } + + private static Mono> getServiceInstanceName( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String spaceId) { + return requestListSpaceServiceInstances(cloudFoundryClient, spaceId) + .filter(resource -> serviceInstanceId.equals(ResourceUtils.getId(resource))) + .single() + .map(resource -> Optional.of(ResourceUtils.getEntity(resource).getName())); + } + + private static Mono> getServiceName( + CloudFoundryClient cloudFoundryClient, RouteEntity route) { + return Mono.justOrEmpty(route.getServiceInstanceId()) + .flatMap( + serviceInstanceId -> + getServiceInstanceName( + cloudFoundryClient, serviceInstanceId, route.getSpaceId())) + .defaultIfEmpty(Optional.empty()); + } + + private static Mono getSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return requestSpaces(cloudFoundryClient, organizationId, space) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Space %s does not exist", space)); + } + + private static Mono getSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return getSpace(cloudFoundryClient, organizationId, space).map(ResourceUtils::getId); + } + + private static Mono getSpaceName(Map spaces, String spaceId) { + return Mono.just(spaces.get(spaceId)); + } + + private static boolean isIdentical(String s, String t) { + return s == null ? t == null : s.equals(t); + } + + private static String nullSafe(String host) { + return host == null ? "" : host; + } + + private static Flux requestAllPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestAllSharedDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private static Flux requestAllSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestApplications( + CloudFoundryClient cloudFoundryClient, String routeId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest.builder() + .routeId(routeId) + .page(page) + .build())); + } + + private static Flux requestApplications( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Mono requestAssociateRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .applicationsV2() + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port, + Boolean randomPort, + String spaceId) { + + org.cloudfoundry.client.v2.routes.CreateRouteRequest.Builder builder = + org.cloudfoundry.client.v2.routes.CreateRouteRequest.builder(); + + if (randomPort != null && randomPort) { + builder.generatePort(true); + } else if (port != null) { + builder.port(port); + } else { + builder.host(host); + builder.path(path); + } + + return cloudFoundryClient + .routes() + .create(builder.domainId(domainId).spaceId(spaceId).build()); + } + + private static Mono deleteRoute( + CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String routeId) { + return requestDeleteRoute(cloudFoundryClient, routeId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono requestDeleteRoute( + CloudFoundryClient cloudFoundryClient, String routeId) { + return cloudFoundryClient + .routesV3() + .delete( + org.cloudfoundry.client.v3.routes.DeleteRouteRequest.builder() + .routeId(routeId) + .build()); + } + + private static Flux requestListSpaceServiceInstances( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .page(page) + .returnUserProvidedServiceInstances(true) + .spaceId(spaceId) + .build())); + } + + private static Flux requestPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .name(domain) + .page(page) + .build())); + } + + private static Mono requestRemoveRouteFromApplication( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .applicationsV2() + .removeRoute( + RemoveApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Flux requestRoutes( + CloudFoundryClient cloudFoundryClient, + UnaryOperator modifier) { + + org.cloudfoundry.client.v2.routes.ListRoutesRequest.Builder listBuilder = + modifier.apply(org.cloudfoundry.client.v2.routes.ListRoutesRequest.builder()); + + return PaginationUtils.requestClientV2Resources( + page -> cloudFoundryClient.routes().list(listBuilder.page(page).build())); + } + + private static Flux requestRoutes( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port) { + return requestRoutes( + cloudFoundryClient, + builder -> + builder.domainId(domainId) + .hosts( + Optional.ofNullable(host) + .map(Collections::singletonList) + .orElse(null)) + .paths( + Optional.ofNullable(path) + .map(Collections::singletonList) + .orElse(null)) + .port(Optional.ofNullable(port).orElse(null))); + } + + private static Flux requestSharedDomains( + CloudFoundryClient cloudFoundryClient, String domain) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list( + ListSharedDomainsRequest.builder() + .name(domain) + .page(page) + .build())); + } + + private static Flux requestSpaceRoutes( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listRoutes( + ListSpaceRoutesRequest.builder() + .spaceId(spaceId) + .page(page) + .build())); + } + + private static Flux requestSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .name(space) + .page(page) + .build())); + } + + private static Route toRoute( + List applications, + String domain, + RouteResource resource, + Optional service, + String space) { + RouteEntity entity = ResourceUtils.getEntity(resource); + Route.Builder builder = + Route.builder() + .applications(applications) + .domain(domain) + .host(entity.getHost()) + .id(ResourceUtils.getId(resource)) + .path(entity.getPath()) + .space(space); + + service.ifPresent(builder::service); + + return builder.build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/Level.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/Level.java new file mode 100644 index 00000000000..6550facfc22 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/Level.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +/** + * What level to query for routes at + */ +public enum Level { + + /** + * List routes for all the spaces in the current organisation + */ + ORGANIZATION, + + /** + * List routes for the current space in the current organisation + */ + SPACE +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/Routes.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/Routes.java new file mode 100644 index 00000000000..98972261a13 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/Routes.java @@ -0,0 +1,83 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Routes Operations API + */ +public interface Routes { + + /** + * Checks whether a route exists + * + * @param request the Check Route request + * @return whether the route exists + */ + Mono check(CheckRouteRequest request); + + /** + * Create a new route + * + * @param request The Create Route request + * @return the port number for the route, if applicable + */ + Mono create(CreateRouteRequest request); + + /** + * Remove a route + * + * @param request the Remove Route request + * @return a completion indicator + */ + Mono delete(DeleteRouteRequest request); + + /** + * Delete orphaned routes. + *

          + * Warning: this operation is not atomic and may delete routes which are in the process of being associated with applications. + * + * @return a completion indicator + */ + Mono deleteOrphanedRoutes(DeleteOrphanedRoutesRequest request); + + /** + * Lists the routes and the applications bound to those routes + * + * @param request the List Routes request + * @return the routes and the applications bound to those routes + */ + Flux list(ListRoutesRequest request); + + /** + * Add a URL route to an application + * + * @param request the Map Route request + * @return the port number for the route, if applicable + */ + Mono map(MapRouteRequest request); + + /** + * Remove a URL route from an application + * + * @param request the Unmap Route request + * @return a completion indicator + */ + Mono unmap(UnmapRouteRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_CheckRouteRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_CheckRouteRequest.java new file mode 100644 index 00000000000..2c494b1acda --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_CheckRouteRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the check route operation + */ +@Value.Immutable +abstract class _CheckRouteRequest { + + /** + * The domain of the route + */ + abstract String getDomain(); + + /** + * The host of the route + */ + @Nullable + abstract String getHost(); + + /** + * The path of the route. + *

          + * Note: the path is specified without a leading "/" + */ + @Nullable + abstract String getPath(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_CreateRouteRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_CreateRouteRequest.java new file mode 100644 index 00000000000..652be198e22 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_CreateRouteRequest.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the create route operation + */ +@Value.Immutable +abstract class _CreateRouteRequest { + + @Value.Check + void checkPorts() { + if (getRandomPort() != null && getRandomPort() && getPort() != null) { + throw new IllegalStateException("Only one of port and randomPort can be set"); + } + } + + @Value.Check + void checkSetup() { + if (portSet() && hostOrPathSet()) { + throw new IllegalStateException("Cannot set port/randomPort and hostname/path"); + } + } + + /** + * The domain of the route + */ + abstract String getDomain(); + + /** + * The host name of the route + */ + @Nullable + abstract String getHost(); + + /** + * The path of the route + */ + @Nullable + abstract String getPath(); + + /** + * The port of the route + */ + @Nullable + abstract Integer getPort(); + + /** + * Generate a random port + */ + @Nullable + abstract Boolean getRandomPort(); + + /** + * The space to create the route in + */ + abstract String getSpace(); + + private boolean hostOrPathSet() { + return getHost() != null || getPath() != null; + } + + private boolean portSet() { + return (getRandomPort() != null && getRandomPort()) || getPort() != null; + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_DeleteOrphanedRoutesRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_DeleteOrphanedRoutesRequest.java new file mode 100644 index 00000000000..845a9b871b8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_DeleteOrphanedRoutesRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the delete orphaned routes operation + */ +@Value.Immutable +abstract class _DeleteOrphanedRoutesRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_DeleteRouteRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_DeleteRouteRequest.java new file mode 100644 index 00000000000..b285d7a7871 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_DeleteRouteRequest.java @@ -0,0 +1,74 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the map route operation + */ +@Value.Immutable +abstract class _DeleteRouteRequest { + + @Value.Check + void checkSetup() { + if (getPort() != null && hostOrPathSet()) { + throw new IllegalStateException("Cannot specify port together with hostname and/or path"); + } + } + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The domain of the route + */ + abstract String getDomain(); + + /** + * The host of the route + */ + @Nullable + abstract String getHost(); + + /** + * The path of the route. + *

          + * Note: the path is specified without a leading "/" + */ + @Nullable + abstract String getPath(); + + /** + * The port of the route + */ + @Nullable + abstract Integer getPort(); + + private boolean hostOrPathSet() { + return getHost() != null || getPath() != null; + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_ListRoutesRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_ListRoutesRequest.java new file mode 100644 index 00000000000..35c9e4a3120 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_ListRoutesRequest.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the list routes operation + */ +@Value.Immutable +abstract class _ListRoutesRequest { + + /** + * A level to indicate which routes to list + */ + @Nullable + abstract Level getLevel(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_MapRouteRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_MapRouteRequest.java new file mode 100644 index 00000000000..57ec6cf9cc5 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_MapRouteRequest.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the map route operation + */ +@Value.Immutable +abstract class _MapRouteRequest { + + @Value.Check + void checkPorts() { + if (getRandomPort() != null && getRandomPort() && getPort() != null) { + throw new IllegalStateException("Only one of port and randomPort can be set"); + } + } + + @Value.Check + void checkSetup() { + if (portSet() && hostOrPathSet()) { + throw new IllegalStateException("Cannot set port/randomPort and hostname/path"); + } + } + + /** + * The name of the application to have a route added to it + */ + abstract String getApplicationName(); + + /** + * The domain of the route + */ + abstract String getDomain(); + + /** + * The host of the route + */ + @Nullable + abstract String getHost(); + + /** + * The path of the route. + *

          + * Note: the path is specified without a leading "/" + */ + @Nullable + abstract String getPath(); + + /** + * The port of the route + */ + @Nullable + abstract Integer getPort(); + + /** + * Generate a random port + */ + @Nullable + abstract Boolean getRandomPort(); + + private boolean hostOrPathSet() { + return getHost() != null || getPath() != null; + } + + private boolean portSet() { + return (getRandomPort() != null && getRandomPort()) || getPort() != null; + } + + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_Route.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_Route.java new file mode 100644 index 00000000000..bf7ac9ed5bc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_Route.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * A route and the applications that are bound to the route. + */ +@Value.Immutable +abstract class _Route { + + /** + * The applications bound to this route. + */ + abstract List getApplications(); + + /** + * The domain of this route + */ + abstract String getDomain(); + + /** + * The host of this route + */ + abstract String getHost(); + + /** + * The id + */ + abstract String getId(); + + /** + * The path of this route + */ + @Nullable + abstract String getPath(); + + /** + * The port of this route + */ + @Nullable + abstract String getPort(); + + /** + * The service of this route + */ + @Nullable + abstract String getService(); + + /** + * The name of the space of this route + */ + abstract String getSpace(); + + /** + * The type of this route + */ + @Nullable + abstract String getType(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_UnmapRouteRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_UnmapRouteRequest.java new file mode 100644 index 00000000000..796eacdb6c7 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/routes/_UnmapRouteRequest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the unmap route operation + */ +@Value.Immutable +abstract class _UnmapRouteRequest { + + @Value.Check + void checkSetup() { + if (getPort() != null && hostOrPathSet()) { + throw new IllegalStateException("Cannot specify port together with hostname and/or path"); + } + } + + /** + * The name of the application to remove a route from + */ + abstract String getApplicationName(); + + /** + * The domain of the route + */ + abstract String getDomain(); + + /** + * The host of the route + */ + @Nullable + abstract String getHost(); + + /** + * The path of the route + */ + @Nullable + abstract String getPath(); + + /** + * The port of the route + */ + @Nullable + abstract Integer getPort(); + + private boolean hostOrPathSet() { + return getHost() != null || getPath() != null; + } + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/Access.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/Access.java new file mode 100644 index 00000000000..52f5fd2c4c8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/Access.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +/** + * Access level for a service + */ +public enum Access { + + /** + * Service is available to all + */ + ALL, + + /** + * Service has limited availability + */ + LIMITED, + + /** + * Service is available to none + */ + NONE +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/DefaultServiceAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/DefaultServiceAdmin.java new file mode 100644 index 00000000000..9b965e04fe8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/DefaultServiceAdmin.java @@ -0,0 +1,818 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; +import static org.cloudfoundry.util.tuple.TupleUtils.predicate; + +import java.util.Collections; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerResponse; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokerEntity; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokerResource; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuples; + +public final class DefaultServiceAdmin implements ServiceAdmin { + + private final Mono cloudFoundryClient; + + private final Mono spaceId; + + public DefaultServiceAdmin(Mono cloudFoundryClient, Mono spaceId) { + this.cloudFoundryClient = cloudFoundryClient; + this.spaceId = spaceId; + } + + @Override + public Mono create(CreateServiceBrokerRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + requestCreateServiceBroker( + cloudFoundryClient, + request.getName(), + request.getUrl(), + request.getUsername(), + request.getPassword(), + request.getSpaceScoped(), + spaceId))) + .then() + .transform(OperationsLogging.log("Create Service Broker")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteServiceBrokerRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServiceBrokerId(cloudFoundryClient, request.getName()))) + .flatMap(function(DefaultServiceAdmin::requestDeleteServiceBroker)) + .transform(OperationsLogging.log("Delete Service Broker")) + .checkpoint(); + } + + @Override + public Mono disableServiceAccess(DisableServiceAccessRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServiceId(cloudFoundryClient, request.getServiceName()))) + .flatMap( + function( + (cloudFoundryClient, serviceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServicePlans(cloudFoundryClient, serviceId)))) + .flatMap( + function( + (cloudFoundryClient, servicePlans) -> + Mono.when( + updateServicePlanVisibilities( + cloudFoundryClient, request, servicePlans), + updateServicePlansPublicStatus( + cloudFoundryClient, + request, + servicePlans)))) + .then() + .transform(OperationsLogging.log("Disable Service Access")) + .checkpoint(); + } + + @Override + public Mono enableServiceAccess(EnableServiceAccessRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServiceId(cloudFoundryClient, request.getServiceName()))) + .flatMap( + function( + (cloudFoundryClient, serviceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServicePlans(cloudFoundryClient, serviceId)))) + .flatMap( + function( + (cloudFoundryClient, servicePlans) -> + Mono.when( + updateServicePlanVisibilities( + cloudFoundryClient, request, servicePlans), + updateServicePlansPublicStatus( + cloudFoundryClient, + request, + servicePlans)))) + .then() + .transform(OperationsLogging.log("Enable Service Access")) + .checkpoint(); + } + + @Override + public Flux list() { + return this.cloudFoundryClient + .flatMapMany(DefaultServiceAdmin::requestListServiceBrokers) + .map(this::toServiceBroker) + .transform(OperationsLogging.log("List Service Brokers")) + .checkpoint(); + } + + @Override + public Flux listServiceAccessSettings(ListServiceAccessSettingsRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + listServiceBrokers(cloudFoundryClient), + Mono.just(request), + requestListServicePlanVisibilities(cloudFoundryClient))) + .flatMapMany(function(DefaultServiceAdmin::collectServiceAccessSettings)) + .transform(OperationsLogging.log("List Service Access Settings")) + .checkpoint(); + } + + @Override + public Mono update(UpdateServiceBrokerRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServiceBrokerId(cloudFoundryClient, request.getName()))) + .flatMap( + function( + (cloudFoundryClient, serviceBrokerId) -> + requestUpdateServiceBroker( + cloudFoundryClient, request, serviceBrokerId))) + .then() + .transform(OperationsLogging.log("Update Service Broker")) + .checkpoint(); + } + + private static Flux collectServiceAccessSettings( + CloudFoundryClient cloudFoundryClient, + List brokers, + ListServiceAccessSettingsRequest request, + List visibilities) { + List brokerIds = + brokers.stream() + .filter(isRequiredServiceBroker(request.getBrokerName())) + .map(ResourceUtils::getId) + .collect(Collectors.toList()); + + if (brokerIds.size() == 0) { + throw new IllegalArgumentException( + String.format("Service Broker %s not found", request.getBrokerName())); + } + + return Mono.when( + validateOrganization(cloudFoundryClient, request.getOrganizationName()), + validateService(cloudFoundryClient, request.getServiceName())) + .thenMany(requestListServices(cloudFoundryClient, brokerIds)) + .filter(service -> isVisibleService(request, service)) + .collectList() + .flatMapMany( + services -> + getServicePlans(cloudFoundryClient, services) + .map(servicePlan -> Tuples.of(services, servicePlan))) + .flatMap( + function( + (services, servicePlan) -> + getOrganizationNames( + cloudFoundryClient, + servicePlan, + visibilities) + .map( + organizationNames -> + Tuples.of( + organizationNames, + services, + servicePlan)))) + .filter( + predicate( + (organizationNames, services, servicePlan) -> + isVisibleOrganization( + organizationNames, + request.getOrganizationName(), + servicePlan))) + .map( + function( + (organizationNames, services, servicePlan) -> + toServiceAccess( + brokers, + organizationNames, + services, + servicePlan))); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestListOrganizations(cloudFoundryClient, organizationName) + .singleOrEmpty() + .map(ResourceUtils::getId) + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Organization %s not found", organizationName)); + } + + private static Mono> getOrganizationNames( + CloudFoundryClient cloudFoundryClient, + ServicePlanResource servicePlan, + List visibilities) { + if (visibilities == null || visibilities.size() == 0) { + return Mono.just(Collections.emptyList()); + } + + return Flux.fromIterable(visibilities) + .filter( + visibility -> + servicePlan + .getMetadata() + .getId() + .equals(visibility.getEntity().getServicePlanId())) + .flatMap( + visibility -> + requestGetOrganization( + cloudFoundryClient, + visibility.getEntity().getOrganizationId())) + .map(organization -> ResourceUtils.getEntity(organization).getName()) + .collectList(); + } + + private static Mono getServiceBroker( + CloudFoundryClient cloudFoundryClient, String serviceBrokerName) { + return requestListServiceBrokers(cloudFoundryClient, serviceBrokerName) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Service Broker %s not found", serviceBrokerName)); + } + + private static Mono getServiceBrokerId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerName) { + return getServiceBroker(cloudFoundryClient, serviceBrokerName).map(ResourceUtils::getId); + } + + private static Mono getServiceId( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return requestListServices(cloudFoundryClient, serviceName) + .singleOrEmpty() + .map(ResourceUtils::getId) + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Service offering %s not found", serviceName)); + } + + private static Mono> getServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return requestListServicePlans(cloudFoundryClient, Collections.singletonList(serviceId)) + .collectList(); + } + + private static Flux getServicePlans( + CloudFoundryClient cloudFoundryClient, List services) { + List serviceIds = + services.stream().map(ResourceUtils::getId).collect(Collectors.toList()); + + return requestListServicePlans(cloudFoundryClient, serviceIds); + } + + private static Predicate isRequiredServiceBroker(String brokerName) { + if (brokerName == null || brokerName.isEmpty()) { + return broker -> true; + } else { + return broker -> brokerName.equals(ResourceUtils.getEntity(broker).getName()); + } + } + + private static boolean isUpdateableServicePlan( + String servicePlanName, ServicePlanResource servicePlan) { + return servicePlanName == null + || servicePlanName.isEmpty() + || servicePlanName.equals(ResourceUtils.getEntity(servicePlan).getName()); + } + + private static boolean isVisibleOrganization( + List organizationNames, + String requiredOrganization, + ServicePlanResource servicePlan) { + return ResourceUtils.getEntity(servicePlan).getPubliclyVisible() + || requiredOrganization == null + || requiredOrganization.isEmpty() + || organizationNames != null && organizationNames.contains(requiredOrganization); + } + + private static boolean isVisibleService( + ListServiceAccessSettingsRequest request, ServiceResource service) { + return request.getServiceName() == null + || request.getServiceName().isEmpty() + || request.getServiceName().equals(ResourceUtils.getEntity(service).getLabel()); + } + + private static Mono> listServiceBrokers( + CloudFoundryClient cloudFoundryClient) { + return requestListServiceBrokers(cloudFoundryClient) + .switchIfEmpty(ExceptionUtils.illegalArgument("No Service Brokers found")) + .collectList(); + } + + private static Flux listServicePlanVisibilityIds( + CloudFoundryClient cloudFoundryClient, List servicePlanIds) { + return requestListServicePlanVisibilities(cloudFoundryClient, servicePlanIds) + .map(ResourceUtils::getId); + } + + private static Flux listServicePlanVisibilityIds( + CloudFoundryClient cloudFoundryClient, + String organizationId, + List servicePlanIds) { + return requestListServicePlanVisibilities( + cloudFoundryClient, organizationId, servicePlanIds) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateServiceBroker( + CloudFoundryClient cloudFoundryClient, + String name, + String url, + String username, + String password, + Boolean isSpaceScoped, + String spaceId) { + return cloudFoundryClient + .serviceBrokers() + .create( + org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerRequest + .builder() + .name(name) + .brokerUrl(url) + .authenticationUsername(username) + .authenticationPassword(password) + .spaceId( + Optional.ofNullable(isSpaceScoped).orElse(false) + ? spaceId + : null) + .build()); + } + + private static Mono requestCreateServicePlanVisibility( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + return cloudFoundryClient + .servicePlanVisibilities() + .create( + CreateServicePlanVisibilityRequest.builder() + .organizationId(organizationId) + .servicePlanId(servicePlanId) + .build()); + } + + private static Mono requestDeleteServiceBroker( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return cloudFoundryClient + .serviceBrokers() + .delete( + org.cloudfoundry.client.v2.servicebrokers.DeleteServiceBrokerRequest + .builder() + .serviceBrokerId(serviceBrokerId) + .build()); + } + + private static Mono requestDeleteServicePlanVisibility( + CloudFoundryClient cloudFoundryClient, String visibilityId) { + return cloudFoundryClient + .servicePlanVisibilities() + .delete( + DeleteServicePlanVisibilityRequest.builder() + .async(true) + .servicePlanVisibilityId(visibilityId) + .build()); + } + + private static Mono requestGetOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return cloudFoundryClient + .organizations() + .get(GetOrganizationRequest.builder().organizationId(organizationId).build()); + } + + private static Flux requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .build())); + } + + private static Flux requestListServiceBrokers( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceBrokers() + .list(ListServiceBrokersRequest.builder().page(page).build())); + } + + private static Flux requestListServiceBrokers( + CloudFoundryClient cloudFoundryClient, String serviceBrokerName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(page) + .build())); + } + + private static Mono> requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .page(page) + .build())) + .collectList(); + } + + private static Flux requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, List servicePlanIds) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .page(page) + .servicePlanIds(servicePlanIds) + .build())); + } + + private static Flux requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, + String organizationId, + List servicePlanIds) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .organizationId(organizationId) + .page(page) + .servicePlanIds(servicePlanIds) + .build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, List services) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceIds(services) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, List brokerIds) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .page(page) + .serviceBrokerIds(brokerIds) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .page(page) + .label(serviceName) + .build())); + } + + private static Mono requestUpdateServiceBroker( + CloudFoundryClient cloudFoundryClient, + UpdateServiceBrokerRequest request, + String serviceBrokerId) { + return cloudFoundryClient + .serviceBrokers() + .update( + org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerRequest + .builder() + .serviceBrokerId(serviceBrokerId) + .name(request.getName()) + .brokerUrl(request.getUrl()) + .authenticationUsername(request.getUsername()) + .authenticationPassword(request.getPassword()) + .build()); + } + + private static Mono requestUpdateServicePlanPublicStatus( + CloudFoundryClient cloudFoundryClient, boolean publiclyVisible, String servicePlanId) { + return cloudFoundryClient + .servicePlans() + .update( + UpdateServicePlanRequest.builder() + .publiclyVisible(publiclyVisible) + .servicePlanId(servicePlanId) + .build()); + } + + private static ServiceAccess toServiceAccess( + List brokers, + List organizationNames, + List services, + ServicePlanResource servicePlan) { + Access access = Access.NONE; + if (organizationNames != null && organizationNames.size() > 0) { + access = Access.LIMITED; + } + if (ResourceUtils.getEntity(servicePlan).getPubliclyVisible()) { + access = Access.ALL; + } + + String servicePlanName = ResourceUtils.getEntity(servicePlan).getName(); + ServiceResource service = + services.stream() + .filter( + item -> + ResourceUtils.getId(item) + .equals(servicePlan.getEntity().getServiceId())) + .findFirst() + .orElseThrow( + () -> + new IllegalStateException( + String.format( + "Unable to find service for %s", + servicePlanName))); + + String serviceName = ResourceUtils.getEntity(service).getLabel(); + String brokerName = + brokers.stream() + .filter( + broker -> + ResourceUtils.getId(broker) + .equals( + ResourceUtils.getEntity(service) + .getServiceBrokerId())) + .map(broker -> ResourceUtils.getEntity(broker).getName()) + .findFirst() + .orElseThrow( + () -> + new IllegalStateException( + String.format( + "Unable to find broker for %s", + serviceName))); + + return ServiceAccess.builder() + .access(access) + .brokerName(brokerName) + .organizationNames(organizationNames) + .planName(servicePlanName) + .serviceName(serviceName) + .build(); + } + + private static Mono updateServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, + EnableServiceAccessRequest request, + List servicePlans) { + List servicePlanIds = + servicePlans.stream() + .filter( + servicePlan -> + isUpdateableServicePlan( + request.getServicePlanName(), servicePlan)) + .map(ResourceUtils::getId) + .collect(Collectors.toList()); + + if (request.getOrganizationName() != null && !request.getOrganizationName().isEmpty()) { + return getOrganizationId(cloudFoundryClient, request.getOrganizationName()) + .flatMapMany( + organizationId -> + Flux.fromIterable(servicePlanIds) + .flatMap( + servicePlanId -> + requestCreateServicePlanVisibility( + cloudFoundryClient, + organizationId, + servicePlanId))) + .then(); + } else { + return listServicePlanVisibilityIds(cloudFoundryClient, servicePlanIds) + .flatMap( + visibilityId -> + requestDeleteServicePlanVisibility( + cloudFoundryClient, visibilityId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + request.getCompletionTimeout(), + job))) + .then(); + } + } + + private static Mono updateServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, + DisableServiceAccessRequest request, + List servicePlans) { + List servicePlanIds = + servicePlans.stream() + .filter( + servicePlan -> + isUpdateableServicePlan( + request.getServicePlanName(), servicePlan)) + .map(ResourceUtils::getId) + .collect(Collectors.toList()); + + if (request.getOrganizationName() != null && !request.getOrganizationName().isEmpty()) { + return getOrganizationId(cloudFoundryClient, request.getOrganizationName()) + .flatMap( + organizationId -> + listServicePlanVisibilityIds( + cloudFoundryClient, + organizationId, + servicePlanIds) + .flatMap( + visibilityId -> + requestDeleteServicePlanVisibility( + cloudFoundryClient, + visibilityId) + .flatMap( + job -> + JobUtils + .waitForCompletion( + cloudFoundryClient, + request + .getCompletionTimeout(), + job))) + .then()); + } else { + return listServicePlanVisibilityIds(cloudFoundryClient, servicePlanIds) + .flatMap( + visibilityId -> + requestDeleteServicePlanVisibility( + cloudFoundryClient, visibilityId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + request.getCompletionTimeout(), + job))) + .then(); + } + } + + private static Mono updateServicePlansPublicStatus( + CloudFoundryClient cloudFoundryClient, + DisableServiceAccessRequest request, + List servicePlans) { + if (request.getOrganizationName() != null && !request.getOrganizationName().isEmpty()) { + return Mono.empty(); + } + + if (request.getServicePlanName() != null && !request.getServicePlanName().isEmpty()) { + return Mono.empty(); + } + + return Flux.fromIterable(servicePlans) + .filter(servicePlan -> ResourceUtils.getEntity(servicePlan).getPubliclyVisible()) + .flatMap( + servicePlan -> + requestUpdateServicePlanPublicStatus( + cloudFoundryClient, + false, + ResourceUtils.getId(servicePlan))) + .then(); + } + + private static Mono updateServicePlansPublicStatus( + CloudFoundryClient cloudFoundryClient, + EnableServiceAccessRequest request, + List servicePlans) { + if (request.getOrganizationName() != null && !request.getOrganizationName().isEmpty()) { + return Mono.empty(); + } + + return Flux.fromIterable(servicePlans) + .filter( + servicePlan -> + isUpdateableServicePlan(request.getServicePlanName(), servicePlan)) + .filter(servicePlan -> !ResourceUtils.getEntity(servicePlan).getPubliclyVisible()) + .flatMap( + servicePlan -> + requestUpdateServicePlanPublicStatus( + cloudFoundryClient, true, ResourceUtils.getId(servicePlan))) + .then(); + } + + private static Mono validateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + if (organizationName != null) { + return requestListOrganizations(cloudFoundryClient, organizationName) + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Organization %s not found", organizationName)) + .then(); + } else { + return Mono.empty(); + } + } + + private static Mono validateService( + CloudFoundryClient cloudFoundryClient, String serviceName) { + if (serviceName != null) { + return requestListServices(cloudFoundryClient, serviceName) + .switchIfEmpty( + ExceptionUtils.illegalArgument("Service %s not found", serviceName)) + .then(); + } else { + return Mono.empty(); + } + } + + private ServiceBroker toServiceBroker(ServiceBrokerResource resource) { + ServiceBrokerEntity entity = ResourceUtils.getEntity(resource); + + return ServiceBroker.builder() + .id(ResourceUtils.getId(resource)) + .name(entity.getName()) + .url(entity.getBrokerUrl()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/ServiceAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/ServiceAdmin.java new file mode 100644 index 00000000000..897fade7538 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/ServiceAdmin.java @@ -0,0 +1,81 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Service Admin API + */ +public interface ServiceAdmin { + + /** + * Create a new service broker + * + * @param request The Create Service Broker request + * @return a completion indicator + */ + Mono create(CreateServiceBrokerRequest request); + + /** + * Deletes a service broker + * + * @param request the Delete Service Broker request + * @return a completion indicator + */ + Mono delete(DeleteServiceBrokerRequest request); + + /** + * Disable service access + * + * @param request the Disable Service Access request + * @return a completion indicator + */ + Mono disableServiceAccess(DisableServiceAccessRequest request); + + /** + * Enable service access + * + * @param request the Enable Service Access request + * @return a completion indicator + */ + Mono enableServiceAccess(EnableServiceAccessRequest request); + + /** + * Lists the service brokers + * + * @return the service brokers + */ + Flux list(); + + /** + * Lists the service access settings + * + * @param request the List Service Access Settings request + * @return the service access settings + */ + Flux listServiceAccessSettings(ListServiceAccessSettingsRequest request); + + /** + * Update an existing service broker + * + * @param request The Update Service Broker request + * @return a completion indicator + */ + Mono update(UpdateServiceBrokerRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_CreateServiceBrokerRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_CreateServiceBrokerRequest.java new file mode 100644 index 00000000000..1b3c9c1efd2 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_CreateServiceBrokerRequest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * Request options for the create service broker operation + */ +@Value.Immutable +abstract class _CreateServiceBrokerRequest { + + /** + * The name of the service broker + */ + abstract String getName(); + + /** + * The password to authenticate with the broker + */ + abstract String getPassword(); + + /** + * Whether the service broker should be space scoped + */ + @Nullable + abstract Boolean getSpaceScoped(); + + /** + * The url of the service broker + */ + abstract String getUrl(); + + /** + * The username to authenticate with the broker + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_DeleteServiceBrokerRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_DeleteServiceBrokerRequest.java new file mode 100644 index 00000000000..70e70e074da --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_DeleteServiceBrokerRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.immutables.value.Value; + +/** + * Request options for the delete service broker operation + */ +@Value.Immutable +abstract class _DeleteServiceBrokerRequest { + + /** + * The name of the Service Broker + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_DisableServiceAccessRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_DisableServiceAccessRequest.java new file mode 100644 index 00000000000..3ced93712a4 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_DisableServiceAccessRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * Request options for the disable service access operation + */ +@Value.Immutable +abstract class _DisableServiceAccessRequest { + + /** + * How long to wait for the disable + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * Limit to this organization name + */ + @Nullable + abstract String getOrganizationName(); + + /** + * The name of the service to enable + */ + abstract String getServiceName(); + + /** + * Limit to this service plan name + */ + @Nullable + abstract String getServicePlanName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_EnableServiceAccessRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_EnableServiceAccessRequest.java new file mode 100644 index 00000000000..03712873480 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_EnableServiceAccessRequest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * Request options for the enable service access operation + */ +@Value.Immutable +abstract class _EnableServiceAccessRequest { + + /** + * How long to wait for the enable + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * Limit to this organization name + */ + @Nullable + abstract String getOrganizationName(); + + /** + * The name of the service to enable + */ + abstract String getServiceName(); + + /** + * Limit to this service plan name + */ + @Nullable + abstract String getServicePlanName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ListServiceAccessSettingsRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ListServiceAccessSettingsRequest.java new file mode 100644 index 00000000000..71d6fb77e86 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ListServiceAccessSettingsRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the list service access operation + */ +@Value.Immutable +abstract class _ListServiceAccessSettingsRequest { + + /** + * Limit the list to this broker name + */ + @Nullable + abstract String getBrokerName(); + + /** + * Limit the list to this organization name + */ + @Nullable + abstract String getOrganizationName(); + + /** + * Limit the list to this service name + */ + @Nullable + abstract String getServiceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ServiceAccess.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ServiceAccess.java new file mode 100644 index 00000000000..49a0a1cd583 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ServiceAccess.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * A Service Access + */ +@Value.Immutable +abstract class _ServiceAccess { + + /** + * The access + */ + abstract Access getAccess(); + + /** + * The broker name + */ + abstract String getBrokerName(); + + /** + * The organizations + */ + @Nullable + abstract List getOrganizationNames(); + + /** + * The plan name + */ + abstract String getPlanName(); + + /** + * The service name + */ + abstract String getServiceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ServiceBroker.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ServiceBroker.java new file mode 100644 index 00000000000..987cbf73509 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_ServiceBroker.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.immutables.value.Value; + +/** + * A Service Broker + */ +@Value.Immutable +abstract class _ServiceBroker { + + /** + * The id + */ + abstract String getId(); + + /** + * The name of the service broker + */ + abstract String getName(); + + /** + * The url of the service broker + */ + abstract String getUrl(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_UpdateServiceBrokerRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_UpdateServiceBrokerRequest.java new file mode 100644 index 00000000000..70352faf94d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/serviceadmin/_UpdateServiceBrokerRequest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.immutables.value.Value; + +/** + * Request options for the update service broker operation + */ +@Value.Immutable +abstract class _UpdateServiceBrokerRequest { + + /** + * The name of the service broker + */ + abstract String getName(); + + /** + * The password to authenticate with the broker + */ + abstract String getPassword(); + + /** + * The url of the service broker + */ + abstract String getUrl(); + + /** + * The username to authenticate with the broker + */ + abstract String getUsername(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/AbstractServiceInstanceSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/AbstractServiceInstanceSummary.java new file mode 100644 index 00000000000..dd44b87ae3b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/AbstractServiceInstanceSummary.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import java.util.List; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; + +/** + * A service instance summary base class + */ +public abstract class AbstractServiceInstanceSummary { + + /** + * The bound applications + */ + abstract List getApplications(); + + /** + * The service instance id + */ + abstract String getId(); + + /** + * The last operation for the service + */ + @Nullable + abstract String getLastOperation(); + + /** + * The maintenance info + */ + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The service instance name + */ + abstract String getName(); + + /** + * The managed service plan + */ + @Nullable + abstract String getPlan(); + + /** + * The name of the managed service + */ + @Nullable + abstract String getService(); + + /** + * The tags + */ + @Nullable + abstract List getTags(); + + /** + * The type of the service instance + */ + abstract ServiceInstanceType getType(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/DefaultServices.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/DefaultServices.java new file mode 100644 index 00000000000..5e5407eeb5f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/DefaultServices.java @@ -0,0 +1,1573 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import com.fasterxml.jackson.databind.ObjectMapper; +import java.io.IOException; +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.function.UnaryOperator; +import java.util.stream.Collectors; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.GetApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.serviceinstances.AbstractServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceinstances.BaseServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.LastOperation; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysRequest; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.client.v2.servicekeys.AbstractServiceKeyResource; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyEntity; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyResource; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanEntity; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityResource; +import org.cloudfoundry.client.v2.services.GetServiceRequest; +import org.cloudfoundry.client.v2.services.GetServiceResponse; +import org.cloudfoundry.client.v2.services.ServiceEntity; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.DeleteUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.RemoveUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.LastOperationUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuples; + +public final class DefaultServices implements Services { + + private static final int CF_ROUTE_SERVICE_ALREADY_BOUND = 130008; + + private static final int CF_SERVICE_ALREADY_BOUND = 90003; + + private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); + + private final Mono cloudFoundryClient; + + private final Mono organizationId; + + private final Mono spaceId; + + public DefaultServices( + Mono cloudFoundryClient, + Mono organizationId, + Mono spaceId) { + this.cloudFoundryClient = cloudFoundryClient; + this.spaceId = spaceId; + this.organizationId = organizationId; + } + + @Override + public Mono bind(BindServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getApplicationName(), + spaceId), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId, serviceInstanceId) -> + createServiceBinding( + cloudFoundryClient, + applicationId, + serviceInstanceId, + request.getParameters()))) + .then() + .transform(OperationsLogging.log("Bind Service Instance")) + .checkpoint(); + } + + @Override + public Mono bindRoute(BindRouteServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getDomainId( + cloudFoundryClient, + request.getDomainName(), + organizationId), + Mono.just(spaceId)))) + .flatMap( + function( + (cloudFoundryClient, domainId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getRouteId( + cloudFoundryClient, + request.getDomainName(), + domainId, + request.getHostname(), + request.getPath()), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, routeId, userProvidedServiceInstanceId) -> + createRouteBinding( + cloudFoundryClient, + routeId, + userProvidedServiceInstanceId, + request.getParameters()))) + .then() + .transform(OperationsLogging.log("Bind Route to Service Instance")) + .checkpoint(); + } + + @Override + public Mono createInstance(CreateServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(spaceId), + getServiceIdByName( + cloudFoundryClient, + spaceId, + request.getServiceName())))) + .flatMap( + function( + (cloudFoundryClient, spaceId, serviceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(spaceId), + getServicePlanIdByName( + cloudFoundryClient, + serviceId, + request.getPlanName())))) + .flatMap( + function( + (cloudFoundryClient, spaceId, planId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + createServiceInstance( + cloudFoundryClient, + spaceId, + planId, + request)))) + .flatMap(function(DefaultServices::waitForInstanceAction)) + .transform(OperationsLogging.log("Create Service Instance")) + .checkpoint(); + } + + @Override + public Mono createServiceKey(CreateServiceKeyRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, serviceInstanceId) -> + requestCreateServiceKey( + cloudFoundryClient, + serviceInstanceId, + request.getServiceKeyName(), + request.getParameters()))) + .then() + .transform(OperationsLogging.log("Create Service Key")) + .checkpoint(); + } + + @Override + public Mono createUserProvidedInstance(CreateUserProvidedServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + requestCreateUserProvidedServiceInstance( + cloudFoundryClient, + request.getName(), + request.getCredentials(), + request.getRouteServiceUrl(), + spaceId, + request.getSyslogDrainUrl(), + request.getTags()))) + .then() + .transform(OperationsLogging.log("Create User Provided Service Instance")) + .checkpoint(); + } + + @Override + public Mono deleteInstance(DeleteServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + getSpaceServiceInstance( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap(function(DefaultServices::deleteServiceInstance)) + .transform(OperationsLogging.log("Delete Service Instance")) + .checkpoint(); + } + + @Override + public Mono deleteServiceKey(DeleteServiceKeyRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, serviceInstanceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getServiceKey( + cloudFoundryClient, + serviceInstanceId, + request.getServiceKeyName()) + .map(ResourceUtils::getId)))) + .flatMap(function(DefaultServices::requestDeleteServiceKey)) + .transform(OperationsLogging.log("Delete Service Key")) + .checkpoint(); + } + + @Override + public Mono getInstance(GetServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceServiceInstance( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(resource), + getServicePlanEntity( + cloudFoundryClient, + ResourceUtils.getEntity(resource) + .getServicePlanId())))) + .flatMap( + function( + (cloudFoundryClient, resource, servicePlanEntity) -> + Mono.zip( + Mono.just(resource), + Mono.just( + Optional.ofNullable( + servicePlanEntity.getName())), + getBoundApplications( + cloudFoundryClient, + ResourceUtils.getId(resource)), + getServiceEntity( + cloudFoundryClient, + Optional.ofNullable( + servicePlanEntity + .getServiceId()))))) + .map(function(DefaultServices::toServiceInstance)) + .transform(OperationsLogging.log("Get Service Instance")) + .checkpoint(); + } + + @Override + public Mono getServiceKey(GetServiceKeyRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, serviceInstanceId) -> + getServiceKey( + cloudFoundryClient, + serviceInstanceId, + request.getServiceKeyName()))) + .map(DefaultServices::toServiceKey) + .transform(OperationsLogging.log("Get Service Key")) + .checkpoint(); + } + + @Override + public Flux listInstances() { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + cloudFoundryClient + .spaces() + .getSummary( + GetSpaceSummaryRequest.builder() + .spaceId(spaceId) + .build()))) + .flatMapMany(DefaultServices::toServiceInstanceSummary) + .transform(OperationsLogging.log("List Service Instances")) + .checkpoint(); + } + + @Override + public Flux listServiceKeys(ListServiceKeysRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMapMany( + function( + (cloudFoundryClient, serviceInstanceId) -> + requestListServiceInstanceServiceKeys( + cloudFoundryClient, serviceInstanceId))) + .map(DefaultServices::toServiceKey) + .transform(OperationsLogging.log("List Service Keys")) + .checkpoint(); + } + + @Override + public Flux listServiceOfferings(ListServiceOfferingsRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMapMany( + function( + (cloudFoundryClient, spaceId) -> + Optional.ofNullable(request.getServiceName()) + .map( + serviceName -> + getSpaceService( + cloudFoundryClient, + spaceId, + serviceName) + .flux()) + .orElse( + requestListServices( + cloudFoundryClient, spaceId)) + .map( + resource -> + Tuples.of( + cloudFoundryClient, + resource)))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + Mono.zip( + Mono.just(resource), + getServicePlans( + cloudFoundryClient, + ResourceUtils.getId(resource))))) + .map(function(DefaultServices::toServiceOffering)) + .transform(OperationsLogging.log("List Service Offerings")) + .checkpoint(); + } + + @Override + public Mono renameInstance(RenameServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceServiceInstance( + cloudFoundryClient, + request.getName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, serviceInstance) -> + renameServiceInstance( + cloudFoundryClient, + serviceInstance, + request.getNewName()))) + .then() + .transform(OperationsLogging.log("Rename Service Instance")) + .checkpoint(); + } + + @Override + public Mono unbind(UnbindServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getApplicationId( + cloudFoundryClient, + request.getApplicationName(), + spaceId), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, applicationId, serviceInstanceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + getServiceBindingId( + cloudFoundryClient, + applicationId, + serviceInstanceId, + request.getServiceInstanceName())))) + .flatMap(function(DefaultServices::deleteServiceBinding)) + .then() + .transform(OperationsLogging.log("Unbind Service Instance")) + .checkpoint(); + } + + @Override + public Mono unbindRoute(UnbindRouteServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getDomainId( + cloudFoundryClient, + request.getDomainName(), + organizationId), + Mono.just(spaceId)))) + .flatMap( + function( + (cloudFoundryClient, domainId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getRouteId( + cloudFoundryClient, + request.getDomainName(), + domainId, + request.getHostname(), + request.getPath()), + getSpaceServiceInstanceId( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap(function(DefaultServices::requestRemoveRoute)) + .then() + .transform(OperationsLogging.log("Unbind Route from Service Instance")) + .checkpoint(); + } + + @Override + public Mono updateInstance(UpdateServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(organizationId), + getSpaceServiceInstance( + cloudFoundryClient, + request.getServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, organizationId, serviceInstance) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(ResourceUtils.getId(serviceInstance)), + getOptionalValidatedServicePlanId( + cloudFoundryClient, + request.getPlanName(), + serviceInstance, + organizationId)))) + .flatMap( + function( + (cloudFoundryClient, serviceInstanceId, servicePlanId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + requestUpdateServiceInstance( + cloudFoundryClient, + request, + serviceInstanceId, + servicePlanId.orElse(null))))) + .flatMap(function(DefaultServices::waitForInstanceAction)) + .then() + .transform(OperationsLogging.log("Update Service Instance")) + .checkpoint(); + } + + @Override + public Mono updateUserProvidedInstance(UpdateUserProvidedServiceInstanceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.spaceId) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceUserProvidedServiceInstanceId( + cloudFoundryClient, + request + .getUserProvidedServiceInstanceName(), + spaceId)))) + .flatMap( + function( + (cloudFoundryClient, userProvidedServiceInstanceId) -> + updateUserProvidedServiceInstance( + cloudFoundryClient, + request, + userProvidedServiceInstanceId))) + .then() + .transform(OperationsLogging.log("Update User Provided Service Instance")) + .checkpoint(); + } + + private static Mono> checkVisibility( + CloudFoundryClient cloudFoundryClient, + String organizationId, + ServicePlanResource resource) { + String servicePlanId = ResourceUtils.getId(resource); + + if (resource.getEntity().getPubliclyVisible()) { + return Mono.just(Optional.of(servicePlanId)); + } + + return requestListServicePlanVisibilities(cloudFoundryClient, organizationId, servicePlanId) + .next() + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Service Plan %s is not visible to your organization", + resource.getEntity().getName())) + .thenReturn(Optional.of(servicePlanId)); + } + + private static Mono createRouteBinding( + CloudFoundryClient cloudFoundryClient, + String routeId, + String userProvidedServiceInstanceId, + Map parameters) { + return requestCreateRouteBinding( + cloudFoundryClient, routeId, userProvidedServiceInstanceId, parameters) + .onErrorResume( + ExceptionUtils.statusCode(CF_ROUTE_SERVICE_ALREADY_BOUND), + t -> Mono.empty()); + } + + private static Mono createServiceBinding( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String serviceInstanceId, + Map parameters) { + return requestCreateServiceBinding( + cloudFoundryClient, applicationId, serviceInstanceId, parameters) + .onErrorResume( + ExceptionUtils.statusCode(CF_SERVICE_ALREADY_BOUND), t -> Mono.empty()); + } + + private static Mono createServiceInstance( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String planId, + CreateServiceInstanceRequest request) { + return requestCreateServiceInstance( + cloudFoundryClient, + spaceId, + planId, + request.getServiceInstanceName(), + request.getParameters(), + request.getTags()) + .cast(AbstractServiceInstanceResource.class); + } + + private static Mono deleteServiceBinding( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + String serviceBindingId) { + return requestDeleteServiceBinding(cloudFoundryClient, serviceBindingId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono deleteServiceInstance( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + UnionServiceInstanceResource serviceInstance) { + if (isUserProvidedService(serviceInstance)) { + return requestDeleteUserProvidedServiceInstance( + cloudFoundryClient, ResourceUtils.getId(serviceInstance)); + } else { + return requestDeleteServiceInstance( + cloudFoundryClient, ResourceUtils.getId(serviceInstance)) + .flatMap( + response -> { + Object entity = response.getEntity(); + if (entity instanceof JobEntity) { + return JobUtils.waitForCompletion( + cloudFoundryClient, + completionTimeout, + (JobEntity) response.getEntity()); + } else { + return LastOperationUtils.waitForCompletion( + completionTimeout, + () -> + requestGetServiceInstance( + cloudFoundryClient, + ResourceUtils.getId( + serviceInstance)) + .map( + r -> + ResourceUtils.getEntity( + r) + .getLastOperation())); + } + }); + } + } + + private static Mono getApplication( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestListApplications(cloudFoundryClient, applicationName, spaceId) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Application %s does not exist", applicationName)); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return getApplication(cloudFoundryClient, applicationName, spaceId) + .map(ResourceUtils::getId); + } + + private static Mono> getBoundApplications( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return requestListServiceBindings(cloudFoundryClient, serviceInstanceId) + .map(resource -> ResourceUtils.getEntity(resource).getApplicationId()) + .flatMap(applicationId -> requestGetApplication(cloudFoundryClient, applicationId)) + .map(ResourceUtils::getEntity) + .map(ApplicationEntity::getName) + .collectList(); + } + + private static Mono getDomainId( + CloudFoundryClient cloudFoundryClient, String domain, String organizationId) { + return getPrivateDomainId(cloudFoundryClient, domain, organizationId) + .switchIfEmpty(getSharedDomainId(cloudFoundryClient, domain)) + .switchIfEmpty(ExceptionUtils.illegalArgument("Domain %s not found", domain)); + } + + @SuppressWarnings("unchecked") + private static String getExtraValue(String extra, String key) { + if (extra == null || extra.isEmpty()) { + return null; + } + + try { + return (String) OBJECT_MAPPER.readValue(extra, Map.class).get(key); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + private static Mono> getOptionalValidatedServicePlanId( + CloudFoundryClient cloudFoundryClient, + String planName, + UnionServiceInstanceResource serviceInstance, + String organizationId) { + if (planName == null || planName.isEmpty()) { + return Mono.just(Optional.empty()); + } + + String servicePlanId = serviceInstance.getEntity().getServicePlanId(); + + if (servicePlanId == null || servicePlanId.isEmpty()) { + return ExceptionUtils.illegalArgument( + "Plan does not exist for the %s service", + serviceInstance.getEntity().getName()); + } + + return getServiceId(cloudFoundryClient, servicePlanId) + .flatMap(serviceId -> requestGetService(cloudFoundryClient, serviceId)) + .filter(DefaultServices::isPlanUpdateable) + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Plan for the %s service cannot be updated", + serviceInstance.getEntity().getName())) + .flatMapMany( + response -> + requestListServicePlans( + cloudFoundryClient, ResourceUtils.getId(response))) + .filter(resource -> planName.equals(resource.getEntity().getName())) + .singleOrEmpty() + .switchIfEmpty( + ExceptionUtils.illegalArgument("New service plan %s not found", planName)) + .flatMap(resource -> checkVisibility(cloudFoundryClient, organizationId, resource)); + } + + private static Mono getPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String domain, String organizationId) { + return requestPrivateDomain(cloudFoundryClient, domain, organizationId) + .map(ResourceUtils::getId) + .singleOrEmpty(); + } + + private static Mono getRoute( + CloudFoundryClient cloudFoundryClient, + String domain, + String domainId, + String host, + String path) { + return getRoute(cloudFoundryClient, domainId, host, path) + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Route %s does not exist", + host == null ? domain : host + "." + domain)); + } + + private static Mono getRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String routePath) { + return requestRoutes(cloudFoundryClient, domainId, host, routePath) + .filter(resource -> isIdentical(host, ResourceUtils.getEntity(resource).getHost())) + .filter( + resource -> + isIdentical( + Optional.ofNullable(routePath).orElse(""), + ResourceUtils.getEntity(resource).getPath())) + .singleOrEmpty(); + } + + private static Mono getRouteId( + CloudFoundryClient cloudFoundryClient, + String domain, + String domainId, + String host, + String path) { + return getRoute(cloudFoundryClient, domain, domainId, host, path).map(ResourceUtils::getId); + } + + private static Mono getServiceBindingId( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String serviceInstanceId, + String serviceInstanceName) { + return requestListServiceBindings(cloudFoundryClient, applicationId, serviceInstanceId) + .singleOrEmpty() + .switchIfEmpty( + ExceptionUtils.illegalState( + "Service instance %s is not bound to application", + serviceInstanceName)) + .map(ResourceUtils::getId); + } + + private static Mono getServiceEntity( + CloudFoundryClient cloudFoundryClient, Optional serviceId) { + return Mono.justOrEmpty(serviceId) + .flatMap(serviceId1 -> requestGetService(cloudFoundryClient, serviceId1)) + .map(ResourceUtils::getEntity) + .switchIfEmpty(Mono.just(ServiceEntity.builder().build())); + } + + private static Mono getServiceId( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + return requestGetServicePlan(cloudFoundryClient, servicePlanId) + .map(response -> response.getEntity().getServiceId()); + } + + private static Mono getServiceIdByName( + CloudFoundryClient cloudFoundryClient, String spaceId, String service) { + return getSpaceService(cloudFoundryClient, spaceId, service).map(ResourceUtils::getId); + } + + private static Mono getServiceKey( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String serviceKey) { + return requestListServiceInstanceServiceKeys( + cloudFoundryClient, serviceInstanceId, serviceKey) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Service key %s does not exist", serviceKey)); + } + + private static Mono getServicePlanEntity( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + return Mono.justOrEmpty(servicePlanId) + .flatMap( + servicePlanId1 -> requestGetServicePlan(cloudFoundryClient, servicePlanId1)) + .map(ResourceUtils::getEntity) + .switchIfEmpty(Mono.just(ServicePlanEntity.builder().build())); + } + + private static Mono getServicePlanIdByName( + CloudFoundryClient cloudFoundryClient, String serviceId, String plan) { + return requestListServicePlans(cloudFoundryClient, serviceId) + .filter(resource -> plan.equals(ResourceUtils.getEntity(resource).getName())) + .single() + .map(ResourceUtils::getId) + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Service plan %s does not exist", plan)); + } + + private static Mono> getServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return requestListServicePlans(cloudFoundryClient, serviceId).collectList(); + } + + private static Mono getSharedDomainId( + CloudFoundryClient cloudFoundryClient, String domain) { + return requestSharedDomain(cloudFoundryClient, domain) + .map(ResourceUtils::getId) + .singleOrEmpty(); + } + + private static Mono getSpaceService( + CloudFoundryClient cloudFoundryClient, String spaceId, String service) { + return requestListServices(cloudFoundryClient, spaceId, service) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Service %s does not exist", service)); + } + + private static Mono getSpaceServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return requestListServiceInstances(cloudFoundryClient, spaceId, serviceInstanceName) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Service instance %s does not exist", serviceInstanceName)); + } + + private static Mono getSpaceServiceInstanceId( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return getSpaceServiceInstance(cloudFoundryClient, serviceInstanceName, spaceId) + .map(ResourceUtils::getId); + } + + private static Mono getSpaceUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return requestListServiceInstances(cloudFoundryClient, spaceId, serviceInstanceName) + .filter(DefaultServices::isUserProvidedService) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "User provided service instance %s does not exist", + serviceInstanceName)); + } + + private static Mono getSpaceUserProvidedServiceInstanceId( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return getSpaceUserProvidedServiceInstance(cloudFoundryClient, serviceInstanceName, spaceId) + .map(ResourceUtils::getId); + } + + private static boolean isIdentical(String s, String t) { + return s == null ? t == null : s.equals(t); + } + + private static boolean isPlanUpdateable(GetServiceResponse response) { + return response.getEntity().getPlanUpdateable(); + } + + private static boolean isUserProvidedService(UnionServiceInstanceResource serviceInstance) { + return ServiceInstanceType.from(ResourceUtils.getEntity(serviceInstance).getType()) + .equals(ServiceInstanceType.USER_PROVIDED); + } + + private static Mono renameServiceInstance( + CloudFoundryClient cloudFoundryClient, + UnionServiceInstanceResource serviceInstance, + String newName) { + if (isUserProvidedService(serviceInstance)) { + return requestUserProvidedServiceInstanceUpdate( + cloudFoundryClient, ResourceUtils.getId(serviceInstance), newName) + .map(ResourceUtils::getEntity) + .cast(BaseServiceInstanceEntity.class); + } else { + return requestServiceInstanceUpdate( + cloudFoundryClient, ResourceUtils.getId(serviceInstance), newName) + .map(ResourceUtils::getEntity) + .cast(BaseServiceInstanceEntity.class); + } + } + + private static Mono + requestCreateRouteBinding( + CloudFoundryClient cloudFoundryClient, + String routeId, + String userProvidedServiceInstanceId, + Map parameters) { + return cloudFoundryClient + .userProvidedServiceInstances() + .associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .parameters(parameters) + .routeId(routeId) + .userProvidedServiceInstanceId(userProvidedServiceInstanceId) + .build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String serviceInstanceId, + Map parameters) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .parameters(parameters) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String planId, + String serviceInstance, + Map parameters, + List tags) { + return cloudFoundryClient + .serviceInstances() + .create( + org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest + .builder() + .acceptsIncomplete(true) + .name(serviceInstance) + .servicePlanId(planId) + .spaceId(spaceId) + .parameters(parameters) + .tags(tags) + .build()); + } + + private static Mono requestCreateServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKey, + Map parameters) { + return cloudFoundryClient + .serviceKeys() + .create( + org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest.builder() + .serviceInstanceId(serviceInstanceId) + .name(serviceKey) + .parameters(parameters) + .build()); + } + + private static Mono + requestCreateUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, + String name, + Map credentials, + String routeServiceUrl, + String spaceId, + String syslogDrainUrl, + List tags) { + return cloudFoundryClient + .userProvidedServiceInstances() + .create( + org.cloudfoundry.client.v2.userprovidedserviceinstances + .CreateUserProvidedServiceInstanceRequest.builder() + .name(name) + .credentials(credentials) + .routeServiceUrl(routeServiceUrl) + .spaceId(spaceId) + .syslogDrainUrl(syslogDrainUrl) + .tags(tags) + .build()); + } + + private static Mono requestDeleteServiceBinding( + CloudFoundryClient cloudFoundryClient, String serviceBindingId) { + return cloudFoundryClient + .serviceBindingsV2() + .delete( + DeleteServiceBindingRequest.builder() + .serviceBindingId(serviceBindingId) + .async(true) + .build()); + } + + private static Mono requestDeleteServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstances() + .delete( + org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceRequest + .builder() + .acceptsIncomplete(true) + .serviceInstanceId(serviceInstanceId) + .async(true) + .build()); + } + + private static Mono requestDeleteServiceKey( + CloudFoundryClient cloudFoundryClient, String serviceKeyId) { + return cloudFoundryClient + .serviceKeys() + .delete( + org.cloudfoundry.client.v2.servicekeys.DeleteServiceKeyRequest.builder() + .serviceKeyId(serviceKeyId) + .build()); + } + + private static Mono requestDeleteUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return cloudFoundryClient + .userProvidedServiceInstances() + .delete( + DeleteUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .get(GetApplicationRequest.builder().applicationId(applicationId).build()); + } + + private static Mono requestGetService( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return cloudFoundryClient + .services() + .get(GetServiceRequest.builder().serviceId(serviceId).build()); + } + + private static Mono requestGetServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstances() + .get( + org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceRequest + .builder() + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestGetServicePlan( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + return cloudFoundryClient + .servicePlans() + .get(GetServicePlanRequest.builder().servicePlanId(servicePlanId).build()); + } + + private static Flux requestListApplications( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .spaceId(spaceId) + .page(page) + .build())); + } + + private static Flux requestListServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .page(page) + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build())); + } + + private static Flux requestListServiceBindings( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceBindingsV2() + .list( + ListServiceBindingsRequest.builder() + .page(page) + .serviceInstanceId(serviceInstanceId) + .build())); + } + + private static Flux requestListServiceInstanceServiceKeys( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String serviceKey) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .serviceInstanceId(serviceInstanceId) + .name(serviceKey) + .page(page) + .build())); + } + + private static Flux requestListServiceInstanceServiceKeys( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .page(page) + .serviceInstanceId(serviceInstanceId) + .build())); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, String spaceId, String serviceInstanceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .page(page) + .returnUserProvidedServiceInstances(true) + .name(serviceInstanceName) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .organizationId(organizationId) + .page(page) + .servicePlanId(servicePlanId) + .build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServices( + ListSpaceServicesRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String spaceId, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServices( + ListSpaceServicesRequest.builder() + .label(serviceName) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestPrivateDomain( + CloudFoundryClient cloudFoundryClient, String domain, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .name(domain) + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Mono requestRemoveRoute( + CloudFoundryClient cloudFoundryClient, + String routeId, + String userProvidedServiceInstanceId) { + return cloudFoundryClient + .userProvidedServiceInstances() + .removeRoute( + RemoveUserProvidedServiceInstanceRouteRequest.builder() + .routeId(routeId) + .userProvidedServiceInstanceId(userProvidedServiceInstanceId) + .build()); + } + + private static Flux requestRoutes( + CloudFoundryClient cloudFoundryClient, + UnaryOperator modifier) { + + ListRoutesRequest.Builder listBuilder = modifier.apply(ListRoutesRequest.builder()); + + return PaginationUtils.requestClientV2Resources( + page -> cloudFoundryClient.routes().list(listBuilder.page(page).build())); + } + + private static Flux requestRoutes( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String path) { + return requestRoutes( + cloudFoundryClient, + builder -> + builder.domainId(domainId) + .hosts( + Optional.ofNullable(host) + .map(Collections::singletonList) + .orElse(null)) + .paths( + Optional.ofNullable(path) + .map(Collections::singletonList) + .orElse(null))); + } + + private static Mono requestServiceInstanceUpdate( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String newName) { + return cloudFoundryClient + .serviceInstances() + .update( + org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceRequest + .builder() + .name(newName) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Flux requestSharedDomain( + CloudFoundryClient cloudFoundryClient, String domain) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list( + ListSharedDomainsRequest.builder() + .name(domain) + .page(page) + .build())); + } + + private static Mono requestUpdateServiceInstance( + CloudFoundryClient cloudFoundryClient, + UpdateServiceInstanceRequest request, + String serviceInstanceId, + String servicePlanId) { + return cloudFoundryClient + .serviceInstances() + .update( + org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceRequest + .builder() + .acceptsIncomplete(true) + .maintenanceInfo(request.getMaintenanceInfo()) + .parameters(request.getParameters()) + .serviceInstanceId(serviceInstanceId) + .servicePlanId(servicePlanId) + .tags(request.getTags()) + .build()); + } + + private static Mono + requestUserProvidedServiceInstanceUpdate( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String newName) { + return cloudFoundryClient + .userProvidedServiceInstances() + .update( + org.cloudfoundry.client.v2.userprovidedserviceinstances + .UpdateUserProvidedServiceInstanceRequest.builder() + .name(newName) + .userProvidedServiceInstanceId(serviceInstanceId) + .build()); + } + + private static ServiceInstance toServiceInstance( + UnionServiceInstanceResource resource, + Optional plan, + List applications, + ServiceEntity serviceEntity) { + String extra = Optional.ofNullable(serviceEntity.getExtra()).orElse(""); + Optional documentationUrl = + Optional.ofNullable(getExtraValue(extra, "documentationUrl")); + UnionServiceInstanceEntity serviceInstanceEntity = resource.getEntity(); + LastOperation lastOperation = + Optional.ofNullable(serviceInstanceEntity.getLastOperation()) + .orElse(LastOperation.builder().build()); + + return ServiceInstance.builder() + .applications(applications) + .dashboardUrl(serviceInstanceEntity.getDashboardUrl()) + .description(serviceEntity.getDescription()) + .documentationUrl(documentationUrl.orElse(null)) + .id(ResourceUtils.getId(resource)) + .lastOperation(lastOperation.getType()) + .maintenanceInfo(serviceInstanceEntity.getMaintenanceInfo()) + .message(lastOperation.getDescription()) + .name(serviceInstanceEntity.getName()) + .plan(plan.orElse(null)) + .service(serviceEntity.getLabel()) + .startedAt(lastOperation.getCreatedAt()) + .status(lastOperation.getState()) + .tags(serviceInstanceEntity.getTags()) + .type(ServiceInstanceType.from(serviceInstanceEntity.getType())) + .updatedAt(lastOperation.getUpdatedAt()) + .build(); + } + + private static Flux toServiceInstanceSummary( + GetSpaceSummaryResponse response) { + Map> applicationBindings = new HashMap<>(); + + response.getApplications() + .forEach( + application -> + application + .getServiceNames() + .forEach( + serviceName -> { + if (!applicationBindings.containsKey( + serviceName)) { + applicationBindings.put( + serviceName, new ArrayList<>()); + } + + applicationBindings + .get(serviceName) + .add(application.getName()); + })); + + return Flux.fromIterable(response.getServices()) + .map( + service -> + ServiceInstanceSummary.builder() + .applications( + Optional.ofNullable( + applicationBindings.get( + service.getName())) + .orElse(Collections.emptyList())) + .id(service.getId()) + .lastOperation( + service.getLastOperation() == null + ? null + : service.getLastOperation() + .getDescription()) + .maintenanceInfo(service.getMaintenanceInfo()) + .name(service.getName()) + .plan( + service.getServicePlan() == null + ? null + : service.getServicePlan().getName()) + .service( + service.getServicePlan() == null + ? null + : service.getServicePlan() + .getService() + .getLabel()) + .type( + service.getServicePlan() == null + ? ServiceInstanceType.USER_PROVIDED + : ServiceInstanceType.MANAGED) + .build()); + } + + private static ServiceKey toServiceKey(AbstractServiceKeyResource resource) { + ServiceKeyEntity entity = ResourceUtils.getEntity(resource); + + return ServiceKey.builder() + .credentials(entity.getCredentials()) + .id(ResourceUtils.getId(resource)) + .name(entity.getName()) + .build(); + } + + private static ServiceOffering toServiceOffering( + ServiceResource resource, List servicePlans) { + ServiceEntity entity = resource.getEntity(); + + return ServiceOffering.builder() + .description(entity.getDescription()) + .id(ResourceUtils.getId(resource)) + .label(entity.getLabel()) + .servicePlans(toServicePlans(servicePlans)) + .build(); + } + + private static ServicePlan toServicePlan(ServicePlanResource resource) { + ServicePlanEntity entity = ResourceUtils.getEntity(resource); + + return ServicePlan.builder() + .description(entity.getDescription()) + .free(entity.getFree()) + .id(ResourceUtils.getId(resource)) + .name(entity.getName()) + .build(); + } + + private static List toServicePlans(List servicePlans) { + return servicePlans.stream() + .map(DefaultServices::toServicePlan) + .collect(Collectors.toList()); + } + + private static Mono + updateUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, + UpdateUserProvidedServiceInstanceRequest request, + String userProvidedServiceInstanceId) { + return cloudFoundryClient + .userProvidedServiceInstances() + .update( + org.cloudfoundry.client.v2.userprovidedserviceinstances + .UpdateUserProvidedServiceInstanceRequest.builder() + .credentials(request.getCredentials()) + .syslogDrainUrl(request.getSyslogDrainUrl()) + .tags(request.getTags()) + .userProvidedServiceInstanceId(userProvidedServiceInstanceId) + .build()); + } + + private static Mono waitForInstanceAction( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + AbstractServiceInstanceResource serviceInstance) { + return LastOperationUtils.waitForCompletion( + completionTimeout, + () -> + requestGetServiceInstance( + cloudFoundryClient, ResourceUtils.getId(serviceInstance)) + .map( + response -> + ResourceUtils.getEntity(response) + .getLastOperation())); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/ServiceInstanceType.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/ServiceInstanceType.java new file mode 100644 index 00000000000..ecff309f6e3 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/ServiceInstanceType.java @@ -0,0 +1,58 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonValue; + +/** + * The type of a service instance + */ +public enum ServiceInstanceType { + MANAGED("managed_service_instance"), + + USER_PROVIDED("user_provided_service_instance"); + + private final String value; + + ServiceInstanceType(String value) { + this.value = value; + } + + @JsonCreator + public static ServiceInstanceType from(String s) { + switch (s.toLowerCase()) { + case "managed_service_instance": + return MANAGED; + case "user_provided_service_instance": + return USER_PROVIDED; + default: + throw new IllegalArgumentException( + String.format("Unknown service instance type: %s", s)); + } + } + + @JsonValue + public String getValue() { + return this.value; + } + + @Override + public String toString() { + return this.getValue(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/Services.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/Services.java new file mode 100644 index 00000000000..f31ecfdfdd8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/Services.java @@ -0,0 +1,161 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Services Operations API + */ +public interface Services { + + /** + * Bind a service instance to an application + * + * @param request the bind service instance request + * @return a completion indicator + */ + Mono bind(BindServiceInstanceRequest request); + + /** + * Bind a service instance to a route + * + * @param request the bind service instance to a route request + * @return a completion indicator + */ + Mono bindRoute(BindRouteServiceInstanceRequest request); + + /** + * Create a service instance + * + * @param request the create service instance request + * @return a completion indicator + */ + Mono createInstance(CreateServiceInstanceRequest request); + + /** + * Create a service key + * + * @param request the create service key request + * @return a completion indicator + */ + Mono createServiceKey(CreateServiceKeyRequest request); + + /** + * Create a user provided service instance + * + * @param request the create user provided service instance request + * @return a completion indicator + */ + Mono createUserProvidedInstance(CreateUserProvidedServiceInstanceRequest request); + + /** + * Delete a service instance + * + * @param request the delete service instance request + * @return a completion indicator + */ + Mono deleteInstance(DeleteServiceInstanceRequest request); + + /** + * Delete a service key + * + * @param request the delete service key request + * @return a completion indicator + */ + Mono deleteServiceKey(DeleteServiceKeyRequest request); + + /** + * Get a service instance + * + * @param request the get service instance request + * @return the service instance + */ + Mono getInstance(GetServiceInstanceRequest request); + + /** + * Get a service key + * + * @param request the get service key request + * @return the service key + */ + Mono getServiceKey(GetServiceKeyRequest request); + + /** + * List the service instances in the targeted space + * + * @return the service instances + */ + Flux listInstances(); + + /** + * List the service keys for a service instance + * + * @param request the list service keys request + * @return the service keys + */ + Flux listServiceKeys(ListServiceKeysRequest request); + + /** + * List available services offerings in the marketplace + * + * @param request The list service offerings request + * @return the service offerings + */ + Flux listServiceOfferings(ListServiceOfferingsRequest request); + + /** + * Rename a service instance + * + * @param request the rename service instance request + * @return a completion indicator + */ + Mono renameInstance(RenameServiceInstanceRequest request); + + /** + * Unbind a service instance from an application + * + * @param request the unbind service instance request + * @return a completion indicator + */ + Mono unbind(UnbindServiceInstanceRequest request); + + /** + * Unbind a service instance from a route + * + * @param request the unbind service instance from a route request + * @return a completion indicator + */ + Mono unbindRoute(UnbindRouteServiceInstanceRequest request); + + /** + * Update a service instance + * + * @param request the update service instance request + * @return a completion indicator + */ + Mono updateInstance(UpdateServiceInstanceRequest request); + + /** + * Update a user provided service instance + * + * @param request the update user provided service instance request + * @return a completion indicator + */ + Mono updateUserProvidedInstance(UpdateUserProvidedServiceInstanceRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_BindRouteServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_BindRouteServiceInstanceRequest.java new file mode 100644 index 00000000000..c59cee28dcb --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_BindRouteServiceInstanceRequest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request options for the bind service instance operation + */ +@Value.Immutable +abstract class _BindRouteServiceInstanceRequest { + + /** + * The domain for the bound route + */ + abstract String getDomainName(); + + /** + * The hostname for the bound route + */ + @Nullable + abstract String getHostname(); + + /** + * The parameters for the bound route + */ + @AllowNulls + @Nullable + abstract Map getParameters(); + + /** + * The path for the bound route + */ + @Nullable + abstract String getPath(); + + /** + * The name of the service instance to bind + */ + abstract String getServiceInstanceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_BindServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_BindServiceInstanceRequest.java new file mode 100644 index 00000000000..bc3d0628195 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_BindServiceInstanceRequest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request options for the bind service instance operation + */ +@Value.Immutable +abstract class _BindServiceInstanceRequest { + + /** + * The name of the application to bind + */ + abstract String getApplicationName(); + + /** + * The parameters for the service binding + */ + @AllowNulls + @Nullable + abstract Map getParameters(); + + /** + * The name of the service instance to bind + */ + abstract String getServiceInstanceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateServiceInstanceRequest.java new file mode 100644 index 00000000000..f3395542003 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateServiceInstanceRequest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.time.Duration; +import java.util.List; +import java.util.Map; + +/** + * The request options for the create service instance operation + */ +@Value.Immutable +abstract class _CreateServiceInstanceRequest { + + /** + * How long to wait for creation + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The parameters of the service instance + */ + @AllowNulls + @Nullable + abstract Map getParameters(); + + /** + * The name of the service plan to use + */ + abstract String getPlanName(); + + /** + * The name of the service instance to create + */ + abstract String getServiceInstanceName(); + + /** + * The name of the service + */ + abstract String getServiceName(); + + /** + * The tags + */ + @Nullable + abstract List getTags(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateServiceKeyRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateServiceKeyRequest.java new file mode 100644 index 00000000000..14dcb0c7e39 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateServiceKeyRequest.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * The request options for the create service key operation + */ +@Value.Immutable +abstract class _CreateServiceKeyRequest { + + /** + * The parameters of the service key + */ + @AllowNulls + @Nullable + abstract Map getParameters(); + + /** + * The name of the service instance + */ + abstract String getServiceInstanceName(); + + /** + * The name of the service key to create + */ + abstract String getServiceKeyName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateUserProvidedServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateUserProvidedServiceInstanceRequest.java new file mode 100644 index 00000000000..4daf5dfe9fe --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_CreateUserProvidedServiceInstanceRequest.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request options for the create user provided service operation + */ +@Value.Immutable +abstract class _CreateUserProvidedServiceInstanceRequest { + + /** + * The credentials of the user provided service instance + */ + @AllowNulls + @Nullable + abstract Map getCredentials(); + + /** + * The name of the user provided service instance to create + */ + abstract String getName(); + + /** + * URL to which requests for bound routes will be forwarded + */ + @Nullable + abstract String getRouteServiceUrl(); + + /** + * The url for the Syslog Drain Url + */ + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The tags of the user provided service instance + */ + @Nullable + abstract List getTags(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_DeleteServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_DeleteServiceInstanceRequest.java new file mode 100644 index 00000000000..31528015d74 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_DeleteServiceInstanceRequest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the delete service instance operation + */ +@Value.Immutable +abstract class _DeleteServiceInstanceRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The name of the service instance + */ + abstract String getName(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_DeleteServiceKeyRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_DeleteServiceKeyRequest.java new file mode 100644 index 00000000000..d61a9071b5e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_DeleteServiceKeyRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * The request options for the deleting the service key + */ +@Value.Immutable +abstract class _DeleteServiceKeyRequest { + + /** + * The name of the service instance + */ + abstract String getServiceInstanceName(); + + /** + * The name of the service key to delete + */ + abstract String getServiceKeyName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_GetServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_GetServiceInstanceRequest.java new file mode 100644 index 00000000000..74dc49fc674 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_GetServiceInstanceRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * The request options for the get service instance operation + */ +@Value.Immutable +abstract class _GetServiceInstanceRequest { + + /** + * The name of the service instance + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_GetServiceKeyRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_GetServiceKeyRequest.java new file mode 100644 index 00000000000..3cee321ffca --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_GetServiceKeyRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * The request options for the get service key operation + */ +@Value.Immutable +abstract class _GetServiceKeyRequest { + + /** + * The name of the service instance + */ + abstract String getServiceInstanceName(); + + /** + * The name of the service key + */ + abstract String getServiceKeyName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ListServiceKeysRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ListServiceKeysRequest.java new file mode 100644 index 00000000000..e688b28922f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ListServiceKeysRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * The request options for the list service keys operation + */ +@Value.Immutable +abstract class _ListServiceKeysRequest { + + /** + * The name of the service instance for which the keys will be listed + */ + abstract String getServiceInstanceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ListServiceOfferingsRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ListServiceOfferingsRequest.java new file mode 100644 index 00000000000..d02afa356d8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ListServiceOfferingsRequest.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the marketplace operation + */ +@Value.Immutable +abstract class _ListServiceOfferingsRequest { + + /** + * The name of the service + */ + @Nullable + abstract String getServiceName(); + +} + diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_RenameServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_RenameServiceInstanceRequest.java new file mode 100644 index 00000000000..b5914cac31f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_RenameServiceInstanceRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * The request options for the rename service instance operation + */ +@Value.Immutable +abstract class _RenameServiceInstanceRequest { + + /** + * The name of the service instance + */ + abstract String getName(); + + /** + * The new name of the service instance + */ + abstract String getNewName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceInstance.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceInstance.java new file mode 100644 index 00000000000..cbe994c4b6d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceInstance.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +/** + * A service instance + */ +@Value.Immutable +abstract class _ServiceInstance extends AbstractServiceInstanceSummary { + + /** + * The dashboard URL + */ + @Nullable + abstract String getDashboardUrl(); + + /** + * The service description + */ + @Nullable + abstract String getDescription(); + + /** + * The documentation URL + */ + @Nullable + abstract String getDocumentationUrl(); + + /** + * The last operation + */ + @Nullable + abstract String getLastOperation(); + + /** + * The message + */ + @Nullable + abstract String getMessage(); + + /** + * When the service was last started + */ + @Nullable + abstract String getStartedAt(); + + /** + * The status of the last operation + */ + @Nullable + abstract String getStatus(); + + /** + * The tags for the service + */ + @Nullable + abstract List getTags(); + + /** + * When the service was last updated + */ + @Nullable + abstract String getUpdatedAt(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceInstanceSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceInstanceSummary.java new file mode 100644 index 00000000000..65004e64778 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceInstanceSummary.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * A service instance + */ +@Value.Immutable +abstract class _ServiceInstanceSummary extends AbstractServiceInstanceSummary { + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceKey.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceKey.java new file mode 100644 index 00000000000..3811bcc7604 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceKey.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.immutables.value.Value; + +import java.util.Map; + +/** + * A service key + */ +@Value.Immutable +abstract class _ServiceKey { + + /** + * The credentials + */ + @AllowNulls + abstract Map getCredentials(); + + /** + * The service key id + */ + abstract String getId(); + + /** + * Service key name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceOffering.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceOffering.java new file mode 100644 index 00000000000..1b01024dd5e --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServiceOffering.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +import java.util.List; + +/** + * A Cloud Foundry Service Offering + */ +@Value.Immutable +abstract class _ServiceOffering { + + /** + * The description + */ + abstract String getDescription(); + + /** + * The id + */ + abstract String getId(); + + /** + * The label + */ + abstract String getLabel(); + + /** + * The service plans + */ + abstract List getServicePlans(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServicePlan.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServicePlan.java new file mode 100644 index 00000000000..791415050db --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_ServicePlan.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Service Plan + */ +@Value.Immutable +abstract class _ServicePlan { + + /** + * The description + */ + abstract String getDescription(); + + /** + * Whether the plan is free + */ + abstract Boolean getFree(); + + /** + * The id + */ + abstract String getId(); + + /** + * The name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UnbindRouteServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UnbindRouteServiceInstanceRequest.java new file mode 100644 index 00000000000..bc92fedd042 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UnbindRouteServiceInstanceRequest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the unbind service instance operation + */ +@Value.Immutable +abstract class _UnbindRouteServiceInstanceRequest { + + /** + * The domain for the bound route + */ + abstract String getDomainName(); + + /** + * The hostname for the bound route + */ + @Nullable + abstract String getHostname(); + + /** + * The path for the bound route + */ + @Nullable + abstract String getPath(); + + /** + * The name of the service instance to bind + */ + abstract String getServiceInstanceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UnbindServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UnbindServiceInstanceRequest.java new file mode 100644 index 00000000000..c6dc74dc79f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UnbindServiceInstanceRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the unbind service instance operation + */ +@Value.Immutable +abstract class _UnbindServiceInstanceRequest { + + /** + * The name of the application to unbind + */ + abstract String getApplicationName(); + + /** + * How long to wait for the unbind + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The name of the service instance to unbind + */ + abstract String getServiceInstanceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UpdateServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UpdateServiceInstanceRequest.java new file mode 100644 index 00000000000..26a694925e5 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UpdateServiceInstanceRequest.java @@ -0,0 +1,72 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.immutables.value.Value; + +import java.time.Duration; +import java.util.List; +import java.util.Map; + +/** + * The request options for the update service instance operation + */ +@Value.Immutable +abstract class _UpdateServiceInstanceRequest { + + /** + * How long to wait for update + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The maintenance info to upgrade to + */ + @Nullable + abstract MaintenanceInfo getMaintenanceInfo(); + + /** + * The parameters of the service instance + */ + @AllowNulls + @Nullable + abstract Map getParameters(); + + /** + * The name of the required plan + */ + @Nullable + abstract String getPlanName(); + + /** + * The name of the service instance + */ + abstract String getServiceInstanceName(); + + /** + * The tags + */ + @Nullable + abstract List getTags(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UpdateUserProvidedServiceInstanceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UpdateUserProvidedServiceInstanceRequest.java new file mode 100644 index 00000000000..43c0abc2bc0 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/services/_UpdateUserProvidedServiceInstanceRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.cloudfoundry.AllowNulls; +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Map; + +/** + * The request options for the update user provided service instance operation + */ +@Value.Immutable +abstract class _UpdateUserProvidedServiceInstanceRequest { + + /** + * The credentials of the user provided service instance + */ + @AllowNulls + @Nullable + abstract Map getCredentials(); + + /** + * The url for the syslog_drain to direct to + */ + @Nullable + abstract String getSyslogDrainUrl(); + + /** + * The tags of the user provided service instance + */ + @Nullable + abstract List getTags(); + + /** + * The name of the user provided service instance + */ + abstract String getUserProvidedServiceInstanceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/DefaultSpaceAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/DefaultSpaceAdmin.java new file mode 100644 index 00000000000..0376863969c --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/DefaultSpaceAdmin.java @@ -0,0 +1,106 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaceadmin; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.util.NoSuchElementException; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DefaultSpaceAdmin implements SpaceAdmin { + + private final Mono cloudFoundryClient; + + private final Mono organizationId; + + public DefaultSpaceAdmin( + Mono cloudFoundryClient, Mono organizationId) { + this.cloudFoundryClient = cloudFoundryClient; + this.organizationId = organizationId; + } + + @Override + public Mono get(GetSpaceQuotaRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + getSpaceQuotaDefinition( + cloudFoundryClient, + organizationId, + request.getName()))) + .map(DefaultSpaceAdmin::toSpaceQuota) + .transform(OperationsLogging.log("Get Space Quota")) + .checkpoint(); + } + + @Override + public Flux listQuotas() { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMapMany(function(DefaultSpaceAdmin::requestSpaceQuotaDefinitions)) + .map(DefaultSpaceAdmin::toSpaceQuota) + .transform(OperationsLogging.log("List Space Quota")) + .checkpoint(); + } + + private static Mono getSpaceQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String organizationId, String name) { + return requestSpaceQuotaDefinitions(cloudFoundryClient, organizationId) + .filter(resource -> name.equals(ResourceUtils.getEntity(resource).getName())) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Space Quota %s does not exist", name)); + } + + private static Flux requestSpaceQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static SpaceQuota toSpaceQuota(SpaceQuotaDefinitionResource resource) { + SpaceQuotaDefinitionEntity entity = ResourceUtils.getEntity(resource); + + return SpaceQuota.builder() + .id(ResourceUtils.getId(resource)) + .instanceMemoryLimit(entity.getInstanceMemoryLimit()) + .name(entity.getName()) + .organizationId(entity.getOrganizationId()) + .paidServicePlans(entity.getNonBasicServicesAllowed()) + .totalMemoryLimit(entity.getMemoryLimit()) + .totalRoutes(entity.getTotalRoutes()) + .totalServiceInstances(entity.getTotalServices()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/SpaceAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/SpaceAdmin.java new file mode 100644 index 00000000000..5be3d13c5cf --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/SpaceAdmin.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaceadmin; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Space Admin API + */ +public interface SpaceAdmin { + + /** + * Gets a space quota + * + * @param request the Get Space Quota request + * @return the space quota + */ + Mono get(GetSpaceQuotaRequest request); + + /** + * Lists the space quotas + * + * @return the space quotas + */ + Flux listQuotas(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/_GetSpaceQuotaRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/_GetSpaceQuotaRequest.java new file mode 100644 index 00000000000..f5072ee84f9 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/_GetSpaceQuotaRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaceadmin; + +import org.immutables.value.Value; + +/** + * The request options for the list routes operation + */ +@Value.Immutable +abstract class _GetSpaceQuotaRequest { + + /** + * The name of the space quota to get + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/_SpaceQuota.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/_SpaceQuota.java new file mode 100644 index 00000000000..a17da23576f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaceadmin/_SpaceQuota.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaceadmin; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Space Quota + */ +@Value.Immutable +abstract class _SpaceQuota { + + /** + * The id + */ + abstract String getId(); + + /** + * The instance memory limit + */ + abstract Integer getInstanceMemoryLimit(); + + /** + * The name + */ + abstract String getName(); + + /** + * The organization id + */ + abstract String getOrganizationId(); + + /** + * Whether paid service plans are allowed + */ + abstract Boolean getPaidServicePlans(); + + /** + * The total memory limit + */ + abstract Integer getTotalMemoryLimit(); + + /** + * The total number of routes + */ + abstract Integer getTotalRoutes(); + + /** + * The total number of service instances + */ + abstract Integer getTotalServiceInstances(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/DefaultSpaces.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/DefaultSpaces.java new file mode 100644 index 00000000000..12835ab0992 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/DefaultSpaces.java @@ -0,0 +1,737 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Collections; +import java.util.List; +import java.util.NoSuchElementException; +import java.util.Optional; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.Resource; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.securitygroups.RuleEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceResponse; +import org.cloudfoundry.operations.spaceadmin.SpaceQuota; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DefaultSpaces implements Spaces { + + private final Mono cloudFoundryClient; + + private final Mono organizationId; + + private final Mono username; + + public DefaultSpaces( + Mono cloudFoundryClient, + Mono organizationId, + Mono username) { + this.cloudFoundryClient = cloudFoundryClient; + this.organizationId = organizationId; + this.username = username; + } + + @Override + public Mono allowSsh(AllowSpaceSshRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationSpaceIdWhere( + cloudFoundryClient, + organizationId, + request.getName(), + sshEnabled(false))))) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + requestUpdateSpaceSsh(cloudFoundryClient, spaceId, true))) + .then() + .transform(OperationsLogging.log("Allow Space SSH")) + .checkpoint(); + } + + @Override + public Mono create(CreateSpaceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.username) + .flatMap( + function( + (cloudFoundryClient, username) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(username), + getOrganizationIdOrDefault( + cloudFoundryClient, + request.getOrganization(), + this.organizationId)))) + .flatMap( + function( + (cloudFoundryClient, username, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(username), + Mono.just(organizationId), + getOptionalSpaceQuotaId( + cloudFoundryClient, + organizationId, + request.getSpaceQuota())))) + .flatMap( + function( + (cloudFoundryClient, username, organizationId, spaceQuotaId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(organizationId), + requestCreateSpace( + cloudFoundryClient, + organizationId, + request.getName(), + spaceQuotaId.orElse(null)) + .map(ResourceUtils::getId), + Mono.just(username)))) + .delayUntil( + function( + (cloudFoundryClient, organizationId, spaceId, username) -> + requestAssociateOrganizationUserByUsername( + cloudFoundryClient, organizationId, username))) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId, username) -> + Mono.zip( + requestAssociateSpaceManagerByUsername( + cloudFoundryClient, spaceId, username), + requestAssociateSpaceDeveloperByUsername( + cloudFoundryClient, spaceId, username)))) + .then() + .transform(OperationsLogging.log("Create Space")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteSpaceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(request.getCompletionTimeout()), + getOrganizationSpaceId( + cloudFoundryClient, + organizationId, + request.getName())))) + .flatMap(function(DefaultSpaces::deleteSpace)) + .transform(OperationsLogging.log("Delete Space")) + .checkpoint(); + } + + @Override + public Mono disallowSsh(DisallowSpaceSshRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationSpaceIdWhere( + cloudFoundryClient, + organizationId, + request.getName(), + sshEnabled(true))))) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + requestUpdateSpaceSsh(cloudFoundryClient, spaceId, false))) + .then() + .transform(OperationsLogging.log("Disallow Space SSH")) + .checkpoint(); + } + + @Override + public Mono get(GetSpaceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationSpace( + cloudFoundryClient, + organizationId, + request.getName())))) + .flatMap( + function( + (cloudFoundryClient, resource) -> + getSpaceDetail(cloudFoundryClient, resource, request))) + .transform(OperationsLogging.log("Get Space")) + .checkpoint(); + } + + @Override + public Flux list() { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMapMany(function(DefaultSpaces::requestSpaces)) + .map(DefaultSpaces::toSpaceSummary) + .transform(OperationsLogging.log("List Spaces")) + .checkpoint(); + } + + @Override + public Mono rename(RenameSpaceRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationSpaceId( + cloudFoundryClient, + organizationId, + request.getName())))) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + requestUpdateSpace( + cloudFoundryClient, spaceId, request.getNewName()))) + .then() + .transform(OperationsLogging.log("Rename Space")) + .checkpoint(); + } + + @Override + public Mono sshAllowed(SpaceSshAllowedRequest request) { + return Mono.zip(this.cloudFoundryClient, this.organizationId) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + getOrganizationSpace( + cloudFoundryClient, + organizationId, + request.getName()))) + .map(resource -> ResourceUtils.getEntity(resource).getAllowSsh()) + .transform(OperationsLogging.log("Is Space SSH Allowed")) + .checkpoint(); + } + + private static Mono deleteSpace( + CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String spaceId) { + return requestDeleteSpace(cloudFoundryClient, spaceId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, completionTimeout, job)); + } + + private static Mono> getApplicationNames( + CloudFoundryClient cloudFoundryClient, SpaceResource spaceResource) { + return requestSpaceApplications(cloudFoundryClient, ResourceUtils.getId(spaceResource)) + .map(applicationResource -> ResourceUtils.getEntity(applicationResource).getName()) + .collectList(); + } + + private static Mono> getDomainNames( + CloudFoundryClient cloudFoundryClient, SpaceResource spaceResource) { + return requestListPrivateDomains( + cloudFoundryClient, spaceResource.getEntity().getOrganizationId()) + .map(resource -> resource.getEntity().getName()) + .mergeWith( + requestListSharedDomains(cloudFoundryClient) + .map(resource -> resource.getEntity().getName())) + .collectList(); + } + + private static Mono> getOptionalSpaceQuotaDefinition( + CloudFoundryClient cloudFoundryClient, SpaceResource spaceResource) { + String spaceQuotaDefinitionId = + ResourceUtils.getEntity(spaceResource).getSpaceQuotaDefinitionId(); + + if (spaceQuotaDefinitionId == null) { + return Mono.just(Optional.empty()); + } + + return requestSpaceQuotaDefinition(cloudFoundryClient, spaceQuotaDefinitionId) + .map(DefaultSpaces::toSpaceQuotaDefinition) + .map(Optional::of); + } + + private static Mono> getOptionalSpaceQuotaId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceQuota) { + if (spaceQuota == null) { + return Mono.just(Optional.empty()); + } else { + return getSpaceQuota(cloudFoundryClient, organizationId, spaceQuota) + .map(ResourceUtils::getId) + .map(Optional::of); + } + } + + private static Mono getOrganization( + CloudFoundryClient cloudFoundryClient, String organization) { + return requestOrganizations(cloudFoundryClient, organization) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Organization %s does not exist", organization)); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String organization) { + return getOrganization(cloudFoundryClient, organization).map(ResourceUtils::getId); + } + + private static Mono getOrganizationIdOrDefault( + CloudFoundryClient cloudFoundryClient, + String organizationName, + Mono organizationId) { + return Optional.ofNullable(organizationName) + .map(organization -> getOrganizationId(cloudFoundryClient, organization)) + .orElse(organizationId); + } + + private static Mono getOrganizationName( + CloudFoundryClient cloudFoundryClient, SpaceResource resource) { + return requestOrganization( + cloudFoundryClient, ResourceUtils.getEntity(resource).getOrganizationId()) + .map(response -> ResourceUtils.getEntity(response).getName()); + } + + private static Mono getOrganizationSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return requestOrganizationSpaces(cloudFoundryClient, organizationId, space) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Space %s does not exist", space)); + } + + private static Mono getOrganizationSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return getOrganizationSpace(cloudFoundryClient, organizationId, space) + .map(ResourceUtils::getId); + } + + private static Mono getOrganizationSpaceIdWhere( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String space, + Predicate predicate) { + return getOrganizationSpace(cloudFoundryClient, organizationId, space) + .filter(predicate) + .map(ResourceUtils::getId); + } + + private static Mono> getSecurityGroups( + CloudFoundryClient cloudFoundryClient, SpaceResource spaceResource, boolean withRules) { + return requestSpaceSecurityGroups(cloudFoundryClient, ResourceUtils.getId(spaceResource)) + .map( + securityGroupResource -> { + SecurityGroupEntity entity = + ResourceUtils.getEntity(securityGroupResource); + if (!withRules) { + entity = + SecurityGroupEntity.builder() + .name(entity.getName()) + .runningDefault(entity.getRunningDefault()) + .spacesUrl(entity.getSpacesUrl()) + .stagingDefault(entity.getStagingDefault()) + .build(); + } + return entity; + }) + .collectList(); + } + + private static Mono> getServiceNames( + CloudFoundryClient cloudFoundryClient, SpaceResource spaceResource) { + return requestSpaceServices(cloudFoundryClient, ResourceUtils.getId(spaceResource)) + .map(serviceResource -> ResourceUtils.getEntity(serviceResource).getLabel()) + .collectList(); + } + + private static Mono getSpaceDetail( + CloudFoundryClient cloudFoundryClient, + SpaceResource resource, + GetSpaceRequest request) { + return Mono.zip( + getApplicationNames(cloudFoundryClient, resource), + getDomainNames(cloudFoundryClient, resource), + getOrganizationName(cloudFoundryClient, resource), + getSecurityGroups( + cloudFoundryClient, + resource, + Optional.ofNullable(request.getSecurityGroupRules()).orElse(false)), + getServiceNames(cloudFoundryClient, resource), + getOptionalSpaceQuotaDefinition(cloudFoundryClient, resource)) + .map( + function( + (applications, + domains, + organization, + securityGroups, + services, + spaceQuota) -> + toSpaceDetail( + applications, + domains, + organization, + resource, + securityGroups, + services, + spaceQuota))); + } + + private static Mono getSpaceQuota( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceQuota) { + return requestOrganizationSpaceQuotas(cloudFoundryClient, organizationId, spaceQuota) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> + ExceptionUtils.illegalArgument( + "Space quota definition %s does not exist", spaceQuota)); + } + + private static Mono + requestAssociateOrganizationUserByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + return cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build()); + } + + private static Mono + requestAssociateSpaceDeveloperByUsername( + CloudFoundryClient cloudFoundryClient, String spaceId, String username) { + return cloudFoundryClient + .spaces() + .associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest.builder() + .spaceId(spaceId) + .username(username) + .build()); + } + + private static Mono + requestAssociateSpaceManagerByUsername( + CloudFoundryClient cloudFoundryClient, String spaceId, String username) { + return cloudFoundryClient + .spaces() + .associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId(spaceId) + .username(username) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String space, + String spaceQuotaId) { + return cloudFoundryClient + .spaces() + .create( + org.cloudfoundry.client.v2.spaces.CreateSpaceRequest.builder() + .name(space) + .organizationId(organizationId) + .spaceQuotaDefinitionId(spaceQuotaId) + .build()); + } + + private static Mono requestDeleteSpace( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return cloudFoundryClient + .spaces() + .delete( + org.cloudfoundry.client.v2.spaces.DeleteSpaceRequest.builder() + .async(true) + .spaceId(spaceId) + .build()); + } + + private static Flux requestListPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListSharedDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private static Mono requestOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return cloudFoundryClient + .organizations() + .get(GetOrganizationRequest.builder().organizationId(organizationId).build()); + } + + private static Flux requestOrganizationSpaceQuotas( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceQuota) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest + .builder() + .page(page) + .organizationId(organizationId) + .build())) + .filter(resource -> ResourceUtils.getEntity(resource).getName().equals(spaceQuota)); + } + + private static Flux requestOrganizationSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .build())); + } + + private static Flux requestSpaceApplications( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Mono requestSpaceQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String spaceQuotaDefinitionId) { + return cloudFoundryClient + .spaceQuotaDefinitions() + .get( + GetSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId(spaceQuotaDefinitionId) + .build()); + } + + private static Flux requestSpaceSecurityGroups( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listSecurityGroups( + ListSpaceSecurityGroupsRequest.builder() + .spaceId(spaceId) + .page(page) + .build())); + } + + private static Flux requestSpaceServices( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServices( + ListSpaceServicesRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .list( + ListSpacesRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Mono requestUpdateSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String newName) { + return cloudFoundryClient + .spaces() + .update(UpdateSpaceRequest.builder().name(newName).spaceId(spaceId).build()); + } + + private static Mono requestUpdateSpaceSsh( + CloudFoundryClient cloudFoundryClient, String spaceId, Boolean allowed) { + return cloudFoundryClient + .spaces() + .update(UpdateSpaceRequest.builder().allowSsh(allowed).spaceId(spaceId).build()); + } + + private static Predicate sshEnabled(Boolean enabled) { + return resource -> enabled.equals(ResourceUtils.getEntity(resource).getAllowSsh()); + } + + private static SpaceDetail toSpaceDetail( + List applications, + List domains, + String organization, + SpaceResource resource, + List securityGroups, + List services, + Optional spaceQuota) { + return SpaceDetail.builder() + .applications(applications) + .domains(domains) + .id(ResourceUtils.getId(resource)) + .name(ResourceUtils.getEntity(resource).getName()) + .organization(organization) + .securityGroups(toSpaceDetailSecurityGroups(securityGroups)) + .services(services) + .spaceQuota(spaceQuota) + .build(); + } + + private static List toSpaceDetailSecurityGroupRules(List rules) { + return Optional.ofNullable(rules) + .map( + r -> + r.stream() + .map( + ruleEntity -> + Rule.builder() + .destination( + ruleEntity.getDestination()) + .ports(ruleEntity.getPorts()) + .protocol(ruleEntity.getProtocol()) + .build()) + .collect(Collectors.toList())) + .orElse(Collections.emptyList()); + } + + private static List toSpaceDetailSecurityGroups( + List securityGroups) { + return securityGroups.stream() + .map( + entity -> + SecurityGroup.builder() + .name(entity.getName()) + .rules(toSpaceDetailSecurityGroupRules(entity.getRules())) + .build()) + .collect(Collectors.toList()); + } + + private static SpaceQuota toSpaceQuotaDefinition( + Resource resource) { + SpaceQuotaDefinitionEntity entity = ResourceUtils.getEntity(resource); + + return SpaceQuota.builder() + .id(ResourceUtils.getId(resource)) + .instanceMemoryLimit(entity.getInstanceMemoryLimit()) + .name(entity.getName()) + .organizationId(entity.getOrganizationId()) + .paidServicePlans(entity.getNonBasicServicesAllowed()) + .totalMemoryLimit(entity.getMemoryLimit()) + .totalRoutes(entity.getTotalRoutes()) + .totalServiceInstances(entity.getTotalServices()) + .build(); + } + + private static SpaceSummary toSpaceSummary(SpaceResource resource) { + return SpaceSummary.builder() + .id(ResourceUtils.getId(resource)) + .name(ResourceUtils.getEntity(resource).getName()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/Spaces.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/Spaces.java new file mode 100644 index 00000000000..1793138a6dc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/Spaces.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Spaces Operations API + */ +public interface Spaces { + + /** + * Allow SSH for a specific space + * + * @param request the allow space ssh request + * @return a completion indicator + */ + Mono allowSsh(AllowSpaceSshRequest request); + + /** + * Creates a new space + * + * @param request the create space request + * @return a completion indicator + */ + Mono create(CreateSpaceRequest request); + + /** + * Deletes a specific space. + * + * @param request the delete space request + * @return a completion indicator + */ + Mono delete(DeleteSpaceRequest request); + + /** + * Disallow SSH for a specific space + * + * @param request the disallow space ssh request + * @return a completion indicator + */ + Mono disallowSsh(DisallowSpaceSshRequest request); + + /** + * Gets space information + * + * @param request details of space information required + * @return the space information + */ + Mono get(GetSpaceRequest request); + + /** + * Lists the spaces + * + * @return the spaces + */ + Flux list(); + + /** + * Renames a specific space + * + * @param request the rename space request + * @return completion indicator + */ + Mono rename(RenameSpaceRequest request); + + /** + * Check if SSH is allowed for a specific space + * + * @param request the check space ssh allowed request + * @return Boolean is ssh allowed on the space + */ + Mono sshAllowed(SpaceSshAllowedRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_AllowSpaceSshRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_AllowSpaceSshRequest.java new file mode 100644 index 00000000000..57ea24b3748 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_AllowSpaceSshRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +/** + * The request options for the allow space ssh operation + */ +@Value.Immutable +abstract class _AllowSpaceSshRequest { + + /** + * The space name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_CreateSpaceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_CreateSpaceRequest.java new file mode 100644 index 00000000000..b001f6c7178 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_CreateSpaceRequest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the delete space operation + */ +@Value.Immutable +abstract class _CreateSpaceRequest { + + /** + * The name of the new space + */ + abstract String getName(); + + /** + * The organization of the new space + */ + @Nullable + abstract String getOrganization(); + + /** + * The space quota definition of the new space + */ + @Nullable + abstract String getSpaceQuota(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_DeleteSpaceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_DeleteSpaceRequest.java new file mode 100644 index 00000000000..844d8cad375 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_DeleteSpaceRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +import java.time.Duration; + +/** + * The request options for the delete space operation + */ +@Value.Immutable +abstract class _DeleteSpaceRequest { + + /** + * How long to wait for deletion + */ + @Value.Default + Duration getCompletionTimeout() { + return Duration.ofMinutes(5); + } + + /** + * The name of the space + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_DisallowSpaceSshRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_DisallowSpaceSshRequest.java new file mode 100644 index 00000000000..93aeb0b8bb7 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_DisallowSpaceSshRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +/** + * The request options for the disallow space ssh operation + */ +@Value.Immutable +abstract class _DisallowSpaceSshRequest { + + /** + * The space name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_GetSpaceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_GetSpaceRequest.java new file mode 100644 index 00000000000..364774877c0 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_GetSpaceRequest.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the get space operation + */ +@Value.Immutable +abstract class _GetSpaceRequest { + + /** + * The name of the space + */ + abstract String getName(); + + /** + * Include Security Group Rules information + */ + @Nullable + abstract Boolean getSecurityGroupRules(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_RenameSpaceRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_RenameSpaceRequest.java new file mode 100644 index 00000000000..9ea0f502a74 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_RenameSpaceRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +/** + * The request options for the rename space operation + */ +@Value.Immutable +abstract class _RenameSpaceRequest { + + /** + * The name of the space + */ + abstract String getName(); + + /** + * The new name of the space + */ + abstract String getNewName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_Rule.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_Rule.java new file mode 100644 index 00000000000..1c148ee320b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_Rule.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.cloudfoundry.client.v2.securitygroups.Protocol; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Rule { + + /** + * The destination + */ + abstract String getDestination(); + + /** + * The ports + */ + abstract String getPorts(); + + /** + * The protocol + */ + abstract Protocol getProtocol(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SecurityGroup.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SecurityGroup.java new file mode 100644 index 00000000000..e83a9589043 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SecurityGroup.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _SecurityGroup { + + /** + * The name + */ + abstract String getName(); + + /** + * The rules + */ + abstract List getRules(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceDetail.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceDetail.java new file mode 100644 index 00000000000..04168de3da0 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceDetail.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.cloudfoundry.operations.spaceadmin.SpaceQuota; +import org.immutables.value.Value; + +import java.util.List; +import java.util.Optional; + +/** + * A Cloud Foundry Space Detail + */ +@Value.Immutable +abstract class _SpaceDetail { + + /** + * The applications + */ + abstract List getApplications(); + + /** + * The domains + */ + abstract List getDomains(); + + /** + * The id + */ + abstract String getId(); + + /** + * The name + */ + abstract String getName(); + + /** + * The organization + */ + abstract String getOrganization(); + + /** + * The security groups + */ + abstract List getSecurityGroups(); + + /** + * The services + */ + abstract List getServices(); + + /** + * The space quota + */ + abstract Optional getSpaceQuota(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceSshAllowedRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceSshAllowedRequest.java new file mode 100644 index 00000000000..7a381076f84 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceSshAllowedRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +/** + * The request options for the check space ssh enabled operation + */ +@Value.Immutable +abstract class _SpaceSshAllowedRequest { + + /** + * The space name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceSummary.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceSummary.java new file mode 100644 index 00000000000..97a1d7f7bf4 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/spaces/_SpaceSummary.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import org.immutables.value.Value; + +/** + * A Cloud Foundry Space Summary + */ +@Value.Immutable +abstract class _SpaceSummary { + + /** + * The id + */ + abstract String getId(); + + /** + * The name + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/DefaultStacks.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/DefaultStacks.java new file mode 100644 index 00000000000..5ba88cc57ef --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/DefaultStacks.java @@ -0,0 +1,88 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.stacks; + +import java.util.NoSuchElementException; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.stacks.ListStacksRequest; +import org.cloudfoundry.client.v3.stacks.StackResource; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.PaginationUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DefaultStacks implements Stacks { + + private final Mono cloudFoundryClient; + + public DefaultStacks(Mono cloudFoundryClient) { + this.cloudFoundryClient = cloudFoundryClient; + } + + @Override + public Mono get(GetStackRequest request) { + return this.cloudFoundryClient + .flatMap(cloudFoundryClient -> getStack(cloudFoundryClient, request.getName())) + .map(this::toStack) + .transform(OperationsLogging.log("Get Stack")) + .checkpoint(); + } + + @Override + public Flux list() { + return this.cloudFoundryClient + .flatMapMany(DefaultStacks::requestStacks) + .map(this::toStack) + .transform(OperationsLogging.log("List Stacks")) + .checkpoint(); + } + + private static Mono getStack( + CloudFoundryClient cloudFoundryClient, String stack) { + return requestStack(cloudFoundryClient, stack) + .single() + .onErrorResume( + NoSuchElementException.class, + t -> ExceptionUtils.illegalArgument("Stack %s does not exist", stack)); + } + + private static Flux requestStack( + CloudFoundryClient cloudFoundryClient, String stack) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .stacksV3() + .list(ListStacksRequest.builder().name(stack).page(page).build())); + } + + private static Flux requestStacks(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .stacksV3() + .list(ListStacksRequest.builder().page(page).build())); + } + + private Stack toStack(StackResource stackResource) { + return Stack.builder() + .description(stackResource.getDescription()) + .id(stackResource.getId()) + .name(stackResource.getName()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/Stacks.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/Stacks.java new file mode 100644 index 00000000000..3e798f0f620 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/Stacks.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.stacks; + +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry Stacks Operations API + */ +public interface Stacks { + + /** + * Get a Stack + * + * @param request the get stack request + * @return a {@link Stack} + */ + Mono get(GetStackRequest request); + + /** + * List all Stacks in the system + * + * @return a list of {@link Stack}s + */ + Flux list(); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/_GetStackRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/_GetStackRequest.java new file mode 100644 index 00000000000..7047b65b305 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/_GetStackRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.stacks; + +import org.immutables.value.Value; + +/** + * The request options for the get stack operation + */ +@Value.Immutable +abstract class _GetStackRequest { + + /** + * The name of the stack + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/_Stack.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/_Stack.java new file mode 100644 index 00000000000..3a42933b44f --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/stacks/_Stack.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.stacks; + +import org.immutables.value.Value; + +/** + * A Stack + */ +@Value.Immutable +abstract class _Stack { + + /** + * The description of this stack + */ + abstract String getDescription(); + + /** + * The id + */ + abstract String getId(); + + /** + * The name of this stack + */ + abstract String getName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/DefaultUserAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/DefaultUserAdmin.java new file mode 100644 index 00000000000..ff4024413b1 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/DefaultUserAdmin.java @@ -0,0 +1,818 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; +import static org.cloudfoundry.util.tuple.TupleUtils.predicate; + +import java.time.Duration; +import java.util.List; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.operations.util.OperationsLogging; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.UaaException; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.DeleteUserResponse; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.uaa.users.User; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class DefaultUserAdmin implements UserAdmin { + + private static final String SET_ROLES_BY_USERNAME_FEATURE_FLAG = "set_roles_by_username"; + + private static final String UNSET_ROLES_BY_USERNAME_FEATURE_FLAG = "unset_roles_by_username"; + + private final Mono cloudFoundryClient; + + private final Mono uaaClient; + + public DefaultUserAdmin( + Mono cloudFoundryClient, Mono uaaClient) { + this.uaaClient = uaaClient; + this.cloudFoundryClient = cloudFoundryClient; + } + + @Override + public Mono create(CreateUserRequest request) { + return Mono.zip(this.cloudFoundryClient, this.uaaClient) + .flatMap( + function( + (cloudFoundryClient, uaaClient) -> + Mono.zip( + Mono.just(cloudFoundryClient), + createUaaUserId(uaaClient, request)))) + .flatMap(function(DefaultUserAdmin::requestCreateUser)) + .then() + .transform(OperationsLogging.log("Create User")) + .checkpoint(); + } + + @Override + public Mono delete(DeleteUserRequest request) { + return Mono.zip(this.cloudFoundryClient, this.uaaClient) + .flatMap( + function( + (cloudFoundryClient, uaaClient) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(uaaClient), + getUserId(uaaClient, request.getUsername())))) + .flatMap( + function( + (cloudFoundryClient, uaaClient, userId) -> + Mono.zip( + deleteUser(cloudFoundryClient, userId), + requestDeleteUaaUser(uaaClient, userId)))) + .then() + .transform(OperationsLogging.log("Delete User")) + .checkpoint(); + } + + @Override + public Mono listOrganizationUsers(ListOrganizationUsersRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, request.getOrganizationName()))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + listOrganizationAuditorNames( + cloudFoundryClient, organizationId), + listOrganizationBillingManagerNames( + cloudFoundryClient, organizationId), + listOrganizationManagerNames( + cloudFoundryClient, organizationId)))) + .flatMap(function(this::toOrganizationUsers)) + .transform(OperationsLogging.log("List Organization Users")) + .checkpoint(); + } + + @Override + public Mono listSpaceUsers(ListSpaceUsersRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, request.getOrganizationName()))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceId( + cloudFoundryClient, + organizationId, + request.getSpaceName())))) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + Mono.zip( + listSpaceAuditorNames(cloudFoundryClient, spaceId), + listSpaceDeveloperNames( + cloudFoundryClient, spaceId), + listSpaceManagerNames( + cloudFoundryClient, spaceId)))) + .flatMap(function(this::toSpaceUsers)) + .transform(OperationsLogging.log("List Space Users")) + .checkpoint(); + } + + @Override + public Mono setOrganizationRole(SetOrganizationRoleRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getFeatureFlagEnabled( + cloudFoundryClient, + SET_ROLES_BY_USERNAME_FEATURE_FLAG))) + .filter( + predicate( + (cloudFoundryClient, setRolesByUsernameEnabled) -> + setRolesByUsernameEnabled)) + .switchIfEmpty( + ExceptionUtils.illegalState("Setting roles by username is not enabled")) + .flatMap( + function( + (cloudFoundryClient, ignore) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, + request.getOrganizationName())))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + requestAssociateOrganizationUserByUsername( + cloudFoundryClient, + organizationId, + request), + associateOrganizationRole( + cloudFoundryClient, + organizationId, + request)))) + .transform(OperationsLogging.log("Set User Organization Role")) + .then(); + } + + @Override + public Mono setSpaceRole(SetSpaceRoleRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getFeatureFlagEnabled( + cloudFoundryClient, + SET_ROLES_BY_USERNAME_FEATURE_FLAG))) + .filter( + predicate( + (cloudFoundryClient, setRolesByUsernameEnabled) -> + setRolesByUsernameEnabled)) + .switchIfEmpty( + ExceptionUtils.illegalState("Setting roles by username is not enabled")) + .flatMap( + function( + (cloudFoundryClient, ignore) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, + request.getOrganizationName())))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(organizationId), + getSpaceId( + cloudFoundryClient, + organizationId, + request.getSpaceName())))) + .flatMap( + function( + (cloudFoundryClient, organizationId, spaceId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + Mono.just(spaceId), + associateOrganizationRole( + cloudFoundryClient, + request.getUsername(), + organizationId)))) + .flatMap( + function( + (cloudFoundryClient, spaceId, ignore) -> + associateSpaceRole(cloudFoundryClient, request, spaceId))) + .transform(OperationsLogging.log("Set User Space Role")) + .then(); + } + + @Override + public Mono unsetOrganizationRole(UnsetOrganizationRoleRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getFeatureFlagEnabled( + cloudFoundryClient, + UNSET_ROLES_BY_USERNAME_FEATURE_FLAG))) + .filter( + predicate( + (cloudFoundryClient, setRolesByUsernameEnabled) -> + setRolesByUsernameEnabled)) + .switchIfEmpty( + ExceptionUtils.illegalState("Unsetting roles by username is not enabled")) + .flatMap( + function( + (cloudFoundryClient, ignore) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, + request.getOrganizationName())))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + removeOrganizationRole( + cloudFoundryClient, organizationId, request))) + .transform(OperationsLogging.log("Unset User Organization Role")) + .then(); + } + + @Override + public Mono unsetSpaceRole(UnsetSpaceRoleRequest request) { + return this.cloudFoundryClient + .flatMap( + cloudFoundryClient -> + Mono.zip( + Mono.just(cloudFoundryClient), + getFeatureFlagEnabled( + cloudFoundryClient, + UNSET_ROLES_BY_USERNAME_FEATURE_FLAG))) + .filter( + predicate( + (cloudFoundryClient, setRolesByUsernameEnabled) -> + setRolesByUsernameEnabled)) + .switchIfEmpty( + ExceptionUtils.illegalState("Unsetting roles by username is not enabled")) + .flatMap( + function( + (cloudFoundryClient, ignore) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getOrganizationId( + cloudFoundryClient, + request.getOrganizationName())))) + .flatMap( + function( + (cloudFoundryClient, organizationId) -> + Mono.zip( + Mono.just(cloudFoundryClient), + getSpaceId( + cloudFoundryClient, + organizationId, + request.getSpaceName())))) + .flatMap( + function( + (cloudFoundryClient, spaceId) -> + removeSpaceRole(cloudFoundryClient, request, spaceId))) + .transform(OperationsLogging.log("Unset User Space Role")) + .then(); + } + + private static Mono associateOrganizationRole( + CloudFoundryClient cloudFoundryClient, + String organizationId, + SetOrganizationRoleRequest request) { + if (OrganizationRole.AUDITOR == request.getOrganizationRole()) { + return cloudFoundryClient + .organizations() + .associateAuditorByUsername( + AssociateOrganizationAuditorByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (OrganizationRole.BILLING_MANAGER == request.getOrganizationRole()) { + return cloudFoundryClient + .organizations() + .associateBillingManagerByUsername( + AssociateOrganizationBillingManagerByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (OrganizationRole.MANAGER == request.getOrganizationRole()) { + return cloudFoundryClient + .organizations() + .associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()) + .then(); + } + + return ExceptionUtils.illegalArgument("Unknown organization role specified"); + } + + private static Mono associateOrganizationRole( + CloudFoundryClient cloudFoundryClient, String username, String organizationId) { + return cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build()); + } + + private static Mono associateSpaceRole( + CloudFoundryClient cloudFoundryClient, SetSpaceRoleRequest request, String spaceId) { + if (SpaceRole.AUDITOR == request.getSpaceRole()) { + return cloudFoundryClient + .spaces() + .associateAuditorByUsername( + AssociateSpaceAuditorByUsernameRequest.builder() + .spaceId(spaceId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (SpaceRole.DEVELOPER == request.getSpaceRole()) { + return cloudFoundryClient + .spaces() + .associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest.builder() + .spaceId(spaceId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (SpaceRole.MANAGER == request.getSpaceRole()) { + return cloudFoundryClient + .spaces() + .associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId(spaceId) + .username(request.getUsername()) + .build()) + .then(); + } + + return ExceptionUtils.illegalArgument("Unknown space role specified"); + } + + private static Mono createUaaUserId(UaaClient uaaClient, CreateUserRequest request) { + return requestCreateUaaUser(uaaClient, request) + .map(CreateUserResponse::getId) + .onErrorResume( + UaaException.class, + t -> + ExceptionUtils.illegalArgument( + "User %s already exists", request.getUsername())); + } + + private static Mono deleteUser(CloudFoundryClient cloudFoundryClient, String userId) { + return requestDeleteUser(cloudFoundryClient, userId) + .onErrorResume( + t -> + t instanceof ClientV2Exception + && ((ClientV2Exception) t).getStatusCode() == 404, + t -> Mono.empty()) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), job)); + } + + private static Mono getFeatureFlagEnabled( + CloudFoundryClient cloudFoundryClient, String featureFlag) { + return requestGetFeatureFlag(cloudFoundryClient, featureFlag) + .map(GetFeatureFlagResponse::getEnabled); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestListOrganizations(cloudFoundryClient, organizationName) + .singleOrEmpty() + .map(ResourceUtils::getId) + .switchIfEmpty( + ExceptionUtils.illegalArgument( + "Organization %s not found", organizationName)); + } + + private static Mono getSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestListSpaces(cloudFoundryClient, organizationId, spaceName) + .singleOrEmpty() + .map(ResourceUtils::getId) + .switchIfEmpty(ExceptionUtils.illegalArgument("Space %s not found", spaceName)); + } + + private static Mono getUserId(UaaClient uaaClient, String username) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .users() + .list( + ListUsersRequest.builder() + .filter( + String.format( + "userName eq \"%s\"", + username)) + .startIndex(startIndex) + .build())) + .switchIfEmpty(ExceptionUtils.illegalArgument("User %s does not exist", username)) + .single() + .map(User::getId); + } + + private static Mono> listOrganizationAuditorNames( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationAuditors(cloudFoundryClient, organizationId) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .collectList(); + } + + private static Mono> listOrganizationBillingManagerNames( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationBillingManagers(cloudFoundryClient, organizationId) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .collectList(); + } + + private static Mono> listOrganizationManagerNames( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationManagers(cloudFoundryClient, organizationId) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .collectList(); + } + + private static Mono> listSpaceAuditorNames( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceAuditors(cloudFoundryClient, spaceId) + .filter(resource -> null != ResourceUtils.getEntity(resource).getUsername()) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .collectList(); + } + + private static Mono> listSpaceDeveloperNames( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceDevelopers(cloudFoundryClient, spaceId) + .filter(resource -> null != ResourceUtils.getEntity(resource).getUsername()) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .collectList(); + } + + private static Mono> listSpaceManagerNames( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceManagers(cloudFoundryClient, spaceId) + .filter(resource -> null != ResourceUtils.getEntity(resource).getUsername()) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .collectList(); + } + + private static Mono removeOrganizationRole( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnsetOrganizationRoleRequest request) { + if (OrganizationRole.AUDITOR == request.getOrganizationRole()) { + return cloudFoundryClient + .organizations() + .removeAuditorByUsername( + RemoveOrganizationAuditorByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (OrganizationRole.BILLING_MANAGER == request.getOrganizationRole()) { + return cloudFoundryClient + .organizations() + .removeBillingManagerByUsername( + RemoveOrganizationBillingManagerByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (OrganizationRole.MANAGER == request.getOrganizationRole()) { + return cloudFoundryClient + .organizations() + .removeManagerByUsername( + RemoveOrganizationManagerByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()) + .then(); + } + + return ExceptionUtils.illegalArgument("Unknown organization role specified"); + } + + private static Mono removeSpaceRole( + CloudFoundryClient cloudFoundryClient, UnsetSpaceRoleRequest request, String spaceId) { + if (SpaceRole.AUDITOR == request.getSpaceRole()) { + return cloudFoundryClient + .spaces() + .removeAuditorByUsername( + RemoveSpaceAuditorByUsernameRequest.builder() + .spaceId(spaceId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (SpaceRole.DEVELOPER == request.getSpaceRole()) { + return cloudFoundryClient + .spaces() + .removeDeveloperByUsername( + RemoveSpaceDeveloperByUsernameRequest.builder() + .spaceId(spaceId) + .username(request.getUsername()) + .build()) + .then(); + } + + if (SpaceRole.MANAGER == request.getSpaceRole()) { + return cloudFoundryClient + .spaces() + .removeManagerByUsername( + RemoveSpaceManagerByUsernameRequest.builder() + .spaceId(spaceId) + .username(request.getUsername()) + .build()) + .then(); + } + + return ExceptionUtils.illegalArgument("Unknown space role specified"); + } + + private static Mono + requestAssociateOrganizationUserByUsername( + CloudFoundryClient cloudFoundryClient, + String organizationId, + SetOrganizationRoleRequest request) { + return cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId(organizationId) + .username(request.getUsername()) + .build()); + } + + private static Mono requestCreateUaaUser( + UaaClient uaaClient, CreateUserRequest request) { + return uaaClient + .users() + .create( + org.cloudfoundry.uaa.users.CreateUserRequest.builder() + .email( + Email.builder() + .primary(true) + .value(request.getUsername()) + .build()) + .name( + Name.builder() + .familyName(request.getUsername()) + .givenName(request.getUsername()) + .build()) + .origin(request.getOrigin()) + .password(request.getPassword()) + .userName(request.getUsername()) + .build()); + } + + private static Mono requestCreateUser( + CloudFoundryClient cloudFoundryClient, String userId) { + return cloudFoundryClient + .users() + .create( + org.cloudfoundry.client.v2.users.CreateUserRequest.builder() + .uaaId(userId) + .build()); + } + + private static Mono requestDeleteUaaUser( + UaaClient uaaClient, String userId) { + return uaaClient + .users() + .delete( + org.cloudfoundry.uaa.users.DeleteUserRequest.builder() + .userId(userId) + .build()); + } + + private static Mono requestDeleteUser( + CloudFoundryClient cloudFoundryClient, String userId) { + return cloudFoundryClient + .users() + .delete( + org.cloudfoundry.client.v2.users.DeleteUserRequest.builder() + .async(true) + .userId(userId) + .build()); + } + + private static Mono requestGetFeatureFlag( + CloudFoundryClient cloudFoundryClient, String featureFlag) { + return cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(featureFlag).build()); + } + + private static Flux requestListOrganizationAuditors( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listAuditors( + ListOrganizationAuditorsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListOrganizationBillingManagers( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listBillingManagers( + ListOrganizationBillingManagersRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListOrganizationManagers( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listManagers( + ListOrganizationManagersRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .build())); + } + + private static Flux requestListSpaceAuditors( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listAuditors( + ListSpaceAuditorsRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceDevelopers( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listDevelopers( + ListSpaceDevelopersRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceManagers( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listManagers( + ListSpaceManagersRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .page(page) + .build())); + } + + private Mono toOrganizationUsers( + List auditors, List billingManagers, List managers) { + return Mono.just( + OrganizationUsers.builder() + .addAllAuditors(auditors) + .addAllBillingManagers(billingManagers) + .addAllManagers(managers) + .build()); + } + + private Mono toSpaceUsers( + List auditors, List developers, List managers) { + return Mono.just( + SpaceUsers.builder() + .addAllAuditors(auditors) + .addAllDevelopers(developers) + .addAllManagers(managers) + .build()); + } +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/OrganizationRole.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/OrganizationRole.java new file mode 100644 index 00000000000..f5ec0a1b47b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/OrganizationRole.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +/** + * The organization roles of users + */ +public enum OrganizationRole { + + /** + * User is an Auditor for the organization + */ + AUDITOR, + + /** + * User is a Billing Manager for the organization + */ + BILLING_MANAGER, + + /** + * User is a Manager for the organization + */ + MANAGER +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/SpaceRole.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/SpaceRole.java new file mode 100644 index 00000000000..d6e10af7e0d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/SpaceRole.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +/** + * The space roles of users + */ +public enum SpaceRole { + + /** + * User is an Auditor for the space + */ + AUDITOR, + + /** + * User is a Developer for the space + */ + DEVELOPER, + + /** + * User is a Manager for the space + */ + MANAGER +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/UserAdmin.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/UserAdmin.java new file mode 100644 index 00000000000..89cac0016cc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/UserAdmin.java @@ -0,0 +1,89 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import reactor.core.publisher.Mono; + +/** + * Main entry point to the Cloud Foundry User Admin Operations API + */ +public interface UserAdmin { + + /** + * Create a user + * + * @param request the create user request + * @return completion indicator + */ + Mono create(CreateUserRequest request); + + /** + * Delete a user + * + * @param request the delete user request + * @return completion indicator + */ + Mono delete(DeleteUserRequest request); + + /** + * List organization users + * + * @param request the list organization users request + * @return the Organization Users + */ + Mono listOrganizationUsers(ListOrganizationUsersRequest request); + + /** + * List space users + * + * @param request the list space users request + * @return the Space Users + */ + Mono listSpaceUsers(ListSpaceUsersRequest request); + + /** + * Assign an organization role to a user + * + * @param request the set organization user request + * @return completion indicator + */ + Mono setOrganizationRole(SetOrganizationRoleRequest request); + + /** + * Assign a space role to a user + * + * @param request the set space user request + * @return completion indicator + */ + Mono setSpaceRole(SetSpaceRoleRequest request); + + /** + * Remove an organization role from a user + * + * @param request the unset organization user request + * @return completion indicator + */ + Mono unsetOrganizationRole(UnsetOrganizationRoleRequest request); + + /** + * Remove a space role from a user + * + * @param request the unset space user request + * @return completion indicator + */ + Mono unsetSpaceRole(UnsetSpaceRoleRequest request); +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_CreateUserRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_CreateUserRequest.java new file mode 100644 index 00000000000..db0707b053b --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_CreateUserRequest.java @@ -0,0 +1,56 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.cloudfoundry.Nullable; +import org.immutables.value.Value; + +/** + * The request options for the create user operation + */ +@Value.Immutable +abstract class _CreateUserRequest { + + @Value.Check + void check() { + if (getOrigin() == null && getPassword() == null) { + throw new IllegalStateException("Cannot build CreateUserRequest, one of password or origin must be set"); + } + + if (getOrigin() != null && getPassword() != null) { + throw new IllegalStateException("Cannot build CreateUserRequest, only one of password or origin can be set"); + } + } + + /** + * The identity provider that authenticated the new user + */ + @Nullable + abstract String getOrigin(); + + /** + * The password of the new user + */ + @Nullable + abstract String getPassword(); + + /** + * The username of the new user + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_DeleteUserRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_DeleteUserRequest.java new file mode 100644 index 00000000000..1d942e39946 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_DeleteUserRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the delete user operation + */ +@Value.Immutable +abstract class _DeleteUserRequest { + + /** + * The username of the user to delete + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_ListOrganizationUsersRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_ListOrganizationUsersRequest.java new file mode 100644 index 00000000000..24119c779dc --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_ListOrganizationUsersRequest.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the list organization users operation + */ +@Value.Immutable +abstract class _ListOrganizationUsersRequest { + + /** + * Organization name to list + */ + abstract String getOrganizationName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_ListSpaceUsersRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_ListSpaceUsersRequest.java new file mode 100644 index 00000000000..1510021462d --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_ListSpaceUsersRequest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the list space users operation + */ +@Value.Immutable +abstract class _ListSpaceUsersRequest { + + /** + * Organization name to list + */ + abstract String getOrganizationName(); + + /** + * Space name to list + */ + abstract String getSpaceName(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_OrganizationUsers.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_OrganizationUsers.java new file mode 100644 index 00000000000..74c523114ae --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_OrganizationUsers.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +import java.util.List; + +/** + * The users for an organization + */ +@Value.Immutable +abstract class _OrganizationUsers { + + /** + * The organization's auditors + */ + abstract List getAuditors(); + + /** + * The organization's developers + */ + abstract List getBillingManagers(); + + /** + * The organization's managers + */ + abstract List getManagers(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SetOrganizationRoleRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SetOrganizationRoleRequest.java new file mode 100644 index 00000000000..18cff8b3f09 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SetOrganizationRoleRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the set organization role operation + */ +@Value.Immutable +abstract class _SetOrganizationRoleRequest { + + /** + * Organization name + */ + abstract String getOrganizationName(); + + /** + * Role + */ + abstract OrganizationRole getOrganizationRole(); + + /** + * Username + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SetSpaceRoleRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SetSpaceRoleRequest.java new file mode 100644 index 00000000000..44dbfd051b8 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SetSpaceRoleRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the set space role operation + */ +@Value.Immutable +abstract class _SetSpaceRoleRequest { + + /** + * Organization name + */ + abstract String getOrganizationName(); + + /** + * Space name + */ + abstract String getSpaceName(); + + /** + * Role + */ + abstract SpaceRole getSpaceRole(); + + /** + * Username + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SpaceUsers.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SpaceUsers.java new file mode 100644 index 00000000000..601864432ce --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_SpaceUsers.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +import java.util.List; + +/** + * The users for a space + */ +@Value.Immutable +abstract class _SpaceUsers { + + /** + * The space's auditors + */ + abstract List getAuditors(); + + /** + * The space's developers + */ + abstract List getDevelopers(); + + /** + * The space's managers + */ + abstract List getManagers(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_UnsetOrganizationRoleRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_UnsetOrganizationRoleRequest.java new file mode 100644 index 00000000000..7dcb14892d3 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_UnsetOrganizationRoleRequest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the unset organization role operation + */ +@Value.Immutable +abstract class _UnsetOrganizationRoleRequest { + + /** + * Organization name + */ + abstract String getOrganizationName(); + + /** + * Role + */ + abstract OrganizationRole getOrganizationRole(); + + /** + * Username + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_UnsetSpaceRoleRequest.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_UnsetSpaceRoleRequest.java new file mode 100644 index 00000000000..cd027d90947 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/useradmin/_UnsetSpaceRoleRequest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import org.immutables.value.Value; + +/** + * The request options for the unset space role operation + */ +@Value.Immutable +abstract class _UnsetSpaceRoleRequest { + + /** + * Organization name + */ + abstract String getOrganizationName(); + + /** + * Space name + */ + abstract String getSpaceName(); + + /** + * Role + */ + abstract SpaceRole getSpaceRole(); + + /** + * Username + */ + abstract String getUsername(); + +} diff --git a/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/util/OperationsLogging.java b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/util/OperationsLogging.java new file mode 100644 index 00000000000..2c7a1675153 --- /dev/null +++ b/cloudfoundry-operations/src/main/java/org/cloudfoundry/operations/util/OperationsLogging.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.util; + +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Consumer; +import java.util.function.Function; +import org.cloudfoundry.util.TimeUtils; +import org.reactivestreams.Publisher; +import org.reactivestreams.Subscription; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.publisher.SignalType; + +public final class OperationsLogging { + + private static final Logger LOGGER = LoggerFactory.getLogger("cloudfoundry-client.operations"); + + private OperationsLogging() {} + + @SuppressWarnings("unchecked") + public static , U> Function log(String message) { + if (!LOGGER.isDebugEnabled()) { + return f -> f; + } + + AtomicLong startTimeHolder = new AtomicLong(); + + Consumer start = + subscription -> { + startTimeHolder.set(System.currentTimeMillis()); + LOGGER.debug("START {}", message); + }; + + Consumer finish = + signalType -> { + String elapsed = + TimeUtils.asTime(System.currentTimeMillis() - startTimeHolder.get()); + LOGGER.debug("FINISH {} ({}/{})", message, signalType, elapsed); + }; + + return f -> { + if (f instanceof Mono) { + return (T) ((Mono) f).doOnSubscribe(start).doFinally(finish); + } + if (f instanceof Flux) { + return (T) ((Flux) f).doOnSubscribe(start).doFinally(finish); + } else { + return f; + } + }; + } +} diff --git a/cloudfoundry-operations/src/main/resources/adjectives.txt b/cloudfoundry-operations/src/main/resources/adjectives.txt new file mode 100644 index 00000000000..f32df511981 --- /dev/null +++ b/cloudfoundry-operations/src/main/resources/adjectives.txt @@ -0,0 +1,40586 @@ +abactinal +abaised +abandonable +abandoned +abased +abasic +abatable +abaxial +abbatial +abdicable +abdicant +abdicative +abdominal +abdominous +abducent +aberrant +aberrational +abessive +abeyant +abhominable +abhorrent +abiding +abient +abiogenetic +abiotic +abiotrophic +abirritant +abirritative +abject +abjective +abjuratory +ablatival +ablative +able +ablepharous +ableptical +abler +ablest +abluent +ablush +ablutionary +abnormal +abolishable +abolitionary +abominable +aboral +aboriginal +abortifacient +abortional +abortive +aboulic +aboveground +abox +abradant +abranchiate +abridgable +abridgeable +abridged +abrogable +abrogative +abrupt +abscessed +absent +absinthial +absinthian +absolute +absolutistic +absolutory +absolvable +absolvent +absonant +absorbable +absorbed +absorbent +absorbing +absorptiometric +absorptive +abstemious +abstentious +abstergent +abstersive +abstinent +abstract +abstracted +abstractional +abstractive +abstruse +absurd +abulic +abundant +abusable +abusive +abutting +abuzz +abysmal +abyssal +academic +academical +acanthaceous +acanthine +acanthocarpous +acanthocladous +acanthoid +acanthopterygian +acanthotic +acanthous +acapnial +acardiac +acaricidal +acaridan +acaroid +acarpellous +acarpelous +acarpous +acatalectic +acaudal +acaulescent +accelerable +accelerando +accelerative +accentless +accentuable +accentual +acceptable +acceptant +accepted +accessible +accessional +accessorial +accidental +accipitral +accipitrine +acclamatory +acclimatable +acclimatisable +acclimatizable +acclivitous +acclivous +accoladed +accolated +accommodable +accommodating +accommodational +accommodative +accomplishable +accomplished +accordable +accordant +according +accostable +accosted +accountable +accrescent +accretionary +accretive +acculturational +acculturative +accumbent +accumulable +accumulative +accurate +accursed +accusable +accusatival +accusative +accusatorial +accusatory +accustomed +acellular +acentric +acephalous +acerate +acerb +acerbic +acerose +acerous +acervate +acescent +acesodyne +acesodynous +acetabular +acetabuliform +acetated +acetic +acetimetric +acetometrical +acetonic +acetous +acetylenic +acetylic +acheilary +achenial +achievable +achilary +achlamydate +achlamydeous +achlorhydric +achlorophyllous +acholic +acholuric +achondritic +achondroplastic +achromatic +achromatophil +achromatous +achromic +achronychous +acicular +aciculate +acidic +acidifiable +acidimetric +acidimetrical +acidogenic +acidophil +acidophilic +acidotic +acidulous +aciduric +acidy +aciform +acinaceous +acinacifolious +acinaciform +acinarious +acinic +aciniform +acinous +acknowledgeable +acmic +acnodal +acockbill +acoelomate +acoelous +acold +aconitic +acorned +acosmistic +acotyledonous +acoustic +acquainted +acquiescent +acquirable +acquisitive +acred +acrid +acrimonious +acritical +acrobatic +acrocarpous +acrocephalic +acrocephalous +acrodont +acrodrome +acrogenic +acrogynous +acrolithic +acrologic +acromegalic +acronal +acronical +acronychal +acronychous +acronymic +acronymous +acropetal +acrophonic +acropolitan +acrosporous +acroteral +acroterial +acrotic +acrylic +actable +actinal +acting +actinian +actinic +actiniform +actinobacillotic +actinochemical +actinodrome +actinographic +actinoid +actinolitic +actinometric +actinometrical +actinomorphic +actinomycetous +actinomycotic +actinopterygian +actionable +actionless +active +actual +actualistic +actuarial +actuarian +acuate +aculeate +acuminate +acuminous +acute +acutilingual +acyclic +adactylous +adagial +adagietto +adagio +adamant +adamantine +adaptable +adaptational +adaptive +adaxial +addable +addible +addicted +addictive +additamentary +additional +additive +additory +addlebrained +addlepated +addorsed +adduceable +adducent +adducible +adductive +adenocarcinomatous +adenoid +adenoidal +adenological +adenomatous +adenophyllous +adept +adequate +adessive +adhesional +adhesive +adiabatic +adiactinic +adiaphoretic +adiaphoristic +adiaphorous +adient +adipocerous +adipopectic +adipopexic +adipose +adjacent +adjectival +adjoining +adjudicative +adjunctive +adjuratory +adjustable +adjustmental +adjuvant +adminicular +administrable +administrant +administrational +administrative +admirable +admirative +admissible +admissive +admittable +admittible +admonitorial +admonitory +adnate +adolescent +adoptable +adopted +adoptional +adoptive +adorable +adorsed +adrenal +adrenergic +adrenocorticotropic +adroit +adscititious +adscript +adsorbable +adsorbent +adsorptive +adularescent +adulatory +adult +adulterine +adulterous +adumbral +adumbrative +adunc +adust +advanced +advantageous +advective +adventitial +adventitious +adventive +adventureful +adventuresome +adventurous +adverbless +adversative +adverse +advertent +advertisable +advertizable +advisable +advised +advisory +advocatory +adynamic +ae +aecial +aedeagal +aedilitian +aeneous +aeolotropic +aeonian +aerarian +aerial +aeriferous +aeriform +aerobacteriological +aeroballistic +aerobatic +aerobic +aerobiologic +aerobiological +aerobiotic +aerodonetic +aerodynamic +aerodynamical +aeroelastic +aerogenic +aerographic +aerographical +aerolitic +aerologic +aerological +aeromantic +aeromarine +aeromechanical +aeromedical +aerometric +aeronautic +aeronautical +aerophilatelic +aerophobic +aeroscopic +aerostatic +aerothermodynamic +aerotropic +aeruginous +aery +aesthetical +aestival +aetiological +afeard +afebrile +affable +affected +affecting +affectional +affectionate +afferent +affettuoso +affianced +affiliable +affinal +affine +affined +affinitive +affirmable +affirmative +affirmatory +affixal +afflated +afflictionless +afflictive +affluent +affordable +affronta +affrontive +afocal +aforementioned +aforesaid +aforethought +afraid +aftermost +aftershafted +aftmost +agamic +agamogenetic +agaricaceous +agatelike +agatoid +agaze +aged +agee +ageless +agelong +agenetic +agential +agentival +agentive +ageusic +aggadic +agglomerative +agglutinable +agglutinant +agglutinative +agglutinogenic +aggradational +aggravative +aggregable +aggregate +aggregately +aggregative +aggregatory +aggressive +aghast +agile +agitable +agitational +agitative +agitato +agitatorial +agleam +agley +aglimmer +aglint +aglisten +aglitter +aglow +agminate +agnate +agnathous +agnatic +agnatical +agnominal +agog +agonal +agonic +agonistic +agonizing +agraphic +agrarian +agravic +agreeable +agreed +agrestal +agrestic +agricultural +agriological +agrobiologic +agrobiological +agrologic +agrological +agronomic +agronomical +agrostographic +agrostographical +agrostologic +agrostological +agrypnotic +aguelike +aguish +ahistoric +ahistorical +ahorse +ahull +ahungered +aidful +aidless +aiguilletted +ailanthic +ailing +ailurophilic +ailurophobic +aimful +aimless +airborne +airier +airiest +airless +airlike +airproof +airsick +airtight +airworthy +airy +aisled +akin +akinetic +alacritous +alar +alarmable +alary +alate +albescent +albinic +albinistic +albitic +albuminoid +albuminoidal +albuminous +albuminuric +alburnous +alchemic +alchemistical +alcid +alcidine +alclad +alcoholometric +alcoholometrical +alcoholytic +aldehydic +aldermanic +aleatory +alecithal +alembicated +alert +alethic +alethiologic +alethiological +aleuronic +alexinic +alexipharmic +alfresco +algal +algebraic +algesic +algetic +algid +algoid +algolagnic +algological +algometric +algometrical +algophagous +algorismic +algorithmic +algraphic +alible +alicyclic +alienable +aliform +alimental +alimentary +alimentative +alimonied +aliped +aliphatic +aliquant +aliquot +alist +aliturgical +alive +alkahestic +alkahestical +alkalescent +alkalic +alkalifiable +alkalimetric +alkalimetrical +alkaline +alkalisable +alkalizable +alkaloidal +alkylic +allanitic +allantoic +allantoid +allargando +allative +allegeable +alleged +allegiant +allegorical +allegoristic +allegretto +allegro +allelic +allelomorphic +alleluiatic +allergenic +allergic +alleviative +alleviatory +alliable +alliaceous +allied +alliterative +allobaric +allocable +allochthonous +allodial +allogamous +allogenic +allomerous +allometric +allomorphic +allonga +allonymous +allopathic +allopatric +allopelagic +allophonic +allophylian +alloplasmatic +alloplasmic +allopolyploid +allotriomorphic +allotropic +allottable +allotypic +allover +allowable +allowed +alluring +allusive +alluvial +allylic +almighty +almondlike +almondy +alodial +aloetic +alongships +aloof +alopecic +alpestrine +alphabetic +alphabetical +alphameric +alphanumeric +alpine +alsinaceous +alt +alterable +alterant +alterative +altern +alternant +altimetrical +altissimo +altitudinal +altricial +altruistic +alular +aluminic +aluminiferous +aluminographic +aluminous +alutaceous +alveated +alveolar +alveolate +alvine +alwite +amalgamable +amalgamative +amandine +amaranthaceous +amaranthine +amaryllidaceous +amassable +amateurish +amative +amatory +amaurotic +amazed +amazing +ambagious +ambassadorial +amberlike +amberous +ambery +ambidexter +ambidextral +ambidextrous +ambient +ambiguous +ambilateral +ambisexual +ambisinister +ambisyllabic +ambitionless +ambitious +ambivalent +amblyopic +ambrosiaceous +ambrosial +ambulacral +ambulant +ambulatory +ambushlike +amebic +ameboid +ameiotic +ameliorable +ameliorative +ameloblastic +amenable +amendable +amendatory +amenorrheal +amenorrheic +amenorrhoeal +amenorrhoeic +amentaceous +amental +amentiferous +amentiform +amerceable +ameristic +ametabolic +amethystine +amethystlike +ametropic +amiable +amianthine +amianthoid +amianthoidal +amic +amicable +amidic +aminic +amitotic +ammiaceous +ammoniac +ammoniacal +ammonic +ammonitic +ammonitoid +ammono +ammonolitic +ammophilous +amnestic +amniotic +amoebaean +amoebalike +amoebic +amoeboid +amoral +amoristic +amoroso +amorous +amorphous +amort +amortisable +amortizable +ampelitic +amperometric +ampherotokous +amphiarthrodial +amphibiotic +amphibious +amphibolic +amphibolitic +amphibological +amphibolous +amphibrachic +amphicarpous +amphichroic +amphicoelous +amphictyonic +amphigenous +amphigoric +amphikaryotic +amphipneustic +amphiprostylar +amphiprostyle +amphiprotic +amphisbaenian +amphisbaenic +amphisbaenoid +amphisbaenous +amphistylar +amphitheatric +amphitheatrical +amphithecial +amphitokal +amphitokous +amphitrichate +amphitropous +amphogenic +ampholytic +amphoral +amphoric +amphoteric +ample +amplectant +ampler +amplest +amplexicaul +amplexifoliate +ampliate +amplifiable +amplificatory +ampullaceous +amputative +amusable +amused +amusing +amusive +amyatonic +amyelic +amygdalaceous +amygdalate +amygdalic +amygdaliform +amygdaline +amygdaloidal +amylaceous +amylic +amylolytic +anabatic +anabiotic +anabolic +anacanthous +anacardiaceous +anachronic +anachronistic +anachronous +anaclastic +anaclinal +anaclitic +anacoluthic +anacoustic +anacrogynous +anacrustic +anacusic +anadromous +anaemic +anaerobic +anaerobiotic +anagenetic +anagenetical +anaglyphic +anaglyphical +anaglyptic +anaglyptical +anagogic +anagrammatic +anagrammatical +analectic +analemmatic +analeptic +analgesic +analogical +analogistic +analogous +analphabetic +analysable +analytic +analyzable +anamnestic +anamorphic +anandrous +ananthous +anapaestic +anapestic +anaphoral +anaphrodisiac +anaphylactic +anaplastic +anapophysial +anaptotic +anaptyctic +anaptyctical +anarchic +anarchistic +anarthric +anarthrous +anasarcous +anastigmatic +anastomotic +anathematic +anatine +anatomical +anatomicopathological +anatomisable +anatomizable +anatropous +ancestral +anchorable +anchoretic +anchoritic +anchorless +anchorlike +anchory +anchylotic +ancient +ancillary +ancipital +anconal +anconoid +ancra +andante +andantino +andesitic +androcentric +androcratic +androdioecious +androecial +androgenic +androgenous +androgynous +andromonoecious +andropetalous +anecdotal +anecdotic +anechoic +anelastic +anelectric +anemic +anemochorous +anemographic +anemometric +anemometrical +anemophilous +anemotropic +anencephalic +anepigraphic +anergic +aneroid +aneuch +aneuploid +aneuric +aneurismal +aneurysmal +anfractuous +angelic +anginal +angioblastic +angiocardiographic +angiocarpous +angiomatous +angiospermous +angrier +angriest +angry +anguilliform +anguine +anguished +angular +angulate +angulous +anharmonic +anhedonic +anhemitonic +anhidrotic +anhydremic +anhydrotic +anhydrous +aniconic +anile +anilidic +animadversional +animalcular +animalculous +animalic +animalistic +animated +animatistic +animato +animist +animistic +anionic +aniseikonic +anisic +anisocarpic +anisodactyl +anisodactylous +anisodont +anisogametic +anisogamous +anisomerous +anisometric +anisometropic +anisophyllous +anisopteran +anisotropic +ankylotic +annalistic +annectent +annexable +annexational +annihilable +annihilationistic +annihilationistical +annihilative +annotative +annotatory +annotinous +announceable +annoying +annual +annular +annulate +annullable +annulose +annunciable +annunciative +annunciatory +anodic +anoetic +anomalistic +anomalous +anomic +anonymous +anopisthographic +anorectal +anorectic +anorthic +anorthitic +anosmatic +anosmic +anourous +anoxaemic +anoxemic +anoxic +ansate +anserine +answerable +answerless +antagonisable +antagonistic +antagonizable +antalkaline +antarctic +antarthritic +antasthmatic +antatrophic +antebellum +antecedental +antediluvian +antefixal +antelopian +antelopine +antemeridian +antemundane +antenatal +antennal +antennary +antennate +antenniform +antennular +antenuptial +anteorbital +antepenultimate +anteprandial +anteprohibition +anterior +anteroparietal +antheral +antheridial +antherless +anthocarpous +anthological +anthophyllitic +anthracitic +anthracoid +anthracotic +anthropocentric +anthropogenetic +anthropogenic +anthropogeographic +anthropogeographical +anthropographic +anthropoid +anthropoidal +anthropolatric +anthropologic +anthropological +anthropometric +anthropometrical +anthropomorphic +anthropomorphous +anthroponomical +anthropopathic +anthropophagic +anthroposophic +anthroposophical +anti +antiagglutinant +antiagglutination +antiagglutinative +antiaggression +antiaggressive +antiaircraft +antialcoholic +antiannexation +antiaphrodisiac +antiaristocracy +antiaristocratic +antiaristocratical +antiatheism +antiatheistic +antiatheistical +antibacchic +antibacterial +antiballistic +antibilious +antiblastic +anticapitalistic +anticarious +anticaste +anticatalytic +anticatarrhal +anticensorial +anticensorious +anticentralization +anticeremonial +anticeremonious +antichloristic +anticholinergic +anticipant +anticipatable +anticipative +anticipatory +anticivic +anticivil +anticivilian +anticlassical +anticlastic +anticlergy +anticlerical +anticlimactic +anticlinal +anticlogging +anticoagulant +anticoagulating +anticommercial +anticommercialistic +anticommunistic +anticommunistical +anticommutative +anticonfederative +anticonservative +anticonstitution +anticonstitutional +anticonstitutionalist +anticontagious +anticonvention +anticonventional +anticorrosion +anticosmetics +anticreation +anticreational +anticreative +anticritical +anticryptic +anticyclic +anticyclical +anticyclonic +anticynical +antidancing +antidemocratic +antidemocratical +antidiphtheritic +antidiuretic +antidivorce +antidogmatic +antidogmatical +antidomestic +antidotal +antidotical +antidraft +antidromic +antidynastic +antidynastical +antidynasty +antiecclesiastical +antieducation +antieducational +antiegoistic +antiegoistical +antiegotistic +antiegotistical +antiempirical +antienergistic +antienthusiastic +antienzymatic +antierosion +antierosive +antievolution +antievolutional +antievolutionary +antievolutionistic +antiexpansion +antiexpressionistic +antiexpressive +antifebrile +antifeministic +antiferromagnetic +antifeudal +antifeudalistic +antifeudalization +antifoaming +antifouling +antifrictional +antifungal +antigambling +antigenic +antignostic +antignostical +antigovernment +antigovernmental +antigraft +antigrammatical +antigravitation +antigravitational +antihierarchal +antihierarchic +antihierarchical +antihistaminic +antihuman +antihumanistic +antihygienic +antihypnotic +antiketogenic +antilabor +antileague +antileveling +antilevelling +antiliberal +antiliberalistic +antiliquor +antiliturgic +antiliturgical +antiliturgy +antilogarithmic +antilogistic +antilottery +antimachination +antimachine +antimachinery +antimagnetic +antimalarial +antimaterialistic +antimechanistic +antimechanization +antimediaeval +antimedical +antimedication +antimedicative +antimedicine +antimedieval +antimerger +antimerging +antimeric +antimethod +antimethodic +antimethodical +antimicrobial +antimilitaristic +antimilitary +antiministerial +antimissile +antimodern +antimodernistic +antimodernization +antimonarch +antimonarchal +antimonarchial +antimonarchic +antimonarchical +antimonarchistic +antimonarchy +antimonial +antimonic +antimonopolistic +antimonopolization +antimonopoly +antimonous +antimoral +antimoralistic +antimorality +antimusical +antimystic +antimystical +antinarcotic +antinational +antinationalistic +antinationalization +antinatural +antinaturalistic +antineuralgic +antineuritic +antineutral +antinihilistic +antinodal +antinoise +antinomian +antinomic +antinomical +antinormal +antiodontalgic +antioptimistic +antioptimistical +antiorthodox +antioxidizing +antioxygenating +antipacifistic +antipapacy +antipapal +antipapistic +antipapistical +antiparallel +antiparasitic +antiparasitical +antiparliament +antiparliamentary +antipathetic +antipathogenic +antipatriarchal +antipatriotic +antipedal +antiperiodic +antiperistaltic +antipersonnel +antipestilence +antipestilent +antipestilential +antipetalous +antiphilosophic +antiphilosophical +antiphilosophy +antiphlogistic +antiphonal +antiphonic +antiphrastic +antiphrastical +antiphysical +antiplastic +antipodal +antipodean +antipoetic +antipoetical +antipolar +antipolitical +antipolitics +antipollution +antipopularization +antipoverty +antipragmatic +antipragmatical +antipriest +antipriesthood +antiproductive +antiproductivity +antiprohibition +antipruritic +antipyretic +antipyrotic +antiquarian +antiquated +antirachitic +antiracial +antiradiant +antiradiating +antiradiation +antirational +antirationalistic +antireacting +antireaction +antireactive +antirealistic +antireality +antired +antireducing +antireduction +antireductive +antireflexive +antireform +antireforming +antireligion +antireligious +antirent +antirepublican +antirestoration +antirevolution +antirheumatic +antiritual +antiritualistic +antiromance +antiromantic +antiroyal +antirust +antisceptical +antischolastic +antischool +antiscience +antiscientific +antiscorbutic +antiscriptural +antisensitizing +antisensuous +antisepalous +antiseptic +antisiccative +antiskeptical +antiskid +antiskidding +antislavery +antislip +antismoking +antisocial +antisolar +antisophistic +antisoporific +antispasmodic +antispiritual +antispiritualistic +antisplitting +antispreading +antistalling +antistate +antistatic +antistimulant +antistrike +antistrophal +antistrophic +antisubmarine +antisuffrage +antisupernatural +antisupernaturalistic +antisymmetric +antisymmetrical +antisymmetry +antisyndication +antisynod +antisyphilitic +antitank +antitarnish +antitarnishing +antitartaric +antitax +antitaxation +antitemperance +antitheological +antitheologizing +antitheology +antithetic +antithetical +antitonic +antitoxic +antitradition +antitraditional +antituberculous +antitussive +antitypic +antitypical +antiunion +antiutilitarian +antivaccination +antiviral +antivirus +antiwar +antlered +antlerless +antliate +antlike +antodontalgic +antonomastic +antonomastical +antonymous +antral +antrorse +anucleate +anuretic +anuric +anurous +anxious +aona +aoristic +aortal +aortic +apartmental +apatetic +apathetic +apelike +aperient +aperiodic +aperitive +apertural +apertured +apetalous +aphacic +aphaeretic +aphakial +aphakic +aphanitic +aphasic +aphelian +apheliotropic +apheretic +aphetic +aphidian +aphidious +aphonic +aphorismatic +aphorismic +aphoristic +aphotic +aphyllous +apiaceous +apian +apiarian +apical +apiculate +apicultural +apish +apivorous +aplacental +aplanatic +aplastic +aplitic +apneal +apneic +apneustic +apnoeal +apnoeic +apocalyptic +apocarpous +apocatastatic +apocentric +apochromatic +apocopic +apocrine +apocryphal +apocynaceous +apodal +apodemal +apodictic +apodous +apogamic +apogamous +apogeal +apogeotropic +apographic +apographical +apokatastatic +apolitical +apologal +apologetic +apomictic +aponeurotic +apopemptic +apophonic +apophthegmatic +apophthegmatical +apophysate +apophyseal +apophysial +apoplectic +apoplectiform +apoplectoid +aposematic +aposiopetic +aposporic +apostolic +apostrophic +apothecial +apothegmatic +apothegmatical +apotropaic +appalling +apparent +apparitional +appassionato +appauma +appealable +appealing +appeasable +appellate +appendaged +appendant +appendiceal +appendicular +appendiculate +apperceptive +appetitive +appetizing +applaudable +applausive +appliable +applicable +applicative +applicatory +applied +appliqua +appointable +appointed +appointive +apportionable +apposable +apposite +appositely +appositional +appositive +appositively +appraisable +appraisive +appreciable +appreciational +appreciative +appreciatory +apprehensible +apprehensive +appressed +approachable +approachless +approbative +appropriable +appropriate +appropriative +approvable +approximal +approximate +appulsive +appurtenant +apraxic +aprioristic +apronlike +apropos +aprowl +apsidal +apt +apteral +apterial +apterous +apterygial +apterygote +aptitudinal +apyretic +aquarial +aquarian +aquatic +aqueous +aquicultural +aquiline +aquiver +arabinosic +arable +araceous +arachidic +arachnidan +araeostyle +araeosystyle +araliaceous +araneiform +araneose +araucarian +arbitrable +arbitral +arbitrary +arbitrational +arbitrative +arboraceous +arboreal +arbored +arboreous +arborescent +arboresque +arboricultural +arborous +arcane +arcform +archaeological +archaic +archaistic +archangelic +archangelical +archdiocesan +archducal +arched +archegonial +archegoniate +archenteric +archeologic +archeological +archesporial +archetypal +archetypic +archiblastic +archidiaconal +archiepiscopal +archipelagic +archiplasmic +architectonic +architectural +architraval +architraved +archival +archoplasmic +arcifinious +arciform +arctic +arcuate +ardeid +ardent +arduous +areal +arenaceous +arenicolous +arenose +areocentric +areolar +areolate +areologic +areological +areostyle +areosystyle +argental +argenteous +argentic +argentiferous +argentine +argentous +argillaceous +argilliferous +argillitic +argotic +arguable +argumentatious +argumentative +argyle +arhythmic +arhythmical +arid +arillate +arilloid +ariose +aristate +aristocratic +aristolochiaceous +arkosic +armed +armigeral +armigerous +armillary +armipotent +armless +armlike +armored +armorial +armorplated +armoured +aroid +aroideous +aromatic +arousable +arpeggiated +arpeggioed +arrangeable +arrant +arrased +arrenotokous +arrestable +arresting +arrestive +arrhenotokous +arrhythmic +arrhythmical +arrogant +arrowless +arrowlike +arrowy +arrythmic +arrythmical +arsenical +arsenious +arseniuretted +arseno +arsenous +arsino +arterial +arteriosclerotic +arteriovenous +artesian +artful +arthralgic +arthritic +arthritical +arthrodial +arthrodic +arthrodiran +arthrodirous +arthromeric +arthrosporic +arthrosporous +articulable +articular +articulate +articulated +articulating +articulative +articulatory +artier +artiest +artifactitious +artificial +artiodactylous +artisanal +artistic +artless +arty +arumlike +arundinaceous +aryballoid +aryepiglottic +arytenoepiglottic +arytenoid +arytenoidal +arythmic +arythmical +asbestine +asbestoid +asbestoidal +asbestous +ascendable +ascendant +ascendible +ascending +ascensional +ascensive +ascertainable +ascetical +ascitic +ascitical +asclepiadaceous +ascocarpous +ascogenous +ascogonial +ascomycetous +asconoid +ascosporic +ascribable +asemic +asepalous +aseptic +asexual +ashake +ashamed +ashen +ashier +ashiest +ashless +ashy +asinine +asocial +asomatous +asparaginous +aspectant +aspectual +aspersive +asphaltic +asphaltlike +aspherical +asphyxial +asphyxiant +aspiratory +aspish +assailable +assassinative +assaultable +assayable +assentient +assentive +asserted +assertible +assertional +assertive +assertory +assessable +assessorial +asseverative +assiduous +assignable +assimilable +assimilative +assistive +asslike +associable +associational +associationist +associationistic +associative +assonant +assonantal +assonantic +assortative +assorted +assortive +assuasive +assumable +assumed +assuming +assumptive +assured +assurgent +astable +astatic +astay +asteraceous +asteriated +asterismal +asternal +asteroidal +asthenic +asthenopic +asthmatic +asthmatoid +astigmatic +astigmic +astir +astomatous +astonied +astonishing +astounding +astragalar +astral +astrictive +astringent +astrographic +astrolabical +astrological +astromantic +astrometric +astrometrical +astronautic +astronomical +astrophotographic +astrophysical +astucious +astute +astylar +aswarm +asyllabic +asymmetric +asymptomatic +asymptotic +asynchronous +asyndetic +asyntactic +atactic +ataractic +ataraxic +atavic +atavistic +ataxic +atelectatic +atelic +ateliotic +atheistic +athematic +atherine +athermanous +atherosclerotic +athetoid +athetosic +athirst +athletic +athonite +athrill +atingle +atlantal +atmophile +atmosphereless +atmospheric +atomic +atomistic +atomistical +atonable +atonal +atonalistic +atoneable +atonic +atrabilious +atresic +atrial +atrioventricular +atrip +atrocious +atrophic +atrophied +atry +attachable +attached +attackable +attainable +attemptable +attending +attent +attentional +attentive +attenuant +attestable +attestative +attested +attestive +attingent +attired +attitudinal +attractable +attractive +attrahent +attributable +attributive +attrite +attritional +attritive +atwitter +atypical +auctionary +auctorial +audacious +audible +audient +audiogenic +audiometric +audiovisual +auditive +auditory +augitic +augmentable +augmentative +augmented +augural +august +auld +aulic +aummbulatory +auntlike +aural +aureate +aureoline +auric +auricled +auricular +auriculate +auriculoventricular +auriferous +aurific +auriform +auriscopic +auroral +aurorean +aurous +auscultative +auspicial +auspicious +austenitic +austere +austral +autacoidal +autarchic +autarchical +autarkic +autarkical +autecious +autecologic +autecological +authentic +authentical +authigenic +authorial +authorisable +authorised +authoritarian +authoritative +authorizable +authorized +authorless +autistic +autobiographical +autocatalytic +autocephalous +autochthonous +autocratic +autodidactic +autoecious +autogamic +autogamous +autogenetic +autogenous +autographic +autographical +autohypnotic +autoicous +autoimmune +autokinetic +autoloading +autolytic +automatic +automatous +automorphic +automotive +autonomic +autonomous +autophytic +autoplastic +autopolyploid +autopotamic +autopsic +autopsical +autosuggestible +autosuggestive +autotelic +autotomic +autotoxic +autotrophic +autotypic +autumnal +auxetic +auxiliary +auxilytic +auxochromic +available +avaricious +avellan +avenaceous +avengeful +averse +aversive +avertable +avertible +avian +aviatic +avicularian +avid +avifaunal +avirulent +avitaminotic +avocatory +avoidable +avowable +avowed +avulsed +avuncular +aw +awakeable +awakenable +awakening +aware +awed +aweigh +aweless +awesome +awful +awhirl +awkward +awless +awned +awninged +awnless +axenic +axial +axile +axillary +axiological +axiomatic +axised +axled +axlike +axonal +axonometric +azeotropic +azido +azimuthal +azo +azoic +azonal +azonic +azoted +azotic +azygous +baboonish +babyish +babylike +baccate +bacchanalian +bacchantic +bacciferous +bacciform +baccivorous +bachelorlike +bachelorly +bacillary +backboned +backboneless +backbreaking +backdoor +backed +backgeared +backhanded +backless +backmost +backstrapped +backswept +backward +bacterial +bactericidal +bacteriologic +bacteriological +bacteriophagic +bacterioscopic +bacterioscopical +bacteriostatic +bacteroid +baculiform +baculine +baculitic +bad +baddish +badgeless +badgerly +baetylic +baffling +baggier +baggiest +baggy +bagwigged +bailable +bairnish +bairnly +baith +bakerlike +balanceable +balaustine +balconied +bald +baldachined +baldheaded +balding +baldish +baldpated +baldricked +baleful +baleless +balkier +balkiest +balky +balladic +balladlike +ballastic +balletic +ballistic +ballistocardiographic +balloonlike +bally +balmier +balmiest +balmlike +balmy +balneal +balneologic +balneological +balsamaceous +balsamic +balsamiferous +balsaminaceous +balsamy +balustered +balustraded +banal +bananas +banausic +bandanaed +bandannaed +bandboxical +bandboxy +banded +bandless +bandoleered +bandoliered +bandy +baneful +bangled +bangup +bankable +bannered +bannerless +bannerlike +baptismal +baptizable +barbaric +barbarous +barbate +barbed +barbellate +barbituric +barbless +bardic +bardier +bardiest +bardish +bardlike +bardy +bare +bared +barefaced +barefisted +barefoot +barefooted +bareheaded +bareknuckle +barelegged +barer +barest +baric +baring +barish +barkier +barkiest +barkless +barky +barless +barmier +barmiest +barmy +barnacled +barnlike +barographic +barometric +barometrical +baronetical +baronial +baroscopic +baroscopical +barotropic +barrable +barratrous +barred +barren +barristerial +barruly +barry +bartizaned +barwise +barytic +basal +basaltic +basaltine +baseborn +basehearted +baseless +baser +basest +bashful +basic +basidial +basidiomycetous +basidiosporous +basifixed +basilar +basilic +basiliscan +basiliscine +basined +basinlike +basipetal +basketlike +basophil +basophilic +bassy +bastardly +bastionary +bastioned +bathetic +bathless +batholithic +batholitic +bathyal +bathymetric +bathypelagic +batlike +bats +battailous +battier +battiest +battled +battlemented +battlesome +battological +batty +batwing +baulky +bausond +bawdier +bawdiest +bawdy +beachless +beachy +beaconless +beaded +beadflush +beadier +beadiest +beadlike +beady +beaked +beakless +beaklike +beaky +beamier +beamiest +beaming +beamish +beamless +beamlike +beamy +beanlike +bearable +bearded +beardless +beardlike +bearish +bearlike +beastlier +beastliest +beastlike +beastly +beatable +beaten +beatific +beauish +beauteous +beautiful +beaverish +beaverlike +becalmed +becoming +beddable +bedfast +bedless +bedlike +bedrid +bedridden +beechen +beechy +beefier +beefiest +beefless +beefy +beelike +beerier +beeriest +beery +beetleheaded +beetlike +begabled +beggarly +behavioral +behavioristic +behenic +beholdable +beholden +belated +beld +believable +belletristic +bellicose +belligerent +bellowslike +bellylike +beloid +belonoid +beloved +belowground +belted +beltless +bemazed +bemused +benchless +bendable +bendwise +bendy +beneaped +benedictional +benedictory +benefic +beneficeless +beneficent +beneficial +benevolent +benighted +benign +benignant +benmost +bent +benthal +benthic +benthonic +benzal +benzoic +benzylic +benzylidene +bequeathable +berberidaceous +bereft +beribboned +beriberic +berryless +berrylike +berserk +beryline +besetting +besotted +bespectacled +bespoke +besprent +best +bestial +betrothed +better +betulaceous +bevilled +bewhiskered +bezanty +biangular +biannual +biannulate +biarticulate +biased +biauricular +biauriculate +biaxial +bibasic +bibless +biblical +biblike +bibliographic +bibliographical +bibliolatrous +bibliological +bibliomaniacal +bibliopegic +bibliopegistic +bibliopegistical +bibliophagous +bibliophilic +bibliophilistic +bibliopolar +bibliopolic +bibliopolical +bibliopolistic +bibliotaphic +bibliothecal +bibliotherapeutic +bibliotic +bibulous +bicameral +bicapsular +bicentenary +bicentennial +bicentric +bicephalous +bicipital +bicollateral +bicolor +bicompact +biconcave +biconical +biconvex +bicorn +bicorporal +bicuspid +bicyclic +biddable +bidentate +bidenticulate +bidirectional +biennial +bienvenu +bienvenue +bifacial +bifarious +bifid +bifilar +biflagellate +biflex +bifocal +bifoliate +bifoliolate +biforate +biforked +biform +bifunctional +big +bigamistic +bigamous +bigeneric +bigger +biggest +biggish +bigheaded +bignoniaceous +bigoted +bigwigged +bihourly +bijugate +bilabial +bilabiate +bilateral +bilgier +bilgiest +bilgy +biliary +bilinear +bilineate +bilingual +bilious +biliteral +billable +billety +billionth +billowier +billowiest +billowy +bilobate +bilocular +bimaculate +bimanous +bimanual +bimensal +bimestrial +bimetallic +bimetallistic +bimillenary +bimodal +bimolecular +bimonthly +bimotored +binal +binary +binate +binaural +bindable +binocular +binominal +binucleate +biobibliographic +biobibliographical +biocellate +biocentric +biochemic +biochemical +bioclimatic +bioclimatological +biodegradable +biodynamic +biodynamical +bioecologic +bioecological +bioelectric +bioelectrogenetic +biogenetic +biogenic +biogeochemical +biogeographic +biogeographical +biographical +biological +bioluminescent +biolytic +biomagnetic +biomedical +biometric +biometrical +biomorphic +bionic +bionomic +bionomical +biophysical +bioplasmic +biopsychic +bioptic +bioscopic +biosocial +biostatic +biostatical +biotechnological +biotic +biotitic +biotypic +biparietal +biparous +bipartisan +bipartite +biparty +bipectinate +bipedal +bipetalous +bipinnate +bipolar +bipyramidal +biquadratic +biquarterly +biracial +biradial +biramous +birchen +birdbrained +birdless +birdlike +birectangular +birefringent +biscuitlike +bisectional +biserial +biserrate +bisexual +bishopless +bishoplike +bismuthal +bismuthic +bismuthous +bissextile +bistable +bistered +bistred +bisulcate +bisymmetric +bisymmetrical +bitable +bitchier +bitchiest +bitchy +biteable +biting +bitless +bitonal +bitter +bitterish +bitty +bituminoid +bituminous +biunique +bivalent +bivalvular +bivariate +bivoltine +biweekly +biyearly +bizarre +bizonal +bladdery +bladeless +blae +blamable +blameable +blamed +blameful +blameless +blameworthy +blanchi +bland +blank +blanketless +blanketlike +blankety +blas +blasa +blasphemous +blasted +blastemal +blastematic +blastocoelic +blastodermatic +blastodermic +blastomeric +blastomycotic +blastoporic +blastostylar +blastular +blasty +blatant +blate +bleachable +bleak +bleakish +blearier +bleariest +bleary +blebby +bleeding +blennioid +blepharitic +blessed +blier +blightingly +blind +blinking +blissful +blissless +blistery +blithe +blitheful +blithering +blithesome +blizzardly +blizzardy +bloated +blocked +blockheaded +blockier +blockiest +blockish +blocky +blond +blondish +bloodcurdling +blooded +bloodguilty +bloodier +bloodless +bloodlike +bloodshot +bloodstained +bloodsucking +bloodthirsty +bloody +bloodying +bloomed +bloomier +bloomiest +bloomless +bloomy +blossomless +blossomy +blotchier +blotchiest +blotchy +blotless +blotto +blotty +blouselike +blousier +blousiest +blousy +blowier +blowiest +blowsier +blowsiest +blowsy +blowy +blowzed +blowzier +blowziest +blowzy +blubbery +bluebelled +bluecoated +blueish +bluffable +bluish +blunderful +blunt +blurry +blushful +blushless +blusterous +blustery +boardable +boardlike +boarish +boastful +boastless +boatable +boatless +bodger +bodiless +bodily +boggish +boggy +bogus +boilable +boiled +boilerless +boiling +boisterous +bolar +bold +boldhearted +bolectioned +bolographic +bolometric +bolshie +boltless +boltlike +bomb +bomba +bombable +bombacaceous +bombastic +bombous +bombproof +bonded +bondholding +bondless +boned +boneheaded +boneless +bonelike +bonhomous +bonier +boniest +bonkers +bonnetless +bonnetlike +bonnier +bonniest +bonny +bony +bonzer +bookish +bookless +booklike +boolean +boomless +boonless +boorish +booted +bootless +bootyless +boozier +booziest +boozy +borable +boracic +boraginaceous +bordered +borderless +boreable +boreal +boresome +boric +bornitic +boronic +borty +bosker +boskier +boskiest +bosky +bosomed +bosomy +bosseyed +bossier +bossiest +bossy +botanical +botchier +botchiest +botchy +bothersome +botryoidal +botryomycotic +botryose +bottlelike +bottomless +bottommost +bouffant +boughless +boughten +bouilli +boulle +bounceable +bouncing +bouncy +boundable +bounded +bounden +boundless +bounteous +bountiful +bountyless +bournless +boustrophedon +bousy +bovaristic +bovid +bovine +bowelless +bowerlike +bowery +bowlegged +bowless +bowlike +bowllike +boxlike +boyish +braceleted +brachial +brachiate +brachistochronic +brachycephalic +brachycerous +brachycranic +brachydactylic +brachydactylous +brachypterous +brachystomatous +brachyurous +bracing +brackened +brackish +bracteal +bracteate +bracted +bracteolate +bractless +bradyauxetic +bradycardic +bradykinetic +bradytelic +braggadocian +bragless +braided +brainier +brainiest +brainless +brainlike +brainsick +brainy +brakeless +bramblier +brambliest +brambly +branchial +branchiate +branchiform +branchiopneustic +branchiostegous +branchless +branchlike +brandless +brankie +brankier +brankiest +branky +brannier +branniest +branny +brash +brashier +brashiest +brashy +brassbound +brassicaceous +brassier +brassiest +brassish +brassy +brattier +brattiest +brattish +bratty +brave +braver +braving +braw +brawny +brazen +breadless +breadthless +breakable +breakfastless +breakfront +breakless +breakneck +breastless +breathable +breathed +breathier +breathiest +breathless +breathtaking +breathy +breccial +breechless +breechloading +breedable +breezeless +breezelike +breezier +breeziest +breezy +bregmatic +brevicaudate +brevipennate +brevirostrate +briary +bribable +bribeable +brickier +brickiest +brickish +brickle +bricklike +brickred +bricky +bridal +brideless +bridelike +bridgeable +bridgeless +bridgelike +bridleless +bridlewise +brief +briefless +briery +brigandish +bright +brightish +brilliant +brilliantined +brimful +brimless +brimstony +brindled +brineless +brinier +briniest +brinish +brinkless +briny +brisant +brisk +bristleless +bristlelike +bristly +brittle +broad +broadband +broadish +broch +brocha +broguish +brokenhearted +bromeliaceous +bromic +bromidic +bronchial +bronchiectatic +bronchiolar +bronchitic +bronchopneumonic +bronchoscopic +bronzelike +bronzy +broodier +broodiest +broodless +broody +brookable +brookless +brooklike +broomy +brosy +brothellike +brotherless +brotherlike +brotherly +brothy +brouilla +browless +brownish +browny +brumal +brummagem +brumous +brunet +brushable +brushed +brushless +brushlike +brushy +brusque +brut +brutal +brutalitarian +brutelike +brutish +bryological +bryophytic +bubaline +bubbleless +bubblelike +bubblier +bubbliest +bubbly +buboed +bubonic +buccal +buccaneerish +buccinatory +buccolingual +bucked +buckish +buckleless +buckshee +bucktoothed +buckwheatlike +bucolic +budgetary +budless +budlike +buffable +buffleheaded +buffoonish +bugbearish +buggier +buggiest +bugs +buhl +buildable +buildingless +buirdly +bulbar +bulbiferous +bulbless +bulbourethral +bulbous +bulgy +bulimiac +bulimic +bulkheaded +bulkier +bulkiest +bulky +bullate +bulletheaded +bulletless +bulletlike +bulletproof +bullheaded +bullionless +bullish +bulllike +bullous +bullyable +bumbling +bumpier +bumpiest +bumpkinish +bumpkinly +bumptious +bumpy +bunchier +bunchiest +bunchy +bungaloid +bunglesome +bunodont +bunted +buoyant +burdened +burdenless +burdensome +bureaucratic +burghal +burglarious +burglarproof +burlier +burliest +burly +burnable +burned +burning +burnishable +burnoosed +burnoused +burrier +burriest +burry +bursal +bursarial +bursate +burseraceous +bursiform +burthensome +bushed +bushier +bushiest +bushless +bushlike +bushy +busied +busier +busiest +businesslike +busked +buskined +bustier +bustiest +bustled +busy +busying +butch +butcherly +buteonine +butlerlike +butterfingered +butterflylike +butterless +butterlike +buttery +buttocked +buttonless +buttonlike +buttony +buttressless +buttresslike +butyraceous +butyric +butyryl +buxom +buyable +buzzardlike +buzzardly +bygone +byssaceous +byssal +byssoid +cabalistic +cabbagelike +cabbagy +cabbalistic +cabbalistical +cablelaid +cablelike +caboched +caboshed +cacciatore +cachectic +cachectical +cachexic +cachinnatory +cacodaemonic +cacodemonic +cacodylic +cacoethic +cacogenic +cacographic +cacographical +cacophonic +cacophonous +cactaceous +cactoid +cactuslike +cacuminal +cadastral +cadaveric +cadaverous +caddiced +caddised +caddish +cadent +cadential +cadgy +cadmic +caducean +caducous +caecal +caenogenetic +caesalpiniaceous +caespitose +caesural +caesuric +caffeinic +caftaned +cageless +cagelike +cagey +cagier +cagiest +cagmag +cagy +cairny +caissoned +calamitean +calamitoid +calamitous +calathiform +calcaneal +calcanean +calcarate +calcareous +calcariferous +calced +calceiform +calceolate +calcic +calcicolous +calciferous +calcific +calcifugous +calcinable +calcinatory +calciphilic +calciphobic +calciphobous +calcitic +calculable +calculated +calculating +calculational +calculative +calculatory +calculous +calefacient +calefactive +calefactory +calendrical +calentural +calenturish +calescent +calfless +calflike +calibered +calibred +calicoed +caliginous +caliphal +calisthenic +calisthenical +callable +calligraphic +calligraphical +calliopean +callipygian +callisthenic +callithumpian +callosal +callose +callous +callow +calm +calmative +calmier +calmiest +calmy +calorescent +caloric +calorifacient +calorific +calorimetric +calorimetrical +calpacked +calumnious +calvous +calvus +calycate +calyciform +calycine +calyptrate +camailed +cambial +camellike +cameral +cameralistic +campanological +campanulaceous +campanulate +campestral +camphoric +campimetrical +campodeiform +campy +campylotropous +canalicular +canaliculate +canaliculated +cancelable +cancellate +cancered +cancerous +cancrine +cancrizans +cancroid +candent +candescent +candid +candied +candylike +canelike +canescent +canicular +canine +cankered +cankerous +cannabic +canned +cannibalistic +cannier +canniest +cannular +canny +canonical +canonistic +canonistical +canonlike +canorous +cantabile +cantankerous +canthal +cantharidal +cantharidean +cantharidian +cantic +cantish +cantonal +cantoral +cantorial +cantoris +cantorous +canty +canular +canvaslike +cany +capable +capacious +capacitive +caped +capillaceous +capillary +capillatus +capitalisable +capitalistic +capitalizable +capitate +capitative +capiteaux +capitular +capitulatory +capless +capparidaceous +capreolate +capricious +caprifoliaceous +caprine +caprylic +capsizable +capsular +capsulate +captionless +captious +captivative +capturable +capuched +carangoid +carapaced +carapacial +caravanserial +carbamic +carbolated +carbolic +carbonaceous +carbonic +carboniferous +carbonisable +carbonizable +carbonless +carbonous +carbonylic +carboxyl +carboxylic +carboyed +carbuncled +carbuncular +carcaneted +carcanetted +carcassless +carcinogenic +carcinomatoid +cardiac +cardiographic +cardiologic +cardiological +cardiotonic +cardiovascular +carditic +carduaceous +cardueline +carefree +careful +careless +caressive +careworn +caricaturable +carinal +carinate +carinulate +cariogenic +carious +caritative +caritive +carking +carless +carlish +carminative +carnal +carnassial +carneous +carniferous +carnivalesque +carnivallike +carnivoral +carnivorous +carnose +carnous +carotidal +carpellary +carpellate +carpetless +carping +carpogonial +carpological +carpometacarpal +carpophagous +carposporic +carriable +carroty +carryable +carsick +cartable +cartilaginous +cartographic +cartographical +carucated +caruncular +carunculate +carunculous +caryatidal +caryophyllaceous +casebound +caseless +casemated +casemented +caseous +cashable +casketlike +casklike +casqued +castable +casteless +castellanus +castellated +castellatus +casterless +castigative +castigatory +castled +castlelike +castoff +casual +casuistic +catabatic +catabolic +catacaustic +catachrestic +catachrestical +cataclinal +cataclysmic +catacumbal +catadioptric +catadromous +catagenetic +catalectic +cataleptic +catalogic +catalytic +catalytical +catamenial +catamnestic +cataphoretic +cataphracted +cataphractic +cataphyllary +cataplastic +catapultic +cataractal +cataracted +cataractous +catarrhal +catarrhed +catarrhine +catarrhous +catastrophal +catastrophic +catastrophical +catatonic +catchable +catchier +catchiest +catching +catchpenny +catchweight +catchy +catechetical +catechisable +catechismal +catechistic +catechistical +catechizable +catechumenal +catechumenical +categorical +catenulate +caterpillarlike +catfaced +catfooted +cathartic +cathectic +cathedrallike +catheptic +cathodic +cathodoluminescent +catholic +cationic +catkinate +catlike +catoptric +catoptrical +catrigged +cattish +cattleless +catty +caudal +caudate +cauld +caulescent +caulicolous +cauliflorous +cauliform +cauline +caulocarpous +caulomic +causable +causal +causational +causative +causeless +caustic +caustical +cauterant +cautionary +cautious +cavalier +cavate +cavelike +cavernous +cavicorn +cavitied +cayenned +ceaseless +cecal +cedarn +ceilinged +celebrated +celebrative +celebratory +celestial +celiac +celibatic +cellarless +cellular +cellulate +cellulolytic +cellulosic +cellulous +cementitious +cementless +cemeterial +cenobitic +cenogenetic +cenotaphic +censerless +censorable +censorial +censorian +censorious +censual +censurable +censureless +centaurial +centaurian +centauric +centenary +centennial +centerable +centered +centerless +centigrade +centillionth +centipedal +centonical +central +centralistic +centreless +centric +centrifugal +centripetal +centrobaric +centroclinal +centrodorsal +centroidal +centrolecithal +centrosomic +centrosymmetric +centum +centuple +centurial +centuried +ceorlish +cephalalgic +cephalate +cephalic +cephalometric +cephalothoracic +cephalous +ceraceous +cerated +ceratoid +cercal +cercarial +cercarian +cercelae +cerebellar +cerebral +cerebrational +cerebric +cerebroid +cerebrospinal +cerebrotonic +cerebrovascular +cerebrovisceral +cered +cereless +ceremonial +ceremonious +cereous +ceric +ceriferous +cernuous +cerographic +cerographical +ceroplastic +cerotic +cerous +certifiable +certificatory +certified +ceruminous +cervical +cervine +cespitose +cessative +cestoid +cesural +cetacean +cetological +chadless +chaetophorous +chaetotactic +chaffier +chaffiest +chaffless +chafflike +chaffy +chainless +chainlike +chairborne +chairless +chalazal +chalazian +chalcedonic +chalcedonous +chalcographic +chalcographical +chalcolithic +chalcophile +chaliced +chalkier +chalkiest +chalklike +chalkstony +chalky +challengeable +challenging +chalybeate +chameleonic +chameleonlike +champertous +championless +championlike +champlev +champleva +champy +chanceful +chanceled +chanceless +chancelled +chancier +chanciest +chancroidal +chancrous +chancy +changable +changeable +changeful +changeless +chantable +chaotic +chapeless +chaperonless +chapfallen +chapleted +chapteral +characterful +characterisable +characterizable +characterless +charcoaly +chargable +chargeable +charged +chargeful +chargeless +charier +chariest +chariotlike +charismatic +charitable +charityless +charlatanic +charlatanical +charlatanish +charlatanistic +charming +charmless +charnu +charquid +charrier +charriest +charry +chartable +chartaceous +charterable +charterless +chartless +chartographic +chartographical +chary +chaseable +chasmal +chasmed +chasmic +chasmogamic +chasmogamous +chasmy +chaste +chaster +chastest +chastisable +chasubled +chatoyant +chattable +chattery +chattier +chattiest +chatty +chauvinistic +cheap +cheatable +checkable +checked +checkered +checkless +checky +cheekier +cheekiest +cheekless +cheeky +cheerful +cheerier +cheeriest +cheerless +cheerly +cheery +cheesed +cheeseparing +cheesy +cheliceral +chelicerate +cheliferous +cheliform +chemic +chemigraphic +chemiluminescent +chemokinetic +chemoreceptive +chemosmotic +chemosynthetic +chemotactic +chemotherapeutic +chemotrophic +chemotropic +chemurgic +chemurgical +chenopodiaceous +chequered +chequy +cherishable +cherrylike +cherty +cherubic +cherubical +chestier +chestiest +chestnutty +chesty +chevroned +chevronny +chevronwise +chewable +chewier +chewiest +chewy +chiasmal +chiasmatype +chiasmic +chiastic +chic +chichi +chiefless +chiffonade +chignoned +chilblained +childing +childish +childless +childlike +childly +chiliadal +chiliadic +chiliastic +chillier +chilliest +chilly +chilopodous +chimerical +chimneyless +chimneylike +chin +chinchier +chinchiest +chinchy +chinless +chintzier +chintziest +chintzy +chippable +chipper +chipproof +chirographic +chirographical +chiromantic +chiromantical +chiropodial +chiropodical +chiropteran +chirpier +chirpiest +chirpy +chirrupy +chirurgic +chirurgical +chiselled +chisellike +chitchatty +chitinoid +chitinous +chivalric +chivalrous +chlamydate +chlamydeous +chlorellaceous +chloric +chlorinous +chloritic +chloroacetic +chloroformic +chlorophylloid +chlorophyllous +chloroplastic +chloroplatinic +chlorotic +chlorous +choanocytal +chocker +chocolaty +choiceless +choicer +choicest +choirlike +chokeable +chokey +chokier +chokiest +choking +choky +cholagogue +choleraic +choleric +cholinergic +chololithic +chondral +chondriosomal +chondritic +chondromatous +chondrosarcomatous +choosable +choosey +choosier +choosiest +choosy +chopfallen +choppier +choppiest +chopping +choppy +choragic +choral +chordal +chordamesodermal +chordamesodermic +chorded +chordotonal +choreal +choreatic +choreic +choreographic +choreoid +chorial +choriambic +choric +chorioallantoic +chorioid +chorionic +choripetalous +chorographic +chorographical +choroid +chrematistic +chrestomathic +chrismal +chromatic +chromatinic +chromatographic +chromatoid +chromatolytic +chromatophil +chromatophoric +chromic +chromogenic +chromolithographic +chromophil +chromophobe +chromophoric +chromophotographic +chromoplasmic +chromosomal +chromospheric +chromous +chronic +chronogrammatic +chronogrammatical +chronographic +chronological +chronometric +chronometrical +chronoscopic +chryselephantine +chrysocarpous +chrysolitic +chthonian +chubbier +chubbiest +chubby +chuckleheaded +chuffier +chuffiest +chuffy +chummier +chummiest +chummy +chumpish +chunderous +chunkier +chunkiest +chunky +churchier +churchiest +churchless +churchlike +churchly +churchmanly +churchy +churlish +churnable +churrigueresque +chylaceous +chylocaulous +chylophyllous +chylous +chymic +chymous +cibarial +cibarian +cibarious +cicatricial +cicatricose +cicatrisant +cicatrizant +cichoriaceous +ciderish +ciderlike +cigarless +ciliary +ciliate +ciliolate +cinchonic +cinderlike +cinderous +cindery +cinematic +cinematographic +cinerary +cinereous +cingular +cingulate +cingulated +cinnabarine +cinnamic +cinnamoned +cinnamonic +cinnamoyl +cinnamyl +cipherable +cir +circadian +circinate +circuital +circuitous +circulable +circular +circulative +circulatory +circumambient +circumambulatory +circumbasal +circumcolumnar +circumferential +circumfluent +circumfluous +circumgyratory +circumjacent +circumlocutional +circumlocutionary +circumlocutory +circumlunar +circumnavigable +circumnavigatory +circumnutatory +circumocular +circumpolar +circumrotatory +circumscissile +circumscribable +circumscriptive +circumsolar +circumspect +circumspective +circumstantial +circumvascular +circumventive +circumvolutory +cirrate +cirrhosed +cirrhotic +cirriform +cirrocumular +cirrocumulative +cirrocumulous +cirrose +cirrostrative +cirsoid +cisalpine +cisatlantic +cisela +cislunar +cismontane +cispadane +cissoidal +cistaceous +cisted +cisternal +cistic +cistophoric +citable +citatory +citeable +citied +citified +citizenly +citreous +citric +cityfied +cityless +citylike +civetlike +civic +civil +civilisable +civilisational +civilisatory +civilizable +civilizational +civilizatory +civilized +cladanthous +cladocarpous +claimable +claimless +clairvoyant +clamant +clamatorial +clamlike +clammy +clamorous +clandestine +clangorous +clankless +clanless +clannish +clarino +clasping +classable +classic +classical +classicistic +classier +classiest +classifiable +classificational +classificatory +classified +classless +classy +clastic +clathrate +clattery +claudicant +clausal +claustral +claustrophobic +clausular +claval +clavate +clavicular +claviculate +claviform +clawhammer +clawless +clayey +clayish +claylike +clean +cleanable +cleanlier +cleanliest +cleansable +clear +clearable +clearheaded +clearstoried +cleavable +clecha +cleidoic +cleistocarpous +cleistogamic +cleistogamous +clement +cleptobiotic +clerestoried +clergylike +clerical +clerkish +clerklier +clerkliest +clerklike +clerkly +cleruchial +cleruchic +clever +cleverish +clickless +cliental +clientless +cliffier +cliffiest +cliffless +cliffy +climactic +climant +climatic +climatologic +climatological +climbable +clinal +clingier +clingiest +clingy +clinical +clinographic +clinometric +clinquant +clippable +clipped +cliqueless +cliquey +cliquish +cliquy +clistocarpous +clithral +clitic +clitoral +clitoridean +cloacal +cloakless +clocklike +cloddish +cloddy +clodhopping +clodlike +cloggy +cloistered +cloisterless +cloisterlike +cloistral +clonic +cloque +closed +closefisted +clostridial +clostridian +clothbound +clothlike +clotty +clouded +cloudier +cloudiest +cloudless +cloudlike +cloudy +clovered +clovery +clownish +cloying +clubbable +clubbier +clubbiest +clubby +clubfooted +clucky +clueless +clumpish +clumplike +clumpy +clumsier +clumsiest +clumsy +clupeoid +clustered +clustery +clutchy +clypeal +clypeate +cnemial +cnemic +cnidogenous +cnidophorous +coachable +coactive +coadjutant +coadunate +coagulable +coagulatory +coalescent +coalier +coaliest +coalitional +coalless +coaly +coarctate +coarse +coarser +coarsest +coastal +coated +coatless +coaxial +cobaltic +cobaltous +cobwebby +coccal +coccic +cocciferous +coccoid +coccous +coccygeal +cochlear +cochleate +cockaded +cockeyed +cockier +cockiest +cockish +cocklike +cockneyish +cockneylike +cocksure +cocky +coconscious +codeless +codicillary +coeducational +coelanaglyphic +coeliac +coelomate +coenobitic +coenobitical +coenosarcal +coenosarcous +coequal +coercible +coercionary +coercive +coessential +coetaneous +coeternal +coeval +coexistent +coextensive +coffered +cofferlike +coffinless +cofinal +cogent +cogitable +cogitative +cognate +cognatic +cognisable +cognisant +cognitional +cognitive +cognizable +cognizant +cognominal +cognoscible +cognoscitive +coherent +cohesive +cohortative +coinable +coincident +coincidental +coinstantaneous +coinsurable +coital +cokelike +coky +colacobiotic +cold +coldish +coldturkey +coleopterous +colicky +coliform +colitic +collaborative +collapsable +collapsible +collarless +collatable +collative +collectable +collected +collectible +collectional +collective +collectivistic +collegiate +collenchymatous +collielike +colligative +collinear +collisional +collocative +colloidal +colloquial +collotypic +collusive +colonial +colonic +colonisable +colonizable +colonnaded +colorable +colorado +colorational +colored +colorfast +colorful +colorific +colorimetric +colorimetrical +coloristic +colorless +colory +colossal +colostral +colourable +colourational +coloured +colourful +colouristic +colourless +coltish +colubrine +columbic +columbous +columellar +columellate +columelliform +columnar +columnarized +columned +comate +comatic +comatose +combatable +combative +combinable +combinational +combinative +combinatorial +combless +combust +combustible +combustive +comeatable +comedial +comedic +comelier +comeliest +comely +cometary +comether +cometical +cometlike +comfier +comfiest +comfortable +comfortless +comfy +comic +comical +coming +comitative +comitial +commandable +commanding +commandless +commeasurable +commemorable +commemorational +commemorative +commemoratory +commenceable +commendable +commendatory +commensal +commensurable +commensurate +commentable +commentarial +commentative +commentatorial +commercial +commercialistic +comminative +comminatory +commiserable +commiserative +commissarial +commissional +commissive +commissural +committable +commodious +common +commonable +commonplace +commonsense +commonsensible +commonsensical +commorant +commotional +commotive +communal +communalistic +communicable +communicative +communicatory +communionable +communional +communistic +communistical +communital +commutable +commutative +commutual +comose +compact +compactible +companionable +companionate +companionless +companyless +comparable +comparative +compartmental +compassable +compassionate +compassionless +compassless +compatible +compatriotic +compellable +compellent +compendious +compensable +compensational +compensatory +competent +competitive +compilatory +complacent +complainable +complaisant +complanate +compleat +complected +complemental +complementary +complemented +completable +complete +completive +complex +complexional +complexioned +complexionless +compliable +compliant +complicated +complicative +complicitous +complimentable +complimentary +componental +componented +componential +compony +composable +composed +composite +compositional +compositive +compositorial +compossible +compotatory +compoundable +comprehensible +comprehensive +compressed +compressible +compressional +compressive +comprisable +comprizable +compromissary +compulsive +compulsory +compunctionless +compunctious +compurgatorial +compurgatory +computable +computational +computative +conative +concave +concealable +conceited +conceivable +concentrative +concentric +conceptacular +conceptional +conceptive +conceptual +conceptualistic +concerned +concertante +concertato +concerted +concessible +concessionary +concessive +conchal +conchate +conched +conchiferous +conchoidal +conchological +conciliable +conciliar +conciliatory +concinnous +concise +concludable +concludible +conclusional +conclusive +concoctive +concomitant +concordal +concordant +concordatory +concretionary +concretive +concubinary +concupiscent +concupiscible +concurrent +concussant +concussional +concussive +concyclic +condemnable +condemnatory +condensable +condensational +condensative +condensed +condensible +condescending +condescensive +condign +condimental +condimentary +conditional +conditioned +condolatory +condolent +condonable +conducible +conducive +conductible +conductional +conductive +conductorial +conductorless +conduplicate +condylar +condyloid +condylomatous +confabulatory +confarreate +confarreated +confederative +conferential +conferrable +conferval +confervalike +confervoid +confervous +confessable +confessional +confessionalian +confessionary +confident +confidential +confiding +configurational +configurative +confinable +confineable +confined +confineless +confirmable +confirmatory +confirmed +confiscable +confiscatory +conflagrant +conflagrative +conflictive +conflictory +confluent +confocal +conformable +conformal +confoundable +confounded +confraternal +confusable +confusional +confutable +confutative +congealable +congeneric +congenial +congenital +congestible +congestive +congestus +conglomeratic +conglutinant +conglutinative +congratulant +congratulational +congratulatory +congregational +congregative +congressional +congruent +congruous +conic +conical +conidial +conidian +conidiophorous +coniferous +conirostral +conjecturable +conjectural +conjoined +conjoint +conjugable +conjugal +conjugated +conjugational +conjugative +conjunct +conjunctional +conjunctival +conjunctive +conjunctural +connate +connatural +connectable +connected +connectible +connectional +connective +connexional +connivant +connivent +connotative +connotive +connubial +conoscopic +conquerable +consanguineous +consarned +conscienceless +conscientious +conscionable +conscious +conscriptional +consecrative +consecratory +consecutive +consensual +consentaneous +consentient +consequent +consequential +conservable +conservant +conservational +conservative +considerable +considerate +considered +consignable +consistent +consistorial +consistorian +consolable +consolatory +consolidative +consolingly +consolute +consonantal +consortable +consortial +conspecific +conspicuous +conspirative +conspiratorial +constant +constellatory +constituent +constitutional +constitutive +constrainable +constrained +constrictive +constringent +construable +constructible +constructional +constructive +consubstantial +consuetudinary +consular +consultable +consultative +consulting +consultive +consumable +consummative +consummatory +consumptive +contactual +contagioned +contagious +containable +contained +contaminable +contaminative +contaminous +contemnible +contemplable +contemplative +contemporaneous +contemporary +contemptible +contemptuous +contentable +contented +contentional +contentious +conterminous +contestable +contextual +contextural +contextured +contiguous +continental +contingent +continuable +continual +continuate +continuative +continuous +contoid +contorted +contortional +contortioned +contortionistic +contortive +contraceptive +contraclockwise +contracted +contractible +contractile +contractional +contractive +contractual +contractured +contradictable +contradictious +contradictive +contradictory +contradistinctive +contraorbital +contrapletal +contrapositive +contraptious +contrapuntal +contrarious +contrary +contrastable +contrastive +contrasty +contrasuggestible +contrate +contributable +contributional +contributive +contributorial +contributory +contrite +contrivable +contrived +controllable +controlless +controversial +controvertible +contumacious +contumelious +contusioned +contusive +convalescent +convallariaceous +convectional +convective +convenable +convenient +conventicular +conventional +conventual +conventually +convergent +conversable +conversant +conversational +converted +convertible +convertive +convex +conveyable +convictable +convictible +convictional +convictive +convincible +convincing +convivial +convocational +convocative +convoluted +convolutedly +convolutional +convolutionary +convolvulaceous +convulsant +convulsible +convulsionary +convulsive +cookable +cookless +cool +coolish +cooperative +coordinal +coordinative +copacetic +copasetic +copesetic +copious +coplanar +coppery +coppiced +copraemic +copremic +coprolaliac +coprolitic +coprophagous +coprophilic +coprophilous +coprophobic +copular +copulative +copyrightable +coquettish +coraciiform +coralliferous +corallike +coralline +coralloid +corbiculate +cordate +corded +cordial +cordiform +cordilleran +cordis +cordless +cordlike +corelative +coreless +coriaceous +corked +corkier +corkiest +corking +corklike +corky +cormlike +cormoid +cormophytic +cormous +cornaceous +corneal +corned +corneous +cornered +cornfed +corniculate +cornier +corniest +cornmeal +cornual +cornucopian +cornucopiate +cornute +corny +corolitic +corollaceous +corollate +coronagraphic +coronaled +coronalled +coronary +coronate +coroneted +coronetlike +coronographic +coroplastic +corporal +corporate +corporational +corporatist +corporative +corporeal +corpulent +corpuscular +corpusculous +corrasive +correctable +correctible +correctional +corrective +correlatable +correlational +correlative +corresponsive +corridored +corrigible +corroborant +corroborative +corrodible +corrosional +corrosive +corrupt +corruptful +corruptible +corruptive +corsetless +cortical +corticate +corticolous +coruscant +corvine +corybantic +corymbed +corymblike +corymbose +corynebacterial +coseismal +cosey +coseys +cosie +cosier +cosies +cosiest +cosmetological +cosmic +cosmogonal +cosmogonic +cosmogonical +cosmographic +cosmographical +cosmoid +cosmologic +cosmological +cosmonautic +cosmoramic +costate +costive +costless +costlier +costliest +costly +costoclavicular +costoscapular +cosy +cotangential +cotemporaneous +cotemporary +coterminous +cothurnal +cotidal +cottaged +cottonless +cottony +cotyledonal +cotyledonary +cotyledonoid +cotyledonous +cotyloid +coua +coucha +couchant +coud +councilmanic +counselable +counsellable +countable +counteractive +counterattractive +counterchanged +countercolored +counterfactual +counterfeit +countermandable +counterpaned +counterproductive +counterrotating +countersalient +counterweighted +countless +countrified +countryfied +couped +couponless +couptative +courageous +courant +courdinative +coursed +courteous +courtlier +courtliest +courtly +cousinly +couth +couthie +couthily +covalent +covariant +covenantal +coverable +coverless +covert +covetable +covetous +covinous +cowardly +cowled +cowlike +cowslipped +coxal +coxalgic +coxcombic +coxcombical +coy +coyish +cozey +cozeys +cozier +cozies +coziest +cozy +crabbed +crabbier +crabbiest +crabby +crablike +crabwise +crackable +crackbrained +cracked +crackerjack +cracking +crackjaw +crackless +cracklier +crackliest +crackly +craftier +craftiest +craftless +crafty +craggier +craggiest +craggy +craglike +cramoisy +cramped +cramponnae +cranelike +cranely +cranial +craniate +craniological +craniometric +craniometrical +cranioscopical +crankier +crankiest +crankless +crankous +cranky +crannied +crapelike +crashing +crass +crassulaceous +crateral +craterless +craterlike +craterous +craven +crawlier +crawliest +crawly +crazed +crazier +craziest +crazy +creakier +creakiest +creaky +creamier +creamiest +creamlaid +creamless +creamlike +creamy +creaseless +creasy +creatable +creational +creationary +creationistic +creative +creatural +creaturely +credent +credentialed +credible +creditable +creditless +credulous +creedal +creeded +creedless +creepier +creepiest +creepy +cremasterial +crematory +crenate +crenelated +crenella +crenulate +creolized +creophagous +creosotic +crepitant +crepuscular +crescentic +crescentlike +crescentoid +crescive +cressier +cressiest +cressy +crested +crestfallen +crestless +cresyl +cresylic +cretaceous +cretinoid +cretinous +creviced +crewless +crewneck +cribla +cribriform +cricketlike +cricoid +cricopharyngeal +crimeless +criminative +criminologic +criminological +crimpier +crimpiest +crimpy +crinal +crinated +crined +crinite +crinklier +crinkliest +crinkly +crinogenic +crinose +crippling +crisic +crisp +crispate +crispier +crispiest +crispy +crissal +cristate +criterional +critical +criticisable +criticizable +croakier +croakiest +croaky +crocked +crocodiloid +crocused +cronish +cronk +crooked +cropless +crosiered +crossable +crossbanded +crossbolted +crossbred +crosscurrented +crossed +crossfertilizable +crossleted +crosslighted +crosstied +crosstown +crosswise +crotched +crotchety +croupiest +croupous +croupy +crouse +crowded +crowncapping +crowned +crowning +crownless +crucial +cruciate +cruciferous +crucificial +cruciform +crude +cruder +crudest +cruel +cruelhearted +crumbable +crumbier +crumbiest +crumblier +crumbliest +crumbly +crumby +crummier +crummies +crummiest +crummy +crumply +crunchable +crunchier +crunchiest +crunchy +crunodal +crural +crushable +crushing +crusily +crustaceous +crustal +crusted +crustier +crustiest +crustless +crusty +crutched +crutchlike +crying +cryogenic +cryohydric +cryophilic +cryoscopic +cryptal +cryptanalytic +cryptic +cryptoanalytic +cryptoclastic +cryptocrystalline +cryptogamic +cryptogamical +cryptogamous +cryptogenic +cryptogrammatic +cryptogrammatical +cryptogrammic +cryptographal +cryptographic +cryptographical +cryptonymous +cryptophytic +cryptorchid +cryptovolcanic +cryptozoic +cryptozygous +crystalliferous +crystallike +crystalline +crystallisable +crystallitic +crystallizable +crystallographic +crystalloid +crystalloidal +ctenidial +ctenoid +cubbish +cubic +cubical +cubiform +cubistic +cubital +cuboid +cuculiform +cucullate +cucumiform +cucurbitaceous +cuddlesome +cuddly +culinary +culmicolous +culmiferous +culminant +culpable +cultic +cultish +cultivable +cultivated +cultrate +cultual +cultural +cultured +cultureless +cumberless +cumbersome +cumbrous +cumulative +cumuliform +cumulous +cunctatious +cunctatory +cuneal +cuneate +cuneatic +cuneiform +cunicular +cuniform +cunning +cupidinous +cuplike +cupolated +cupped +cuppy +cupreous +cupric +cupriferous +cuprous +cupulate +curable +curatic +curatical +curative +curatorial +curbable +curbless +curblike +curdier +curdiest +curdy +cureless +curial +curious +curlier +curliest +curlike +curly +curmudgeonly +current +curricular +currish +cursed +cursive +cursorial +cursory +curt +curtainless +curtal +curtate +curule +curvaceous +curvier +curviest +curvilinear +curvy +cushier +cushiest +cushionless +cushionlike +cushiony +cushy +cuspal +cusped +cuspidal +cuspidate +cussed +custodial +customable +customary +cutaneous +cutcha +cute +cuter +cutest +cuticolor +cuticular +cutover +cuttable +cutty +cyaneous +cyanic +cyanitic +cyano +cyanogenic +cyanopathic +cyanotic +cyanuric +cyathiform +cybernetic +cycadaceous +cycadlike +cyclic +cycloid +cycloidal +cyclonal +cyclonic +cyclonical +cyclopedic +cycloplegic +cyclostomatous +cyclostrophic +cyclostylar +cyclothymic +cyclotomic +cyetic +cylinderlike +cylindraceous +cylindrical +cylindromatous +cymballike +cymbiform +cymbocephalic +cymbocephalous +cymographic +cymoid +cymose +cymotrichous +cynical +cynosural +cyperaceous +cyphellate +cyprinoid +cysteinic +cystic +cystocarpic +cystoid +cystolithic +cystomatous +cystoscopic +cytoarchitectural +cytochemical +cytoclastic +cytogenetic +cytogenetical +cytoid +cytologic +cytological +cytolytic +cytopathogenic +cytopathologic +cytopathological +cytophagic +cytophagous +cytoplasmic +cytoplastic +cytostomal +cytotactic +cytotoxic +cytotrophoblastic +cytotropic +cytozoic +czarist +daclassa +dacolleta +dacryagogue +dactylic +dactylographic +daedal +daemonic +daffier +daffiest +daffy +daft +dagaga +daguerreotypic +daily +daimen +daimonic +daintier +dainties +daintiest +dainty +daisied +daltonic +damageable +damnatory +damning +damoda +damp +dampish +dampproof +danceable +dancetta +dandiacal +dandriffy +dandruffy +dandyish +danged +dangerless +dangerous +dank +dapper +dappled +daring +dark +darkish +darksome +dashed +dashier +dashiest +dashing +dashy +dastardly +dasyphyllous +dasyurine +dasyuroid +datable +dateable +dated +dateless +datival +dative +datolitic +daturic +dauby +daughterless +daughterlike +daughterly +dauntless +dawnlike +daydreamy +daylong +dclass +dcollet +dead +deadlier +deadliest +deadly +deadpan +deaf +dealate +deanthropomorphic +dear +deathful +deathless +deathlike +deathly +deathy +debatable +debauched +debentured +debilitative +debonair +debtless +decadal +decadent +decagonal +decahedral +decahydrated +decalescent +decamerous +decanal +decani +decanormal +decapodous +decasyllabic +decayable +decayedness +decayless +deceased +deceitful +decem +decemviral +decenary +decennial +decent +deceptive +decidable +decided +decidual +deciduate +deciduous +decillionth +decimus +decinormal +decipherable +decisional +decisive +declamatory +declarable +declarative +declaratory +declared +declensional +declinable +declinate +declinational +declinatory +declive +declivitous +declivous +decoctive +decolorant +decomposable +decomposed +decompound +decompressive +decongestant +decongestive +decontaminative +decorative +decorous +decrepit +decrescent +decretive +decretory +decubital +decuman +decumbent +decurrent +decurved +dedal +dedicated +dedicational +dedicatory +deducible +deductible +deductive +deedless +deep +deepwater +defaceable +defamatory +defeasible +defectible +defective +defectless +defenceable +defenceless +defendable +defenseless +defensible +defensive +deferable +deferent +deferential +deferrable +deferred +defervescent +defiable +defiant +deficient +defilable +definable +definite +definitive +deflagrable +deflationary +deflectable +deflected +deflective +deflexed +deformable +deformational +deformative +deformed +defrayable +deft +defunct +defunctive +degenerative +deglutitious +degradable +degradational +degradative +degraded +degrading +degreeless +degressive +dehiscent +dehortative +dehortatory +deicidal +deictic +deific +deiform +deistic +deistical +dejected +delative +delayable +delectable +delegable +deleterious +deliberate +deliberative +delicate +delicious +delighted +delightful +delightless +delightsome +delineable +delineative +deliquescent +delirious +delitescent +deliverable +deltaic +deltoidal +delusional +delusive +deluxe +demagnetisable +demagnetizable +demagogic +demandable +demanding +demented +demeritorious +demersal +demesnial +demibastioned +demisable +demiurgeous +demiurgic +demiurgical +democratic +demoded +demographic +demographical +demoniac +demonian +demonic +demonolatrous +demonologic +demonological +demonstrable +demonstrational +demonstrative +demotic +demountable +demulcent +demure +demurer +demurest +demurrable +denary +dendric +dendriform +dendritic +dendrochronological +dendroid +dendrological +dendrophagous +dendrophilous +deniable +denominational +denominative +denotable +denotative +denotive +dense +denser +densest +densimetric +densitometric +densus +dental +dentate +denticulate +dentiform +dentilabial +dentiled +dentilingual +dentinal +dentirostral +dentoid +denudative +denumerable +denunciable +denunciatory +deontic +deontological +departed +departmental +depauperate +dependable +dependent +depictive +depilatory +depletive +depletory +deplorable +deponent +depopulative +deportable +deposable +depositional +depraved +deprecative +deprecatory +depreciable +depreciatory +depredatory +depressant +depressed +depressible +depressive +depressomotor +deprivable +deprivative +deprived +depurative +deputable +derangeable +deranged +dere +dereistic +derelict +derisible +derisive +derivable +derivational +derivative +dermal +dermatic +dermatographic +dermatoid +dermatological +dermatomic +dermatophytic +dermatoplastic +dermatropic +dermic +dermographic +dermoid +dern +dernier +derogative +derogatory +dervishlike +descendent +descendible +describable +descriptive +deserted +desertic +deserticolous +desertlike +deserved +deserving +desiccant +desiccated +desiccative +desiderative +designative +designatory +designed +designing +desinent +desinential +desirable +desired +desireless +desirous +deskbound +desmidian +desmoid +desmotropic +desolate +despairful +despairing +desperate +despicable +despisable +despiteful +despiteous +despondent +despotic +destined +destitute +destroyable +destructible +destructive +desultory +detachable +detached +detailed +detainable +detectable +detectible +deteriorative +determinable +determinant +determinate +determinately +determinative +determined +deterministic +detersive +detestable +detonable +detonative +detoxicant +detractive +detrimental +detrital +detritivorous +detrusive +deuced +deuteranomalous +deuteranopic +deutoplasmic +devastative +developable +deviable +deviant +deviative +deviatory +deviceful +deviled +devilish +devious +devisable +devoid +devoted +devotional +devout +dewclawed +dewlapped +dewless +dewy +dexter +dexterous +dextral +dextro +dextrocardial +dextrocular +dextrogyrate +dextrorotatory +dextrorse +dextrosinistral +dextrous +dgag +diabasic +diabetic +diabolic +diabolical +diacaustic +diachronic +diacid +diacidic +diaconal +diacritical +diactinic +diadelphous +diadochic +diadromous +diaeretic +diagenetic +diageotropic +diagnosable +diagnostic +diagonal +diagrammatic +dialectal +dialectical +dialectologic +dialectological +dialogic +dialogistic +dialysable +dialytic +dialyzable +diamagnetic +diamant +diamantiferous +diamantine +diametral +diametric +diametrical +diamondlike +diandrous +dianoetic +diapasonal +diapedetic +diaphanometric +diaphanous +diaphoretic +diaphragmatic +diaphysial +diapophysial +diarch +diarchial +diarchic +diaristic +diarrheal +diarrheic +diarrhetic +diarrhoeal +diarrhoeic +diarrhoetic +diarthrodial +diastatic +diastolic +diastral +diastrophic +diastyle +diathermic +diathetic +diatomaceous +diatomic +diatonic +diatropic +diazo +diazoamino +diazotizable +dibasic +dibranchiate +dicastic +dicephalous +dicey +dichasial +dichlamydeous +dichogamous +dichotomic +dichotomistic +dichotomous +dichroic +dichroiscopic +dichromatic +dichromic +dichroscopic +diclinous +dicotyledonous +dicrotic +dictational +dictatorial +didactic +didymous +didynamous +diecious +diencephalic +dieretic +dietary +dietetic +different +differentiable +differential +difficile +difficult +diffident +diffluent +diffractive +diffusible +diffusive +digammated +digamous +digastric +digenetic +digestible +digestional +digestive +digital +digitate +digitiform +digitigrade +digitinervate +digitipinnate +diglot +diglottic +dignified +dignitarial +digraphic +digressional +digressive +dihedral +dihydrated +dihydric +dihydroxy +dilapidated +dilatable +dilatant +dilatate +dilative +dilatometric +dilatory +dilemmatic +dilemmatical +dilemmic +dilettanteish +dilettantish +diligent +diluent +diluvial +dim +dimensional +dimensionless +dimerous +dimetric +dimidiate +diminishable +diminished +diminutive +dimissory +dimmed +dimmest +dimming +dimorphous +dimply +dineric +dingier +dingiest +dingy +dink +dinkier +dinkies +dinkiest +dinkum +dinky +dinnerless +dinosaurian +dintless +diocesan +dioecious +dioestrous +dioicous +dioptral +dioptric +dioramic +dioritic +diorthotic +diotic +dipetalous +diphase +diphtheritic +diphtheroid +diphthongal +diphthongic +diphthongous +diphycercal +diphyletic +diphyllous +diphyodont +diplegic +diplex +diploblastic +diplocardiac +diplococcal +diplococcic +diploic +diploid +diploidic +diplomatic +diplophonic +diplopic +diplostemonous +dipnoan +dipodic +dipolar +dippier +dippiest +dippy +diprotic +dipsacaceous +dipsomaniacal +dipteral +dipterocarpaceous +dipterous +dipyramidal +dire +directable +directed +directional +directionless +directorial +direful +direr +direst +dirgeful +dirgelike +dirhinous +dirigible +diriment +dirtier +dirtiest +dirty +disadvantaged +disadvantageous +disagreeable +disallowable +disappointed +disarming +disastrous +disbursable +discalced +discarnate +discernible +discerning +discerptible +dischargeable +discifloral +disciplelike +disciplinable +disciplinal +disciplinary +disclamatory +discographical +discoid +discomfortable +discommodious +disconcerted +disconnected +disconnective +disconsolate +discontented +discontinuous +discordant +discountable +discourageable +discourseless +discourteous +discoverable +discovert +discreditable +discreet +discrepant +discrete +discretional +discretionary +discriminantal +discriminating +discriminational +discriminative +discriminatory +discursive +discussable +discussible +discussional +disdainful +diseased +disembodied +disepalous +disgraceful +disguisable +disgustful +disgusting +disgustingly +disharmonious +dished +dishevelled +dishonest +dishonorable +dishy +disillusive +disimpassioned +disinclined +disinfective +disingenuous +disintegrable +disintegrative +disintegratory +disinterested +disjasked +disjoinable +disjoined +disjointed +disjunct +disjunctive +disklike +dislikable +disloyal +dismal +dismissible +dismissive +dismountable +disobedient +disordered +disorderly +disparate +dispassionate +dispellable +dispensable +dispensational +dispensible +dispermic +dispermous +dispersible +dispersive +dispirited +dispiteous +displaceable +displayed +displeasureable +displuviate +disposable +disposed +dispositional +dispossessed +dispossessory +disproportionable +disproportional +disproportionate +disprovable +disputable +disputatious +disputeless +disqualifiable +disquieting +disquisitional +disregardful +disreputable +disrespectable +disrespectful +disruptive +dissatisfactory +dissatisfied +dissected +dissectible +disseminative +dissentient +dissentious +dissepimental +dissertational +dissident +dissilient +dissimilar +dissimilative +dissimilatory +dissimulative +dissipated +dissipative +dissociable +dissocial +dissociative +dissoluble +dissolute +dissolvable +dissonant +dissuadable +dissuasive +dissyllabic +dissymmetric +dissymmetrical +distal +distanceless +distant +distasteful +distended +distensible +distensile +distent +distichal +distichous +distillable +distillatory +distilled +distinct +distinctionless +distinctive +distingu +distingua +distinguishable +distinguished +distinguishing +distorted +distortional +distortive +distracted +distractible +distractive +distrainable +distrait +distraught +distressed +distressful +distributable +distributional +distributive +distrustful +disturbed +disturbing +distyle +disubstituted +disulfuric +disused +disyllabic +ditchless +ditheistic +ditheistical +dithionic +dithionous +dithyrambic +ditriglyphic +dittographic +diuretic +diurnal +divalent +divergent +diverse +diversifiable +diversiform +diversional +diversionary +divertible +diverticular +diverting +divertive +divestible +dividable +divided +dividendus +dividual +divinable +divinatory +divine +divisi +divisible +divisional +divisionary +divisive +divorceable +divorcive +divulgatory +divulsive +dizygotic +dizzied +dizzier +dizziest +dizzy +dizzying +dmod +doable +docile +docosanoic +doctoral +doctorial +doctorless +doctrinaire +doctrinal +documentary +doddered +doddering +dodecagonal +dodecahedral +dodecaphonic +dodecastyle +dodecasyllabic +dodgy +dogged +doggier +doggiest +doggish +doggoned +dogless +doglike +dogmatic +doiled +doited +dolabriform +dolce +doleful +doleritic +dolesome +dolichocephalic +dolichocranic +dollfaced +dollish +dolmenic +dolomitic +dolorimetric +doloroso +dolorous +doltish +domanial +domed +domelike +domestic +domesticable +domesticative +domical +domiciliary +dominant +dominative +domineering +dominical +donnard +donnered +donnish +donsie +doorless +dopey +dopier +dopiest +dopy +dormant +dormered +dormie +dormient +dorsad +dorsal +dorsalis +dorsiferous +dorsigrade +dorsispinal +dorsiventral +dorsolateral +dorsolumbar +dorsoventral +dorty +dosimetric +dotal +dotier +dotiest +doting +dotlike +dotted +dottier +dottiest +dotty +doty +double +doubled +doubling +doubtable +doubtful +douce +doughier +doughiest +doughtier +doughtiest +doughty +doughy +dour +doux +dovelike +dovetailed +dovish +dowable +dowdy +dowdyish +dowerless +dowf +dowie +downcast +downfallen +downhearted +downhill +downier +downiest +downless +downlike +downrange +downright +downstate +downtrodden +downward +downy +dowy +doxastic +doxological +dozenth +dozier +doziest +dozy +drab +drachmal +draconic +draffy +draftable +draftier +draftiest +drafty +dragging +draggletailed +draggy +dragomanic +dragomanish +dragonish +dragonlike +drainable +drainless +dramatic +dramatisable +dramatizable +dramaturgic +dramaturgical +drapable +drapeable +draperied +drastic +dratted +draughtier +draughtiest +draughty +drawable +drawly +drawn +dreadable +dreadful +dreamful +dreamier +dreamiest +dreamless +dreamlike +dreamy +drear +drearier +drearies +dreariest +drearisome +dreary +dreggy +dreich +dreigh +dressier +dressiest +dressy +driech +driegh +drier +driest +driftier +driftiest +driftless +drifty +drillable +drinkable +drinking +drippy +drivable +driveable +driverless +driving +droitural +droll +dronish +droolier +drooliest +drooly +droopier +droopiest +droopy +droplike +dropsical +dropsied +drossier +drossiest +drossy +droughtier +droughtiest +droughty +drouthier +drouthiest +drouthy +drowsier +drowsiest +drowsy +druffen +drugless +druidic +druidical +drumlier +drumliest +drumly +drunk +drunken +drupaceous +dry +dryable +dryadic +drying +drys +dual +dualistic +dubious +dubitable +dubitative +ducal +duchesslike +duckie +duckier +duckiest +ductile +ductless +duddy +dudish +duelistic +duellistic +dulcet +dull +dullish +dulotic +dumb +dumbstruck +dumpier +dumpiest +dumpish +dumpy +duncical +duncish +dunderheaded +dungy +duodecastyle +duodecimal +duodenal +duodenary +dupable +duple +duplicable +duplicate +duplicative +duplicatus +dur +durable +dural +durational +durative +dure +duskier +duskiest +duskish +dusky +dustier +dustiest +dustless +dustproof +dusty +duteous +dutiable +dutiful +dwarfish +dyable +dyadic +dyarchic +dyarchical +dyeable +dyeline +dynamic +dynamistic +dynamitic +dynamoelectric +dynamogenic +dynamogenous +dynamometric +dynamometrical +dynastic +dynastical +dyostyle +dysaesthetic +dysarthric +dyscrasial +dyscrasic +dyscratic +dysenteric +dysesthetic +dysgenic +dysgonic +dyskinetic +dyslogistic +dysmenorrheal +dysmenorrhoeal +dyspathetic +dyspeptic +dysphagic +dysphasic +dysphonic +dysphoric +dysplastic +dyspneal +dyspneic +dyspnoeal +dyspnoeic +dyspnoic +dysteleological +dysthymic +dystonic +dystrophic +dysuric +eared +earless +earliest +earlike +early +earnest +earringed +earsplitting +earthborn +earthbound +earthen +earthier +earthiest +earthlier +earthliest +earthly +earthquaked +earthquaken +earthquaking +earthshaking +earthward +earthy +earwiggy +easeful +easeled +easier +easiest +eastbound +easterly +eastern +easternmost +eastmost +eastward +eastwardly +easy +easygoing +easylike +eatable +eaved +ebon +ebracteate +ebullient +ecalcarate +ecarinate +ecaudate +ecbolic +eccentric +eccentrical +ecchymotic +ecclesiastical +ecclesiologic +ecclesiological +eccrine +ecdemic +ecdysial +ecesic +echinate +echinodermatous +echoic +echolalic +echoless +echopractic +echt +eclamptic +eclectic +ecologic +ecological +econometric +econometrical +economic +economical +ecospecific +ecotonal +ecotypic +ecstatic +ectal +ectatic +ecthymatous +ectoblastic +ectocranial +ectodermal +ectodermic +ectodermoidal +ectogenetic +ectogenous +ectomeric +ectomorphic +ectoparasitic +ectophytic +ectopic +ectoplasmatic +ectoplasmic +ectosarcous +ectosteal +ectotrophic +ectozoan +ectozoic +ectrodactylous +ectromelic +ectypal +ecumenical +eczematoid +eczematous +edacious +edaphic +edematous +edentulous +edgeless +edgier +edgiest +edgy +edible +edictal +edificatory +edificial +editorial +educable +educated +educational +educative +educatory +educible +eductive +edulcorative +eelier +eeliest +eellike +eely +eerie +eerier +eeriest +eery +effable +effaceable +effectible +effective +effectless +effectual +effeminate +efferent +effervescent +effervescible +effete +efficacious +efficient +effigial +efflorescent +effluvial +effortful +effortless +effulgent +effusive +efractory +egal +egalitarian +egestive +eggless +egocentric +egoistic +egomaniacal +egotistic +egregious +eidetic +eighteenth +eightfold +eighth +eightieth +eightpenny +eild +eirenic +eisegetic +eisegetical +eisteddfodic +ejaculatory +ejective +elaborate +elaborative +elastic +elastomeric +elated +elative +elder +elderly +eldest +eldritch +elective +electoral +electric +electrical +electroacoustic +electroanalytic +electroanalytical +electroballistic +electrobiological +electrocardiographic +electrochemical +electrocratic +electrodiagnostic +electrodialitic +electrodynamic +electroencephalographic +electroencephalographical +electrographic +electrokinetic +electroluminescent +electrolytic +electromagnetic +electromechanical +electrometallurgical +electrometric +electrometrical +electromotive +electromyographic +electronegative +electroneutral +electronic +electroosmotic +electrophilic +electrophonic +electrophoretic +electrophotographic +electrophysiologic +electrophysiological +electropositive +electroscopic +electrosensitive +electrostatic +electrostrictive +electrosurgical +electrosynthetic +electrotactic +electrotechnic +electrotechnical +electrotherapeutic +electrotherapeutical +electrothermal +electrotonic +electrotropic +electrotypic +electrovalent +eleemosynary +elegant +elegiac +elemental +elementary +elenctic +elephantiasic +elephantine +elephantoid +elevated +eleventh +elfin +elfish +elflike +elhi +elicitable +elidible +eligible +eliminable +eliminative +eliminatory +ellipsoidal +elliptic +elliptical +elmier +elmiest +elmy +elocutionary +elongative +eloquent +elritch +elucidative +elusive +eluvial +elvish +elytroid +elytrous +emaciated +emanant +emanational +emanative +emanatory +emancipative +emancipatory +emarginate +emasculative +emasculatory +embattled +emblematic +embolic +embolismic +embowed +embraceable +embracive +embrasured +embryogenic +embryoid +embryologic +embryological +embryonic +embryotrophic +emendable +emendatory +emergent +emeritus +emersed +emetic +emigrational +emigrative +emigratory +eminent +emissive +emmetropic +emollient +emotionable +emotional +emotionalistic +emotionless +emotive +empaistic +empathic +empestic +emphatic +emphysematous +empirical +empiristic +employable +emptiable +emptied +empties +emptiest +empty +emptying +empyemic +empyreal +emulative +emulous +emulsible +emulsifiable +emulsive +emulsoidal +emunctory +enabling +enactable +enactive +enactory +enantiomorphic +enantiomorphous +enantiotropic +enarched +enarthrodial +enate +encastra +encaustic +enceinte +encephalic +encephalitic +encephalographic +encephalomyelitic +enchanting +enchondromatous +enchorial +encinal +enclitic +encomiastic +encrustant +enculturative +encyclopedic +endamebic +endamoebic +endarch +endarterial +endemic +endergonic +endermic +endless +endmost +endoblastic +endocardial +endocarditic +endocarpoid +endocentric +endocranial +endocrine +endocrinologic +endocrinological +endocrinopathic +endocrinous +endodermal +endodermic +endoergic +endogamic +endogamous +endogenous +endolithic +endolymphatic +endometrial +endomorphic +endoparasitic +endoperidial +endophytic +endophytous +endoplasmic +endopoditic +endopterygote +endorsable +endorsed +endosarcous +endoscopic +endoskeletal +endosmotic +endosporous +endothecial +endothelial +endothelioid +endothermic +endotoxic +endotrophic +endurable +endurant +enduring +energetic +energetistic +energistic +enervated +enervative +enforceable +enforcive +engaga +engaged +engaging +engineless +enginous +englacial +engrailed +engrained +engrammic +engrossing +enhanced +enhancive +enharmonic +enigmatic +enjambed +enjoyable +enlargeable +enneadic +enneahedral +enneastyle +enneasyllabic +ennuya +ennuyae +ennuyant +ennuyante +enolic +enolizable +enorm +enormous +enow +enphytotic +enrapt +ensiform +enstatitic +entangleable +entelechial +enterable +enteral +enteric +enterologic +enterological +enterozoan +enterpriseless +enterprising +entertaining +enthetic +enthusiastic +enthymematic +entire +entitative +entoblastic +entodermal +entodermic +entomic +entomogenous +entomologic +entomological +entomophagous +entomophilous +entomostracous +entophytic +entopic +entozoan +entozoic +entrepreneurial +enumerable +enumerative +enunciable +enunciative +enunciatory +enuretic +enviable +envious +environmental +enwrought +enzootic +enzygotic +enzymatic +enzymolytic +eolithic +eonian +eosinic +eosinlike +eosinophilic +epagogic +eparchial +epaxial +epeiric +epeirogenic +epencephalic +ependymal +ependymary +epenthetic +epexegetic +ephebic +ephemeral +ephippial +ephoral +epiblastic +epibolic +epicanthic +epicardiac +epicardial +epicedial +epicedian +epicene +epicentral +epiclike +epicondylian +epicontinental +epicritic +epicurean +epicyclic +epicycloidal +epideictic +epidemic +epidemiological +epidermal +epidermic +epidermoid +epidictic +epididymal +epidotic +epidural +epifocal +epigamic +epigastric +epigeal +epigene +epigenetic +epigenous +epigeous +epiglottal +epiglottic +epiglottidean +epigonic +epigrammatic +epigraphic +epigynous +epileptic +epileptoid +epilimnetic +epilimnial +epilithic +epimeric +epimorphic +epimyocardial +epinastic +epineurial +epipastic +epipetalous +epiphanic +epiphenomenal +epiphloedal +epiphragmal +epiphylline +epiphyllous +epiphyseal +epiphysial +epiphytic +epiphytical +epiphytotic +epiploic +epirogenic +episcopal +episcopalian +episcopally +episematic +episepalous +episodic +epispastic +epistatic +epistemic +epistemological +epistolary +epistolic +epistylar +epitaphic +epitaphless +epitaxial +epitaxic +epithalamic +epithecial +epithelial +epithelioid +epitheliomatous +epitheliomuscular +epithetic +epithetical +epitomic +epitomical +epixylous +epizoic +epizootic +epochal +eponymic +eponymous +epoxy +equable +equal +equalitarian +equanimous +equatable +equational +equatorial +equestrian +equiangular +equicontinuous +equidistant +equiform +equilateral +equilibratory +equilibrious +equilibristic +equimolecular +equine +equinoctial +equipollent +equiponderant +equipotent +equipotential +equiprobable +equirotal +equisetic +equitable +equitant +equivalent +equivalve +equivocal +eradicable +eradicant +eradicative +erasable +erased +erect +erectable +erectile +erective +eremitic +eremophilous +erethismic +erethistic +ergative +ergodic +ergographic +ergonomic +ericaceous +ericeticolous +ericoid +erinaceous +eriophyllous +eristic +ermined +erodable +erodent +erodible +erogenous +erose +erosible +erosional +erosive +erotogenic +errable +errant +erratic +errhine +erring +erroneous +errorless +ersatz +erstwhile +erubescent +eruciform +eructative +erudite +eruditional +erumpent +eruptible +eruptional +eruptive +erysipelatous +erythemal +erythematic +erythemic +erythrismal +erythroblastic +erythroblastotic +erythrocytic +erythropoietic +escapable +escapeless +escapist +escartelly +escharotic +eschatological +escheatable +escutcheoned +esemplastic +esophageal +esoteric +especial +espiagle +esquamate +essayistic +essential +essive +establishable +establishmentarian +esterifiable +esthetic +esthetical +estimable +estimative +estipulate +estival +estrildine +estrogenic +estrous +estrual +estuarial +estuarine +esurient +eternal +eterne +etesian +ethereal +ethereous +ethical +ethmoid +ethnic +ethnocentric +ethnogenic +ethnographic +ethnographical +ethnohistoric +ethnohistorical +ethnolinguistic +ethnologic +ethnological +ethnomusicological +ethological +ethylenic +ethylic +ethynyl +etiological +etymologic +etymological +etymologisable +etymologizable +eucalyptic +eucarpic +euchromatic +eudaemonistic +eudaemonistical +eudemonic +eudemonistic +eudemonistical +eudiometric +eudiometrical +eugenic +eugonic +euhedral +euhemeristic +eulogistic +eunuchoid +eupeptic +euphemious +euphemistic +euphemistical +euphonic +euphonious +euphorbiaceous +euphoriant +euphoric +euphotic +euphuistic +euphuistical +euplastic +euploid +euplotid +eupneic +eupotamic +eurhythmic +eurithermophilic +eurychoric +euryhaline +euryphagous +eurythermal +eurythmic +eurythmical +eurytopic +eurytropic +eusporangiate +eustatic +eustyle +eutectic +eutectoid +euthanasic +eutherian +euthermic +eutrophic +evacuant +evacuative +evadable +evadible +evaginable +evaluable +evaluative +evanescent +evanescible +evangelical +evangelistic +evaporable +evaporative +evasional +evasive +evectional +even +evens +eventful +eventless +eventual +everbearing +evergreen +everlasting +eversible +everyday +evident +evidential +evidentiary +evil +evincible +evincive +evitable +evocable +evocative +evolutional +evolutionary +evolutive +evolvable +exact +exactable +exacting +exaggerated +exaggerative +exalted +examinable +examinational +examinatorial +exanimate +exanthematic +exarate +exarchal +excaudate +exceedable +exceeding +excellent +excentric +excepable +exceptionable +exceptional +exceptionless +exceptive +excerptible +excessive +exchangeable +excisable +excitable +excitant +excitative +excited +exciting +excitomotor +exclamational +exclamatory +excludable +excludible +exclusionary +exclusionist +exclusive +exclusivistic +exclusory +excogitable +excogitative +excommunicable +excommunicative +excommunicatory +excrementitious +excrementous +excrescent +excretal +excretive +excretory +excruciating +exculpable +exculpatory +excurrent +excursional +excursionary +excursive +excurvate +excurved +excusable +excusatory +excuseless +excusive +execrable +execrative +execratory +executable +executional +executorial +executory +exedral +exegetic +exemplary +exemplifiable +exemplificative +exemptible +exemptive +exequial +exercisable +exergonic +exergual +exertive +exfoliative +exhalant +exhaustible +exhaustive +exhaustless +exhibitable +exhibitionistic +exhibitive +exhibitory +exhilarant +exhilarative +exhortative +exigeant +exigent +exigible +exiguous +exilable +exilic +eximious +existent +existential +existentialist +existentialistic +exocentric +exocrine +exodermal +exoergic +exogamous +exogenous +exonerative +exopathic +exophthalmic +exopoditic +exopterygote +exorable +exorbitant +exorcismal +exorcistic +exorcistical +exordial +exoskeletal +exosmotic +exospherical +exosporal +exosporous +exostosed +exostotic +exoteric +exothermic +exotic +exotoxic +expandable +expanded +expandible +expansible +expansile +expansional +expansionary +expansionistic +expansive +expatriate +expectable +expectant +expectative +expecting +expectorant +expedient +expediential +expeditionary +expeditious +expellable +expellant +expendable +expenseless +expensive +experienceable +experienced +experienceless +experiential +experientialistic +experimental +experimentative +expiable +expiational +expiatory +expiratory +expiscatory +explainable +explanate +explanatory +explemental +explicable +explicative +explicit +exploitable +exploitative +exploitatory +exploitive +explorable +exploratory +explosible +explosive +exponential +exponible +exportable +exposable +exposed +expositional +expositorial +expository +expostulatory +expressable +expressible +expressional +expressionless +expressive +expressless +expropriable +expugnable +expulsive +expurgatorial +expurgatory +exquisite +exsanguine +exsectile +exserted +exsertile +exsiccative +exstipulate +exsufflicate +extant +extemporal +extemporaneous +extemporary +extendable +extended +extendible +extensible +extensile +extensional +extensionless +extensive +extenuating +extenuative +extenuatory +exterminable +exterminatory +external +exteroceptive +exterritorial +extinct +extinctive +extinguishable +extirpative +extorsive +extortionary +extortionate +extortive +extra +extracanonical +extracapsular +extracellular +extracorporeal +extractable +extractible +extractive +extracurricular +extraditable +extradosed +extraembryonic +extrafloral +extragalactic +extrajudicial +extralegal +extramarital +extrametrical +extramundane +extramural +extraneous +extranuclear +extraordinary +extraphysical +extrapolative +extrapolatory +extraprofessional +extrapunitive +extrasensorial +extrasensory +extrasystolic +extraterrestrial +extraterritorial +extrauterine +extravagant +extravaginal +extravascular +extravehicular +extraversive +extravertish +extravertive +extremal +extreme +extremer +extremest +extrinsic +extrorse +extrospective +extroversive +extrovertish +extrovertive +extrusible +extrusile +extrusive +exuberant +exudative +exultant +exuvial +eyeable +eyed +eyeless +eyelike +eyesome +fab +fabaceous +fabled +fabricative +fabulous +faceable +faceless +facete +facetious +facial +facile +facilitative +facinorous +faconne +factful +factional +factious +factitious +factitive +factorable +factorylike +factual +factualistic +facular +facultative +fadable +faddier +faddiest +faddish +faddy +fadeless +fadlike +faecal +fagaceous +fainaant +faint +fainthearted +faintish +fair +fairish +fairylike +faithful +faithless +falcate +falcial +falciform +falconiform +falconine +falconnoid +fallacious +fallible +fallow +false +falser +falsest +falsifiable +famed +fameless +familial +familiar +familistic +familyish +famished +famous +fanatical +fanback +fancied +fanciful +fanciless +fancy +fanged +fangled +fangless +fanglike +fanlike +fantasmagoric +fantastic +faradic +farand +faraway +farci +farcical +farinaceous +farinose +farmable +farmerlike +farouche +farraginous +farseeing +farsighted +farthermost +fascial +fasciate +fascicular +fasciculate +fascinating +fascinative +fashionable +fashionless +fast +fastidious +fastigiate +fastuous +fatal +fatalistic +fated +fateful +fatherless +fatherlike +fatherly +fathomable +fathomless +fatidic +fatigable +fatigate +fatigued +fatigueless +fatless +fatlike +fattenable +fatter +fattier +fattiest +fattish +fatty +fatuitous +fatuous +faucal +faucial +faultier +faultiest +faultless +faulty +faunal +faunlike +fauntleroy +faveolate +favonian +favorable +favored +favorless +favourable +favoured +favourite +favourless +fawnlike +feal +fearful +fearless +fearsome +feasible +feastful +feastless +featherbrained +feathered +featheredged +featherheaded +featherless +featherlight +featherlike +feathery +featureless +featurish +febrifacient +febriferous +febrific +febrifugal +febrile +feckless +feculent +fecund +fecundatory +federal +federative +feeble +feebler +feeblest +feeblish +feedable +feeless +feelingful +feelingless +feetless +feigned +feirie +feisty +feldspathic +feldspathoid +felicific +felicitous +feline +fellable +felonious +felsic +felsitic +felspathic +female +feminine +feministic +femoral +fencelike +fencible +fendered +fenestral +fenestrated +fenny +feodal +feracious +feral +ferial +ferine +fermentable +fermentative +fernier +ferniest +fernless +fernlike +ferny +ferocious +ferreous +ferrety +ferric +ferriferous +ferroelectric +ferromagnesian +ferromagnetic +ferrous +ferruginous +fertile +fertilisable +fertilisational +fertilizable +fertilizational +ferulaceous +fervent +fervid +fesswise +festal +festive +fetal +fetching +fetichistic +fetichlike +feticidal +fetid +fetiparous +fetishistic +fetishlike +fetterless +feudal +feudalistic +feuilletonistic +feverish +feverless +feverous +fewer +fey +fezzed +fezzy +fibered +fiberless +fibratus +fibreless +fibriform +fibrillar +fibrilliform +fibrillose +fibrinogenic +fibrinolytic +fibrinous +fibroblastic +fibrocartilaginous +fibroid +fibromatous +fibroplastic +fibrotic +fibrous +fibrovascular +fibular +fickle +fictile +fictional +fictitious +fictive +fiddling +fiddly +fidgety +fiducial +fiendish +fiendlier +fiendliest +fiendlike +fiendly +fierce +fiercer +fiercest +fierier +fieriest +fiery +fifteenth +fifth +fiftieth +fiftypenny +figgier +figgiest +figgy +fightable +figuline +figurable +figural +figurate +figurative +figured +figureless +filaceous +filamentary +filamented +filamentous +filar +filarial +filariid +filate +filial +filibusterous +filicidal +filiform +filigreed +fillable +filmable +filmier +filmiest +filmlike +filmy +filose +filosus +filterable +filthier +filthiest +filthy +filtrable +filtratable +filtre +fimbrial +fimbrillate +finable +final +financial +financiare +findable +fineable +finer +finespun +fingered +fingerless +fingery +finialed +finical +finicky +finished +finite +finless +finlike +finned +finnicky +finnier +finniest +finny +firearmed +fireless +fireproof +firm +firmamental +firry +first +firstness +fiscal +fishable +fishier +fishiest +fishless +fishy +fissile +fissionable +fissipalmate +fissiparous +fissiped +fissirostral +fissural +fissureless +fistic +fistulous +fitchy +fitful +fittable +fitted +fitten +fitting +fivefold +fivepenny +fixable +fixative +fixed +fixtureless +fizzier +fizziest +fizzy +flabbier +flabbiest +flabby +flabellate +flaccid +flagellatory +flagelliform +flaggier +flaggiest +flaggy +flagitious +flagless +flagrant +flakeless +flakier +flakiest +flaky +flamb +flamba +flamboyant +flamelike +flameproof +flamier +flamiest +flaming +flamless +flammable +flamy +flangeless +flannelly +flannelmouthed +flapless +flapperish +flappier +flappiest +flappy +flaring +flashier +flashiest +flashy +flat +flatfooted +flatterable +flattish +flatulent +flaunched +flauntier +flauntiest +flaunty +flavescent +flavorful +flavorless +flavorous +flavorsome +flavory +flavourful +flavourless +flavoursome +flavoury +flawed +flawier +flawiest +flawless +flawy +flaxen +fleckless +flecky +flectional +flectionless +fledged +fledgeless +fledgier +fledgiest +fledgy +fleeceable +fleeceless +fleecelike +fleecier +fleeciest +fleecy +fleeting +fleshier +fleshiest +fleshless +fleshlier +fleshliest +fleshly +fleshy +fleury +flexed +flexible +flexile +flexional +flexionless +flexographic +flexuous +flexural +fleysome +flickery +flightier +flightiest +flightless +flighty +flimsier +flimsies +flimsy +flintier +flintiest +flintlike +flinty +flippant +flippest +flipping +flirtational +flirtationless +flirtatious +flitting +floatable +floatier +floatiest +floating +floaty +floccose +flocculable +flocculent +flockier +flockiest +flockless +flocky +floggable +floodable +flooded +floodless +floodlike +floorless +floppier +floppiest +floppy +floral +floreated +florescent +floretty +floriated +floricultural +florid +floriferous +floristic +flory +flossy +flourishing +flourless +floury +flowable +flowered +flowering +flowerless +flowerlike +flowery +flowing +fluctuant +flued +fluent +fluffier +fluffiest +fluffy +fluidal +fluidic +flukeless +flukey +flukier +flukiest +fluky +fluoboric +fluorescent +fluoric +fluorometric +fluoroscopic +flurried +flustrated +fluted +flutelike +flutey +flutier +flutiest +fluttery +fluty +fluvial +fluviatile +fluviomarine +fluxional +fluxionary +flyable +flyaway +flyblown +flying +flyless +foamier +foamiest +foamless +foamlike +foamy +focal +focusable +fodgel +foetal +foeticidal +foetid +foetiparous +fogbound +fogged +foggier +foggiest +foggy +fogless +fogyish +foilable +foiled +foldable +foldaway +foliaceous +foliaged +foliar +foliate +foliated +folic +foliicolous +foliiferous +foliolate +foliose +folkish +folkloric +folkloristic +folksier +folksiest +folksy +follicular +followable +following +fondu +fontal +foodless +foolhardier +foolhardiest +foolhardy +foolish +foolproof +footed +footier +footiest +footless +footling +footloose +footsore +footworn +foppish +foraminal +foraminate +foraminiferal +foraminiferous +forbidden +forbidding +forceable +forced +forceful +forceless +forcepslike +forcible +forcipate +forcipial +fordable +fordless +fore +forecited +foreclosable +forefatherly +foregoing +foregone +forehand +forehanded +foreign +foreknowable +foremost +forenamed +forensic +forepassed +foresaid +foreseeable +foresighted +forespent +forestal +forestial +forestless +forestlike +forethoughtful +foreworn +forfeitable +forficate +forgeable +forgetful +forgetive +forgettable +forgivable +forgiving +forked +forkier +forkiest +forkless +forklike +forky +forlorn +formable +formae +formal +formalistic +formational +formative +former +formfitting +formic +formidable +formless +formulable +formulaic +formulistic +fornical +fornicatory +forniciform +forspent +forthcoming +forthright +fortieth +fortifiable +fortis +fortissimo +fortitudinous +fortnightly +fortuitous +fortunate +fortuneless +fortyish +fortypenny +forward +forworn +forzando +fossiliferous +fossilisable +fossilizable +fossillike +fossorial +fou +foudroyant +foughten +foul +foulmouthed +foundational +foundationary +founderous +foundrous +fountained +fountainless +fountainlike +fourcha +fourfold +fourpenny +fourteenth +fourth +foveal +foveate +foveolar +foveolate +foxier +foxiest +foxlike +foxy +fozier +foziest +fozy +fractional +fractious +fracturable +fractural +fractus +fragile +fragmental +fragmentary +fragmented +fragmentized +fragrant +frail +framable +frameable +frameless +frangible +frank +frankable +frantic +fratchy +fraternal +fratricidal +fraudful +fraudulent +fraught +frazzled +freakier +freakiest +freakish +freaky +frecklier +freckliest +freckly +free +freeborn +freehand +freeing +freemasonic +freer +freest +freestanding +freethinking +freewheeling +freewill +freezable +freezing +freightless +fremd +frenetic +frenular +frenzied +frequent +frequentable +frequentative +fresh +freshmanic +fretful +fretless +fretted +frettier +frettiest +fretty +friable +frictional +frictionless +friended +friendless +friendlier +friendliest +friendly +frigging +frightenable +frightened +frightful +frigid +frigorific +frilly +fringeless +fringelike +fringillid +fringilline +friskier +friskiest +frisky +frivolous +frizzier +frizziest +frizzlier +frizzliest +frizzly +frizzy +frockless +frogeyed +frogged +froggier +froggiest +froggy +froglike +frolicsome +fronded +frondescent +frondless +frontal +frontierless +frontierlike +frontless +frontoparietal +frore +frostbitten +frosted +frostier +frostiest +frostless +frostlike +frosty +frothier +frothiest +frothy +frousier +frousiest +frousy +frouzier +frouziest +frouzy +froward +frowsier +frowsiest +frowsty +frowsy +frowzier +frowziest +frowzy +fructed +fructiferous +fructificative +fructuous +frugal +frugivorous +fruited +fruitful +fruitier +fruitiest +fruitive +fruitless +fruitlike +fruity +frumentaceous +frumpier +frumpiest +frumpish +frumpy +frustrative +frutescent +fruticose +fsiest +fubsier +fubsiest +fubsy +fucoid +fugacious +fugal +fuguelike +fulgent +fulgid +fulgorous +fulgourous +fulgurant +fulgurating +fulgurous +fuliginous +full +fulminant +fulminatory +fulminic +fulminous +fulsome +fulvous +fuma +fumaric +fumarolic +fumatory +fumed +fumeless +fumelike +fumier +fumiest +fumigatory +fumy +functional +functionless +fundamental +fundic +funerary +funereal +funest +fungal +fungic +fungicidal +fungiform +fungistatic +fungitoxic +fungivorous +fungoid +fungous +funguslike +funiculate +funked +funkier +funkiest +funky +funnelform +funnellike +funnier +funniest +funny +furcular +furfuraceous +furibund +furioso +furious +furlable +furless +furnacelike +furnitureless +furred +furriest +furrowless +furrowlike +furrowy +furry +furthermost +furtive +furuncular +furunculous +furzy +fuscous +fuseless +fuselike +fusible +fusiform +fusile +fusilly +fussbudgety +fussier +fussiest +fussy +fustier +fustiest +fustigatory +fusty +futile +futilitarian +futuramic +futureless +futuristic +fuzzier +fuzziest +fuzzy +gabbroic +gabbroid +gabbroitic +gabby +gabelled +gabled +gableended +gablelike +gablewindowed +gadgety +gadoid +gadolinic +gadrooned +gaga +gainable +gainful +gainless +gainly +gaited +gaiterless +galactagogue +galactic +galactoid +galactophorous +galactopoietic +galeate +galeiform +galenic +gallant +galleried +gallerylike +galleylike +galliambic +gallic +gallinaceous +galling +gallinulelike +gallooned +galloping +gallous +gallused +galvanic +galvanometric +galvanometrical +galvanoplastic +galvanoscopic +galvanotactic +galvanotropic +gambogian +gamboised +gameless +gamelike +gamesome +gametic +gametogenic +gametogenous +gametophoric +gamic +gamier +gamiest +gammy +gamogenetic +gamogenetical +gamopetalous +gamophyllous +gamosepalous +gamy +ganglial +gangliar +gangliate +ganglier +gangliest +gangliform +gangling +ganglioid +ganglionate +ganglionic +gangly +gangrenous +gangwayed +ganoid +gantleted +gapless +gapy +garbleable +garbless +gardant +gardenable +gardenless +gardenlike +gargantuan +gargety +gargoyled +garish +garlandless +garlandlike +garlicky +garmentless +garnetlike +garni +garnishable +garreted +garrulous +garterless +gaseous +gasifiable +gasiform +gasless +gaslighted +gaslit +gasmetophytic +gasolineless +gasolinic +gasometric +gasometrical +gassier +gassiest +gassy +gastight +gastralgic +gastric +gastritic +gastrocnemial +gastrocnemian +gastrocolic +gastrodermal +gastroenteric +gastroenteritic +gastroenterologic +gastroenterological +gastrohepatic +gastrointestinal +gastronomic +gastronomical +gastroscopic +gastrotomic +gastrovascular +gastrular +gated +gateless +gatelike +gatherable +gauche +gaudy +gaugeable +gaumless +gaunt +gauntleted +gauzelike +gauzier +gauziest +gauzy +gavialoid +gawkier +gawkiest +gawky +gawsy +gay +gazeless +gazellelike +geanticlinal +gearless +geitonogamous +gelatinoid +gelatinous +gelid +gemeled +gemftlich +geminate +geminiflorous +gemless +gemlich +gemlike +gemmaceous +gemmate +gemmier +gemmiest +gemmiferous +gemmiform +gemmiparous +gemmological +gemmuliferous +gemmy +gemological +genal +genealogic +genealogical +generable +general +generalisable +generalizable +generative +generic +generous +genethliac +genethliacally +genethlialogic +genethlialogical +genetic +genial +genic +geniculate +genital +genitalic +genitival +genitive +genitourinary +genocidal +genomic +genotypic +genotypical +genteel +gentianaceous +gentil +gentile +gentle +gentled +gentlemanlike +gentlemanly +gentler +gentlest +gentlewomanly +gentling +genty +genual +genuine +genupectoral +geocentric +geochemical +geochronologic +geochronological +geodesic +geodetic +geodic +geodynamic +geodynamical +geognostic +geognostical +geographical +geoidal +geologic +geomagnetic +geomantic +geomantical +geomedical +geometric +geomorphic +geomorphologic +geomorphological +geophagous +geophilous +geophysical +geophytic +geopolitic +geopolitical +geoponic +georgic +geostatic +geostrophic +geosynclinal +geotactic +geotectonic +geothermal +geotropic +geraniaceous +geratologic +geriatric +germane +germanic +germanous +germfree +germicidal +germinable +germinal +germinant +germinative +germless +germlike +germproof +gerodontic +gerontogeous +gerundial +gerundival +gestational +gestative +gestic +gesticular +gesticulative +gesticulatory +gestural +gestureless +getable +getatable +gethsemanic +gettable +gewgawed +geyseral +geyseric +ghast +ghastful +ghastlier +ghastliest +ghastly +ghostlier +ghostliest +ghostlike +ghostly +ghoulish +gibbed +gibbous +giddied +giddier +giddiest +giddy +giddying +gifted +giftless +gigantean +gigantesque +gigantic +gigglier +giggliest +giggly +gildable +gilded +gimcrack +gimlety +gimmicky +gimpy +gingery +gingival +ginglymoid +ginned +giocoso +gipseian +gipsyesque +gipsyish +gipsylike +girderless +girdlelike +girlish +girly +gironny +giveable +glabellar +glabrate +glabrescent +glabrous +glaca +glace +glacial +glaciered +glaciologic +glaciological +glad +gladelike +gladiate +gladiatorial +gladiolar +gladsome +glaikit +glairier +glairiest +glairy +glaived +glamorous +glandered +glanderous +glandless +glandlike +glandular +glandulous +glareless +glarier +glariest +glaring +glary +glassier +glassiest +glassless +glasslike +glassy +glaucescent +glaucomatous +glauconitic +glaucous +glazed +gleamless +gleanable +glebal +glebeless +gleeful +gleesome +gleetier +gleetiest +gleety +gleg +glenlike +glenoid +glial +glib +glibber +glibbest +gliddery +gliomatous +glisky +glittery +global +globate +globelike +globoid +globose +globular +globuliferous +glochidial +glochidiate +glomerate +glomerular +gloomful +gloomier +gloomiest +gloomless +gloomy +glorifiable +glorious +glossarial +glossatorial +glossematic +glossemic +glossier +glossies +glossiest +glossitic +glossless +glossographical +glossological +glossopharyngeal +glossy +glottal +glottic +glottidean +glottogonic +glottologic +glottological +gloveless +glovelike +glowing +glucidic +glucinic +glucogenic +gluconeogenic +glucosic +glucosidal +glucosidic +glucosuric +gluelike +gluey +gluier +gluiest +glum +glumaceous +glumelike +glummer +glummest +glumpier +glumpiest +glumpy +gluteal +glutenous +glutinous +gluttonous +glycaemic +glycemic +glyceric +glycogenetic +glycogenic +glycogenolytic +glycolic +glycolytic +glyconeogenetic +glycosidic +glycosuric +glykopectic +glykopexic +glyphic +glyphographic +glyptic +glyptographic +gnarled +gnarlier +gnarliest +gnarly +gnathic +gnathonic +gnatlike +gnattier +gnattiest +gnatty +gnawable +gneissic +gneissoid +gnomic +gnomish +gnomologic +gnomological +gnomonic +gnostic +gnotobiotic +goadlike +goalless +goateed +goatish +goatlike +gobioid +gobony +godsent +gogetting +goitrous +golden +goliardic +gonadal +gonadial +gonadotropic +gonangial +gonglike +goniac +gonial +gonidial +gonidic +gonidioid +goniometric +goniometrical +gonococcal +gonococcic +gonococcoid +gonophoric +gonopodial +gonorrheal +gonorrheic +gonorrhoeal +gonorrhoeic +gonothecal +gonydeal +gonydial +good +goodish +goodlier +goodliest +goodly +gooey +goofier +goofiest +goofy +gooier +gooiest +gooselike +goosenecked +goosepimply +goosewinged +goosy +gorbellied +gorgeable +gorged +gorgeous +gorgeted +gorier +goriest +gorillalike +gorillian +gorilline +gorilloid +gormless +gorsy +gory +gossipy +gourdlike +goutier +goutiest +goutish +goutta +gouty +governable +governessy +governmental +gowaned +gowany +goyish +grabbable +graceful +graceless +gracelike +gracile +gracious +gradable +gradational +gradely +gradual +gradualistic +graduated +grained +grainier +grainiest +grainless +grainy +grallatorial +gramineous +graminivorous +grammarless +grammatical +gramophonic +gramophonical +grand +grandfatherly +grandiloquent +grandiose +grandioso +grandmotherly +grandparental +graniferous +granitelike +granitic +granitoid +granivorous +granolithic +granophyric +grantable +granular +granulative +granulitic +granuloblastic +granulocytic +granulomatous +granulose +grapelike +grapey +graphic +graphitic +graphologic +graphological +graphomotor +graphophonic +graphotypic +grapier +grapiest +graptolitic +grapy +graspable +grasping +graspless +grassier +grassiest +grassless +grasslike +grassy +grateful +grateless +gratelike +gratifiable +gratifying +gratuitous +gratulant +gratulatory +graveless +gravelike +gravelish +gravelly +gravest +gravid +gravimetric +gravitational +gravitative +gray +graybearded +grayish +grazeable +greaseless +greaseproof +greasier +greasiest +greasy +great +greatcoated +greatest +greathearted +greaved +greedier +greediest +greedless +greedsome +greedy +greenish +greensick +greenswarded +greetingless +gregarious +greige +grenadierial +gressorial +grewsome +grey +greyish +griefless +grievous +griffinesque +griffinish +grilla +grilled +grim +grimier +grimiest +grimmer +grimmest +grimy +grindable +gripeful +gripey +gripier +gripiest +gripless +grippal +grippelike +grippier +grippiest +gripple +grippy +gripy +griseous +grisettish +grislier +grisliest +grisly +gristlier +gristliest +gristly +gritless +grittier +grittiest +gritty +grizzled +grizzlier +grizzlies +grizzliest +grizzly +groggier +groggiest +groggy +groomish +grooveless +groovelike +groovier +grooviest +groovy +groping +grosgrained +gross +grotesque +grottoed +grottolike +grotty +grouchier +grouchiest +grouchy +groundable +groundless +grouseless +grouselike +groutier +groutiest +grouty +groved +groveless +growable +growing +grown +grubbier +grubbiest +grubby +grubstreet +grudgeless +grudging +grueling +gruelling +gruesome +gruff +gruffier +gruffiest +gruffish +gruffy +grum +grumbly +grummer +grummest +grumous +grumpier +grumpiest +grumpy +gruntled +grushie +guardable +guardant +guarded +guardianless +guardless +guardlike +gubernacular +gubernatorial +gude +guerdonless +guessable +guestless +guidable +guidebookish +guidebooky +guided +guideless +guileful +guileless +guiltier +guiltiest +guiltless +guilty +guitarlike +gular +gules +gulflike +gulfy +gullable +gullible +gulllike +gulpy +gumless +gumlike +gumly +gummatous +gummed +gummier +gummiest +gummous +gummy +gumptionless +gumptious +gunless +gunned +gunpowdery +gushier +gushiest +gushy +gustable +gustative +gustatory +gustier +gustiest +gustless +gustoish +gusty +gutless +gutlike +gutsier +gutsiest +gutsy +guttate +gutterlike +guttersnipish +guttiform +guttural +gutturalized +gutturonasal +gymnanthous +gymnasial +gymnastic +gymnocarpous +gymnogenous +gymnogynous +gymnorhinal +gymnospermal +gymnospermic +gymnospermous +gymnosporous +gynaecic +gynaecocratic +gynaecoid +gynaecologic +gynaecological +gynaecomorphous +gynandromorphic +gynandromorphous +gynandrous +gynantherous +gynarchic +gynecic +gynecocratic +gynecoid +gynecologic +gynecological +gynecomorphous +gynecopathic +gynobasic +gynodioecious +gynomonoecious +gynophoric +gypseian +gypseous +gypsiferous +gypsyesque +gypsyish +gypsylike +gyral +gyrational +gyratory +gyroidal +gyromagnetic +gyronny +gyroscopic +gyrose +gyrostabilized +gyrostatic +habenular +habile +habilimental +habilimentary +habilimented +habitable +habitational +habited +habitual +habitudinal +hacking +hackly +hackneyed +hadal +haec +haemagglutinative +haemagogue +haemal +haematal +haematic +haematitic +haematocryal +haematogenous +haematoid +haematoidin +haematologic +haematological +haematopoiesis +haematopoietic +haematothermal +haematoxylic +haematozoal +haematozoic +haemic +haemocytoblastic +haemodynamic +haemoglobic +haemoglobinous +haemoid +haemolysis +haemolytic +haemophilic +haemorrhagic +haemorrhoidal +haemostatic +haemotoxic +hagborn +haggadic +haggadical +haggadistic +haggard +haggish +hagiographic +hagiographical +hagiolatrous +hagiologic +hagiological +hagioscopic +haglike +hagridden +hailstoned +hairbrained +hairier +hairiest +hairless +hairlike +hairy +halcyon +hale +halest +halfhearted +halfhourly +halfpaced +halituous +hallowed +hallucal +hallucinational +hallucinative +hallucinatory +hallucinogenic +halogenoid +halogenous +haloid +halolike +halophilous +halterlike +halting +haltless +hamamelidaceous +hamate +hammerable +hammered +hammerheaded +hammerless +hammerlike +hammier +hammiest +hammocklike +hammy +hamular +hamulate +hamulous +handbound +handcrafted +handed +handicapped +handier +handiest +handleable +handleless +handless +handlike +handloomed +handmade +handsewn +handsome +handsomeish +handsomer +handsomest +handworked +handwoven +handwritten +handwrought +handy +hangable +hangdog +hapless +haplitic +haploid +haplologic +happier +happiest +happy +haptic +haptical +harangueful +harassable +harassed +harborless +harborous +harbourless +harbourous +hard +hardbound +hardcovered +hardenable +hardened +hardheaded +hardhearted +hardier +hardiest +hardscrabble +hardy +harebrained +harelike +harelipped +harlequinesque +harmful +harmless +harmonic +harmonious +harmonisable +harmonistic +harmonizable +harmotomic +harnessless +harnesslike +harpless +harplike +harpoonlike +harpylike +harsh +haruspical +harvestless +hask +hastate +hasteful +hasteless +hastier +hastiest +hasty +hatable +hatchable +hatcheck +hatchetfaced +hatchetlike +hateable +hateful +hatless +hatlike +haughtier +haughtiest +haughty +haunched +haunchless +haunted +haunting +hauriant +haustellate +haustorial +havenless +hawkish +hawklike +hawknosed +hawthorny +hayey +hazardable +hazardless +hazardous +hazeless +hazelly +hazier +haziest +hazy +headachy +headed +headfirst +headier +headiest +headless +headlike +headmasterly +headmost +headstrong +headward +heady +healable +healing +healthful +healthier +healthiest +healthward +healthy +heaping +heapy +hearable +hearingless +hearselike +heartaching +heartbreaking +heartbroken +hearted +heartfelt +hearthless +heartier +hearties +heartiest +heartless +heartrending +heartsick +heartsickening +heartsome +heartsore +heartwarming +hearty +heatable +heated +heatful +heathenish +heathered +heathery +heathier +heathiest +heathless +heathlike +heathy +heatless +heatlike +heaveless +heavenless +heavenly +heavenward +heavier +heavies +heaviest +heavy +heavyset +hebdomadal +hebephrenic +hebetate +hebetative +hebetic +hebetudinous +hecht +hectic +hectographic +hedgehoggy +hedgeless +hedgier +hedgiest +hedgy +hedonic +hedonistic +heedful +heedless +heeled +heelless +heftier +heftiest +hefty +hegemonic +hegemonical +heigh +heimish +heinous +heirless +heliacal +heliaean +helianthaceous +heliastic +helical +heliced +helicoid +helicoidal +heliocentric +heliochromic +heliographic +heliographical +heliolatrous +heliolithic +heliometric +heliometrical +helioscopic +heliostatic +heliotactic +heliotropic +heliotypic +hellbent +hellish +helmed +helmeted +helmetlike +helminthic +helminthoid +helminthologic +helminthological +helmless +helpable +helpful +helpless +hemagglutinative +hemagogue +hemal +hematal +hemathermal +hematic +hematitic +hematocryal +hematogenous +hematoid +hematologic +hematological +hematopoietic +hematothermal +hematoxylic +hematozoal +hematozoic +hematuric +hemelytral +hemeralopic +hemic +hemicranic +hemicyclic +hemielytral +hemihedral +hemihydrated +hemikaryotic +hemimetabolous +hemimorphic +hemiopic +hemiparetic +hemiplegic +hemipodan +hemipterous +hemispheric +hemispherical +hemispheroidal +hemistichal +hemitropic +hemizygous +hemochromatotic +hemocytoblastic +hemodynamic +hemoglobic +hemoglobinous +hemoglobinuric +hemoid +hemolytic +hemophilic +hemophilioid +hemorrhagic +hemorrhoidal +hemosiderotic +hemostatic +hemotoxic +hemotrophic +hempen +hemplike +hempy +hendecagonal +hendecahedral +hendecasyllabic +henlike +hennish +henotheistic +heortological +hep +heparinoid +hepatic +hepatotoxic +heptagonal +heptahedral +heptahedrical +heptahydrated +heptamerous +heptametrical +heptangular +heptarchal +heptarchic +heptarchical +heptastyle +heptasyllabic +heptavalent +heraldic +herbaceous +herbaged +herbal +herbarial +herbicidal +herbier +herbiest +herbivorous +herbless +herblike +herby +herculean +hereditable +hereditary +heretical +heritable +hermaean +hermaphroditic +hermeneutic +hermetic +hermitic +hermitical +hermitish +hermitlike +hernial +herniated +heroic +herolike +herpetic +herpetologic +herpetological +herringlike +hesitant +hesitative +hesperidate +hesperideous +hetaeric +hetaeristic +hetairic +hetero +heterocercal +heterochromatic +heterochrome +heterochromous +heterochthonous +heteroclite +heterocyclic +heterodactyl +heterodactylous +heterodont +heterodox +heteroecious +heterofermentative +heterogamous +heterogeneous +heterogenetic +heterogenous +heterogonous +heterographic +heterographical +heterogynous +heterolecithal +heterologous +heterolytic +heteromerous +heteromorphic +heteronomous +heteronymous +heterophil +heterophonic +heterophoric +heterophyllous +heteroplastic +heteropolar +heteropterous +heterosporous +heterostyled +heterotactic +heterotelic +heterothallic +heterotopic +heterotrichous +heterotrophic +heterotypic +heterozygotic +heterozygous +heuristic +hewable +hexabasic +hexadic +hexaemeric +hexagonal +hexagrammoid +hexahedral +hexahemeric +hexahydrated +hexahydric +hexahydroxy +hexameral +hexamerous +hexametral +hexametric +hexametrical +hexangular +hexapartite +hexaplar +hexaplaric +hexapodic +hexapodous +hexastichic +hexasyllabic +hexavalent +hexylic +hibernal +hidable +hidebound +hideless +hideous +hidropoietic +hidrotic +hieland +hiemal +hierarchal +hierarchical +hieratic +hierocratic +hierocratical +hierodulic +hieroglyphic +hierogrammatic +hierogrammatical +hierologic +hierological +hierophantic +hierurgical +hifalutin +high +highborn +highbred +highfalutin +highflying +highhanded +hilarious +hillier +hilliest +hillocked +hillocky +hilly +hiltless +hind +hindermost +hindmost +hingeless +hingelike +hiplength +hipless +hiplike +hipped +hipper +hippest +hippiatric +hippiatrical +hippier +hippiest +hippocampal +hippodromic +hippological +hippophagous +hippopotamic +hippy +hipshot +hirable +hircine +hireable +hirstie +hirsute +hirtellous +hirudinoid +hirundine +hispid +hispidulous +histaminic +histie +histiocytic +histioid +histochemical +histogenetic +histographic +histoid +histologic +histological +histolytic +histomorphological +histopathologic +histopathological +histophysiological +historiated +historic +historical +historied +historiographic +historiographical +histrionic +hit +hitchier +hitchiest +hitchy +hithermost +hitless +hittable +hiveless +hivelike +hoarier +hoariest +hoarse +hoary +hoatching +hobbyless +hoblike +hobnailed +hoc +hoelike +hogged +hoggish +hoglike +hoidenish +hokey +holdable +holeless +holeproof +holey +holier +holies +holiest +holistic +hollow +hollowhearted +holmic +holoblastic +holocarpic +holocrine +holohedral +holometabolous +holomorphic +holophrastic +holophytic +holopneustic +holosericeous +holotypic +holozoic +holstered +holy +homalographic +homebound +homebred +homebrewed +homeless +homelier +homeliest +homelike +homely +homemade +homeomorphic +homeomorphous +homeopathic +homeoplastic +homeostatic +homeothermal +homeotypic +homesick +homespun +homeward +homey +homicidal +homier +homiest +homiletic +hominine +hominoid +homocentric +homocercal +homochromatic +homochrome +homochromous +homochronous +homocyclic +homodont +homodyne +homoeomorphic +homoeomorphous +homoeopathic +homoerotic +homofermentative +homogamous +homogeneous +homogenetic +homogenous +homogonous +homographic +homoiothermal +homoiothermic +homolecithal +homological +homolographic +homomorphic +homomorphous +homonymic +homonymous +homophonic +homophonous +homoplastic +homopolar +homopterous +homorganic +homosporous +homostyled +homotaxial +homotaxic +homothallic +homothermal +homothetic +homotypic +homotypical +homozygous +homuncular +homy +honest +honeydewed +honeyed +honeyful +honeyless +honeylike +honeysuckled +honied +honorable +honorary +honorific +honorless +honourable +honourless +hooded +hoodless +hoodlike +hoodlumish +hoodwinkable +hoofbound +hoofed +hoofless +hooflike +hooked +hookier +hookiest +hookless +hooklike +hookwormy +hoopless +hooplike +hopeful +hopeless +hoplitic +horal +horary +horizonless +horizontal +hormic +hormonal +hormonic +hornblendic +horned +hornier +horniest +hornish +hornless +hornlike +horny +horologic +horopteric +horoscopic +horotelic +horrendous +horrent +horrible +horrid +horrific +horsehaired +horselike +horseplayful +horsey +horsier +horsiest +horsy +hortatory +horticultural +hoseless +hoselike +hospitable +hostile +hostless +hostly +hot +hotelless +hotfoot +hotheaded +hotshot +hotspurred +hotter +hotting +hottish +houndish +houndlike +houndy +hourless +hourlong +hourly +housebound +housekeeperlike +houseless +housemaidy +housemotherly +housewifely +hoven +howling +hoydenish +hubbly +hudibrastic +hued +hueless +huffier +huffiest +huffish +huffy +huge +huger +hugest +huggable +hulkier +hulkiest +hulking +hulky +huly +human +humane +humanistic +humanitarian +humanlike +humanoid +humble +humbled +humbler +humblest +humbling +humdrum +humectant +humeral +humic +humid +humiliatory +humilis +hummel +humming +hummocky +humoral +humorful +humoristic +humoristical +humorless +humorous +humourful +humourless +humoursome +humpbacked +humpier +humpiest +humpless +humpy +humuslike +hunchbacked +hundredfold +hundredth +hungerless +hungerly +hungry +hunky +huntable +hunted +hunterlike +hurried +hurtable +hurtful +hurtless +hurtling +husbandless +hushful +huskier +huskiest +husklike +husky +hutlike +hyacinthine +hyaenic +hyaline +hyaloid +hyaloplasmic +hybridisable +hybridizable +hybristic +hydraemic +hydragogue +hydrarch +hydrargyric +hydrated +hydraulic +hydrazo +hydrazoic +hydremic +hydric +hydriodic +hydrobromic +hydrocarbonaceous +hydrocephalic +hydrocephaloid +hydrochloric +hydrocinnamoyl +hydrocinnamyl +hydrocyanic +hydrodynamic +hydroelectric +hydrofluoric +hydrogenous +hydrogeologic +hydrogeological +hydrographic +hydrographical +hydroid +hydrokinetic +hydrologic +hydrological +hydrolysable +hydrolytic +hydrolyzable +hydromantic +hydromechanical +hydromedusan +hydrometallurgical +hydrometeorological +hydrometric +hydrometrical +hydropathic +hydropathical +hydrophanous +hydrophilic +hydrophilous +hydrophobic +hydrophyllaceous +hydrophytic +hydropic +hydroponic +hydroptic +hydrorhizal +hydroscopic +hydroscopical +hydrostatic +hydrosulfurous +hydrotactic +hydrothecal +hydrotherapeutic +hydrothermal +hydrothoracic +hydrotropic +hydrous +hydroxy +hydroxylic +hyenic +hyenine +hyenoid +hyetal +hyetographic +hyetographical +hyetological +hygienic +hygrometric +hygrophilous +hygrophytic +hygroscopic +hylomorphic +hylophagous +hylotheistic +hylotheistical +hylotropic +hylozoic +hylozoistic +hymeneal +hymenial +hymenopterous +hymnless +hymnlike +hymnodical +hymnologic +hymnological +hyoid +hypabyssal +hypaesthesic +hypaethral +hypalgesic +hypanthial +hyperaccurate +hyperacid +hyperactive +hyperacute +hyperadipose +hyperaemic +hyperaesthetic +hyperalgesic +hyperaltruistic +hyperanabolic +hyperanarchic +hyperangelic +hyperangelical +hyperaphic +hyperarchaeological +hyperbarbarous +hyperbaric +hyperbatic +hyperbolic +hyperboloidal +hyperbrachycephalic +hyperbranchial +hyperbrutal +hypercarbureted +hypercarnal +hypercatalectic +hypercathartic +hypercivilized +hyperclassical +hypercoagulable +hypercomposite +hyperconfident +hyperconscientious +hyperconscious +hyperconservative +hyperconstitutional +hypercorrect +hypercritical +hypercyanotic +hyperdelicate +hyperdelicious +hyperdemocratic +hyperdiabolical +hyperdiastolic +hyperdicrotic +hyperdolichocephalic +hyperdulic +hyperdulical +hyperelegant +hyperemetic +hyperemic +hyperemotional +hyperemotive +hyperenergetic +hyperenthusiastic +hyperesthetic +hyperethical +hypereutectic +hypereutectoid +hyperexcitable +hyperexcursive +hyperfastidious +hyperfine +hyperflexible +hyperfunctional +hypergamous +hypergenetic +hypergenetical +hyperglycaemic +hyperglycemic +hypergolic +hypergrammatical +hyperhidrotic +hyperhilarious +hyperidealistic +hyperimmune +hyperintellectual +hyperintelligent +hyperirritable +hyperkalemic +hyperkeratotic +hyperkinetic +hyperlethal +hyperleucocytotic +hyperlipaemic +hyperlipemic +hyperlogical +hyperlustrous +hypermagical +hypermetamorphic +hypermetaphoric +hypermetaphorical +hypermetaphysical +hypermetric +hypermetrical +hypermetropic +hypermiraculous +hypermodest +hypermoral +hypermotile +hypermystical +hypernatural +hyperneurotic +hypernitrogenous +hypernormal +hypernutritive +hyperobtrusive +hyperopic +hyperorganic +hyperorthodox +hyperorthognathous +hyperosmic +hyperostotic +hyperparasitic +hyperpathetic +hyperpathetical +hyperpatriotic +hyperperistaltic +hyperpersonal +hyperphysical +hyperpietic +hyperpigmented +hyperplastic +hyperploid +hyperpolysyllabic +hyperpotassemic +hyperprognathous +hyperprophetic +hyperprophetical +hyperpure +hyperpyretic +hyperpyrexial +hyperrational +hyperreactive +hyperresonant +hyperrhythmical +hyperridiculous +hyperritualistic +hyperromantic +hypersaintly +hypersceptical +hyperscholastic +hyperscrupulous +hypersensitive +hypersensual +hypersensuous +hypersentimental +hypersonic +hypersophisticated +hyperspatial +hyperspeculative +hyperspherical +hyperstatic +hypersthenic +hyperstoical +hypersubtle +hypersuggestible +hypersusceptible +hypersystolic +hypertechnical +hypertelic +hypertense +hypertensive +hyperthermal +hyperthyroid +hypertonic +hypertorrid +hypertoxic +hypertragic +hypertragical +hypertrophic +hypertropical +hypervascular +hypervigilant +hyperviscous +hypervoluminous +hypesthesic +hypethral +hyphal +hyphenated +hyphenic +hypnagogic +hypnoanalytic +hypnogenetic +hypnoid +hypnoidal +hypnologic +hypnological +hypnopompic +hypnosporic +hypnotic +hypnotisable +hypnotistic +hypnotizable +hypoacid +hypobaric +hypoblastic +hypobranchial +hypochloremic +hypochlorous +hypochromic +hypocoristic +hypocotylous +hypocrateriform +hypocritical +hypocycloidal +hypodermal +hypodermic +hypodynamic +hypoeutectic +hypoeutectoid +hypogastric +hypogeal +hypogene +hypogenetic +hypogenic +hypogenous +hypogeous +hypoglossal +hypoglycemic +hypognathous +hypogynous +hypokalemic +hypokinetic +hypolimnetic +hypolimnial +hypolithic +hypomanic +hyponastic +hyponitrous +hypophloeodal +hypophosphoric +hypophosphorous +hypophyllous +hypophyseal +hypoplastic +hypoploid +hypopotassemic +hyporchematic +hyporight +hypostatic +hyposthenic +hypostomial +hypostyle +hyposulfurous +hypotactic +hypotensive +hypothalamic +hypothecary +hypothecial +hypothermal +hypothetical +hypothyroid +hypotonic +hypotrichous +hypoxanthic +hypoxic +hypsicephalic +hypsicephalous +hypsographic +hypsographical +hypsometric +hypsometrical +hyracoid +hyracoidian +hysteretic +hysterical +hysterogenic +hysteroid +hystricomorphic +hyte +iambic +iatric +iatrochemical +iatrogenic +icebound +iced +iceless +icelike +ichnographic +ichnographical +ichnological +ichorous +ichthyic +ichthyographic +ichthyoid +ichthyolitic +ichthyologic +ichthyological +ichthyophagous +ichthyosaurian +ichthyosauroid +ichthyotic +icicled +icier +iciest +ickier +ickiest +icky +iconic +iconoclastic +iconodulic +iconographic +iconolatrous +iconological +iconomatic +icosahedral +icteric +ictic +icy +ideaful +ideaistic +idealess +idealistic +ideational +ideative +idempotent +identic +identical +identifiable +ideographic +ideographical +ideologic +ideomotor +idioblastic +idiochromatic +idiocratic +idiocratical +idiodynamic +idioglottic +idiographic +idiomatic +idiomorphic +idiopathic +idiophonic +idioplasmatic +idioplasmic +idiorrhythmic +idiosyncratic +idiotic +idiotropic +idle +idled +idlest +idling +idolatrous +idoneous +idyllic +iffy +igneous +ignescent +ignitable +ignitible +ignoble +ignominious +ignorable +ignorant +ileac +ileocecal +iliac +ilka +ill +illative +illaudable +illegal +illegible +illegitimate +illhumored +illiberal +illicit +illimitable +illiquid +illiterate +illogical +illtempered +illuminable +illuminating +illuminational +illuminative +illusionary +illusioned +illusionistic +illusive +illusory +illustratable +illustrational +illustrative +illustrious +illuvial +imageable +imagerial +imaginable +imaginal +imaginary +imaginational +imaginative +imagistic +imbecilic +imbibitional +imbricate +imbricative +imidic +imido +imino +imitable +imitational +imitative +immaculate +immane +immanent +immaterial +immature +immeasurable +immediate +immedicable +immemorial +immense +immensurable +immersed +immersible +immethodical +immigrational +immigratory +imminent +immiscible +immitigable +immobile +immoderate +immodest +immoral +immortal +immortalisable +immortalizable +immotile +immovable +immune +immunogenetic +immunogenetical +immunogenic +immunologic +immunological +immusical +immutable +impacted +impactful +impactive +impairable +impalpable +impar +imparipinnate +imparisyllabic +impartable +impartial +impartible +impassable +impassible +impassionate +impassioned +impassive +impatient +impavid +impeachable +impeccable +impeccant +impeccunious +impecunious +impedible +impedient +impedimental +impedimentary +impeditive +impellent +impendent +impending +impenetrable +impenitent +impennate +imperatival +imperative +imperatorial +imperceptible +imperceptive +impercipient +imperfect +imperfectible +imperfective +imperforate +imperial +imperialistic +imperious +imperishable +impermanent +impermeable +impermissible +imperscriptible +impersonal +impertinent +imperturbable +impervious +impetiginous +impetrative +impetratory +impetuous +impingent +impious +impish +implacable +implacental +implausible +impleadable +implemental +implicational +implicative +implicatory +implicit +implied +implorable +imploratory +implosive +impolite +impolitic +imponderable +importable +important +importunate +imposable +imposing +impossible +impostrous +imposturous +impotent +impoundable +impoverished +impracticable +impractical +imprecatory +imprecise +impregnable +impregnatory +imprescriptible +impressible +impressionable +impressional +impressionistic +impressionless +impressive +imprisonable +improbable +impromptu +improper +improvable +improvident +improvisational +improvisatory +imprudent +impudent +impugnable +impuissant +impulsive +impunitive +impure +imputable +imputative +imputrescible +inaccessible +inaccurate +inactive +inadaptable +inadequate +inadmissible +inadvertent +inadvisable +inalienable +inalterable +inane +inanimate +inappeasable +inappellable +inappetent +inapplicable +inapposite +inappreciable +inappreciative +inapprehensible +inapprehensive +inapproachable +inappropriate +inapt +inarguable +inarticulate +inartificial +inartistic +inattentive +inaudible +inaugural +inauspicious +inboard +inbond +inborn +inbound +inbred +incalculable +incalescent +incandescent +incantational +incantatory +incapable +incapacious +incarcerative +incarnate +incarnational +incautious +incendiary +inceptive +incessant +incestuous +inchoate +inchoative +incidental +incidentless +incipient +incised +incisive +incisory +incisural +incitant +incivil +inclement +inclinable +inclinational +inclinatory +includable +included +includible +inclusive +incoercible +incog +incogitable +incogitant +incognita +incognizant +incoherent +incombustible +incomeless +incoming +incommensurable +incommensurate +incommodious +incommunicable +incommunicative +incommutable +incompact +incomparable +incompatible +incompetent +incomplete +incompliant +incomprehensible +incomprehensive +incompressible +incomputable +inconceivable +inconclusive +incondensable +incondite +incongruent +incongruous +inconsecutive +inconsecutively +inconsequent +inconsequential +inconsiderable +inconsiderate +inconsistent +inconsolable +inconsonant +inconspicuous +inconstant +inconsumable +incontestable +incontinent +incontinuous +incontrollable +incontrovertible +inconvenient +inconvertible +inconvincible +incoordinate +incorporable +incorporated +incorporating +incorporative +incorporeal +incorrect +incorrigible +incorrupt +incorruptible +incrassate +incrassative +increasable +increasing +increate +incredible +incredulous +incremental +increscent +incretionary +incretory +incriminatory +incrustant +incubational +incubative +incubatory +incubous +incudate +inculcative +inculpable +inculpatory +incult +incumbent +incunabular +incurable +incurious +incurrable +incurrent +incursive +indagative +indebted +indecent +indeciduate +indeciduous +indecipherable +indecisive +indeclinable +indecomposable +indecorous +indefatigable +indefeasible +indefectible +indefective +indefensible +indefinable +indefinite +indehiscent +indeliberate +indelible +indelicate +indemnificatory +indemonstrable +indented +independent +indescribable +indestructible +indeterminable +indeterminate +indeterministic +indevout +indexical +indexless +indicatable +indicative +indicatory +indicial +indictable +indictional +indifferent +indigenous +indigent +indigested +indigestible +indigestive +indign +indignant +indigoid +indirect +indiscernible +indiscerptible +indiscoverable +indiscreet +indiscrete +indiscretionary +indiscriminate +indiscriminating +indiscriminative +indispensable +indisposed +indisputable +indissoluble +indistinct +indistinctive +indistinguishable +indivertible +individual +individualistic +indivisible +indocile +indolent +indologenous +indomitable +indoor +indorsable +indrawn +indubitable +inducible +inductile +inductionless +inductive +indulgent +induplicate +indurative +indusial +indusiate +industrial +industrious +inebriant +inedible +inedited +ineducable +ineffable +ineffaceable +ineffective +ineffectual +inefficacious +inefficient +inelastic +inelegant +ineligible +ineloquent +ineluctable +ineludible +inenarrable +inept +inequable +inequilateral +inequitable +inequivalve +ineradicable +inerasable +inerrant +inerratic +inert +inertial +inescapable +inessential +inessive +inestimable +inevasible +inevitable +inexact +inexcusable +inexhaustible +inexistent +inexorable +inexpedient +inexpensive +inexperienced +inexpert +inexpiable +inexpiate +inexplainable +inexplicable +inexplicit +inexplosive +inexpressible +inexpressive +inexpugnable +inexpungible +inextensible +inextinguishable +inextirpable +inextricable +infallible +infamous +infanticidal +infantile +infantine +infantlike +infarcted +infatuated +infeasible +infectant +infectious +infective +infecund +infelicitous +infelt +inferable +inferential +inferible +inferior +infernal +inferoanterior +inferrible +infertile +infiltrative +infinite +infinitesimal +infinitival +infirm +inflammable +inflammatory +inflated +inflationary +inflectional +inflectionless +inflective +inflexed +inflexible +inflexional +inflexionless +inflictable +inflictive +inflorescent +influenceable +influent +influential +influenzal +influenzalike +informable +informal +informational +informative +informed +infortunate +infracostal +infrahuman +inframarginal +infrangible +infrasonic +infrequent +infundibular +infundibulate +infundibuliform +infuscate +infusible +infusive +infusorial +ingenerate +ingenious +ingenuous +ingestible +ingestive +inglorious +ingoing +ingrained +ingratiating +ingratiatory +ingravescent +ingressive +ingrowing +ingrown +inguinal +inhabitable +inhabited +inhalant +inharmonic +inharmonious +inherent +inheritable +inherited +inhibitable +inhibitory +inhomogeneous +inhospitable +inhuman +inhumane +inimical +inimitable +iniquitous +initial +initiatory +injectable +injudicious +injunctive +injurable +injured +injurious +inkier +inkiest +inkless +inklike +inky +inlaid +inland +inlying +inmigrant +inmost +innate +inner +innermost +innerspring +innervational +innless +innocent +innocuous +innominate +innovational +innovative +innovatory +innoxious +innumerable +innumerate +innutritious +inobservant +inoculable +inoculative +inodorous +inoffensive +inofficious +inoperable +inoperative +inopportune +inordinate +inorganic +inotropic +inoxidizable +inphase +inquilinous +inquirable +inquiring +inquisitional +inquisitive +inquisitorial +insalubrious +insane +insanitary +insatiable +insatiate +inscribable +inscriptional +inscriptionless +inscriptive +inscrutable +insectan +insectean +insecticidal +insectile +insectival +insectivorous +insectlike +insecure +insensate +insensible +insensitive +insentient +inseparable +insertable +inserted +insertional +insessorial +inseverable +inshore +insides +insidious +insightful +insignificant +insincere +insinuating +insinuative +insipid +insipient +insistent +insociable +insolent +insoluble +insolvable +insolvent +insomniac +insomnious +insomnolent +insouciant +inspectable +inspectional +inspective +inspectoral +inspectorial +inspirable +inspirational +inspirative +inspiratory +instable +instantaneous +instigative +instinctive +institutional +institutionary +institutive +instructible +instructional +instructive +instructorial +instructorless +instrumental +insubordinate +insubstantial +insufferable +insufficient +insular +insultable +insulting +insuperable +insupportable +insuppressible +insurable +insured +insurgent +insurmountable +insurrectional +insurrectionary +insusceptible +inswept +intact +intangible +intarsiate +integrable +integral +integrant +integrative +integumentary +intellective +intellectual +intellectualistic +intelligent +intelligential +intelligible +intemerate +intemperate +intended +intense +intensional +intensive +intentional +intentioned +intentionless +interacademic +interaccessory +interacinous +interactional +interactive +interadditive +interalar +interalveolar +interangular +interannular +interapophysal +interapophyseal +interarticular +interartistic +interarytenoid +interasteroidal +interastral +interatomic +interatrial +interaulic +interaural +interauricular +interavailable +interaxial +interaxillary +interbanded +interbank +interbedded +interbelligerent +interborough +interbrachial +interbranch +interbranchial +interbreath +interbrigade +interbronchial +intercalary +intercalative +intercapillary +intercardinal +intercarotid +intercarpal +intercarpellary +intercartilaginous +intercaste +intercatenated +intercausative +intercavernous +intercellular +intercentral +interceptive +intercerebral +intercessional +intercessorial +intercessory +interchangeable +interchondral +interchurch +interciliary +intercity +intercivic +interclass +interclavicular +interclerical +interclub +intercoccygeal +intercollege +intercollegiate +intercolonial +intercolumnal +intercolumnar +intercommissural +intercommunal +intercommunicable +intercommunicative +intercompany +intercomparable +intercomplimentary +interconciliary +intercondylar +intercondylic +intercondyloid +interconfessional +interconsonantal +intercontinental +intercontorted +intercontradictory +interconvertible +intercoracoid +intercorporate +intercorpuscular +intercortical +intercosmic +intercostal +intercotylar +intercounty +intercranial +intercrinal +intercrural +intercrystalline +intercurrent +intercuspidal +intercystic +interdenominational +interdental +interdepartmental +interdependable +interdependent +interdestructive +interdictory +interdiffusive +interdigital +interdisciplinary +interdistrict +interdorsal +interempire +interepidemic +interepithelial +interequinoctial +interested +interesting +interestuarine +interfacial +interfactional +interfaith +interfamily +interfascicular +interfemoral +interfenestral +interferential +interferometric +interfertile +interfibrillar +interfibrous +interfilamentary +interfilamentous +interfilar +interfluent +interfluvial +interfoliaceous +interfraternal +interfrontal +interfulgent +intergalactic +interganglionic +intergenerating +intergenerative +intergilt +interglacial +interglandular +interglobular +intergonial +intergovernmental +intergradational +intergranular +intergroup +intergular +intergyral +interhaemal +interhemal +interhemispheric +interhostile +interhuman +interim +interimperial +interindividual +interinhibitive +interinsular +interionic +interisland +interjacent +interjaculatory +interjectional +interjectory +interjectural +interjugal +interjugular +interkinetic +interlabial +interlaboratory +interlacustrine +interlamellar +interlaminar +interlatitudinal +interlibrary +interligamentary +interligamentous +interlineal +interlinear +interloan +interlobar +interlobate +interlobular +interlocal +interlocular +interlocutory +interlucent +interludial +interlunar +intermalar +intermalleolar +intermammary +intermammillary +intermandibular +intermanorial +intermarginal +intermarine +intermastoid +intermaxillary +intermeasurable +intermediate +intermediatory +intermembral +intermembranous +intermeningeal +intermenstrual +intermesenteric +intermetacarpal +intermetallic +intermetameric +intermetatarsal +interminable +interministerial +intermissive +intermittent +intermixable +intermolar +intermolecular +intermomentary +intermontane +intermundane +intermunicipal +intermural +intermuscular +internal +internarial +internasal +internation +international +internecine +internetted +interneural +interneuronic +internidal +internodal +internuclear +internuncial +interoceanic +interoceptive +interocular +interoffice +interolivary +interoptic +interorbital +interosseous +interpalatine +interpalpebral +interpapillary +interparenchymal +interparental +interparenthetic +interparenthetical +interparietal +interparliament +interparliamentary +interparoxysmal +interparty +interpectoral +interpeduncular +interpellant +interpenetrable +interpenetrant +interpenetrative +interpersonal +interpervasive +interpetaloid +interpetalous +interpetiolar +interphalangeal +interplacental +interplanetary +interpleural +interpolable +interpolar +interpolative +interportal +interposable +interpressure +interpretable +interpretational +interpretative +interpretive +interprismatic +interprofessional +interproglottidal +interproportional +interprotoplasmic +interprovincial +interproximal +interpterygoid +interpubic +interpulmonary +interpupillary +interrace +interracial +interradial +interrailway +interramal +interregimental +interregional +interregnal +interrelated +interreligious +interrenal +interrepellent +interresponsible +interreticular +interroad +interrogable +interrogational +interrogative +interrogatory +interrupted +interruptible +interruptive +interscapular +interscholastic +interscience +interseaboard +intersectant +intersectional +intersegmental +interseminal +intersentimental +interseptal +intersesamoid +intersexual +intershifting +intershop +intersidereal +intersocial +intersocietal +intersociety +intersoluble +intersonant +interspatial +interspecial +interspheral +interspicular +interspinal +interspinous +intersporal +interstadial +interstaminal +interstate +interstation +interstellar +intersticed +interstitial +interstream +interstreet +interstrial +intersubjective +intersystem +intersystematic +intersystematical +intertarsal +interteam +intertentacular +intertergal +interterminal +interterritorial +interthreaded +interthronging +intertidal +intertissued +intertown +intertrabecular +intertransformable +intertransversal +intertribal +intertropical +intertuberal +intertubercular +intertubular +interungular +interungulate +interuniversity +interurban +intervaginal +intervalic +intervalvular +intervarietal +intervarsity +intervascular +interveinal +interveinous +intervenient +interventional +interventionist +interventral +interventricular +intervenular +interverbal +intervertebral +intervesicular +interviewable +intervillous +intervocalic +intervolute +interword +interwrought +interxylary +interzonal +interzooecial +intestable +intestate +intestinal +intimal +intimate +intime +intimidatory +intimist +intimiste +intoed +intolerable +intolerant +intonational +intortus +intown +intoxicable +intoxicated +intoxicative +intraabdominal +intracardiac +intracellular +intracranial +intractable +intracutaneous +intradermal +intramarginal +intramolecular +intramundane +intramural +intramuscular +intranational +intransigent +intransitive +intranuclear +intrapsychic +intraspinal +intrastate +intratelluric +intrauterine +intravascular +intravenous +intravital +intrepid +intricate +intrinsic +introducible +introductory +intromissible +intromissive +intromittent +intropunitive +introrse +introspectable +introspectible +introspectional +introspective +introversive +intrusional +intrusive +intuitable +intuitional +intuitionless +intuitive +intumescent +inturned +intussusceptive +inundant +inundatory +inurbane +inutile +invadable +invaginable +invaluable +invariable +invasive +invected +inventable +inventible +inventional +inventionless +inventive +inventoriable +inventorial +inverse +inversive +invertible +investable +investible +investigable +investigational +investigative +investigatory +investitive +inveterate +inviable +invidious +invigorative +invincible +inviolable +inviolate +invisible +invitational +invitatory +inviting +invocable +invocative +invocatory +involucelate +involucral +involucrate +involuntary +involute +involutional +involved +invulnerable +inward +inwrought +iodic +iodimetric +iodometric +iodous +ionic +ionisable +ionizable +ionogenic +ionospheric +ipsilateral +iracund +irascible +irate +ireless +irenic +iridaceous +iridescent +iridic +iridopupillary +iridous +iritic +irksome +ironbound +ironclad +ironfisted +ironhanded +ironic +ironical +ironless +ironlike +irradiant +irradiative +irrational +irrationalist +irrationalistic +irrebuttable +irreclaimable +irreconcilable +irrecoverable +irrecusable +irredeemable +irreducible +irreformable +irrefragable +irrefrangible +irrefutable +irregardless +irregular +irrelative +irrelevant +irrelievable +irreligious +irremeable +irremediable +irremissible +irremovable +irreparable +irrepealable +irreplaceable +irrepleviable +irreplevisable +irrepressible +irreproachable +irresistible +irresoluble +irresolute +irresolvable +irrespective +irrespirable +irresponsible +irresponsive +irretentive +irretraceable +irretrievable +irreverent +irreversible +irrevocable +irrigable +irrigational +irrigative +irriguous +irritable +irritant +irritative +irrorate +irrotational +irruptive +isacoustic +isagogic +isandrous +isanomalous +isanthous +isauxetic +ischaemic +ischemic +ischiadic +isenthalpic +isentropic +isidioid +islandish +islandless +islandlike +isleless +isleted +isoagglutinative +isoamyl +isobaric +isobathic +isobathythermal +isobathythermic +isocarpic +isocephalic +isoceraunic +isochasmic +isocheimal +isocheimenal +isocheimic +isochimal +isochoric +isochromatic +isochronal +isochronous +isochroous +isoclinal +isocratic +isocyano +isodiametric +isodimorphic +isodimorphous +isodomic +isodose +isodynamic +isoelastic +isoelectric +isoelectronic +isogamous +isogenous +isogeothermal +isogeothermic +isoglossal +isogonal +isogonic +isographic +isographical +isohyetal +isokeraunic +isolable +isolatable +isolating +isolative +isolecithal +isologous +isomagnetic +isomeric +isomerous +isometric +isomorphic +isomorphous +isonephelic +isonomic +isonomous +isopachous +isopentyl +isoperimetric +isoperimetrical +isopetalous +isopiestic +isopodan +isopodous +isopolitical +isoporic +isopycnic +isorhythmic +isosceles +isoseismal +isoseismic +isosmotic +isospondylous +isostatic +isostemonous +isosteric +isostructural +isotactic +isotheral +isothermal +isothermobathic +isothiocyano +isotimic +isotonic +isotopic +isotropic +isotypic +issuable +issuant +issueless +isthmian +isthmoid +italic +itchier +itchiest +itching +itchy +iterant +iterative +ithyphallic +itinerant +ivied +ivorylike +ivylike +jackbooted +jacketed +jacketless +jacketlike +jackleg +jaculatory +jaculiferous +jaded +jadelike +jadish +jagged +jaggier +jaggiest +jaggy +jagless +jailless +jaillike +jake +jalapic +jalousied +jamlike +jammy +jangly +janiform +janitorial +jannock +jargonal +jargonesque +jargonish +jargonistic +jarless +jaseyed +jasmined +jasminelike +jasp +jaspa +jasperated +jaspered +jasperoid +jaspery +jauntier +jauntiest +jaunty +jawbreaking +jawless +jawlike +jazzier +jazziest +jazzy +jealous +jejunal +jejune +jellied +jellylike +jeopardous +jerkier +jerkiest +jerkwater +jerky +jerseyed +jessant +jestful +jesting +jettisonable +jewellike +jiggered +jiggish +jiggly +jiglike +jimp +jingly +jingoish +jingoistic +jittery +jobless +jockeyish +jockeylike +jocose +jocular +jocund +joinable +jointed +jointless +jointured +jointureless +joistless +jokeless +jollier +jolliest +jolly +joltier +joltiest +joltless +jolty +jonnick +jonnock +jotty +journalary +journalish +journalistic +jovial +jowled +jowlier +jowliest +jowly +joyful +joyless +joyous +jubate +jubilant +jubilatory +judaistic +judgeable +judgeless +judgelike +judgemental +judgmatic +judgmental +judicable +judicative +judicatorial +judicatory +judiciable +judicial +judiciary +judicious +jugal +jugate +juglandaceous +jugular +juiceless +juicier +juiciest +juicy +julienne +jumpable +jumpier +jumpiest +jumpy +juncaceous +junctional +jungled +jungly +junior +jural +jurant +juratory +juridical +jurisdictive +jurisprudent +jurisprudential +juristic +juryless +juryrigged +jussive +just +justiceless +justicelike +justiciable +justiciary +justifiable +justificatory +jutelike +juvenal +juvenescent +juvenile +juxtapositional +kacha +kakistocratical +kaleidoscopic +kalendarial +kangaroolike +kaolinic +karmic +karstic +karyogamic +karyokinetic +karyolitic +karyoplasmatic +karyoplasmic +karyotypic +karyotypical +katabatic +katabolic +katamorphic +katatonic +kathartic +kathodic +keelless +keen +keepable +keeperless +keloidal +kempt +kempy +kenogenetic +kenotic +kenspeckle +keramic +keratinous +keratogenous +keratoid +keratometric +keratoplastic +keratose +keratosic +keratotic +kerchiefed +kerchieft +kernelless +kernelly +kerygmatic +keto +ketogenetic +ketolytic +ketonic +keyed +keyless +khakilike +khedival +khedivial +kickable +kickless +kidlike +kidneylike +killable +killing +kilometric +kilometrical +kilted +kiltlike +kimonoed +kinaesthetic +kind +kindhearted +kindless +kindlier +kindliest +kindly +kindred +kindredless +kinematic +kinematical +kinematographic +kinematographical +kinesic +kinesthetic +kinetic +kinetographic +kinetoscopic +kingdomless +kingless +kinglier +kingliest +kinglike +kingly +kinkier +kinkiest +kinkled +kinkly +kinless +kirklike +kirtled +kissable +kitchenless +kitcheny +kitelike +kittenish +kittenlike +kittle +klephtic +klutzy +knaggier +knaggiest +knaggy +knapsacked +knarred +knarry +knavish +kneadable +knickerbockered +knickered +knickknacked +knickknacky +knifeless +knifelike +knightless +knightly +knittable +knitted +knobbier +knobbiest +knobby +knoblike +knockdown +knockless +knolly +knotless +knotlike +knotted +knottier +knottiest +knotty +knowable +knowing +knowledgeable +knowledgeless +knuckleheaded +knuckly +knurled +knurlier +knurliest +knurly +kokobeh +kookier +kookiest +kooky +kosher +kraurotic +kutcha +kymographic +kyphoscoliotic +kyphotic +labelloid +labial +labialized +labile +labiodental +labionasal +labiovelar +laboratorial +labored +laborious +laboristic +laborless +laboured +labourless +labradoritic +labyrinthine +laccolithic +laceless +lacelike +lacerable +lacerant +lacerated +lacerative +lacertilian +lachrymal +lachrymose +lacier +laciest +laciniate +lackadaisical +lackluster +lacklustre +laconic +laconical +lacrimal +lacrimatory +lactary +lactational +lacteal +lacteous +lactescent +lactic +lactiferous +lactogenic +lactonic +lacunal +lacunaris +lacunose +lacunosis +lacustrine +lacy +ladderless +ladderlike +laddery +laddish +laden +ladyish +ladyless +ladylike +laevo +laevogyrate +laevorotatory +lageniform +lagomorphic +lagomorphous +lagoonal +laic +laigh +lairdly +lairy +lakier +lakiest +laky +lambdoid +lambent +lamblike +lame +lamellar +lamellate +lamelliform +lamellirostral +lamellose +lamentable +lamented +lamer +lamest +lamiaceous +laminable +laminar +laminariaceous +laming +laminose +laminous +lampless +lamprophonic +lamprophyric +lanate +lancelike +lanceolate +lanceted +lanciform +lancinate +landed +landholding +landless +landlike +landlocked +landlordly +landlubberish +landlubberly +landlubbing +landward +lang +langued +languid +languishing +languorous +laniary +laniferous +lank +lanky +lanolated +lanose +lanuginose +laodicean +lapactic +lapelled +lapidific +lapidifical +lappeted +lapsable +lapsible +lapstrake +larcenous +larcher +lardaceous +lardier +lardiest +lardlike +lardy +largando +large +larger +largest +larghetto +largish +largo +larine +larithmic +larkish +larksome +larky +larval +larvicidal +larviparous +larvivorous +laryngeal +laryngitic +laryngologic +laryngological +laryngopharyngeal +laryngoscopic +laryngoscopical +laryngotracheal +lascivious +lashed +lashless +last +lasting +late +lated +lateen +lateenrigged +latent +later +lateral +laterigrade +lateritic +lateritious +latest +lathery +lathier +lathiest +lathlike +lathy +laticiferous +latish +latitudinal +latitudinarian +latitudinous +latreutic +latter +lattermost +latticed +latticelike +laudable +laudatory +laughable +laughterless +launchable +launderable +lauraceous +laureate +lauric +lauroyl +lavational +lavish +lawful +lawless +lawlike +lawny +lawyerlike +lawyerly +lax +lazarlike +lazier +laziest +lazuline +lazulitic +lazy +lazyish +leachable +leachier +leachiest +leachy +leaden +leaderless +leadier +leadiest +leading +leadless +leady +leafed +leafier +leafiest +leafless +leaflike +leafy +leakless +leaky +leal +learnable +learned +leary +leasable +leaseless +leathern +leathery +leaved +leavenless +lecherous +lecithal +lecithoid +lecythoid +ledgeless +ledgier +ledgiest +ledgy +leechlike +leerier +leeriest +leery +leeward +left +leftist +leftward +legal +legalistic +legatine +legationary +legatorial +legendary +legged +leggier +leggiest +legginged +leggy +legible +legionary +legislative +legislatorial +legit +legitimate +legitimated +legitimating +legless +leglike +leguminous +leiomyomatous +leishmanial +leishmanic +leishmanioid +leisurable +leisured +leisureless +leisurely +lekker +lemonish +lemonlike +lemony +lemurlike +lemuroid +lendable +lengthier +lengthiest +lengthy +lenient +lenis +lenitic +lenitive +lensless +lenslike +lentando +lenten +lentic +lenticellate +lenticular +lenticularis +lentiginous +lentissimo +lento +lentoid +leonine +lepidopterological +lepidopterous +lepidote +leporid +leporine +leprose +leprotic +leprous +leptodactylous +leptokurtic +leptophyllous +leptoprosopic +leptorrhine +leptosomatic +leptosomic +leptospiral +lesser +lestobiotic +lethal +lethargic +lethiferous +lettered +letterless +leucemic +leucitic +leucocratic +leucocythaemic +leucocythemic +leucocytic +leucocytotic +leuconoid +leucopoietic +leucorrheal +leucorrhoeal +leucotic +leukaemic +leukemic +leukemoid +leukoblastic +leukocytic +leukocytotic +leukopenic +leukopoietic +leukorrheal +leukorrhoeal +level +leverlike +leviable +leviratic +leviratical +levitational +levitative +levo +levogyrate +levorotatory +lewd +lexical +lexicographic +lexicographical +lexicologic +lexicological +lexicostatistic +lexicostatistical +liable +lianoid +libational +libationary +libelous +liberal +liberalistic +liberative +liberatory +liberticidal +libidinal +libidinous +librational +libratory +libriform +licenceable +licenseless +licentious +lichenlike +lichenoid +lichenologic +lichenological +lichenous +licit +lickerish +lictorian +lidded +lidless +liege +lienable +lienal +lienteric +lifeful +lifeless +lifelike +lifelong +lifesaving +liftable +ligamentous +ligative +lightfast +lightful +lightish +lightless +lightsome +lightweight +ligneous +lignicolous +ligniform +lignitic +lignivorous +lignocellulosic +ligular +ligulate +liguloid +likable +like +likeable +likelier +likeliest +likely +lilaceous +liliaceous +lilied +lilylike +limacine +limbate +limbed +limber +limbic +limbless +limeless +limelike +limicoline +limicolous +limier +limiest +liminal +limitable +limitary +limitative +limited +limiting +limitless +limitrophe +limnetic +limnologic +limnological +limonitic +limpid +limpsy +limuloid +limy +linable +lineable +lineal +lineamental +linear +lineate +linebred +lineless +linelike +lineny +lineolate +liney +lingual +linguiform +linguistic +linguistical +lingulate +linier +liniest +linked +linoleic +lintier +lintiest +lintless +linty +liny +lionesque +lionhearted +lionlike +lionly +lipaemic +lipemic +lipless +liplike +lipochromic +lipogrammatic +lipographic +lipoid +lipolitic +lipomatous +lipopectic +lipophilic +lipotropic +lipped +lippy +liquefactive +liquefiable +liquescent +liquorish +liquory +lirellate +lissom +lissome +lissotrichous +listed +listless +literal +literalistic +literary +literate +lithaemic +lithe +lithemic +lither +lithesome +lithest +lithic +lithographic +lithographical +lithoid +lithologic +lithological +lithophile +lithophytic +lithotomic +lithotomical +lithy +litigable +litigious +litoral +litten +littery +littlish +littoral +liturgical +liturgiological +liturgistic +livable +liveable +lived +livelier +liveliest +livelong +lively +liveried +liverish +liverless +livest +livid +living +loaded +loadless +loaferish +loamless +loamy +loanable +loath +loathful +loathsome +lobar +lobate +lobed +lobeliaceous +lobose +lobular +lobulate +local +localisable +localistic +localizable +locatable +locative +lochial +lockable +lockless +locomobile +locomotor +locular +loculate +loculicidal +locustal +locustlike +lodgeable +lodged +loessal +loessial +loftier +loftiest +loftless +lofty +loganiaceous +logaoedic +logarithmic +loggerheaded +loggish +logical +logicless +logier +logiest +logogrammatic +logographic +logogriphic +logomachic +logomachical +logopedic +logorrheic +logy +lomentaceous +lomentlike +lone +lonelier +loneliest +lonely +lonesome +long +longanamous +longevous +longicaudal +longish +longitudinal +longshore +longsome +longstanding +longtime +longwall +longwise +looney +loonier +loonies +looniest +loony +looped +loopy +loose +looser +lophobranchiate +lophodont +lophophoral +loppy +lopsided +loquacious +loral +lordless +lordlier +lordliest +lordlike +lordly +lordotic +loreless +loricate +lorn +losable +losing +lossy +lost +loth +lothsome +lotic +louche +loud +loudish +lounging +loungy +louring +loury +lousier +lousiest +lousy +loutish +louvered +louvred +lovable +loveable +loveless +lovelier +loveliest +lovelorn +lovely +loverless +loverlike +lovesick +lovesome +loving +low +lowborn +lowbred +lower +lowerable +lowering +lowermost +lowery +lowish +lowlier +lowliest +lowly +lown +lowse +lowser +lowsest +loxodont +loxodromic +loyal +lozenged +lozengy +lubberly +lubric +lubricational +lubricative +lubricatory +lubricious +lubricous +lucent +lucid +luciferous +luckier +luckiest +luckless +lucky +lucrative +lucubratory +luculent +ludicrous +luetic +luggageless +lugubrious +lukewarm +lumbar +lumberless +lumbosacral +lumbricoid +luminescent +luminiferous +luminous +lumpen +lumpier +lumpiest +lumpish +lumpy +lunar +lunate +lunatic +luncheonless +lunchless +lungeous +lunier +lunies +luniest +lunisolar +lunitidal +lunkheaded +lunular +lunulate +luny +lupine +lupous +lurid +luscious +lush +lushier +lushiest +lushy +lustered +lusterless +lustful +lustier +lustiest +lustral +lustrative +lustred +lustreless +lustrous +lusty +luteal +luteotropic +luteous +lutose +luxuriant +luxurious +lyard +lycanthropic +lychnoscopic +lymphangial +lymphangiomatous +lymphatic +lymphatolytic +lymphoblastic +lymphocytic +lymphocytotic +lymphoid +lymphomatoid +lyncean +lynxlike +lyocratic +lyolytic +lyonnaise +lyophilic +lyophobic +lyotropic +lyrate +lyric +lyrical +lyriform +lythraceous +lytic +macabre +macaronic +macerative +machinable +machineless +machinelike +mackinawed +mackintoshed +macled +macrobiotic +macroclimatic +macrocytic +macrodont +macrographic +macrolecithal +macrolinguistic +macrometeorological +macromolecular +macronuclear +macronucleate +macropodous +macropterous +macroptic +macroscopic +macrosporic +macrostomatous +macrostylous +macrurous +macular +mad +madcap +maddening +maddest +madding +maddish +madrigalesque +madrigalian +maduro +maenadic +maestoso +magazinish +magaziny +maggoty +magical +magisterial +magistral +magmatic +magnanimous +magnesial +magnesian +magnesic +magnetic +magnetographic +magnetohydrodynamic +magnetometric +magnetomotive +magnetooptic +magnetostrictive +magnific +magnificent +magniloquent +magnipotence +magnipotent +magnisonant +magnitudinous +magnoliaceous +maidenish +maidenly +maieutic +maigre +mailable +mailed +mailless +main +maintainable +mair +majestic +majuscular +makable +makeless +makeshift +malaceous +malacoid +malacological +malacophilous +malacophyllous +malacopterygian +malacotic +maladapted +maladaptive +maladjusted +maladroit +malapert +malapportioned +malapropos +malar +malarial +malarian +malarious +malcontent +male +maledictive +maledictory +maleficent +malevolent +malicious +malign +malignant +malimprinted +malleable +malnourished +malodorous +malonic +malonyl +malpighiaceous +malty +malvaceous +malvasian +mammalogical +mammary +mammiferous +mammillary +mammillate +mammonistic +manageable +managemental +managerial +managing +manasic +manatoid +mandatory +mandibular +mandibulate +manducable +manducatory +maned +maneless +maneuverable +manful +manganic +manganous +mangey +mangier +mangiest +mangy +maniacal +manic +manifest +manifestative +manifold +maniform +manipulable +manipular +manipulatable +manistic +manky +manned +mannered +manneristic +mannerless +mannerly +manometric +manometrical +manorial +manqua +mantic +mantric +manual +manubrial +manufacturable +manufactural +manuscriptal +maplelike +mappable +marauding +marcescent +mardy +margaric +margaritaceous +marginal +margravial +marigraphic +marine +marish +marital +maritime +marked +marketable +marketwise +marlacious +marled +marlitic +marly +marmoreal +marriageable +married +marrowish +marshier +marshiest +marshlike +marshy +martela +martensitic +martial +martyrish +martyrologic +martyrological +marvellous +marvelous +masculine +masked +masklike +masochistic +masonic +massier +massiest +massive +massless +massy +masterful +masterless +masterly +masticable +masticatory +mastitic +mastless +mastlike +mastoid +mastoparietal +masturbatic +masturbational +masturbatory +matchable +matchless +matelass +maternal +maternalistic +matey +mathematical +matin +matless +matriarchal +matriarchic +matrilateral +matrilineal +matrilocal +matrimonial +matripotestal +matroclinous +matronal +matronly +matronymic +matt +matted +matterful +matterless +mattery +maturative +mature +matutinal +maudlin +maungy +mausolean +mawger +mawkish +maxi +maxillary +maxillipedary +maximal +mayan +mayoral +mazelike +mazier +maziest +mazy +meadowless +meager +meagre +mealier +mealiest +mealless +mealy +meandrous +meaningful +meaningless +meanspirited +measled +measlier +measliest +measly +measurable +measured +measureless +meatal +meatier +meatiest +meaty +mechanical +mechanismic +mechanistic +mechanomorphic +medallic +meddlesome +mediaeval +medial +median +mediastinal +mediative +mediatorial +medicable +medical +medicamental +medicamentous +medicinable +medicinal +medicochirurgical +medicolegal +medieval +mediocre +mediocris +medium +medullary +medullated +medusoid +meek +megacephalic +megadont +megalecithal +megalithic +megalomaniacal +megalopolitan +megaphonic +megascopic +megasporic +megathermal +megathermic +meiotic +melancholic +melanic +melaniferous +melanistic +melanitic +melanoid +melanospermous +melanous +meliaceous +melic +meliorable +meliorative +melioristic +melismatic +melliferous +mellifluent +mellifluous +mellow +melodic +melodious +melodramatic +melodyless +meltable +memberless +membraneless +membranophonic +membranous +memorable +memorial +memoried +memorizable +menadic +menarcheal +menarchial +mendable +mendicant +menial +meningeal +meningitic +meningococcal +meningococcic +meniscoid +menispermaceous +menopausal +menopausic +menorrhagic +mensal +menseful +menseless +menshevist +menstrual +mensurable +mensural +mental +mentalistic +menthaceous +mentholated +mentionable +mephitic +mercantile +mercapto +mercenary +merchantable +merchantlike +merciful +merciless +mercurial +mercuric +merdivorous +mere +merest +meretricious +meridional +meristematic +meristic +merited +meritless +meritorious +meroblastic +merocrine +merrier +merriest +merry +mesarch +mesencephalic +mesenteric +mesenteronic +meshuga +mesial +mesic +mesne +mesoappendiceal +mesoblastic +mesocephalic +mesocranic +mesocratic +mesodermal +mesodermic +mesodont +mesogastric +mesogleal +mesogloeal +mesognathous +mesolecithal +mesometeorological +mesomorphic +mesonephric +mesophile +mesophilic +mesophytic +mesorrhine +mesothelial +mesothoracic +messianic +messier +messiest +messy +meta +metabiotic +metabolic +metabolous +metacarpal +metachromatic +metachronal +metagalactic +metagenic +metagnathous +metainfective +metaleptic +metaleptical +metalinguistic +metalled +metallic +metalliferous +metalline +metallographic +metallographical +metamathematical +metameric +metamorphic +metamorphous +metaphoric +metaphorical +metaphrastic +metaphrastical +metaphysical +metaphytic +metapneustic +metapsychological +metastable +metastatic +metatarsal +metatherian +metathetic +metathetical +metathoracic +metatrophic +metazoal +metazoic +metempirical +metempsychic +metempsychosic +metempsychosical +metencephalic +meteoric +meteoritic +meteorlike +meteorographic +meteorological +meteoropathologic +methenyl +methodical +methoxy +methylic +methylidyne +meticulous +metonymical +metopic +metric +metrical +metrizable +metrological +metronomical +metronymic +metropolitan +metrorrhagic +mettled +mettlesome +meuni +meuniare +miasmal +miasmatic +miasmatical +miasmic +micellar +mickle +microanalytic +microanalytical +microbeless +microbial +microbian +microbic +microbicidal +microbiologic +microbiological +microchemical +microclimatic +microclimatologic +microclimatological +micrococcal +micrococcic +microcosmic +microcosmical +microcrystalline +microdont +microelectronic +microelectrophoretic +microenvironmental +microglial +micrographic +microlecithal +micrologic +micrological +micrometric +micrometrical +microminiature +micronemous +micronucleate +micropaleontologic +micropaleontological +microparasitic +microphotographic +microphysical +microphytic +microporous +microptic +microscopic +microseismic +microseismical +microspectrophotometric +microsporic +microstomatous +microstylous +microthermic +microtonal +mid +middle +middlemost +middling +midi +midmost +midnightly +midrashic +midship +midsummery +midway +midweekly +midwinterly +midwintry +miffed +miffier +miffiest +miffy +mightier +mightiest +mighty +mignon +migrainoid +migrainous +migrational +migrative +migratory +milanaise +mild +mildewproof +mildewy +miliary +militant +military +milkier +milkiest +milkless +milksopping +milksoppy +milky +milled +millefleur +millenarian +millennial +millesimal +milliary +millifold +mim +mimetic +mimical +mimosaceous +minable +minacious +minareted +minatory +mincing +minded +mindful +mindless +mineable +mineralogic +mineralogical +mingy +minhagic +mini +minimal +minimus +miniskirted +ministerial +ministrant +ministrative +minor +minuscular +minutial +minxish +miotic +miracidial +miraculous +mirier +miriest +mirkier +mirkiest +mirky +mirrorlike +mirthful +mirthless +miry +misaccused +misadjudicated +misadjusted +misanalyzed +misappended +misapplied +misapprehensive +misbegotten +misbuttoned +miscegenetic +miscellaneous +mischievous +miscible +miscreated +miscreative +miscultivated +misdiagrammed +misdictated +miserable +miserly +misexplained +misfashioned +misfeatured +misfocused +misformed +misguided +misinformative +misinterpretable +misitemized +misleading +misogamic +misogynic +misogynistic +misogynous +mispackaged +mispacked +misprincipled +misproud +mispublicized +mispublished +misrepresentative +misrhymed +misshapen +missing +mistakable +mistaken +mistier +mistiest +mistilled +mistrustful +misty +mistyped +misunderstood +mitered +mithridatic +mitigable +mitigative +mitigatory +mitochondrial +mitotic +mitrailleur +mitral +mittenlike +mixable +mixed +mixible +mixolydian +mnemic +mnemonic +moanful +mobbish +mobile +mobilisable +mobilizable +mobocratic +mobocratical +mod +modal +moderate +moderatorial +modern +moderne +modernistic +modest +modifiable +modiolar +modish +modular +moier +moiest +moir +moira +moist +moistful +moistless +moitier +moitiest +moity +molal +moldable +moldy +molecular +moline +mollescent +mollifiable +molluscoid +molluscous +mollusklike +molten +molybdenous +molybdic +molybdous +momentary +momentous +monachal +monachist +monacid +monacidic +monadelphous +monadistic +monandrous +monanthous +monarchal +monarchical +monarchistic +monasterial +monastic +monatomic +monaural +monaxial +mondial +monecious +monetary +moneyed +moneyless +mongolian +mongoloid +monic +monied +monilial +moniliform +monistic +monistical +monitorial +monitory +monkeyish +monkish +mono +monoacid +monoatomic +monobasic +monoblastic +monocable +monocarpellary +monocarpic +monocarpous +monochasial +monochromatic +monochromic +monochromical +monocled +monoclinal +monoclinic +monoclinous +monocotyledonous +monocular +monocultural +monocyclic +monodic +monodimetric +monodomous +monodramatic +monoecious +monogamic +monogamistic +monogamous +monogenetic +monogenic +monogenistic +monogenous +monogrammatic +monogrammatical +monogrammic +monographic +monographical +monogynoecial +monohydrated +monohydric +monohydroxy +monoicous +monolatrous +monolingual +monolithic +monologic +monological +monomaniacal +monomeric +monomerous +monometallic +monometric +monometrical +monomolecular +monomorphic +mononuclear +monopetalous +monophagous +monophonic +monophthongal +monophyletic +monophyllous +monoplegic +monoploid +monopodial +monopodic +monopolistic +monopoloid +monoprotic +monorhinous +monosepalous +monosodium +monosomic +monospermous +monostichic +monostichous +monostome +monostrophic +monostylous +monosyllabic +monosymmetric +monotheistic +monotheistical +monotonal +monotonic +monotonous +monotrichate +monotrichous +monotriglyphic +monotropic +monotypic +monovalent +monozygotic +monsoonal +monstrous +montane +monthly +monticulate +monticulous +montmorillonitic +monumental +monumentless +mony +monzonitic +moodier +moodiest +moody +mooned +moonish +moonless +moonlit +moonshiny +moonstruck +moony +moory +moot +mopey +mopier +mopiest +mopy +moraceous +morainal +morainic +moral +moralistic +moralless +morbid +morbific +mordacious +mordant +moreish +morganatic +morganic +moribund +morish +mornay +moronic +morose +morphemic +morphogenetic +morphogenic +morphologic +morphological +morphonemic +morphotic +morphotonemic +mortal +mortarless +mortary +mortiferous +moschate +mossier +mossiest +mossy +motey +motherless +motherly +mothier +mothiest +mothproof +mothy +motile +motional +motionless +motivational +motivative +motiveless +motley +motorable +mottled +mouill +mouilla +mouldier +mouldiest +mouldy +mountainless +mountainous +mounted +mournful +mouselike +mousey +mousier +mousiest +mousy +mouthier +mouthiest +mouthless +mouthwatering +mouthy +moutonnae +movable +moveable +moveless +moving +mowburnt +mucic +mucid +muciferous +mucigenous +mucilaginous +mucilaginously +muciparous +muckerish +muckier +muckiest +mucking +muckle +mucky +mucoid +mucopurulent +mucosal +mucous +mucronate +muddier +muddiest +muddleheaded +muddy +mudfat +muggier +muggiest +muggy +mugwumpian +mugwumpish +muley +mulish +mulley +mullocky +multangular +multiangular +multiareolate +multiarticular +multiarticulate +multiarticulated +multiaxial +multibladed +multibranched +multibranchiate +multicapitate +multicapsular +multicarinate +multicarinated +multicellular +multicentral +multicentric +multichanneled +multichannelled +multiciliate +multiciliated +multicircuited +multicoil +multicolored +multiconductor +multicordate +multicorneal +multicostate +multicrystalline +multicuspidate +multicuspidated +multidentate +multidenticulate +multidenticulated +multidigitate +multidimensional +multidirectional +multidisciplinary +multiengined +multifaced +multifaceted +multifactorial +multifamilial +multifarious +multifibered +multifibrous +multifid +multifistular +multifistulous +multiflagellate +multiflagellated +multiflorous +multifocal +multifold +multifoliate +multiform +multifurcate +multiganglionic +multigranular +multigranulated +multigyrate +multihued +multijugate +multilaciniate +multilamellar +multilamellate +multilaminar +multilaminate +multilaminated +multilateral +multilayer +multilighted +multilineal +multilinear +multilingual +multilobar +multilobate +multilobed +multilobular +multimacular +multimedial +multimetallic +multimolecular +multimotored +multinational +multinervate +multinodal +multinodous +multinodular +multinominal +multinuclear +multinucleate +multinucleolar +multinucleolate +multinucleolated +multiovular +multiovulate +multiovulated +multiparous +multipartite +multiped +multiperforate +multiperforated +multipersonal +multiphase +multiphasic +multipinnate +multiplated +multiple +multiplicate +multiplicational +multiplicative +multipointed +multipolar +multiported +multipurpose +multiracial +multiradial +multiradiate +multiradiated +multiradical +multiramified +multiramose +multiramous +multirole +multirooted +multisaccate +multisacculate +multisacculated +multiscreen +multisegmental +multisegmented +multiseptate +multiseriate +multisonic +multisonorous +multisonous +multispeed +multispermous +multispicular +multispiculate +multispindled +multispinous +multispiral +multispired +multistage +multistaminate +multistorey +multistory +multistratified +multistriate +multisulcate +multisulcated +multitentacled +multitentaculate +multithreaded +multititular +multitoed +multitoned +multitube +multituberculate +multitubular +multitudinous +multivalent +multivalued +multivalve +multivalvular +multivane +multivariate +multiview +multiviewing +multivocal +multivoiced +multivoltine +multivolume +mumchance +mundane +municipal +munificent +murderous +muriatic +muricate +murine +murky +murmurless +murmurous +murrey +murrhine +musaceous +muscicolous +musclebound +muscleless +muscly +muscular +museful +mushier +mushiest +mushroomlike +mushroomy +mushy +musical +musicianly +musicological +muskier +muskiest +musky +mussier +mussiest +mustached +mustachioed +musteline +mustier +mustiest +musty +mutable +mutagenetic +mutagenic +mutational +mute +muticous +mutilative +mutilatory +mutinous +muttonheaded +muttony +mutual +mutular +muzzleloading +muzzy +myalgic +myasthenic +mycelial +mycologic +mycological +mycostatic +mydriatic +myelinated +myelinic +myelographic +myeloid +mylohyoid +myocardial +myoclonic +myogenic +myographic +myologic +myological +myologisral +myopathic +myopic +myotic +myriad +myrmecological +myrmecophagous +myrmecophilous +myrtaceous +mystagogic +mystagogical +mysterious +mystical +mythical +mythoclastic +mythological +mythopoeic +myxoid +nabobical +nabobish +nacred +nacreous +nadiral +naevoid +naggier +naggiest +nagging +naggish +naggy +naiant +naif +nailless +naillike +naissant +naive +naked +nameless +nanoid +naphthalic +naphthous +napiform +napless +nappier +nappiest +narcissistic +narcistic +narcoleptic +narcomaniacal +narcomatous +narcose +nardine +narial +narratable +narrow +narthecal +nasal +nascent +nasial +nasofrontal +nasolacrimal +nasological +nasopalatine +nasopharyngeal +nastier +nastiest +nasty +natal +natant +natational +natatorial +natatory +national +nationwide +native +nativistic +nattier +nattiest +natty +natural +naturalistic +naturelike +naturopathic +naughtier +naughtiest +naughty +nauplial +naupliform +nauplioid +nauseating +nauseous +nautical +naval +navicular +navigable +navigational +neap +neaped +nearby +neat +nebulated +nebule +nebulose +nebulosus +nebulous +nebuly +necessary +necessitative +necessitous +neckless +necklike +necktieless +necrologic +necrological +necromantic +necromantical +necrophiliac +necrophilic +necrophobic +necropolitan +necrotic +necrotomic +nectareous +nectariferous +nectarous +nee +needful +needier +neediest +needlelike +needless +needy +nefarious +negational +negative +neglectful +negligent +negligible +negotiable +neighborless +neighborly +neighbourless +neighbourly +nektonic +nelumbian +nemathecial +nematic +nematocystic +nematological +nemoricole +neoanthropic +neocolonial +neoformative +neologic +neological +neologistic +neologistical +neonatal +neoorthodox +neophytic +neoplastic +neotenous +neoteric +neourthodox +nepenthean +nephelinitic +nephological +nephralgic +nephric +nephridial +nephritic +nephrogenous +nephrolithic +nephropathic +nephrostomial +nephrostomous +nephrotic +nephrotoxic +nepotic +nepotistic +nepotistical +neritic +nerval +nervate +nerveless +nervine +nervous +nervy +nescient +nesh +nestable +nested +nestlike +nesty +nether +netherward +netlike +nett +nettable +nettlelike +nettlesome +nettly +neumatic +neumic +neural +neurasthenic +neurilemmal +neurilemmatic +neuritic +neuroanatomic +neuroanatomical +neuroblastic +neurocelian +neurocoelian +neurogenic +neurogliac +neuroglial +neurogliar +neuroglic +neurogrammic +neurolytic +neuromastic +neuromatous +neuromuscular +neuronic +neuropathic +neurophysiologic +neurophysiological +neuroplasmatic +neuroplasmic +neuropsychiatric +neuropterous +neurosurgical +neurotic +neurotrophic +neurotropic +neurovascular +neustic +neustonic +neuter +neutral +nevoid +new +newborn +newfangled +newish +newsier +newsiest +newsless +newspaperish +newsworthy +newsy +next +niblike +nice +nicer +nicest +nickelic +nickeliferous +nickelous +nicotined +nicotineless +nicotinic +nictitant +nidicolous +nidificational +nidifugous +niftier +nifties +niftiest +nifty +niggardly +niggling +nigh +nightcapped +nightless +nightlong +nightly +nightmarish +nightwalking +nigrescent +nigritudinous +nihilistic +nimble +nimbused +nincompoopish +ninefold +nineteenth +ninetieth +ninnyish +ninth +niobic +niobous +nipping +nippleless +nippy +nirvanic +nisi +nitid +nitramino +nitric +nitrifiable +nitro +nitrocellulosic +nitrogenous +nitrolic +nitrosylsulfuric +nitrous +nittier +nittiest +nitty +nival +niveous +nobbier +nobbiest +nobby +nobiliary +noble +nobler +noblest +nocent +nociceptive +noctambulous +noctilucan +noctilucent +noctis +nocturnal +nocuous +nodal +nodical +nodose +nodous +nodular +noegenetic +noetic +noily +noir +noiseless +noisette +noisier +noisiest +noisome +noisy +nomadic +nomenclatorial +nomenclatural +nominal +nominalistic +nominative +nomistic +nomographic +nomographical +nomological +nomothetic +nonabdicative +nonabiding +nonabjuratory +nonabortive +nonabrasive +nonabridgable +nonabrogable +nonabsolute +nonabsolutistic +nonabsorbable +nonabsorbent +nonabsorbing +nonabsorptive +nonabstaining +nonabstemious +nonabstract +nonabstracted +nonabusive +nonacademic +nonacademical +nonacceding +nonaccelerative +nonacceleratory +nonaccented +nonaccenting +nonaccentual +nonacceptant +nonaccessory +nonaccidental +nonaccommodable +nonaccommodating +nonaccompanying +nonaccordant +nonaccredited +nonaccretive +nonaccrued +nonaccruing +nonacculturated +nonaccumulating +nonaccumulative +nonaccusing +nonacidic +nonacoustic +nonacoustical +nonacquiescent +nonacquiescing +nonacquisitive +nonactinic +nonactionable +nonactive +nonactual +nonaculeate +nonaculeated +nonacute +nonadaptable +nonadaptational +nonadapting +nonadaptive +nonaddicted +nonaddicting +nonaddictive +nonadept +nonadherent +nonadhering +nonadhesive +nonadjacent +nonadjectival +nonadjoining +nonadjudicated +nonadjudicative +nonadjunctive +nonadjustable +nonadministrable +nonadministrant +nonadministrative +nonadmissible +nonadmissive +nonadmitted +nonadoptable +nonadorning +nonadult +nonadvantageous +nonadventitious +nonadventurous +nonadverbial +nonaerated +nonaerating +nonaesthetic +nonaesthetical +nonaffecting +nonaffective +nonaffiliated +nonaffiliating +nonaffinitive +nonagglomerative +nonagglutinant +nonagglutinating +nonagglutinative +nonaggressive +nonagrarian +nonagricultural +nonalcoholic +nonalgebraic +nonalgebraical +nonalienating +nonalignable +nonaligned +nonalined +nonalkaloidal +nonallegiance +nonallegoric +nonallegorical +nonallelic +nonallergenic +nonalliterated +nonalliterative +nonalluvial +nonalphabetic +nonalphabetical +nonalternating +nonaltruistic +nonambitious +nonambulatory +nonamenable +nonamendable +nonamorous +nonamphibian +nonamphibious +nonanachronistic +nonanachronous +nonanaemic +nonanalogic +nonanalogical +nonanalogous +nonanalytic +nonanalytical +nonanalyzable +nonanalyzed +nonanarchic +nonanarchical +nonanarchistic +nonanatomic +nonanatomical +nonancestral +nonanemic +nonanesthetic +nonanesthetized +nonangelic +nonangling +nonanguished +nonanimate +nonanimated +nonanimating +nonannexable +nonannihilable +nonantagonistic +nonanticipative +nonanticipatory +nonaphasic +nonaphetic +nonaphoristic +nonapologetic +nonapologetical +nonapostolic +nonapostolical +nonapparent +nonapparitional +nonappealable +nonappealing +nonappeasable +nonappeasing +nonappellate +nonappendant +nonappendent +nonappendicular +nonapplicable +nonapplicative +nonapplicatory +nonappointive +nonapportionable +nonapposable +nonappreciative +nonapprehensible +nonapprehensive +nonapproachable +nonappropriable +nonappropriative +nonaquatic +nonaqueous +nonarbitrable +nonarbitrary +nonarchitectonic +nonarchitectural +nonargentiferous +nonarguable +nonargumentative +nonaristocratic +nonaristocratical +nonarithmetic +nonarithmetical +nonarmigerous +nonaromatic +nonarresting +nonarsenic +nonarsenical +nonarterial +nonarticulate +nonarticulative +nonartistic +nonartistical +nonary +nonasbestine +nonascendant +nonascendent +nonascertainable +nonascetical +nonaseptic +nonaspirated +nonaspirating +nonaspiratory +nonaspiring +nonassenting +nonassertive +nonassignable +nonassigned +nonassimilable +nonassimilating +nonassimilative +nonassimilatory +nonassociable +nonassociational +nonassociative +nonassonant +nonassumed +nonassumptive +nonasthmatic +nonastral +nonastringent +nonastronomic +nonastronomical +nonatheistic +nonatheistical +nonathletic +nonatmospheric +nonatmospherical +nonatomic +nonatomical +nonatrophic +nonatrophied +nonattacking +nonattainable +nonattributive +nonaudible +nonaugmentative +nonauricular +nonauriferous +nonauthentic +nonauthentical +nonauthenticated +nonauthoritative +nonautobiographical +nonautomated +nonautomatic +nonautomotive +nonautonomous +nonavoidable +nonaxiomatic +nonaxiomatical +nonbacterial +nonbailable +nonbankable +nonbarbarian +nonbarbaric +nonbarbarous +nonbaronial +nonbasic +nonbathing +nonbearded +nonbearing +nonbeatific +nonbelieving +nonbelligerent +nonbending +nonbeneficed +nonbeneficent +nonbeneficial +nonbenevolent +nonbiased +nonbibulous +nonbigoted +nonbilabiate +nonbilious +nonbillable +nonbinding +nonbiographical +nonbiological +nonbiting +nonbitter +nonbituminous +nonblamable +nonblameful +nonblasphemous +nonbleeding +nonblended +nonblending +nonblinding +nonblockaded +nonblocking +nonblooming +nonblundering +nonboasting +nonbodily +nonboding +nonboiling +nonbookish +nonborrowing +nonbotanic +nonbotanical +nonbranded +nonbreaching +nonbreakable +nonbreeding +nonbristled +nonbromidic +nonbrooding +nonbrowsing +nonbrutal +nonbudding +nonbulbaceous +nonbulbar +nonbulbiferous +nonbulbous +nonbuoyant +nonburdensome +nonbureaucratic +nonburnable +nonburning +nonbursting +nonbusiness +nonbusy +nonbuttressed +nonbuying +noncadenced +noncadent +noncaffeinic +noncaking +noncalcareous +noncalcified +noncalculable +noncalculating +noncalculative +noncaloric +noncalumniating +noncalumnious +noncancelable +noncancerous +noncandescent +noncannibalistic +noncapillary +noncapital +noncapitalistic +noncapitalized +noncapricious +noncapsizable +noncaptious +noncarbolic +noncarbonated +noncarnivorous +noncartelized +noncash +noncastigating +noncasuistic +noncasuistical +noncataclysmal +noncataclysmic +noncatalytic +noncatarrhal +noncatastrophic +noncatechistic +noncatechistical +noncategorical +noncathartic +noncathartical +noncausable +noncausal +noncausative +noncaustic +noncelestial +noncellular +noncellulous +noncensored +noncensorious +noncensurable +noncentral +noncereal +noncerebral +nonceremonial +nonceremonious +noncertified +nonchafing +nonchalant +nonchalky +nonchallenging +nonchangeable +nonchanneled +nonchannelized +nonchaotic +noncharacteristic +noncharacterized +nonchargeable +noncharismatic +noncharitable +nonchemical +nonchimeric +nonchimerical +nonchivalric +nonchivalrous +noncholeric +nonchromatic +nonchromosomal +nonchronic +nonchronical +nonchurched +nonchurchgoing +nonciliate +nonciliated +noncircuited +noncircuitous +noncircular +noncirculating +noncirculatory +noncircumscribed +noncircumscriptive +noncircumspect +noncircumstantial +noncircumvallated +noncitable +nonciteable +noncivilizable +noncivilized +nonclaimable +nonclamorous +nonclarifiable +nonclarified +nonclassic +nonclassical +nonclassifiable +nonclassified +nonclastic +noncleistogamic +noncleistogamous +nonclerical +nonclimactic +nonclimactical +nonclimbable +nonclimbing +nonclinging +nonclinical +noncloistered +nonclose +nonclotting +noncoagulable +noncoagulating +noncoagulative +noncoalescent +noncoalescing +noncodified +noncoercible +noncoercive +noncogent +noncognate +noncognitive +noncognizable +noncognizant +noncoherent +noncohesive +noncoincident +noncoincidental +noncollapsable +noncollapsible +noncollectable +noncollectible +noncollective +noncollectivistic +noncollinear +noncolloidal +noncollusive +noncolonial +noncolorable +noncoloring +noncombat +noncombinative +noncombining +noncombustible +noncombustive +noncomic +noncomical +noncommemorational +noncommemorative +noncommemoratory +noncommendable +noncommendatory +noncommercial +noncommiserative +noncommissioned +noncommittal +noncommodious +noncommunal +noncommunicating +noncommunicative +noncommunistic +noncommunistical +noncommutative +noncompensating +noncompensative +noncompensatory +noncompetent +noncompeting +noncompetitive +noncomplacent +noncomplaisant +noncomplying +noncomposite +noncompoundable +noncomprehendible +noncomprehending +noncomprehensible +noncomprehensive +noncompressible +noncompressive +noncompromised +noncompromising +noncompulsive +noncompulsory +nonconcentrated +nonconcentrative +nonconcentric +nonconcentrical +nonconceptual +nonconcessive +nonconciliating +nonconciliatory +nonconcluding +nonconclusive +nonconcurrent +noncondensable +noncondensed +noncondensible +noncondensing +noncondescending +noncondimental +nonconditional +nonconditioned +nonconducive +nonconductible +nonconducting +nonconductive +nonconfederate +nonconferrable +nonconfident +nonconfidential +nonconfiding +nonconfined +nonconfining +nonconfirmative +nonconfirmatory +nonconfirming +nonconfiscable +nonconflicting +nonconflictive +noncongealing +noncongenital +noncongestive +noncongratulatory +noncongregative +noncongruent +noncongruous +nonconjecturable +nonconjugal +nonconjugate +nonconjunctive +nonconnective +nonconnotative +nonconnubial +nonconscientious +nonconscious +nonconscriptable +nonconsecutive +nonconsenting +nonconsequent +nonconsequential +nonconservational +nonconservative +nonconserving +nonconsistorial +nonconsolable +nonconsoling +nonconsorting +nonconspiratorial +nonconspiring +nonconstituent +nonconstituted +nonconstitutional +nonconstraining +nonconstricted +nonconstricting +nonconstrictive +nonconstruable +nonconstructive +nonconsular +nonconsultative +nonconsultatory +nonconsumable +nonconsuming +nonconsumptive +noncontagious +noncontaminable +noncontaminative +noncontemplative +noncontemporaneous +noncontemporary +noncontemptible +noncontemptuous +noncontending +noncontentious +nonconterminal +nonconterminous +noncontextual +noncontiguous +noncontinental +noncontingent +noncontinuable +noncontinuous +noncontradictory +noncontrastive +noncontributable +noncontributing +noncontributive +noncontributory +noncontrollable +noncontrolled +noncontrolling +noncontroversial +noncontumacious +nonconvective +nonconventional +nonconvergent +nonconverging +nonconversable +nonconversant +nonconversational +nonconvertible +nonconvivial +noncooperative +noncoordinating +noncoplanar +noncorporate +noncorporative +noncorporeal +noncorpuscular +noncorrective +noncorrelating +noncorrelative +noncorrelatively +noncorrespondent +noncorresponding +noncorroborating +noncorroborative +noncorroboratory +noncorrodible +noncorroding +noncorrosive +noncorrupt +noncorruptible +noncorruptive +noncortical +noncosmic +noncosmopolitan +noncotyledonal +noncotyledonary +noncotyledonous +noncounteractive +noncounterfeit +noncouperative +noncovetous +noncranking +noncreative +noncredent +noncredible +noncreditable +noncredulous +noncreeping +noncrenate +noncrenated +noncretaceous +noncriminal +noncrinoid +noncritical +noncriticizing +noncrucial +noncruciform +noncrusading +noncrustaceous +noncryptic +noncryptical +noncrystalline +noncrystallizable +noncrystallized +noncrystallizing +nonculminating +nonculpable +noncultivable +noncultivatable +noncultivated +noncultural +noncultured +noncumbrous +noncumulative +noncurative +noncurdling +noncurious +noncurrent +noncursive +noncurtailing +noncuspidate +noncuspidated +noncustodial +noncustomary +noncutting +noncyclic +noncyclical +nondamageable +nondamaging +nondangerous +nondark +nondatival +nondeadly +nondeaf +nondeafened +nondeafening +nondebatable +nondebating +nondebilitating +nondebilitative +nondecadent +nondecalcified +nondecasyllabic +nondecayed +nondecaying +nondeceivable +nondeceiving +nondeceptive +nondeciduous +nondecisive +nondeclamatory +nondeclarative +nondeclaratory +nondeclivitous +nondecorated +nondecorative +nondecorous +nondedicative +nondedicatory +nondeducible +nondeductible +nondeductive +nondeep +nondefamatory +nondefaulting +nondefeasible +nondefecting +nondefective +nondefensible +nondefensive +nondeferable +nondeferent +nondeferential +nondeferrable +nondefiant +nondeficient +nondefiling +nondefinable +nondefined +nondefining +nondefinite +nondefinitive +nondeflationary +nondeflected +nondeflective +nondeformed +nondefunct +nondegenerate +nondegenerative +nondegrading +nondehiscent +nondeistic +nondeistical +nondeleterious +nondeliberate +nondelicate +nondelineative +nondelinquent +nondeliquescent +nondelirious +nondeluded +nondeluding +nondelusive +nondemanding +nondemocratic +nondemocratical +nondemonstrable +nondemonstrative +nondendroid +nondendroidal +nondenominational +nondenotative +nondenunciating +nondenunciative +nondenunciatory +nondeodorizing +nondepartmental +nondependable +nondepletive +nondepletory +nondeported +nondepraved +nondeprecating +nondeprecative +nondeprecatory +nondepreciating +nondepreciative +nondepreciatory +nondepressed +nondepressing +nondepressive +nondeprivable +nonderelict +nonderisible +nonderisive +nonderivable +nonderivative +nonderogative +nonderogatory +nondescribable +nondescript +nondescriptive +nondesignate +nondesignative +nondesigned +nondesirous +nondesisting +nondespotic +nondestructive +nondesulfurized +nondetachable +nondetailed +nondeterminable +nondeterminative +nondeterministic +nondeterrent +nondetonating +nondetractive +nondetractory +nondetrimental +nondevelopable +nondeveloping +nondevelopmental +nondeviant +nondeviating +nondevious +nondevotional +nondevout +nondexterous +nondextrous +nondiabetic +nondiabolic +nondiabolical +nondiagonal +nondiagrammatic +nondiagrammatical +nondialectal +nondialectic +nondialectical +nondialyzing +nondiametral +nondiaphanous +nondiastasic +nondiastatic +nondiathermanous +nondichogamic +nondichogamous +nondichotomous +nondictatorial +nondidactic +nondietetic +nondieting +nondifferentiable +nondifficult +nondiffident +nondiffractive +nondiffuse +nondiffused +nondiffusible +nondiffusing +nondigestible +nondigesting +nondigestive +nondilapidated +nondilatable +nondiligent +nondimensioned +nondiminishing +nondiocesan +nondiphtherial +nondiphtheric +nondiphtheritic +nondiphthongal +nondiplomatic +nondipterous +nondirectional +nondirective +nondirigible +nondisappearing +nondisastrous +nondisbursable +nondisbursed +nondiscerning +nondischarging +nondisciplinable +nondisciplinary +nondisciplined +nondisciplining +nondiscordant +nondiscountable +nondiscoverable +nondiscretionary +nondiscriminating +nondiscriminative +nondiscriminatory +nondiscursive +nondiseased +nondisfranchised +nondisguised +nondisingenuous +nondisintegrating +nondisinterested +nondisjunctive +nondisparaging +nondisparate +nondispensable +nondispensational +nondispensible +nondispersive +nondisposable +nondisposed +nondisputatious +nondisqualifying +nondisrupting +nondisruptive +nondissenting +nondissident +nondissipated +nondissipative +nondissolving +nondistillable +nondistinctive +nondistinguishable +nondistinguished +nondistinguishing +nondistorted +nondistorting +nondistortive +nondistracted +nondistracting +nondistractive +nondistributional +nondistributive +nondisturbing +nondivergent +nondiverging +nondivisible +nondivisional +nondivisive +nondivorced +nondivulging +nondoctrinaire +nondoctrinal +nondocumental +nondocumentary +nondogmatic +nondogmatical +nondomestic +nondomesticated +nondomesticating +nondominant +nondominating +nondomineering +nondormant +nondoubtable +nondoubting +nondramatic +nondrinkable +nondrinking +nondropsical +nondruidic +nondruidical +nondrying +nondualistic +nonductile +nonduplicating +nonduplicative +nondurable +nondutiable +nondynamic +nondynamical +nondynastic +nondynastical +nondyspeptic +nondyspeptical +noneager +nonearning +noneastern +noneatable +nonebullient +noneccentric +nonecclesiastic +nonecclesiastical +nonechoic +noneclectic +noneclipsed +noneclipsing +nonecliptic +nonecliptical +noneconomic +noneconomical +nonecstatic +nonecumenic +nonecumenical +nonedible +nonedified +noneditorial +noneducable +noneducated +noneducational +noneducative +noneducatory +noneffective +noneffervescent +noneffete +nonefficacious +nonefficient +noneffusive +nonegocentric +nonegoistic +nonegoistical +nonegotistic +nonegotistical +nonegregious +noneidetic +nonejaculatory +nonejecting +nonejective +nonelaborate +nonelaborating +nonelaborative +nonelastic +nonelective +nonelectric +nonelectrical +nonelectrified +nonelectrized +nonelectrolytic +noneleemosynary +nonelemental +nonelementary +nonelevating +nonelicited +noneligible +noneliminative +noneliminatory +nonelliptic +nonelliptical +noneloquent +nonelucidating +nonelucidative +nonelusive +nonemanant +nonemanating +nonemancipative +nonembellished +nonembellishing +nonembryonal +nonembryonic +nonemendable +nonemergent +nonemotional +nonemotive +nonempathic +nonempirical +nonemploying +nonempty +nonemulative +nonemulous +nonencyclopaedic +nonencyclopedic +nonencyclopedical +nonendemic +nonendurable +nonenduring +nonenergetic +nonenervating +nonenforceable +nonenforced +nonenforcing +nonengrossing +nonenigmatic +nonenigmatical +nonenlightened +nonenlightening +nonenrolled +nonentailed +nonenteric +nonenterprising +nonentertaining +nonenthusiastic +nonenticing +nonentomologic +nonentomological +nonentreating +nonenumerated +nonenumerative +nonenunciative +nonenunciatory +nonenviable +nonenvious +nonenvironmental +nonephemeral +nonepic +nonepical +nonepicurean +nonepigrammatic +nonepileptic +nonepiscopal +nonepiscopalian +nonepisodic +nonepisodical +nonepithelial +nonepochal +nonequable +nonequal +nonequalized +nonequalizing +nonequatorial +nonequestrian +nonequilateral +nonequitable +nonequivalent +nonequivocal +nonequivocating +noneradicable +noneradicative +nonerecting +noneroded +nonerodent +noneroding +nonerosive +nonerotic +nonerrant +nonerratic +nonerroneous +nonerudite +noneruptive +nonesoteric +nonessential +nonesthetic +nonesthetical +nonestimable +nonesurient +noneternal +nonethereal +nonethic +nonethical +nonethnic +nonethnical +nonethnologic +nonethnological +noneugenic +noneugenical +noneuphonious +nonevadable +nonevadible +nonevading +nonevanescent +nonevangelic +nonevangelical +nonevaporable +nonevaporating +nonevaporative +nonevasive +nonevident +nonevidential +nonevil +nonevincible +nonevincive +nonevocative +nonevolutional +nonevolutionary +nonevolving +nonexactable +nonexacting +nonexaggerated +nonexaggerating +nonexaggerative +nonexaggeratory +nonexcepted +nonexcepting +nonexceptional +nonexcessive +nonexchangeable +nonexcitable +nonexcitative +nonexcitatory +nonexciting +nonexclamatory +nonexclusive +nonexculpatory +nonexcusable +nonexecutable +nonexecutive +nonexemplary +nonexempt +nonexercisable +nonexertive +nonexhausted +nonexhaustible +nonexhaustive +nonexhibitionistic +nonexhibitive +nonexhortative +nonexhortatory +nonexigent +nonexistent +nonexistential +nonexisting +nonexotic +nonexpanded +nonexpanding +nonexpansible +nonexpansile +nonexpansive +nonexpectant +nonexpedient +nonexpediential +nonexpeditious +nonexpendable +nonexperienced +nonexperiential +nonexperimental +nonexpert +nonexpiable +nonexpiatory +nonexpiring +nonexplainable +nonexplanative +nonexplanatory +nonexplicable +nonexplicative +nonexplorative +nonexploratory +nonexplosive +nonexponential +nonexponible +nonexportable +nonexpressionistic +nonexpressive +nonexpulsive +nonextant +nonextended +nonextendible +nonextensible +nonextensile +nonextensional +nonextensive +nonextenuating +nonextenuative +nonexterminative +nonexterminatory +nonexternal +nonexternalized +nonextinct +nonextinguishable +nonextinguished +nonextortive +nonextractable +nonextracted +nonextractible +nonextractive +nonextraditable +nonextraneous +nonextricable +nonextrinsic +nonextrinsical +nonextrusive +nonexuding +nonexultant +nonfacetious +nonfactious +nonfactitious +nonfactual +nonfacultative +nonfallacious +nonfaltering +nonfamilial +nonfamiliar +nonfanatical +nonfarcical +nonfarm +nonfashionable +nonfastidious +nonfat +nonfatal +nonfatalistic +nonfatigable +nonfaulty +nonfavorable +nonfavored +nonfeasible +nonfeatured +nonfebrile +nonfecund +nonfederal +nonfederated +nonfeeble +nonfeeding +nonfeeling +nonfeldspathic +nonfelicitous +nonfelonious +nonfenestrated +nonfermentable +nonfermentative +nonfermented +nonfermenting +nonferocious +nonferrous +nonfertile +nonfervent +nonfervid +nonfestive +nonfeudal +nonfeverish +nonfeverous +nonfibrous +nonfictitious +nonfictive +nonfiduciary +nonfigurative +nonfilamentous +nonfilial +nonfilterable +nonfimbriate +nonfimbriated +nonfinancial +nonfinishing +nonfinite +nonfireproof +nonfiscal +nonfissile +nonfissionable +nonflagellate +nonflagellated +nonflagitious +nonflagrance +nonflagrant +nonflaky +nonflammable +nonflatulent +nonflawed +nonflexible +nonflirtatious +nonfloating +nonfloriferous +nonflowering +nonfluctuating +nonfluent +nonfluidic +nonfluorescent +nonflyable +nonflying +nonfollowing +nonforbearing +nonforeclosing +nonforeign +nonforensic +nonforested +nonforfeitable +nonforfeiting +nonforgiving +nonformal +nonformalistic +nonformative +nonformidable +nonforming +nonfortifiable +nonfortifying +nonfortuitous +nonfossiliferous +nonfouling +nonfragile +nonfragmented +nonfragrant +nonfrangible +nonfraternal +nonfraudulent +nonfreezable +nonfreezing +nonfrenetic +nonfrequent +nonfricative +nonfrigid +nonfrosted +nonfrosting +nonfrugal +nonfugitive +nonfulminating +nonfunctional +nonfunctioning +nonfundamental +nonfunded +nonfungible +nonfused +nonfusible +nonfutile +nonfuturistic +nongalactic +nongalvanized +nonganglionic +nongangrenous +nongarrulous +nongaseous +nongassy +nongelatinizing +nongelatinous +nongelling +nongenealogic +nongenealogical +nongeneralized +nongenerating +nongenerative +nongeneric +nongenerical +nongenetic +nongenetical +nongentile +nongenuine +nongeographic +nongeographical +nongeologic +nongeological +nongeometric +nongeometrical +nongermane +nongerminal +nongerminating +nongerminative +nongerundial +nongerundive +nongestic +nongestical +nongilded +nongilled +nonglacial +nonglandered +nonglandular +nonglandulous +nonglazed +nonglobular +nonglutenous +nongospel +nongovernmental +nongraceful +nongracious +nongraduated +nongrained +nongrammatical +nongranular +nongranulated +nongraphic +nongraphical +nongraphitic +nongratifying +nongratuitous +nongraven +nongravitational +nongravitative +nongreasy +nongreen +nongregarious +nongremial +nongrieved +nongrieving +nongrievous +nongrooming +nongrounded +nongrounding +nonguidable +nonguttural +nonhabitable +nonhabitual +nonhackneyed +nonhallucinated +nonhallucinatory +nonharmonic +nonharmonious +nonhazardous +nonhectic +nonhedonic +nonhedonistic +nonheinous +nonhematic +nonhemophilic +nonhepatic +nonhereditable +nonhereditary +nonheretical +nonheritable +nonheroic +nonheroical +nonhesitant +nonheuristic +nonhierarchic +nonhierarchical +nonhieratic +nonhieratical +nonhistoric +nonhistorical +nonhistrionic +nonhistrionical +nonhomiletic +nonhomogeneous +nonhomogenous +nonhomologous +nonhostile +nonhubristic +nonhuman +nonhumanistic +nonhumanized +nonhumorous +nonhunting +nonhydrated +nonhydraulic +nonhydrogenous +nonhydrophobic +nonhygrometric +nonhygroscopic +nonhyperbolic +nonhyperbolical +nonhypnotic +nonhypostatic +nonhypostatical +noniconoclastic +nonideal +nonidealistic +nonideational +nonidentical +nonideologic +nonideological +nonidiomatic +nonidiomatical +nonidolatrous +nonidyllic +nonigneous +nonignitable +nonignitible +nonignominious +nonignorant +nonillative +nonilluminating +nonilluminative +nonillusional +nonillusive +nonillustrative +nonimaginary +nonimaginational +nonimbricate +nonimbricated +nonimbricating +nonimbricative +nonimitable +nonimitating +nonimitational +nonimitative +nonimmanent +nonimmune +nonimmunized +nonimpacted +nonimpeachable +nonimpedimental +nonimpedimentary +nonimperative +nonimperial +nonimperialistic +nonimperious +nonimplemental +nonimplicative +nonimpregnated +nonimpressionable +nonimpressionistic +nonimpulsive +nonimputable +nonimputative +nonincandescent +nonincarnate +nonincarnated +nonincestuous +nonincidental +noninclinable +noninclinational +noninclinatory +noninclusive +nonincorporated +nonincorporative +nonincreasable +nonincreasing +nonincriminating +nonincriminatory +nonincrusting +nonindependent +nonindexed +nonindictable +nonindigenous +nonindividual +nonindividualistic +noninduced +noninducible +noninductive +nonindulgent +nonindurated +nonindurative +nonindustrial +nonindustrious +noninert +noninertial +noninfallible +noninfected +noninfecting +noninfectious +noninferable +noninferential +noninfinite +noninflammable +noninflammatory +noninflationary +noninflected +noninflectional +noninfluential +noninformational +noninformative +noninfusible +noninhabitable +noninherent +noninheritable +noninherited +noninhibitive +noninhibitory +noninitial +noninjurious +noninoculative +noninquiring +noninsistent +noninspissating +noninstinctive +noninstinctual +noninstitutional +noninstructional +noninstructive +noninstrumental +noninstrumentalistic +nonintegrable +nonintellectual +nonintelligent +noninteractive +nonintercepting +noninterceptive +noninterchangeable +noninterdependent +noninterfering +nonintermittent +noninternational +noninterpolating +noninterpolative +noninterpretable +noninterpretational +noninterpretative +noninterpretive +noninterrupted +noninterruptive +nonintersecting +nonintersectional +noninterventional +nonintoxicant +nonintoxicating +nonintoxicative +nonintrospective +nonintroversive +nonintroverted +nonintuitive +noninverted +noninvidious +noninvincible +noniodized +nonionic +nonionized +nonionizing +nonirate +nonirenic +nonirenical +noniridescent +nonironic +nonironical +nonirradiated +nonirrational +nonirrevocable +nonirrigable +nonirrigated +nonirrigating +nonirritable +nonirritant +nonirritating +nonisoelastic +nonisolable +nonisotropic +nonisotropous +nonissuable +nonjournalistic +nonjudicable +nonjudicative +nonjudicatory +nonjudiciable +nonjudicial +nonjuridic +nonjuridical +nonjuristic +nonjuristical +nonkinetic +nonknowledgeable +nonkosher +nonlabeling +nonlabelling +nonlacteal +nonlacteous +nonlactescent +nonlactic +nonlaminable +nonlaminated +nonlaminating +nonlaminative +nonlarcenous +nonlayered +nonlaying +nonleaded +nonleaking +nonlegal +nonlegato +nonlegislative +nonlegitimate +nonleguminous +nonlepidopteral +nonlepidopteran +nonlepidopterous +nonleprous +nonlethal +nonlethargic +nonlethargical +nonlevel +nonlevulose +nonliable +nonlibelous +nonliberal +nonlibidinous +nonlicensable +nonlicensed +nonlicentious +nonlicking +nonlimitative +nonlimiting +nonlineal +nonlinear +nonlinguistic +nonlinkage +nonliquefiable +nonliquefying +nonliquid +nonliquidating +nonlisting +nonliteral +nonliterary +nonlitigious +nonliturgic +nonliturgical +nonlive +nonliving +nonlixiviated +nonlocal +nonlocalizable +nonlocalized +nonlogical +nonlogistic +nonlogistical +nonlosable +nonloving +nonloxodromic +nonloxodromical +nonloyal +nonlubricating +nonlubricious +nonlucid +nonlucrative +nonlugubrious +nonlugubriously +nonluminescent +nonluminous +nonlustrous +nonlymphatic +nonlyric +nonlyrical +nonmagnetic +nonmagnetical +nonmagnetized +nonmakeup +nonmalarial +nonmalarian +nonmalarious +nonmalicious +nonmalignant +nonmalleable +nonmandatory +nonmanifest +nonmanipulative +nonmanipulatory +nonmannered +nonmanneristic +nonmanual +nonmanufactured +nonmarine +nonmarital +nonmaritime +nonmarketable +nonmarriageable +nonmarrying +nonmartial +nonmasculine +nonmaterialistic +nonmaternal +nonmathematic +nonmathematical +nonmatrimonial +nonmaturative +nonmature +nonmeasurable +nonmechanical +nonmechanistic +nonmediative +nonmedicable +nonmedical +nonmedicative +nonmedicinal +nonmeditative +nonmedullated +nonmelodic +nonmelodious +nonmelodramatic +nonmelting +nonmenacing +nonmendicant +nonmenial +nonmental +nonmercantile +nonmercenary +nonmetallic +nonmetalliferous +nonmetallurgic +nonmetallurgical +nonmetamorphic +nonmetamorphous +nonmetaphoric +nonmetaphorical +nonmetaphysical +nonmeteoric +nonmeteorologic +nonmeteorological +nonmethodic +nonmethodical +nonmetric +nonmetrical +nonmetropolitan +nonmicrobic +nonmicroscopic +nonmicroscopical +nonmigrant +nonmigrating +nonmigratory +nonmilitant +nonmimetic +nonmineralogical +nonminimal +nonministerial +nonmiraculous +nonmischievous +nonmiscible +nonmissionary +nonmitigative +nonmitigatory +nonmobile +nonmodal +nonmoderate +nonmodern +nonmodernistic +nonmodificative +nonmodificatory +nonmodifying +nonmolar +nonmolecular +nonmomentary +nonmonarchal +nonmonarchial +nonmonarchic +nonmonarchistic +nonmonastic +nonmonistic +nonmonogamous +nonmonopolistic +nonmoral +nonmortal +nonmotile +nonmotivated +nonmotivational +nonmotoring +nonmountainous +nonmoveable +nonmucilaginous +nonmucous +nonmulched +nonmultiple +nonmultiplicational +nonmultiplicative +nonmunicipal +nonmuscular +nonmusical +nonmutable +nonmutational +nonmutative +nonmutinous +nonmutual +nonmyopic +nonmystic +nonmystical +nonmythical +nonmythologic +nonmythological +nonnarcissistic +nonnarcotic +nonnarrative +nonnational +nonnationalistic +nonnative +nonnatty +nonnatural +nonnaturalistic +nonnautical +nonnaval +nonnavigable +nonnebular +nonnebulous +nonnecessitous +nonnegative +nonnegativistic +nonnegligent +nonnegligible +nonnegotiable +nonnephritic +nonnervous +nonnescient +nonneural +nonneurotic +nonneutral +nonnicotinic +nonnihilistic +nonnitric +nonnitrogenized +nonnitrogenous +nonnitrous +nonnocturnal +nonnomadic +nonnominalistic +nonnormal +nonnotable +nonnotational +nonnotional +nonnoumenal +nonnourishing +nonnutrient +nonnutritious +nonnutritive +nonobedient +nonobjective +nonobjectivistic +nonobligated +nonobligatory +nonobservable +nonobservant +nonobservational +nonobserving +nonobsessional +nonobsessive +nonobstetric +nonobstetrical +nonobstructive +nonobvious +nonoccidental +nonocclusive +nonoccult +nonocculting +nonoccupational +nonoccurrence +nonodoriferous +nonodorous +nonoecumenic +nonoecumenical +nonoffensive +nonofficial +nonofficinal +nonoily +nonolfactory +nonoligarchic +nonoligarchical +nonomissible +nononerous +nonoperable +nonoperatic +nonoperating +nonoperational +nonoperative +nonopinionated +nonopinionative +nonopposable +nonopposing +nonoppressive +nonopprobrious +nonoptic +nonoptical +nonoptimistic +nonoptimistical +nonoptional +nonoral +nonorchestral +nonordered +nonorganic +nonorientable +nonoriental +nonoriginal +nonornamental +nonorthodox +nonorthographic +nonorthographical +nonoscine +nonosmotic +nonostensible +nonostensive +nonoverlapping +nonowning +nonoxidating +nonoxidative +nonoxidizable +nonoxidizing +nonoxygenated +nonpacifiable +nonpacific +nonpacifical +nonpacificatory +nonpacifistic +nonpaganish +nonpaid +nonpalatable +nonpalatal +nonpalliative +nonpalpable +nonpantheistic +nonpantheistical +nonpapal +nonpapistic +nonpapistical +nonparabolic +nonparabolical +nonparadoxical +nonparallel +nonparalytic +nonparasitic +nonparasitical +nonpardoning +nonparental +nonparliamentary +nonparochial +nonparous +nonpartial +nonpartible +nonparticipating +nonpartisan +nonparty +nonpasserine +nonpassible +nonpassionate +nonpastoral +nonpatentable +nonpatented +nonpaternal +nonpathogenic +nonpathologic +nonpathological +nonpatriotic +nonpatterned +nonpaying +nonpeaked +nonpecuniary +nonpedagogic +nonpedagogical +nonpedigreed +nonpejorative +nonpelagic +nonpenal +nonpenalized +nonpendant +nonpendent +nonpending +nonpenetrable +nonpenetrating +nonpenitent +nonpensionable +nonperceivable +nonperceiving +nonperceptible +nonperceptional +nonperceptive +nonperceptual +nonpercipient +nonpercussive +nonperfected +nonperfectible +nonperforated +nonperforating +nonperforming +nonperilous +nonperiodic +nonperiodical +nonperishable +nonperishing +nonperjured +nonpermanent +nonpermeable +nonpermeative +nonpermissible +nonpermissive +nonpermitted +nonperpendicular +nonperpetual +nonpersecuting +nonpersecutive +nonpersecutory +nonperseverant +nonpersevering +nonpersistent +nonpersisting +nonpersonal +nonpersuadable +nonpersuasible +nonpersuasive +nonpertinent +nonperturbable +nonperturbing +nonperverse +nonperversive +nonperverted +nonpervertible +nonpessimistic +nonpestilent +nonpestilential +nonphagocytic +nonpharmaceutic +nonpharmaceutical +nonphenolic +nonphenomenal +nonphilanthropic +nonphilanthropical +nonphilologic +nonphilological +nonphilosophic +nonphilosophical +nonphobic +nonphonemic +nonphonetic +nonphonetical +nonphosphatic +nonphosphorous +nonphotographic +nonphotographical +nonphrenetic +nonphysical +nonphysiologic +nonphysiological +nonpictorial +nonpigmented +nonpinaceous +nonplacental +nonplanetary +nonplastic +nonplated +nonplatitudinous +nonplausible +nonpleadable +nonpleading +nonpliable +nonpliant +nonpluralistic +nonplutocratical +nonpneumatic +nonpoetic +nonpoisonous +nonpolarizable +nonpolarizing +nonpolemical +nonpolitical +nonponderable +nonponderous +nonpopular +nonpopulous +nonpornographic +nonporous +nonporphyritic +nonportable +nonportentous +nonportrayable +nonpositive +nonpositivistic +nonpossessed +nonpossessive +nonpossible +nonposthumous +nonpotable +nonpotential +nonpracticable +nonpractical +nonpracticed +nonpragmatic +nonpragmatical +nonpreaching +nonprecedent +nonprecedential +nonprecious +nonprecipitative +nonpredatory +nonpredicative +nonpredictable +nonpredictive +nonpreferable +nonpreferential +nonpreformed +nonpregnant +nonprehensile +nonprejudiced +nonprejudicial +nonprelatic +nonpreparative +nonpreparatory +nonprepositional +nonprescient +nonprescribed +nonprescriptive +nonpresentable +nonpresentational +nonpreservable +nonpreservative +nonpresidential +nonpressing +nonpresumptive +nonprevalent +nonpreventable +nonpreventible +nonpreventive +nonpriestly +nonprimitive +nonprincipled +nonprintable +nonprinting +nonprivileged +nonprobable +nonprobative +nonprobatory +nonproblematic +nonproblematical +nonprocessional +nonprocreative +nonprocurable +nonproducible +nonproducing +nonproductive +nonprofane +nonprofessed +nonprofessional +nonprofessorial +nonproficient +nonprofit +nonprofitable +nonprognosticative +nonprogressive +nonprohibitive +nonprohibitory +nonprojecting +nonprojective +nonproletarian +nonproliferous +nonprolific +nonprolix +nonprominent +nonpromiscuous +nonpromissory +nonpromotive +nonpropagable +nonpropagative +nonpropellent +nonprophetic +nonprophetical +nonpropitiable +nonpropitiative +nonproportionable +nonproportional +nonproportionate +nonproportioned +nonproprietary +nonprosaic +nonproscriptive +nonprosperous +nonprotecting +nonprotective +nonprotesting +nonprotractile +nonprotrusive +nonprotuberant +nonprovable +nonprovided +nonprovident +nonprovidential +nonprovincial +nonprovisional +nonprovisionary +nonprovocative +nonprudent +nonprudential +nonpsychiatric +nonpsychic +nonpsychical +nonpsychoanalytic +nonpsychoanalytical +nonpsychologic +nonpsychological +nonpsychopathic +nonpsychotic +nonpublic +nonpublishable +nonpuerile +nonpulmonary +nonpulsating +nonpulsative +nonpunctual +nonpunctuating +nonpuncturable +nonpungent +nonpunishable +nonpunishing +nonpunitive +nonpunitory +nonpurchasable +nonpurgative +nonpurgatorial +nonpurifying +nonpuristic +nonpurposive +nonpursuant +nonpurulent +nonputrescent +nonputrescible +nonpyogenic +nonqualifying +nonqualitative +nonquantitative +nonrabbinical +nonracial +nonradiant +nonradiating +nonradiative +nonradical +nonradioactive +nonraisable +nonraiseable +nonraised +nonrandom +nonranging +nonratable +nonrateable +nonrated +nonratifying +nonrational +nonrationalistic +nonrationalistical +nonrationalized +nonreactionary +nonreactive +nonreadable +nonrealistic +nonrealizable +nonrealizing +nonreasonable +nonreasoning +nonrebellious +nonrecalcitrant +nonreceivable +nonreceiving +nonreceptive +nonrecessive +nonrecipient +nonreciprocal +nonreciprocating +nonrecitative +nonreclaimable +nonreclusive +nonrecognized +nonrecoiling +nonrecollective +nonreconcilable +nonrecoverable +nonrectangular +nonrectifiable +nonrectified +nonrecuperative +nonrecuperatory +nonrecurent +nonrecurring +nonredeemable +nonredemptible +nonredemptive +nonredressing +nonreduced +nonreducible +nonreducing +nonreductional +nonreductive +nonrefillable +nonrefined +nonreflected +nonreflecting +nonreflective +nonreformational +nonrefracting +nonrefractional +nonrefractive +nonrefrigerant +nonrefueling +nonrefuelling +nonregenerate +nonregenerating +nonregenerative +nonregimental +nonregimented +nonregistered +nonregistrable +nonregressive +nonregulative +nonregulatory +nonreigning +nonrelated +nonrelational +nonrelativistic +nonrelenting +nonreliable +nonrelieving +nonreligious +nonremediable +nonremedial +nonremissible +nonremittable +nonremonstrant +nonremovable +nonremunerative +nonrenewable +nonrenouncing +nonrepairable +nonreparable +nonrepatriable +nonrepayable +nonrepaying +nonrepealable +nonrepeated +nonrepellent +nonrepentant +nonrepetitious +nonrepetitive +nonreplaceable +nonreplicate +nonreplicated +nonreportable +nonreprehensible +nonrepresentable +nonrepresentational +nonrepressed +nonrepressible +nonrepressive +nonreproducible +nonreproductive +nonrepublican +nonrepudiable +nonrepudiative +nonreputable +nonrequirable +nonrequisite +nonrescissible +nonrescissory +nonreservable +nonresidential +nonresidual +nonresilient +nonresistant +nonresistible +nonresisting +nonresistive +nonresolvable +nonresonant +nonrespectable +nonrespirable +nonresponsible +nonresponsive +nonrestorative +nonrestrained +nonrestricted +nonrestricting +nonrestrictive +nonresurrectional +nonresuscitable +nonresuscitative +nonretail +nonretainable +nonretardative +nonretardatory +nonretarded +nonretentive +nonreticent +nonretinal +nonretired +nonretiring +nonretraceable +nonretractile +nonretroactive +nonreturn +nonreturnable +nonrevealing +nonrevenue +nonreverent +nonreverential +nonreverse +nonreversed +nonreversible +nonreversing +nonrevertible +nonrevertive +nonreviewable +nonrevocable +nonrevokable +nonrevolting +nonrevolutionary +nonrevolving +nonrhetorical +nonrheumatic +nonrhymed +nonrhyming +nonrhythmic +nonrhythmical +nonriding +nonrigid +nonrioting +nonriparian +nonritualistic +nonromantic +nonrotatable +nonrotating +nonrotational +nonrotative +nonround +nonrousing +nonroutine +nonroyal +nonrudimental +nonrudimentary +nonruinable +nonruinous +nonruminating +nonruminative +nonrun +nonrupturable +nonrural +nonrustable +nonrustic +nonsaccharin +nonsaccharine +nonsacerdotal +nonsacramental +nonsacred +nonsacrificial +nonsacrificing +nonsacrilegious +nonsalable +nonsalaried +nonsaleable +nonsaline +nonsalubrious +nonsalutary +nonsalvageable +nonsanative +nonsanctimonious +nonsane +nonsanguine +nonsaponifiable +nonsaporific +nonsatiable +nonsatiric +nonsatirical +nonsatirizing +nonsatisfying +nonsaturated +nonsaving +nonsawing +nonscalding +nonscaling +nonscandalous +nonscented +nonscheduled +nonschematic +nonschematized +nonschismatic +nonschismatical +nonschizophrenic +nonscholarly +nonscholastic +nonscholastical +nonsciatic +nonscientific +nonscoring +nonscraping +nonscriptural +nonsculptural +nonsculptured +nonseasonable +nonseasonal +nonseasoned +nonsecessional +nonsecluded +nonseclusive +nonsecret +nonsecretarial +nonsecretionary +nonsecretive +nonsecretory +nonsectarian +nonsectional +nonsectorial +nonsecular +nonsedentary +nonseditious +nonsegmental +nonsegmentary +nonsegmented +nonsegregable +nonsegregated +nonsegregative +nonseismic +nonselected +nonselective +nonselling +nonsemantic +nonsenatorial +nonsensate +nonsensationalistic +nonsensible +nonsensical +nonsensitive +nonsensitized +nonsensitizing +nonsensorial +nonsensory +nonsensual +nonsensualistic +nonsensuous +nonsententious +nonsentient +nonseparable +nonseparating +nonseparative +nonseptate +nonseptic +nonsequacious +nonsequent +nonsequential +nonsequestered +nonseraphic +nonseraphical +nonseriate +nonserious +nonserous +nonserviceable +nonservile +nonsetting +nonseverable +nonsexlinked +nonsexual +nonsharing +nonshattering +nonshedding +nonshipping +nonshredding +nonshrinkable +nonshrinking +nonsibilant +nonsiccative +nonsidereal +nonsignable +nonsignatory +nonsignificant +nonsignificative +nonsiliceous +nonsilicious +nonsimilar +nonsimulate +nonsimulative +nonsingular +nonsinkable +nonskeletal +nonskeptic +nonskeptical +nonskilled +nonskipping +nonslanderous +nonslaveholding +nonslip +nonslippery +nonslipping +nonsmoking +nonsober +nonsobering +nonsociable +nonsocial +nonsocialistic +nonsocietal +nonsociological +nonsolar +nonsolicitous +nonsolid +nonsolidified +nonsolidifying +nonsoluble +nonsolvable +nonsonant +nonsophistic +nonsophistical +nonsoporific +nonspacious +nonspalling +nonsparing +nonsparking +nonsparkling +nonspatial +nonspeaking +nonspecial +nonspecialized +nonspecializing +nonspecifiable +nonspecific +nonspecified +nonspecious +nonspectacular +nonspectral +nonspeculative +nonspeculatory +nonspheral +nonspheric +nonspherical +nonspill +nonspillable +nonspinal +nonspinose +nonspiny +nonspiral +nonspirited +nonspiritous +nonspiritual +nonspirituous +nonspontaneous +nonsporting +nonspottable +nonsprouting +nonspurious +nonstabile +nonstable +nonstainable +nonstaining +nonstampable +nonstandard +nonstandardized +nonstanzaic +nonstarting +nonstatic +nonstationary +nonstatistic +nonstatistical +nonstative +nonstatutable +nonstatutory +nonstellar +nonstereotyped +nonstereotypic +nonstereotypical +nonsterile +nonstick +nonsticky +nonstimulable +nonstimulating +nonstimulative +nonstoical +nonstooping +nonstop +nonstorable +nonstrategic +nonstrategical +nonstratified +nonstretchable +nonstriated +nonstrictured +nonstriking +nonstringent +nonstriped +nonstrophic +nonstructural +nonstructured +nonstudied +nonstudious +nonstylized +nonstyptic +nonstyptical +nonsubconscious +nonsubjected +nonsubjective +nonsubjugable +nonsubliminal +nonsubmerged +nonsubmergible +nonsubmersible +nonsubmissible +nonsubmissive +nonsubordinate +nonsubordinating +nonsubscribing +nonsubsidiary +nonsubsiding +nonsubsistent +nonsubstantial +nonsubstantival +nonsubstantive +nonsubstituted +nonsubstitutional +nonsubstitutionary +nonsubstitutive +nonsubtile +nonsubtle +nonsubtractive +nonsuburban +nonsubversive +nonsuccessful +nonsuccessional +nonsuccessive +nonsuctorial +nonsudsing +nonsufferable +nonsuggestible +nonsuggestive +nonsulfurous +nonsulphurous +nonsupplemental +nonsupplementary +nonsupplicating +nonsupportable +nonsupporting +nonsupposed +nonsupposing +nonsuppositional +nonsuppositive +nonsuppressed +nonsuppressive +nonsuppurative +nonsurgical +nonsurrealistic +nonsusceptible +nonsusceptive +nonsuspended +nonsuspensive +nonsustainable +nonsustained +nonsustaining +nonsweating +nonswimming +nonsyllogistical +nonsyllogizing +nonsymbiotic +nonsymbiotical +nonsymbolic +nonsymbolical +nonsympathetic +nonsympathizing +nonsymphonic +nonsymphonious +nonsymptomatic +nonsynchronal +nonsynchronic +nonsynchronical +nonsynchronous +nonsyndicated +nonsynesthetic +nonsynodic +nonsynodical +nonsynonymous +nonsynoptic +nonsynoptical +nonsyntactic +nonsyntactical +nonsynthesized +nonsynthetic +nonsynthetical +nonsyntonic +nonsyntonical +nonsystematic +nonsystematical +nontabular +nontabulated +nontactical +nontactile +nontalented +nontalkative +nontan +nontangental +nontangential +nontangible +nontannic +nontanning +nontarnishable +nontarnished +nontarnishing +nontarred +nontautological +nontautomeric +nontautomerizable +nontaxable +nontaxonomic +nontaxonomical +nonteachable +nonteaching +nontechnical +nontechnologic +nontechnological +nontelegraphic +nontelegraphical +nonteleological +nontelepathic +nontelephonic +nontelescopic +nontelescoping +nontelic +nontemperable +nontemperamental +nontemperate +nontempered +nontemporal +nontemporary +nontemporizing +nontenable +nontenantable +nontensile +nontentative +nontenurial +nonterminable +nonterminal +nonterminative +nonterrestrial +nonterritorial +nontestable +nontestamentary +nontesting +nontextual +nontextural +nontheatric +nontheatrical +nontheistic +nontheistical +nonthematic +nontheocratic +nontheocratical +nontheologic +nontheological +nontheoretic +nontheoretical +nontheosophic +nontheosophical +nontherapeutic +nontherapeutical +nonthermal +nonthermoplastic +nonthinking +nonthoracic +nonthreaded +nonthreatening +nontidal +nontillable +nontimbered +nontinted +nontitaniferous +nontitled +nontitular +nontolerable +nontolerant +nontolerated +nontolerative +nontoned +nontonic +nontopographical +nontortuous +nontotalitarian +nontoxic +nontraceable +nontractable +nontrading +nontraditional +nontraditionalistic +nontraditionary +nontragic +nontragical +nontrailing +nontrained +nontraining +nontraitorous +nontranscribing +nontranscriptive +nontransferable +nontransferential +nontransforming +nontransgressive +nontransient +nontransitional +nontransitive +nontransmittal +nontransmittible +nontransparent +nontransportable +nontransposable +nontransposing +nontraveling +nontravelling +nontraversable +nontreasonable +nontreatable +nontreated +nontribal +nontributary +nontrigonometric +nontrigonometrical +nontrivial +nontropic +nontropical +nontroubling +nontrunked +nontrusting +nontubercular +nontuberculous +nontubular +nontumorous +nontumultuous +nontuned +nonturbinate +nonturbinated +nontutorial +nontyphoidal +nontypical +nontypographic +nontypographical +nontyrannic +nontyrannical +nontyrannous +nonubiquitary +nonubiquitous +nonulcerous +nonumbilical +nonunanimous +nonunderstandable +nonunderstanding +nonunderstood +nonundulant +nonundulate +nonundulating +nonundulatory +nonunified +nonuniform +nonunion +nonunique +nonunitable +nonuniteable +nonunited +nonuniting +nonuniversal +nonupright +nonurban +nonurgent +nonusable +nonuseable +nonusing +nonusurious +nonusurping +nonuterine +nonutilitarian +nonutilized +nonvacant +nonvacillating +nonvacuous +nonvaginal +nonvagrant +nonvalid +nonvalorous +nonvaluable +nonvalued +nonvanishing +nonvaporous +nonvariable +nonvariant +nonvaried +nonvarious +nonvascular +nonvasculose +nonvasculous +nonvegetative +nonvegetive +nonvehement +nonvenal +nonvendible +nonvenereal +nonvenomous +nonvenous +nonventilative +nonveracious +nonverbal +nonverbalized +nonverifiable +nonveritable +nonverminous +nonvernacular +nonvertebral +nonvertebrate +nonvertical +nonvesicular +nonvesting +nonvexatious +nonviable +nonvibratile +nonvibrating +nonvibratory +nonvicarious +nonvigilant +nonvillainous +nonvindicable +nonvinous +nonvintage +nonviolable +nonviolative +nonvirginal +nonvirile +nonvirtuous +nonvirulent +nonvisceral +nonviscid +nonviscous +nonvisible +nonvisional +nonvisionary +nonvisiting +nonvisual +nonvisualized +nonvital +nonvitalized +nonvitrified +nonvitriolic +nonvituperative +nonviviparous +nonvocable +nonvocal +nonvocalic +nonvocational +nonvoid +nonvoidable +nonvolant +nonvolatile +nonvolatilizable +nonvolatilized +nonvolcanic +nonvolitional +nonvoluble +nonvoluntary +nonvoting +nonvulcanized +nonvulval +nonvulvar +nonwalking +nonwarrantable +nonwarranted +nonwashable +nonwasting +nonwatertight +nonwavering +nonwaxing +nonwestern +nonwetted +nonwinged +nonwithering +nonwoody +nonworking +nonwoven +nonyielding +nonzealous +nonzero +nonzodiacal +nonzonal +nonzonate +nonzonated +nonzoologic +nonzoological +nooklike +noritic +normal +normative +normocytic +normotensive +northbound +northeasterly +northeastern +northeastward +northerly +northern +northernmost +northmost +northward +northwesterly +northwestward +nosebanded +nosier +nosiest +nosogenetic +nosogeographic +nosogeographical +nosographic +nosographical +nosological +nostologic +nosy +notable +notal +notarial +notational +notchy +noted +noteless +noteworthy +nothus +noticeable +notifiable +notional +notionate +notionless +notochordal +notorious +notour +noumenal +nourishable +novelettish +novelistic +novemdecillionth +novercal +nowed +noxious +nth +nubblier +nubbliest +nubbly +nubile +nubilous +nuciform +nuclear +nucleate +nucleolar +nucleolated +nucleoloid +nucleophilic +nucleoplasmatic +nucleoplasmic +nudicaul +nugatory +nuggety +null +nulliparous +nulliporous +numb +numberable +numberless +numbing +numerable +numerary +numerate +numeric +numerical +numerous +numinous +nummary +nummular +nummulitic +nuncupative +nunlike +nunnated +nuptial +nurturable +nurtureless +nutant +nutational +nutbrown +nutlike +nutmegged +nutrimental +nutritious +nutritive +nuts +nutty +nyctaginaceous +nyctitropic +nymphaeaceous +nymphal +nymphean +nymphomaniac +nymphomaniacal +nystagmic +oafish +oaken +oared +oarless +oarlike +oasitic +oaten +obbligato +obclavate +obconic +obconical +obcordate +obcuneate +obdurate +obedient +obeisant +obeliscal +obeliskoid +obese +obeyable +objectionable +objective +objectivistic +objurgative +objurgatory +oblanceolate +oblate +oblatory +obligable +obligato +obligatory +obliging +oblique +obliterable +obliterative +oblivious +oblong +oblongish +obnoxious +obovate +obovoid +obreptitious +obscene +obscure +obsequent +obsequious +observable +observant +obsessional +obsessive +obsolescent +obsolete +obstetric +obstinate +obstreperous +obstructionistic +obstructive +obstruent +obtect +obtrusive +obtundent +obtuse +obumbrant +obverse +obvious +obvolute +obvolutive +occasional +occasionalistic +occipital +occludent +occlusal +occlusive +occult +occupational +occupationless +occupative +occupiable +occurrent +oceanic +oceanlike +oceanographic +oceanographical +ocellar +ocellated +oceloid +ocherous +ochery +ochlocratic +ochlocratical +ochreous +ocreate +octachordal +octadic +octagonal +octahedral +octal +octamerous +octan +octangular +octantal +octastyle +octaval +octavalent +octennial +octennially +octodecillionth +octonary +octupled +octupling +ocular +oculistic +oculomotor +odd +odious +odometrical +odontalgic +odontoblastic +odontographic +odontoid +odontological +odontophorous +odorful +odoriferous +odorless +odorous +odourful +odourless +odylic +oecumenical +oedipal +oenochoe +oesophageal +oestrous +offcast +offendable +offendible +offenseless +offensive +offerable +offertorial +offhand +officeless +official +officinal +officious +offish +offscreen +offshore +offside +offstage +ogreish +ohmic +oidioid +oilfired +oilier +oiliest +oilless +oillike +oiltight +oily +okay +old +olden +older +oldest +oldfangled +oleaceous +oleaginous +olefinic +oleic +oleographic +oleomargaric +oleoyl +olericultural +olfactory +olid +oligarchic +oligocarpous +oligochaetous +oligophagous +oligophrenic +oligopolistic +oligopsonistic +oligotrophic +oliguretic +olivaceous +olivary +omental +ominous +omissible +omissive +ommateal +ommatidial +ommatophorous +omnicompetent +omnidirectional +omnifarious +omnific +omnificent +omnipotent +omnipresent +omniscient +omnivorous +omophagic +onagraceous +onanistic +oncogenic +oncologic +oncological +oncoming +oncotic +oneiric +oneirocritical +onerous +ongoing +onionlike +oniony +only +onomastic +onomatologic +onomatological +onrushing +onshore +onside +ontogenetic +ontogenetical +ontogenic +ontological +onward +onymous +oogamous +oogenetic +ookinetic +oolitic +oological +oophoric +oophytic +oory +oosporic +oozier +ooziest +oozy +opacus +opalescent +opaline +opaque +open +openairish +openchain +opencircuit +operable +operant +operatable +operatic +operational +operative +operculate +operose +ophicleidean +ophidian +ophiolatrous +ophiologic +ophiological +ophitic +ophthalmic +ophthalmitic +ophthalmologic +ophthalmological +ophthalmometric +ophthalmometrical +ophthalmoscopic +ophthalmoscopical +opinionated +opinionative +opisthognathous +oppidan +opportune +opportunistic +opposable +opposite +oppositional +oppositionary +oppositionless +oppressible +oppressive +opprobrious +oppugnant +opsonic +opsonoid +optative +optic +optical +optimal +optimistic +optional +optometrical +opulent +opuscular +oracular +oral +orangy +oratorical +oratorlike +orbicular +orbiculate +orchestral +orchestraless +orchidaceous +orchitic +ordainable +orderly +ordinaire +ordinal +ordinary +ordurous +orectic +organic +organicismal +organicistic +organisable +organisational +organismal +organismic +organizable +organizational +organographic +organographical +organoleptic +organologic +organological +organomagnesium +organometallic +orgasmic +orgastic +orgulous +oriental +orientative +original +originative +orinasal +ornamental +ornamented +ornate +ornery +ornithic +ornithischian +ornithoid +ornithologic +ornithological +orobanchaceous +orogenetic +orogenic +orological +orometric +oronasal +oropharyngeal +orotund +orphreyed +orrow +ortho +orthocephalic +orthochromatic +orthodontic +orthodox +orthogenetic +orthogenic +orthognathous +orthogonal +orthographic +orthomorphic +orthopedic +orthophosphoric +orthophyric +orthopneic +orthopnoeic +orthopterous +orthoptic +orthorhombic +orthoscopic +orthostichous +orthostyle +orthotone +orthotropic +orthotropous +oscillatory +oscillometric +oscine +oscitant +osculant +oscular +osculatory +osiered +osmic +osmious +osmometric +osmous +osseous +ossicular +ossiferous +ossified +osteal +osteitic +ostensible +ostensive +osteoblastic +osteogenetic +osteoid +osteologic +osteological +osteometric +osteometrical +osteopathic +osteophytic +osteoplastic +ostiolar +ostracizable +ostracodan +ostracodous +ostrichlike +otalgic +otherguess +otherworldly +otic +otiose +otocystic +otolaryngological +otological +otoplastic +otoscopic +ougenetic +oukinetic +oulitic +oulogical +ouphoric +ouphytic +ousporic +outasight +outboard +outbound +outdated +outdoor +outdoorsy +outer +outermost +outeyed +outgoing +outland +outlandish +outlying +outmoded +outmost +outr +outra +outrageous +outremer +outright +outsize +outspoken +outstanding +outward +outweaponed +outworn +oval +ovarian +ovate +ovational +ovenlike +overable +overabstemious +overabundant +overabusive +overactive +overacute +overadorned +overaffected +overaffirmative +overage +overaggressive +overall +overambitioned +overambitious +overanalytical +overanalyzed +overangry +overanimated +overanxious +overappareled +overappreciative +overapprehensive +overapt +overargumentative +overarm +overartificial +overassertive +overassumptive +overassured +overattached +overattentive +overbashful +overbearing +overbig +overbitter +overblithe +overblown +overboastful +overbold +overbookish +overbooming +overbounteous +overbrave +overbright +overbrilliant +overbrutal +overbulky +overbumptious +overburdensome +overbusy +overcanny +overcapable +overcaptious +overcareful +overcareless +overcast +overcasual +overcasuistical +overcaustic +overcautious +overcensorious +overcerebral +overcharitable +overcheap +overcherished +overchildish +overchill +overcircumspect +overcivil +overclean +overclement +overclever +overclinical +overclose +overcold +overcommon +overcommunicative +overcompetitive +overcomplacent +overcomplex +overcompliant +overconscientious +overconscious +overconservative +overconsiderate +overconstant +overcontented +overcontentious +overcontrite +overcool +overcopious +overcorrect +overcostly +overcourteous +overcovetous +overcoy +overcredulous +overcritical +overcultured +overcunning +overcured +overcurious +overdainty +overdear +overdecadent +overdecorative +overdeep +overdefensive +overdeferential +overdefiant +overdeliberate +overdelicate +overdelicious +overdependent +overdepressive +overderisive +overdescriptive +overdesirous +overdestructive +overdetailed +overdevoted +overdiffuse +overdiligent +overdiscreet +overdiscriminating +overdistant +overdistrait +overdistraught +overdiverse +overdoctrinaire +overdogmatic +overdogmatical +overdoor +overdramatic +overdry +overdue +overeager +overearnest +overeasy +overeducative +overeffusive +overelaborate +overelegant +overelliptical +overemotional +overemphatic +overemphatical +overempirical +overempty +overenthusiastic +overenvious +overexacting +overexcitable +overexpansive +overexpectant +overexplicit +overexpressive +overexquisite +overextreme +overexuberant +overfacile +overfactious +overfactitious +overfaint +overfaithful +overfamed +overfamiliar +overfamous +overfanciful +overfast +overfastidious +overfat +overfavorable +overfearful +overfeminine +overfertile +overfervent +overfew +overfierce +overfit +overflat +overfleshed +overflorid +overflowable +overfluent +overfond +overfoolish +overforged +overformed +overforward +overfoul +overfragile +overfragmented +overfrail +overfranchised +overfrank +overfraught +overfree +overfrequent +overfrugal +overfruitful +overfunctioning +overgenerous +overgenial +overgentle +overgesticulative +overgifted +overglad +overglaze +overgloomy +overgracious +overgraduated +overgrasping +overgrateful +overgreasy +overgreat +overgreedy +overgrievous +overgross +overground +overguilty +overhand +overhappily +overhappy +overhard +overhardy +overharsh +overhasty +overhatted +overhaughty +overhead +overheady +overhearty +overheavy +overhelpful +overhigh +overhomely +overhonest +overhostile +overhot +overhuge +overhuman +overhumane +overhumble +overhurried +overhysterical +overidealistic +overidle +overidolatrous +overillustrative +overimaginative +overimitative +overimpressible +overimpressionable +overinclinable +overindividualistic +overindulgent +overinflationary +overinfluential +overinhibited +overinsistent +overinsolent +overinstructive +overintellectual +overintense +overinterested +overinventoried +overjealous +overjocular +overjoyful +overjoyous +overjudicious +overkeen +overkind +overland +overlarge +overlascivious +overlate +overlaudatory +overlavish +overlax +overlearned +overlewd +overliberal +overlicentious +overlight +overliterary +overlively +overloath +overlofty +overlogical +overlong +overloose +overloud +overloyal +overluscious +overlush +overluxuriant +overluxurious +overmagnetic +overmasterful +overmature +overmean +overmeek +overmellow +overmelodious +overmerciful +overmerry +overmettled +overmighty +overmild +overmilitaristic +overminute +overmodest +overmoist +overmoral +overmoralistic +overmournful +overnarrow +overnear +overneat +overneglectful +overnegligent +overnervous +overnice +overnoble +overnormal +overnumerous +overobedient +overobese +overobsequious +overoffensive +overofficious +overoptimistic +overornamental +overpained +overpainful +overpartial +overparticular +overpassionate +overpatient +overpatriotic +overpensive +overperemptory +overpessimistic +overpiteous +overplain +overplausible +overplenteous +overplentiful +overplump +overpolemical +overpolitic +overpolitical +overponderous +overpopular +overpopulous +overpositive +overpotent +overpowerful +overpowering +overprecise +overpresumptive +overpresumptuous +overproficient +overprolific +overprolix +overprominent +overprompt +overprone +overproof +overproportionate +overprosperous +overprovident +overpuissant +overquiet +overrash +overrational +overreactive +overready +overrealistic +overreflective +overreliant +overreligious +overremiss +overrepresentative +overreserved +overresolute +overrestraint +overrich +overriding +overrife +overrigged +overrighteous +overrigid +overrigorous +overripe +overrough +overrude +oversacrificial +oversad +oversalty +oversanguine +oversaucy +overscented +oversceptical +overscrupulous +oversecure +oversecured +oversensible +oversentimental +overserene +overserious +overservile +oversevere +oversexed +overshort +overshot +oversilent +oversimple +oversize +overskeptical +overslack +overslavish +overslight +overslow +oversmooth +oversocial +oversoft +oversolemn +oversolicitous +oversoothing +oversophisticated +oversorrowful +oversour +overspacious +oversparing +overspeculative +overspeedy +oversqueamish +overstale +overstayed +oversteadfast +oversteady +overstiff +overstimulative +overstout +overstowed +overstraight +overstrict +overstrident +overstrong +overstrung +overstudious +overstuffed +oversubtle +oversufficient +oversuperstitious +oversure +oversusceptible +oversuspicious +oversweet +oversystematic +overt +overtalkative +overtame +overtart +overtechnical +overtedious +overtenacious +overtender +overtense +overtheatrical +overthick +overthin +overthoughtful +overthrifty +overtight +overtimbered +overtimid +overtimorous +overtolerant +overtrue +overtrustful +overtruthful +overturnable +overvaliant +overvaluable +overvehement +overventuresome +overventurous +overvigorous +overviolent +overwarmed +overwary +overweak +overwealthy +overweary +overweening +overweight +overwet +overwhelming +overwide +overwild +overwilling +overwily +overwithered +overwrought +overzealous +oviferous +oviform +ovine +oviparous +ovisaclike +ovoid +ovoviviparous +ovular +owing +owlish +owlishly +owllike +oxalic +oxblood +oxidable +oxidasic +oxidational +oxidative +oxidic +oxidimetric +oxidizable +oximetric +oxlike +oxycephalic +oxychloric +oxydasic +oxygenic +oxygenizable +oxytocic +ozonic +ozoniferous +ozonous +paced +pachydermal +pachydermatous +pachydermic +pachydermoid +pachydermous +pacific +pacifical +pacificistic +pacifistic +packable +packthreaded +pactional +paederastic +paederastically +paediatric +paganist +paganistic +paginal +pagodalike +pained +painful +painless +painstaking +painted +painterly +pajamaed +palaced +palacelike +palaeanthropic +palaeobiologic +palaeobiological +palaeobotanic +palaeobotanical +palaeoclimatologic +palaeoclimatological +palaeoecologic +palaeoecological +palaeoentomologic +palaeoentomological +palaeological +palaeontographic +palaeontologic +palaeontological +palaeotropical +palaeozoologic +palaeozoological +palaestral +palaestrian +palaestric +palatable +palatal +palatalized +palateless +palatelike +palatial +palatine +palaverous +pale +paleaceous +paled +paleethnologic +paleethnological +paleobiologic +paleobiological +paleoclimatologic +paleoclimatological +paleoecologic +paleoecological +paleoentomologic +paleoentomological +paleogenetic +paleogeologic +paleographic +paleographical +paleological +paleomagnetic +paleontographic +paleontographical +paleopathologic +paleopsychic +paleopsychological +paleozoologic +paleozoological +paleozoulogic +paleozoulogical +paler +palest +palettelike +palindromic +palindromical +palingenesian +palish +palladic +palladous +pallial +palliative +pallid +pally +palmaceous +palmar +palmary +palmate +palmier +palmiest +palmitic +palmy +palpable +palpebral +palpebrate +palpitant +palsylike +paltrier +paltriest +paltry +paludal +paly +palynological +pampean +pamphletary +pan +pana +panatrophic +panchromatic +pancratic +pancreatic +pandanaceous +pandemic +pandemoniac +pandemoniacal +pandemonian +pandurate +paned +paneless +pangenetic +panheaded +panicky +panicled +paniculate +panlogical +panlogist +panlogistic +panlogistical +pannicular +panniered +panoptic +panoramic +panpsychic +panpsychistic +pansophic +pansophical +pantaletted +pantheistic +pantheistical +pantheonic +pantographic +pantographical +pantomimic +pantomimical +pantonal +pantropical +panurgic +papal +papalonna +papaveraceous +papayan +papercutting +papery +papilionaceous +papillar +papillary +papillomatous +papillose +papistical +papistlike +paplike +pappose +pappy +papular +papulose +papyraceous +papyral +papyrological +parablastic +parabolic +parachronistic +parachutic +paracusic +paradeful +paradeless +paradelike +paradigmatic +paradigmatical +paradisaical +paradisiacal +paradoxal +paradoxical +paraesthetic +paraffinic +paraffinoid +paragenetic +parageusic +paraglossate +paragogic +paragogical +paragonitic +paragonless +paragraphic +paragraphistical +paralexic +parallactic +parallel +parallelable +parallelepipedic +parallelepipedonal +parallelepipedous +parallelless +paralytic +paralyzant +paramagnetic +paramedical +parametric +paramilitary +paramorphic +paramorphous +paramount +paranasal +paranoiac +paranoid +paranormal +parapeted +parapetless +paraphrasable +paraphrastic +paraphysate +paraplegic +parapodial +parapsychological +paraselenic +parasitic +parasiticidal +parasitological +parasoled +parasympathetic +parasynaptic +parasynthetic +paratactic +paratactical +parathyroid +paratroop +paratrophic +paratyphoid +paravail +paraxial +parchable +pardine +pardonable +pardonless +parecious +parenchymatous +parental +parenteral +parenthetic +parentless +parentlike +paresthetic +pareve +parheliacal +parietal +paripinnate +parisonic +parisyllabic +parkinsonian +parklike +parky +parlando +parliamentary +parlourish +parlous +parmigiana +parochial +parodiable +parodic +parodistic +paroicous +parolable +paronomastic +paronymic +paronymous +parotic +parotid +parotidean +parotitic +paroxysmal +paroxysmic +paroxytone +paroxytonic +parricidal +parsable +parsleylike +parsonic +parsonical +parsonish +parsonlike +partakable +parted +parterred +parthenocarpic +partial +partible +participial +particular +particularistic +particulate +partis +partite +partitive +partnerless +partridgelike +parturient +parturifacient +partyless +parve +paschal +pasquilic +pasquillic +pass +passa +passable +passant +passed +passeriform +passerine +passible +passifloraceous +passing +passional +passionate +passionless +passive +passless +passportless +past +pastier +pasties +pastiest +pastoral +pastose +pastural +pastureless +pasty +patchable +patchier +patchiest +patchless +patchworky +patchy +patellar +patellate +patelliform +patentable +paterfamiliar +paternal +pathetic +pathless +pathobiological +pathoformic +pathogenetic +pathogenic +pathognomonic +pathographic +pathological +pathologicoanatomic +pathwayed +patient +patientless +patriarchal +patriarchic +patriarchical +patricidal +patrilateral +patrilineage +patrilineal +patrilocal +patrimonial +patriotic +patripotestal +patristic +patrologic +patrological +patronal +patronisable +patronising +patronizable +patronly +patronymic +patt +pattae +patternable +patternless +patternlike +patterny +patulous +paty +paunchy +pausal +pauseful +pauseless +pavid +pavonine +pawky +pawnable +payable +peaceable +peaceful +peaceless +peacelike +peachier +peachiest +peachlike +peachy +peacockish +peacocky +peaked +peakish +peakless +peaklike +peaky +pealike +pearleyed +pearlier +pearliest +pearlized +pearly +peart +peaselike +peatier +peatiest +peaty +pebbly +peccable +peccant +peckier +peckiest +peckish +pecky +pectic +pectinaceous +pectinate +pectizable +pectoral +pectous +peculiar +pecuniary +pedagogic +pedagogish +pedagoguish +pedantesque +pedantic +pedantical +pedate +pedatifid +peddling +pederastic +pediatric +pedicellar +pedicellate +pedicular +pediculate +pediculicide +pediculous +pediform +pedigreed +pedimental +pedimented +pedipalpal +pedipalpate +pedodontic +pedological +pedophilic +pedunculate +peelable +peerless +peeved +peevedly +peevish +peewee +peglegged +pegless +peglike +pegmatitic +pejorative +pelagial +pelagic +pelargonic +pelitic +pellagrose +pelletlike +pellicular +pellucid +peloric +peltate +pelting +pelvic +pemphigous +penal +penalisable +penalizable +penanceless +penannular +penceless +penciliform +pencillike +pendanted +pendantlike +pendent +pendragonish +pendulous +pendulumlike +penecontemporaneous +penetralian +penetrant +penetrating +penetrative +penicillate +penile +peninsular +penitent +penitential +pennate +pennied +penniless +pennoned +penological +pensile +pensionable +pensionary +pensionless +pensive +pentadactyl +pentagonal +pentagonoid +pentagrammatic +pentagrid +pentahydrated +pentahydric +pentahydroxy +pentamerous +pentangular +pentapodic +pentarchical +pentastyle +pentasyllabic +pentatomic +pentavalent +pentomic +penultimate +penurious +peopleless +peperine +peplosed +peppercornish +peppercorny +pepperish +peppery +peppier +peppiest +peppy +pepsinogenic +peptic +peptidolytic +peptonelike +peptonic +perambulatory +perceivable +percental +perceptible +perceptional +perceptive +perceptual +perchable +perchloric +perchromic +percipient +percoid +percolable +percolative +percurrent +percussional +percussive +percutaneous +perdurable +peregrine +peremptory +perennial +perfect +perfectible +perfectionistic +perfective +perfervid +perfidious +perfoliate +perforable +perforated +perforative +performable +performative +performing +perfumeless +perfumy +perfunctory +perfusive +periastral +pericardial +pericarditic +pericarpial +pericarpic +pericarpoidal +pericemental +pericentral +pericentric +perichaetial +periclinal +pericranial +peridental +peridermal +peridermic +peridial +peridiiform +peridotic +peridotitic +perigeal +perigean +periglacial +perigonal +perigonial +perigynous +perihelial +perihelian +perilless +perilous +perilymphatic +perimorphic +perimorphous +perinatal +perineal +perinephral +perinephrial +perinephric +perineurical +periodic +periodontal +periodontic +perioecic +perioecid +periosteal +periosteous +periostitic +periostracal +periotic +peripatetic +peripheral +periphrastic +periproctal +periproctic +periproctous +peripteral +perisarcal +perisarcous +periscopic +perishable +perished +perishing +perishless +perispheric +perispherical +perispomenon +perissodactylous +peristaltic +peristomal +peristomatic +peristomial +peritectic +perithecial +perithelial +peritonital +peritonitic +peritrichate +perivisceral +periwinkled +perjured +perk +perkier +perkiest +perkish +perky +perlitic +perlucidus +permanent +permanganic +permeable +permeant +permissible +permissive +permutable +permutational +pernicious +pernickety +peroneal +perorational +perorative +peroratorical +perotic +peroxidic +peroxy +perpendicular +perpetuable +perpetual +perplexed +perse +persecutional +perseverant +persevering +persistent +persnickety +personable +personal +personalistic +personative +personifiable +personifiant +persons +perspectival +perspectived +perspectiveless +perspicacious +perspicuous +perspirable +perspiratory +perspiry +persuadable +persuasive +pert +perthitic +pertinacious +pertinent +perturbable +perturbational +perturbatious +pertussal +perusable +pervasive +perverse +perversive +perverted +pervertible +pervious +peskier +peskiest +pesky +pestersome +pesticidal +pestiferous +pestilent +pestilential +petaled +petaliferous +petaline +petalled +petalless +petallike +petalodic +petaloid +petalous +petechial +petechiate +petiolar +petiolate +petiolular +petit +petite +petitionable +petitionary +petitory +petrifiable +petrificant +petrogenetic +petrogenic +petrographic +petrographical +petroleous +petrolic +petrologic +petrological +petrosal +petrous +petticoated +petticoatless +pettier +pettiest +pettifogging +pettish +petty +petulant +phagedaenic +phagedenic +phagocytolytic +phagolytic +phalangeal +phalansterian +phallic +phanerocrystalline +phanerogamic +phanerogamous +phantasmagorial +phantasmagorian +phantasmagoric +phantasmagorical +phantasmal +phantastic +phantastical +phantomlike +pharmaceutical +pharmacodynamic +pharmacodynamical +pharmacognostic +pharmacologic +pharmacological +pharmacopoeial +pharmacopoeic +pharyngeal +phaseal +phaseless +phasic +phatic +phellogenetic +phenetic +phenolated +phenolic +phenological +phenomenal +phenomenalistic +phenotypic +phenotypical +phenylene +phialine +philanthropic +philanthropistic +philatelic +philatelical +philharmonic +philhellenic +philologic +philological +philoprogenitive +philosophical +phimotic +phleboid +phlebotomic +phlebotomical +phlegmatic +phlegmatized +phlegmier +phlegmiest +phlegmless +phlegmy +phlogistic +phlogotic +phocine +phonal +phonatory +phonematic +phonemic +phonesthemic +phonetic +phoney +phoniatric +phonic +phonier +phonies +phoniest +phonogramic +phonogrammic +phonographic +phonolitic +phonologic +phonological +phonometric +phonophoric +phonotypic +phonotypical +phony +phosphaturic +phosphorescent +phosphoreted +phosphoric +phosphorous +photic +photoactinic +photoactive +photoautotrophic +photobathic +photobiotic +photochemic +photochemical +photoconductive +photodramatic +photodynamic +photodynamical +photoelastic +photoelectric +photoemissive +photoflight +photogenic +photographable +photographic +photoheliographic +photokinetic +photolithographic +photoluminescent +photolytic +photomechanical +photometric +photometrical +photonuclear +photopathic +photoperiodic +photophilous +photopic +photoreceptive +photosensitive +photospectroscopic +photospectroscopical +photospheric +photostatic +phototactic +phototelegraphic +photothermic +phototonic +phototopographic +phototopographical +phototropic +phototypic +phototypographic +photovoltaic +phrasal +phraseologic +phraseological +phreatic +phreatophytic +phrenetic +phrenic +phrenitic +phrenogastric +phrenogrady +phrenologic +phrenological +phrenoward +phthalic +phthisic +phthisical +phugoid +phycological +phylacteric +phylacterical +phylacteried +phylactic +phylar +phyletic +phylic +phyllocladioid +phyllocladous +phyllodial +phyllogenetic +phylloid +phyllomic +phyllotactic +phyllotactical +phyllotaxic +phylogenetic +phymatic +physiatric +physiatrical +physical +physicianly +physicochemical +physiocratic +physiognomic +physiognomonical +physiological +physiopathologic +physiopathological +physoclistous +physostomous +phytocidal +phytoclimatologic +phytoclimatological +phytogenic +phytogeographic +phytogeographical +phytographic +phytographical +phytologic +phytological +phytophagous +phytosociologic +phytosociological +phytosuccivorous +phytotoxic +piacular +pial +pianic +pianissimo +piazzaed +piazzian +picaresque +picayune +piceous +picked +pickier +pickiest +pickled +picky +picolinic +picrated +picric +picrotoxic +pictorial +picturesque +piddling +piebald +pied +piedmont +pielike +pierceable +piercing +pieridine +pietistic +pietistical +piezometric +piezometrical +piggish +pikelike +pilar +pileate +pileated +piled +pileous +pilgarlicky +pilgrimatic +pilgrimatical +piliferous +piliform +pillared +pillarlike +pillowless +pillowlike +pillowy +pilonidal +pilose +pilotless +pilpulistic +pily +pinaceous +pinacoidal +pinchable +pinchpenny +pindling +pineal +pinelike +piney +pinfire +pinguid +pinheaded +pinier +piniest +pinkish +pinnal +pinnate +pinnatifid +pinnatilobate +pinnatipartite +pinnatiped +pinnatisect +pinniped +pinnipedian +pinnular +pinnulate +pinto +piny +pious +pipeless +pipelike +piperaceous +pipier +pipiest +pipy +piquant +piratelike +piratic +piratical +piscatorial +piscatory +piscicultural +pisciform +piscine +piscivorous +pisiform +pisolitic +pissed +pistillate +pistollike +pistonlike +pitchable +pitcherlike +pitchier +pitchiest +pitchlike +pitchy +piteous +pithecanthropoid +pithecoid +pithy +pitiable +pitiful +pitiless +pivotal +pixilated +pixyish +pizzicato +placable +placative +placatory +placeable +placeless +placental +placentary +placentate +placid +placoid +plagal +plagiaristic +plagihedral +plagiocephalic +plagiocephalous +plaguy +plaided +plain +plaintive +planar +planetary +planetoidal +plangent +planiform +planimetric +planimetrical +planispherical +plankless +planklike +planktonic +planoblastic +plantable +plantar +plantationlike +plantigrade +plantless +plantlike +planular +planulate +plashier +plashiest +plashy +plasmodial +plastered +plasterlike +plastery +plastics +plastometric +plated +platier +platiest +platinic +platiniferous +platinocyanic +platinoid +platinous +platitudinous +platy +platycephalic +platyhelminthic +platykurtic +platypod +platyrrhine +plausible +plausive +playable +playful +pleadable +pleasable +pleasant +pleasing +pleasurable +pleasureful +pleasureless +plebby +plebeian +plectognathic +plectognathous +pledgeable +pledgeless +pleiomerous +pleiophyllous +plenary +plenipotent +plenipotentiary +plenteous +plentiful +pleochroic +pleochroitic +pleomorphic +pleonal +pleonic +plesiosauroid +plethoric +pleural +pleuritic +pleurocarpous +pleurodont +pleuropneumonic +plexiform +pleximetric +pliable +pliant +plical +plicate +plinthless +plinthlike +plosive +plotful +plotless +plowable +pluckier +pluckiest +pluckless +plucky +pluggable +plugless +pluglike +plumaged +plumate +plumbable +plumbaginaceous +plumbaginous +plumbeous +plumbic +plumbiferous +plumbless +plumbous +plumier +plumiest +plumlike +plummier +plummiest +plummy +plumose +plump +plumular +plumulose +plumy +plunderable +pluperfect +plural +pluriliteral +plushed +plusher +plushest +plushlike +pluteal +plutean +plutonic +pluvial +pluviometric +pluviometrical +pluvious +pneudraulic +pneumatic +pneumatologic +pneumatological +pneumatophorous +pneumococcal +pneumogastric +pneumographic +pneumonic +poaceous +poachable +poachier +poachiest +poachy +pocked +pockier +pockiest +pockmarked +pocky +poco +poculiform +podgier +podgiest +podgy +poditic +podophyllic +podsolic +podzolic +poetastric +poetastrical +poetic +poetless +poetlike +poignant +poikilitic +poikiloblastic +poikilothermic +pointed +pointilla +pointless +poised +poisonous +pokable +pokey +pokier +pokies +pokiest +poky +polar +polarisable +polarographic +polemic +polemoniaceous +poliomyelitic +polished +polite +politic +political +pollable +polled +pollened +pollenless +pollenlike +pollinic +pollinical +polliniferous +polluted +polyacid +polyadelphous +polyandrous +polyangular +polyarchic +polyarchical +polyarticular +polyatomic +polybasic +polycarpellary +polycarpic +polycarpous +polychasial +polychromatic +polychrome +polychromous +polyconic +polycrystalline +polycyclic +polycythaemic +polycythemic +polydactyl +polydemic +polydisperse +polydomous +polyethnic +polyfoil +polygalaceous +polygamistic +polygamous +polygenistic +polyglot +polygonaceous +polygonal +polygraphic +polygynous +polyhistoric +polyhydric +polyhydroxy +polymeric +polymerous +polymorphistic +polymorphonuclear +polymorphous +polyneuritic +polynomial +polynuclear +polyonymous +polyparian +polypetalous +polyphase +polyphonic +polyphonous +polyphyletic +polyphyodont +polyploid +polyploidic +polypod +polypoid +polypous +polyprotic +polysemous +polysepalous +polysomic +polyspermia +polysyllabic +polysyllogistic +polysynthetic +polytheistic +polytheistical +polytomous +polytonal +polytrophic +polytypic +polyunsaturated +polyvalent +polyvinylidene +polyzoarial +polyzoic +pomaceous +pomiferous +pommae +pomological +pompous +ponchoed +ponderable +ponderous +pontific +pontifical +pontine +poor +popeless +popelike +popeyed +popish +poplared +popliteal +poppied +poppycockish +poppylike +pops +popular +populational +populationless +populous +porchless +porchlike +porcine +porelike +poriferous +poriform +porkier +porkiest +porky +poromeric +porous +porphyritic +porphyroid +porpoiselike +porrect +portable +portaled +portalled +portative +portentous +porticoed +portiered +portionable +portionless +portless +portlier +portliest +portly +portraitlike +portrayable +portulacaceous +posh +positional +positionless +positive +positivist +positivistic +posologic +posological +possessed +possessive +possessory +possible +postabdominal +postacetabular +postal +postallantoic +postamniotic +postanal +postanesthetic +postantennal +postaortic +postapoplectic +postapostolic +postapostolical +postappendicular +postarterial +postarthritic +postarticular +postarytenoid +postasthmatic +postauditory +postauricular +postaxial +postaxillary +postbaptismal +postbrachial +postbreakfast +postbronchial +postbuccal +postbulbar +postbursal +postcaecal +postcanonical +postcardiac +postcardinal +postcarotid +postcartilaginous +postcatarrhal +postcaudal +postcentral +postcephalic +postcerebellar +postcerebral +postcolon +postcolumellar +postcommunicant +postcondylar +postconnubial +postconquest +postconsonantal +postconvalescent +postconvulsive +postcostal +postcoxal +postcretaceous +postcritical +postcruciate +postcrural +postcubital +postdental +postdepressive +postdetermined +postdevelopmental +postdiagnostic +postdiaphragmatic +postdiastolic +postdigestive +postdigital +postdiluvian +postdiphtherial +postdiphtheric +postdiphtheritic +postdisapproved +postdiscoidal +postdoctoral +postdural +postdysenteric +postelection +postelemental +postelementary +postencephalitic +postepileptic +posterior +posteruptive +postesophageal +postethmoid +postexilian +postfebrile +postfemoral +postfetal +postfoetal +postfoveal +postganglionic +postgastric +postgenial +postgenital +postglacial +postgrippal +posthemiplegic +posthemorrhagic +posthepatic +posthexaplar +posthippocampal +posthumeral +posthumous +posthyoid +posthypnotic +posthysterical +postiche +posticous +posticteric +postilioned +postillioned +postincarnation +postinfective +postinfluenzal +postintestinal +postjugular +postlabial +postlachrymal +postlarval +postlaryngal +postlaryngeal +postlegal +postlenticular +postlicentiate +postlike +postmalarial +postmammary +postmammillary +postmandibular +postmaniacal +postmarital +postmastoid +postmaxillary +postmaximal +postmediaeval +postmedial +postmedian +postmedieval +postmedullary +postmeiotic +postmeningeal +postmenopausal +postmenstrual +postmeridian +postmesenteric +postmillennial +postmortem +postmundane +postmuscular +postmycotic +postmyxedematous +postmyxedemic +postnasal +postnecrotic +postnephritic +postneural +postneuralgic +postneuritic +postneurotic +postnodal +postnodular +postnuptial +postolivary +postomental +postoperative +postoptic +postoral +postorbital +postordination +postorgastic +postosseous +postpalpebral +postpaludal +postparalytic +postparotid +postparotitic +postparoxysmal +postpartum +postparturient +postpatellar +postpathologic +postpathological +postpectoral +postpeduncular +postperforated +postpericardial +postpharyngal +postpharyngeal +postphlogistic +postphrenic +postphthistic +postpituitary +postpneumonic +postpositional +postpositive +postprandial +postprophetic +postprophetical +postprostate +postpuberty +postpubescent +postpuerperal +postpulmonary +postpupillary +postpyloric +postpyramidal +postpyretic +postrachitic +postrectal +postrenal +postresurrectional +postretinal +postrheumatic +postrhinal +postrorse +postrostral +postrubeolar +postsaccular +postscarlatinoid +postscholastic +postscorbutic +postseason +postsigmoid +postsigmoidal +postspasmodic +postsphenoid +postsphygmic +postspinous +postsplenic +poststernal +poststertorous +postsuppurative +postsurgical +postsymphysial +postsynaptic +postsyphilitic +postsystolic +posttabetic +posttarsal +posttemporal +posttetanic +postthalamic +postthoracic +postthyroidal +posttibial +posttoxic +posttracheal +posttrapezoid +posttraumatic +posttubercular +posttussive +posttympanic +postulational +postulnar +postumbilical +postumbonal +postural +postureteral +postureteric +postuterine +postvaccinal +postvarioloid +postvenereal +postvenous +postventral +postvertebral +postvesical +postvocalic +postxiphoid +postzygapophyseal +postzygapophysial +potable +potamic +potassic +potatory +potbellied +potent +potentae +potential +potentiometric +potenty +potlike +potted +pottier +pottiest +potty +pouched +pourable +poutful +powdery +powered +powerful +powerless +pozzolanic +practic +practicable +practical +practised +praedial +praenominal +praepostorial +praetorian +pragmatic +praiseworthy +prandial +pratincolous +prayerful +prayerless +preabsorbent +preabstract +preabundant +preaccessible +preaccidental +preacetabular +preachier +preachiest +preachieved +preachy +preacid +preacquisitive +preactive +preadamic +preadaptable +preadditional +preadequate +preadherent +preadjectival +preadjective +preadjustable +preadministrative +preadult +preadvisable +preadvisory +preaestival +preaexistent +preaffirmative +preaggressive +preagricultural +prealcoholic +prealgebraic +preallied +preallowable +prealphabet +prealphabetical +prealtar +preambassadorial +preambitious +preanal +preanaphoral +preantepenult +preantepenultimate +preantiseptic +preaortic +prearticulate +preartistic +preascetic +preaseptic +preassigned +preataxic +preauditory +preauricular +preaxial +prebachelor +prebarbaric +prebarbarous +prebasal +prebasilar +prebeloved +prebendal +prebetrothal +preblooming +preboding +preborn +prebrachial +prebranchial +prebridal +prebroadcasting +prebromidic +prebronchial +prebronze +prebrute +prebuccal +prebudgetary +preburlesque +precalculable +precancerous +precapitalistic +precapturing +precardiac +precarious +precarnival +precartilaginous +precast +precatory +precaudal +precautionary +precautious +precedented +precedential +precedentless +preceding +precentennial +precentorial +preceptive +precerebellar +precerebral +precerebroid +preceremonial +precessional +prechampioned +precharted +prechemical +prechloric +prechordal +prechoroid +precious +precipiced +precipitant +precipitative +precipitous +precise +precisive +preclassic +preclassical +preclerical +preclinical +precloacal +precoccygeal +precocial +precocious +precognizable +precognizant +precoincident +precollapsable +precollapsible +precollectable +precollegiate +precollusive +precolorable +precolourable +precommercial +precompliant +precomprehensive +preconceptional +preconcessive +preconcurrent +precondylar +precondyloid +precongenial +precongested +precongestive +precongressional +preconnective +preconnubial +preconscious +preconsonantal +precontemporaneous +precontinental +precontractive +precontractual +precontributive +precontroversial +preconversational +precoracoid +precordial +precorneal +precorrespondent +precorruptive +precosmic +precosmical +precostal +precranial +precritical +precrucial +precrural +precrystalline +precultural +precurrent +precurricular +precursory +precyclonic +precystic +predacious +predark +predatory +predeathly +predecisive +predefective +predeficient +predefrayal +predegenerate +predeliberate +predelinquent +predemocratic +predemonstrative +predenial +predepartmental +predependable +predependent +predesirous +predespondent +predestitute +predeterminate +predeterminative +predetrimental +prediagnostic +predial +prediastolic +predicable +predicant +predicational +predicative +predicatory +predicrotic +predictable +predictory +predietary +predigital +prediligent +prediluvial +prediphtheritic +prediplomatic +predisastrous +prediscontented +prediscountable +predisordered +predispositional +predistrustful +predivinable +predocumentary +predomestic +predominant +predorsal +predoubtful +predramatic +preearthly +preearthquake +preeconomic +preeconomical +preeditorial +preeducational +preeffective +preeffectual +preelective +preelectric +preelectrical +preelemental +preelementary +preeligible +preemergency +preeminent +preemotional +preemptive +preengineering +preenjoyable +preenvironmental +preepochal +preeruptive +preesophageal +preestival +preeternal +preevident +preevolutional +preevolutionary +preexact +preexceptional +preexclusive +preexistent +preexpeditionary +preexperimental +preexplanatory +preexpressive +preextensive +prefamiliar +prefamous +prefashioned +prefatory +prefavorable +prefearful +prefectorial +prefectural +preferable +preferential +preferrous +prefertile +prefeudal +prefigurative +prefinancial +prefixable +prefixal +preflagellate +preflagellated +preflood +preflowering +preforbidden +preformationary +prefraternal +prefriendly +prefrontal +prefunctional +prefuneral +pregame +preganglionic +pregastrular +pregenital +pregeological +preggers +preglacial +pregnable +pregnant +pregranitic +preharmonious +prehazard +prehemiplegic +prehensible +prehensile +prehexameral +prehistoric +preholiday +prehostile +prehuman +preimaginary +preimitative +preimperial +preimportant +preimpressive +preinaugural +preindebted +preindependent +preinductive +preindulgent +preindustrial +preinflectional +preinjurious +preinsinuative +preinstructional +preinstructive +preintellectual +preintelligent +preinterpretative +preintimate +preinvasive +preinventive +preirrigational +prejournalistic +prejudiceless +prejudiciable +prejudicial +prejunior +prejuvenile +prelabial +prelacteal +prelanguage +prelaryngoscopic +prelatic +prelawful +prelegal +prelegendary +prelegislative +prelexical +preliable +preliberal +preliminary +prelingual +preliterary +preliterate +prelithic +preludial +preludious +prelumbar +preluxurious +premandibular +premaniacal +premarital +prematerial +prematrimonial +premature +premaxillary +premed +premedical +premedieval +premeditative +premegalithic +premenstrual +premethodical +premilitary +premillennial +premodern +premolar +premonarchal +premonarchial +premonarchical +premonetary +premonitory +premonumental +premoral +premorbid +premorning +premorse +premortal +premortuary +premorula +premosaic +premundane +premunicipal +premusical +premycotic +premythical +prenarcotic +prenarial +prenasal +prenatal +prenational +prenatural +prenaval +prenebular +preneglectful +prenegligent +preneolithic +prenephritic +preneural +preneuralgic +prenominal +prenominate +prenuptial +prenursery +preobedient +preobjective +preobservational +preobtainable +preobtrusive +preobvious +preoccasioned +preoccipital +preoccupied +preoceanic +preocular +preodorous +preoesophageal +preoffensive +preofficial +preopposed +preoptic +preoptimistic +preoral +preorbital +preorganic +preoriginal +preornamental +preotic +prepalaeolithic +prepalatal +prepalatine +prepaleolithic +preparative +preparatory +prepared +preparliamentary +preparoxysmal +prepartisan +prepatrician +prepectoral +prepense +preperitoneal +prepersuasive +preperusal +prephthisical +prepigmental +prepineal +prepious +prepituitary +preplacental +prepoetic +prepoetical +prepolice +prepolitic +prepolitical +preponderant +prepositional +prepositive +prepossessing +prepossessionary +preposterous +prepotent +prepractical +preprandial +prepreference +preprimary +preprimitive +preprophetic +preprostatic +preprudent +prepsychological +prepueblo +prepunctual +prepurposive +preputial +prepyloric +preracing +preradio +prerailroad +prerailway +prerational +preready +prerebellion +prerectal +prereform +prereformation +prereformatory +preregal +prereligious +prerenal +prerepublican +prerequisite +prerespectable +preresponsible +prerestoration +prerevolutionary +prerheumatic +prerighteous +preromantic +preroyal +presacral +presacrificial +presageful +presanguine +presanitary +presartorial +presatisfactory +presavage +presbyteral +presbyterial +presbyterian +prescholastic +preschool +prescient +prescientific +prescout +prescribable +prescriptible +prescriptive +preseasonal +presecular +presedentary +presemilunar +preseminal +preseminary +present +presentable +presentational +presentative +presentient +presentimental +presentive +preseptal +preservable +preshown +preshrunk +presidial +presidiary +preslavery +presocial +presolar +presophomore +prespecific +presphenoid +prespinal +prespiracular +pressable +pressing +pressor +pressureless +prest +prestatistical +presteam +prestidigitatory +prestigious +prestricken +prestubborn +prestudious +presubsistent +presubstantial +presuccessful +presufficient +presuggestive +presuitable +presumable +presumptive +presumptuous +presupplemental +presupplementary +presuppurative +presurgery +presurgical +presusceptible +presuspicious +presutural +presymphonic +presymphysial +presymptomatic +presynsacral +presystematic +presystolic +pretangible +pretechnical +pretelegraph +pretelegraphic +pretelephone +pretelephonic +pretemperate +pretenceful +pretenceless +pretended +pretenseful +pretenseless +pretensive +pretentative +pretentious +preterhuman +preteritive +preterlegal +preterminal +preternatural +preterrestrial +preterritorial +pretheological +prethoracic +prethyroid +pretibial +pretimely +pretonic +pretorial +pretorian +pretracheal +pretraditional +pretribal +pretrochal +prettied +prettier +prettiest +pretty +prettying +prettyish +pretympanic +pretyphoid +pretypographical +pretyrannical +preumbonal +preunion +preutilizable +prevailing +prevalent +prevalid +prevenient +preventive +preventral +preverbal +prevertebral +previctorious +previgilant +previous +previsible +previsional +prevocalic +prevocational +prevolitional +prewar +prewilling +prewireless +preworldly +preworthy +preyouthful +prezygomatic +priapic +priapismic +priceable +priceless +pricey +pricklier +prickliest +prickly +prideful +prideless +priestless +priestlier +priestliest +priestlike +priestly +prim +primaeval +primal +primary +primatal +primatial +prime +primeval +primigenial +primitive +primitivistic +primogenial +primogenital +primogenitary +primordial +primsie +primulaceous +princeless +princelier +princeliest +princely +princesslike +principal +principled +printable +printanier +printerlike +printless +prior +prismatic +prisonlike +prissy +pristine +prius +private +privative +privier +privies +priviest +privileged +privy +proabolition +proabsolutism +proabsolutist +proabstinence +proacademic +proacceptance +proacquisition +proacquittal +proacting +proaction +proadjournment +proadministration +proadmission +proadoption +proadvertising +proadvertizing +proagitation +proagrarian +proagreement +proairplane +proalien +proalliance +proallotment +proalteration +proamateur +proamendment +proanarchic +proanarchy +proannexation +proapostolic +proappointment +proapportionment +proappropriation +proapproval +proarbitration +proaristocracy +proaristocratic +proarmy +proart +proassessment +proassociation +proatheism +proattack +proattendance +proauction +proaudience +proauthor +proautomation +probable +probanishment +probankruptcy +probargaining +probaseball +probasketball +probative +probeable +problematic +problockade +proboscidean +proboscidiform +proboxing +proboycott +probusiness +procambial +procapitalism +proceleusmatic +procellous +procensorship +procensure +procentralization +procephalic +processional +procharity +prochurch +procity +procivic +procivilian +proclassical +proclergy +proclerical +proclitic +procoercion +procollectivist +procollectivistic +procollegiate +procolonial +procomedy +procommercial +procommunist +procommunity +procommutation +procompensation +procompetition +procompromise +proconcession +proconciliation +proconfiscation +proconscription +proconservation +proconservationist +proconsolidation +proconstitutional +proconsultation +procontinuation +proconvention +proconviction +procrastinative +procrastinatory +procreative +procryptic +proctodaeal +proctodeal +proctologic +proctological +proctoscopic +procumbent +procurable +procuratorial +prodemocracy +prodemocrat +prodemocratic +prodeportation +prodigal +prodigious +prodisarmament +prodissolution +prodistribution +prodivision +prodivorce +prodromal +productile +productional +productive +proeducation +proelectrification +proelimination +proemial +proempire +proemployee +proemployer +proemployment +proenforcement +proenlargement +proequality +proevolution +proevolutionary +proevolutionist +proexecutive +proexperiment +proexperimentation +proexpert +proextension +profaculty +profanatory +profane +profarmer +profascist +profederation +professed +professional +proficient +profiction +profitable +profligate +profluent +proforeign +profound +profuse +profusive +progambling +progenitive +progenitorial +progestational +proglottic +proglottidean +prognathous +prognostic +prognosticable +programmable +programmatic +progravid +progressional +progressive +prohibitionary +prohibitive +prohibitory +proimmigration +proincrease +proindustrial +proindustrialisation +proindustrialization +proindustry +proinsurance +prointegration +prointervention +proinvestment +proirrigation +projectable +projectional +projective +prolabor +prolate +proleptic +proleptical +proletarian +proletary +proliferative +proliferous +prolific +prolificacy +prolix +prologlike +prologuelike +promarriage +promerger +promilitarism +promilitarist +promilitary +prominent +prominority +promisable +promiscuous +promiseful +promising +promissory +promoderation +promoderationist +promodern +promodernist +promodernistic +promonarchy +promonopolistic +promonopoly +promotional +promotive +prompt +promycelial +pronational +pronationalist +pronationalistic +pronative +pronaval +pronavy +prone +pronegotiation +pronephric +pronominal +pronounceable +pronounced +pronunciational +pronunciative +pronunciatory +propagable +propagational +propagative +propagatory +propanedioic +proparoxytone +proparoxytonic +propatriotic +propatronage +propayment +propellent +propenyl +propenylic +proper +propertied +prophesiable +prophetic +prophylactic +propionic +propitiable +propitiative +propitiatory +propitious +propless +propolitics +proportionable +proportional +proportionate +proportioned +proportionless +proposable +propositional +propraetorial +propraetorian +propretorial +propretorian +proprietary +proprietorial +proprivilege +proprofit +proptosed +propublication +propublicity +propunishment +propylic +proracing +prorailroad +prorealist +prorealistic +prorebel +proreconciliation +proreduction +proreform +prorefugee +prorepublican +proresearch +proresignation +prorestoration +prorestriction +prorevision +prorevolution +prorevolutionary +prorevolutionist +proritual +proromantic +prosaic +proscholastic +proscience +proscientific +proscribable +prosecrecy +prosecutable +proselike +prosely +proselytical +proselytistic +prosenchymatous +proslave +prosodemic +prosodic +prosodical +prospective +prospectless +prosperous +prossy +prosternal +prosthionic +prostomial +prostomiate +prostrate +prostrative +prostyle +prosubscription +prosubstitution +prosuffrage +prosupervision +prosupport +prosurgical +prosurrender +prosy +protandrous +protanomalous +protanopic +protariff +protax +protaxation +protean +protecting +protectional +protective +protectoral +protectorless +proteiform +proteinaceous +proteinic +proteinous +proteolytic +proterandrous +proterogynous +protestable +protestive +prothallium +prothalloid +prothetic +prothoracic +protistan +protistic +protogynous +protolithic +protomorphic +protonemal +protonematal +protonematoid +protonic +protopathic +protoplasmal +protoplasmatic +protoplasmic +protopoditic +protostelic +prototherian +prototrophic +prototypal +prototypic +prototypical +protozoal +protozoological +protozoonal +protozoulogical +protractible +protractile +protractive +protrade +protradition +protraditional +protragedy +protrudable +protrudent +protrusible +protrusile +protrusive +protuberant +protuberantial +proud +prouniformity +prounion +prounionist +prouniversity +provable +provaccination +provaccine +proventricular +proverbial +proverblike +providable +provident +providential +provincial +provisional +provisionless +provisory +provocational +provocative +prowar +prowed +prowessed +proximal +proximate +prudent +prudential +prudish +pruinose +prunable +prunted +prurient +pruriginous +pruritic +prying +psalmic +psalterial +psammead +psammophytic +psephological +pseudisodomic +pseudo +pseudoacademic +pseudoaccidental +pseudoaesthetic +pseudoaffectionate +pseudoaggressive +pseudoallegoristic +pseudoalveolar +pseudoamateurish +pseudoamatorial +pseudoamatory +pseudoambidextrous +pseudoameboid +pseudoanachronistic +pseudoanachronistical +pseudoanaphylactic +pseudoanarchistic +pseudoanatomic +pseudoanatomical +pseudoancestral +pseudoanemic +pseudoangelic +pseudoangelical +pseudoangular +pseudoanthropoid +pseudoanthropological +pseudoantique +pseudoapologetic +pseudoapoplectic +pseudoapoplectical +pseudoapplicative +pseudoapprehensive +pseudoaquatic +pseudoarchaic +pseudoaristocratic +pseudoaristocratical +pseudoarticulate +pseudoartistic +pseudoascetic +pseudoascetical +pseudoassertive +pseudoassociational +pseudoasymmetric +pseudoasymmetrical +pseudobankrupt +pseudobaptismal +pseudobenefactory +pseudobenevolent +pseudobiographic +pseudobiographical +pseudobiological +pseudobrachial +pseudocandid +pseudocaptive +pseudocarpous +pseudocartilaginous +pseudocentric +pseudocharitable +pseudochemical +pseudochylous +pseudoclerical +pseudocoelomate +pseudocollegiate +pseudocolumellar +pseudocommissural +pseudocompetitive +pseudoconfessional +pseudoconglomerate +pseudoconservative +pseudocorneous +pseudocotyledonal +pseudocotyledonary +pseudocourteous +pseudocritical +pseudocrystalline +pseudocubic +pseudocubical +pseudocultivated +pseudocultural +pseudodemocratic +pseudodiastolic +pseudodiphtherial +pseudodiphtheric +pseudodiphtheritic +pseudodivine +pseudodramatic +pseudoeconomical +pseudoeditorial +pseudoeducational +pseudoelectoral +pseudoembryonic +pseudoemotional +pseudoencephalitic +pseudoenthusiastic +pseudoepiscopal +pseudoequalitarian +pseudoerotic +pseudoerysipelatous +pseudoethical +pseudoetymological +pseudoevangelic +pseudoevangelical +pseudoexperimental +pseudofaithful +pseudofamous +pseudofeminine +pseudofeverish +pseudofinal +pseudogaseous +pseudogeneral +pseudogeneric +pseudogenerical +pseudogenteel +pseudogyrate +pseudohemal +pseudohermaphroditic +pseudoheroic +pseudoheroical +pseudohexagonal +pseudohistoric +pseudohistorical +pseudohuman +pseudohumanistic +pseudohypertrophic +pseudoidentical +pseudoimpartial +pseudoindependent +pseudoinsane +pseudoinspirational +pseudoinspiring +pseudointernational +pseudointernationalistic +pseudoinvalid +pseudoisometric +pseudolabial +pseudolaminated +pseudolateral +pseudolegal +pseudolegendary +pseudolegislative +pseudoliberal +pseudolinguistic +pseudoliterary +pseudolobar +pseudomasculine +pseudomedical +pseudomedieval +pseudomilitaristic +pseudomilitary +pseudoministerial +pseudomiraculous +pseudomodern +pseudomodest +pseudomonastic +pseudomonastical +pseudomonoclinic +pseudomonocyclic +pseudomoral +pseudomoralistic +pseudomorular +pseudomultilocular +pseudomultiseptate +pseudomythical +pseudonarcotic +pseudonational +pseudonoble +pseudonymous +pseudooccidental +pseudoofficial +pseudoorganic +pseudooriental +pseudoorthorhombic +pseudooval +pseudopagan +pseudopapal +pseudoparallel +pseudoparalytic +pseudoparasitic +pseudopatriotic +pseudopediform +pseudoperipteral +pseudopermanent +pseudophallic +pseudophilanthropic +pseudophilanthropical +pseudophilosophical +pseudopious +pseudopodal +pseudopoetic +pseudopoetical +pseudopolitic +pseudopolitical +pseudopopular +pseudoporphyritic +pseudopregnant +pseudopriestly +pseudoprimitive +pseudoprofessional +pseudoprofessorial +pseudoprophetic +pseudoprophetical +pseudoprosperous +pseudoprostyle +pseudopsychological +pseudopyriform +pseudorealistic +pseudoreformatory +pseudoreformed +pseudoregal +pseudoreligious +pseudorepublican +pseudoresident +pseudoresidential +pseudorheumatic +pseudorhombohedral +pseudoromantic +pseudoroyal +pseudosacred +pseudosacrilegious +pseudosatirical +pseudoscalar +pseudoscholarly +pseudoscholastic +pseudoscientific +pseudosemantic +pseudosensational +pseudoservile +pseudosessile +pseudosiphonal +pseudosiphonic +pseudoskeletal +pseudosocial +pseudosocialistic +pseudospectral +pseudospherical +pseudospiritual +pseudosquamate +pseudostalactitic +pseudostalagmitic +pseudostigmatic +pseudostudious +pseudosubtle +pseudosuicidal +pseudosymptomatic +pseudosyphilitic +pseudotetragonal +pseudotribal +pseudotripteral +pseudovarian +pseudovelar +pseudoviperine +pseudoviperous +pseudoviscous +pseudozealous +pseudozoogloeal +pseudozoological +psilanthropic +psilotic +psittacine +psittacistic +psoatic +psoriatic +psychasthenic +psychedelic +psychiatric +psychiatrical +psychic +psychoactive +psychoanalytic +psychoanalytical +psychobiologic +psychobiological +psychodelic +psychodiagnostic +psychogalvanic +psychogenetic +psychogenic +psychographic +psycholinguistic +psychological +psychometric +psychometrical +psychomotor +psychoneurotic +psychopathologic +psychopathological +psychopharmacologic +psychopharmacological +psychoprophylactic +psychosexual +psychosocial +psychosomatic +psychotherapeutic +psychotic +psychotomimetic +psychotropic +psychrometric +psychrometrical +psychrophilic +pteridological +pterocarpous +pterodactylic +pterodactylid +pterodactyloid +pterodactylous +pterygial +pterygoid +pterylographic +pterylographical +pterylological +ptomainic +ptotic +puberulent +pubescent +pubic +public +pucka +puckery +puddinglike +puddly +pudgy +puerile +puerperal +puffier +puffiest +puffy +puggish +puggy +pugilistic +pugilistical +pugnacious +puir +puisne +puissant +pukka +puling +pulleyless +pulmonary +pulmonate +pulmonic +pulpier +pulpiest +pulpital +pulpitless +pulpless +pulplike +pulpy +pulsatile +pulsatory +pulverable +pulverisable +pulverizable +pulverulent +pulverulently +pulvinate +punchable +punchier +punchiest +punchy +punctate +punctilious +punctual +punctuative +punditic +pungent +punier +puniest +punishable +punitive +puny +pupal +pupillary +pupilless +pupiparous +puppyish +puppylike +purblind +purchasable +pure +purebred +purehearted +purer +purest +purgatorial +purgeable +puriform +puristic +puristical +puritanical +purplish +purposeful +purposeless +purposive +purpuric +purseless +purselike +pursier +pursiest +pursuable +pursuant +pursy +purulent +puruloid +pushed +pushier +pushiest +pushing +pushy +pusillanimous +puslike +pusslike +pustulant +pustular +pustuled +pustulous +putaminous +putative +putrefiable +putrescent +putrescible +putrid +putrilaginous +pyaemic +pycnidial +pycnostyle +pyelitic +pyelographic +pyelonephritic +pyemic +pygmoid +pygmyish +pygostyled +pygostylous +pyic +pyknic +pyloric +pyogenic +pyoid +pyorrheal +pyorrheic +pyorrhoeal +pyorrhoeic +pyosepticemic +pyramidal +pyramidical +pyramidlike +pyrenocarpic +pyrenocarpous +pyretic +pyrheliometric +pyridic +pyriform +pyritic +pyrochemical +pyroclastic +pyrocrystalline +pyroelectric +pyrogallic +pyrogenic +pyrogenous +pyrographic +pyroligneous +pyrological +pyrolytic +pyromagnetic +pyromaniacal +pyromantic +pyrophoric +pyrosulfuric +pyrotechnic +pyroxenic +pyrrolic +pyruvic +pythogenic +quadrangled +quadrantal +quadrantlike +quadrennial +quadric +quadricipital +quadrifid +quadrilateral +quadrilingual +quadripartite +quadrivalent +quadrivial +quadrophonics +quadrumanous +quadrupedal +quadruplex +quadruplicate +quadruplication +quadruplicature +quaggier +quaggiest +quaggy +quaillike +quaint +quakier +quakiest +quaky +qualifiable +qualificatory +qualified +qualitative +qualityless +qualmish +quantal +quantifiable +quantitative +quantummechanical +quaquaversal +quarantinable +quare +quarrelsome +quarriable +quarryable +quartan +quartered +quarterly +quartermasterlike +quartic +quartus +quartziferous +quartzitic +quaternary +quaternate +quatrefoiled +quattuordecillionth +quaverous +quavery +queanish +queanlike +queasier +queasiest +queasy +queenless +queenlier +queenliest +queenlike +queenly +quellable +quenchable +quenchless +quercetic +quercine +querulous +questionable +questioning +questionless +questorial +quibbling +quick +quicksilvery +quiescent +quiet +quietistic +quilleted +quilted +quinary +quinate +quincuncial +quindecennial +quindecillionth +quinoidal +quinonoid +quinquefid +quinquefoliate +quinquennial +quinquepartite +quinquevalent +quinsied +quintan +quintessential +quintic +quintuplicate +quippish +quittable +quivery +quixotic +quizzable +quizzical +quodlibetic +quodlibetical +quondam +quotable +quotidian +rabbinical +rabbinistic +rabbinistical +rabbinitic +rabic +rabid +racemed +racemic +racemose +racemous +rachidial +rachidian +rachiform +rachitic +racial +racialistic +racier +raciest +racing +racketlike +rackety +rackle +racy +raddled +radiable +radial +radiant +radiational +radiative +radiatus +radical +radicant +radiculose +radioactive +radiobiologic +radiobiological +radiochemical +radiogenic +radiographic +radiographical +radioisotopic +radiological +radiolucent +radioluminescent +radiometric +radiopaque +radiophonic +radioscopic +radioscopical +radiosensitive +radiosymmetrical +radiotelegraphic +radiotelephonic +radiotoxic +radishlike +radular +raffish +rafflesiaceous +ragged +raggedy +ragtimey +railwayed +railwayless +rainbowlike +rainbowy +rainier +rainiest +rainless +rainproof +rainy +raisable +raiseable +raised +raisiny +rajasic +raked +rakish +rallentando +ralliform +ralline +ramal +rambunctious +ramentaceous +ramiform +ramlike +rammish +ramose +rampageous +rampant +ramshackle +ramstam +ramulose +ranchless +ranchlike +rancid +rancorous +randie +random +randy +ranged +rangier +rangiest +rangy +ranking +rankish +rankless +ranular +ranunculaceous +rapacious +rapid +rapiered +rapt +raptorial +raptureless +rapturous +rare +rarefactional +rarefactive +rarefiable +rarefied +rarer +rareripe +rarest +raring +rascallike +rascally +rash +rashlike +rasorial +raspier +raspiest +rasping +raspy +ratable +rateable +ratepaying +rath +rathe +rational +ratite +ratlike +rattier +rattiest +rattish +rattlebrained +rattleheaded +rattly +ratty +raucous +raunchy +ravelly +ravening +ravenous +raviney +raving +ravishing +raw +rawboned +rawish +rayless +razorless +reachable +reactionary +reactive +readable +readaptable +readaptive +readier +readjustable +readorning +ready +readying +real +realestate +realisable +realistic +realizable +realizing +realterable +reanalyzable +reanalyzed +reapable +reapproachable +rearmost +rearrangeable +rearward +reasonable +reasoned +reattachable +rebarbative +rebellike +rebellious +rebiddable +reblown +reboant +reborn +rebuffable +rebuttable +recalcitrant +recallable +recapitulative +recapitulatory +recappable +receivable +recent +receptive +receptual +recercelae +recessional +recessive +rechargeable +recherch +recidivistic +recidivous +reciprocal +reciprocative +reciprocatory +recitable +reckless +reckonable +reclaimable +reclinable +reclinate +reclivate +reclosable +recloseable +reclusive +recognisable +recognizable +recollected +recollective +recommendable +recommendatory +recompensable +recompensatory +reconcilable +reconciliatory +recondite +reconstituted +reconstructed +reconstructible +reconstructional +reconstructionary +reconstructive +recordable +recordless +recoupable +recoverable +recreant +recreational +recreative +recreatory +recriminative +recriminatory +recrudescent +recruitable +rectal +rectangular +rectilinear +rectricial +recumbent +recuperative +recurrent +recursive +recurvate +redactional +redder +reddest +reddish +redeemable +redeeming +redemandable +redemptional +redemptionless +redemptory +redhibitory +redintegrative +redissoluble +redistillable +redivivus +redolent +redoubtable +redoubted +redressable +redressible +reduced +reductional +reductive +redundant +reduplicative +reduplicatively +reedier +reediest +reedy +reeky +reeligible +reeligibly +reemergent +reentrant +refertilizable +refillable +refined +reflectible +reflective +reflexional +reflexive +refluent +reforgeable +reformable +reformative +reformed +refractable +refractional +refractive +refractometric +refractory +refracturable +refrangible +refreshful +refreshing +refrigerative +refrigeratory +refringent +refulgent +refundable +refusable +refutable +refutative +regainable +regal +regardable +regardant +regardful +regardless +regenerable +regenerative +regerminative +regicidal +regimental +regional +regionalistic +registerable +registered +registrable +registrational +regnal +regnant +regressive +regretable +regretful +regrettable +regulable +regular +regulative +reguline +rehabilitative +rehearsable +reincorporate +reinflatable +reissuable +reissuably +reiterant +reiterative +rejectable +rejective +rejoiceful +relapsable +relatable +related +relational +relationless +relative +relativistic +relaxative +relaxatory +relaxer +releasable +releasible +relegable +relentless +relevant +reliable +reliant +reliefless +relievable +religionistic +religiose +religious +relishable +relivable +relucent +reluctant +remanent +remarkable +remediable +remedial +remediless +remiform +remigial +remillable +remindful +reminiscent +remiss +remissible +remittable +remittent +remonstrative +remontant +remorseful +remorseless +remote +remoter +remotest +removable +removed +remunerable +remunerative +renal +renascent +renderable +rendible +renegotiable +reniform +renitent +renounceable +renovative +renowned +renownless +rentable +renunciable +renunciative +renunciatory +renversa +reobtainable +repairable +repand +reparable +reparative +repayable +repealable +repeatable +repeated +repellent +repentant +repetitious +repetitive +replete +repletive +reportable +reportorial +reposeful +repouss +repoussa +reprehendable +reprehensible +representational +representationalistic +repressible +repressive +reproachable +reproachful +reproachless +reprobate +reprobationary +reprobative +reprocessed +reproducible +reproductive +reproofless +reprovable +reptant +reptilelike +reptilian +reptiloid +republican +republishable +repudiatory +repugnant +repulsive +repunishable +repurchase +reputable +reputationless +reputed +requisite +requisitionary +requitable +resalable +rescissible +rescissory +resealable +resectional +resedaceous +resemblant +resentful +reservable +reserved +reserveless +residential +residentiary +residual +residuary +resigned +resilient +resiniferous +resinoid +resinous +resistant +resistible +resistive +resistless +resoluble +resolute +resolutive +resolvable +resolved +resolvent +resonant +resorbent +resorptive +resourceful +respectable +respectful +respective +respirable +respirational +resplendent +responseless +responsible +responsive +restful +restiform +resting +restitutive +restitutory +restive +restless +restorable +restorative +restrainable +restricted +restrictive +resultant +resumable +resummonable +resumptive +resupinate +resupine +resurgent +resurrectional +resurrectionary +resurrective +resuscitable +resuscitative +retaliative +retaliatory +retardative +retarded +retentive +retial +retiary +reticent +reticular +reticulate +reticuloendothelial +retiform +retinued +retiring +retouchable +retractable +retractible +retractile +retral +retreatal +retreative +retributive +retrievable +retroactive +retrobulbar +retrocessive +retrodirective +retroflex +retrogradatory +retrograde +retrogressive +retrolental +retrorse +retroserrate +retroserrulate +retrospective +retrouss +retroussa +retrusive +returnable +retuse +reunionistic +reunitable +reusable +reuseable +revealable +revelational +revelative +revelatory +revengeful +revengeless +revenual +revenued +reverable +reverberative +reverberatory +reverend +reverent +reverential +reversible +revertible +revertive +reveverberatory +revibrant +reviewable +reviewless +revisional +revisionary +revisitable +revisory +revivable +revivalistic +reviviscent +revocable +revocative +revolting +revolute +revolving +revulsionary +revulsive +rewarding +rewirable +rhagonoid +rhamnaceous +rhapsodic +rhapsodistic +rhematic +rheologic +rheological +rheometric +rheoscopic +rheostatic +rheotactic +rheotropic +rhetorical +rheumatic +rheumatoid +rheumic +rheumy +rhinal +rhinencephalic +rhinencephalous +rhinocerotic +rhinologic +rhinological +rhinoplastic +rhizocarpous +rhizocephalous +rhizogenic +rhizomatous +rhizomorphous +rhizophagous +rhizopodan +rhizopodous +rhodic +rhombic +rhombohedral +rhonchial +rhotacistic +rhotic +rhynchocephalian +rhythmic +rhythmical +riant +ribald +ribbonlike +ribbony +ribless +riblike +rich +rickettsial +rickety +ridable +rident +ridgelike +ridgepoled +ridgier +ridgiest +ridgy +ridiculous +rife +riftless +right +rightable +righteous +rightful +rightish +rightist +rightward +rigid +rigoristic +rigorous +rigouristic +riley +rimfire +rimless +rimose +rimy +rindless +rindy +ringed +ringent +ringless +ringleted +ringlike +riotistic +riotous +riparian +ripe +ripping +ripply +risible +riskier +riskiest +riskless +risky +risqu +rissola +ritardando +riteless +ritenuto +ritualistic +ritzier +ritziest +ritzy +riverine +riverless +riverlike +rivetless +roadless +roadworthy +roan +roaring +roastable +roasting +robeless +roborant +robotlike +robust +robustious +rockable +rockered +rockier +rockiest +rocky +rodded +rodless +rodlike +roentgenographic +roentgenologic +roentgenological +roentgenopaque +roentgenoscopic +rogatory +roguish +roilier +roiliest +roily +rollable +rollicking +rollicksome +rolling +rollneck +rolltop +roman +romantic +romanticistic +rompish +roofless +rooflike +rookier +rookiest +rooky +roomier +roomiest +roomy +rooted +rootless +rootlike +ropable +ropeable +ropier +ropiest +ropy +rosaceous +roseate +roseless +roselike +roseolar +rosiny +rostral +rosy +rotary +rotatable +rotational +rotative +rotatory +rotiferal +rotiferous +rotproof +rotten +rotund +rough +roughish +roughshod +round +rounded +roundheaded +rounding +roundish +roupet +roupy +rousing +rowable +rowdy +rowdyish +royal +royalistic +rubbery +rubbisy +rubblier +rubbliest +rubbly +rubeolar +rubescent +rubiaceous +rubicund +rubidic +rubied +rubify +rubiginous +rubious +rubricated +rudaceous +rudderless +rudderlike +ruddier +ruddiest +ruddy +rude +rudimentary +rudish +rueful +rufescent +ruffed +ruffled +rufflike +rufous +rugged +rugose +rugulose +ruinable +ruinous +rumbly +rumbustious +rumless +rumpless +runcinate +runed +runelike +runic +runnier +runniest +running +runny +runtgenographic +runtgenologic +runtgenological +runtgenoscopic +runtier +runtiest +runtish +runty +rupturable +rural +rushier +rushiest +rushy +russetish +russetlike +russety +rustic +rustier +rustiest +rustproof +rustred +rusty +rutaceous +ruthenic +ruthenious +ruthful +ruthless +rutilant +rutilated +ruttier +ruttiest +ruttish +rutty +sabbatical +saberlike +saboted +sabulous +saccharic +sacchariferous +saccharine +saccharofarinaceous +saccharoid +saccharolytic +saccharometric +saccharometrical +saccular +sacculate +sacerdotal +sachemic +sackclothed +sacklike +saclike +sacral +sacramental +sacrarial +sacred +sacrificeable +sacrificial +sacrilegious +sacroiliac +sacrosanct +sacrosciatic +sad +sadistic +safe +sagacious +sagittal +sagittate +said +sailorlike +sailorly +sainted +saintless +saintlier +saintliest +saintly +salaamlike +salable +salacious +salamanderlike +salamandrine +salaried +salaryless +saleable +salebrous +salic +salicaceous +salicylic +salient +saliferous +saline +sallow +sallowish +sallowy +salmonlike +salmonoid +salpiform +salpingian +salpingitic +saltant +saltato +saltatorial +saltatory +salted +saltier +saltigrade +saltish +saltless +saltwater +salty +salubrious +salutary +salutational +salutationless +salutatory +salvable +salvageable +salvational +salverform +samariform +same +sanative +sanatory +sanctified +sanctimonious +sanctionable +sanctionative +sanctionless +sanctuaried +sanded +sandier +sandiest +sandless +sandlike +sandpapery +sandy +sane +saner +sanest +sanguiferous +sanguinary +sanguine +sanguineous +sanguinolent +sanguivorous +sanidinic +sanious +sanitarian +sanitary +santalaceous +sapheaded +saphenous +sapid +sapient +sapiential +sapindaceous +saponaceous +saporific +saporous +sapotaceous +sappier +sappiest +sappy +sapremic +saprogenic +sapropelic +saprophagous +saprophytic +saprozoic +sarcastic +sarcoid +sarcolemmic +sarcolemmous +sarcological +sarcophagous +sarcous +sardonic +sarkless +sarky +sarmentose +saronic +sarraceniaceous +sartorial +sassier +sassy +satanic +satem +satiable +satinlike +satiny +satirical +satirisable +satisfactionless +satisfactory +satisfiable +satisfied +sattvic +saturable +saturated +saturnine +satyric +satyrical +satyrlike +sauceless +saucier +sauciest +saucy +sauncier +saunciest +sauncy +saurian +saurischian +sausagelike +saussuritic +sauta +savable +savage +saveable +saving +savorier +savoriest +savorless +savorous +savourier +savouriest +savourless +savourous +savoury +sawdustish +sawdusty +sawlike +saxicoline +saxicolous +saxifragaceous +saxophonic +sayable +scabbardless +scabbier +scabbiest +scabby +scabicide +scabietic +scabious +scablike +scabrous +scalable +scalariform +scalawaggy +scaldic +scaled +scalelike +scalene +scalenohedral +scalier +scaliest +scallawaggy +scalled +scalpless +scaly +scampish +scandent +scandic +scannable +scansorial +scant +scantier +scantiest +scanty +scaphocephalic +scaphocephalous +scaphoid +scapiform +scapose +scapular +scapulary +scapulohumeral +scarabaeiform +scarabaeoid +scarce +scarcer +scarcest +scarecrowish +scarecrowy +scarfless +scarflike +scarious +scarlatinoid +scarless +scary +scatheless +scathing +scatologic +scatological +scatophagous +scatterable +scatterbrained +scattershot +scatty +scenic +scenographic +scenographical +scentless +scepterless +sceptical +sceptral +schedular +schematic +schemeful +schemeless +scheming +scherzando +schismatic +schismless +schistose +schizo +schizocarpic +schizocarpous +schizogenetic +schizogenous +schizogonous +schizoid +schizomycetic +schizomycetous +schizophrenic +schizophyceous +schizophytic +schizothymic +schmaltzy +schmalzier +schmalziest +schmalzy +scholarless +scholastic +scholiastic +schoolboyish +schoolgirlish +schorlaceous +sciaenid +sciaenoid +sciatic +sciential +scientific +scientistic +scimitared +scincoid +scintillant +scirrhoid +scirrhous +scissile +scissorlike +sciurine +sciuroid +sclerenchymatous +scleritic +scleroblastic +sclerodermatous +scleroid +sclerometric +sclerophyllous +sclerosal +sclerosed +sclerotial +sclerotic +sclerotized +sclerotomic +sclerous +scoldable +scolopendrine +scombroid +scopate +scopeless +scopophilic +scoptophilic +scorbutic +scoreless +scoriaceous +scornful +scorpaenoid +scorpioid +scorpionic +scotomatous +scotopic +scoundrelly +scowlful +scraggly +scraggy +scrannel +scrapable +scrappier +scrappiest +scrappy +scratchable +scratchier +scratchiest +scratchless +scratchlike +scratchy +scrawlier +scrawliest +scrawly +scrawnier +scrawniest +scrawny +screaky +screeching +screwable +screwed +screwless +screwlike +screwy +scribal +scrimpier +scrimpiest +scrimpy +scripless +scriptural +scrobiculate +scroddled +scrofulous +scroggy +scrophulariaceous +scrotal +scrubbable +scrubbed +scrubbier +scrubbiest +scrubby +scruffier +scruffiest +scruffy +scrumptious +scrupleless +scrupulous +scrutable +sculpturesque +scumless +scumlike +scummier +scummiest +scummy +scungy +scurrile +scurrilous +scutate +scutcheonless +scutcheonlike +scutellate +scutelliform +scutiform +scyphate +scyphiform +scytheless +scythelike +seaborne +seafaring +seagirt +seagoing +sealable +seallike +seamanlike +seamier +seamiest +seamless +seamy +searchable +searching +searoving +seasick +seasonable +seasonal +seasonless +seatless +seaworthy +sebaceous +sebacic +sebiferous +seborrheal +seborrheic +sec +secernent +secessional +secluded +seclusive +second +secondary +secondsighted +secret +secretarial +secretionary +secretive +secretory +sectarian +sectile +sectional +sectoral +sectorial +secular +secularistic +secund +secundus +securable +secure +sedate +sedative +sedentary +sedged +sedimentary +sedimentologic +sedimentological +seditious +seduceable +seducible +seducive +seductive +sedulous +seeable +seedier +seediest +seedless +seedlike +seedy +seely +seeming +seemlier +seemliest +seemly +segmental +segmentary +segmentate +segreant +segregable +segregational +seigneurial +seignorial +seisable +seismic +seismographic +seismographical +seismologic +seismological +seismoscopic +seizable +sejant +selachian +selectable +selective +selenic +selenious +selenitic +selenitical +selenodont +selenographic +selenographical +selenotropic +selenous +selfish +selfishness +selfless +selfrestrained +selfsame +semantic +semaphoric +semaphorical +sematic +semblable +semeiologic +semeiological +semeiotic +semestral +semestrial +semiabsorbent +semiacademic +semiacademical +semiacetic +semiacid +semiacidic +semiacidified +semiacidulated +semiacrobatic +semiactive +semiadhesive +semiagricultural +semialcoholic +semiallegoric +semiallegorical +semialuminous +semianaesthetic +semianalytic +semianalytical +semianarchistic +semianatomic +semianatomical +semiandrogenous +semianesthetic +semiangular +semianimate +semianimated +semiannual +semianthropologic +semianthropological +semiaquatic +semiarchitectural +semiarid +semiarticulate +semiautomatic +semiautonomous +semibald +semibelted +semibiographic +semibiographical +semibiologic +semibiological +semiblasphemous +semibleached +semiboiled +semibold +semibouffant +semibourgeois +semibureaucratic +semicabalistic +semicabalistical +semicalcined +semicapitalistic +semicarbonate +semicaricatural +semicarved +semicatalytic +semicathartic +semicellulous +semicentenary +semicentennial +semichaotic +semichemical +semicircular +semicivilized +semiclassical +semiclerical +semiclinical +semiclosed +semicolloidal +semicolloquial +semicolonial +semicomatose +semicombined +semicomic +semicomical +semicommercial +semicommunicative +semiconcealed +semiconditioned +semiconical +semiconscious +semiconservative +semicontinuous +semiconventional +semiconvergence +semiconvergent +semicordate +semicrystalline +semicultivated +semicultured +semicured +semicylindric +semicylindrical +semicynical +semidaily +semidangerous +semideaf +semidecadent +semidecayed +semidefensive +semidefined +semidefinite +semidemented +semidependent +semidestructive +semidetached +semideterministic +semidiaphanous +semidictatorial +semidigested +semidirect +semidisabled +semidiurnal +semidivided +semidivine +semidivisive +semidomed +semidomestic +semidomesticated +semidormant +semidramatic +semidramatical +semidry +semiductile +semielastic +semielevated +semielliptic +semielliptical +semiemotional +semiempirical +semiepic +semiepical +semierect +semiexclusive +semiexecutive +semiexpanded +semiexpansible +semiexperimental +semiexposed +semiexpositive +semiexpository +semiexpressionistic +semiexternal +semiexternalized +semifictional +semifictionalized +semifigurative +semifine +semifinished +semifitted +semifixed +semifloating +semifluid +semiformal +semiformed +semifossilized +semifunctional +semifurnished +semifused +semifuturistic +semigeometric +semigeometrical +semiglazed +semiglobular +semigovernmental +semihard +semihardened +semiherbaceous +semiheretic +semiheretical +semihistoric +semihistorical +semihostile +semihumanistic +semihumanitarian +semihumanized +semihyperbolic +semihysterical +semiintoxicated +semijocular +semijudicial +semijuridic +semijuridical +semilegendary +semilegislative +semiliberal +semiliquid +semiliterate +semilucent +semiluminous +semilunar +semilunate +semilunated +semilyric +semilyrical +semimagical +semimagnetic +semimagnetical +semimalicious +semimalignant +semimanagerial +semimanneristic +semimanufactured +semimarine +semimat +semimaterialistic +semimathematical +semimature +semimechanical +semimechanistic +semimedicinal +semimembranous +semimetallic +semimetaphoric +semimetaphorical +semimild +semimineral +semimineralized +semiministerial +semimobile +semimoderate +semimonarchic +semimonarchical +semimonopolistic +semimonthly +semimoralistic +semimountainous +semimountainously +semimystic +semimystical +semimythic +semimythical +seminaked +seminal +seminarcotic +seminarial +seminarrative +seminasal +seminationalistic +seminationalized +seminervous +semineurotic +semineutral +seminiferous +seminivorous +seminocturnal +seminomadic +seminormal +seminude +semiobjective +semioblivious +semiofficial +semiopen +semioptimistic +semioratorical +semiorganic +semioriental +semiorthodox +semiotic +semioval +semiovate +semioviparous +semioxygenized +semipacifist +semipacifistic +semipaganish +semipalmate +semiparalysis +semiparalyzed +semiparasitic +semiparochial +semipassive +semipastoral +semipathologic +semipathological +semipatriotic +semipatterned +semipeaceful +semipedantic +semipedantical +semipendent +semipendulous +semiperceptive +semipermanent +semipermeable +semipervious +semipetrified +semiphenomenal +semiphilosophic +semiphilosophical +semiphosphorescent +semiphrenetic +semipictorial +semipious +semiplastic +semipneumatic +semipneumatical +semipoisonous +semipolitical +semipopular +semipopularized +semipostal +semipractical +semiprecious +semipreserved +semiprimitive +semiprivate +semipro +semiproductive +semiprofane +semiprofessional +semiprogressive +semiprone +semipropagandist +semiprotected +semiprotective +semiproven +semiprovincial +semipsychologic +semipsychological +semipsychotic +semipublic +semipunitive +semipunitory +semipurposive +semiradical +semirare +semirationalized +semiraw +semireactionary +semirealistic +semirebellious +semirefined +semireflexive +semireligious +semirepublican +semiresinous +semiresiny +semiresolute +semirespectable +semiretired +semireverberatory +semirevolutionary +semirhythmic +semirhythmical +semirigid +semirigorous +semiromantic +semiround +semirural +semisacred +semisaline +semisatiric +semisatirical +semisavage +semischolastic +semisecret +semisentimental +semisentimentalized +semiserious +semiskilled +semisocialistic +semisolemn +semisolid +semisomnambulistic +semisomnolent +semispeculative +semispheric +semispontaneous +semistiff +semistimulating +semistratified +semisubterranean +semisuburban +semisuccess +semisuccessful +semisupernatural +semisweet +semisynthetic +semitailored +semitextural +semitheatric +semitheatrical +semitheological +semitonic +semitraditional +semitrained +semitropical +semitruthful +semituberous +semiundressed +semiurban +semivitreous +semivocal +semivolatile +semivolcanic +semivoluntary +semivulcanized +semiweekly +semiwild +semiyearly +sempiternal +semplice +senary +senatorial +sendable +senescent +senile +senior +sensate +sensational +sensationistic +sensationless +senseless +sensible +sensitive +sensitometric +sensorimotor +sensory +sensual +sensualistic +sensuous +sententious +sentient +sentimental +sentimentless +sentinellike +sepaled +sepalled +sepaloid +separable +separative +separatory +septal +septarian +septariate +septate +septavalent +septempartite +septemviral +septenary +septendecillionth +septennial +septentrional +septic +septicaemic +septicemic +septicidal +septifragal +septilateral +septimal +septivalent +septuagenary +septuple +sepulchral +sequacious +sequent +sequential +sequestered +sequestrable +sequestral +sequined +seral +seraphic +seraphlike +sere +serene +serfish +serflike +seriate +sericate +sericeous +sericitic +sericultural +seriocomic +serious +serologic +serological +seromucous +seroresistant +serotinal +serotine +serous +serpentiform +serpentine +serpiginous +serrate +serried +serriform +serrulate +serumal +servable +servantless +servantlike +serviceable +servile +servo +servomechanical +sesamoid +sesquicentennial +sesquipedalian +sessile +sessional +setaceous +setal +setiform +setigerous +setose +settleable +setulose +sevenfold +seventeenth +seventh +seventieth +severable +severe +severer +severest +sewable +sewerless +sewerlike +sexagenary +sexagesimal +sexangular +sexavalent +sexcentenary +sexennial +sexier +sexiest +sexivalent +sexological +sexpartite +sextan +sextern +sextic +sextillionth +sextus +sexual +sexy +sforzando +shabbier +shabbiest +shabby +shadeful +shadeless +shadowed +shadowgraphic +shadowless +shadowlike +shadowy +shady +shaftless +shaftlike +shaggier +shaggiest +shaggy +shaglike +shakable +shakeable +shakier +shakiest +shaky +shalelike +shallow +shamanic +shamanistic +shamefaced +shameful +shameless +shantylike +shapable +shapeable +shaped +shapeless +shapelier +shapeliest +shapely +sharable +shareable +sharklike +sharp +shastraik +shastrik +shatterproof +shavable +shaven +shawlless +shawllike +sheaflike +sheared +shearless +sheathier +sheathiest +sheathlike +sheathy +shedable +sheddable +shedlike +sheenier +sheeniest +sheenless +sheepish +sheepless +sheeplike +sheer +sheetless +sheetlike +sheiklike +shelled +shellier +shelliest +shellproof +shellshocked +shelly +shelterless +shickered +shieldless +shieldlike +shier +shiest +shiftable +shiftier +shiftiest +shiftless +shifty +shill +shimmery +shingly +shinier +shiniest +shiny +shipless +shippable +shipshape +shirtless +shirty +shivery +shockheaded +shocking +shockproof +shoddy +shoeless +shogunal +shopsoiled +shopworn +shoreless +shoreward +short +shortheaded +shortish +shotten +showerless +showerlike +showerproof +showery +showier +showiest +showy +shredless +shredlike +shrewd +shrewish +shrewlike +shrieky +shrieval +shrill +shrimplike +shrineless +shrinelike +shrinkable +shroudless +shroudlike +shrubbier +shrubbiest +shrubby +shuddering +shunnable +shuttlelike +shy +shyer +shyest +sialagogic +sialoid +sibilant +sibilation +sibylic +sibyllic +sick +sickening +sicker +sicklemic +sicklied +sicklier +sickliest +sickly +sicklying +sideless +sidelong +sidereal +siderographic +siderostatic +siderotic +sidesplitting +sideward +siegeable +siest +sievelike +sighful +sighless +sighlike +sightable +sighted +sightless +sightlier +sightliest +sightly +sigilistic +sigillary +sigillate +sigmate +sigmoid +signatureless +significant +significative +silent +siliceous +silicic +silicious +silicotic +siliculose +silken +silkier +silkiest +silklike +silky +silly +siltier +siltiest +silty +silvan +silverish +silverless +silverlike +silvern +silvery +silvicolous +silvicultural +simaroubaceous +simian +similar +simious +simoniacal +simpatico +simple +simplex +simplicidentate +simplistic +simulacral +simulant +simulated +simulative +simulatory +simultaneous +sinal +sincere +sincipital +sinewless +sinewy +sinful +singable +single +singled +singling +singular +singultous +sinister +sinistral +sinistrocular +sinistrodextral +sinistrogyric +sinistrorse +sinistrous +sinkerless +sinless +sinlike +sinorespiratory +sinuate +sinuous +sinuslike +sinusoidal +siphonal +siphonic +siphonless +siphonlike +siphonophorous +sireless +sirenian +sirenic +sirenlike +sirupy +sissified +sissyish +sisterless +sisterlike +sisterly +sistroid +situational +sixfold +sixpenny +sixteenpenny +sixteenth +sixth +sixtieth +sixtypenny +sizable +sizeable +sized +sizier +siziest +sizy +skaldic +skateable +skeighish +skeletonless +skeletonlike +skeptical +sketchable +sketchlike +sketchy +skew +skewbald +skiable +skiagraphic +skiagraphical +skidproof +skiech +skiffless +skilful +skilled +skillful +skimpy +skinflinty +skinking +skinless +skinlike +skinned +skinnier +skinniest +skinny +skint +skintight +skirtless +skirtlike +skittish +skookum +skyborne +skyless +skylike +skyscraping +skyward +slabbery +slack +slaggier +slaggiest +slaggy +slakable +slakeable +slakeless +slangier +slangiest +slangy +slaphappy +slashing +slatier +slatiest +slatternly +slaty +slavish +slavocratic +sleazier +sleaziest +sleazy +sledlike +sleek +sleekier +sleekiest +sleekit +sleeky +sleepful +sleepier +sleepiest +sleepless +sleeplike +sleepy +sleetier +sleetiest +sleety +sleeveless +sleevelike +slender +sleuthlike +sliceable +slick +slickered +slickpaper +slidable +sliding +slier +sliest +slight +slighting +slim +slimier +slimiest +slimline +slimmer +slimming +slimsy +slimy +slinkier +slinkiest +slinky +slipless +slipover +slipperier +slipperiest +slipperlike +slippery +slippier +slippiest +slippy +slipshod +slithery +slitless +slitlike +sliverlike +slobbery +sloppier +sloppiest +sloppy +sloshed +sloshier +sloshiest +sloshy +slothful +slouchier +slouchiest +slouchy +sloughy +slovenlier +slovenliest +slovenly +slow +sludgier +sludgiest +sludgy +sluggish +sluglike +sluicelike +slumberless +slumberous +slummier +slummiest +slummy +slung +slurvian +slushier +slushiest +slushy +sluttish +slutty +sly +smacking +small +smallish +smaragdine +smarmy +smart +smartish +smarty +smashable +smashed +smashing +smearier +smeariest +smeary +smectic +smeeky +smellable +smellier +smelliest +smelly +smilacaceous +smileless +smirchless +smocklike +smokeless +smokelike +smokeproof +smokier +smokiest +smoky +smooth +smoothable +smorzando +smotherable +smothery +smudgeless +smug +smugger +smuggest +smutchier +smutchiest +smutchless +smutchy +smuttier +smuttiest +smutty +snaggy +snaglike +snaillike +snakelike +snakier +snakiest +snaky +snapless +snappable +snappier +snappiest +snappy +snareless +snarly +snatchable +snatchier +snatchiest +snatchy +snazzier +snazziest +snazzy +sneakier +sneakiest +sneaking +sneaky +snecked +sneerful +sneerless +snide +snider +snidest +sniffier +sniffiest +sniffish +sniffy +snipelike +snippier +snippiest +snippy +snitchier +snitchiest +snitchy +snively +snobbish +snod +snoopier +snoopiest +snoopy +snootier +snootiest +snooty +snoozy +snotty +snouted +snoutless +snoutlike +snowbound +snowcapped +snowier +snowiest +snowless +snowlike +snowy +snubbier +snubbiest +snubby +snuffier +snuffiest +snuffly +snuffy +snug +snugger +snugging +soapier +soapiest +soapless +soaplike +soapsudsy +soapy +soarable +soaring +sober +sobersided +sobriquetical +sociable +social +socialistic +societal +socioeconomic +sociogenetic +sociogenic +sociologistic +sociopathic +sociopolitical +sociopsychological +socketless +sockless +socko +sodaless +sodden +sodless +soft +softhearted +softish +soggy +soign +soigna +sola +solanaceous +solar +soldierly +sole +soleless +solemn +solenoidal +solfataric +soli +solicitous +solid +solidary +solidifiable +solidillu +solidungulate +solitary +solitudinous +soloistic +solstitial +soluble +solus +solutional +solutus +solvable +solvent +solvolytic +somatic +somatogenic +somatologic +somatological +somatopleural +somatopleuric +somatotonic +somber +sombre +sombrous +somnambulant +somnambulistic +somnifacient +somniferous +somnific +somniloquous +somnolent +sonant +sonantal +songful +songless +songlike +sonic +soniferous +sonless +sonlike +sonorous +sonsy +soony +soothfast +sooty +sophistic +sophisticated +sophomoric +soporiferous +soporific +soppier +soppiest +sopping +soppy +sorbefacient +sorbic +sorcerous +sordid +sore +sorediate +sorer +sorest +soricine +soritic +soritical +sorrier +sorriest +sorrowless +sorry +sortable +sortilegic +sostenuto +sotted +sottish +sottishness +soubrettish +souffla +soughless +soulful +soulless +soullike +soundable +sounding +soundless +soundproof +soupier +soupiest +soupless +souplike +soupy +sour +sourceful +sourceless +sourdough +sourish +soutenu +southbound +southeasterly +southeastern +southeastward +southeastwardly +southerly +southern +southernly +southernmost +southmost +southward +southwesterly +southwestern +southwestward +southwestwardly +sowlike +sozzled +spaceless +spacial +spacious +spadelike +spadiceous +spagyric +spanaemic +spanemic +spangly +spareable +sparing +sparkish +sparkless +sparklike +sparlike +sparoid +sparrowless +sparrowlike +sparry +sparse +sparser +sparsest +spasmodic +spasmolytic +spasmophilic +spastic +spathaceous +spathic +spathose +spathulate +spatial +spatiotemporal +spatterdashed +spatulate +spaviet +spavined +speakable +speaking +special +specialistic +specifiable +specific +specificative +specious +speckless +spectacled +spectacleless +spectaclelike +spectacular +spectatorial +spectral +spectrochemical +spectrographic +spectroheliographic +spectrohelioscopic +spectrological +spectrometric +spectrophotometric +spectroscopic +spectroscopical +specular +speculative +speechless +speedful +speedier +speediest +speedless +speedy +spelaean +spellable +spellbound +spendable +spermacetilike +spermatic +spermatocytal +spermatogonial +spermatoid +spermatophoral +spermatozoal +spermatozoan +spermatozoic +spermic +spermophytic +spermous +sphagnous +sphenic +sphenographic +sphenoid +spheral +sphereless +spherelike +spherical +spheroidal +spherular +spherulate +spherulitic +sphery +sphincteral +sphincterial +sphingine +sphinxian +sphinxlike +sphygmic +sphygmographic +sphygmoid +sphygmomanometric +spicate +spiceable +spiceless +spicelike +spicey +spicier +spiciest +spiculate +spicy +spidery +spiffier +spiffiest +spiffing +spiffy +spiflicated +spikelike +spikier +spikiest +spiky +spinaceous +spinachlike +spinal +spindlelike +spindlier +spindliest +spindling +spindly +spined +spineless +spinelike +spinescent +spinier +spiniest +spiniferous +spinnable +spinose +spinous +spinproof +spinulose +spiny +spiracular +spiral +spirant +spirantal +spired +spireless +spiriferous +spirillar +spirited +spiritistic +spiritless +spiritlike +spiritous +spiritual +spiritualistic +spirituel +spirituous +spirochaetotic +spirochetotic +spirographic +spiroid +spirometric +spirometrical +spiry +spissatus +spissus +spiteful +spiteless +splanchnic +splanchnologic +splashier +splashiest +splashy +splay +spleenful +spleenier +spleeniest +spleenish +spleeny +splendent +splendid +splendiferous +splendorous +splendrous +splenetic +splenial +splenic +spliceable +splinterless +splintery +splittable +splitting +splurgy +spoilable +spoilless +spokeless +spondaic +spondylitic +spongeless +spongelike +spongier +spongiest +spongioblastic +spongy +spontaneous +spookier +spookiest +spooky +spoollike +spoonier +spooniest +spoonless +spoonlike +spoony +sporadic +sporal +sporangial +sporocystic +sporogenous +sporogonial +sporoid +sporophoric +sporophyllary +sporophytic +sporotrichotic +sportful +sportier +sportiest +sporting +sportive +sportless +sportsmanlike +sportsmanly +sporty +sporular +spotless +spotlike +spottable +spotted +spotty +spouseless +spouted +spoutless +spoutlike +sprayful +sprayless +spraylike +spreathed +sprier +spriest +spriggier +spriggiest +spriggy +sprightful +sprightlier +sprightliest +sprightly +springier +springiest +springless +springlike +springy +spriteless +spritelike +sprucer +sprucing +spry +spryer +spryest +spumescent +spunkier +spunkiest +spunkless +spunky +spurious +spurless +spurlike +spurred +spurtive +squabbier +squabbiest +squabby +squalid +squallier +squalliest +squally +squamate +squamous +squamulose +squarable +squarelike +squaretoed +squarish +squarrose +squashier +squashiest +squashy +squeakier +squeakiest +squeaky +squeamish +squiffy +squiggly +squinty +squirarchal +squirarchical +squirearchal +squirearchical +squireless +squirelike +squirmier +squirmiest +squirmy +squirrelish +squirrellike +squirrelly +squishier +squishiest +squishy +squshier +squshiest +squshy +staccato +stacked +stackless +stageable +staged +stagey +stagier +stagiest +staglike +stagnant +stagnatory +stagy +staid +stainable +stainful +stainless +stairless +stairlike +stalactiform +stalagmitic +stalagmitical +stalagmometric +stale +stalkable +stalked +stalkless +stalky +stalwart +stalworth +staminal +staminate +staminiferous +stampedable +stanchable +standardizable +standoffish +stannic +stanniferous +stannous +stanzaed +stapedial +staphylomatic +staphyloplastic +staphylorrhaphic +starchless +starchlike +starchy +stark +starless +starlike +starred +starrier +starriest +starry +stasimetric +statable +statant +stateable +stated +stateless +statelier +stateliest +stately +stateside +statesmanlike +statesmanly +statewide +static +stational +stationary +statistical +stative +statolithic +statued +statueless +statuelike +statuesque +statutable +statutory +staumrel +staunch +staurolitic +stavable +staveable +stayable +steadfast +steadier +steadiest +steady +stealable +stealthful +stealthier +stealthiest +stealthless +stealthy +steamerless +steamier +steamiest +steamless +steamtight +steamy +stearic +steatitic +steatopygic +stedfast +steedless +steedlike +steelless +steellike +steep +steepled +steepleless +steeplelike +stelar +stellar +stellate +stelliferous +stelliform +stellular +stemless +stemlike +stemmed +stenchful +stenochoric +stenographic +stenographical +stenohaline +stenopeic +stenopetalous +stenophagous +stenophyllous +stenosed +stenothermal +stenothermophilic +stenotopic +stenotropic +stenotypic +stentorian +stepless +steplike +stepwise +stercoraceous +stercoricolous +sterculiaceous +stereo +stereobatic +stereochromatic +stereochromic +stereognostic +stereographic +stereographical +stereoisomeric +stereophonic +stereoptican +stereoscopic +stereospecific +stereotactic +stereotomic +stereotomical +stereotyped +steric +sterigmatic +sterile +sterilisable +sterilizable +stern +sternal +sternitic +sternmost +sternocleidomastoid +sternutatory +stertorous +stethoscoped +stethoscopic +stewed +stey +sthenic +stibial +stichometric +stichometrical +stichomythic +stickable +sticket +stickier +stickiest +stickit +stickless +sticklike +sticky +stiff +stiffish +stifling +stigmatic +still +stillborn +stilliform +stilted +stimulable +stimulative +stingless +stingy +stinking +stinko +stintless +stipellate +stipendiary +stipendless +stipitate +stipitiform +stipular +stipulatory +stipuliform +stirless +stirpicultural +stirrable +stirring +stirrupless +stirruplike +stitchlike +stochastic +stockier +stockiest +stockinged +stockingless +stockish +stockless +stocklike +stocky +stodgier +stodgiest +stodgy +stoical +stoichiometric +stolid +stolidity +stolonate +stoloniferous +stomachic +stomachy +stomatal +stomatic +stomatitic +stomatologic +stomatological +stomatous +stomodaeal +stonable +stoneable +stoned +stoneground +stoneless +stonelike +stoney +stonier +stoniest +stonkered +stony +stopless +stoppable +stopped +stopperless +storable +storeyed +storiated +storied +storklike +stormbound +stormier +stormiest +stormless +stormlike +stormproof +stormy +stoss +stotious +stout +stouthearted +stoutish +straight +straightforward +strained +strainless +straked +strange +strangerlike +strangest +strangulable +strangulative +strangulatory +strapless +straplike +strappable +strapped +strapping +stratagemical +stratal +strategic +straticulate +stratiform +stratiformis +stratocratic +stratospheric +stratospherical +stratous +straucht +strawhat +strawless +strawlike +streakier +streakiest +streaklike +streaky +streamier +streamiest +streamless +streamlike +streamlined +streamy +streetless +streetlike +strenuous +strepitous +streptococcal +stressful +stretchable +stretchier +stretchiest +stretchy +striate +stricken +strict +strident +stridulatory +stridulous +strifeful +strifeless +strigiform +strigilate +strigose +strikebound +striking +stringed +stringendo +stringent +stringhalted +stringhalty +stringless +stringlike +stringy +striped +stripeless +stripier +stripiest +stripy +strobic +strobilaceous +strobiloid +stroboscopic +stroboscopical +stromal +stromateoid +stromatic +stromatous +strong +strongish +strophic +stroppy +structural +structureless +strumpetlike +struthious +strutting +strychnic +stubbled +stubbly +stubborn +stubby +studentless +studentlike +studiable +studied +studious +stuffed +stuffy +stumpier +stumpiest +stumpless +stumplike +stumpy +stunning +stunty +stupefactive +stupendous +stupid +stuporous +sturdied +sturdier +sturdiest +sturdy +sturty +stylar +styleless +styliform +stylish +stylistic +stylitic +stylographic +stylohyoid +styloid +stylolitic +styptic +styracaceous +suable +suasory +suave +subabsolute +subacademic +subacademical +subacetabular +subacid +subacidulous +subacrid +subacrodrome +subacrodromous +subacromial +subacuminate +subacute +subadditive +subadjacent +subadministrative +subadult +subaerial +subaffluent +subaggregate +subaggregative +subalary +subalate +subalated +subalgebraic +subalgebraical +subalpine +subalternate +subanal +subanconeal +subangular +subangulate +subangulated +subantarctic +subantique +subapostolic +subapparent +subappressed +subapprobative +subapprobatory +subaqua +subaquatic +subaqueous +subarachnoid +subarboreal +subarboreous +subarborescent +subarchesporial +subarctic +subarcuate +subarcuated +subareal +subarid +subartesian +subarticulate +subarticulative +subarytenoid +subarytenoidal +subascending +subassociational +subassociative +subastragalar +subastral +subastringent +subatomic +subattenuate +subattenuated +subaudible +subaural +subauricular +subauriculate +subautomatic +subaverage +subaxial +subaxile +subaxillary +subbasal +subbasaltic +subbranchial +subbronchial +subcaecal +subcalcareous +subcaliber +subcalibre +subcallosal +subcampanulate +subcancellate +subcancellous +subcandid +subcapsular +subcarbonaceous +subcardinal +subcarinate +subcarinated +subcartilaginous +subcelestial +subcerebellar +subcerebral +subcheliform +subchondral +subchorioid +subchorioidal +subchorionic +subchoroid +subchoroidal +subchronic +subchronical +subcircular +subcircularity +subcivilized +subclausal +subclavate +subclavian +subclavicular +subclimatic +subclinical +subcollegial +subcollegiate +subcolumnar +subcommendatory +subcommended +subcommissarial +subcompensational +subcompensative +subcompensatory +subcomplete +subcompressed +subconcave +subconcealed +subconcessionary +subconchoidal +subconferential +subconformable +subconic +subconical +subconjunctival +subconjunctive +subconnate +subconnivent +subconscious +subconsular +subcontained +subcontiguous +subcontinental +subcontrary +subconvex +subconvolute +subcoracoid +subcordate +subcordiform +subcoriaceous +subcorneous +subcornual +subcortical +subcorymbose +subcostal +subcranial +subcreative +subcrenate +subcrenated +subcrescentic +subcriminal +subcritical +subcruciform +subcrystalline +subcubic +subcubical +subcuboid +subcuboidal +subcultrate +subcultrated +subcultural +subcuneus +subcuratorial +subcutaneous +subcuticular +subcyaneous +subcylindric +subcylindrical +subdeducible +subdeltaic +subdeltoid +subdeltoidal +subdendroid +subdendroidal +subdentate +subdentated +subdenticulate +subdenticulated +subdepartmental +subdepressed +subdermal +subdermic +subdiaconal +subdialectal +subdiapasonic +subdiaphragmatic +subdilated +subdiscoid +subdiscoidal +subdistichous +subdistinctive +subdivine +subdolichocephalic +subdolichocephalous +subdorsal +subduable +subdued +subectodermal +subectodermic +subeffective +subelemental +subelliptic +subelliptical +subelongate +subelongated +subemarginate +subemarginated +subendocardial +subendothelial +subentire +subepiglottal +subepiglottic +subepithelial +subequal +subequatorial +subequilateral +suberect +subereous +suberic +subesophageal +subessential +subestuarine +subevergreen +subextensible +subexternal +subfalcate +subfalcial +subfalciform +subfascial +subfastigiate +subfastigiated +subfebrile +subfestive +subfibrous +subflexuose +subflexuous +subfoliar +subfoliate +subformative +subfossorial +subfractional +subfractionary +subfreezing +subfrontal +subfulgent +subfunctional +subfusc +subfusiform +subganoid +subgelatinoid +subgelatinous +subgeneric +subgeniculate +subgenital +subgeometric +subgeometrical +subgerminal +subglabrous +subglacial +subglenoid +subgloboid +subglobose +subglobous +subglobular +subglossal +subglottal +subglottic +subglumaceous +subgranular +subgular +subhedral +subhemispheric +subhemispherical +subhepatic +subhexagonal +subhirsute +subhooked +subhorizontal +subhuman +subhumeral +subhumid +subhyalin +subhyaline +subhyaloid +subhymenial +subhyoid +subhyoidean +subicteric +subicterical +subimbricate +subimbricated +subimbricative +subimposed +subimpressed +subincandescent +subincomplete +subinferior +subinflammatory +subintegumental +subintegumentary +subintentional +subinternal +subintestinal +subintimal +subintroductive +subintroductory +subinvolute +subinvoluted +subjacent +subjectional +subjective +subjudicial +subjudiciary +subjugable +subjugal +subjugular +subjunctive +subjunior +sublabial +sublaciniate +sublacunose +sublacustrine +sublanate +sublanceolate +sublaryngal +sublaryngeal +sublenticular +sublenticulate +sublethal +sublighted +sublimable +sublimational +sublime +subliminal +sublinear +sublingual +sublittoral +sublobular +sublong +subloral +sublumbar +sublunary +sublunate +sublunated +sublustrous +submammary +submaniacal +submanic +submarginal +submaxillary +submaximal +submedial +submedian +submediocre +submembranaceous +submembranous +submeningeal +submental +submerged +submergible +submersible +submetallic +submetaphoric +submetaphorical +submicroscopic +submiliary +subminiature +subminimal +subministrant +submiss +submissive +submolecular +submontane +submountain +submucous +submucronate +submucronated +submundane +submuscular +subnacreous +subnarcotic +subnasal +subnatural +subneural +subnitrated +subnodulose +subnodulous +subnormal +subnotational +subnotochordal +subnude +subnutritious +suboblique +subobscure +subobsolete +subobtuse +subocean +suboceanic +subocular +suboesophageal +subolive +subopaque +subopposite +suboptic +suboptical +suboral +suborbicular +suborbiculate +suborbiculated +suborbital +subordinal +subordinate +subordinative +suborganic +subornative +subovarian +subovate +subovoid +subpallial +subpalmate +subpalmated +subpar +subparallel +subparalytic +subparietal +subpartitioned +subpatellar +subpatronal +subpectinate +subpectinated +subpectoral +subpeduncled +subpeduncular +subpedunculate +subpedunculated +subpellucid +subpeltate +subpeltated +subpentagonal +subpericardiac +subpericardial +subpericranial +subperiosteal +subperitoneal +subpermanent +subpetiolate +subpetiolated +subpetrosal +subpharyngal +subpharyngeal +subphrenic +subphylar +subpial +subpilose +subplacental +subplantigrade +subpleural +subplexal +subpolar +subpolygonal +subpopular +subporphyritic +subpreceptoral +subpreceptorial +subpredicative +subprefectorial +subprehensile +subpreputial +subprimary +subproctorial +subprofessional +subprofitable +subproportional +subprostatic +subprovincial +subpubescent +subpubic +subpulmonary +subpyramidal +subpyramidic +subpyramidical +subpyriform +subquadrangular +subquadrate +subquinquefid +subradiate +subradiative +subradical +subradular +subramose +subramous +subrectal +subrectangular +subregular +subreniform +subrepand +subrepent +subreptitious +subreputable +subretinal +subretractile +subrhombic +subrhombical +subrhomboid +subrhomboidal +subrictal +subrigid +subrostral +subrotund +subsacral +subsaline +subsatiric +subsatirical +subsaturated +subscapular +subscleral +subsclerotic +subscribable +subscript +subsecretarial +subsensual +subsensuous +subseptate +subsequent +subserous +subserrate +subserrated +subservient +subsessile +subsibilant +subsidiary +subsidizable +subsimian +subsimious +subsimple +subsinuous +subsistent +subsocial +subsolar +subsonic +subspatulate +subsphenoid +subsphenoidal +subspheric +subspherical +subspinose +subspinous +subspiral +subsplenial +subspontaneous +substandard +substantial +substantiative +substantival +substernal +substitutional +substitutionary +substitutive +substratospheric +substriate +substriated +substructional +substructural +subsumable +subsuperficial +subsynodal +subsynodic +subsynodical +subsynovial +subtarsal +subtegminal +subtegumental +subtegumentary +subtemperate +subtemporal +subtentacular +subtepid +subterete +subterminal +subternatural +subterranean +subterraqueous +subterrestrial +subterritorial +subtertian +subtetanic +subtetanical +subthalamic +subthoracal +subthoracic +subtile +subtilis +subtitular +subtle +subtorrid +subtotemic +subtractive +subtranslucent +subtransparent +subtransversal +subtransverse +subtrapezoid +subtrapezoidal +subtriangular +subtriangulate +subtribal +subtrifid +subtrigonal +subtrihedral +subtriplicate +subtriplicated +subtriquetrous +subtrochanteric +subtrochlear +subtrochleariform +subtropical +subtruncate +subtruncated +subtubiform +subturriculate +subturriculated +subtwined +subtympanitic +subtypical +subulate +subultimate +subumbellar +subumbellate +subumbellated +subumbelliferous +subumbilical +subumbonal +subumbonate +subuncinal +subuncinate +subuncinated +subunequal +subungual +subuniversal +suburban +suburbicarian +suburethral +subursine +subvaginal +subventionary +subventral +subventricous +subventricular +subvermiform +subversive +subvertebral +subvertical +subverticilate +subverticilated +subvesicular +subvirile +subvisible +subvitalised +subvitalized +subvitreous +subvocal +subwealthy +subzero +subzonal +subzonary +subzygomatic +succedaneous +succeedable +successful +successive +successless +successoral +succinct +succinic +succubous +succulent +succursal +suchlike +sucking +suctional +suctorial +sudatory +sudden +sudoriferous +sudorific +sudoriparous +suety +sufferable +sufficient +suffixal +suffragan +suffruticose +suffusive +sugared +sugarless +sugarlike +sugary +suggestible +suggestive +suicidal +suitable +suited +sulcate +sulfa +sulfinyl +sulfitic +sulfonyl +sulfureous +sulfuric +sulfurous +sulfuryl +sulkier +sulkies +sulkiest +sulky +sullen +sulliable +sulpha +sulphonic +sulphuric +sulphurous +sulphydryl +sultanic +sultanlike +sultrier +sultriest +sultry +summarisable +summarizable +summational +summerly +summerweight +summital +summitless +summonable +sumption +sumptuary +sumptuous +sunback +sunbaked +sunbeamed +sunbeamy +sunbonneted +sunfast +sunless +sunlike +sunlit +sunnier +sunniest +sunny +sunproof +sunshineless +sunshiny +sunspotted +sunward +super +superable +superabnormal +superabominable +superabstract +superabsurd +superaccommodating +superaccomplished +superaccurate +superacidulated +superacromial +superactive +superacute +superadaptable +superadditional +superadequate +superadjacent +superadmirable +superadorn +superaerial +superaesthetical +superaffluent +superagrarian +superambitious +superangelic +superanimal +superannuated +superaqual +superaqueous +superarctic +superarduous +superarrogant +superartificial +superattainable +superattractive +superaverage +superaxillary +superb +superbelievable +superbeloved +superbenevolent +superbenign +superblessed +superbold +superbrave +superbusy +supercandid +supercanine +supercanonical +supercapable +supercarpal +supercatastrophic +supercatholic +supercatholically +supercausal +supercelestial +supercerebellar +supercerebral +superceremonious +superchemical +superchivalrous +superciliary +supercilious +supercivil +supercivilized +superclassified +supercoincident +supercolossal +supercolumnar +supercommercial +supercomplex +superconducting +superconductive +superconfident +superconformable +superconfused +supercongested +superconsecrated +superconservative +superconstitutional +supercordial +supercretaceous +supercriminal +supercritical +supercrowned +supercultivated +supercurious +supercynical +superdainty +superdeclamatory +superdecorated +superdelicate +superdemocratic +superdemonic +superdesirous +superdevilish +superdiabolical +superdifficult +superdivine +superdomineering +superdubious +superdural +superearthly +supereducated +supereffective +supereffluent +superelaborate +superelastic +superelated +superelegant +superelementary +superelevated +supereligible +supereloquent +supereminent +superenergetic +superepic +superequivalent +supererogatory +superethical +superevangelical +superevident +superexacting +superexcellent +superexceptional +superexcited +superexcrescent +superexplicit +superexpressive +superexquisite +superextreme +superfantastic +superfeminine +superfervent +superfetate +superficial +superfine +superfinical +superfinite +superfluous +superfoliaceous +superformal +superformidable +superfortunate +superfructified +superfunctional +supergalactic +supergallant +supergene +supergeneric +supergenerous +supergenual +superglacial +superglorious +superglottal +superglottic +superhandsome +superhearty +superheroic +superheterodyne +superhistoric +superhistorical +superhuman +superideal +superignorant +superimpersonal +superimportant +superimposed +superimprobable +superimproved +superinclusive +superincomprehensible +superincumbent +superindependent +superindifferent +superindignant +superindividual +superindulgent +superindustrious +superinfinite +superinformal +superingenious +superinnocent +superinquisitive +superinsistent +superintellectual +superintense +superintolerable +superior +superjacent +superjudicial +superlaborious +superlaryngeal +superlative +superlenient +superlocal +superlogical +superloyal +superlucky +superlunar +superlunary +superluxurious +supermagnificent +supermarginal +supermarine +supermarvelous +supermasculine +supermathematical +supermechanical +supermedial +supermediocre +supermental +supermetropolitan +supermilitary +supermodest +supermolten +supermoral +supermorose +supermundane +supermunicipal +supernal +supernatant +supernational +supernatural +supernaturalistic +supernegligent +supernormal +supernotable +supernumerary +supernumerous +superobedient +superobese +superobjectionable +superobstinate +superoccipital +superocular +superoffensive +superofficious +superoptimal +superoratorical +superorbital +superordinary +superordinate +superorganic +superornamental +superparamount +superparasitic +superparliamentary +superpatient +superpatriotic +superperfect +superpersonal +superpetrosal +superpetrous +superphysical +superpious +superplausible +superpolite +superpopulated +superposable +superpositive +superpowered +superprecarious +superprecise +superprepared +superprosperous +superpure +superradical +superrational +superrefined +superregal +superregenerative +superrenal +superrespectable +superresponsible +superrighteous +superromantic +supersacerdotal +supersacral +supersacred +supersafe +supersagacious +supersanguine +supersarcastic +supersaturated +superscandalous +superscholarly +superscientific +superscript +supersecretive +supersecular +supersecure +supersedable +supersensible +supersensitive +supersensual +supersensualistic +supersensuous +supersentimental +superseptal +superseraphic +superseraphical +superserious +superserviceable +supersevere +supersignificant +supersilent +supersingular +supersmart +supersolar +supersolemn +supersonic +supersovereign +supersphenoid +supersphenoidal +superspiritual +supersquamosal +superstitious +superstoical +superstrenuous +superstrict +superstrong +superstructural +superstylish +supersublimated +supersubstantial +supersubtilized +supersubtle +supersufficient +supersulfureted +supersulphureted +supersuspicious +supersweet +supersympathetic +supertemporal +superterrestrial +superthankful +superthorough +supertragic +supertranscendent +supertrivial +supertutelary +superugly +superuniversal +superurgent +supervast +supervenient +supervictorious +supervigilant +supervigorous +supervirulent +supervisory +supervisual +supervital +supervoluminous +superwealthy +superwise +superworldly +superwrought +superzealous +supine +supperless +supple +suppled +supplemental +supplementary +suppler +supplest +suppletive +suppletory +suppliable +suppliant +supplicatory +suppling +supportable +supporting +supportless +supposed +suppositional +suppositionless +suppositious +supposititious +suppositive +suppressive +suppurative +supraglottal +suprahepatic +supraliminal +supramolecular +supranational +supranatural +supranaturalistic +supraorbital +suprarational +suprarenal +suprasegmental +supratemporal +supravaginal +supreme +sural +surbased +surculose +sure +surer +surest +surfable +surfaceless +surflike +surfy +surgeless +surgeonless +surgical +surgy +surly +surmisable +surmountable +surpassable +surpassing +surpliced +surprising +surreal +surreptitious +surveillant +surveyable +survivable +susceptible +susceptive +suspectible +suspectless +suspenderless +suspendible +suspensible +suspensive +suspicionful +suspicionless +suspicious +sustainable +sustenanceless +sustentacular +sustentational +sustentative +susurrant +susurrous +sutural +svelte +svelter +sveltest +swacked +swaggering +swainish +swallowable +swallowlike +swampier +swampiest +swampless +swampy +swankier +swankiest +swanky +swart +swarth +swarthy +swashbuckling +swastikaed +swathable +swatheable +swayable +swayful +sweated +sweatier +sweatiest +sweatless +sweaty +sweepable +sweeping +sweer +sweet +sweetless +sweetlike +sweetmeal +swellheaded +sweltering +sweptback +sweptwing +swervable +swift +swimmable +swindleable +swindled +swingable +swingeing +swinish +swirlier +swirliest +swirly +swishier +swishiest +swishy +switchlike +swoln +swordless +swordlike +sycophantic +sycophantical +sycophantish +syenitic +syllabic +syllogistic +sylphic +sylphish +sylphlike +sylphy +sylvan +sylvatic +symbiotic +symbiotical +symbolic +symbolistic +symbolistical +symmetric +symmetrical +sympathetic +sympatholytic +sympathomimetic +sympatric +sympetalous +symphonic +symphonious +symphysial +symphystic +sympodial +symposiac +symptomatic +symptomless +synaesthetic +synagogical +synaptic +synaptical +syncarpous +synchromesh +synchronic +synchronistic +synchronistical +synchronous +synclastic +synclinal +syncopated +syncretic +syncretistical +syncytial +syndactyl +syndesmotic +syndetic +syndicalist +syndicalistic +syndiotactic +syndromic +synecdochic +synecdochical +synechistic +synecious +synecologic +synecological +synergetic +synergistic +synesthetic +synetic +syngamic +synodal +synodic +synoecious +synoetic +synoicous +synonymic +synonymical +synonymous +synoptic +synoptistic +synostotic +synostotical +synovial +synsacral +synsepalous +syntactic +synthetic +syntonic +syntonous +syntrophoblastic +syntypic +syphiloid +syringeal +syringeful +syringomyelic +syruplike +syrupy +systaltic +systematic +systemic +systemisable +systemizable +systemless +systemoid +syzygial +t +tabarded +tabby +tabernacular +tabescent +taboo +tabu +tabulable +tabular +tachistoscopic +tachyauxetic +tachygraphic +tachygraphical +tachyphylactic +tachypneic +tachypnoeic +tacit +taciturn +tacketed +tackier +tackiest +tackless +tacky +tactful +tactical +tactile +tactless +tactual +taenidial +taglike +tagmemic +tailless +taillike +tailored +taintless +takeaway +takedown +taking +talcose +talebearing +taligrade +taliped +talismanic +talismanical +talkable +talkative +talkier +talkiest +talky +tall +tallowy +taloned +tamasic +tame +tameable +tamed +tameless +tamer +tamest +taming +tanagrine +tangential +tangible +tangier +tangiest +tangled +tangy +tanked +tankless +tanklike +tannable +tannaitic +tannic +tannish +tantalic +tantalizing +tantalous +tapeless +tapelike +tapestried +tapetal +tappable +tardier +tardiest +tardo +tardy +targetless +tariffless +tarnal +tarnishable +tarsal +tartaric +tartarous +tartish +tartrated +tasimetric +tasteful +tasteless +tasty +tatty +tauriform +taurine +tauromachian +taut +tautologic +tautological +tautomeric +tautomerizable +tavernless +tawdrier +tawdriest +tawdry +tawie +tawney +tawnier +tawniest +taxable +taxaceous +taxational +taxidermal +taxidermic +taxitic +taxonomic +taxonomical +taxpaid +teacherless +tealess +tearable +tearful +tearier +teariest +tearing +tearless +teary +teasable +techier +techiest +technical +technocrat +techy +tectonic +tectricial +tedious +teeming +teen +teenage +teenier +teeniest +teensy +teeny +teethless +teetotal +tegminal +tegular +teind +teknonymous +telaesthetic +telangiectatic +telautographic +telegenic +telegnostic +telegonic +telegrammatic +telegrammic +telegraphic +telegraphical +telekinetic +telencephalic +teleostean +telepathic +telephonic +telephotographic +teleplasmic +telescopic +telesthetic +televisional +televisionary +telford +telial +telic +teliosporic +telling +tellurian +telluric +tellurous +telodynamic +telolecithal +telophasic +telsonic +temerarious +temperamental +temperate +tempered +tempestuous +templed +templelike +temporal +temporary +temptable +tempting +tenable +tenacious +tenantable +tenantless +tenantlike +tendencious +tendentious +tender +tenderhearted +tendinous +tendrillar +tendrilly +tendrilous +tenebrous +tenfold +tenne +tenorless +tenpenny +tense +tensed +tenseless +tenser +tensest +tensible +tensile +tensing +tensional +tensionless +tensive +tensorial +tentacled +tentaclelike +tentacular +tentaculoid +tentative +tented +tenth +tentie +tentier +tentiest +tentless +tentlike +tentorial +tenty +tenuous +tenurial +tenuto +tephritic +tepid +tepidity +tepidness +teratogenetic +teratogenic +teratoid +terbic +tercentenary +terebic +terebinic +terebinthine +terefah +terete +tergal +tergiversatory +teriyaki +terminable +terminal +terminational +terminatory +terministic +termitic +termless +ternary +ternate +terpeneless +terpenic +terpsichorean +terraceless +terraqueous +terrene +terrestrial +terribilita +terrible +terrific +terrigenous +territorial +terrorful +terroristic +terrorless +terse +tertial +tertian +tertiary +tertius +tervalent +tessellated +testable +testacean +testaceous +testamentary +testate +testiculate +testudinal +testudinate +testy +tetanic +tetartohedral +tetched +tetchy +tetrabasic +tetrabranchiate +tetracid +tetracyclic +tetradrachmal +tetradynamous +tetraethyl +tetragonal +tetrahedral +tetrahydrated +tetrahydric +tetrahydroxy +tetramerous +tetrandrous +tetraploid +tetrapodic +tetrapterous +tetrarchic +tetrarchical +tetrasporic +tetrastichic +tetrastichous +tetrasyllabic +tetrasyllabical +tetratomic +tetravalent +textbookish +textless +textual +textuary +thalamencephalic +thalassic +thalassographic +thalassographical +thallic +thalloid +thallous +thankful +thankless +thankworthy +thatchless +thatchy +theaceous +thearchic +theatrical +thecal +thecate +thecial +thecodont +thegnly +theistic +theistical +thelytokous +thematic +themeless +theocentric +theocratic +theocratical +theodicean +theodolitic +theogonic +theological +theomorphic +theophanic +theophanous +theoretical +theosophic +theosophical +theralite +therapeutic +theriacal +therian +therianthropic +theriomorphic +thermal +thermic +thermionic +thermochemical +thermoclinal +thermoduric +thermodynamic +thermoelastic +thermoelectric +thermoelectronic +thermogenetic +thermogenic +thermogenous +thermolabile +thermoluminescent +thermolytic +thermometric +thermomotive +thermonuclear +thermophosphorescent +thermoplastic +thermoscopic +thermoscopical +thermosensitive +thermosetting +thermostable +thermostatic +thermotactic +thermotaxic +thermotensile +thermotropic +theroid +thersitical +thetic +theurgic +theurgical +thick +thicketed +thickety +thickset +thieveless +thievish +thigmotactic +thigmotropic +thimblelike +thin +thinkable +thinnish +thio +thioacetic +thiocyanic +thiocyano +thiolacetic +thiolic +thionic +third +thirdstream +thirstier +thirstiest +thirstless +thirsty +thirteenth +thirtieth +thirtypenny +thistlelike +thistly +thixotropic +thoracic +thoric +thornier +thorniest +thornless +thornlike +thorny +thorough +thoroughbred +thoroughgoing +thoroughpaced +thoughtful +thoughtless +thousandfold +thousandth +thowless +thrasonical +thrawn +threadbare +threadless +threadlike +thready +threatful +threatless +threefold +threnodial +thriftier +thriftiest +thriftless +thrifty +thrillful +thrilling +throatier +throatiest +throatless +throaty +throbless +thromboclastic +thrombolytic +thromboplastic +thrombotic +throneless +thrushlike +thuggish +thumbless +thumblike +thumping +thundering +thunderous +thunderstruck +thundery +thymelaeaceous +thymic +thymier +thymiest +thymy +thyroarytenoid +thyroid +thyrsoid +thysanurous +tiaraed +tiaralike +tibial +ticketless +ticklish +tidal +tiddly +tideful +tideless +tidelike +tiderode +tidy +tied +tierced +tigerish +tight +tightfisted +tightknit +tiglic +tiled +tilelike +tiliaceous +tillable +timbered +timberless +timbery +timbreled +timbrelled +timeless +timely +timeous +timesaving +timeserving +timeworn +timid +timocratic +timocratical +timorous +tinctorial +tinderlike +tindery +tineal +tined +tinglier +tingliest +tingly +tinier +tiniest +tinklier +tinkliest +tinkly +tinlike +tinned +tinnier +tinniest +tinny +tinpot +tintless +tintometric +tiny +tipless +tippable +tippier +tippiest +tippy +tipsier +tipsy +tiptop +tired +tireless +tiresome +tissual +tissuey +titanic +titaniferous +titanous +tithable +titheless +titillative +titled +titrable +titratable +tittuppy +titubant +titular +titulary +toadish +toadless +toadlike +toadyish +tobaccoless +toed +toeless +toelike +toey +togaed +togate +toilful +toilsome +tolerable +tolerant +tolerative +toluic +tombless +tomblike +tomfoolish +tomial +tonal +tonalitive +toneless +tonetic +tongued +tongueless +tonguelike +tonier +toniest +tonish +tonnish +tonsilar +tonsillar +tonsillary +tonsillitic +tonsorial +tony +toolless +toothed +toothier +toothiest +toothless +toothlike +toothsome +toothy +topazine +topflight +topfull +tophaceous +topiary +topical +topline +toplofty +topmost +topnotch +topographic +topographical +topologic +topological +toponymic +toponymical +topotypic +topotypical +torchiest +torchless +torchlike +torchy +toreutic +toric +tornadic +tornadolike +torose +torpedolike +torpid +torporific +torquate +torrential +torrid +tortile +tortious +tortuous +totable +totalitarian +totemic +tother +totipalmate +totipotent +tottering +touchable +touched +touchier +touchiest +touching +touchy +tough +toughish +touristic +touristy +tourmalinic +tournois +towable +toward +towardly +towered +towering +towerless +towerlike +towery +townish +townless +towy +toxemic +toxic +toxicogenic +toxicologic +toxicological +toxophilitic +toyless +toylike +trabeated +trabecular +trabeculate +traceable +traceless +traceried +tracheidal +tracheoscopic +trachycarpous +trachyspermous +trachytic +trachytoid +trackable +tracklaying +trackless +tractable +tractile +traditional +traditionalistic +traditionless +traditive +traducianistic +trafficable +trafficless +tragic +tragicomic +tragicomical +trailblazing +trailless +trainable +trainless +trainsick +traitorous +tramless +tramontane +trancelike +tranquil +transactional +transalpine +transannular +transaquatic +transarctic +transatlantic +transaudient +transbay +transborder +transcalent +transcendent +transcendental +transcendentalistic +transchannel +transcolor +transcolour +transcondylar +transcondyloid +transcontinental +transcorporeal +transcriptional +transcriptive +transcrystalline +transcultural +transcurrent +transcursive +transdermic +transdesert +transdiaphragmatic +transdiurnal +transelemental +transelementary +transempirical +transequatorial +transeunt +transexperiental +transferable +transferential +transferrable +transfinite +transfluvial +transformable +transformational +transformative +transformistic +transfrontal +transfrontier +transfusable +transfusible +transfusive +transgressive +transhuman +transhumant +transient +transiliac +transilient +transindividual +transinsular +transisthmian +transitional +transitionary +transitive +transitory +translatable +translational +translative +translucent +translucid +translucidus +translunar +transmarginal +transmarine +transmaterial +transmental +transmeridional +transmissible +transmissive +transmittable +transmittible +transmontane +transmundane +transmutable +transmutual +transnational +transnatural +transnormal +transoceanic +transocular +transomed +transonic +transorbital +transovarian +transpacific +transpadane +transpalmar +transparent +transparietal +transparish +transpassional +transpenetrable +transpenisular +transperitoneal +transpersonal +transphysical +transpicuous +transpirable +transpiratory +transplanetary +transpleural +transpolar +transponible +transpontine +transported +transportive +transposable +transpositional +transpositive +transpulmonary +transrational +transreal +transriverina +transsegmental +transsensual +transseptal +transsepulchral +transsolid +transsonic +transstellar +transthalamic +transthoracic +transtracheal +transubstantial +transudative +transudatory +transuranic +transurethral +transuterine +transverse +trapezial +trapeziform +trapezohedral +traplike +trappean +trappier +trappiest +trappy +trashy +traumatic +travelable +travellable +travelled +traversable +trawlable +treacherous +treacly +treasonable +treasonous +treasurable +treasureless +treatyless +treble +tredecillionth +treed +treelike +treelined +treen +tref +trembly +tremendous +tremolant +tremolitic +tremulous +trenchant +trendy +treponemal +treponematous +tres +tressed +tressier +tressiest +tressured +tressy +triable +triacid +triadelphous +triadic +triangled +triangular +triapsidal +triaryl +triatomic +triaxial +triazolic +tribadic +tribal +tribasic +tribeless +triboelectric +triboluminescent +tribrachial +tribrachic +tribunicial +tribunitial +tricarpellary +tricentenary +tricentennial +trichinous +trichitic +trichogynial +trichogynic +trichoid +trichomic +trichomonadal +trichonotid +trichotomic +trichotomous +trichromatic +trickier +trickiest +trickish +trickless +tricksier +tricksiest +tricksome +tricksy +tricky +triclinic +tricolor +tricorn +tricornered +tricostate +tricrotic +tricuspid +tricuspidate +tricyclic +tridactyl +tridentate +tridimensional +triecious +triennial +triethyl +trifacial +trifid +trifling +trifocal +trifold +trifoliate +trifoliolate +triforial +triform +trifurcate +trig +trigamous +trigeminal +triggerless +triglyphed +trigonal +trigonometric +trigonometrical +trigonous +trigraphic +trihedral +trihydric +trihydroxy +trijugate +trilateral +trilinear +trilingual +triliteral +trilobate +trilobed +trilocular +trimeric +trimerous +trimestral +trimestrial +trimetallic +trimetric +trimodal +trimolecular +trimonthly +trimorphic +trimorphous +trimotored +trinal +trinary +trinocular +trinodal +trinomial +trioecious +triparted +tripartite +tripedal +tripersonal +tripetalous +triphibian +triphibious +triphthongal +triphyllous +tripinnate +triple +triplex +triplicate +triploblastic +triploid +tripodal +tripodic +trippant +tripping +tripterous +triquetrous +triradiate +trisepalous +triseptate +triserial +trismic +trisomic +trispermous +triste +tristful +tristichic +tristichous +trisyllabic +trisyllabical +tritanopic +trite +triter +tritest +tritheistic +tritheistical +triturable +triumphal +triumphant +triumviral +triune +triunitarian +trivalent +trivalve +trivial +trochaic +trochal +trochanteral +trochanteric +trochlear +trochoidal +troglodytic +troglodytical +trogonoid +trollopy +tromometric +tromometrical +troostitic +trophallactic +trophic +trophied +trophoplasmatic +trophoplasmic +trophyless +tropical +tropistic +tropologic +tropological +tropophilous +tropospheric +trothless +trotty +troubleproof +troublesome +troublous +troughlike +trouserless +troy +truceless +truculent +true +trueborn +truehearted +truer +truffled +truing +truistic +truistical +trumpless +truncated +trunkless +trunnioned +trussed +trustable +trustful +trusting +trustless +trustworthy +truthful +truthless +trying +trypanosomal +trypanosomic +tryptic +tsarist +tsaristic +tsunamic +tubal +tubate +tubbable +tubbier +tubbiest +tubby +tubercular +tuberculate +tuberculoid +tuberculose +tuberculous +tuberless +tuberoid +tuberous +tubesnout +tublike +tuboid +tubular +tubuliflorous +tubulous +tufaceous +tuffaceous +tufted +tufthunting +tugless +tuitional +tuitionary +tuitionless +tularaemic +tularemic +tuliplike +tum +tumefacient +tumescent +tumid +tumular +tumulose +tumulous +tumultuous +tunable +tuneable +tuneful +tuneless +tungstenic +tungstous +tunnellike +tuppenny +turbaned +turbanless +turbanlike +turbid +turbidimetric +turbinal +turbinate +turbosupercharged +turbulent +turdiform +turdine +turfier +turfiest +turfless +turflike +turfy +turgent +turgescent +turgid +turndown +turniplike +turpentinic +turreted +turretless +tushed +tuskless +tussal +tussive +tutti +tutto +twaddly +twee +tweedier +tweediest +tweedy +twelfth +twelvefold +twelvepenny +twentieth +twentyfold +twentypenny +twiggier +twiggiest +twiggy +twigless +twiglike +twill +twin +twinborn +twineable +twinned +twistable +twittery +twofold +twolegged +twopenny +twp +tychistic +tychopotamic +tympanic +tympanitic +typal +typhogenic +typhonic +typhous +typical +typographic +typologic +typological +tyrannical +tyrannicidal +tyrannous +tyronic +tzarist +tzaristic +ubiquitous +ugly +ugsome +ulcerative +ulcerous +uliginous +ullaged +ulmaceous +ulnar +ulotrichous +ulterior +ultimate +ultra +ultrabasic +ultracentrifugal +ultraconservative +ultraistic +ultramicrochemical +ultramicroscopic +ultramicroscopical +ultramodern +ultramontane +ultramundane +ultrared +ultrashort +ultrasonic +ultrastructural +ultratropical +ululant +umbellar +umbellate +umbellated +umbellately +umbelliferous +umbilical +umbilicate +umbiliform +umbonal +umbonate +umbonic +umbrageous +umbral +umbrellaless +umbrellalike +umbrose +umpteenth +umteen +unabandoned +unabandoning +unabased +unabashable +unabashed +unabasing +unabatable +unabated +unabating +unabbreviated +unabdicated +unabdicating +unabdicative +unabducted +unabetted +unabetting +unabhorred +unabiding +unabject +unabjective +unabjuratory +unabjured +unablative +unable +unabnegated +unabnegating +unabolishable +unabolished +unaborted +unabortive +unabraded +unabrasive +unabridged +unabrogable +unabrogated +unabrogative +unabscessed +unabsolved +unabsorbable +unabsorbed +unabsorbent +unabsorbing +unabsorptive +unabstemious +unabstentious +unabstracted +unabstractive +unabusable +unabused +unabusive +unabutting +unacademic +unacademical +unacceding +unaccelerated +unaccelerative +unaccentuated +unacceptable +unacceptant +unaccepted +unaccessible +unaccessional +unaccidental +unacclaimed +unacclimated +unacclimatised +unacclimatized +unacclivitous +unaccommodable +unaccommodated +unaccommodating +unaccompanied +unaccomplishable +unaccomplished +unaccordable +unaccordant +unaccorded +unaccostable +unaccosted +unaccountable +unaccounted +unaccoutered +unaccoutred +unaccredited +unaccrued +unaccumulable +unaccumulated +unaccumulative +unaccurate +unaccusable +unaccused +unaccusing +unaccustomed +unacerbic +unacetic +unachievable +unachieved +unaching +unacidic +unacidulated +unacknowledged +unacknowledging +unacoustic +unacoustical +unacquainted +unacquiescent +unacquirable +unacquired +unacquisitive +unacquitted +unacrimonious +unactable +unacted +unacting +unactinic +unactionable +unactivated +unactuated +unacuminous +unadamant +unadaptable +unadapted +unadaptive +unaddable +unadded +unaddible +unaddicted +unaddled +unaddressed +unadduceable +unadduced +unadducible +unadept +unadhering +unadhesive +unadjacent +unadjoined +unadjoining +unadjourned +unadjudged +unadjudicated +unadjunctive +unadjustable +unadjusted +unadministered +unadministrable +unadministrative +unadmirable +unadmired +unadmiring +unadmissible +unadmissive +unadmitted +unadmonished +unadmonitory +unadoptable +unadopted +unadoptional +unadoptive +unadorable +unadored +unadoring +unadornable +unadorned +unadroit +unadulating +unadulatory +unadult +unadulterate +unadulterated +unadulterous +unadvancing +unadvantaged +unadvantageous +unadventuring +unadventurous +unadverse +unadvertised +unadvisable +unadvised +unadvocated +unaerated +unaesthetic +unaesthetical +unaffable +unaffected +unaffecting +unaffiliated +unaffirmed +unaffixed +unafflicted +unafflicting +unafforded +unaffrighted +unaffronted +unafraid +unaged +unagglomerative +unaggravated +unaggravating +unaggregated +unaggressive +unagile +unaging +unagitated +unagrarian +unagreed +unagricultural +unaidable +unaided +unaiding +unaimed +unaiming +unairable +unaired +unaisled +unalacritous +unalarmed +unalarming +unalcoholised +unalcoholized +unaldermanly +unalerted +unalgebraical +unalienable +unalienated +unalienating +unalignable +unaligned +unalike +unalimentary +unalimentative +unallayable +unallayed +unalleged +unallegorical +unallegorized +unallergic +unalleviated +unalleviating +unalleviative +unallied +unalliterated +unalliterative +unallotted +unallowable +unallowed +unalloyed +unallured +unalluring +unallusive +unalphabetic +unalphabetical +unalphabetised +unalphabetized +unalterable +unaltering +unalternated +unalternating +unamalgamable +unamalgamated +unamalgamating +unamalgamative +unamassed +unamative +unamazed +unambient +unambiguous +unambitious +unambulant +unameliorable +unameliorated +unameliorative +unamenable +unamendable +unamended +unamending +unamerceable +unamerced +unamiable +unamicable +unammoniated +unamorous +unamortized +unamplifiable +unamplified +unamputated +unamputative +unamusable +unamused +unamusing +unanachronistic +unanachronistical +unanachronous +unanaemic +unanalagous +unanalogical +unanalogized +unanalytic +unanalytical +unanalyzable +unanalyzed +unanalyzing +unanarchic +unanarchistic +unanatomisable +unanatomised +unanatomizable +unanatomized +unanchored +unanecdotal +unaneled +unanemic +unangered +unangry +unanguished +unangular +unanimated +unanimating +unanimous +unannealed +unannexable +unannexed +unannihilable +unannihilated +unannihilative +unannihilatory +unannotated +unannounced +unannoyed +unannoying +unannullable +unannulled +unannunciable +unannunciative +unanointed +unanswerable +unanswering +unantagonisable +unantagonised +unantagonising +unantagonistic +unantagonizable +unantagonized +unantagonizing +unanthologized +unanticipated +unanticipating +unanticipative +unantiquated +unantlered +unanxious +unaphasic +unapologetic +unapostatized +unapostrophized +unappalled +unappalling +unappareled +unapparelled +unapparent +unappealable +unappealed +unappealing +unappeasable +unappeased +unappeasing +unappendaged +unappended +unapperceived +unapperceptive +unappetising +unappetizing +unapplaudable +unapplauded +unapplauding +unapplausive +unappliable +unapplicable +unapplicative +unapplied +unappliquad +unappointable +unappointed +unapportioned +unapposable +unapposite +unappraised +unappreciable +unappreciated +unappreciating +unappreciative +unapprehendable +unapprehended +unapprehending +unapprehensible +unapprehensive +unapprenticed +unapprised +unapproachable +unapproached +unapproaching +unappropriable +unappropriated +unapprovable +unapproved +unapproving +unaproned +unapt +unarbitrary +unarbitrated +unarbitrative +unarbored +unarboured +unarched +unarching +unarchitected +unarchitectural +unarduous +unarguable +unargued +unargumentative +unaristocratic +unarithmetical +unarmed +unarmored +unarmorial +unarmoured +unaromatic +unarousable +unaroused +unarousing +unarraignable +unarraigned +unarranged +unarrayed +unarrestable +unarrested +unarresting +unarrestive +unarrived +unarriving +unarrogant +unarrogated +unarrogating +unartful +unarticled +unarticulate +unarticulated +unarticulative +unarticulatory +unartificial +unartistic +unary +unascendable +unascendant +unascended +unascendent +unascertainable +unascertained +unascetic +unascribed +unashamed +unaskable +unasked +unasking +unaspersed +unaspersive +unasphalted +unaspirated +unaspiring +unassailable +unassailed +unassailing +unassassinated +unassaultable +unassaulted +unassayed +unassaying +unassembled +unassenting +unassentive +unasserted +unassertive +unassessable +unassessed +unassibilated +unassiduous +unassignable +unassigned +unassimilable +unassimilated +unassimilating +unassimilative +unassistant +unassisted +unassisting +unassociable +unassociated +unassociative +unassorted +unassuageable +unassuaging +unassuasive +unassumable +unassumed +unassuming +unassured +unassuring +unasthmatic +unastonished +unathletic +unatmospheric +unatoned +unatoning +unatrophied +unattachable +unattached +unattackable +unattacked +unattainable +unattained +unattaining +unattainted +unattempered +unattemptable +unattempted +unattempting +unattendant +unattended +unattentive +unattenuated +unattested +unattired +unattractable +unattracted +unattracting +unattractive +unattributable +unattributive +unattuned +unauctioned +unaudacious +unaudited +unauditioned +unaugmentable +unaugmentative +unaugmented +unauspicious +unaustere +unauthentic +unauthentical +unauthenticated +unauthorised +unauthoritative +unauthorized +unautistic +unautographed +unautomatic +unautumnal +unavailable +unavailed +unavailing +unavengeable +unavenged +unavenging +unaveraged +unaverred +unaverted +unavid +unavoidable +unavoiding +unavouched +unavowable +unawakable +unawake +unawaked +unawakening +unawaking +unawardable +unawarded +unaware +unawed +unawful +unawkward +unawned +unaxed +unaxiomatic +unaxised +unaxled +unbacked +unbackward +unbacterial +unbadged +unbadgered +unbadgering +unbaffled +unbaffling +unbagged +unbailable +unbailed +unbaked +unbalanceable +unbalanced +unbalconied +unbalked +unbalking +unballoted +unbanded +unbangled +unbanished +unbankable +unbanned +unbannered +unbantering +unbaptised +unbaptized +unbarbarous +unbarbed +unbarbered +unbargained +unbarking +unbarrable +unbarreled +unbarrelled +unbarren +unbartered +unbartering +unbase +unbased +unbashful +unbasketlike +unbastardised +unbastardized +unbasted +unbastinadoed +unbated +unbathed +unbating +unbatted +unbatterable +unbattered +unbattling +unbeached +unbeaconed +unbeaded +unbeamed +unbeaming +unbearable +unbearded +unbearing +unbeatable +unbeaten +unbeaued +unbeauteous +unbeautified +unbeautiful +unbeckoned +unbeclouded +unbecoming +unbedabbled +unbedaubed +unbedecked +unbedimmed +unbedizened +unbedraggled +unbefitting +unbefriended +unbeggarly +unbegged +unbegrudged +unbeguiled +unbeguiling +unbehaving +unbeheaded +unbeheld +unbeholdable +unbeholden +unbelied +unbelievable +unbelieving +unbellicose +unbelligerent +unbelonging +unbeloved +unbemoaned +unbendable +unbending +unbeneficed +unbeneficent +unbeneficial +unbenefited +unbenefiting +unbenevolent +unbenign +unbenignant +unbenumbed +unbequeathable +unbequeathed +unbereaved +unberouged +unbeseeching +unbeseeming +unbeset +unbesieged +unbesmeared +unbesmirched +unbesmutted +unbesought +unbespoken +unbesprinkled +unbestowed +unbet +unbetrayed +unbetraying +unbetrothed +unbettered +unbeveled +unbevelled +unbewailed +unbewailing +unbewildered +unbewildering +unbewitched +unbewitching +unbewrayed +unbiased +unbibulous +unbickered +unbickering +unbiddable +unbidden +unbigamous +unbigoted +unbilious +unbillable +unbilled +unbilleted +unbinned +unbiographical +unbiological +unbirdlike +unbiting +unbitten +unbitter +unblamable +unblamed +unblaming +unblanched +unblanketed +unblasphemed +unblasted +unblazoned +unbleached +unbleaching +unbled +unbleeding +unblemishable +unblemished +unblemishing +unblenched +unblenching +unblendable +unblended +unblent +unblessed +unblighted +unblindfolded +unblinding +unblinking +unblissful +unblistered +unblockaded +unblocked +unbloody +unbloomed +unblossomed +unblossoming +unblotted +unbloused +unblown +unblued +unbluffable +unbluffed +unbluffing +unblundering +unblunted +unblurred +unblushing +unblusterous +unboarded +unboasted +unboastful +unboasting +unbobbed +unbodied +unboding +unboggy +unboiled +unboisterous +unbold +unbolstered +unbolted +unbombarded +unbombastic +unbombed +unbondable +unbonded +unboned +unbonneted +unbookish +unbooted +unbordered +unbored +unboring +unborn +unborne +unborrowed +unborrowing +unbossed +unbotanical +unbothered +unbothering +unbought +unbounded +unbounteous +unbountiful +unbowdlerized +unbowed +unbowing +unbowled +unboyish +unbraceleted +unbracketed +unbragging +unbrailed +unbranched +unbranching +unbranded +unbrandied +unbrave +unbraved +unbrawling +unbrawny +unbrazen +unbreachable +unbreached +unbreaded +unbreakable +unbreaking +unbreathable +unbreathed +unbreathing +unbred +unbreeched +unbreezy +unbrewed +unbribable +unbribed +unbribing +unbricked +unbridgeable +unbridged +unbridled +unbrief +unbriefed +unbright +unbrightened +unbrilliant +unbrimming +unbrined +unbristled +unbrittle +unbroached +unbroadcast +unbroadcasted +unbroadened +unbrocaded +unbroiled +unbroke +unbroken +unbronzed +unbrooded +unbrooding +unbrothered +unbrotherly +unbrought +unbrowned +unbrowsing +unbruised +unbrushable +unbrushed +unbudged +unbudgeted +unbudging +unbuffed +unbuffered +unbuffeted +unbullied +unbullying +unbumped +unbumptious +unbunched +unbundled +unbungling +unbuoyant +unbuoyed +unburdensome +unbureaucratic +unburglarized +unburied +unburlesqued +unburly +unburnable +unburned +unburning +unburnished +unburnt +unburrowed +unburst +unburstable +unbusinesslike +unbuskined +unbustling +unbutchered +unbuttered +unbuttressed +unbuyable +unbuying +uncabined +uncabled +uncacophonous +uncadenced +uncaged +uncajoling +uncalamitous +uncalcareous +uncalcified +uncalcined +uncalculable +uncalculated +uncalculating +uncalculative +uncalendared +uncalibrated +uncalked +uncalled +uncallous +uncallused +uncalm +uncalmative +uncalorific +uncalumniative +uncalumnious +uncambered +uncamouflaged +uncampaigning +uncamped +uncamphorated +uncanalized +uncancelable +uncanceled +uncancellable +uncancelled +uncancerous +uncandid +uncandied +uncandled +uncaned +uncankered +uncanned +uncanny +uncanonical +uncanopied +uncantoned +uncanvassed +uncapable +uncapacious +uncaparisoned +uncaped +uncapering +uncapitalised +uncapitalistic +uncapitalized +uncapitulated +uncapitulating +uncapricious +uncapsizable +uncapsized +uncapsuled +uncaptained +uncaptioned +uncaptious +uncaptivated +uncaptivating +uncaptivative +uncapturable +uncaptured +uncaramelised +uncaramelized +uncarbonated +uncarbonized +uncarbureted +uncarburetted +uncarded +uncaressed +uncaressing +uncaricatured +uncaring +uncarnivorous +uncaroled +uncarolled +uncarousing +uncarpentered +uncarpeted +uncarried +uncarted +uncartooned +uncarved +uncascaded +uncascading +uncasemated +uncashed +uncasked +uncasketed +uncast +uncastigated +uncastigative +uncastled +uncastrated +uncasual +uncataloged +uncatalogued +uncatastrophic +uncatchable +uncatechized +uncategorical +uncategorised +uncategorized +uncatenated +uncatered +uncatering +uncathartic +uncatholic +uncatholical +uncaught +uncausable +uncausal +uncausative +uncaused +uncaustic +uncauterized +uncautioned +uncautious +uncavalier +uncavernous +uncaviling +uncavilling +uncavitied +unceased +unceasing +unceded +unceilinged +uncelebrated +uncelebrating +uncelestial +uncelibate +uncensorable +uncensored +uncensorious +uncensurable +uncensured +uncensuring +uncentered +uncentral +uncentralised +uncentralized +uncentred +uncentric +uncentrical +uncentripetal +uncephalic +uncerated +uncerebric +unceremonial +unceremonious +unceriferous +uncertain +uncertifiable +uncertificated +uncertified +uncertifying +uncertitude +unchafed +unchaffed +unchaffing +unchagrined +unchainable +unchained +unchalked +unchalky +unchallengeable +unchallenged +unchallenging +unchambered +unchamfered +unchampioned +unchanceable +unchanced +unchancy +unchangeable +unchanged +unchangeful +unchanging +unchanneled +unchannelized +unchannelled +unchanted +unchaotic +unchaperoned +unchapleted +unchapped +unchaptered +uncharactered +uncharacterised +uncharacteristic +uncharacterized +uncharge +unchargeable +uncharged +uncharitable +uncharmable +uncharmed +uncharming +uncharred +uncharted +unchartered +unchary +unchased +unchaste +unchastened +unchastisable +unchastised +unchastising +unchattering +unchauffeured +unchauvinistic +uncheapened +uncheaply +uncheated +uncheating +uncheckable +unchecked +uncheckered +uncheckmated +uncheerable +uncheered +uncheerful +uncheering +uncheery +unchemical +uncherished +uncherishing +unchested +unchevroned +unchewable +unchewed +unchid +unchidden +unchided +unchiding +unchildish +unchildlike +unchilled +unchiming +unchinked +unchippable +unchipped +unchipping +unchiseled +unchiselled +unchivalric +unchivalrous +unchloridized +unchlorinated +unchokable +unchoked +uncholeric +unchoosable +unchopped +unchosen +unchristened +unchromatic +unchromed +unchronic +unchronicled +unchronological +unchurchly +unchurlish +unchurned +uncial +unciform +unciliated +uncinate +uncinctured +uncircled +uncircuitous +uncircular +uncircularised +uncircularized +uncirculated +uncirculating +uncirculative +uncircumlocutory +uncircumscribable +uncircumscribed +uncircumspect +uncircumspective +uncircumstantial +uncircumvented +uncitable +unciteable +uncited +uncitied +uncitizenlike +uncitizenly +uncivic +uncivil +uncivilisable +uncivilizable +uncivilized +unclad +unclaimed +unclaiming +unclamorous +unclamped +unclannish +unclarified +unclarifying +unclashing +unclassable +unclassed +unclassical +unclassifiable +unclassified +unclassifying +unclawed +unclayed +unclean +uncleanable +uncleaned +uncleansable +uncleansed +unclear +unclearable +uncleared +unclearing +uncleavable +uncleft +unclerical +unclerkly +unclever +unclimactic +unclimaxed +unclimbable +unclimbed +unclimbing +unclinging +unclinical +uncloistered +uncloistral +unclosable +uncloseted +unclotted +unclouded +uncloudy +uncloven +uncloyed +uncloying +unclustered +unclustering +unclutchable +unclutched +uncluttered +uncoachable +uncoached +uncoagulable +uncoagulated +uncoagulating +uncoagulative +uncoalescent +uncoarse +uncoaxable +uncoaxal +uncoaxed +uncoaxial +uncoaxing +uncobbled +uncocked +uncoddled +uncoded +uncodified +uncoerced +uncogent +uncogged +uncognisable +uncognizable +uncognizant +uncognized +uncognoscible +uncohesive +uncoifed +uncoincided +uncoincident +uncoincidental +uncoinciding +uncoined +uncoked +uncollaborative +uncollapsable +uncollapsed +uncollapsible +uncollated +uncollectable +uncollected +uncollectible +uncollective +uncollegiate +uncolloquial +uncollusive +uncolonial +uncolorable +uncolored +uncolourable +uncoloured +uncombable +uncombatable +uncombatant +uncombated +uncombative +uncombed +uncombinable +uncombinational +uncombinative +uncombined +uncombining +uncombustible +uncombustive +uncomely +uncomfortable +uncomforted +uncomforting +uncomic +uncomical +uncommanded +uncommanderlike +uncommemorated +uncommemorative +uncommenced +uncommendable +uncommendatory +uncommensurate +uncommented +uncommenting +uncommercial +uncommingled +uncomminuted +uncommiserated +uncommiserating +uncommiserative +uncommissioned +uncommitted +uncommitting +uncommodious +uncommon +uncommonplace +uncommunicating +uncommunicative +uncommutable +uncommutative +uncommuted +uncompanionable +uncompanioned +uncomparable +uncompared +uncompassable +uncompassionate +uncompassioned +uncompellable +uncompelled +uncompelling +uncompendious +uncompensated +uncompensating +uncompensative +uncompensatory +uncompetent +uncompetitive +uncompiled +uncomplacent +uncomplained +uncomplaining +uncomplaisant +uncomplemental +uncomplementary +uncomplemented +uncompletable +uncomplete +uncomplex +uncompliable +uncompliant +uncomplicated +uncomplimentary +uncomplimented +uncomplimenting +uncomplying +uncomportable +uncomposable +uncomposeable +uncomposed +uncompoundable +uncompounded +uncompounding +uncomprehended +uncomprehending +uncomprehensible +uncomprehensive +uncompressed +uncompressible +uncompromised +uncompromising +uncompulsive +uncompulsory +uncomputable +uncomputed +unconcatenated +unconcatenating +unconcealing +unconceded +unconceding +unconceited +unconceived +unconcentrated +unconcentrative +unconcentric +unconceptual +unconcerned +unconcertable +unconcerted +unconciliable +unconciliated +unconciliating +unconciliative +unconciliatory +unconcludable +unconcluded +unconcordant +unconcrete +unconcreted +unconcurred +unconcurrent +unconcurring +uncondemnable +uncondemned +uncondemning +uncondensable +uncondensational +uncondensed +uncondensing +uncondescending +unconditional +unconditioned +uncondolatory +uncondoled +uncondoling +uncondoned +uncondoning +unconducing +unconducive +unconducted +unconductible +unconductive +unconfected +unconfederated +unconferred +unconfessed +unconfessing +unconfided +unconfident +unconfiding +unconfinable +unconfined +unconfining +unconfirmative +unconfirmatory +unconfiscable +unconfiscated +unconfiscatory +unconflicting +unconflictive +unconformable +unconformed +unconforming +unconfounding +unconfrontable +unconfronted +unconfusable +unconfused +unconfusing +unconfutable +unconfutative +unconfuted +unconfuting +uncongealable +uncongenial +uncongested +uncongestive +unconglomerated +unconglutinated +unconglutinative +uncongratulated +uncongratulating +uncongratulatory +uncongregated +uncongregational +uncongregative +uncongressional +uncongruous +unconical +unconjecturable +unconjectural +unconjectured +unconjoined +unconjugal +unconjugated +unconjunctive +unconjured +unconnected +unconned +unconnived +unconniving +unconnotative +unconquerable +unconquered +unconscientious +unconscionable +unconscious +unconsecrated +unconsecrative +unconsecutive +unconsentaneous +unconsentient +unconsenting +unconservable +unconservative +unconserved +unconserving +unconsiderable +unconsidered +unconsidering +unconsignable +unconsigned +unconsociated +unconsolable +unconsolatory +unconsoled +unconsolidated +unconsolidating +unconsoling +unconsonant +unconspired +unconspiring +unconstant +unconstellated +unconsternated +unconstipated +unconstituted +unconstitutional +unconstrainable +unconstrained +unconstraining +unconstricted +unconstrictive +unconstruable +unconstructed +unconstructive +unconstrued +unconsultable +unconsultative +unconsultatory +unconsulted +unconsulting +unconsumable +unconsumed +unconsuming +unconsummate +unconsummated +unconsummative +unconsumptive +uncontacted +uncontagious +uncontained +uncontaminable +uncontaminated +uncontaminative +uncontemned +uncontemning +uncontemplable +uncontemplated +uncontemplative +uncontemporaneous +uncontemporary +uncontemptible +uncontemptuous +uncontended +uncontending +uncontentious +uncontestable +uncontested +uncontiguous +uncontinent +uncontingent +uncontinual +uncontinued +uncontinuous +uncontorted +uncontortioned +uncontortive +uncontoured +uncontracted +uncontractile +uncontradictable +uncontradicted +uncontradictious +uncontradictive +uncontradictory +uncontrastable +uncontrasted +uncontrasting +uncontrastive +uncontributed +uncontributing +uncontributive +uncontributory +uncontrite +uncontrived +uncontriving +uncontrollable +uncontrolled +uncontrolling +uncontroversial +uncontroverted +uncontrovertible +uncontumacious +unconvenable +unconvened +unconvening +unconventional +unconverged +unconvergent +unconverging +unconversable +unconversant +unconversational +unconverted +unconvertible +unconvicted +unconvicting +unconvictive +unconvinced +unconvincible +unconvincing +unconvolute +unconvoluted +unconvoyed +unconvulsed +unconvulsive +uncookable +uncooked +uncooled +uncooperating +uncooperative +uncoopered +uncoordinate +uncoordinated +uncopiable +uncopied +uncopious +uncopyrighted +uncoquettish +uncordial +uncorned +uncornered +uncoroneted +uncorpulent +uncorrectable +uncorrected +uncorrective +uncorrelated +uncorrelative +uncorresponding +uncorridored +uncorroborant +uncorroborated +uncorroborative +uncorroboratory +uncorroded +uncorrugated +uncorrupt +uncorrupted +uncorruptible +uncorrupting +uncorruptive +uncorseted +uncosseted +uncostly +uncostumed +uncottoned +uncounseled +uncounselled +uncountable +uncounted +uncountenanced +uncounteracted +uncounterbalanced +uncounterfeited +uncountermandable +uncountermanded +uncountervailed +uncountrified +uncourageous +uncourted +uncourtierlike +uncourting +uncourtly +uncouth +uncovenanted +uncovered +uncoveted +uncoveting +uncovetous +uncowed +uncoy +uncracked +uncradled +uncrafty +uncraggy +uncramped +uncranked +uncrannied +uncrated +uncravatted +uncraven +uncraving +uncreased +uncreatable +uncreated +uncreative +uncreaturely +uncredentialed +uncreditable +uncredulous +uncreeping +uncreosoted +uncrested +uncrevassed +uncried +uncriminal +uncrippled +uncritical +uncriticisable +uncriticizable +uncriticized +uncriticizing +uncrooked +uncropped +uncrossable +uncrowded +uncrowned +uncrucified +uncrude +uncruel +uncrumbled +uncrumpled +uncrumpling +uncrushable +uncrushed +uncrusted +uncrying +uncrystaled +uncrystalled +uncrystalline +uncrystallisable +uncrystallizable +uncrystallized +unctuous +uncubic +uncubical +uncudgeled +uncudgelled +uncuffed +unculled +unculpable +uncultivable +uncultivatable +uncultivated +unculturable +uncultured +uncumbered +uncumbrous +uncumulative +uncupped +uncurable +uncurbable +uncurbed +uncurdled +uncurdling +uncured +uncurious +uncurrent +uncurried +uncursed +uncursing +uncurtailable +uncurtailed +uncurtained +uncurved +uncurving +uncushioned +uncusped +uncustomary +uncut +uncuttable +uncynical +unda +undabbled +undaggled +undainty +undallying +undamageable +undamaged +undamaging +undamasked +undamnified +undamped +undampened +undanceable +undancing +undandled +undangered +undangerous +undapper +undappled +undared +undaring +undarned +undatable +undateable +undated +undaubed +undaughterly +undaunted +undaunting +undawned +undawning +undazed +undazing +undazzled +undazzling +undeadened +undeadlocked +undeaf +undealable +undealt +undebased +undebatable +undebated +undebating +undebauched +undebilitated +undebilitating +undebilitative +undebited +undecadent +undecayable +undecayed +undecaying +undeceased +undeceitful +undeceivable +undeceptive +undecided +undecillionth +undecipherable +undeciphered +undecked +undeclaimed +undeclaiming +undeclamatory +undeclarable +undeclarative +undeclared +undeclinable +undeclined +undeclining +undecocted +undecomposable +undecomposed +undecompounded +undecorated +undecorative +undecorous +undecorticated +undecreased +undecreasing +undecreed +undecrepit +undecretive +undecretory +undecried +undedicated +undeduced +undeducible +undeducted +undeductible +undeductive +undeeded +undeep +undeepened +undefaceable +undefaced +undefalcated +undefamatory +undefamed +undefaming +undefaulted +undefaulting +undefeatable +undefeated +undefective +undefendable +undefendant +undefended +undefending +undefensed +undefensible +undefensive +undeferential +undeferrable +undeferred +undefiable +undefiant +undeficient +undefied +undefiled +undefinable +undefined +undefinite +undefinitive +undeflected +undeflective +undeformable +undeformed +undefrauded +undefrayed +undeft +undegenerate +undegenerated +undegenerating +undegenerative +undegraded +undegrading +undeified +undeistical +undejected +undelayable +undelayed +undelaying +undelectable +undelegated +undeleted +undeleterious +undeliberate +undeliberating +undeliberative +undelicious +undelighted +undelightful +undelighting +undelineable +undelineated +undelineative +undelinquent +undelirious +undeliverable +undelivered +undeluded +undeluding +undeluged +undelusive +undelusory +undelved +undemanded +undemanding +undemised +undemocratic +undemolishable +undemolished +undemonstrable +undemonstrated +undemonstrational +undemonstrative +undemure +undemurring +undeniable +undenied +undenizened +undenominated +undenotable +undenotative +undenoted +undenounced +undented +undenuded +undenunciated +undenunciatory +undeparted +undeparting +undependable +undependent +undepicted +undepleted +undeplored +undeported +undeposable +undeposed +undeposited +undepraved +undeprecated +undeprecating +undeprecative +undepreciable +undepreciated +undepreciative +undepreciatory +undepressed +undepressible +undepressing +undepressive +undeprived +undeputed +undeputized +underaccommodated +underage +underanged +underarm +underaverage +underbeaten +underbred +underclad +underclothed +undercolored +underconcerned +undercover +underdegreed +underdeveloped +underdone +underdressed +undereducated +underemployed +underfired +underfloor +underfolded +underglaze +undergraduette +underground +undergrown +underhand +underhanded +underhung +underided +underisible +underisive +underisory +underivable +underivative +underlaid +underlevel +underlimbed +underlit +underlying +undermade +undermasted +undermentioned +undermoated +undermoral +undermost +undermusic +undernamed +undernoted +underofficial +underogating +underogative +underogatory +underpeopled +underpetticoated +underpitched +underplain +underpowered +underprivileged +underproductive +underproficient +underproof +underproportioned +underqualified +underrespected +underrigged +underripened +underrooted +undersaturated +underscrupulous +undersea +underseated +underseeded +undersexed +undershot +undersighted +undersize +undersized +underslung +undersparred +understaffed +understandable +undertakerly +undertaxed +underteamed +underterrestrial +undertided +undertrained +undervaulted +undervitalized +underwater +underweight +underwooded +underwrought +underzealous +undescendable +undescended +undescendent +undescendible +undescending +undescribable +undescribed +undescried +undescriptive +undescrying +undesecrated +undeserted +undeserved +undeserving +undesiccated +undesignated +undesignative +undesigned +undesigning +undesirable +undesired +undesiring +undesirous +undesisting +undespaired +undespairing +undespatched +undespised +undespising +undespoiled +undespondent +undesponding +undespotic +undestined +undestitute +undestroyed +undestructible +undestructive +undetachable +undetached +undetailed +undetainable +undetained +undetectable +undetected +undetectible +undeteriorated +undeteriorating +undeteriorative +undeterminable +undetermined +undetermining +undeterrable +undeterred +undeterring +undetestable +undetested +undetesting +undethroned +undetonated +undetracting +undetractive +undetractory +undetrimental +undevastated +undevastating +undevelopable +undeveloping +undevelopmental +undeviable +undeviated +undeviating +undevilish +undevious +undevisable +undevised +undevoted +undevotional +undevoured +undevout +undewed +undewy +undexterous +undextrous +undiabetic +undiagnosed +undiagramed +undiagrammatic +undiagrammatical +undiagrammed +undialed +undialled +undialyzed +undiametric +undiametrical +undiapered +undiaphanous +undiatonic +undichotomous +undictated +undictatorial +undidactic +undifferent +undifferentiable +undifferentiated +undiffering +undifficult +undiffident +undiffracted +undiffractive +undiffused +undiffusible +undiffusive +undigested +undigestible +undigesting +undigitated +undignified +undigressive +undiked +undilapidated +undilatable +undilated +undilating +undilative +undilatory +undiligent +undilute +undiluted +undiluting +undiluvial +undiluvian +undim +undimensioned +undimerous +undimidiated +undiminishable +undiminished +undiminishing +undimmed +undimpled +undiplomaed +undiplomatic +undipped +undirected +undirectional +undisabled +undisagreeable +undisappearing +undisappointable +undisappointed +undisappointing +undisarmed +undisastrous +undisbanded +undisbarred +undisbursed +undiscardable +undiscarded +undiscernable +undiscerned +undiscernible +undiscerning +undischargeable +undischarged +undisciplinable +undisciplined +undisclaimed +undisclosed +undiscolored +undiscoloured +undiscomfited +undiscomposed +undisconcerted +undisconnected +undiscontinued +undiscordant +undiscording +undiscountable +undiscounted +undiscourageable +undiscouraged +undiscouraging +undiscoverable +undiscovered +undiscreditable +undiscredited +undiscriminated +undiscriminating +undiscriminatory +undiscussable +undiscussed +undisdaining +undiseased +undisestablished +undisfigured +undisfranchised +undisgorged +undisgraced +undisguisable +undisguised +undisgusted +undisheartened +undisheveled +undishonored +undisillusioned +undisinfected +undisinheritable +undisinherited +undisjoined +undisjointed +undislocated +undislodged +undismantled +undismayable +undismayed +undismissed +undisordered +undisorderly +undisorganized +undisparaged +undispassionate +undispatchable +undispatched +undispatching +undispellable +undispelled +undispensable +undispensed +undispersed +undispersing +undisplaceable +undisplaced +undisplayable +undisplayed +undisplaying +undisposed +undisprovable +undisproved +undisputable +undisputatious +undisputed +undisputing +undisqualifiable +undisqualified +undisquieted +undisrupted +undissected +undissembled +undissembling +undisseminated +undissenting +undissevered +undissipated +undissociated +undissoluble +undissolute +undissolvable +undissolved +undissolving +undissonant +undissuadable +undistant +undistasteful +undistempered +undistilled +undistinguishable +undistinguished +undistinguishing +undistorted +undistorting +undistracted +undistracting +undistrained +undistraught +undistressed +undistributed +undistrustful +undisturbable +undisturbed +undisturbing +undithyrambic +undiuretic +undiurnal +undivergent +undiverging +undiverse +undiversified +undiverted +undivertible +undivertive +undivested +undividable +undivided +undividing +undivinable +undivined +undivining +undivisible +undivisive +undivorceable +undivorced +undivulgeable +undivulged +undivulging +undoable +undocked +undocketed +undoctored +undoctrinal +undoctrined +undocumentary +undocumented +undodged +undogmatic +undogmatical +undolorous +undomed +undomestic +undomesticable +undomesticated +undomiciled +undominated +undominative +undomineering +undominical +undonated +undone +undoped +undoting +undotted +undoubtable +undoubted +undoubtful +undoubting +undouched +undoughty +undoweled +undowelled +undowered +undowned +undraftable +undrafted +undragoned +undragooned +undrainable +undrained +undramatic +undramatical +undramatisable +undramatizable +undramatized +undraperied +undrawable +undreaded +undreading +undreamed +undreaming +undreamlike +undreamt +undredged +undrenched +undressed +undried +undrifting +undrillable +undrilled +undrinkable +undrinking +undrivable +undriven +undrooping +undropped +undropsical +undrossily +undrossy +undrowned +undrubbed +undrugged +undrunk +undrunken +undry +undryable +undrying +undualistic +undubbed +undubious +undubitative +unducal +unductile +undue +undug +undulant +undulatory +undulatus +undulled +undumped +undupable +unduped +unduplicative +undurable +undusted +undusty +unduteous +undutiable +undutiful +undwarfed +undwellable +undwindling +undyable +undyed +undying +undynamic +undynamited +uneager +unearned +unearnest +unearthly +uneastern +uneasy +uneatable +uneaten +uneating +uneaved +unebbed +unebbing +unebullient +uneccentric +unecclesiastic +unechoed +unechoic +unechoing +uneclectic +uneclipsed +uneclipsing +unecliptic +unecliptical +uneconomic +uneconomical +uneconomizing +unecstatic +unedacious +uneddied +uneddying +unedible +unedificial +unedified +unedifying +uneditable +unedited +uneducable +uneducated +uneducative +uneduced +uneffaceable +uneffaced +uneffected +uneffectible +uneffective +uneffectuated +uneffeminate +uneffervescent +uneffete +unefficacious +unefficient +uneffulgent +uneffused +uneffusing +uneffusive +unegoistical +unegotistical +unegregious +unejaculated +unejected +unejective +unelaborate +unelaborated +unelapsed +unelastic +unelated +unelating +unelbowed +unelderly +unelectable +unelected +unelective +unelectric +unelectrical +unelectrified +unelectrifying +unelectronic +uneleemosynary +unelegant +unelemental +unelementary +unelevated +unelicitable +unelicited +unelided +unelidible +uneliminated +unelliptical +unelongated +uneloped +uneloping +uneloquent +unelucidated +unelucidating +unelucidative +uneludable +uneluded +unelusive +unelusory +unemaciated +unemanative +unemancipated +unemancipative +unemasculated +unemasculative +unemasculatory +unembalmed +unembanked +unembarrassed +unembattled +unembayed +unembellished +unembezzled +unembittered +unemblazoned +unembossed +unemboweled +unembowelled +unembowered +unembraceable +unembraced +unembroidered +unembroiled +unembryonal +unembryonic +unemendable +unemended +unemerged +unemergent +unemerging +unemigrant +unemigrating +uneminent +unemissive +unemitted +unemitting +unemotional +unemotioned +unemotive +unempaneled +unempanelled +unemphasized +unemphasizing +unemphatic +unempirical +unemployable +unemployed +unempoisoned +unempowered +unemptied +unempty +unemulative +unemulous +unemulsified +unenacted +unenameled +unenamelled +unenamored +unenamoured +unencamped +unenchanted +unencircled +unenclosed +unencompassed +unencounterable +unencountered +unencouraged +unencouraging +unencroached +unencroaching +unencumbered +unencumbering +unencysted +unendable +unendangered +unendeared +unended +unendemic +unending +unendorsable +unendorsed +unendowed +unendowing +unendued +unendurability +unendurable +unendured +unenduring +unenergetic +unenergized +unenervated +unenfeebled +unenfiladed +unenforceable +unenforced +unenfranchised +unengaged +unengaging +unengendered +unengineered +unengraved +unengraven +unengrossed +unengrossing +unenhanced +unenigmatic +unenigmatical +unenjoined +unenjoyable +unenjoyed +unenjoying +unenlarged +unenlarging +unenlightened +unenlightening +unenlisted +unenlivened +unenlivening +unennobled +unennobling +unenounced +unenquired +unenquiring +unenraptured +unenrichable +unenriched +unenriching +unenrolled +unenshrined +unenslaved +unensnared +unensured +unentailed +unentangleable +unentangled +unentangling +unenterable +unentered +unenterprising +unentertainable +unentertained +unentertaining +unenthralled +unenthralling +unenthused +unenthusiastic +unenticeable +unenticed +unenticing +unentitled +unentombed +unentomological +unentranced +unentrapped +unentreatable +unentreated +unentreating +unentrenched +unentwined +unenumerated +unenumerative +unenunciable +unenunciated +unenunciative +unenveloped +unenvenomed +unenviable +unenvied +unenvious +unenvironed +unenvying +unepauleted +unepauletted +unephemeral +unepic +unepicurean +unepigrammatic +unepilogued +unepistolary +unepitaphed +unepithelial +unepitomised +unepitomized +unepochal +unequable +unequal +unequaled +unequalled +unequated +unequatorial +unequestrian +unequiangular +unequilateral +unequilibrated +unequine +unequipped +unequivalent +unequivocal +unequivocating +uneradicable +uneradicated +uneradicative +unerasable +unerased +unerasing +unerect +unerected +unermined +unerodable +uneroded +unerodent +uneroding +unerosive +unerotic +unerrant +unerratic +unerring +unerudite +unerupted +uneruptive +unescalloped +unescapable +unescaped +unescheatable +unescheated +uneschewed +unescorted +unescutcheoned +unesoteric +unespied +unespousable +unespoused +unessayed +unessential +unestablishable +unesteemed +unesthetic +unestimable +unestimated +unestopped +unestranged +unetched +uneternized +unethereal +unethical +unethnologic +unethnological +unethylated +unetymologic +unetymological +uneugenic +uneugenical +uneulogised +uneulogized +uneuphemistic +uneuphemistical +uneuphonic +uneuphonious +unevacuated +unevadable +unevaded +unevadible +unevading +unevaluated +unevanescent +unevangelic +unevangelical +unevangelised +unevangelized +unevaporated +unevaporative +unevasive +uneven +uneventful +uneversible +uneverted +unevicted +unevidenced +unevidential +unevil +unevinced +unevincible +uneviscerated +unevocable +unevocative +unevoked +unevolutional +unevolutionary +unevolved +unexacerbated +unexacerbating +unexacted +unexacting +unexaggerated +unexaggerating +unexaggerative +unexaggeratory +unexalted +unexalting +unexaminable +unexamined +unexamining +unexampled +unexasperated +unexasperating +unexcavated +unexceedable +unexceeded +unexcelled +unexcellent +unexcelling +unexceptable +unexcepted +unexcepting +unexceptionable +unexceptional +unexceptive +unexcerpted +unexcessive +unexchangeable +unexchanged +unexcised +unexcitable +unexcited +unexciting +unexclaiming +unexcludable +unexcluded +unexcluding +unexclusive +unexcogitable +unexcogitated +unexcogitative +unexcommunicated +unexcoriated +unexcrescent +unexcreted +unexcruciating +unexculpable +unexculpated +unexcursive +unexcusable +unexcused +unexcusing +unexecrated +unexecutable +unexecuted +unexecuting +unexecutorial +unexemplary +unexempt +unexemptable +unexempted +unexempting +unexercisable +unexercised +unexerted +unexhaled +unexhausted +unexhaustive +unexhibitable +unexhibited +unexhilarated +unexhilarating +unexhilarative +unexhortative +unexhorted +unexhumed +unexigent +unexigible +unexiled +unexistent +unexistential +unexisting +unexonerated +unexonerative +unexorbitant +unexorcised +unexotic +unexpandable +unexpanded +unexpanding +unexpansible +unexpansive +unexpectable +unexpectant +unexpected +unexpecting +unexpectorated +unexpedient +unexpeditable +unexpedited +unexpeditious +unexpellable +unexpelled +unexpendable +unexpended +unexperienced +unexperiential +unexperimental +unexperimented +unexpert +unexpiable +unexpiated +unexpired +unexpiring +unexplainable +unexplained +unexplaining +unexplanatory +unexplicated +unexplicative +unexplicit +unexplodable +unexploded +unexploitable +unexploitative +unexploited +unexplorable +unexplorative +unexploratory +unexplored +unexplosive +unexponible +unexportable +unexported +unexporting +unexposable +unexposed +unexpostulating +unexpoundable +unexpounded +unexpressable +unexpressed +unexpressive +unexpropriable +unexpropriated +unexpunged +unexpurgated +unextendable +unextended +unextendible +unextensible +unextenuated +unextenuating +unexterminable +unexterminated +unextinct +unextinguishable +unextinguished +unextirpated +unextolled +unextortable +unextorted +unextractable +unextracted +unextradited +unextraneous +unextraordinary +unextravagant +unextravasated +unextreme +unextricable +unextricated +unextrinsic +unextruded +unexuberant +unexudative +unexuded +unexultant +uneyeable +unfabled +unfabling +unfabricated +unfabulous +unfacaded +unfaceable +unfaced +unfaceted +unfacetious +unfacile +unfacilitated +unfactional +unfactious +unfactorable +unfactored +unfactual +unfadable +unfaded +unfading +unfagged +unfagoted +unfailed +unfailing +unfainting +unfair +unfaithful +unfakable +unfaked +unfallacious +unfallen +unfalling +unfallowed +unfalsifiable +unfalsified +unfaltering +unfamiliar +unfamiliarised +unfamiliarized +unfanatical +unfancied +unfanciful +unfancy +unfanged +unfanned +unfantastic +unfar +unfarced +unfarcical +unfarmable +unfarmed +unfarming +unfasciate +unfasciated +unfascinated +unfascinating +unfashionable +unfashioned +unfastenable +unfastidious +unfasting +unfatalistic +unfated +unfathered +unfatherly +unfathomable +unfathomed +unfatigable +unfatigued +unfatiguing +unfatted +unfatty +unfatuitous +unfauceted +unfaulty +unfavorable +unfavored +unfavoring +unfavorite +unfavourable +unfavoured +unfavouring +unfavourite +unfawning +unfeared +unfearful +unfearing +unfeasible +unfeasted +unfeathered +unfeatured +unfebrile +unfecund +unfecundated +unfed +unfederated +unfederative +unfeeble +unfeedable +unfeeding +unfeeling +unfeignable +unfeigning +unfelicitated +unfelicitating +unfelicitous +unfeline +unfellable +unfelled +unfelonious +unfelt +unfelted +unfemale +unfeminine +unfended +unfendered +unfenestral +unfenestrated +unfeoffed +unfermentable +unfermentative +unfermented +unfermenting +unferocious +unferreted +unferreting +unferried +unfertile +unfertilisable +unfertilised +unfertilising +unfertilizable +unfertilized +unfertilizing +unfervent +unfervid +unfestered +unfestering +unfestive +unfestooned +unfetched +unfetching +unfeted +unfeudal +unfevered +unfeverish +unfibbing +unfibered +unfibred +unfibrous +unfickle +unfictitious +unfidgeting +unfiducial +unfielded +unfierce +unfiercely +unfiery +unfightable +unfighting +unfigurable +unfigurative +unfilamentous +unfilched +unfilial +unfilled +unfilling +unfilmed +unfilterable +unfiltered +unfiltering +unfiltrated +unfimbriated +unfinable +unfinanced +unfine +unfineable +unfined +unfinical +unfinishable +unfinished +unfinite +unfired +unfiring +unfirm +unfiscal +unfishable +unfished +unfissile +unfistulous +unfit +unfittable +unfitted +unfitting +unfixable +unfixated +unfixative +unflagged +unflagging +unflagitious +unflagrant +unflaked +unflaking +unflaky +unflamboyant +unflaming +unflanged +unflappable +unflapping +unflared +unflaring +unflashing +unflashy +unflat +unflatted +unflattened +unflatterable +unflattered +unflattering +unflaunted +unflaunting +unflavored +unflavorous +unflavoured +unflavourous +unflawed +unflayed +unflecked +unfledged +unfleeced +unfleeing +unfleeting +unfleshly +unfletched +unflexed +unflexible +unflickering +unflighty +unflinching +unflippant +unflirtatious +unflitched +unfloatable +unfloating +unfloggable +unflogged +unflooded +unflorid +unflossy +unflounced +unfloundering +unfloured +unflourishing +unflouted +unflowered +unflowering +unflowery +unflowing +unflown +unfluctuant +unfluctuating +unfluent +unfluffed +unfluffy +unfluid +unfluked +unflunked +unfluorescent +unfluorinated +unflurried +unflushed +unflustered +unfluted +unflutterable +unfluttered +unfluttering +unfluvial +unflying +unfoaled +unfoamed +unfoaming +unfocused +unfocusing +unfocussed +unfocussing +unfogged +unfogging +unfoggy +unfoilable +unfoiled +unfoisted +unfoldable +unfoliaged +unfoliated +unfollowable +unfollowed +unfollowing +unfomented +unfond +unfondled +unfoolable +unfooled +unfooling +unfoolish +unforaged +unforbearing +unforbidden +unforbidding +unforceable +unforced +unforceful +unforcible +unforcing +unfordable +unforded +unforeboded +unforeboding +unforecast +unforecasted +unforegone +unforeign +unforeknowable +unforeknown +unforensic +unforeseeable +unforeseeing +unforeseen +unforeshortened +unforestallable +unforestalled +unforested +unforetellable +unforetold +unforewarned +unforfeitable +unforfeited +unforfeiting +unforgeable +unforged +unforgetful +unforgettable +unforgetting +unforgivable +unforgiven +unforgiving +unforgone +unforgotten +unforlorn +unformalised +unformalistic +unformalized +unformative +unformed +unformidable +unformulated +unformulistic +unforsaken +unforsaking +unforsworn +unforthright +unfortifiable +unfortified +unfortuitous +unfortunate +unforward +unforwarded +unfossiliferous +unfossilised +unfossilized +unfostered +unfostering +unfought +unfoul +unfouled +unfound +unfounded +unfoundered +unfoundering +unfountained +unfoxed +unfoxy +unfractious +unfractured +unfragile +unfragmented +unfragrant +unfrail +unframable +unframeable +unframed +unfranchised +unfrank +unfraternal +unfraternised +unfraternized +unfraternizing +unfraudulent +unfraught +unfrayed +unfrazzled +unfreakish +unfreckled +unfreezable +unfreighted +unfrenzied +unfrequent +unfrequentable +unfrequentative +unfretful +unfretted +unfretting +unfretty +unfriable +unfricative +unfrictional +unfrictioned +unfried +unfriended +unfriendlier +unfriendliest +unfriendly +unfrighted +unfrightened +unfrightening +unfrightful +unfrigid +unfrilly +unfrisking +unfrisky +unfrittered +unfrivolous +unfrizzled +unfrizzly +unfrizzy +unfronted +unfrosted +unfrosty +unfrothed +unfrothing +unfrounced +unfroward +unfrowning +unfrozen +unfructified +unfructuous +unfrugal +unfruitful +unfruity +unfrustratable +unfrustrated +unfuddled +unfudged +unfueled +unfuelled +unfugal +unfugitive +unfulfillable +unfulfilled +unfulfilling +unfulgent +unfull +unfulminant +unfulminated +unfulminating +unfulsome +unfumbled +unfumbling +unfumigated +unfuming +unfunctional +unfunctioning +unfundable +unfundamental +unfunded +unfunereal +unfungible +unfunny +unfurbelowed +unfurbished +unfurcate +unfurlable +unfurnished +unfurnitured +unfurred +unfurrowed +unfused +unfusible +unfussed +unfussing +unfussy +unfutile +unfuturistic +ungabled +ungainable +ungained +ungainful +ungaining +ungainly +ungainsaid +ungaited +ungallant +ungalled +ungalleried +ungalling +ungalloping +ungalvanized +ungambled +ungambling +ungamboled +ungamboling +ungambolled +ungambolling +ungamelike +ungamy +unganged +ungangrened +ungangrenous +ungaping +ungaraged +ungarbed +ungarbled +ungardened +ungarmented +ungarnered +ungarnished +ungarrisoned +ungarrulous +ungashed +ungassed +ungated +ungathered +ungaudy +ungauged +ungauntleted +ungazetted +ungazing +ungeared +ungelatinized +ungelatinous +ungelded +ungenerable +ungeneralised +ungeneralising +ungeneralized +ungeneralizing +ungenerated +ungenerating +ungenerative +ungeneric +ungenerical +ungenerous +ungenial +ungenitive +ungenteel +ungentile +ungentle +ungentlemanlike +ungentlemanly +ungenuine +ungeodetic +ungeographic +ungeographical +ungeological +ungeometric +ungeometrical +ungermane +ungerminant +ungerminated +ungerminating +ungerminative +ungesticular +ungesticulating +ungesticulative +ungesticulatory +ungestural +ungesturing +unghostlike +unghostly +ungiddy +ungifted +ungilded +ungilled +ungilt +ungirlish +ungirthed +ungivable +ungiven +ungiving +unglacial +unglaciated +unglad +unglamorous +unglamourous +unglandular +unglaring +unglassed +unglassy +unglazed +ungleaming +ungleaned +ungleeful +unglib +ungliding +unglimpsed +unglistening +unglittering +unglittery +ungloating +unglobular +ungloomy +unglorified +unglorifying +unglorious +unglossaried +unglossed +unglossy +ungloved +unglowering +unglowing +unglozed +unglutinous +unglutted +ungluttonous +ungnarled +ungnawed +ungnawn +ungnostic +ungoaded +ungodlier +ungodliest +ungodlike +ungodly +ungoggled +ungoitered +ungolden +ungoodly +ungored +ungorged +ungossiping +ungossipy +ungothic +ungotten +ungouged +ungouty +ungovernable +ungoverned +ungoverning +ungovernmental +ungowned +ungrabbing +ungraced +ungraceful +ungradated +ungradating +ungraded +ungradual +ungraduated +ungraduating +ungrafted +ungrainable +ungrained +ungrammatical +ungrand +ungrantable +ungranular +ungranulated +ungraphable +ungraphic +ungraphical +ungraphitized +ungrappled +ungrappling +ungraspable +ungrasped +ungrasping +ungrassed +ungrassy +ungrated +ungrateful +ungratifiable +ungratified +ungratifying +ungrating +ungratuitous +ungraved +ungraveled +ungravelled +ungravelly +ungraven +ungravitating +ungravitational +ungravitative +ungrayed +ungrazed +ungreased +ungreasy +ungreedy +ungreened +ungreeted +ungregarious +ungreyed +ungrieved +ungrieving +ungrilled +ungrimed +ungrindable +ungrinned +ungritty +ungrizzled +ungroaning +ungroined +ungroomed +ungrooved +ungross +ungrotesque +unground +ungroundable +ungrounded +ungroupable +ungrouped +ungroveling +ungrovelling +ungrowing +ungrowling +ungrown +ungrudged +ungrudging +ungruesome +ungruff +ungrumbling +ungrumpy +ungual +unguaranteed +unguardable +unguarded +unguentary +unguerdoned +unguessable +unguessed +unguiculate +unguidable +unguided +unguileful +unguillotined +unguinous +ungular +unguled +unguligrade +ungummed +ungushing +ungustatory +ungutted +unguttural +unguyed +unguzzled +ungymnastic +ungyrating +ungyved +unhabitable +unhabited +unhabitual +unhabituated +unhacked +unhackled +unhackneyed +unhaggled +unhaggling +unhailable +unhailed +unhairy +unhale +unhallowed +unhallucinated +unhallucinating +unhallucinatory +unhaloed +unhalted +unhaltered +unhaltering +unhalting +unhalved +unhammered +unhampered +unhampering +unhandicapped +unhandled +unhandseled +unhandselled +unhandsome +unhanged +unhanging +unhanked +unhappi +unhappier +unhappy +unharangued +unharassed +unharbored +unharboured +unhardenable +unhardened +unharked +unharmable +unharmed +unharmful +unharming +unharmonic +unharmonious +unharped +unharping +unharried +unharrowed +unharsh +unharvested +unhashed +unhasted +unhastened +unhasting +unhasty +unhatchable +unhatched +unhated +unhateful +unhating +unhauled +unhaunted +unhawked +unhayed +unhazarded +unhazarding +unhazardous +unhazed +unhazy +unheaded +unheady +unhealable +unhealed +unhealing +unhealthier +unhealthiest +unhealthy +unheaped +unhearable +unheard +unhearing +unhearty +unheatable +unheated +unheathen +unheaved +unheavenly +unheavy +unhectic +unhectored +unhedonistic +unheeded +unheedful +unheeding +unheeled +unhefted +unheightened +unheld +unhelmeted +unhelpable +unhelped +unhelpful +unhelping +unhelved +unhemmed +unheralded +unheraldic +unherbaceous +unherded +unheritable +unhermetic +unhermitic +unhermitical +unheroic +unheroical +unherolike +unhesitant +unhesitating +unhesitative +unheuristic +unhewable +unhewed +unhewn +unhid +unhidden +unhideous +unhieratic +unhieratical +unhilarious +unhilly +unhinderable +unhindered +unhindering +unhinted +unhipped +unhired +unhissed +unhistoric +unhistorical +unhistoried +unhistrionic +unhit +unhittable +unhoarded +unhoarding +unhoary +unhoaxed +unhobbling +unhocked +unhoed +unhogged +unhoisted +unhollow +unhollowed +unholy +unhomely +unhomicidal +unhomiletic +unhomiletical +unhomogeneous +unhomogenized +unhomologic +unhomological +unhomologized +unhomologous +unhoned +unhoneyed +unhonied +unhonored +unhonoured +unhoodwinked +unhoofed +unhooped +unhooted +unhopeful +unhoping +unhoppled +unhorizoned +unhorizontal +unhorned +unhoroscopic +unhorrified +unhortative +unhosed +unhospitalized +unhostile +unhot +unhounded +unhouseled +unhousewifely +unhubristic +unhued +unhugged +unhuman +unhumane +unhumanistic +unhumanitarian +unhumble +unhumbled +unhumid +unhumidified +unhumidifying +unhumiliated +unhumiliating +unhumored +unhumorous +unhumoured +unhumourous +unhung +unhuntable +unhunted +unhurdled +unhurled +unhurried +unhurrying +unhurt +unhurtful +unhurting +unhusbanded +unhushable +unhushing +unhuskable +unhusked +unhustled +unhustling +unhutched +unhuzzaed +unhydrated +unhydraulic +unhydrolized +unhygienic +unhygrometric +unhymeneal +unhymned +unhyphenable +unhyphenated +unhyphened +unhypnotic +unhypnotisable +unhypnotizable +unhypocritical +unhypothecated +unhypothetical +unhysterical +uniambic +uniaxial +unicameral +unicellular +unicolor +uniconoclastic +unicostate +unicursal +unicuspid +unideaed +unideal +unidealised +unidealistic +unidealized +unideated +unideating +unideational +unidentical +unidentifiable +unidentified +unidentifying +unideographic +unideographical +unidiomatic +unidirectional +unidle +unidling +unidolatrous +unidolised +unidolized +unidyllic +unific +unifilar +uniflagellate +uniflorous +unifoliate +unifoliolate +uniformed +uniformitarian +uniformless +unignitable +unignited +unigniting +unignominious +unignorant +unignored +unignoring +unijugate +unilateral +unilingual +uniliteral +unilluded +unillumed +unilluminant +unilluminated +unilluminating +unilluminative +unillusioned +unillusive +unillusory +unillustrated +unillustrative +unillustrious +unilobed +unilocular +unimaged +unimaginable +unimaginary +unimaginative +unimagined +unimbibed +unimbibing +unimbued +unimitable +unimitated +unimitating +unimitative +unimmaculate +unimmanent +unimmediate +unimmerged +unimmersed +unimmigrating +unimminent +unimmolated +unimmunised +unimmunized +unimmured +unimpacted +unimpairable +unimpaired +unimparted +unimpartial +unimpartible +unimpassionate +unimpatient +unimpawned +unimpeachable +unimpeached +unimpearled +unimpeded +unimpeding +unimpelled +unimperative +unimperial +unimperialistic +unimperious +unimpertinent +unimpinging +unimplanted +unimplicated +unimplied +unimplorable +unimplored +unimportant +unimported +unimporting +unimportunate +unimportuned +unimposed +unimposing +unimpounded +unimpoverished +unimprecated +unimpregnated +unimpressed +unimpressible +unimpressionable +unimpressive +unimprinted +unimprisonable +unimprisoned +unimpropriated +unimproved +unimprovised +unimpugnable +unimpugned +unimpulsive +unimputable +unimputed +uninaugurated +unincarcerated +unincarnate +unincarnated +unincensed +uninceptive +unincestuous +uninchoative +unincidental +unincinerated +unincised +unincisive +unincited +uninclinable +uninclined +uninclining +uninclosed +unincludable +unincluded +unincludible +uninclusive +uninconvenienced +unincorporated +unincreasable +unincreased +unincreasing +unincriminated +unincriminating +unincubated +unincumbered +unindemnified +unindentured +unindexed +unindicated +unindicative +unindictable +unindicted +unindigenous +unindignant +unindividualized +unindividuated +unindoctrinated +unindorsed +uninduced +uninducible +uninducted +uninductive +unindulged +unindulgent +unindulging +unindurate +unindurative +unindustrial +unindustrialized +unindustrious +uninebriated +uninebriating +uninert +uninfatuated +uninfectable +uninfected +uninfectious +uninfective +uninferable +uninferential +uninferrable +uninferred +uninferrible +uninfested +uninfiltrated +uninfinite +uninfixed +uninflamed +uninflammable +uninflated +uninflected +uninflective +uninflicted +uninfluenced +uninfluencing +uninfluential +uninfolded +uninformative +uninformed +uninforming +uninfracted +uninfringed +uninfuriated +uninfused +uninfusing +uninfusive +uningested +uningestive +uningrafted +uningrained +uningratiating +uninhabitable +uninhabited +uninhaled +uninherent +uninheritable +uninherited +uninhibited +uninhibiting +uninhumed +uninimical +uniniquitous +uninitialed +uninitialled +uninitiate +uninitiated +uninitiative +uninjectable +uninjected +uninjured +uninjuring +uninjurious +uninked +uninlaid +uninnate +uninnocent +uninnocuous +uninnovating +uninnovative +uninoculable +uninoculated +uninoculative +uninquired +uninquiring +uninquisitive +uninquisitorial +uninscribed +uninserted +uninsidious +uninsinuated +uninsinuating +uninsinuative +uninsistent +uninsolated +uninsolating +uninspected +uninspirable +uninspired +uninspiring +uninspirited +uninspissated +uninstalled +uninstanced +uninstated +uninstigated +uninstigative +uninstilled +uninstinctive +uninstituted +uninstitutional +uninstitutive +uninstructed +uninstructible +uninstructing +uninstructive +uninstrumental +uninsular +uninsultable +uninsulted +uninsulting +uninsurable +uninsured +unintegrable +unintegral +unintegrated +unintegrative +unintellective +unintellectual +unintelligent +unintended +unintensified +unintensive +unintent +unintentional +unintercalated +unintercepted +unintercepting +uninterchangeable +uninterdicted +uninterested +uninteresting +uninterjected +uninterlaced +uninterleaved +uninterlinked +uninterlocked +unintermediate +unintermingled +unintermissive +unintermitted +unintermittent +unintermitting +uninternalized +uninternational +uninterpleaded +uninterpolated +uninterpolative +uninterposed +uninterposing +uninterpretable +uninterpretative +uninterpreted +uninterpretive +uninterred +uninterrogable +uninterrogated +uninterrogative +uninterrogatory +uninterrupted +uninterrupting +uninterruptive +unintersected +unintersecting +uninterspersed +unintervening +uninterviewed +unintervolved +uninterwoven +uninthralled +unintimate +unintimated +unintimidated +unintimidating +unintoned +unintoxicated +unintoxicating +unintrenchable +unintrenched +unintricate +unintrigued +unintriguing +unintrlined +unintroduced +unintroducible +unintroductive +unintroductory +unintromitted +unintromittive +unintrospective +unintroversive +unintroverted +unintruded +unintruding +unintrusive +unintrusted +unintuitable +unintuitional +unintuitive +uninundated +uninured +uninurned +uninvadable +uninvaded +uninvaginated +uninvasive +uninvective +uninveighing +uninveigled +uninvented +uninventive +uninverted +uninvertible +uninvestable +uninvested +uninvestigable +uninvestigated +uninvestigating +uninvestigative +uninvestigatory +uninvidious +uninvigorated +uninvigorating +uninvigorative +uninvincible +uninvited +uninviting +uninvocative +uninvoiced +uninvokable +uninvoked +uninvoluted +uninvolved +uninwoven +uninwrapped +uninwreathed +uniocular +unionistic +uniparous +unipersonal +unipetalous +uniplanar +unipolar +unipotential +unique +uniramous +unirascible +unirenic +uniridescent +unironed +unironical +unirradiated +unirradiative +unirrigable +unirrigated +unirritable +unirritant +unirritated +unirritating +unirritative +unirrupted +unirruptive +uniseptate +unisex +unisexual +unisolationist +unisolative +unisomeric +unisometrical +unisomorphic +unisotropic +unisotropous +unissuable +unissuant +unissued +unitable +unitage +unitalicized +unitary +uniteable +united +unitemized +uniterated +uniterative +unitinerant +unitive +univalent +univalve +universal +univocal +unjacketed +unjaded +unjagged +unjailed +unjapanned +unjarred +unjarring +unjaundiced +unjaunty +unjealous +unjeered +unjeering +unjelled +unjellied +unjeopardised +unjeopardized +unjesting +unjeweled +unjewelled +unjilted +unjocose +unjocund +unjogged +unjogging +unjoinable +unjointured +unjoking +unjolly +unjolted +unjostled +unjournalistic +unjournalized +unjovial +unjoyed +unjoyful +unjoyous +unjubilant +unjudgable +unjudgeable +unjudged +unjudgelike +unjudging +unjudicable +unjudicative +unjudiciable +unjudicial +unjuggled +unjuicy +unjumbled +unjumpable +unjuridic +unjuridical +unjust +unjustifiable +unjustified +unjuvenile +unkeeled +unkempt +unkenned +unkept +unkeyed +unkidnaped +unkidnapped +unkilled +unkilling +unkilned +unkind +unkindhearted +unkindled +unkindling +unkinged +unkinglike +unkingly +unkissed +unkneaded +unkneeling +unknelled +unknighted +unknightly +unknittable +unknocked +unknocking +unknotty +unknowable +unknowing +unknowledgeable +unknown +unlabeled +unlabelled +unlabiate +unlabored +unlaboring +unlaborious +unlaboured +unlabouring +unlacerated +unlacerating +unlackeyed +unlaconic +unlacquered +unladen +unladled +unlagging +unlaid +unlame +unlamed +unlamentable +unlamented +unlaminated +unlampooned +unlanced +unlanded +unlandmarked +unlanguid +unlanguishing +unlanterned +unlapped +unlapsed +unlapsing +unlarcenous +unlarded +unlarge +unlassoed +unlasting +unlathered +unlatticed +unlaudable +unlaudative +unlaudatory +unlauded +unlaughing +unlaunched +unlaundered +unlaureled +unlaurelled +unlaved +unlaving +unlavish +unlavished +unlawful +unlawyerlike +unlayable +unleached +unleaded +unleaflike +unleakable +unleaky +unlean +unlearned +unlearning +unlearnt +unleasable +unleased +unleathered +unleaved +unleavenable +unleavened +unlecherous +unlectured +unled +unledged +unleft +unlegal +unlegalised +unlegalized +unlegible +unlegislated +unlegislative +unleisured +unleisurely +unlengthened +unlenient +unlensed +unlent +unlessened +unlet +unlethal +unlethargic +unlethargical +unlettered +unlevel +unleveled +unlevelled +unleviable +unlevied +unlevigated +unlexicographical +unliable +unlibeled +unlibelled +unlibellous +unlibelous +unliberal +unliberalised +unliberalized +unliberated +unlibidinous +unlicensed +unlicentiated +unlicentious +unlichened +unlidded +unlifelike +unliftable +unlifted +unlifting +unligatured +unlight +unlighted +unlightened +unlignified +unlikable +unlike +unlikeable +unliked +unlikely +unlikened +unlimed +unlimited +unlimned +unlimp +unlineal +unlined +unlingering +unlionised +unlionized +unliquefiable +unliquefied +unliquescent +unliquid +unliquidated +unliquidating +unlisping +unlisted +unlistening +unlit +unliteral +unliteralised +unliteralized +unliterary +unliterate +unlithographic +unlitigated +unlitigating +unlitigious +unlittered +unlivable +unliveable +unlively +unliveried +unliving +unloafing +unloaned +unloaning +unloath +unloathed +unloathful +unloathsome +unlobbied +unlobbying +unlobed +unlocal +unlocalisable +unlocalizable +unlocated +unlocative +unlockable +unlocomotive +unlodged +unlofty +unlogged +unlogical +unlogistic +unlogistical +unlonely +unlooked +unlooted +unlopped +unloquacious +unlosable +unlost +unlotted +unloudly +unlounging +unlovable +unloveable +unloved +unlovely +unloving +unlowered +unlowly +unloyal +unlubricant +unlubricated +unlubricating +unlubricative +unlubricious +unlucent +unlucid +unluckier +unluckiest +unlucky +unlucrative +unludicrous +unluffed +unlugged +unlugubrious +unlumbering +unluminescent +unluminiferous +unluminous +unlumped +unlumpy +unlunar +unlunate +unlunated +unlured +unlurking +unlush +unlustered +unlustful +unlusting +unlustred +unlustrous +unlusty +unluxated +unluxuriant +unluxuriating +unluxurious +unlying +unlyric +unlyrical +unmacadamized +unmacerated +unmachinable +unmachinated +unmachinating +unmachineable +unmachined +unmad +unmadded +unmaddened +unmagical +unmagisterial +unmagnanimous +unmagnetic +unmagnetical +unmagnetised +unmagnetized +unmagnified +unmagnifying +unmaidenlike +unmaidenly +unmailable +unmailed +unmaimable +unmaimed +unmaintainable +unmaintained +unmajestic +unmakable +unmalarial +unmaledictive +unmaledictory +unmalevolent +unmalicious +unmalignant +unmaligned +unmalleable +unmaltable +unmalted +unmammalian +unmanacled +unmanageable +unmanaged +unmandated +unmandatory +unmaned +unmaneuvered +unmangled +unmaniacal +unmanicured +unmanifest +unmanifestative +unmanifested +unmanipulable +unmanipulatable +unmanipulated +unmanipulative +unmanipulatory +unmannered +unmannerly +unmannish +unmanoeuvred +unmantled +unmanual +unmanufacturable +unmanufactured +unmanumitted +unmanurable +unmappable +unmarbled +unmarching +unmarginal +unmarginated +unmarine +unmaritime +unmarkable +unmarked +unmarketable +unmarketed +unmarled +unmarred +unmarriageable +unmarried +unmarring +unmarrying +unmarshaled +unmarshalled +unmartial +unmartyred +unmarvellous +unmarvelous +unmasculine +unmashed +unmasked +unmasking +unmassacred +unmassed +unmasterable +unmastered +unmasterful +unmasticated +unmasticatory +unmatchable +unmatched +unmatching +unmaterial +unmaterialised +unmaterialistic +unmaterialized +unmaternal +unmathematical +unmatriculated +unmatrimonial +unmatted +unmaturative +unmature +unmatured +unmaturing +unmaudlin +unmauled +unmeandering +unmeaning +unmeaningful +unmeant +unmeasurable +unmeasured +unmechanical +unmechanised +unmechanistic +unmechanized +unmedaled +unmedalled +unmeddled +unmeddlesome +unmeddling +unmediaeval +unmediated +unmediating +unmediative +unmedicable +unmedical +unmedicated +unmedicative +unmedicinal +unmedieval +unmeditated +unmeditating +unmeditative +unmeet +unmelancholic +unmelancholy +unmeliorated +unmellifluent +unmellifluous +unmellow +unmellowed +unmelodic +unmelodious +unmelodised +unmelodized +unmelodramatic +unmeltable +unmelted +unmelting +unmemorable +unmemorialised +unmemorialized +unmemoried +unmenaced +unmenacing +unmendable +unmendacious +unmended +unmenial +unmenstruating +unmensurable +unmental +unmentholated +unmentionable +unmentioned +unmercantile +unmercenary +unmercerized +unmerchandised +unmerchantable +unmerchantly +unmerciful +unmercurial +unmeretricious +unmeridional +unmeringued +unmeritable +unmerited +unmeriting +unmeritorious +unmerry +unmesmeric +unmesmerised +unmesmerized +unmet +unmetaled +unmetalised +unmetalized +unmetalled +unmetallic +unmetallurgic +unmetallurgical +unmetamorphic +unmetamorphosed +unmetaphysic +unmetaphysical +unmeted +unmeteorologic +unmeteorological +unmetered +unmethodic +unmethodical +unmethodised +unmethodising +unmethodized +unmethodizing +unmethylated +unmeticulous +unmetred +unmetric +unmetrical +unmetrified +unmetropolitan +unmiasmal +unmiasmatic +unmiasmatical +unmiasmic +unmicaceous +unmicrobial +unmicrobic +unmicroscopic +unmigrant +unmigrating +unmigrative +unmigratory +unmildewed +unmilitant +unmilitarised +unmilitaristic +unmilitarized +unmilitary +unmilked +unmilled +unmilted +unmimeographed +unmimetic +unmimicked +unminced +unmincing +unmindful +unminding +unmined +unmineralised +unmineralized +unmingled +unminimised +unminimising +unminimized +unminimizing +unministered +unministerial +unministrant +unministrative +unminted +unminuted +unmiracled +unmiraculous +unmired +unmirrored +unmirthful +unmiry +unmisanthropic +unmisanthropical +unmischievous +unmiscible +unmiserly +unmisgiving +unmisguided +unmisinterpretable +unmisled +unmissable +unmissed +unmistakable +unmistaken +unmistaking +unmistrusted +unmistrustful +unmistrusting +unmisunderstandable +unmisunderstood +unmitigable +unmitigated +unmitigative +unmittened +unmixable +unmixed +unmoaned +unmoaning +unmoated +unmobbed +unmobile +unmobilised +unmobilized +unmocked +unmocking +unmodeled +unmodelled +unmoderated +unmoderating +unmodern +unmodernised +unmodernized +unmodest +unmodifiable +unmodificative +unmodified +unmodish +unmodulated +unmodulative +unmoiled +unmoldable +unmoldered +unmoldering +unmoldy +unmolested +unmolesting +unmollifiable +unmollified +unmollifying +unmolten +unmomentous +unmonarchic +unmonarchical +unmonastic +unmonetary +unmonistic +unmonitored +unmonogrammed +unmonopolised +unmonopolising +unmonopolized +unmonopolizing +unmonotonous +unmonumental +unmonumented +unmoody +unmooted +unmopped +unmoral +unmoralising +unmoralistic +unmoralizing +unmorbid +unmordant +unmoribund +unmorose +unmorphological +unmortal +unmortared +unmortgageable +unmortified +unmossed +unmossy +unmothered +unmotherly +unmotile +unmotionable +unmotioned +unmotioning +unmotivated +unmotivating +unmotored +unmotorised +unmotorized +unmottled +unmouldable +unmouldered +unmouldering +unmouldy +unmounded +unmountable +unmountainous +unmounted +unmounting +unmourned +unmournful +unmourning +unmouthable +unmouthed +unmovable +unmoveable +unmoved +unmoving +unmowed +unmown +unmucilaged +unmudded +unmuddied +unmuddled +unmuddy +unmulcted +unmulish +unmulled +unmullioned +unmultipliable +unmultiplicable +unmultiplicative +unmultiplied +unmultiplying +unmumbled +unmumbling +unmummied +unmummified +unmummifying +unmunched +unmundane +unmundified +unmunicipalised +unmunicipalized +unmunificent +unmunitioned +unmurmured +unmurmuring +unmurmurous +unmuscled +unmuscular +unmusical +unmusicianly +unmusing +unmusked +unmusterable +unmustered +unmutable +unmutant +unmutated +unmutational +unmutative +unmuted +unmutilated +unmutilative +unmutinous +unmuttered +unmuttering +unmutual +unmutualised +unmutualized +unmyopic +unmysterious +unmystic +unmystical +unmystified +unmythical +unmythological +unnacreous +unnagged +unnagging +unnaked +unnamable +unnameable +unnamed +unnaove +unnapped +unnarcissistic +unnarcotic +unnarratable +unnarrated +unnarrative +unnarrow +unnarrowed +unnasal +unnascent +unnational +unnationalised +unnationalistic +unnationalized +unnative +unnatural +unnaturalistic +unnauseated +unnauseating +unnautical +unnavigable +unnavigated +unneat +unnecessary +unnecessitated +unnecessitating +unnecessitous +unnectareous +unnectarial +unneeded +unneedful +unneedy +unnefarious +unnegated +unneglected +unneglectful +unnegligent +unnegotiable +unnegotiated +unneighborly +unneighbourly +unnephritic +unnervous +unnestled +unnetted +unnettled +unneural +unneuralgic +unneurotic +unneutral +unnew +unnibbed +unnibbled +unnice +unniched +unnicked +unnicknamed +unniggard +unnigh +unnihilistic +unnimble +unnipped +unnitrogenised +unnitrogenized +unnitrogenous +unnocturnal +unnodding +unnoised +unnoisy +unnomadic +unnominal +unnominalistic +unnominated +unnominative +unnoosed +unnormal +unnormalised +unnormalising +unnormalized +unnormalizing +unnormative +unnorthern +unnosed +unnotable +unnotational +unnotched +unnoted +unnoteworthy +unnoticeable +unnoticed +unnoticing +unnotified +unnoting +unnotional +unnotioned +unnourishable +unnourished +unnourishing +unnovel +unnovercal +unnucleated +unnullified +unnumbed +unnumbered +unnumerated +unnumerical +unnumerous +unnurtured +unnutritious +unnutritive +unnuzzled +unnymphal +unnymphean +unnymphlike +unoared +unobdurate +unobese +unobeyed +unobeying +unobfuscated +unobjected +unobjectified +unobjectionable +unobjectional +unobjective +unobjectivized +unobligated +unobligative +unobligatory +unobliged +unobliging +unobliterated +unoblivious +unobnoxious +unobscene +unobscure +unobscured +unobsequious +unobservable +unobservant +unobserved +unobserving +unobsessed +unobsolete +unobstinate +unobstructed +unobstructive +unobstruent +unobtainable +unobtained +unobtruded +unobtruding +unobtrusive +unobverted +unobviable +unobviated +unobvious +unoccasional +unoccidental +unoccluded +unoccupied +unoccurring +unoceanic +unocular +unodious +unodored +unodoriferous +unodorous +unoecumenic +unoecumenical +unoffendable +unoffended +unoffending +unoffensive +unoffered +unofficed +unofficered +unofficial +unofficiated +unofficiating +unofficious +unogled +unoiled +unoiling +unoily +unomened +unominous +unomitted +unomnipotent +unomniscient +unonerous +unontological +unopened +unopening +unoperatable +unoperated +unoperatic +unoperating +unoperative +unopiated +unopiatic +unopined +unopinionated +unopinioned +unopportune +unopportunistic +unopposable +unopposed +unopposing +unoppositional +unoppressed +unoppressive +unopprobrious +unoppugned +unopressible +unopted +unoptimistic +unoptimistical +unoptional +unopulent +unoral +unorational +unoratorial +unoratorical +unorbed +unorbital +unorchestrated +unordainable +unordained +unorderable +unordered +unorderly +unordinal +unordinary +unorganic +unorganisable +unorganizable +unorganized +unoriental +unoriginal +unornamental +unornamented +unornate +unornithological +unorphaned +unorthodox +unorthodoxy +unorthographical +unoscillating +unosculated +unosmotic +unossified +unossifying +unostensible +unostensive +unostentatious +unousted +unoutlawed +unoutraged +unoutspoken +unoutworn +unovercome +unoverdrawn +unoverflowing +unoverhauled +unoverlooked +unoverpaid +unoverpowered +unoverruled +unovert +unovertaken +unoverthrown +unoverwhelmed +unowing +unowned +unoxidated +unoxidative +unoxidisable +unoxidised +unoxidizable +unoxidized +unoxygenated +unoxygenized +unpaced +unpacifiable +unpacific +unpacified +unpacifist +unpacifistic +unpackaged +unpadded +unpadlocked +unpagan +unpaged +unpaginal +unpaginated +unpaid +unpained +unpainful +unpaining +unpainted +unpaired +unpalatable +unpalatal +unpalatial +unpale +unpaled +unpalisaded +unpalisadoed +unpalled +unpalliated +unpalliative +unpalpable +unpalpitating +unpalsied +unpaltry +unpampered +unpanegyrised +unpanegyrized +unpaneled +unpanelled +unpanicky +unpanniered +unpanoplied +unpantheistic +unpantheistical +unpanting +unpapal +unpapered +unparaded +unparadoxal +unparadoxical +unparagraphed +unparallel +unparalleled +unparalysed +unparalyzed +unparaphrased +unparasitic +unparasitical +unparceled +unparceling +unparcelled +unparcelling +unparched +unparching +unpardonable +unpardoned +unpardoning +unpared +unparental +unparenthesised +unparenthesized +unparenthetic +unparenthetical +unpargeted +unparked +unparking +unparliamentary +unparliamented +unparochial +unparodied +unparolable +unparoled +unparried +unparrying +unparsed +unparsimonious +unpartaken +unpartaking +unparted +unpartible +unparticipant +unparticipated +unparticipating +unparticipative +unparticular +unparticularised +unparticularising +unparticularized +unparticularizing +unpartisan +unpartitioned +unpartitive +unpartizan +unpassed +unpassing +unpassionate +unpassioned +unpassive +unpasteurised +unpasteurized +unpastoral +unpastured +unpatched +unpatent +unpatentable +unpatented +unpaternal +unpathetic +unpathological +unpatient +unpatinated +unpatriarchal +unpatrician +unpatriotic +unpatristic +unpatristical +unpatrolled +unpatronisable +unpatronizable +unpatronizing +unpatted +unpatterned +unpatternized +unpausing +unpaved +unpavilioned +unpaving +unpawed +unpawned +unpayable +unpaying +unpeaceable +unpeaceful +unpeaked +unpealed +unpearled +unpebbled +unpecked +unpeculating +unpeculiar +unpedagogic +unpedantic +unpedantical +unpeddled +unpedigreed +unpeelable +unpeeled +unpeeling +unpeevish +unpejorative +unpelted +unpenal +unpenalised +unpenalized +unpenanced +unpenciled +unpencilled +unpendant +unpendent +unpending +unpendulous +unpenetrable +unpenetrant +unpenetrated +unpenetrating +unpenetrative +unpenitent +unpenitential +unpennied +unpennoned +unpensionable +unpensioned +unpensioning +unpent +unpenurious +unpeppered +unpeppery +unperceivable +unperceived +unperceiving +unperceptible +unperceptional +unperceptive +unperceptual +unperched +unpercipient +unpercolated +unpercussed +unpercussive +unperdurable +unperemptory +unperfect +unperfected +unperfectible +unperfective +unperfidious +unperforable +unperforated +unperforating +unperforative +unperformable +unperformed +unperforming +unperfumed +unperilous +unperiodic +unperiodical +unperipheral +unperiphrastic +unperishable +unperished +unperishing +unperjured +unperjuring +unpermanent +unpermeable +unpermeant +unpermeated +unpermeating +unpermeative +unpermissible +unpermissive +unpermitted +unpermitting +unpernicious +unperpendicular +unperpetrated +unperpetuable +unperpetuated +unperpetuating +unperplexed +unperplexing +unpersecuted +unpersecuting +unpersecutive +unpersisting +unpersonable +unpersonal +unpersonalised +unpersonalising +unpersonalized +unpersonalizing +unpersonified +unpersonifying +unperspicuous +unperspired +unperspiring +unpersuadable +unpersuaded +unpersuasible +unpersuasive +unpertaining +unpertinent +unperturbable +unperturbed +unperturbing +unperuked +unperusable +unperused +unpervaded +unpervading +unpervasive +unperverse +unperversive +unperverted +unpervious +unpessimistic +unpestered +unpesterous +unpestilent +unpestilential +unpetaled +unpetalled +unpetitioned +unpetrified +unpetrifying +unpetted +unpetticoated +unpetulant +unphased +unphenomenal +unphilanthropic +unphilologic +unphilological +unphilosophic +unphilosophical +unphlegmatic +unphlegmatical +unphonetic +unphonnetical +unphosphatised +unphosphatized +unphotographable +unphotographed +unphrased +unphysical +unphysiological +unpicaresque +unpickable +unpicked +unpicketed +unpickled +unpictorial +unpictured +unpicturesque +unpieced +unpierceable +unpierced +unpiercing +unpigmented +unpilfered +unpillaged +unpillared +unpilloried +unpillowed +unpiloted +unpimpled +unpinched +unpinioned +unpioneering +unpious +unpiped +unpiqued +unpirated +unpiratical +unpitched +unpiteous +unpitiable +unpitied +unpitiful +unpitted +unpitying +unplacated +unplacatory +unplaced +unplacid +unplagiarised +unplagiarized +unplagued +unplaned +unplanished +unplanked +unplantable +unplanted +unplashed +unplastic +unplated +unplatitudinous +unplatted +unplausible +unplayable +unplayed +unplayful +unplaying +unpleached +unpleadable +unpleaded +unpleading +unpleasable +unpleasant +unpleased +unpleasing +unpleasurable +unpleated +unplebeian +unpledged +unplenished +unplenteous +unplentiful +unpliable +unpliant +unplied +unplighted +unplodding +unplotted +unplotting +unploughed +unplowed +unplucked +unplumb +unplumbed +unplumed +unplummeted +unplundered +unplunderous +unplunged +unpluralised +unpluralistic +unpluralized +unplutocratic +unplutocratical +unpneumatic +unpoached +unpodded +unpoetic +unpoetical +unpoeticised +unpoeticized +unpoetized +unpoignant +unpointed +unpointing +unpoised +unpoisonable +unpoisoned +unpoisonous +unpolarised +unpolarized +unpoled +unpolemic +unpolemical +unpoliced +unpolishable +unpolished +unpolite +unpolitic +unpolitical +unpollarded +unpolled +unpollened +unpolluted +unpolluting +unpolymerised +unpolymerized +unpompous +unponderable +unpondered +unponderous +unpontifical +unpooled +unpopular +unpopularised +unpopularized +unpopulated +unpopulous +unporcelainized +unpornographic +unporous +unportable +unportended +unportentous +unporticoed +unportionable +unportioned +unportly +unportrayable +unportrayed +unposed +unposing +unpositive +unpositivistic +unpossessable +unpossessed +unpossessing +unpossessive +unposted +unpostered +unpostmarked +unpostponable +unpostponed +unpostulated +unpotable +unpotent +unpouched +unpoulticed +unpounced +unpounded +unpourable +unpoured +unpouting +unpowdered +unpracticable +unpractical +unpracticed +unpractised +unpragmatic +unpragmatical +unpraisable +unpraised +unpraiseful +unpraiseworthy +unpraising +unpranked +unprating +unprayerful +unpraying +unpreached +unpreaching +unprecarious +unprecautioned +unpreceded +unprecedented +unprecedential +unpreceptive +unprecious +unprecipiced +unprecipitant +unprecipitate +unprecipitated +unprecipitative +unprecipitous +unprecise +unprecisive +unprecludable +unprecluded +unpreclusive +unprecocious +unpredaceous +unpredacious +unpredatory +unpredestined +unpredicable +unpredicated +unpredicative +unpredictable +unpredicted +unpredicting +unpredictive +unpredisposed +unpredisposing +unpreempted +unpreened +unprefaced +unpreferable +unpreferred +unprefigured +unprefixal +unprefixed +unpregnant +unprejudiced +unprejudicial +unprelatic +unpreluded +unpremature +unpremeditated +unpremonished +unpreoccupied +unpreordained +unprepared +unpreparing +unpreponderated +unpreponderating +unprepossessing +unpreposterous +unpresaged +unpresaging +unprescient +unprescinded +unprescribed +unpresentable +unpresentative +unpresented +unpreservable +unpreserved +unpresidential +unpresiding +unpressed +unpressured +unpresumable +unpresumed +unpresuming +unpresumptive +unpresumptuous +unpretended +unpretentious +unpretermitted +unpreternatural +unprettified +unpretty +unprevailing +unprevalent +unprevaricating +unpreventable +unpreventative +unprevented +unpreventible +unpreventive +unpreviewed +unpreying +unpriced +unpricked +unprickled +unprideful +unpriestlike +unpriestly +unpriggish +unprim +unprimed +unprimitive +unprimitivistic +unprimmed +unprincely +unprincipled +unprintable +unprinted +unprismatic +unprismatical +unprisonable +unprivate +unprivileged +unprizable +unprized +unprobated +unprobational +unprobationary +unprobative +unprobed +unproblematic +unproblematical +unprocessed +unprocessional +unproclaimed +unprocrastinated +unprocreant +unprocreated +unproctored +unprocurable +unprocured +unprodded +unprodigious +unproduced +unproducible +unproductive +unprofanable +unprofane +unprofaned +unprofessed +unprofessing +unprofessional +unprofessorial +unproffered +unprofitable +unprofited +unprofiteering +unprofiting +unprofound +unprofuse +unprognosticated +unprognosticative +unprogrammatic +unprogressed +unprogressive +unprohibited +unprohibitive +unprojected +unprojecting +unprojective +unproliferous +unprolific +unprolix +unprologued +unprolongable +unprolonged +unpromiscuous +unpromised +unpromising +unpromotable +unpromoted +unpromotional +unpromotive +unprompt +unprompted +unpromulgated +unpronounceable +unpronounced +unpronouncing +unproofread +unpropagable +unpropagandistic +unpropagated +unpropagative +unpropelled +unpropellent +unproper +unpropertied +unprophesied +unprophetic +unprophetical +unpropitiable +unpropitiated +unpropitiating +unpropitiative +unpropitiatory +unpropitious +unproportionable +unproportional +unproportionate +unproportioned +unproposable +unproposed +unproposing +unpropounded +unpropped +unprorogued +unprosaic +unprosaical +unproscribable +unproscribed +unproscriptive +unprospered +unprospering +unprosperous +unprostituted +unprostrated +unprotectable +unprotected +unprotecting +unprotective +unprotestant +unprotested +unprotesting +unprotracted +unprotractive +unprotruded +unprotrudent +unprotruding +unprotrusible +unprotrusive +unprotuberant +unproud +unprovable +unproved +unproven +unproverbial +unprovidable +unprovided +unprovident +unprovidential +unprovincial +unproving +unprovisional +unprovisioned +unprovocative +unprovokable +unprovoked +unprovoking +unprowling +unprudent +unprudential +unprunable +unpruned +unprying +unpsychic +unpsychological +unpsychopathic +unpsychotic +unpublic +unpublicized +unpublishable +unpublished +unpuckered +unpuddled +unpuffed +unpuffing +unpugilistic +unpugnacious +unpulleyed +unpulped +unpulsating +unpulsative +unpulverable +unpulverised +unpulverized +unpulvinate +unpulvinated +unpummeled +unpummelled +unpumpable +unpumped +unpunctate +unpunctated +unpunctilious +unpunctual +unpunctuated +unpunctuating +unpunctured +unpunishable +unpunished +unpunishing +unpunitive +unpurchasable +unpurchased +unpure +unpurgative +unpurgeable +unpurged +unpurified +unpurifying +unpuristic +unpuritan +unpuritanic +unpuritanical +unpurled +unpurloined +unpurported +unpurposed +unpurposing +unpurposive +unpursuable +unpursuant +unpursued +unpursuing +unpushed +unputative +unputrefiable +unputrefied +unputrid +unputtied +unquadded +unquaffed +unquailing +unquaking +unqualifiable +unqualified +unqualifying +unquantified +unquantitative +unquarantined +unquarreling +unquarrelling +unquarrelsome +unquarried +unquartered +unquashed +unquavering +unquayed +unqueenly +unquellable +unquelled +unquenchable +unquenched +unqueried +unquerulous +unquested +unquestionable +unquestioned +unquestioning +unquibbling +unquick +unquickened +unquiet +unquietable +unquieted +unquieting +unquilted +unquitted +unquivered +unquivering +unquixotic +unquixotical +unquizzable +unquizzed +unquizzical +unquotable +unquoted +unrabbeted +unrabbinic +unrabbinical +unradiant +unradiated +unradiative +unradical +unradioactive +unraffled +unraftered +unraided +unrailed +unrailroaded +unrailwayed +unrainy +unraisable +unraiseable +unraised +unraked +unraking +unrallied +unrallying +unrambling +unramified +unrammed +unramped +unranched +unrancid +unrancored +unrancorous +unrancoured +unrancourous +unranging +unranked +unrankled +unransacked +unransomable +unransomed +unranting +unrapacious +unraped +unraptured +unrapturous +unrarefied +unrash +unrasped +unrasping +unraspy +unratable +unrated +unratified +unrationable +unrational +unrationalised +unrationalising +unrationalized +unrationalizing +unrationed +unravaged +unraving +unravished +unrayed +unrazed +unrazored +unreachable +unreached +unreactionary +unreactive +unread +unreadable +unready +unreal +unrealistic +unrealizable +unrealmed +unreaped +unreared +unreasonable +unreasoned +unreasoning +unreassuring +unreaving +unrebated +unrebellious +unrebuffable +unrebuffed +unrebuilt +unrebukable +unrebuked +unrebuttable +unrebutted +unrecalcitrant +unrecallable +unrecalled +unrecanted +unrecanting +unrecaptured +unreceding +unreceipted +unreceivable +unreceiving +unreceptive +unrecessive +unrecipient +unreciprocal +unreciprocated +unreciprocating +unrecitative +unrecited +unreckonable +unreckoned +unreclaimable +unreclaimed +unreclaiming +unreclined +unreclining +unrecluse +unreclusive +unrecognisable +unrecognitory +unrecognizable +unrecognized +unrecognizing +unrecollected +unrecollective +unrecommendable +unrecommended +unrecompensable +unrecompensed +unreconcilable +unreconciled +unreconciling +unrecondite +unreconnoitered +unreconnoitred +unreconsidered +unreconstructed +unreconstructible +unrecordable +unrecorded +unrecountable +unrecounted +unrecoverable +unrecreant +unrecreational +unrecriminative +unrecruitable +unrecruited +unrectangular +unrectifiable +unrectified +unrecumbent +unrecuperated +unrecuperative +unrecuperatory +unrecurrent +unrecurring +unrecusant +unredacted +unredeemable +unredeeming +unredemptive +unredressable +unredressed +unreduced +unreducible +unreefed +unreelable +unreferenced +unreferred +unrefilled +unrefined +unrefining +unrefitted +unreflected +unreflecting +unreflective +unreformable +unreformative +unreformed +unreforming +unrefracted +unrefracting +unrefractive +unrefractory +unrefrainable +unrefrained +unrefraining +unrefrangible +unrefreshed +unrefreshing +unrefrigerated +unrefulgent +unrefundable +unrefunded +unrefunding +unrefusable +unrefused +unrefusing +unrefutable +unrefuted +unrefuting +unregainable +unregained +unregal +unregaled +unregardable +unregardant +unregarded +unregardful +unregenerable +unregenerate +unregenerating +unregenerative +unregimental +unregimented +unregistered +unregistrable +unregressive +unregretful +unregrettable +unregretted +unregretting +unregulable +unregularised +unregularized +unregulated +unregulative +unregulatory +unregurgitated +unrehabilitated +unrehearsable +unrehearsed +unrehearsing +unreigning +unreined +unreinforced +unreinstated +unreiterable +unreiterated +unreiterating +unreiterative +unrejectable +unrejected +unrejective +unrejoiced +unrejoicing +unrejuvenated +unrejuvenating +unrelapsing +unrelated +unrelating +unrelational +unrelative +unrelativistic +unrelaxable +unrelaxed +unrelaxing +unrelayed +unreleasable +unreleased +unreleasible +unreleasing +unrelegable +unrelegated +unrelented +unrelenting +unrelevant +unreliable +unreliant +unrelievable +unrelieved +unrelieving +unreligioned +unreligious +unrelinquishable +unrelinquished +unrelinquishing +unrelishable +unrelished +unrelishing +unreluctant +unremaining +unremanded +unremarkable +unremarked +unremarried +unremediable +unremedied +unremembered +unremembering +unreminded +unreminiscent +unremissible +unremissive +unremittable +unremitted +unremitting +unremonstrant +unremonstrated +unremonstrating +unremonstrative +unremorseful +unremote +unremounted +unremovable +unremoved +unremunerated +unremunerative +unrenderable +unrendered +unrenewable +unrenewed +unrenounceable +unrenounced +unrenouncing +unrenovated +unrenovative +unrenowned +unrent +unrentable +unrented +unrenunciable +unrenunciative +unrenunciatory +unreorganised +unreorganized +unrepaid +unrepaired +unrepayable +unrepealable +unrepealed +unrepeatable +unrepeated +unrepellable +unrepelled +unrepellent +unrepentant +unrepented +unrepenting +unrepetitious +unrepetitive +unrepined +unrepining +unreplaceable +unreplaced +unreplenished +unreplete +unreplevinable +unreplevined +unreplevisable +unreplied +unreplying +unreportable +unreported +unreportorial +unreposed +unreposeful +unreposing +unrepossessed +unreprehended +unreprehensible +unrepresentable +unrepresentational +unrepresentative +unrepresented +unrepressed +unrepressible +unrepressive +unreprievable +unreprieved +unreprimanded +unreprimanding +unreprinted +unreproachable +unreproached +unreproachful +unreproaching +unreprobated +unreprobative +unreproducible +unreproductive +unreprovable +unreproved +unreproving +unrepublican +unrepudiable +unrepudiated +unrepudiative +unrepugnant +unrepulsed +unrepulsing +unrepulsive +unreputable +unreputed +unrequalified +unrequested +unrequired +unrequisite +unrequisitioned +unrequitable +unrequited +unrequiting +unrescinded +unrescissable +unrescissory +unrescuable +unrescued +unresearched +unresemblant +unresembling +unresented +unresentful +unresenting +unreserved +unresident +unresidential +unresidual +unresigned +unresilient +unresinous +unresistable +unresistant +unresisted +unresistible +unresisting +unresistive +unresolute +unresolvable +unresolved +unresolving +unresonant +unresonating +unresounded +unresourceful +unrespectable +unrespected +unrespectful +unrespirable +unrespired +unrespited +unresplendent +unresponding +unresponsible +unresponsive +unrested +unrestful +unresting +unrestitutive +unrestorable +unrestorative +unrestored +unrestrainable +unrestrained +unrestrictable +unrestricted +unrestrictive +unresumed +unresumptive +unresurrected +unresuscitable +unresuscitated +unresuscitating +unresuscitative +unretainable +unretained +unretaining +unretaliated +unretaliating +unretaliative +unretaliatory +unretardable +unretarded +unretentive +unreticent +unretinued +unretired +unretiring +unretorted +unretouched +unretractable +unretracted +unretractive +unretreated +unretreating +unretrenchable +unretrenched +unretributive +unretributory +unretrievable +unretrieved +unretroactive +unretrograded +unretrograding +unretrogressive +unretted +unreturnable +unreturned +unreturning +unrevealable +unrevealed +unrevealing +unrevelational +unreveling +unrevelling +unrevenged +unrevengeful +unrevenging +unreverberant +unreverberated +unreverberating +unreverberative +unrevered +unreverenced +unreverent +unreverential +unreversed +unreversible +unreverted +unrevertible +unreverting +unrevetted +unreviewable +unreviewed +unreviled +unreviling +unrevised +unrevivable +unrevived +unrevocable +unrevokable +unrevoked +unrevolted +unrevolting +unrevolutionary +unrevolutionized +unrevolved +unrevolving +unrewardable +unrewarded +unrewarding +unreworded +unrhapsodic +unrhapsodical +unrhetorical +unrheumatic +unrhythmic +unrhythmical +unribbed +unribboned +unridable +unridden +unriddled +unridered +unridged +unridiculed +unridiculous +unrife +unriffled +unrifled +unrifted +unrightable +unrighted +unrighteous +unrightful +unrigid +unrigorous +unrimed +unringable +unringing +unrinsed +unrioting +unriotous +unripe +unripened +unripening +unrippable +unrippled +unrippling +unrisen +unrisible +unrising +unriskable +unrisked +unrisky +unritual +unritualistic +unrivalable +unrivaled +unrivaling +unrivalled +unrivalling +unrivalrous +unrived +unriven +unriveted +unriveting +unroaming +unroasted +unrobbed +unrobust +unrocked +unrocky +unrodded +unroiled +unrollable +unromantic +unromanticised +unromanticized +unroomy +unroosted +unroosting +unroped +unrosed +unrotary +unrotated +unrotating +unrotational +unrotative +unrotatory +unrotted +unrotten +unrotund +unrouged +unroughened +unrounded +unroused +unrousing +unroutable +unrouted +unroutine +unroving +unrowdy +unrowed +unroweled +unrowelled +unrubbed +unrubified +unrubrical +unrubricated +unruddered +unruddled +unrude +unrued +unrueful +unruffable +unruffed +unruffled +unrugged +unruinable +unruinous +unruled +unruly +unruminant +unruminated +unruminating +unruminative +unrummaged +unrumored +unrumoured +unrumpled +unrun +unrung +unrupturable +unruptured +unrural +unrushed +unrushing +unrustic +unrusticated +unrustling +unsabered +unsabled +unsabotaged +unsabred +unsaccharine +unsacerdotal +unsacked +unsacramental +unsacramentarian +unsacred +unsacrificeable +unsacrificed +unsacrificial +unsacrificing +unsacrilegious +unsad +unsaddened +unsadistic +unsafe +unsafetied +unsagacious +unsage +unsagging +unsaid +unsailable +unsailed +unsainted +unsaintly +unsalable +unsalacious +unsaleable +unsalient +unsaline +unsalivated +unsalivating +unsallow +unsallying +unsaltable +unsaltatorial +unsaltatory +unsalted +unsalty +unsalubrious +unsalutary +unsalutatory +unsaluted +unsaluting +unsalvageable +unsalvaged +unsalved +unsanctified +unsanctifying +unsanctimonious +unsanctionable +unsanctioned +unsanctioning +unsandaled +unsandalled +unsanded +unsanguinary +unsanguine +unsanguineous +unsanitary +unsanitized +unsapient +unsapiential +unsaponifiable +unsaponified +unsapped +unsarcastic +unsarcastical +unsardonic +unsartorial +unsashed +unsatable +unsatanic +unsatanical +unsatcheled +unsated +unsatiable +unsatiated +unsatiating +unsating +unsatiric +unsatirical +unsatirisable +unsatirised +unsatirizable +unsatirized +unsatisfactory +unsatisfiable +unsatisfied +unsaturable +unsaturated +unsauced +unsavable +unsavage +unsaveable +unsaved +unsaving +unsavored +unsavory +unsavoured +unsavoury +unsawed +unsawn +unsayable +unscabbed +unscabrous +unscaffolded +unscalable +unscalded +unscalding +unscaled +unscaling +unscalloped +unscaly +unscamped +unscandalised +unscandalized +unscandalous +unscannable +unscanned +unscanty +unscarce +unscared +unscarfed +unscarified +unscarred +unscarved +unscathed +unscattered +unscavenged +unscenic +unscented +unsceptered +unsceptical +unsceptred +unscheduled +unschematic +unschematised +unschematized +unschemed +unscheming +unschismatic +unschismatical +unschizoid +unschizophrenic +unscholarlike +unscholastic +unschooled +unscientific +unscintillant +unscintillating +unscissored +unscoffed +unscoffing +unscolded +unscolding +unsconced +unscooped +unscorched +unscorching +unscored +unscorified +unscoring +unscorned +unscornful +unscotched +unscoured +unscourged +unscourging +unscouring +unscowling +unscraped +unscraping +unscratchable +unscratched +unscratching +unscrawled +unscrawling +unscreenable +unscreened +unscribal +unscribbled +unscribed +unscrimped +unscripted +unscriptural +unscrubbed +unscrupled +unscrupulous +unscrutable +unscrutinised +unscrutinising +unscrutinized +unscrutinizing +unsculptural +unsculptured +unscummed +unsealable +unsealed +unsearchable +unsearched +unsearching +unseared +unseasonable +unseasoned +unseaworthy +unseceded +unseceding +unsecluded +unsecluding +unseclusive +unseconded +unsecretarial +unsecreted +unsecreting +unsecretive +unsectarian +unsectional +unsectionalised +unsectionalized +unsectioned +unsecular +unsecularised +unsecularized +unsecure +unsecured +unsedate +unsedative +unsedentary +unsedimental +unseditious +unseduced +unseducible +unseductive +unsedulous +unseeable +unseeded +unseeding +unseeing +unseeking +unseemly +unseen +unseethed +unseething +unsegmental +unsegmentary +unsegmented +unsegregable +unsegregated +unsegregating +unsegregational +unsegregative +unseignioral +unseignorial +unseismal +unseismic +unseizable +unseized +unselect +unselected +unselective +unselfconscious +unselfish +unsenescent +unsenile +unsensate +unsensational +unsensed +unsensible +unsensing +unsensitive +unsensory +unsensual +unsensualised +unsensualistic +unsensualized +unsensuous +unsent +unsentenced +unsententious +unsentient +unsentimental +unsentimentalised +unsentimentalized +unsentineled +unsentinelled +unseparable +unseparate +unseparated +unseparating +unseparative +unsepulchral +unsepultured +unsequenced +unsequent +unsequential +unsequestered +unseraphic +unseraphical +unsere +unserenaded +unserene +unserialised +unserialized +unserious +unserrate +unserrated +unserried +unservable +unserved +unserviceable +unserviced +unservile +unserving +unsesquipedalian +unset +unsetting +unsettleable +unsettled +unseverable +unsevere +unsevered +unsexual +unshabby +unshadowable +unshadowed +unshady +unshafted +unshakable +unshakeable +unshaken +unshaking +unshamable +unshameable +unshamed +unshammed +unshanked +unshapable +unshapeable +unshaped +unshapely +unshapen +unshaping +unsharable +unshareable +unshared +unsharing +unsharp +unsharped +unsharpened +unsharpening +unsharping +unshattered +unshavable +unshaveable +unshaved +unsheared +unshed +unshedding +unsheer +unsheeted +unsheeting +unsheltered +unsheltering +unshelved +unshepherded +unshepherding +unshieldable +unshielded +unshielding +unshifted +unshifting +unshifty +unshimmering +unshined +unshingled +unshining +unshiny +unshippable +unshipped +unshirked +unshirking +unshirred +unshirted +unshivered +unshivering +unshockable +unshocked +unshocking +unshod +unshoed +unshored +unshorn +unshort +unshorten +unshotted +unshouted +unshouting +unshoved +unshoveled +unshovelled +unshowable +unshowed +unshowered +unshowering +unshown +unshowy +unshredded +unshrewd +unshrewish +unshrill +unshrined +unshrinkable +unshrinking +unshrived +unshriveled +unshrivelled +unshriven +unshrugging +unshrunk +unshrunken +unshuddering +unshuffled +unshunnable +unshunned +unshunted +unshut +unshuttered +unshy +unsibilant +unsiccative +unsick +unsickened +unsicker +unsickered +unsided +unsidereal +unsiding +unsidling +unsieged +unsieved +unsifted +unsighing +unsight +unsighted +unsightly +unsignable +unsignaled +unsignalised +unsignalized +unsignalled +unsignatured +unsigned +unsigneted +unsignifiable +unsignificant +unsignificative +unsignified +unsignifying +unsilenced +unsilent +unsilhouetted +unsilicated +unsilicified +unsilly +unsilvered +unsimilar +unsimmered +unsimmering +unsimpering +unsimple +unsimplified +unsimplifying +unsimular +unsimulated +unsimulating +unsimulative +unsimultaneous +unsincere +unsinewed +unsinewing +unsinewy +unsinful +unsingable +unsinged +unsingle +unsingular +unsinister +unsinkable +unsinking +unsinning +unsinuate +unsinuated +unsinuous +unsipped +unsistered +unsisterly +unsituated +unsizable +unsizeable +unsized +unskeptical +unsketchable +unsketched +unskewed +unskewered +unskilful +unskilled +unskillful +unskimmed +unskinned +unskirted +unslack +unslacked +unslackened +unslackening +unslacking +unslagged +unslain +unslakable +unslakeable +unslaked +unslammed +unslandered +unslanderous +unslanted +unslanting +unslapped +unslashed +unslated +unslating +unslatted +unslaughtered +unslayable +unsleaved +unsleek +unsleeping +unsleepy +unsleeved +unslender +unsliced +unslicked +unsliding +unslighted +unslim +unslimmed +unslinking +unslipped +unslippered +unslippery +unslipping +unsloped +unsloping +unslopped +unslotted +unslouched +unslouching +unslouchy +unsloughed +unsloughing +unslow +unslowed +unsluggish +unsluiced +unslumbering +unslumbery +unslumbrous +unslumped +unslumping +unslung +unslurred +unsly +unsmacked +unsmarting +unsmashed +unsmeared +unsmelled +unsmelling +unsmelted +unsmiling +unsmirched +unsmirking +unsmitten +unsmocked +unsmokable +unsmokeable +unsmoked +unsmoking +unsmoky +unsmoldering +unsmooth +unsmoothed +unsmoothened +unsmotherable +unsmothered +unsmothering +unsmouldering +unsmudged +unsmug +unsmuggled +unsmutched +unsmutted +unsmutty +unsnaffled +unsnagged +unsnaky +unsnared +unsnatched +unsneaking +unsneaky +unsneering +unsnipped +unsnobbish +unsnoring +unsnouted +unsnubbed +unsnuffed +unsnug +unsoaked +unsoaped +unsoarable +unsoaring +unsober +unsobered +unsobering +unsociable +unsocial +unsocialised +unsocialising +unsocialistic +unsocializable +unsocialized +unsocializing +unsocially +unsociological +unsocketed +unsoft +unsoftening +unsoggy +unsoiled +unsoiling +unsolaced +unsolacing +unsolar +unsoldierlike +unsolemn +unsolemnified +unsolemnised +unsolemnized +unsolicitated +unsolicited +unsolicitous +unsolid +unsolidified +unsolitary +unsoluble +unsolvable +unsolved +unsomatic +unsomber +unsombre +unsomnolent +unsonant +unsonantal +unsonorous +unsonsy +unsoothable +unsoothed +unsoothing +unsooty +unsophistic +unsophistical +unsophisticated +unsophomoric +unsophomorical +unsoporiferous +unsoporific +unsordid +unsore +unsorrowing +unsorry +unsortable +unsotted +unsought +unsoulful +unsoulish +unsound +unsoundable +unsounded +unsounding +unsour +unsoused +unsovereign +unsowed +unsown +unspaced +unspacious +unspaded +unspangled +unspanked +unspared +unsparing +unsparked +unsparkling +unsparred +unsparse +unspasmed +unspasmodic +unspasmodical +unspatial +unspattered +unspawned +unspayed +unspeakable +unspeared +unspecialised +unspecialising +unspecialized +unspecializing +unspecifiable +unspecific +unspecified +unspecifying +unspecious +unspecked +unspeckled +unspectacled +unspectacular +unspeculating +unspeculative +unspeculatory +unspeedy +unspellable +unspelled +unspelt +unspendable +unspending +unspent +unspewed +unspherical +unspiced +unspicy +unspied +unspilled +unspilt +unspinnable +unspinning +unspiral +unspiraled +unspiralled +unspired +unspiring +unspirited +unspiriting +unspiritual +unspiritualised +unspiritualising +unspiritualized +unspiritualizing +unspirituous +unspited +unspiteful +unspitted +unsplashed +unsplattered +unsplayed +unspleenish +unsplendid +unsplendorous +unsplendourous +unsplenetic +unspliced +unsplinted +unsplintered +unsplit +unsplittable +unspoilable +unspoiled +unspoilt +unspoken +unsponged +unspongy +unsponsored +unspontaneous +unsported +unsportful +unsporting +unsportive +unsportsmanlike +unsportsmanly +unspotlighted +unspottable +unspotted +unspoused +unspouted +unsprained +unsprayable +unsprayed +unspread +unspreadable +unspreading +unsprightly +unspringing +unsprinkled +unsprinklered +unsprouted +unsprouting +unspruced +unsprung +unspun +unspurious +unspurned +unspurred +unsputtering +unspying +unsquabbling +unsquandered +unsquarable +unsquared +unsquashable +unsquashed +unsqueamish +unsqueezable +unsqueezed +unsquelched +unsquinting +unsquired +unsquirming +unsquirted +unstabbed +unstabilised +unstabilising +unstabilized +unstabilizing +unstable +unstabled +unstack +unstacked +unstaffed +unstaged +unstaggered +unstaggering +unstagnant +unstagnating +unstagy +unstaid +unstainable +unstained +unstaled +unstalemated +unstalked +unstalled +unstammering +unstamped +unstampeded +unstanch +unstanchable +unstandard +unstandardisable +unstandardised +unstandardizable +unstandardized +unstanding +unstanzaic +unstapled +unstarched +unstarred +unstarted +unstarting +unstartled +unstartling +unstarved +unstatable +unstateable +unstated +unstatesmanlike +unstatic +unstatical +unstation +unstationary +unstationed +unstatistic +unstatistical +unstatued +unstatuesque +unstaunch +unstaunchable +unstaved +unstayable +unstaying +unsteadfast +unstealthy +unsteamed +unsteaming +unsteeped +unsteepled +unsteered +unstemmed +unstentorian +unstentoriously +unstereotyped +unsterile +unsterilized +unstern +unstethoscoped +unstewed +unsticky +unstiff +unstiffened +unstifled +unstifling +unstigmatic +unstigmatised +unstigmatized +unstilled +unstilted +unstimulable +unstimulated +unstimulating +unstimulative +unstinging +unstinted +unstinting +unstippled +unstipulated +unstirrable +unstirred +unstirring +unstitched +unstitching +unstocked +unstockinged +unstoic +unstoical +unstoked +unstolen +unstonable +unstoneable +unstoned +unstony +unstooped +unstooping +unstoppable +unstopped +unstorable +unstoried +unstormable +unstormed +unstormy +unstout +unstraddled +unstrafed +unstraight +unstraightened +unstraightforward +unstrained +unstraitened +unstranded +unstrange +unstrangled +unstrangulable +unstrategic +unstrategical +unstratified +unstraying +unstreaked +unstreamed +unstreaming +unstreamlined +unstrengthened +unstrengthening +unstrenuous +unstrepitous +unstressed +unstretchable +unstretched +unstrewed +unstrewn +unstriated +unstricken +unstrict +unstrident +unstridulating +unstridulous +unstriking +unstringed +unstringent +unstriped +unstripped +unstriving +unstroked +unstructural +unstructured +unstruggling +unstrung +unstubbed +unstubbled +unstubborn +unstuccoed +unstuck +unstudded +unstudied +unstudious +unstuffed +unstuffy +unstultified +unstultifying +unstumbling +unstung +unstunned +unstunted +unstupefied +unstupid +unsturdy +unstuttered +unstuttering +unstyled +unstylish +unstylized +unsubdivided +unsubduable +unsubducted +unsubdued +unsubject +unsubjected +unsubjective +unsubjugated +unsublimated +unsublimed +unsubmerged +unsubmergible +unsubmerging +unsubmersible +unsubmissive +unsubmitted +unsubmitting +unsubordinate +unsubordinated +unsubordinative +unsuborned +unsubpoenaed +unsubrogated +unsubscribed +unsubscribing +unsubservient +unsubsided +unsubsidiary +unsubsiding +unsubsidized +unsubstantial +unsubstantiated +unsubstantive +unsubstituted +unsubstitutive +unsubtle +unsubtracted +unsubtractive +unsuburban +unsuburbed +unsubventioned +unsubventionized +unsubversive +unsubverted +unsucceeded +unsucceeding +unsuccessful +unsuccessive +unsuccinct +unsuccorable +unsuccored +unsucculent +unsuccumbing +unsucked +unsuckled +unsued +unsufferable +unsuffering +unsufficing +unsuffixed +unsuffocated +unsuffocative +unsuffused +unsuffusive +unsugared +unsugary +unsuggested +unsuggestible +unsuggesting +unsuggestive +unsuicidal +unsuitable +unsuited +unsuiting +unsulfonated +unsulfureous +unsulfurized +unsulky +unsullen +unsulliable +unsullied +unsulphonated +unsulphureous +unsulphurized +unsultry +unsummable +unsummarisable +unsummarised +unsummarizable +unsummarized +unsummonable +unsummoned +unsumptuous +unsunburned +unsunburnt +unsundered +unsung +unsunk +unsunken +unsunny +unsupercilious +unsuperficial +unsuperfluous +unsuperior +unsuperlative +unsupernatural +unsuperscribed +unsuperseded +unsuperseding +unsuperstitious +unsupervised +unsupervisory +unsupine +unsupplantable +unsupplanted +unsupple +unsupplemental +unsupplementary +unsupplemented +unsuppliable +unsuppliant +unsupplicated +unsupplicating +unsupplied +unsupportable +unsupported +unsupporting +unsupposable +unsupposed +unsuppositional +unsuppositive +unsuppressed +unsuppressible +unsuppressive +unsuppurated +unsuppurative +unsurcharged +unsure +unsurfaced +unsurfeited +unsurfeiting +unsurgical +unsurging +unsurly +unsurmised +unsurmising +unsurmountable +unsurmounted +unsurnamed +unsurpassable +unsurpassed +unsurpliced +unsurprised +unsurprising +unsurrealistic +unsurrendered +unsurrendering +unsurrounded +unsurveyable +unsurveyed +unsurvived +unsurviving +unsusceptible +unsusceptive +unsuspected +unsuspectful +unsuspecting +unsuspended +unsuspendible +unsuspicious +unsustainable +unsustained +unsustaining +unsutured +unswabbed +unswaddled +unswaddling +unswaggering +unswallowable +unswallowed +unswampy +unswapped +unswarming +unswatheable +unswayable +unswayed +unswaying +unsweated +unsweating +unsweepable +unsweetened +unswelled +unswelling +unsweltered +unsweltering +unswept +unswervable +unswerved +unswerving +unswilled +unswingled +unswitched +unswollen +unswooning +unswung +unsyllabicated +unsyllabified +unsyllabled +unsyllogistic +unsyllogistical +unsymbolic +unsymbolical +unsymbolised +unsymbolized +unsymmetrical +unsymmetrized +unsympathetic +unsympathised +unsympathising +unsympathized +unsympathizing +unsymphonious +unsymptomatic +unsymptomatical +unsynchronised +unsynchronized +unsynchronous +unsyncopated +unsyndicated +unsynonymous +unsyntactic +unsyntactical +unsynthesised +unsynthesized +unsynthetic +unsyringed +unsystematic +unsystematical +unsystematised +unsystematising +unsystematized +unsystematizing +untabernacled +untabled +untabulable +untabulated +untaciturn +untackling +untactful +untactical +untactile +untactual +untagged +untailed +untailored +untaintable +untainted +untainting +untakable +untakeable +untaking +untalented +untalkative +untalking +untallied +untallowed +untaloned +untamable +untame +untameable +untamed +untampered +untangental +untangential +untangible +untanned +untantalised +untantalising +untantalized +untantalizing +untaped +untapered +untapering +untapestried +untappable +untapped +untarnishable +untarnished +untarnishing +untarred +untarried +untarrying +untartarized +untasked +untasseled +untasselled +untastable +untasteable +untasted +untasteful +untasting +untasty +untattered +untattooed +untaught +untaunted +untaunting +untaut +untautological +untawdry +untawed +untaxable +untaxied +untaxing +unteachable +unteamed +untearable +unteased +unteaseled +unteaselled +untechnical +untedded +untedious +unteeming +untelegraphed +untelevised +untelic +untellable +untelling +untemperable +untemperamental +untemperate +untempered +untempering +untempestuous +untempled +untemporal +untemporary +untemptable +untempted +untempting +untenable +untenacious +untenantable +untenanted +untended +untendered +untenderized +untenebrous +untense +untensible +untensile +untensing +untentacled +untentered +untenuous +unterminated +unterminating +unterminational +unterminative +unterraced +unterrestrial +unterrible +unterrific +unterrified +unterrifying +unterrorized +unterse +untessellated +untestable +untestamental +untestamentary +untested +untestifying +untethered +untethering +untextual +untextural +unthanked +unthankful +unthanking +unthawed +unthawing +untheatric +untheatrical +untheistic +untheistical +unthematic +untheologic +untheological +untheoretic +untheoretical +untherapeutic +untherapeutical +unthick +unthievish +unthinkable +unthinking +unthinned +unthinning +unthirsting +unthirsty +unthorny +unthorough +unthought +unthoughtful +unthralled +unthrashed +unthreadable +unthreaded +unthreatening +unthreshed +unthrifty +unthrilled +unthrilling +unthriving +unthroaty +unthrobbing +unthronged +unthrottled +unthrowable +unthrown +unthrust +unthumped +unthundering +unthwacked +unthwartable +unthwarted +unthwarting +unticketed +untickled +untidal +untidied +untidier +untidiest +untidy +untidying +untiered +untiled +untillable +untilled +untilling +untimbered +untimed +untimely +untimeous +untimid +untimorous +untinctured +untindered +untinged +untinkered +untinned +untinseled +untinselled +untinted +untippable +untippled +untired +untiring +untissued +untithable +untithed +untitillated +untitillating +untitled +untittering +untitular +untoadying +untoasted +untogaed +untoiling +untold +untolerable +untolerated +untolerating +untolerative +untolled +untombed +untoned +untongued +untonsured +untooled +untopographical +untoppable +untopped +untopping +untoppled +untormented +untormenting +untorn +untorpedoed +untorpid +untorporific +untorrid +untortious +untortuous +untortured +untossed +untotaled +untotalled +untotted +untottering +untouchable +untouched +untouching +untough +untoured +untoward +untoxic +untraceable +untraced +untraceried +untracked +untractable +untradable +untradeable +untraded +untrading +untraditional +untraduced +untrafficked +untragic +untragical +untrailed +untrailerable +untrailered +untrailing +untrainable +untrained +untraitorous +untrammed +untrammeled +untrammelled +untramped +untrampled +untranquil +untransacted +untranscended +untranscendent +untranscendental +untranscribable +untranscribed +untransferable +untransferred +untransferring +untransfigured +untransfixed +untransformable +untransformative +untransformed +untransforming +untransfused +untransfusible +untransgressed +untransient +untransitional +untransitive +untransitory +untranslatable +untranslated +untransmigrated +untransmissible +untransmissive +untransmitted +untransmutable +untransmuted +untransparent +untranspired +untranspiring +untransplanted +untransportable +untransported +untransposed +untransubstantiated +untrapped +untrashed +untraumatic +untraveled +untraveling +untravelled +untravelling +untraversable +untraversed +untravestied +untreacherous +untreadable +untreasonable +untreasurable +untreasured +untreatable +untreated +untreed +untrekked +untrellised +untrembling +untremendous +untremolant +untremulant +untremulent +untremulous +untrenched +untrepanned +untrespassed +untrespassing +untressed +untriable +untribal +untributary +untriced +untrickable +untricked +untried +untrifling +untrig +untriggered +untrigonometric +untrigonometrical +untrimmable +untrimmed +untrinitarian +untripped +untripping +untrite +untriturated +untriumphant +untrivial +untrochaic +untrod +untrolled +untrophied +untropic +untropical +untrotted +untroubled +untroublesome +untrounced +untruant +untruckled +untruckling +untrue +untrumped +untrumpeted +untrumping +untrundled +untrustable +untrusted +untrustful +untrusting +untrustworthy +untruthful +untrying +untubbed +untubercular +untuberculous +untufted +untugged +untumbled +untumefied +untumid +untumultuous +untunable +untuneable +untuneful +untunneled +untunnelled +unturbaned +unturbid +unturbulent +unturfed +unturgid +unturnable +unturned +unturning +unturpentined +unturreted +untusked +untutelar +untutelary +untutored +untwilled +untwinkled +untwinkling +untwinned +untwirled +untwirling +untwistable +untwitched +untwitching +untyped +untypical +untyrannic +untyrannical +untyrannised +untyrannized +untyrantlike +unubiquitous +unulcerated +unulcerative +unulcerous +unumpired +ununifiable +ununified +ununiformed +ununionized +ununique +ununitable +ununited +ununiting +unupbraided +unupbraiding +unupholstered +unupset +unupsettable +unurban +unurbane +unurbanized +unurged +unurgent +unurging +unusable +unuseable +unused +unuseful +unushered +unusual +unusurious +unusurped +unusurping +unutilitarian +unutilizable +unutilized +unutterable +unuttered +unuxorious +unvacant +unvacated +unvaccinated +unvacillating +unvacuous +unvagrant +unvague +unvain +unvaleted +unvaliant +unvalidated +unvalidating +unvalorous +unvaluable +unvalued +unvamped +unvanishing +unvanquishable +unvanquished +unvanquishing +unvaporized +unvaporous +unvariable +unvariant +unvaried +unvariegated +unvarnished +unvarying +unvascular +unvasculous +unvatted +unvaulted +unvaulting +unvaunted +unvaunting +unveering +unvehement +unveined +unvelvety +unvenal +unvendable +unvended +unvendible +unveneered +unvenerable +unvenerated +unvenerative +unvenereal +unvengeful +unvenial +unvenomed +unvenomous +unventable +unvented +unventilated +unventured +unventuresome +unventurous +unveracious +unverbal +unverbalized +unverbose +unverdant +unverdured +unverdurous +unveridic +unveridical +unverifiable +unverificative +unverified +unveritable +unvermiculated +unverminous +unversatile +unversed +unversified +unvertebrate +unvertical +unvertiginous +unvesiculated +unvesseled +unvested +unvetoed +unvexatious +unvexed +unviable +unvibrant +unvibrated +unvibrating +unvibrational +unvicarious +unvicious +unvictimized +unvictorious +unvictualed +unvictualled +unviewable +unviewed +unvigilant +unvigorous +unvilified +unvillainous +unvindicable +unvindicated +unvindictive +unvinous +unvintaged +unviolable +unviolated +unviolative +unviolent +unvirgin +unvirginal +unvirginlike +unvirile +unvirtuous +unvirulent +unvisceral +unvisible +unvisionary +unvisioned +unvisitable +unvisited +unvisiting +unvisored +unvistaed +unvisual +unvisualised +unvisualized +unvital +unvitalized +unvitalizing +unvitiable +unvitiated +unvitiating +unvitreous +unvitrescent +unvitrifiable +unvitrified +unvitriolized +unvituperated +unvituperative +unvivacious +unvivid +unvivified +unvizarded +unvizored +unvocable +unvocal +unvocalised +unvocalized +unvociferous +unvoiced +unvoid +unvoidable +unvoided +unvolatile +unvolatilised +unvolatilized +unvolcanic +unvolitional +unvolitive +unvoluble +unvolumed +unvoluminous +unvoluntary +unvolunteering +unvoluptuous +unvomited +unvoracious +unvoted +unvoting +unvouched +unvouchsafed +unvowed +unvoyaging +unvulcanised +unvulcanized +unvulgar +unvulnerable +unvulturine +unvulturous +unvying +unwadable +unwadded +unwaddling +unwadeable +unwaded +unwading +unwafted +unwagered +unwagged +unwailed +unwailing +unwainscoted +unwainscotted +unwaived +unwaked +unwakeful +unwakened +unwakening +unwaking +unwalked +unwandering +unwaned +unwaning +unwanted +unwanton +unwarbled +unwarlike +unwarmable +unwarmed +unwarming +unwarned +unwarpable +unwarped +unwarping +unwarrantable +unwarranted +unwary +unwashable +unwashed +unwastable +unwasted +unwasteful +unwatchable +unwatched +unwatchful +unwatching +unwatered +unwatermarked +unwatery +unwattled +unwaved +unwaverable +unwavered +unwavering +unwaving +unwaxed +unwayward +unweakened +unweakening +unwealthy +unweaned +unweaponed +unwearable +unwearied +unwearing +unwearisome +unweary +unwearying +unweathered +unwebbed +unwebbing +unwed +unwedded +unweeded +unweened +unweeping +unweighable +unweighed +unweighing +unweighted +unweighty +unwelcome +unwelcomed +unwelcoming +unweldable +unwelded +unwelted +unwept +unwestern +unwesternized +unwet +unwetted +unwheedled +unwhelped +unwhetted +unwhimpering +unwhimsical +unwhining +unwhipped +unwhipt +unwhirled +unwhisked +unwhiskered +unwhisperable +unwhispered +unwhispering +unwhistled +unwholesome +unwicked +unwidened +unwidowed +unwieldable +unwieldy +unwifelike +unwifely +unwild +unwilful +unwillable +unwilled +unwillful +unwilling +unwilted +unwilting +unwily +unwindable +unwinded +unwindowed +unwindy +unwinged +unwinking +unwinnable +unwinning +unwinnowed +unwinsome +unwintry +unwiped +unwirable +unwired +unwise +unwished +unwishful +unwistful +unwitched +unwithdrawable +unwithdrawing +unwithdrawn +unwitherable +unwithered +unwithering +unwithheld +unwithholding +unwithstanding +unwithstood +unwitnessed +unwitting +unwitty +unwoeful +unwon +unwonderful +unwondering +unwonted +unwooded +unwooed +unwordable +unworkable +unworked +unworking +unworkmanlike +unworkmanly +unworldly +unwormy +unworn +unworried +unworshiped +unworshiping +unworshipped +unworshipping +unworthy +unwounded +unwrangling +unwrathful +unwrecked +unwrenched +unwrested +unwresting +unwrestled +unwretched +unwriggled +unwrinkleable +unwritable +unwriting +unwritten +unwronged +unwrongful +unwrought +unwrung +unyachtsmanlike +unyearned +unyearning +unyielded +unyielding +unyouthful +unzealous +upbound +upbraiding +upcountry +uphill +upmost +upper +uppermost +uppish +uppity +upright +upriver +uproarious +upstanding +upstate +upstretched +uptight +uptown +upturned +upward +uranic +uranitic +uranographic +uranographical +uranological +uranometrical +uranous +uranylic +uratic +urban +urbane +urbanistic +urceolate +urdy +uredial +uredinial +ureido +uremic +ureteral +ureteric +ureterointestinal +urethral +urethritic +urethroscopic +uretic +ureylene +urgent +uric +uricolytic +urinant +uriniferous +urinogenital +urinous +urnlike +urochordal +urogenital +urogenous +urolithic +uromeric +uropodal +uropodous +uropygial +ursiform +ursine +urticaceous +urticant +urticate +usable +used +useful +useless +ustulate +usual +usufructuary +usurious +usurpative +uterine +utile +utilitarian +utilizable +utmost +utricular +utriculate +utterable +utterless +uttermost +uvular +uxorial +uxoricidal +uxorilocal +uxorious +vacant +vacatable +vacationless +vaccinal +vacciniaceous +vaccinial +vacillant +vacillating +vacillatory +vacuolar +vacuous +vadose +vagabondish +vagal +vagarious +vagotropic +vagrom +vague +vaguer +vaguest +vain +vainglorious +valanced +valerianaceous +valeric +valgus +valiant +valid +validatory +vallate +vallecular +valleculate +valleylike +valorous +valuable +valued +valueless +valval +valvar +valvate +valvular +vambraced +vampiric +vanadic +vanadious +vanadous +vandalish +vandalistic +vaned +vaneless +vanillic +vanitied +vanquishable +vanward +vapid +vaporescent +vaporific +vaporing +vaporish +vaporizable +vaporlike +vaporous +vapory +vapourescent +vapourific +vapouring +vapourisable +vapourish +vapourizable +vapoury +variable +variant +variational +variative +varicellate +varicelloid +varicolored +varicose +varied +variegated +varietal +variform +variolitic +varioloid +variolous +variorum +varnishy +varus +vascular +vaselike +vasoconstrictive +vasodepressor +vasoinhibitory +vasomotor +vassalic +vassalless +vast +vasty +vatic +vaticinal +vaulted +vaunted +vaunting +vaunty +vectorial +vee +vegetal +vegetational +vegetationless +vegetative +vehement +vehicular +veiled +veilless +veillike +veinal +veinier +veiniest +veinless +veiny +velar +velate +velellidous +vellicative +veloce +velutinous +velvety +venal +venatic +venational +vendible +venenose +venenosus +venerable +venerational +venerative +venereal +vengeful +venial +venomless +venose +venous +ventilable +ventilative +ventless +ventose +ventral +ventricose +ventricular +ventriloquial +ventriloquistic +venturesome +venturous +venular +venulose +veracious +verbal +verbenaceous +verbless +verbose +verboten +verdant +verdigrisy +verecund +veridical +verier +veriest +verifiable +verificative +verificatory +verisimilar +veristic +veritable +vermicidal +vermicular +vermiform +verminous +vermivorous +vernacular +vernal +verrucose +verrucous +versatile +versed +versicolor +versicular +versional +vertebral +vertebrated +vertical +verticillastrate +verticillate +vertiginous +verus +vesical +vesicatory +vespertilionine +vespertine +vespine +vesseled +vesselled +vestal +vested +vestibular +vestigial +vestral +vetchlike +veterinary +vexatious +vexed +vexillate +viable +vibracular +vibraculoid +vibrant +vibrational +vibrationless +vibrative +vibrioid +vibrionic +vibronic +vicarial +vicarious +vicarly +vicegeral +viceless +vicenary +vicennial +viceregal +vicinal +vicious +vicissitudinary +vicissitudinous +vicontiel +victorious +victoryless +victualless +videogenic +viewable +viewier +viewiest +viewless +viewy +vigesimal +vigilant +vigintillionth +vigorless +vigoroso +vigorous +vile +villageless +villagey +villagy +villainous +villalike +villatic +villiform +villose +villous +viminal +vimineous +vinaceous +vincible +vindicable +vindictive +vinegarish +vinegarlike +vineless +vinelike +vinic +vinicultural +vinifera +viniferous +vinous +viny +violable +violaceous +violational +violative +violent +violetlike +violety +violinistic +violinless +viperine +viperish +viperous +viral +viremic +virescent +virgate +virginal +virgulate +viridescent +virile +virilocal +virled +virtual +virtueless +virtuosic +virtuous +virulent +viruslike +visaged +visceral +visceromotor +viscerotonic +viscid +viscoelastic +viscoid +viscometric +viscosimetric +viscous +viselike +visible +visional +visionary +visionless +visitatorial +visitorial +visorless +vistaless +visual +visualisable +visualizable +vitaceous +vital +vitameric +vitaminic +vitascopic +vitelline +vitiable +vitiated +vitiliginous +vitiligoid +vitreous +vitrescent +vitrescible +vitreum +vitric +vitrifiable +vitriform +vitriolic +vituline +vivace +vivacious +viverrine +vivid +vivisectible +vivisectional +vivo +vixenish +vixenly +vizarded +vizierial +vizirial +vizorless +vocal +vocalic +vocational +vocative +vociferant +vociferous +vocoid +voetstoots +vogie +voiced +voiceful +voiceless +void +voidable +voided +volant +volar +volatile +volatilisable +volcanic +volcanologic +volcanological +volitant +volitational +volitional +volitionary +volitionless +volitive +voltaic +voltametric +voluble +volumed +volumetric +voluminous +voluntary +voluptuous +voluted +volvate +vomerine +vomitory +voodooistic +voracious +vorant +vortical +vorticose +vortiginous +votable +voteable +voteless +votive +vowelless +vowellike +vowless +vulcanian +vulcanisable +vulcanizable +vulcanological +vulgar +vulned +vulnerable +vulnerary +vulpecular +vulpine +vulturelike +vulturine +vying +wackier +wackiest +wacky +wadable +wadeable +waf +waferlike +wafery +wageless +wageworking +waggish +waggly +wagonless +wailful +wailsome +wainable +waistcoated +waisted +waitressless +wakeful +wakeless +wakerife +walking +walleyed +wally +waltzlike +wambly +wan +wanchancy +wandering +wandle +wandlike +waney +wanier +waniest +wanner +wannest +wanning +wannish +wantless +wanton +wapperjawed +warded +wardless +warier +wariest +warless +warlike +warm +warmish +warmthless +warrantable +warriorlike +wartier +wartiest +wartless +wartlike +warty +wary +washable +washerless +washier +washiest +washy +waspier +waspiest +waspish +waspy +wastable +wasteful +wasteless +wasting +watchful +watchless +waterborne +watercolour +waterish +waterless +waterlike +waterlocked +waterlog +waterlogged +waterproof +watertight +waterworn +watery +wattless +waugh +waur +waved +waveless +wavelike +wavier +waviest +wavy +waxen +waxier +waxiest +waxlike +waxy +wayfaring +waygoing +wayless +wayward +wayworn +weak +weakhanded +weakish +weaklier +weakliest +weakly +wealthier +wealthiest +wealthy +weaponed +weaponless +wearable +wearied +wearier +weariest +weariful +weariless +wearing +wearish +wearisome +wearproof +weary +wearying +weathered +weatherly +weatherproof +weathertight +weatherworn +webbed +webbier +webbiest +webby +webless +weblike +wedded +wedged +wedgelike +wedgier +wedgiest +wedgy +wee +weedier +weediest +weedy +weekly +weepier +weepiest +weeping +weepy +weer +weest +weighable +weighted +weightier +weightiest +weighty +weird +weirless +welcome +welcomeless +weldable +weldless +wellborn +welldecked +wersh +westbound +westering +westerly +western +westernmost +westlin +westward +westwardly +wet +wetproof +wettable +wetter +wetting +wettish +whackier +whackiest +whacking +whacky +whalelike +whapping +wharfless +wheaten +wheatless +wheeled +wheelless +wheezier +wheeziest +wheezy +whelked +whelpless +wheyey +wheylike +whimsical +whinier +whiniest +whinny +whiny +whiplike +whisperous +whistleable +whistly +whittling +whole +wholehearted +wholemeal +wholesome +wholistic +whopping +whorled +wicked +wickless +wide +wider +widespread +widest +widish +widowly +wieldable +wieldier +wieldiest +wieldy +wifeless +wifelier +wifeliest +wifelike +wifely +wigglier +wiggliest +wiggly +wigless +wiglike +wild +wilful +wilier +wiliest +willable +willed +willful +willing +willowy +willyard +wily +windblown +windbound +windburned +winded +windier +windiest +windowless +windowy +windproof +windrode +windswept +windtight +windward +windy +wineless +winged +wingless +winglike +winier +winiest +winish +winnable +winning +winsome +winterier +winteriest +winterish +winterless +winterweight +wintery +wintrier +wintriest +wintry +winy +wirable +wired +wirelike +wirespun +wiry +wisdomless +wise +wised +wiser +wisest +wishful +wising +wispier +wispiest +wisplike +wispy +wistful +witchier +witchiest +witching +witchy +withdrawable +witless +witted +wittier +wittiest +witting +witty +wizardlike +wizardly +wizened +woaded +wobbling +wobbly +wobegone +wodgy +woebegone +woeful +woesome +wolfish +wolflike +wolframic +wombed +wonderful +wondering +wonderless +wonky +wonted +wooded +wooden +woodier +woodiest +woodless +woodsy +woodwind +woody +woollen +woolly +woolstapling +woozier +wooziest +woozy +wordier +wordiest +wordless +wordy +workable +workaday +worked +workless +workmanlike +workshy +worldly +worldwide +wormish +wormless +wormlike +wormy +worried +worriless +worrisome +worse +worser +worshipful +worshipless +worst +worth +worthless +worthwhile +worthy +wounded +woundless +wraithlike +wraparound +wrapround +wrathful +wrathless +wreathless +wreathlike +wreckful +wretched +wrier +wriest +wrigglier +wriggliest +wriggly +wrinkleable +wrinkleless +wrinklier +wrinkliest +wrinkly +wrong +wrongful +wroth +wud +wurtzitic +wuthering +xanthic +xanthochroid +xanthophyllous +xanthous +xenocrystic +xenodiagnostic +xenogenetic +xenogenic +xenolithic +xenomorphic +xenophobic +xerarch +xeric +xerographic +xeromorphic +xerophilous +xerophytic +xerotic +xiphisternal +xiphoid +xylic +xylographic +xylographical +xyloid +xylophagous +xylostromatoid +xylotomous +yachty +yare +yarer +yarest +yauld +yawnful +yawning +yearlong +yearly +yeastless +yeastlike +yeasty +yeld +yellowish +yeomanly +yester +yestern +yeuky +yielding +yokelish +yolkless +yolky +young +youthful +yttric +yttriferous +zanier +zanies +zaniest +zany +zanyish +zealous +zebraic +zebralike +zebrine +zenithal +zeolitic +zephyrean +zeroth +zestful +zestless +zesty +zeugmatic +zig +zincic +zinciferous +zincky +zincographic +zincographical +zincoid +zincous +zincy +zingiberaceous +zingy +zinky +zippered +zipppier +zipppiest +zippy +zirconic +zodiacal +zonal +zonate +zoning +zonked +zonular +zoochemical +zoogleal +zoogloeal +zoographic +zoographical +zoolatrous +zoological +zoometric +zoometrical +zoomorphic +zoonal +zoophagous +zoophilous +zoophobous +zoophoric +zooplastic +zygodactyl +zygomorphic +zygophyllaceous +zymogenic diff --git a/cloudfoundry-operations/src/main/resources/nouns.txt b/cloudfoundry-operations/src/main/resources/nouns.txt new file mode 100644 index 00000000000..fc801094c8d --- /dev/null +++ b/cloudfoundry-operations/src/main/resources/nouns.txt @@ -0,0 +1,61676 @@ +aa +aaerialness +aalii +aardvark +aardwolf +ab +aba +abac +abaca +abaciscus +abacist +abaculus +abacus +abalone +abamp +abampere +abandonee +abandoner +abandonment +abaptiston +abaser +abashedness +abashment +abasia +abatage +abatement +abater +abatis +abatjour +abator +abattage +abattoir +abb +abba +abbacy +abbess +abbey +abbeystead +abbot +abbotcy +abbotship +abbr +abbreviation +abbreviator +abcoulomb +abd +abdication +abdicator +abdomen +abducens +abduction +abductor +abecedarian +abecedarium +abecedary +abele +abelmosk +abernethy +aberrance +aberrancy +aberration +abesse +abetment +abettal +abettor +abeyance +abfarad +abhenry +abhorrence +abhorrer +abidance +abider +abidingness +abietate +abigail +ability +abiogenesis +abiogenist +abiosis +abiotrophy +abirritation +abjectedness +abjection +abjectness +abjunction +abjuration +abjurer +abl +ablactation +ablation +ablator +ablaut +ablegate +ablepsia +ablution +abmho +abmodality +abnegation +abnegator +abnormalcy +abnormality +abnormalness +abnormity +abo +aboardage +abode +abohm +aboideau +abolisher +abolishment +abolition +abolitionism +abolitionist +abolla +abomasum +abomasus +abominableness +abomination +abominator +abondance +aboudikro +aboulia +abp +abr +abrader +abraser +abrasion +abrasive +abraxas +abrazo +abreaction +abri +abridger +abridgment +abrogation +abrogator +abruption +abruptness +abs +abscess +abscissa +abscission +absconder +absence +absentation +absentee +absenteeism +absenter +absentia +absentness +absinthe +absinthism +absoluteness +absolution +absolutism +absolutist +absolver +absorbability +absorbance +absorbedness +absorbefacient +absorbency +absorber +absorptance +absorptiometer +absorption +absorptiveness +absorptivity +abstainer +abstemiousness +abstention +abstersion +abstersiveness +abstinence +abstr +abstractedness +abstracter +abstraction +abstractionism +abstractionist +abstractiveness +abstractness +abstriction +abstruseness +abstrusity +absurdity +absurdness +abt +abulia +abundance +abura +abusage +abuser +abusiveness +abutilon +abutment +abuttal +abutter +abv +abvolt +abwatt +abysm +abyss +ac +acacia +acad +academe +academia +academician +academicism +academism +academy +acajou +acalculia +acaleph +acanthite +acanthocephalan +acanthodian +acanthosis +acanthus +acapnia +acappella +acardia +acariasis +acaricide +acarid +acarine +acarologist +acarology +acarophobia +acarus +acaulescence +acc +acce +accedence +acceder +accel +accelerant +acceleration +accelerator +accelerometer +accent +accentor +accentuality +accentuation +accentuator +acceptability +acceptableness +acceptance +acceptancy +acceptation +acceptee +accepter +acceptor +access +accessariness +accessary +accessibility +accession +accessoriness +accessorius +accessory +acciaccatura +accidence +accident +accidentalism +accidentalist +accidentality +accidentalness +accidie +accipiter +acclaimer +acclamation +acclimation +acclimatisation +acclimatiser +acclimatization +acclivity +accolade +accommodation +accommodativeness +accommodator +accompanier +accompaniment +accompanist +accompanyist +accomplice +accomplisher +accomplishment +accompt +accord +accordance +accordatura +accorder +accordion +accordionist +accouchement +accoucheur +accoucheuse +account +accountability +accountableness +accountancy +accountant +accountantship +accounting +accouplement +accouterment +accoutrement +accra +accreditation +accreditment +accretion +accroachment +accrual +accruement +acct +acculturation +acculturationist +accum +accumbency +accumulation +accumulativeness +accumulator +accuracy +accurateness +accursedness +accusal +accusant +accusation +accused +accuser +accustomedness +ace +aced +acedia +acenesthesia +acequia +acerbity +acerdol +acervulus +acescence +acescency +acestoma +acetabulum +acetal +acetaldehyde +acetaldol +acetamide +acetanilide +acetanisidine +acetate +acetation +acetazolamide +acetification +acetifier +acetimeter +acetimetry +acetin +acetobacter +acetoin +acetometer +acetometry +acetone +acetonitrile +acetophenetidin +acetophenone +acetostearin +acetum +acetyl +acetylaminobenzene +acetylaniline +acetylation +acetylbenzene +acetylcholine +acetylene +acetylenogen +acetylide +acetylization +acetylizer +acetylmethylcarbinol +achalasia +achar +achech +achene +achievement +achiever +achkan +achlorhydria +acholia +acholuria +achondrite +achondroplasia +achroite +achromat +achromate +achromaticity +achromatin +achromatisation +achromatism +achromatization +achromatophilia +achromobacter +acicula +acicularity +aciculum +acid +acidemia +acidification +acidifier +acidimeter +acidimetry +acidity +acidness +acidolysis +acidometer +acidosis +acidulant +acidulation +acidulent +acieration +acing +acinus +ack +ackee +ackey +acknowledger +acknowledgment +ackton +acle +acleistocardia +acme +acmesthesia +acmite +acne +acnemia +acnode +acoasm +acocotl +acoenaesthesia +acolyte +aconite +acorn +acosmism +acosmist +acotyledon +acouasm +acouchi +acousma +acoustician +acoustics +acpt +acquaintance +acquaintedness +acquest +acquiescence +acquirability +acquirement +acquirer +acquisition +acquisitiveness +acquittal +acquittance +acquitter +acraldehyde +acre +acreage +acridine +acridity +acridness +acriflavine +acrimoniousness +acrimony +acrobat +acrobatics +acrocephaly +acrocyanosis +acrodontism +acrodynia +acrogen +acrography +acrolein +acrolith +acrology +acromegaly +acromicria +acromion +acron +acronym +acropathy +acrophobia +acrophony +acropolis +acrospire +acrospore +acrostic +acrostolium +acroter +acroterion +acroterium +acrotism +acrylaldehyde +acrylate +acrylonitrile +acrylyl +act +actability +actg +actin +actinia +actinide +actinism +actinium +actinobacillosis +actinobacillus +actinochemistry +actinodermatitis +actinogram +actinograph +actinography +actinolite +actinology +actinomere +actinometer +actinometry +actinomorphy +actinomyces +actinomycete +actinomycin +actinomycosis +actinon +actinopod +actinotherapy +actinouranium +actinozoan +action +activation +activator +activeness +activism +activist +activity +actomyosin +acton +actor +actualisation +actualism +actualist +actuality +actualization +actualness +actuary +actuation +actuator +acuity +aculeus +acumen +acumination +acupuncture +acus +acusection +acusector +acutance +acuteness +acyl +acylation +acyloin +ad +adage +adamsite +adaptability +adaptableness +adaptation +adaptedness +adapter +adaptiveness +adarbitrium +adat +addax +addend +addendum +adder +addictedness +addiction +additament +addition +address +addressee +addresser +addressor +adducer +adduction +adductor +adelantado +ademption +adenalgia +adenectomy +adenine +adenitis +adenocarcinoma +adenohypophysis +adenoidectomy +adenology +adenoma +adenophore +adenosarcoma +adenosine +adenovirus +adenylpyrophosphate +adeptness +adequacy +adequateness +adermin +adherence +adherend +adherent +adherer +adhesion +adhesiveness +adhibition +adiabat +adiadochokinesia +adiaphoresis +adiaphorism +adiaphorist +adiathermancy +adipate +adiphenine +adipocere +adipocerite +adiponitrile +adipopexia +adiposeness +adiposis +adiposity +adit +adjacence +adjacency +adjective +adjoint +adjournment +adjt +adjudication +adjudicator +adjugate +adjunct +adjunction +adjuration +adjurer +adjuror +adjuster +adjustment +adjustor +adjutancy +adjutant +adm +adman +admass +admeasurement +admeasurer +admin +adminicle +administration +administrator +administratorship +administratrix +admirability +admirableness +admiral +admiralship +admiralty +admiration +admirer +admissibility +admissibleness +admission +admittance +admitter +admixture +admonisher +admonishment +admonition +admonitor +admov +adnation +adnominal +adnoun +ado +adobe +adolescence +adoptability +adopter +adoption +adorability +adorableness +adoration +adorer +adorner +adornment +adorno +adrenalectomy +adrenaline +adrenin +adret +adroitness +ads +adscription +adsorbability +adsorbate +adsorption +adularescence +adularia +adulation +adulator +adulterant +adulteration +adulterator +adulthood +adultness +adumbration +aduncity +advancement +advancer +advantage +advantageousness +advection +advena +advent +adventitia +adventitiousness +adventure +adventurer +adventuresomeness +adventurism +adventurousness +adverb +adverbial +adversary +adverseness +adversity +advertence +advertency +advertisement +advertiser +advertising +advertizer +advice +advisability +advisableness +advisedness +advisee +advisement +adviser +advisership +advocaat +advocacy +advocation +advowson +advt +adynamia +adytum +adz +adze +aecidium +aeciospore +aecium +aedeagus +aedes +aedicula +aedicule +aedile +aedileship +aedoeagus +aegirite +aegis +aegrotat +aeolipile +aeolotropism +aeolotropy +aeon +aepyornis +aerarium +aeration +aerator +aerenchyma +aerialist +aeriality +aerialness +aerie +aerification +aero +aerobacteriologist +aerobacteriology +aerobe +aerobee +aerobiologist +aerobiology +aerobiosis +aerobium +aerocar +aerodonetics +aerodontalgia +aerodontia +aerodrome +aerodynamicist +aerodynamics +aerodyne +aeroelasticity +aeroelastics +aeroembolism +aerofoil +aerogel +aerogram +aerograph +aerographer +aerography +aerolite +aerolitics +aerologist +aerology +aeromancer +aeromancy +aeromechanic +aeromechanics +aeromedicine +aerometeorograph +aerometer +aerometry +aeron +aeronaut +aeronautics +aeroneurosis +aeronomy +aeropause +aerophagia +aerophagist +aerophilatelist +aerophilately +aerophobia +aerophone +aerophore +aerophoto +aerophotography +aerophyte +aeroplane +aeroplankton +aeropulse +aeroscepsy +aeroscope +aerosinusitis +aerosol +aerospace +aerosphere +aerostat +aerostatics +aerostation +aerotherapeutics +aerothermodynamics +aerotropism +aerugo +aesc +aesculin +aesthesia +aesthete +aesthetician +aestheticism +aesthetics +aestivation +aestivator +aet +aether +aethereal +aethon +aetiologist +aetiology +af +affability +affableness +affair +affaire +affectation +affectedness +affecter +affection +affectionateness +affective +affectivity +affenpinscher +affiant +affiche +affidavit +affiliation +affinity +affirmant +affirmation +affirmer +affixation +affixer +affixture +afflatus +afflictedness +afflicter +affliction +affluence +afflux +afforestation +afforestment +affranchisement +affray +affrayer +affreighter +affreightment +affricate +affrication +affricative +affront +affrontedness +affronter +affrontiveness +affusion +afghan +afghanets +afghani +aficionada +aficionado +afikomen +aflatoxin +afreet +afrit +afrormosia +afterbirth +afterbody +afterbrain +afterburner +afterburning +aftercare +aftercast +afterclap +aftercooler +afterdamp +afterdeck +aftereffect +afterglow +aftergrowth +afterguard +afterheat +afterimage +afterlife +aftermath +afternoon +afterpain +afterpeak +afterpiece +afters +aftersensation +aftershaft +aftershock +aftertaste +afterthought +aftertime +aftertreatment +afterword +afterworld +ag +aga +agal +agalite +agalloch +agalmatolite +agalwood +agama +agamete +agamid +agammaglobulinemia +agamogenesis +agamy +agapanthus +agar +agaric +agaricin +agarita +agata +agate +agateware +agave +agba +agcy +age +agedness +agelessness +agency +agenda +agendum +agenesis +agent +ageratum +ageusia +agger +aggie +aggiornamento +agglomeration +agglomerator +agglutinability +agglutination +agglutinin +agglutinogen +aggradation +aggrandisement +aggrandiser +aggrandizement +aggrandizer +aggravation +aggravator +aggregateness +aggregation +aggression +aggressor +aggrievedness +aggro +agha +agilawood +agileness +agility +agio +agiotage +agister +agistment +agit +agitation +agitator +agitprop +agitpropist +aglet +aglossia +aglucon +aglycon +agma +agnail +agnation +agnel +agnoiology +agnomen +agnosia +agnostic +agnosticism +agogics +agon +agonist +agony +agora +agoraphobia +agouta +agouti +agouty +agr +agraation +agraffe +agraga +agrament +agrammatism +agranulocytosis +agraphia +agrarianism +agreeability +agreeableness +agreement +agribusiness +agric +agriculture +agriculturist +agrimony +agriologist +agriology +agrobiologist +agrobiology +agrology +agromania +agron +agronomics +agronomist +agronomy +agrostographer +agrostography +agrostologist +agrostology +agst +aguardiente +ague +agueweed +agujon +agura +ahankara +ahimsa +ahold +aholt +ahu +ahuehuete +ai +aide +aider +aiglet +aigrette +aiguille +aiguillette +aikido +aikuchi +ailanthus +aileron +ailette +ailment +ailurophile +ailurophilia +ailurophobe +ailurophobia +aimak +aimer +aimlessness +air +airbill +airboat +airbrasive +airbrick +airbrush +airburst +airbus +aircraft +aircraftman +aircraftsman +aircraftswoman +aircrew +aircrewman +airdrome +airdrop +airfield +airflow +airfoil +airframe +airglow +airgraph +airhead +airiness +airing +airlift +airlight +airline +airliner +airlock +airman +airmanship +airplane +airport +airscrew +airship +airsickness +airspace +airspeed +airstream +airstrip +airt +airtightness +airway +airwoman +airworthiness +aisle +ait +aitch +aitchbone +ajiva +akala +akasha +akeake +akebi +akee +akela +akene +aketon +akhara +akinesia +akinete +akroter +akroterion +akvavit +al +ala +alabamine +alabandite +alabaster +alabastos +alabastron +alabastrum +alacrity +alae +alalia +alameda +alamiqui +alamo +alamode +alanine +alap +alapa +alarmism +alarmist +alarum +alastrim +alb +alba +albacore +albarello +albarium +albata +albatross +albedo +albedometer +albergo +albert +albertite +albertype +albescence +albinism +albino +albite +albronze +album +albumen +albumeniizer +albumenisation +albumeniser +albumenization +albumin +albuminate +albuminuria +albumose +alburnum +alcahest +alcaide +alcalde +alcapton +alcaptonuria +alcayde +alcazar +alchem +alchemist +alchemy +alcheringa +alcohol +alcoholate +alcoholic +alcoholicity +alcoholisation +alcoholism +alcoholization +alcoholometer +alcoholometry +alcoholysis +alcove +alcyonarian +aldehyde +alder +alderfly +alderman +aldermancy +aldermanry +aldermanship +aldohexose +aldol +aldose +aldosterone +aldoxime +aldrin +ale +alec +alecost +alectryomancy +alegar +alehouse +alembic +aleph +alerce +alerion +alertness +alethiologist +alethiology +alette +aleuromancy +aleurone +alevin +alewife +alexander +alexanders +alexandrite +alexia +alexin +aleyard +alfa +alfalfa +alfilaria +alforja +alg +alga +algarroba +algebra +algebraist +algerienne +algerine +algerita +algesia +algesimeter +algesireceptor +algicide +algidity +algidness +algin +alginate +algolagnia +algolagnist +algologist +algology +algometer +algometry +algophobia +algor +algorism +algorithm +algraphy +alibi +alibility +alidade +alien +alienability +alienage +alienation +alienator +alienee +alienism +alienist +alienor +alif +aligner +alignment +alikeness +aliment +alimentation +alimentativeness +alimony +alinement +aliner +alinotum +alipterion +aliveness +aliyah +alizarin +alk +alkahest +alkalemia +alkalescence +alkalescency +alkali +alkalimeter +alkalimetry +alkalinisation +alkalinity +alkalinization +alkalisation +alkaliser +alkalization +alkalizer +alkaloid +alkalosis +alkane +alkanet +alkanethiol +alkannin +alkapton +alkaptonuria +alkargen +alkekengi +alkene +alkermes +alkine +alkoxide +alky +alkyl +alkylation +alkyne +allachesthesia +allanite +allantois +allayer +allecret +allegation +alleger +allegiance +allegoricalness +allegorisation +allegoriser +allegorist +allegorization +allegorizer +allegory +allele +allelism +allelomorph +allelomorphism +allemande +allemontite +allergen +allergenicity +allergist +allergy +allethrin +alleviant +alleviation +alleviator +alley +alleyway +allheal +alliance +allies +alligator +alligatorfish +allision +alliteration +alliterativeness +alliterator +allium +allmouth +allness +allocation +allochromatic +allochthon +allocution +allodiality +allodium +allogamy +allograph +allomerism +allomerization +allometry +allomorph +allomorphism +allonge +allonym +allopath +allopathy +allophane +allophone +alloplasm +allopolyploidy +allopurinol +allosaur +allotment +allotrope +allotropicity +allotropy +allottee +allotter +allotype +allowableness +allowance +alloy +allseed +allspice +allurement +allurer +alluringness +allusion +allusiveness +alluvion +alluvium +allyl +allylthiourea +almah +almanac +almandine +almandite +almemar +almery +almightiness +almique +almirah +almon +almond +almoner +almonry +almous +almsgiver +almsgiving +almshouse +almsman +almswoman +almucantar +almuce +almug +alodiality +alodium +aloe +aloes +aloeswood +alogia +aloha +aloin +aloneness +aloofness +alopecia +alouette +alp +alpaca +alpenglow +alpenhorn +alpenstock +alpha +alphabet +alphabetisation +alphabetiser +alphabetization +alphabetizer +alphitomancy +alphorn +alphosis +alpinism +alpinist +als +alsike +altar +altarage +altarpiece +altazimuth +alterability +alterableness +alteration +altercation +alternateness +alternation +alternative +alternativeness +alternativity +alternator +althaea +althea +althorn +altigraph +altimeter +altimetry +altitude +alto +altocumulus +altostratus +altruism +altruist +aludel +alula +alum +alumina +aluminate +aluminite +aluminium +aluminography +aluminosilicate +aluminosity +aluminothermy +aluminum +alumna +alumnus +alumroot +alunite +alunogen +alure +alveola +alveolation +alveolus +alyssum +amadan +amadavat +amadou +amah +amal +amalaka +amalgam +amalgamation +amalgamator +amanita +amanuensis +amaranth +amarelle +amaryllis +amasser +amassment +amateur +amateurishness +amateurism +amativeness +amatol +amatungula +amaurosis +amaut +amazedness +amazement +amazon +amazonite +amba +ambage +ambages +ambagiousness +ambarella +ambary +ambassador +ambassadorship +ambatch +amber +amberfish +ambergris +amberina +amberjack +amberoid +ambiance +ambidexterity +ambidextrousness +ambience +ambiguity +ambiguousness +ambilaterality +ambit +ambitendency +ambition +ambitiousness +ambivalence +ambiversion +ambivert +ambler +amblygonite +amblyopia +amblyoscope +amblypod +ambo +amboceptor +ambon +amboyna +ambrettolide +ambroid +ambrosia +ambrotype +ambry +ambsace +ambulacrum +ambulance +ambulante +ambulation +ambulator +ambuscade +ambuscader +ambuscado +ambush +ambusher +ameba +amebocyte +ameboidism +ameer +ameerate +ameiosis +ameliorableness +ameliorant +amelioration +ameliorator +ameloblast +amenability +amenableness +amender +amendment +amends +amenity +amenorrhea +amenorrhoea +ament +amentia +amercement +amercer +americium +amerism +amesace +amethyst +ametropia +ami +amiability +amiableness +amianthus +amicability +amicableness +amice +amidase +amidation +amide +amidin +amidine +amidocyanogen +amidogen +amidol +amidopyrine +amie +amiga +amigo +amimia +aminase +amination +amine +aminity +amino +aminobenzene +aminophenol +aminopherase +aminophylline +aminoplast +aminopyrine +amir +amirate +amitate +amitosis +amity +ammeter +ammine +ammo +ammocete +ammocoete +ammonal +ammonate +ammonation +ammonia +ammoniation +ammonification +ammonite +ammonium +ammonoid +ammonolysis +ammunition +amnesia +amnesiac +amnesty +amniocentesis +amnion +amniote +amobarbital +amoeba +amoebiasis +amoebocyte +amoeboidism +amok +amole +amontillado +amora +amorality +amoretto +amorino +amorist +amorosity +amorousness +amorphism +amorphousness +amortization +amortizement +amosite +amount +amour +amowt +amp +ampelite +ampelopsis +amperage +ampere +ampersand +ampherotoky +amphetamine +amphiarthrosis +amphiaster +amphibian +amphibiousness +amphiblastula +amphibole +amphibolite +amphibology +amphiboly +amphibrach +amphicrania +amphictyon +amphictyony +amphidiploid +amphidromia +amphigory +amphigouri +amphikaryon +amphimacer +amphimixis +amphioxus +amphipod +amphisarca +amphisbaena +amphisbaenid +amphitene +amphithalamus +amphitheater +amphitheatre +amphithecium +amphithuron +amphithyra +amphithyron +amphitoky +amphitricha +amphiuma +amphogeny +ampholyte +amphora +amphoricity +amphoriskos +ampleness +ampliation +amplidyne +amplification +amplifier +amplitude +ampoule +ampule +ampulla +ampullula +amputation +amputator +amputee +amrita +amt +amtrac +amu +amuck +amugis +amulet +amurca +amusement +amuser +amusia +amusingness +amusiveness +amyelia +amygdala +amygdale +amygdalin +amygdaloid +amygdule +amyl +amylase +amylene +amylogen +amyloid +amyloidosis +amylolysis +amylopectin +amyloplast +amylopsin +amylose +amylum +amyotonia +amyxorrhea +anabaena +anabantid +anabas +anabasine +anabasis +anabiosis +anableps +anabolism +anabolite +anabranch +anachorism +anachronism +anacidity +anaclisis +anacoenosis +anacoluthia +anacoluthon +anaconda +anacrusis +anacusia +anadem +anadenia +anadiplosis +anaemia +anaerobe +anaerobiosis +anaerobium +anaesthesia +anaesthesiologist +anaesthesiology +anaesthetic +anaesthetics +anaesthetist +anagenesis +anaglyph +anaglyphoscope +anaglyphy +anaglypta +anagnorisis +anagoge +anagram +anagrammatism +anagrammatist +analcite +analemma +analgesia +analog +analogicalness +analogion +analogism +analogist +analogousness +analogue +analogy +analysability +analysand +analysation +analyser +analysis +analyst +analyt +analytics +analytique +analyzability +analyzation +analyzer +anamnesis +anamniote +anamorphism +anamorphoscope +anamorphosis +ananda +anapaest +anapest +anaphase +anaphora +anaphylaxis +anaplasia +anaplasmosis +anaplasty +anaplerosis +anapophysis +anaptyxis +anarch +anarchism +anarchist +anarchy +anarthria +anarthrousness +anasarca +anaspid +anastasis +anastigmat +anastomosis +anastrophe +anat +anatabine +anatase +anatexis +anathema +anathematisation +anathematiser +anathematization +anathematizer +anatman +anatomisation +anatomiser +anatomist +anatomization +anatomizer +anatomy +anatta +anatto +anba +anbury +anc +ancestor +ancestry +anchor +anchorage +anchoret +anchoretism +anchorite +anchoritism +anchorman +anchoveta +anchovy +anchusa +anchusin +anchylosis +ancientness +ancientry +ancile +ancilla +ancon +ancona +ancylostomiasis +andalusite +andamento +andesine +andesite +andiron +andoroba +andradite +androclinium +androconium +androcracy +androdioecism +androecium +androgamone +androgen +androgyne +androgyny +android +andromeda +andromonoecism +andron +androphore +androsphinx +androspore +androsterone +anecdotage +anecdotalism +anecdotalist +anecdote +anecdotist +anelace +anelasticity +anemia +anemochore +anemogram +anemograph +anemography +anemology +anemometer +anemometry +anemone +anemophily +anemoscope +anemosis +anemotaxis +anemotropism +anencephalia +anergy +aneroidograph +anesthesia +anesthesimeter +anesthesiologist +anesthesiology +anesthetic +anesthetist +anesthetization +anestrus +anethole +aneuria +aneurin +aneurysm +anfractuosity +anga +angakok +angary +angel +angelfish +angelhood +angelica +angelicalness +angelique +angelology +anger +angina +angioblast +angiocardiography +angiocarp +angiology +angioma +angiosperm +angiotonase +angiotonin +angiotribe +anglaise +angle +anglepod +angler +anglesite +anglesmith +anglewing +angleworm +anglicisation +anglicization +angling +angor +angora +angriness +angst +angstrom +anguish +angularity +angularness +angulateness +angulation +angulosity +angwantibo +anhaematopoiesis +anhedonia +anhedral +anhematopoiesis +anhematosis +anhidrosis +anhinga +anhydremia +anhydride +anhydrite +anhydrosis +ani +anicca +aniconism +anil +anilide +aniline +anility +anim +anima +animadversion +animadverter +animal +animalcule +animalculum +animalisation +animalism +animalist +animality +animalization +animateness +animation +animatism +animator +anime +animism +animosity +animus +anion +anis +anisaldehyde +anise +aniseed +aniseikonia +anisette +anisocoria +anisogamete +anisogamy +anisoiconia +anisole +anisometropia +anisophylly +anisotropy +ankerite +ankh +ankle +anklebone +anklet +anklung +ankus +ankyloglossia +ankylosaur +ankylosis +ankylostomiasis +anlace +anlage +ann +anna +annabergite +annal +annalist +annatto +annealer +annelid +annexation +annexationism +annexationist +annexe +annexment +annihilability +annihilation +annihilationism +annihilationist +annihilator +anniv +anniversary +annot +annotation +annotator +announcement +announcer +annoyance +annoyer +annoyingness +annuitant +annuity +annularity +annulation +annulet +annulment +annulus +annunciation +annunciator +anoa +anociassociation +anode +anodontia +anodyne +anoesis +anoestrus +anoia +anointer +anointment +anole +anolyte +anomalism +anomalousness +anomaly +anomia +anomie +anomite +anonychia +anonym +anonymity +anonymousness +anoopsia +anopheles +anopia +anopisthograph +anorak +anorexia +anorexiant +anorthite +anorthoclase +anorthosite +anoscope +anosmia +anosognosia +anoxaemia +anoxemia +anoxia +ans +ansa +anstoss +answer +answerability +answerableness +answerer +ant +anta +antacid +antagonisation +antagonism +antagonist +antagonization +antalkali +antapex +antarala +antaranga +antbird +ante +anteater +antecedence +antecedency +antecedent +antecessor +antechamber +antechapel +antechoir +antecourt +antefix +anteflexion +antehall +antelope +antenave +antenna +antennifer +antennule +antenumber +antepast +antependium +antepenult +anteporch +anteport +anteportico +anteriority +anteroom +antetype +anteversion +anthelion +anthelix +anthelmintic +anthem +anthema +anthemion +anther +antheridium +antherozoid +anthesis +anthobian +anthocyanin +anthodium +anthol +anthologist +anthology +anthophore +anthophyllite +anthotaxy +anthozoan +anthracene +anthracite +anthracnose +anthracosilicosis +anthracosis +anthraquinone +anthrasilicosis +anthrax +anthrop +anthropocentrism +anthropogenesis +anthropogeographer +anthropogeography +anthropography +anthropol +anthropolater +anthropolatry +anthropologist +anthropology +anthropometer +anthropometrist +anthropometry +anthropomorphisation +anthropomorphism +anthropomorphist +anthropomorphization +anthropomorphosis +anthroponomist +anthroponomy +anthropopathy +anthropophagite +anthropophagy +anthroposcopy +anthroposophy +anthurium +antiaggressiveness +antialcoholism +antialcoholist +antiannexationist +antiar +antiatheist +antiauxin +antibacchius +antibaryon +antibiosis +antibiotic +antibody +antic +anticapitalism +anticapitalist +anticatalase +anticatalyst +anticathexis +anticathode +anticensoriousness +anticensorship +anticentralism +anticentralist +anticeremonialism +anticeremonialist +anticeremoniousness +antichlor +anticholinesterase +antichthon +anticipation +anticipator +anticlassicalism +anticlassicalist +anticlassicalness +anticlassicism +anticlassicist +anticlericalism +anticlericalist +anticlimax +anticline +anticlinorium +anticoagulation +anticoagulator +anticoincidence +anticommercialism +anticommercialist +anticommerciality +anticommercialness +anticommunism +anticommunist +anticonfederationism +anticonfederationist +anticonformist +anticonformity +anticonscription +anticonservatism +anticonservativeness +anticonstitutionalism +anticontagiousness +anticonventionalism +anticonventionalist +anticonvulsant +anticorona +anticorrosive +anticorrosiveness +anticreationism +anticreationist +anticreativeness +anticreativity +anticriticalness +anticum +anticyclogenesis +anticyclolysis +anticyclone +anticynic +anticynicism +antidemocracy +antidemocrat +antidepressant +antiderivative +antidisestablishmentarianism +antidogmatism +antidogmatist +antidoron +antidote +antidrug +antiecclesiastic +antiecclesiasticism +antieducationalist +antieducationist +antiegoism +antiegoist +antiegotism +antiegotist +antiempiric +antiempiricism +antiempiricist +antienthusiasm +antienthusiast +antienzyme +antievolutionist +antiexpansionism +antiexpansionist +antiexpressionism +antiexpressionist +antiexpressiveness +antifascism +antifascist +antifebrin +antifeminism +antifeminist +antiferromagnet +antiferromagnetism +antifeudalism +antifeudalist +antifoggant +antifreeze +antifriction +antifundamentalism +antifundamentalist +antigen +antigenicity +antigorite +antigrammaticalness +antigravity +antihalation +antihelix +antihero +antihierarchism +antihierarchy +antihistamine +antihumanism +antihumanist +antihunting +antihysteric +antiketogenesis +antiknock +antilegomena +antilepton +antiliberalism +antiliberalist +antiliberalness +antiliturgist +antilog +antilogarithm +antilogism +antilogy +antimacassar +antimasker +antimasque +antimasquer +antimaterialism +antimaterialist +antimatter +antimechanism +antimechanist +antimediaevalism +antimediaevalist +antimedievalism +antimedievalist +antimension +antimensium +antimere +antimerism +antimethodicalness +antimilitarism +antimilitarist +antiministerialist +antimodernism +antimodernist +antimodernness +antimonarchism +antimonarchist +antimonate +antimonide +antimonopolism +antimonopolist +antimonsoon +antimony +antimonyl +antimoralism +antimoralist +antimusicalness +antimysticalness +antimysticism +antinationalism +antinationalist +antinaturalism +antinaturalist +antinaturalness +antineutralism +antineutrality +antineutrino +antineutron +anting +antinihilism +antinihilist +antinode +antinomianism +antinomy +antinoness +antinormality +antinovel +antinucleon +antioptimism +antioptimist +antiorthodoxy +antioxidant +antioxidizer +antioxygenation +antioxygenator +antiozonant +antipacifism +antipacifist +antipapalist +antipapism +antipapist +antiparabema +antiparticle +antipasto +antipatheticalness +antipathist +antipathogen +antipathogene +antipathy +antipatriarch +antipatriarchy +antipatriot +antipatriotism +antiperistalsis +antiperspirant +antiphilosophism +antiphon +antiphonary +antiphony +antiphrasis +antiphysicalness +antipode +antipole +antipope +antipopery +antipopulism +antipragmaticism +antipragmatism +antipragmatist +antiprelatism +antiprelatist +antiproductiveness +antiprohibitionist +antiproton +antipsalmist +antipsychiatry +antipuritan +antipyresis +antipyrine +antiq +antiquarianism +antiquary +antiquatedness +antiquation +antique +antiqueness +antiquer +antiquity +antiracing +antiradical +antiradicalism +antirationalism +antirationalist +antirationality +antireactionary +antirealism +antirealist +antireducer +antireformer +antireformist +antireligionist +antireligiosity +antiremonstrant +antirenter +antirentism +antirepublicanism +antiresonance +antirevisionist +antirevolutionary +antirevolutionist +antiritualism +antiritualist +antiromanticism +antiromanticist +antiroyalism +antiroyalist +antirrhinum +antisceptic +antiscepticism +antischolasticism +antisensitivity +antisensitizer +antisensuality +antisensuousness +antisepsis +antiserum +antiskeptic +antiskepticism +antisociality +antisophism +antisophist +antisophistication +antisophistry +antispiritualism +antispiritualist +antispreader +antistater +antistatism +antistatist +antistimulation +antistriker +antistrophe +antisudorific +antisuffragist +antisupernaturalism +antisupernaturalist +antisyndicalism +antisyndicalist +antitheologian +antithesis +antitoxin +antitrade +antitraditionalist +antitragus +antitrust +antitype +antiunionist +antiutilitarianism +antivaccinationist +antivaccinist +antivenin +antiworld +antler +antlia +antlion +antoninianus +antonomasia +antonym +antre +antrum +antshrike +antthrush +anuran +anuresis +anuria +anvil +anxiety +anxiousness +aoli +aorist +aorta +aortitis +aortoclasia +aortography +aoudad +ap +apa +apache +apagoge +apanage +aparavidya +aparejo +aparitif +apartheid +apartment +apartness +apastron +apathy +apatite +ape +apeiron +apeman +apercu +aperiodicity +aperiu +apertometer +aperture +apery +apetalousness +apetaly +apex +aph +aphaeresis +aphagia +aphakia +aphanite +aphanitism +aphasia +aphasiac +aphelion +apheliotropism +aphemia +apheresis +aphesis +aphid +aphidlion +aphis +aphlaston +aphonia +aphoriser +aphorism +aphorist +aphorizer +aphrodisia +aphrodisiac +aphtha +aphylly +apiarist +apiary +apices +apiculture +apiculturist +apiculus +apiologist +apiology +apishness +aplanogamete +aplanospore +aplasia +aplite +aplomb +aplustre +apnea +apnoea +apocalypse +apocalypticism +apocarp +apocarpy +apocatastasis +apocenter +apocentricity +apochromat +apochromatism +apocopation +apocope +apocrypha +apocryphalness +apocynthion +apodeipnon +apodema +apodeme +apodosis +apoenzyme +apoferritin +apogamy +apogee +apogeotropism +apograph +apokatastasis +apollo +apologete +apologetics +apologia +apologiser +apologist +apologizer +apologue +apology +apolune +apomict +apomixis +apomorphine +aponeurosis +apophasis +apophony +apophthegm +apophyge +apophyllite +apophysis +apoplexy +apopyle +aporia +aposiopesis +apospory +apostasy +apostate +apostatism +apostil +apostle +apostlehood +apostleship +apostolate +apostolicalness +apostolicism +apostolicity +apostrophe +apothecary +apothecium +apothegm +apothem +apotheosis +apotropaism +app +appanage +appar +apparatchik +apparatus +apparel +apparentement +apparentness +apparition +apparitor +appd +appeal +appealability +appealer +appealingness +appearance +appeasableness +appeasement +appeaser +appel +appellant +appellation +appellative +appellativeness +appellee +appellor +appendage +appendance +appendancy +appendectomy +appendence +appendency +appendicectomy +appendicitis +appendicle +appendix +appentice +appenzell +apperception +appersonation +appestat +appetence +appetency +appetite +appetizer +applauder +applause +apple +applecart +applejack +apples +applesauce +applesnits +appliableness +appliance +applicability +applicableness +applicant +application +applicator +applier +applique +appmt +appoggiatura +appointee +appointer +appointment +appointor +apportioner +apportionment +apposability +apposer +appositeness +apposition +appraisal +appraiser +appreciation +appreciativeness +appreciator +apprehender +apprehensibility +apprehension +apprehensiveness +apprentice +apprenticehood +apprenticeship +apprizer +appro +approachability +approachableness +approacher +approbation +approbativeness +approbator +appropriateness +appropriation +appropriativeness +appropriator +approvability +approval +approvedness +approver +approx +approximation +appulse +appurtenance +apr +apraxia +apricot +apriorism +apriorist +apriority +apritif +apron +aprosexia +apse +apsidiole +apsis +apterium +apteryx +aptitude +aptness +apx +aqua +aquacade +aquaculture +aquaemanale +aqualung +aquamanale +aquamanile +aquamarine +aquanaut +aquaphobia +aquaplane +aquaplaner +aquarelle +aquarellist +aquarist +aquarium +aquashow +aquatint +aquatinter +aquatone +aquavit +aqueduct +aqueousness +aquiclude +aquiculture +aquiculturist +aquifer +aquilegia +ar +araban +arabesque +arability +arabinose +arachnid +arachnoid +aragonite +arak +araneid +arapaima +araroba +araucaria +arbalest +arbalester +arbalister +arbiter +arbitrage +arbitrager +arbitrament +arbitrariness +arbitration +arbitrationist +arbitrator +arbitrement +arbitrer +arbor +arborescence +arboretum +arboriculture +arboriculturist +arborist +arborization +arborvitae +arbour +arbtrn +arbutus +arc +arca +arcade +arcana +arcanist +arcanum +arcature +arch +archaeocyte +archaeol +archaeologist +archaeology +archaeomagnetism +archaeopteryx +archaeornis +archaiser +archaism +archaist +archaizer +archangel +archbanc +archbishop +archbishopric +archconfraternity +archd +archdeacon +archdeaconate +archdeaconry +archdeaconship +archdiocese +archduchess +archduchy +archduke +archebanc +archegonium +archenemy +archenteron +archeocyte +archeologist +archeology +archer +archerfish +archery +archespore +archesporium +archetto +archetype +archfiend +archiblast +archicarp +archidiaconate +archiepiscopacy +archiepiscopate +archil +archimage +archimandrite +archine +arching +archipelago +archiphoneme +archiplasm +archit +architect +architectonics +architecture +architrave +archive +archivist +archivolt +archlute +archness +archon +archonship +archoplasm +archpriest +archpriesthood +archpriestship +archsee +archt +archway +arcograph +arcosolium +arcs +arcticologist +arcticology +arcuation +arcus +ardeb +ardency +ardentness +ardish +ardor +ardour +arduousness +area +areaway +areca +areg +arena +arenite +arenosity +areography +areola +areolation +areole +areologist +areology +arete +arethusa +arfvedsonite +arg +argal +argali +argasid +argent +argentite +argentum +arghool +argil +argillite +arginine +arglebargle +argol +argon +argonon +argosy +argot +arguer +argufier +argument +argumentation +argumentativeness +argumentum +argyrodite +arhythmia +aria +aridity +aridness +ariel +arietta +aril +arillode +arioso +arista +aristarch +aristarchy +aristocracy +aristocrat +aristocraticalness +aristocraticness +aristodemocracy +aristotype +arith +arithmancy +arithmetic +arithmetician +arithmomancy +ark +arkose +arkwright +arm +armada +armadillo +armament +armamentarium +armarian +armarium +armary +armature +armband +armchair +armer +armet +armful +armguard +armhole +armiger +armill +armilla +arming +armipotence +armistice +armlet +armload +armoire +armomancy +armor +armorbearer +armorer +armorist +armory +armour +armourbearer +armourer +armoury +armpad +armpit +armrest +armure +army +armyworm +arnatto +arnica +aroma +aromaticity +aromaticness +aromatiser +aromatization +aromatizer +arousal +arouser +arpeggiation +arpeggio +arpent +arquebus +arquebusier +arr +arrack +arraigner +arraignment +arrangement +arranger +arras +array +arrayal +arrear +arrearage +arrears +arrenotoky +arrester +arrestment +arrgt +arrhenotoky +arrhythmia +arri +arricciato +arriccio +arris +arriva +arrival +arriver +arrivisme +arriviste +arroba +arrogance +arrogation +arrogator +arrondissement +arrow +arrowhead +arrowroot +arrowwood +arrowworm +arroyo +arrythmia +arsenal +arsenate +arsenic +arsenide +arsenite +arsenolite +arsenopyrite +arshin +arsine +arsis +arson +arsonist +arsphenamine +art +artal +artefact +artel +artemisia +arterialisation +arterialization +arteriole +arteriology +arteriosclerosis +arteriotomy +arteritis +artery +artesonado +artfulness +arthralgia +arthrectomy +arthritis +arthrodia +arthrodire +arthrology +arthromere +arthropod +arthrospore +artic +artichoke +article +articulability +articulacy +articulateness +articulation +articulator +artifact +artifice +artificer +artificiality +artificialness +artillery +artilleryman +artiness +artiodactyl +artisan +artisanship +artist +artiste +artistry +artlessness +artophorion +artotype +artwork +arum +aruspex +aruspicy +arvo +aryballos +aryballus +aryl +arylamine +arylation +arythmia +asafetida +asafoetida +asana +asarabacca +asarotum +asarum +asb +asbestos +asbestosis +asbolane +ascariasis +ascarid +ascaridole +ascendancy +ascender +ascension +ascent +ascertainableness +ascertainer +ascertainment +ascesis +ascetic +asceticism +asci +ascidian +ascidium +ascites +ascocarp +ascogonium +ascomycete +ascon +ascospore +ascot +ascription +ascus +asdic +aseity +asemia +asepsis +asepticism +asgmt +ash +ashamedness +ashcan +ashet +ashkey +ashlar +ashlaring +ashman +ashplant +ashram +ashtray +asiderite +asininity +askarel +askari +asker +askos +asonia +asp +asparagine +asparagus +aspect +aspen +asper +aspergillosis +aspergillum +aspergillus +asperity +asperser +aspersion +aspersorium +asphalt +asphaltene +asphaltite +asphaltum +asphodel +asphyxia +asphyxiation +asphyxiator +aspic +aspidistra +aspirant +aspirata +aspiration +aspirator +aspirer +aspirin +assafetida +assagai +assailableness +assailant +assailer +assailment +assam +assassin +assassination +assassinator +assault +assaulter +assayer +assegai +assembl +assembla +assemblage +assembler +assembly +assemblyman +assent +assentation +assentiveness +assentor +asserter +assertion +assertiveness +assertor +assessment +assessor +assessorship +asset +asseveration +asshead +assheadedness +assibilation +assiduity +assiduousness +assignability +assignat +assignation +assignee +assigner +assignment +assignor +assimilability +assimilation +assimilationist +assimilativeness +assimilator +assistance +assistant +assistantship +assister +assistor +assize +assn +assoc +associability +associableness +association +associationism +associativeness +assonance +assorter +assortment +asst +assuagement +assuager +assumer +assumpsit +assumption +assurance +assuredness +assurer +assurgency +assuror +astasia +astaticism +astatine +aster +astereognosis +asteriscus +asterisk +asterism +asterixis +asteroid +asteroidean +asthenia +asthenope +asthenopia +asthenosphere +asthma +astigmatism +astigmatizer +astigmatometry +astigmatoscope +astigmatoscopy +astigmia +astigmometer +astigmometry +astigmoscope +astilbe +astonisher +astonishingness +astonishment +astr +astrachan +astragal +astragalomancy +astragalus +astrakhan +astraphobia +astriction +astrictiveness +astringency +astringer +astrionics +astrobiology +astrobotany +astrocompass +astrocyte +astrodome +astrodynamics +astrogation +astrogator +astrogeology +astrograph +astrography +astroid +astrol +astrolabe +astrologer +astrologian +astrologist +astrology +astromancer +astromancy +astrometry +astron +astronaut +astronautics +astronavigation +astronavigator +astronomer +astronomy +astrophotography +astrophysicist +astrophysics +astrosphere +astucity +astuteness +asylum +asymmetry +asymptote +asynchronism +asyndeton +asynergy +atabal +atacamite +ataghan +ataman +atar +ataraxia +atavism +atavist +ataxia +ataxite +atebrin +atelectasis +ateleiosis +atelier +ateliosis +athanasia +athar +atheism +atheist +atheisticness +atheling +athenaeum +athermancy +atheroma +atherosclerosis +athetosis +athlete +athleticism +athletics +athodyd +athrocyte +athrocytosis +atlantes +atlas +atm +atman +atmolysis +atmometer +atmometry +atmosphere +atoll +atom +atomicity +atomics +atomisation +atomism +atomist +atomization +atomizer +atomy +atonalism +atonality +atonement +atoner +atonicity +atony +atrabiliousness +atresia +atrichia +atrium +atroceruleous +atrociousness +atrocity +atrophy +atropine +atropism +att +attabal +attach +attacha +attacher +attachment +attacker +attainability +attainableness +attainder +attainer +attainment +attainture +attapulgite +attar +attemperator +attemptability +attempter +attendance +attendant +attender +attention +attentiveness +attenuation +attenuator +attestant +attestation +attestator +attester +attestor +attic +atticist +attingence +attingency +attirement +attitude +attitudinarian +attitudinarianism +attitudiniser +attitudinizer +attorney +attorneyship +attornment +attractableness +attractant +attracter +attraction +attractiveness +attractor +attrib +attributer +attribution +attributiveness +attributor +attriteness +attrition +atty +aubade +auberge +aubergine +aubergiste +aubrietia +auburn +auction +auctioneer +aud +audaciousness +audacity +audibility +audibleness +audience +audile +audio +audiogram +audiology +audiometer +audiometry +audion +audiophile +audiotypist +audiphone +audit +audition +auditor +auditorium +auditorship +aug +augend +auger +augite +augmentation +augmenter +augur +augury +augustness +auk +auklet +aulophyte +aulos +aumbry +aumildar +aune +aunt +auntie +aunty +aura +auramine +aurar +aureateness +aurelia +aurelian +aureole +aureolin +aureus +auricle +auricula +auricularia +aurification +auriga +auriscope +aurist +aurochs +aurora +aurum +auscultation +auscultator +ausforming +auspex +auspice +auspiciousness +austenite +austereness +austerity +australite +australopithecine +austringer +autacoid +autarch +autarchist +autarchy +autarkist +autarky +auteciousness +autecism +autecology +auteur +auth +authentication +authenticator +authenticity +author +authorisation +authoriser +authoritarianism +authoritativeness +authority +authorization +authorizer +authors +authorship +autism +autist +auto +autoantibody +autobahn +autobiographer +autobiography +autobus +autocade +autocatalysis +autocatharsis +autocephaly +autochanger +autochrome +autochromy +autochthon +autochthonism +autochthonousness +autochthony +autoclave +autocoid +autocollimation +autocollimator +autocorrelation +autocracy +autocrat +autocross +autocue +autocycle +autodidact +autodyne +autoeciousness +autoecism +autoeroticism +autoerotism +autogamy +autogenesis +autogiro +autograft +autograph +autography +autogyro +autoharp +autohypnosis +autoignition +autoinfection +autoinoculation +autointoxication +autoionization +autoist +autokinesis +autolithography +autolysin +autolysis +automat +automata +automaticity +automatictacessing +automation +automatism +automatist +automatograph +automaton +automechanism +automobile +automobilist +automorphism +autonomist +autonomy +autonym +autooxidation +autophyte +autopilot +autopista +autoplast +autoplasty +autopolyploidy +autopsist +autopsy +autoput +autoradiograph +autoradiography +autoreflection +autorotation +autoroute +autosome +autostability +autostoper +autostrada +autosuggestibility +autosuggestion +autosuggestionist +autotelism +autotimer +autotomy +autotoxaemia +autotoxemia +autotoxicosis +autotoxin +autotransformer +autotransplant +autotroph +autotrophy +autotruck +autotype +autotypy +autoxidation +autumn +autunite +aux +auxanometer +auxesis +auximone +auxin +auxocardia +auxochrome +av +avadavat +availability +availableness +avalanche +avarice +avariciousness +avatar +avdp +avenger +avens +aventail +aventurine +avenue +average +averment +averseness +aversion +averter +avg +aviary +aviation +aviator +aviatrix +avicularium +aviculture +aviculturist +avidin +avidity +avidya +avifauna +avigation +avigator +avion +avionics +avirulence +aviso +avitaminosis +avizandum +avn +avo +avocado +avocation +avocet +avodire +avoidance +avoider +avoir +avoirdupois +avoset +avoucher +avouchment +avowal +avowedness +avower +avowry +avulsion +avunculate +awaiter +awakener +awarder +awareness +awe +awedness +awelessness +awesomeness +awfulness +awkwardness +awl +awlessness +awlwort +awmous +awn +awner +awning +ax +axanthopsia +axe +axel +axes +axiality +axil +axilemma +axilla +axillar +axinite +axinomancy +axiologist +axiology +axiom +axis +axle +axletree +axman +axolotl +axon +axoplasm +axseed +ayah +ayahuasca +aye +ayin +ayous +ayre +az +azalea +azan +azathioprine +azedarach +azeotrope +azeotropism +azeotropy +azide +azimuth +azine +azlon +azobenzene +azoimide +azole +azophenylene +azote +azotemia +azoth +azotobacter +azulejo +azure +azurite +azurmalachite +azygospore +b +ba +baas +baaskap +baba +babassu +babblement +babbler +babe +babesia +babesiosis +babiche +babirusa +babka +baboo +baboon +baboonery +babracot +babu +babul +babushka +baby +babyhood +babyishness +bacca +baccalaureate +baccarat +bacchanal +bacchanalianism +bacchant +bacchante +bacchius +baccillum +baccy +bach +bachamel +bachelor +bachelordom +bachelorhood +bachelorism +bacillemia +bacillus +bacitracin +back +backache +backband +backbencher +backbend +backbiter +backboard +backbone +backbreaker +backchat +backcloth +backcourt +backdown +backdrop +backer +backfall +backfield +backflow +backgammon +background +backhand +backhandedness +backhander +backhaul +backhouse +backing +backlash +backlighting +backlog +backpack +backpacker +backplate +backrest +backrope +backsaw +backscatter +backscratcher +backset +backsheesh +backside +backsight +backslapper +backslapping +backslider +backspin +backsplice +backstabber +backstay +backstitch +backstop +backstreet +backstretch +backstroke +backswimmer +backswing +backsword +backswordman +backup +backveld +backwardation +backwardness +backwash +backwasher +backwater +backwoodsman +backyard +baclava +bacon +baconer +bact +bacteraemia +bacteremia +bactericide +bacterin +bacterioid +bacteriol +bacteriologist +bacteriology +bacteriolysis +bacteriolytic +bacteriophage +bacteriophagy +bacterioscopist +bacterioscopy +bacteriostasis +bacteriostat +bacterium +bacterization +bacteroides +baculite +baculoid +baculum +baddeleyite +badderlocks +baddie +badge +badger +badigeon +badinage +badinerie +badman +badminton +badness +bael +baetyl +bafflement +baffleplate +baffler +bafflingness +baffy +bag +bagasse +bagatelle +bagel +bagful +baggage +baggagemaster +bagged +bagginess +bagging +baggywrinkle +bagh +baghla +bagie +bagio +bagman +bagnette +bagnio +bagpipe +bagpiper +baguette +baguio +bagwash +bagwig +bagwoman +bagwork +bagworm +bahadur +baht +bahut +bahuvrihi +bai +baidarka +baigneuse +bail +bailee +bailey +bailie +bailiff +bailiffship +bailiwick +bailment +bailor +bailout +bailsman +bainite +bairn +bairnishness +bait +baiter +baize +bajada +bakeapple +bakehouse +bakemeat +baker +bakery +bakeware +baking +baklava +bakra +baksheesh +bal +balaclava +balalaika +balance +balancer +balao +balas +balata +balboa +balbriggan +balconet +balcony +baldachin +balderdash +baldhead +baldmoney +baldness +baldoquin +baldpate +baldpatedness +baldric +bale +baleen +balefire +balefulness +baler +balestra +balibuntal +baline +balker +balkiness +balkline +ball +ballad +ballade +balladeer +balladist +balladmonger +balladmongering +balladry +ballas +ballast +ballaster +ballata +baller +ballerina +ballet +balletomane +balletomania +ballett +ballflower +ballism +ballista +ballistician +ballistics +ballistite +ballistocardiogram +ballistocardiograph +ballistocardiography +ballium +ballon +ballonet +ballonna +balloon +balloonfish +ballot +ballotade +balloter +ballottement +ballottine +ballpark +ballplayer +ballpoint +ballroom +ballup +ballyhoo +balm +balmacaan +balminess +balneologist +balneology +balon +baloney +balopticon +balsa +balsam +balteus +balun +baluster +balustrade +bambino +bambocciade +bamboo +bamboozlement +bamboozler +banality +banana +bananaquit +banat +banc +band +bandage +bandager +bandanna +bandbox +bandeau +bandelet +bander +banderilla +banderillero +banderole +bandersnatch +bandh +bandicoot +bandiness +banding +bandit +banditry +bandleader +bandlet +bandmaster +bandobust +bandog +bandoleer +bandoline +bandore +bandsman +bandspreading +bandstand +bandura +bandurria +bandwagon +bandwidth +bane +baneberry +banefulness +bang +bangalay +bangboard +banger +bangle +bangtail +bani +bania +banian +banisher +banishment +banister +banjo +banjoist +bank +bankbook +banker +banket +banking +bankroll +bankroller +bankrupt +bankruptcy +banksia +banlieue +banner +banneret +bannerette +bannerman +bannerol +bannister +bannock +banquet +banqueter +banquette +bansela +banshee +bant +bantam +bantamweight +banterer +banting +bantling +banyan +baobab +bap +baptism +baptistery +baptistry +baptizement +baptizer +bar +barabara +baragnosis +baraka +barat +barathea +baraza +barb +barba +barbacan +barbarian +barbarianism +barbarisation +barbarism +barbarity +barbarization +barbarousness +barbe +barbecue +barbel +barbell +barbeque +barber +barberite +barberry +barbershop +barbet +barbette +barbican +barbicel +barbierite +barbital +barbitone +barbiturate +barbiturism +barbotine +barbu +barbudo +barbule +barbut +barbwire +barcarole +barchan +bard +barde +bardiness +bardolatry +bardship +barefacedness +barege +bareheadedness +bareness +baresark +baresthesia +barfly +bargain +bargainer +barge +bargeboard +bargee +bargello +bargeman +bargepole +bargestone +barghest +barih +barilla +barit +barite +baritone +barium +bark +barkeeper +barkentine +barker +barkhan +barley +barleycorn +barm +barmaid +barman +barn +barnacle +barndoor +barney +barnstormer +barnyard +baroclinity +barocyclonometer +barognosis +barogram +barograph +barolo +barometer +barometrograph +barometry +baron +baronage +baroness +baronet +baronetage +baronetcy +barong +barony +baroque +baroscope +barosinusitis +barostat +baroswitch +barothermogram +barothermograph +barothermohygrogram +barothermohygrograph +barotrauma +barotropy +barouche +barque +barquentine +barquette +barr +barra +barracker +barracoon +barracouta +barracuda +barracudina +barrage +barramunda +barramundi +barranca +barrator +barratry +barre +barrel +barreleye +barrelfish +barrelful +barrelhead +barrelhouse +barrenness +barrenwort +barret +barretor +barretry +barrette +barretter +barricade +barricader +barricado +barrier +barrio +barrister +barroom +barrow +barrulet +barspoon +barstool +bartender +barterer +bartizan +barton +barycentre +barye +baryon +barysphere +baryta +barytes +barytocalcite +baryton +barytone +basalt +basaltware +basanite +bascinet +bascule +base +baseball +baseboard +baseburner +basecoat +baseline +baseliner +baseman +basement +baseness +basenji +baseplate +bases +bashaw +bashfulness +bashibazouk +basiation +basicity +basidiocarp +basidiomycete +basidiospore +basidium +basil +basilard +basilica +basilisk +basin +basinet +basion +basis +basket +basketball +basketful +basketry +basketwork +basnet +bason +bass +bassarisk +basset +bassinet +bassist +bassness +basso +bassoon +bassoonist +basswood +bast +bastardisation +bastardization +bastardry +bastardy +baster +basti +bastide +bastille +bastinade +basting +bastion +bastite +bastnaesite +bat +batata +batch +bateau +bateleur +batfish +batfowler +bath +bather +bathhouse +batholith +bathometer +bathos +bathrobe +bathroom +bathtub +bathymeter +bathymetry +bathyscaphe +bathysphere +bathythermogram +bathythermograph +batik +batiste +batman +baton +batrachian +batsman +batsmanship +batswing +batt +batta +battalia +battalion +batteau +battel +batteler +battement +batten +battener +batterie +battery +battik +batting +battle +battledore +battlefield +battlefront +battlement +battlepiece +battleplane +battler +battleship +battologist +battology +battue +battuta +battuto +batuque +batwoman +bauble +baud +baudekin +baudrons +bauhinia +baulk +bauson +bauxite +bavardage +bawarchi +bawbee +bawcock +bawd +bawdiness +bawdry +bawdyhouse +bawler +bawtie +bawty +bay +baya +bayadere +bayamo +bayard +bayberry +bayonet +bayou +baysmelt +baywood +bazaar +bazoo +bazooka +bazookaman +bb +bbl +bch +bd +bde +bdellium +bdl +beach +beachboy +beachcomber +beacher +beachhead +beachie +beachwear +beacon +beaconage +bead +beader +beadeye +beadhouse +beadiness +beading +beadle +beadledom +beadroll +beadsman +beadswoman +beadwork +beagle +beagling +beak +beaker +beam +beaminess +bean +beanbag +beanery +beanfeast +beanie +beano +beanpole +beanshooter +beanstalk +bearableness +bearbaiter +bearbaiting +bearberry +bearbush +bearcat +beard +beardfish +bearding +beardlessness +beardtongue +bearer +bearing +bearishness +bearpaw +bearskin +bearwood +beast +beastie +beastings +beastliness +beata +beater +beatification +beating +beatitude +beatnik +beatus +beau +beaugregory +beaujolais +beaut +beauteousness +beautician +beautification +beautifier +beautifulness +beauty +beaux +beaver +beaverette +bebeerine +bebeeru +bebop +bebopper +bec +beccafico +beche +beck +becket +beckoner +becomingness +bed +bedazzlement +bedbug +bedchamber +bedclothing +bedcover +bedder +bedding +bedeguar +bedehouse +bedel +bedeman +bedesman +bedeswoman +bedevilment +bedfellow +bedframe +bedizenment +bedlam +bedlamite +bedlamp +bedlight +bedmaker +bedmaking +bedmate +bedpad +bedpan +bedplate +bedpost +bedquilt +bedrail +bedrock +bedroll +bedroom +bedside +bedsitter +bedsock +bedsore +bedspread +bedspring +bedstand +bedstead +bedstraw +bedtick +bedtime +bedwarmer +bee +beebread +beech +beechnut +beedi +beef +beefburger +beefcake +beefeater +beefiness +beefsteak +beefwood +beehive +beekeeper +beekeeping +beeline +beento +beep +beeper +beer +beerhouse +beeriness +beerpull +beestings +beeswax +beeswing +beet +beetfly +beetle +beetlehead +beetler +beetroot +beeves +beezer +bef +befittingness +befouler +befoulment +befuddlement +befuddler +begar +beggar +beggardom +beggarhood +beggarliness +beggarweed +beggary +beginner +beginning +begonia +beguilement +beguiler +beguine +begum +behalf +behavior +behaviorism +behaviorist +behaviour +beheadal +beheader +behemoth +behest +beholder +behoof +beige +beigel +being +bejel +bel +belah +belatedness +belauder +belcher +beldam +beleaguerer +belection +belemnite +belfry +belga +belief +belier +believability +believableness +believer +belittlement +belittler +bell +belladonna +bellarmine +bellbird +bellboy +belle +belletrist +bellflower +bellhop +bellicoseness +bellicosity +belligerence +belligerency +bellman +bellower +bellows +bellpull +bellwether +bellwort +belly +bellyache +bellyacher +bellyband +bellybutton +bellyful +belomancy +belonging +belt +beltcourse +belting +beltline +beltman +beltway +beluga +belvedere +bema +bemirement +bemusement +ben +bench +bencher +benchmark +benchwarmer +bender +bendlet +benedicite +benedict +benediction +benefaction +benefactor +benefice +beneficence +beneficialness +beneficiary +benefit +benefiter +benevolence +benevolentness +bengaline +benightedness +benignancy +benignity +benison +benitoite +benjamin +benne +bennet +benny +benthos +bentonite +bentwood +benumbedness +benumbment +benzalacetone +benzaldehyde +benzamine +benzene +benzeneazobenzene +benzidine +benzine +benzoate +benzocaine +benzofuran +benzoin +benzol +benzonitrile +benzophenone +benzoquinone +benzosulfimide +benzotrichloride +benzotrifluoride +benzoyl +benzoylation +benzyl +bequeathal +bequeather +bequeathment +bequest +berberine +berberis +berceuse +berdache +bereavement +bereaver +beret +beretta +berg +bergall +bergamasca +bergamot +bergare +bergschrund +beriberi +berk +berkelium +berley +berlin +berm +berretta +berry +bersagliere +berseem +berserker +berth +bertha +berthage +beryl +beryllium +beryllonite +besague +besant +beseecher +beseechingness +besetment +besetter +beshow +besiegement +besieger +besmearer +besmircher +besom +besottedness +bestiarist +bestiary +bestowal +bestowment +bestsellerdom +bet +beta +betacaine +betafite +betaine +betatron +betel +beth +bethel +bethroot +betise +betony +betrayal +betrayer +betrothal +betta +betterment +bettor +betty +betweenbrain +betweenness +bevatron +bevel +beveler +bever +beverage +bevvy +bevy +bewailment +bewilderment +bewitcher +bewitchery +bewitchingness +bewitchment +bewrayer +bey +beyondness +bezant +bezel +bezique +bezoar +bezonian +bezzant +bf +bg +bhajan +bhakta +bhakti +bhaktimarga +bhang +bhangi +bharal +bhavan +bheesty +bhindi +bhishti +bhp +bhungi +bhut +bi +biacetyl +bialy +bias +biathlon +biaxiality +bib +bibb +bibber +bibcock +bibelot +bibl +biblioclasm +biblioclast +bibliofilm +bibliog +bibliogony +bibliographer +bibliography +biblioklept +bibliolater +bibliolatrist +bibliolatry +bibliologist +bibliology +bibliomancy +bibliomania +bibliomaniac +bibliopegist +bibliopegy +bibliophage +bibliophile +bibliophilism +bibliophily +bibliophobe +bibliophobia +bibliopole +bibliopolism +bibliopoly +bibliotaph +bibliotheca +bibliotherapist +bibliotherapy +bibliotics +bibliotist +bibulosity +bibulousness +bicameralism +bicameralist +bicarb +bicarbonate +bice +biceps +bichloride +bichromate +bickerer +bickering +bicollaterality +biconcavity +biconditional +bicone +bicorne +bicron +bicycle +bicycler +bicyclist +bidarka +biddability +biddableness +bidding +biddy +bider +bidet +bidi +bield +biennium +bier +bierkeller +bierstube +biestings +biff +biffin +bifidity +bifluoride +biformity +bifurcation +biga +bigamist +bigamy +bigarreau +bigener +bigeye +bigg +biggie +biggin +bigging +biggy +bighead +bighorn +bight +bigmouth +bigness +bignonia +bigot +bigotry +biguanide +bigwig +bigwiggedness +bijection +bijou +bijouterie +bike +bikie +bikini +bilander +bilateralism +bilateralness +bilberry +bilbo +bilby +bile +bilection +bilestone +bilge +bilgeway +bilharzia +bilharziasis +bilingualism +bilinguist +biliousness +bilirubin +biliteralism +bilith +biliverdin +bilker +bill +billabong +billboard +billbug +biller +billet +billeter +billethead +billfish +billfold +billhead +billhook +billiard +billiardist +billiards +billing +billingsgate +billion +billionaire +billman +billon +billow +billowiness +billposter +billposting +billsticking +billy +billyboy +billycock +billyo +bilocation +bilsted +biltong +bimah +bimane +bimbo +bimester +bimetallism +bimetallist +bimethyl +bimillennium +bimodality +bimodule +bimorph +bimotor +bin +bination +binder +bindery +bindheimite +binding +bindingness +bindle +bindweed +bine +bing +binge +bingey +binghi +bingle +bingo +bingy +binnacle +binocle +binocularity +binomial +binomialism +binormal +binoxalate +bint +binturong +bioassay +bioastronautics +biobibliographer +biobibliography +biocatalyst +biocenology +biochemist +biochemistry +biocide +bioclimatician +bioclimatologist +bioclimatology +biocycle +biodynamics +bioecologist +bioecology +bioelectricity +bioelectrogenesis +bioenergetics +bioengineering +biofeedback +bioflavonoid +biofog +biog +biogen +biogenesis +biogeochemistry +biogeography +biographee +biographer +biography +bioherm +biol +biologism +biologist +biology +bioluminescence +biolysis +biomagnetism +biomass +biome +biomedicine +biometer +biometrician +biometrics +biometry +bionics +bionomics +bionomist +bionomy +biophysicist +biophysics +bioplasm +biopoiesis +biopsy +bioscope +bioscopy +biosociology +biosphere +biostatics +biostrome +biosynthesis +biota +biotechnology +biotin +biotite +biotope +biotype +biotypology +bipack +bipartisanism +bipartisanship +bipartition +biped +biphenyl +bipinnaria +biplane +bipod +bipolarity +bipropellant +bipyramid +biquadrate +biracialism +birch +bird +birdbath +birdbrain +birdcage +birder +birdhouse +birdie +birdlime +birdman +birdseed +birdwoman +birefringence +bireme +biretta +biri +biriani +birk +birling +birne +birota +birrus +birse +birth +birthday +birthmark +birthnight +birthplace +birthright +birthroot +birthstone +birthstool +birthwort +biscuit +bise +bisection +bisector +bisectrix +bisellium +bish +bishop +bishopbird +bishopric +bishydroxycoumarin +bisk +bismanol +bismuth +bismuthine +bismuthinite +bismuthyl +bismutite +bisnaga +bison +bisphenoid +bisque +bissextus +bisso +bissonata +bister +bistort +bistoury +bistre +bistro +bisulfate +bisulfide +bisulfite +bisulphate +bisulphide +bisulphite +bisymmetry +bit +bitartrate +bitchery +bitchiness +biter +bitewing +bitingness +bitonality +bitser +bitstock +bitt +bitterender +bitterling +bittern +bitterness +bitternut +bitterroot +bittersweet +bitterweed +bitterwood +bitterwort +bitting +bittock +bitumen +bituminisation +biuniqueness +bivalence +bivalency +bivalve +bivane +bivinyl +bivouac +bivvy +biz +bizarreness +bize +biznaga +bizone +bk +bkbndr +bkcy +bkg +bklr +bkpr +bks +bl +blabber +blabbermouth +bladder +bladdernose +bladdernut +bladderpod +bladderwort +bladderwrack +blade +bladebone +blaeberry +blague +blah +blain +blamableness +blame +blameableness +blamefulness +blamelessness +blamer +blameworthiness +blanc +blancher +blancmange +blandisher +blandishment +blandness +blankbook +blanket +blanketing +blankness +blanquette +blanquillo +blarney +blasphemer +blasphemousness +blasphemy +blast +blastema +blaster +blastie +blasting +blastment +blastocoel +blastocyst +blastoderm +blastodisk +blastoff +blastogenesis +blastoma +blastomere +blastomycosis +blastopore +blastosphere +blastostyle +blastula +blatancy +blateness +blatherskite +blaubok +blaze +blazer +blazoner +blazonment +blazonry +bldg +bleachability +bleacher +bleachery +bleakness +blearedness +bleariness +blearyeyedness +bleater +bleaunt +bleb +bleeder +bleep +blellum +blemish +blemisher +blencher +blende +blender +blenny +blepharitis +blepharospasm +blesbok +blesbuck +blessedness +blesser +blessing +blet +bletting +blewits +blight +blighter +blighty +blimp +blindage +blindcat +blinder +blindfish +blindfoldedness +blindfolder +blinding +blindness +blindstorey +blindstory +blindworm +blinkard +blinker +blinks +blintz +blintze +blip +bliss +blissfulness +blister +blitheness +blithesomeness +blitz +blitzkrieg +blizzard +blk +bloatedness +bloater +blob +bloc +block +blockade +blockader +blockaderunning +blockage +blockboard +blockbuster +blockbusting +blocker +blockhead +blockheadedness +blockheadism +blockhouse +blockishness +bloke +blonde +blondeness +blondness +blood +bloodfin +bloodflower +bloodguiltiness +bloodhound +bloodiness +blooding +bloodlessness +bloodletter +bloodletting +bloodline +bloodmobile +bloodnoun +bloodroot +bloodshed +bloodstain +bloodstock +bloodstone +bloodstream +bloodsucker +bloodthirstiness +bloodworm +bloodwort +bloom +bloomer +bloomery +bloomingness +blooper +blossom +blot +blotch +blotter +blouse +blouson +blowball +blower +blowfish +blowfly +blowgun +blowhard +blowhole +blowie +blowiness +blowing +blowiron +blowlamp +blowoff +blowout +blowpipe +blowtorch +blowtube +blowup +bls +blubberer +blubberhead +blucher +bludgeon +bludgeoneer +bludgeoner +blue +bluebell +blueberry +bluebill +bluebird +bluebonnet +bluebook +bluebottle +bluecoat +bluefish +bluegill +bluegrass +bluehead +blueing +bluejack +bluejacket +blueness +bluenose +bluepoint +blueprint +blueprinter +bluer +bluest +bluestem +bluestocking +bluestockingism +bluestone +bluet +bluethroat +bluetick +bluetit +bluetongue +blueweed +bluewood +bluey +bluffer +bluffness +bluing +bluishness +blunder +blunderbuss +blunderer +blunger +bluntness +blurb +blurbist +blurredness +blusher +blushfulness +blusterer +blvd +blype +bn +boa +boar +board +boarder +boarding +boardinghouse +boardroom +boardwalk +boarfish +boarhound +boarishness +boart +boas +boaster +boastfulness +boat +boatage +boatbill +boatbuilder +boatel +boater +boathook +boathouse +boating +boatload +boatman +boatmanship +boatsman +boatswain +boattail +boatwright +boatyard +bobber +bobbery +bobbin +bobbinet +bobbing +bobble +bobby +bobbysoxer +bobcat +bobeche +bobfloat +boblet +bobol +bobolink +bobotie +bobowler +bobs +bobsled +bobsledder +bobsledding +bobsleigh +bobstay +bobtail +bocaccio +bocage +boccaccio +boccie +bod +bodega +bodegun +bodement +bodgie +bodhi +bodice +bodied +bodilessness +boding +bodkin +body +bodycheck +bodyguard +bodying +bodywork +boff +boffin +boffo +bog +bogan +bogbean +bogey +bogeyman +boggart +bogginess +boggler +bogie +bogle +bogong +bogtrotter +bogwood +bogy +bohea +bohorok +bohunk +boiler +boilermaker +boilerplate +boilover +boiserie +boisterousness +bokmakierie +boko +bol +bola +bolas +boldface +boldfacedness +boldheartedness +boldness +boldo +bole +bolection +bolero +boletus +bolide +bolivar +boliviano +boll +bollard +bollworm +bolo +bologna +bolograph +bolography +bolometer +boloney +bolson +bolsterer +bolsun +bolt +boltel +bolter +bolthead +boltonia +boltrope +bolus +boma +bombarder +bombardier +bombardment +bombardon +bombast +bombazine +bombe +bomber +bombilla +bombload +bombora +bombshell +bombsight +bombycid +bonanza +bonaventure +bonavist +bonbon +bonce +bond +bonder +bondholder +bondmaid +bondman +bondservant +bondsman +bondstone +bondswoman +bondwoman +bone +bonefish +bonehead +boneheadedness +boneset +bonesetter +boneshaker +boneyard +bonfire +bong +bongo +bongrace +bonhomie +boniness +bonism +bonito +bonne +bonnet +bonnethead +bonnetiare +bonniness +bonnyclabber +bonsai +bonsela +bonspiel +bontebok +bontebuck +bonus +bonytail +bonze +boobialla +boobook +bood +boodle +boodler +boogeyman +book +bookbinder +bookbindery +bookbinding +bookcase +bookcraft +bookie +booking +bookishness +bookkeeper +bookkeeping +booklet +booklouse +booklover +bookmaker +bookmaking +bookman +bookmark +bookmobile +bookplate +bookrack +bookrest +bookseller +bookshelf +bookstack +bookstall +bookstand +bookstore +bookwork +bookworm +boomer +boomerang +boomkin +boomlet +boomslang +boon +boondocker +boondoggler +boong +boor +boorga +boorishness +boost +booster +boot +boote +bootee +bootery +booth +bootie +bootjack +bootlace +bootlegged +bootlegger +bootlegging +bootlessness +bootlicker +bootloader +boots +bootstrap +boottopping +booty +booze +boozer +booziness +bopper +bor +bora +boracite +borage +borak +boral +borane +borasca +borate +borax +borazon +borborygmus +bord +bordel +bordello +border +bordereau +borderer +borderland +borderline +bordure +borecole +boredom +boree +borehole +borer +bori +boride +boring +borneol +bornite +boroglyceride +borohydride +boron +boronia +borosilicate +borough +borrasca +borrelia +borrower +borrowing +borscht +borstal +bort +borzoi +boscage +boschbok +boschvark +bosh +bosk +boskage +bosket +boskiness +bosom +boson +bosquet +boss +bossage +bossboy +bossiness +bossism +boston +bosun +boswellism +bot +botaniser +botanist +botanizer +botanomancy +botany +botargo +botcher +botchery +botchiness +botel +botfly +botheration +bothridium +bothrium +bothy +botryomycosis +botrytis +bots +bott +botte +bottega +bottle +bottlebrush +bottleneck +bottlenose +bottler +bottom +bottomlessness +bottomry +botulin +botulinus +botulism +bouch +bouche +bouchon +boucl +boucla +boud +boudeuse +boudoir +bouffancy +bouffe +bougainvillaea +bougainvillea +bough +boughpot +bougie +bouillabaisse +bouillon +bouk +boulder +bouldering +boule +bouleuterion +boulevard +boulevardier +bouleversement +boulimia +bouncer +boundary +boundedness +bounder +boundlessness +boundness +bounteousness +bountifulness +bounty +bouquet +bourbon +bourdon +bourg +bourgeois +bourgeoise +bourgeoisie +bourgeon +bourn +bournonite +bourr +bourrae +bourrasque +bourtree +bout +boutel +boutique +boutonniere +bouvardia +bouzouki +bovarism +bovarist +bovate +bovinity +bovver +bowdlerisation +bowdlerism +bowdlerization +bowdrill +bowedness +bowel +bowenite +bower +bowerbird +bowfin +bowgrace +bowhead +bowing +bowknot +bowl +bowlder +bowldering +bowleg +bowleggedness +bowler +bowline +bowling +bowman +bowpot +bowsaw +bowser +bowshot +bowsprit +bowstring +bowtel +bowwow +bowyang +bowyer +box +boxball +boxberry +boxboard +boxcar +boxer +boxfish +boxful +boxhead +boxholder +boxing +boxroom +boxthorn +boxwood +boy +boyar +boyardism +boyarism +boycotter +boyfriend +boyhood +boyishness +boyla +boyo +boysenberry +bozo +bp +br +bra +braata +brabblement +brabbler +braccae +braccio +brace +bracelet +bracer +bracero +brach +brachialgia +brachiation +brachiator +brachiopod +brachiosaurus +brachistochrone +brachium +brachycardia +brachycephalism +brachycephaly +brachydactylia +brachydome +brachylogy +brachyuran +bracingness +bracken +bracket +bracketing +brackishness +braconid +bract +bracteole +brad +bradawl +bradoon +bradsot +bradyauxesis +bradycardia +bradykinesia +bradykinesis +bradykinin +bradytely +brae +braggadocianism +braggadocio +braggart +braggartism +bragger +braguette +braider +braiding +braies +brail +brain +brainchild +braininess +brainlessness +brainpan +brainpower +brainsickness +brainstorm +brainstorming +brainwasher +brainwashing +brainwork +braird +brake +brakeage +brakeman +braker +brakesman +bramble +brambling +bran +branch +branchia +branching +branchiopod +branchiostegal +brand +brander +brandering +brandisher +brandling +brandreth +brandy +brangle +branle +branner +brannigan +bransle +brant +brashiness +brashness +brasier +brasil +brasilein +brasilin +brasque +brass +brassage +brassard +brasserie +brassey +brassica +brassie +brassiere +brassiness +brassware +brat +bratina +brattice +brattishing +brattle +bratwurst +braunite +bravado +braveness +bravery +bravest +bravura +brawl +brawler +brawn +brawniness +braxy +brayer +brayera +brayette +braza +brazenness +brazer +brazier +brazil +brazilein +brazilianite +brazilin +brazilite +brazilwood +breach +breacher +bread +breadbasket +breadboard +breadfruit +breadlessness +breadline +breadnut +breadroot +breadstuff +breadth +breadwinner +breadwinning +breakableness +breakage +breakaway +breakdown +breaker +breakfast +breakfaster +breaking +breakout +breakover +breakpoint +breakthrough +breakup +breakwater +breakweather +breakwind +breast +breastbone +breasting +breastpin +breastplate +breastplow +breaststroke +breastsummer +breastwork +breath +breatheableness +breather +breathiness +breathing +breathlessness +breccia +brecciation +brecht +brede +bree +breech +breechblock +breechcloth +breeching +breechloader +breeder +breeding +breenger +breeze +breezeway +breeziness +bregma +brekky +breloque +bremsstrahlung +brent +bressummer +bretelle +bretessa +brev +breva +breve +brevet +breviary +breviate +brevier +brevis +brevity +brewage +brewer +brewery +brewhouse +brewing +brewis +brewmaster +brian +briar +briarroot +briarwood +bribability +bribeability +briber +bribery +brick +brickbat +brickfield +brickfielder +brickkiln +bricklayer +bricklaying +brickleness +brickmaker +brickmaking +brickwork +brickyard +bricole +bride +bridegroom +bridesmaid +bridewell +bridge +bridgeboard +bridgehead +bridgeman +bridgetree +bridgewall +bridgework +bridging +bridie +bridle +bridler +bridoon +brie +briefcase +briefing +brieflessness +briefness +brier +brierroot +brierwood +brig +brigade +brigadier +brigadiership +brigalow +brigand +brigandage +brigandine +brigantine +brightener +brightness +brightwork +brigsail +brill +brilliance +brilliancy +brilliantine +brilliantness +brim +brimfullness +brimfulness +brimmer +brimstone +brindle +brine +briner +bringer +brininess +brinishness +brinjal +brink +brinkmanship +brinny +brio +brioche +briolette +briony +briquet +briquette +brisa +brisance +brisket +briskness +brisling +bristle +bristletail +bristliness +brisure +brit +britska +brittlebush +brittleness +britzka +briza +bro +broacher +broadax +broadbill +broadbrim +broadcaster +broadcloth +broadhead +broadleaf +broadloom +broadsheet +broadside +broadsword +broadtail +broadwife +brob +brocade +brocatel +brocatelle +broccoli +brochantite +broche +brochette +brochure +brock +brockage +brocket +brodie +broeboe +brogan +brogh +brogue +broguery +broiderer +broidery +broiler +brokage +brokenness +broker +brokerage +brokership +brolga +brolly +bromal +bromate +bromeliad +bromeosin +bromide +bromidrosis +bromination +bromine +bromisation +bromism +bromization +bromizer +bromochloromethane +bromoform +bromoil +bromomethane +bronchi +bronchiectasis +bronchiole +bronchitis +broncho +bronchobuster +bronchocele +bronchopneumonia +bronchorrhagia +bronchoscope +bronchoscopist +bronchoscopy +bronchospasm +bronchostomy +bronchus +bronco +broncobuster +brontosaur +brontosaurus +bronze +bronzed +bronzing +bronzite +broo +brooch +brood +brooder +broodiness +broodmare +brook +brookie +brookite +brooklet +brooklime +brookweed +broom +broomcorn +broomrape +broomsquire +broomstick +bros +brose +broth +brothel +brother +brotherhood +brotherliness +brotula +brough +brougham +broughta +brouhaha +brow +browband +browbeater +brown +brownie +browning +brownness +brownout +brownprint +brownstone +browser +brucella +brucellosis +brucine +brucite +brugh +bruin +bruiser +bruiter +bruja +brujo +brula +brulyie +brulyiement +brumby +brume +brunch +brunetness +brunette +brunetteness +brunt +brush +brusher +brushiness +brushlessness +brushpopper +brushup +brushwood +brushwork +brusqueness +brusquerie +brutalisation +brutalitarianism +brutality +brutalization +brute +bruteness +brutification +brutishness +bruxism +bryologist +bryology +bryony +bryophyte +bryozoan +bs +bsh +bskt +bt +btise +btl +btry +bu +bub +bubal +bubble +bubbler +bubby +bubo +bubonocele +buccaneer +buccaro +bucchero +buccinator +bucentaur +buchite +buchu +buck +buckaroo +buckayro +buckbean +buckboard +buckbrush +buckeen +bucker +bucket +bucketful +buckeye +buckhorn +buckhound +buckishness +buckjumper +buckle +buckler +buckling +bucko +buckra +buckram +bucksaw +buckshot +buckskin +buckstay +bucktail +buckthorn +bucktooth +buckwheat +bucranium +bud +budder +buddha +buddhi +buddle +buddleia +buddler +buddy +budger +budgerigar +budget +budgeter +budgie +buff +buffa +buffability +buffalo +buffalofish +buffer +buffet +buffeter +bufflehead +buffo +buffoon +buffoonery +buffoonishness +buffoonism +bufotenine +bug +bugaboo +bugbane +bugbear +bugeye +bugginess +buggy +bughouse +bugle +bugler +bugleweed +bugloss +bugong +bugout +bugseed +buhr +buhrstone +buibui +builder +building +bul +bulb +bulbil +bulbul +bulge +bulginess +bulimia +bulk +bulkhead +bulkheading +bulkiness +bull +bulla +bullace +bullarium +bullary +bullbaiting +bullbat +bulldog +bulldoggedness +bulldozer +bullet +bullethead +bulletheadedness +bulletin +bullfight +bullfighter +bullfighting +bullfinch +bullfrog +bullhead +bullheadedness +bullhorn +bullied +bullion +bullionism +bullionist +bullishness +bullnose +bullock +bullocky +bullpen +bullpout +bullring +bullroarer +bullsnake +bullterrier +bullwhip +bully +bullyboy +bullying +bullyragger +bulnbuln +bulrush +bulwark +bumbailiff +bumbershoot +bumblebee +bumblebeefish +bumbledom +bumblefoot +bumblepuppy +bumbler +bumboat +bumboatman +bumf +bumkin +bummalo +bummaree +bummed +bummer +bumming +bumper +bumph +bumpiness +bumpkin +bumpoff +bumptiousness +bun +bunch +bunchberry +bunchflower +bunchiness +bunco +buncombe +bund +bundh +bundle +bundler +bundobust +bundu +bung +bungalow +bungee +bunger +bungler +bungstarter +bunion +bunk +bunker +bunkerage +bunkhouse +bunkie +bunkmate +bunko +bunkum +bunn +bunny +bunraku +buntal +bunting +buntline +bunton +bunyip +buoy +buoyage +buoyancy +buprestid +bur +buran +burbler +burbot +burd +burden +burdener +burdensomeness +burdock +bureau +bureaucracy +bureaucrat +bureaucratism +bureaucratization +burela +burette +burg +burga +burgage +burgee +burger +burgess +burgh +burgher +burghership +burglar +burglary +burgomaster +burgomastership +burgonet +burgoo +burgrave +burhel +burial +burier +burin +burk +burka +burker +burkite +burl +burlap +burlecue +burler +burlesque +burlesquer +burletta +burley +burliness +burmite +burner +burnet +burnisher +burnishment +burnoose +burnout +buroo +burp +burr +burrawang +burrfish +burrhel +burro +burrow +burrower +burrstone +bursa +bursar +bursary +burse +burseed +bursitis +burster +burstone +burthen +burton +burweed +bus +busbar +busboy +busby +busera +bush +bushbaby +bushbashing +bushbeater +bushbuck +bushcraft +bushel +bushelbasket +busheler +bushelful +busheller +bushelman +busher +bushfire +bushhammer +bushie +bushiness +bushing +bushman +bushmaster +bushpig +bushranger +bushranging +bushtit +bushwa +bushwalking +bushwhacker +bushwhacking +business +businessman +businesswoman +busk +busker +buskin +busload +busman +buss +busses +bust +bustard +bustee +buster +bustic +bustler +busuuti +busybody +busyness +busywork +butacaine +butadiene +butane +butanol +butanone +butat +butcher +butcherbird +butcherer +butcherliness +butchery +butene +buteo +butler +butlerage +butlership +butlery +butte +butter +butterball +butterbump +butterbur +butterbush +buttercup +butterfat +butterfingers +butterfish +butterflied +butterfly +butterflyfish +butterflying +butterine +butteriness +buttermilk +butternut +butterpaste +butterscotch +butterweed +butterwort +butting +buttinsky +buttock +button +buttonball +buttonbush +buttoner +buttonhole +buttonholer +buttonhook +buttonmold +buttonmould +buttons +buttonwood +buttress +buttstock +butty +butyl +butylene +butyral +butyraldehyde +butyrate +butyrin +buxomness +buyer +buzz +buzzard +buzzer +buzzwig +bv +bvt +bwana +bx +bye +byelaw +bylaw +byliner +bypass +bypasser +bypath +byre +byrnie +byroad +byrrus +byssinosis +byssus +bystander +bystreet +byte +bytownite +byway +bywoner +byword +byzant +c +ca +cab +cabal +cabala +cabalism +cabalist +caballer +caballero +caballo +cabana +cabane +cabaret +cabasset +cabbage +cabbagehead +cabbagetown +cabbageworm +cabbala +cabbalism +cabbalist +cabby +cabdriver +caber +cabezon +cabildo +cabin +cabinet +cabinetmaker +cabinetmaking +cabinetry +cabinetwork +cabinetworker +cable +cablegram +cablese +cablet +cableway +cabman +cabob +cabochon +caboclo +caboodle +caboose +cabotage +cabretta +cabrilla +cabriole +cabriolet +cabstand +cabuya +cacanapa +cacao +caccia +cachalot +cache +cachepot +cachet +cachexia +cachinnation +cachinnator +cachou +cachucha +cacimbo +cacique +caciquism +cack +cackler +cacoaethes +cacodemon +cacodyl +cacodylate +cacoepy +cacoethes +cacogenics +cacographer +cacography +cacology +cacomistle +cacophony +cacqueteuse +cactus +cad +cadaster +cadastre +cadaver +cadaverine +cadaverousness +caddice +caddie +caddis +caddisfly +caddishness +caddisworm +caddy +cade +cadelle +cadence +cadency +cadenza +cadet +cadetcy +cadetship +cadette +cadger +cadginess +cadi +cadmium +cadre +caduceus +caducity +caecilian +caecum +caenogenesis +caeoma +caesaropapism +caesaropapist +caesium +caesura +caf +cafa +cafard +cafeteria +caff +caffa +caffeine +caffeinism +caffeism +caftan +cage +cageling +cager +caginess +cagoule +cahier +cahill +cahoot +cahow +caid +caiman +cain +cainogenesis +caique +caird +cairn +cairngorm +caisson +caitiff +cajeput +cajeputol +cajolement +cajoler +cajolery +cajuput +cake +cakewalk +cakewalker +cakra +cakravartin +cal +calabash +calabazilla +calaboose +calabrasella +calache +caladium +calalu +calamanco +calamander +calamary +calamine +calamint +calamite +calamitousness +calamity +calamondin +calamus +calandria +calash +calathus +calaverite +calcaneum +calcaneus +calcar +calcareousness +calceolaria +calces +calcicole +calciferol +calcification +calcifuge +calcimine +calciminer +calcination +calcinator +calciner +calciphile +calciphobe +calcite +calcitonin +calcium +calcsinter +calcspar +calculability +calculation +calculator +calculus +caldarium +caldera +caldron +calef +calefaction +calendar +calender +calenderer +calendula +calenture +calesa +calescence +calf +calfskin +caliber +calibrater +calibration +calibrator +calibre +calices +caliche +calicle +calico +calicoback +caliculus +caliduct +calif +califate +californite +californium +caliginosity +caliginousness +calimanco +calina +calipash +calipee +caliper +caliperer +caliph +caliphate +calisaya +calisthenics +calix +calker +calkin +calla +callais +callant +callboy +caller +callet +calligrapher +calligraphist +calligraphy +calling +calliope +calliopsis +callipash +calliper +calliperer +callisthenics +callithump +callosity +callousness +callout +callowness +callus +calmness +calomel +caloreceptor +calorescence +caloricity +calorie +calorimeter +calorimetry +calorizer +calory +calotte +caloyer +calpac +calque +caltrop +calumet +calumniation +calumniator +calumny +calutron +calvaria +calvary +calves +calvities +calx +calyces +calycle +calyculus +calypso +calyptra +calyptrogen +calyx +cam +camaca +camail +camanchaca +camaraderie +camarilla +camass +camauro +camber +cambiata +cambion +cambist +cambistry +cambium +cambogia +camboose +cambrel +cambric +camel +cameleer +camelhair +camellia +camelopard +cameo +camera +cameralism +cameralist +cameraman +camerlengo +camerlingo +camion +camisado +camise +camisole +camla +camlet +camoca +camomile +camoodi +camorrism +camouflage +camouflager +camouflet +camoufleur +camp +campagna +campagus +campaign +campaigner +campanile +campanologer +campanologist +campanology +campanula +campcraft +camper +campesino +campfire +campground +camphene +camphire +camphol +camphor +camphorweed +campimeter +campimetry +campion +campo +campodean +campodeid +campong +camporee +campshot +campsite +campstool +campus +campylite +camshaft +camwood +canafistula +canaigre +canaille +canakin +canal +canalatura +canaliculation +canaliculus +canalis +canalisation +canalization +canaller +canap +canapa +canard +canary +canasta +canaster +canc +cancan +cancelability +canceler +cancellability +cancellation +canceller +cancellus +cancer +canceration +cancerousness +cancha +canciun +candela +candelabrum +candescence +candidacy +candidate +candidateship +candidness +candle +candlebeam +candleberry +candlefish +candleholder +candlelight +candlemaker +candlenut +candlepin +candlepins +candlepower +candler +candlestand +candlestick +candlewick +candlewood +candor +candour +candy +candyfloss +candys +candytuft +cane +canebrake +canella +canephora +caner +canescence +canework +canfield +canful +cangue +canikin +caning +caninity +canister +canker +cankeredness +cankerworm +canna +cannabin +cannabis +cannelure +canner +cannery +cannetille +cannibal +cannibalism +cannibalization +cannikin +canniness +canning +cannon +cannonade +cannonball +cannoneer +cannoneering +cannonry +cannula +cannulation +canoe +canoeist +canoewood +canon +canoness +canonicate +canonicity +canonisation +canoniser +canonist +canonization +canonizer +canonry +canonship +canoodler +canopy +canorousness +canotier +canso +cant +cantala +cantalever +cantaloupe +cantankerousness +cantata +cantatrice +canteen +canter +canterbury +cantharus +canthus +canticle +cantilena +cantilever +cantillation +cantimo +cantina +cantiness +cantingness +cantle +cantling +canto +canton +cantonalism +cantonment +cantor +cantorship +cantrip +cantus +canula +canvas +canvasback +canvasser +canyon +canzo +canzona +canzone +canzonet +caoque +caoutchouc +cap +capa +capability +capableness +capaciousness +capacitance +capacitation +capacitor +capacity +caparison +capataz +cape +capeador +capelin +capeline +caper +capercaillie +caperer +capeskin +capette +capful +caph +capias +capibara +capillarity +caping +capita +capital +capitaliser +capitalism +capitalist +capitalization +capitalizer +capitalness +capitation +capitulant +capitulary +capitulation +capitulator +capitulum +caplin +capo +capon +caponette +caponisation +caponiser +caponization +caponizer +caporal +capot +capotasto +capote +cappelletti +capper +cappie +capping +cappuccino +capriccio +caprice +capriciousness +caprification +caprificator +caprifig +capriole +caproate +caps +capsaicin +capsicum +capsid +capstan +capstone +capsulation +capsule +captain +captaincy +captainship +caption +captiousness +captivation +captivator +captive +captivity +captor +capturer +capuche +capuchin +caput +capybara +caqueteuse +car +carabao +carabid +carabin +carabineer +carabiner +carabinero +carabiniere +caracal +caracara +carack +caracol +caracole +caracoler +caracoller +caracul +carafe +carageen +caramba +carambola +caramel +caramelisation +caramelization +carangid +carapa +carapace +carat +caravan +caravaner +caravanist +caravansary +caravanserai +caravel +caraway +carbamate +carbamide +carbamidine +carbanil +carbanion +carbarn +carbazole +carbene +carbide +carbimide +carbine +carbineer +carbinol +carbohydrate +carbon +carbonade +carbonado +carbonatation +carbonate +carbonation +carbonator +carbonisation +carboniser +carbonization +carbonizer +carbonyl +carbonylation +carboxylase +carboxylate +carboxylation +carboy +carbuncle +carburation +carburetant +carburetion +carburetor +carburettor +carburisation +carburiser +carburization +carburizer +carby +carbylamine +carcajou +carcanet +carcase +carcass +carcinogen +carcinogenicity +carcinoma +carcinomatosis +carcinosarcoma +card +cardamom +cardboard +cardcastle +carder +cardholder +cardhouse +cardialgia +cardiectomy +cardigan +cardinal +cardinalate +cardinalfish +cardinalship +carding +cardiodynia +cardiogram +cardiograph +cardiography +cardioid +cardiologist +cardiology +cardiomegaly +carditis +cardon +cardoon +cardroom +cards +cardsharp +cardsharping +careenage +careener +career +careerism +careerist +carefreeness +carefulness +carelessness +carer +caress +caresser +caret +caretaker +caretaking +carfare +carfax +carfloat +carfuffle +cargo +carhop +cariama +caribe +caribou +caricature +caricaturist +caries +carillon +carillonneur +carina +carination +carinula +carioca +cariole +cariosity +cariousness +carisoprodol +caritas +cark +carl +carlin +carline +carling +carlishness +carload +carloadings +carmagnole +carman +carmel +carmine +carn +carnage +carnalism +carnality +carnallite +carnalness +carnation +carnauba +carnelian +carnet +carney +carnification +carnival +carnivore +carnivorism +carnivorousness +carnosine +carnosity +carnotite +carob +caroche +carol +caroler +caroller +carolus +carom +caroon +carotene +carotenoid +carotid +carotin +carousal +carousel +carouser +carp +carpal +carpale +carpel +carpenter +carpentering +carpenterworm +carpentry +carper +carpet +carpetbag +carpetbagger +carpetbaggery +carpeting +carpetweed +carphology +carpi +carpogonium +carpologist +carpology +carpometacarpus +carpophore +carport +carpospore +carpostome +carpus +carrack +carrageen +carrefour +carrel +carriage +carriageway +carrier +carriole +carrion +carritch +carrollite +carrom +carromata +carronade +carrot +carrotiness +carrousel +carrus +carryall +carrycot +carse +carsickness +cart +cartage +carte +cartel +cartelism +cartelist +cartelization +carter +cartful +carthorse +cartilage +cartload +cartogram +cartograph +cartographer +cartography +cartomancy +carton +cartonnier +cartoon +cartoonist +cartopper +cartouche +cartridge +cartulary +cartwheel +cartwright +carucate +caruncle +carvacrol +carvel +carver +carving +caryatid +caryopsis +carzey +casa +casaba +casaque +casbah +cascabel +cascade +cascara +cascarilla +caschrom +case +casease +caseation +casebook +casebox +casein +caseinogen +casekeeper +caseload +casemaker +casemate +casement +caseose +caser +casern +casework +caseworker +caseworm +cash +cashableness +cashaw +cashbook +cashbox +cashdrawer +cashew +cashier +cashmere +cashoo +casimere +casimire +casing +casino +cask +casket +casque +cassaba +cassapanca +cassareep +cassata +cassation +cassava +casserole +cassette +cassia +cassie +cassimere +cassino +cassis +cassiterite +cassock +cassolette +cassone +cassoon +cassoulet +cassowary +castanet +castaway +caste +castellan +castellanship +castellany +castellation +castellum +caster +castigation +castigator +casting +castle +castor +castoreum +castrametation +castration +castrato +castrator +casualism +casualist +casualness +casualty +casuarina +casuist +casuistry +casus +cat +catabaptist +catabasis +catabolism +catabolite +catachresis +cataclasis +cataclysm +catacomb +catacumba +catafalque +catagenesis +catalase +catalepsy +catalo +catalog +cataloger +catalogist +catalogue +cataloguer +cataloguist +catalpa +catalysis +catalyst +catalyzer +catamaran +catamite +catamnesis +catamount +catamountain +cataphasia +cataphoresis +cataphract +cataphyll +cataplane +cataplasia +cataplasm +cataplexy +catapult +cataract +catarrh +catastasis +catastrophe +catastrophism +catastrophist +catatonia +catatoniac +catbird +catboat +catcall +catcaller +catchall +catcher +catchfly +catchiness +catchingness +catchlight +catchline +catchment +catchpole +catchpolery +catchpollery +catchup +catchword +cate +catechesis +catechin +catechisation +catechiser +catechism +catechist +catechization +catechizer +catechol +catecholamine +catechu +catechumen +catechumenate +catechumenism +categoricalness +categorisation +categorist +categorization +category +catena +catenane +catenary +catenation +catenoid +cateran +caterer +catering +caterpillar +caterwauler +catface +catfall +catfight +catfish +catgut +catharsis +catharticalness +cathead +cathedra +cathedral +cathepsin +catheter +catheterisation +catheterization +cathetus +cathexis +cathisma +cathode +cathodoluminescence +catholicalness +catholicate +catholicisation +catholiciser +catholicity +catholicization +catholicizer +catholicness +catholicon +catholicos +catholicus +cathouse +cathud +cation +catjang +catkin +catling +catmint +catnap +catnip +catoptrics +catstick +catsup +cattail +cattalo +cattery +cattiness +cattishness +cattle +cattleman +cattleship +cattleya +cattyphoid +catwalk +cauada +caucus +cauda +caudaite +caudation +caudex +caudillo +caudle +caul +cauldron +caulicle +cauliculus +cauliflory +cauliflower +caulis +caulker +caulome +cauon +caus +causability +causalgia +causality +causation +causationism +causationist +causativeness +causativity +cause +causelessness +causer +causerie +causeuse +causeway +causey +causticity +causticness +cauterisation +cauterization +cautery +caution +cautioner +cautiousness +cav +cavaedium +cavalcade +cavalero +cavalierism +cavalierness +cavalla +cavally +cavalry +cavalryman +cavatina +cave +cavea +caveat +caveator +cavefish +cavel +caveman +cavendish +caver +cavern +cavesson +cavetto +caviar +cavie +caviler +cavilingness +caviller +cavillingness +caving +cavitation +cavity +cavorter +cavum +cavy +caw +cay +cayenne +cayman +cayuse +cc +ccm +cd +ce +ceanothus +ceaselessness +cecity +cecum +cedar +ceder +cedi +cedilla +cedula +ceiba +ceibo +ceiler +ceilidh +ceiling +ceilometer +celadon +celandine +celature +celeb +celebrant +celebratedness +celebrater +celebration +celebrator +celebret +celebrity +celeriac +celerity +celery +celesta +celestiality +celestialness +celestite +celibacy +celibate +celioscope +celioscopy +celiotomy +cell +cella +cellar +cellarage +cellarer +cellaret +cellarman +cellblock +cellist +cello +cellobiose +celloidin +cellophane +cellularity +cellulase +cellulation +cellule +cellulitis +celluloid +cellulose +cellulosity +celom +celoscope +celotomy +celt +celtuce +celure +cembalist +cembalo +cement +cementation +cementer +cementite +cementum +cemetery +cen +cenacle +cenesthesia +cenobite +cenobitism +cenogenesis +cenospecies +cenotaph +cenote +censer +censor +censoriousness +censorship +censurability +censurableness +censure +censurer +census +cent +cental +centare +centas +centaur +centaury +centavo +centenarian +centenionalis +center +centerboard +centering +centerline +centerpiece +centesimal +centesimo +centesis +centiare +centibar +centigram +centiliter +centilitre +centillion +centime +centimeter +centimetre +centipede +centipoise +centistere +centistoke +centner +cento +centonism +centra +centralisation +centraliser +centralism +centralist +centrality +centralization +centralizer +centre +centreboard +centrefold +centrepiece +centricity +centrifugalisation +centrifugalization +centrifugate +centrifugation +centrifuge +centring +centriole +centripetalism +centrist +centroid +centrolinead +centromere +centrosome +centrosphere +centrosymmetry +centrum +centuplication +centurion +century +ceorl +cep +cephalalgia +cephalin +cephalitis +cephalization +cephalochordate +cephalodium +cephalom +cephalometer +cephalometry +cephalon +cephalopod +cephalothorax +cera +ceramal +ceramic +ceramics +ceramist +cerargyrite +cerastes +cerat +cerate +ceratin +ceratodus +ceratopsian +cercaria +cercis +cercus +cere +cereal +cerebellum +cerebration +cerebritis +cerebroside +cerebrotonia +cerebrum +cerecloth +cerement +ceremonialism +ceremonialist +ceremoniousness +ceremony +ceresin +cereus +ceria +ceriman +cerise +cerite +cerium +cermet +cero +cerograph +cerographist +cerography +ceroma +ceroplastics +cerotype +cert +certainty +certif +certifiableness +certificate +certification +certifier +certiorari +certitude +certosina +cerulean +cerumen +ceruse +cerussite +cervelat +cervelliare +cervices +cervicitis +cervid +cervix +cesium +cess +cessation +cesser +cession +cessionary +cesspipe +cesspit +cesspool +cesta +cestode +cestus +cesura +cetaceum +cetane +cete +cetin +cetologist +cetology +cetus +cf +cfd +cfh +cfm +cfs +cg +cgm +cgs +ch +chabazite +chablis +chabouk +chachalaca +chachia +chacma +chaconne +chad +chaeta +chaetodon +chaetognath +chaetopod +chaetotaxy +chafer +chafery +chafeweed +chaff +chafferer +chaffinch +chaffiness +chagal +chagrin +chagul +chain +chainage +chainbreak +chainman +chainplate +chainsman +chainwork +chair +chairlady +chairlift +chairman +chairmanship +chairwoman +chaise +chaitya +chakra +chakravartin +chalaza +chalcanthite +chalcedony +chalcid +chalcidicum +chalcocite +chalcographer +chalcographist +chalcography +chalcolite +chalcopyrite +chalcostibite +chaldron +chalet +chalice +chalicothere +chalk +chalkboard +chalkpit +chalkrail +chalkstone +challah +challenger +challiho +challis +chalone +chalumeau +chalutz +chalybite +cham +chamade +chamaephyte +chamber +chamberer +chamberlain +chambermaid +chambray +chameleon +chametz +chamfer +chamferer +chamfron +chamiso +chammy +chamois +chamomile +chamosite +chamotte +champac +champagne +champaign +champer +champers +champerty +champignon +champion +championship +chance +chanced +chancefulness +chancel +chancellery +chancellor +chancellorship +chancery +chancing +chancre +chancroid +chandelier +chandelle +chandler +chandlery +chanduy +chanfron +changeability +changeableness +changedness +changefulness +changelessness +changeling +changemaker +changeover +changepocket +changer +channel +channeler +channeling +channelization +channeller +chanoyu +chanson +chansonnier +chant +chantage +chanter +chanterelle +chantership +chanteuse +chantey +chanticleer +chantry +chanty +chaona +chaori +chaos +chaparral +chapatti +chapbook +chape +chapeau +chapel +chaperon +chaperonage +chaperone +chapiter +chaplain +chaplaincy +chaplainry +chaplainship +chaplet +chapman +chapmanship +chappal +chappe +chappie +chaprasi +chapstick +chaptalization +chapter +chapterhouse +chaptrel +chaqueta +chara +charabanc +characin +character +characterisation +characteriser +characteristic +characterization +characterizer +charactery +charade +charades +charango +charas +charcoal +charcuterie +charcutier +chard +charecin +charette +chargeability +chargeableness +charger +chargfaires +charie +chariness +chariot +charioteer +charisma +charitableness +charity +charivari +chark +charkha +charlady +charlatan +charlatanism +charlatanry +charleston +charlie +charlock +charlotte +charm +charmer +charmeuse +charmingness +charnel +charoseth +charpoy +charqui +charr +charrette +charro +chart +charta +charter +charterage +charterer +chartist +chartlet +chartographer +chartography +chartophylacium +chartophylax +chartreuse +chartula +chartulary +charvet +charwoman +chaser +chashitsu +chasing +chasm +chasmogamy +chasmophyte +chass +chassa +chassepot +chasseur +chassis +chastener +chasteness +chastenment +chastisement +chastiser +chastity +chasuble +chat +chateau +chateaubriand +chatelain +chatelaine +chaton +chatoyancy +chattel +chatterbox +chatterer +chattiness +chaudfroid +chauffer +chauffeur +chauffeuse +chaulmoogra +chaunt +chaunter +chaussure +chautauqua +chauvinism +chauvinist +chawer +chay +chayote +chazan +cheapener +cheapness +cheapskate +cheater +chebec +chebeck +chechako +checkback +checkbook +checker +checkerberry +checkerbloom +checkerboard +checkers +checkerspot +checkerwork +checkhook +checkmate +checkoff +checkpoint +checkrail +checkrein +checkroom +checkrow +checksum +checkup +checkweighman +checkwriter +cheddite +cheder +cheechako +cheek +cheekbone +cheekiness +cheekpiece +cheep +cheeper +cheerer +cheerfulness +cheeriness +cheerleader +cheerleading +cheerlessness +cheese +cheeseboard +cheeseburger +cheesecake +cheesecloth +cheesemonger +cheeseparer +cheesewood +cheesiness +cheetah +chef +cheilitis +cheiloplasty +cheilotomy +chela +chelaship +chelate +chelation +chelicera +cheliped +cheloid +chelonian +chem +chemical +chemiculture +chemigrapher +chemigraphy +chemiluminescence +chemise +chemisette +chemism +chemisorption +chemist +chemistry +chemmy +chemokinesis +chemonite +chemopause +chemoprophylaxis +chemoreception +chemoreceptor +chemoreflex +chemosmosis +chemosphere +chemostat +chemosurgery +chemosynthesis +chemotaxis +chemotherapeutics +chemotherapist +chemotherapy +chemotroph +chemotropism +chempaduk +chemurgy +cheneau +chenier +chenille +chenopod +cheongsam +cheque +chequebook +chequer +chequerboard +chequers +cherem +chergui +cherimoya +cherisher +chernozem +cheroot +cherry +cherrystone +chersonese +chert +cherub +cherubfish +chervil +chervonets +cheskey +chess +chessboard +chessel +chessman +chesstree +chest +chesterbed +chesterfield +chestiness +chestnut +chetah +cheteau +cheth +chevalier +chevee +cheveret +chevet +cheville +chevon +chevret +chevrette +chevron +chevronel +chevrotain +chevy +chewer +chewie +chewink +chg +chi +chianti +chiao +chiarooscurist +chiarooscuro +chiaroscuro +chiasm +chiasma +chiasmatypy +chiasmus +chiastolite +chiaus +chibouk +chicalote +chicane +chicaner +chicanery +chicano +chiccory +chicha +chichili +chick +chickabiddy +chickadee +chickaree +chicken +chickenpox +chickpea +chickweed +chicle +chico +chicory +chider +chief +chiefdom +chieftain +chieftaincy +chieftainship +chield +chiffchaff +chiffon +chiffonier +chifforobe +chigetai +chigger +chignon +chigoe +chilblain +child +childbearing +childbed +childbirth +childe +childermas +childhood +childishness +childlessness +childlikeness +childminder +childness +children +chile +chili +chiliad +chiliarch +chiliarchy +chiliasm +chiliast +chilindre +chilipepper +chill +chiller +chilli +chilliness +chillness +chillum +chiloplasty +chilopod +chilotomy +chimaera +chimar +chimb +chime +chimer +chimera +chimere +chimericalness +chimney +chimneypiece +chimneypot +chimp +chimpanzee +china +chinaberry +chinar +chinaware +chinbeak +chincapin +chinch +chincherinchee +chinchilla +chincough +chine +chinfest +chink +chinkapin +chino +chinoidine +chinoiserie +chinoline +chinone +chinook +chinquapin +chintz +chinwag +chionodoxa +chip +chipboard +chipmunk +chipolata +chippendale +chippie +chipping +chippy +chirimoya +chirm +chiro +chirographer +chirography +chirogymnast +chiromancer +chiromancy +chiropodist +chiropody +chiropractic +chiropractor +chiropter +chirper +chirpiness +chirrupper +chiru +chirurgeon +chirurgery +chisel +chiseler +chit +chital +chitarrone +chitchat +chitin +chitling +chiton +chittamwood +chitterling +chiv +chivalrousness +chivalry +chivaree +chive +chlamydospore +chlamys +chloanthite +chloasma +chloracne +chloral +chlorambucil +chloramine +chloramphenicol +chloranil +chlorargyrite +chlorastrolite +chlorate +chlordane +chlordiazepoxide +chlorella +chlorenchyma +chlorguanide +chloride +chlorination +chlorinator +chlorine +chlorinity +chlorite +chloroacetone +chloroacetophenone +chlorobenzene +chlorobromomethane +chlorocarbon +chloroethene +chloroethylene +chloroform +chloroguanide +chlorohydrin +chlorohydroquinone +chloromethane +chloronaphthalene +chlorophaeite +chlorophenol +chlorophenothane +chlorophyll +chloropicrin +chloroplast +chloroprene +chloroquine +chlorosis +chlorospinel +chlorothiazide +chlorotrifluoroethylene +chlorotrifluoromethane +chlorpheniramine +chlorphenol +chlorpicrin +chlorpromazine +chlorpropamide +chlorprophenpyridamine +chlortetracycline +chm +chmn +choanocyte +choanoflagellate +chocho +chock +chockstone +choco +chocolate +choctaw +choice +choiceness +chokeberry +chokebore +chokecherry +chokedamp +choker +chokes +choko +cholecalciferol +cholecyst +cholecystectomy +cholecystitis +cholecystography +cholecystostomy +cholecystotomy +choledochostomy +choledochotomy +cholee +cholelith +cholelithiasis +cholent +choler +cholera +cholericness +cholesteremia +cholesterol +cholesterolemia +choli +choline +cholinesterase +cholla +chololith +chon +chondria +chondriocont +chondriome +chondriomite +chondriosome +chondrite +chondroma +chondrosarcoma +chondrule +chondrus +chooky +choom +choora +chooser +chophouse +chopin +chopine +choplogic +chopper +choppiness +chopstick +choragus +chorale +chord +chordamesoderm +chordate +chordee +chording +chordophone +chore +chorea +choregus +choreman +choreodrama +choreographer +choreography +choriamb +choriambus +chorine +chorioallantois +choriocarcinoma +chorioepithelioma +chorioma +chorion +choriso +chorister +chorizo +chorobates +chorogi +chorographer +chorography +choroiditis +chorology +chorten +chortler +chorus +chorusmaster +chott +chou +chough +choultry +chouser +chow +chowder +chowhound +choy +chremsel +chremzel +chresard +chrestomathy +chrism +chrismatory +chrismon +chrisom +christcross +christener +chroma +chromate +chromaticism +chromaticity +chromaticness +chromatics +chromatid +chromatin +chromatism +chromatist +chromatogram +chromatography +chromatology +chromatolysis +chromatophilia +chromatophore +chrome +chromhidrosis +chromidrosis +chrominance +chromite +chromium +chromo +chromogen +chromolithograph +chromolithographer +chromolithography +chromomere +chromonema +chromophilia +chromophore +chromophotograph +chromophotography +chromoplasm +chromoplast +chromoprotein +chromosome +chromosphere +chromyl +chron +chronaxie +chronicity +chronicle +chronicler +chronobiology +chronogram +chronogrammatist +chronograph +chronographer +chronologist +chronology +chronometer +chronometry +chronon +chronopher +chronoscope +chronoscopy +chrysalid +chrysalis +chrysanthemum +chrysarobin +chrysoberyl +chrysocale +chrysocolla +chrysograph +chrysographer +chrysography +chrysoidine +chrysolite +chrysomelid +chrysophenine +chrysoprase +chrysotile +chs +chub +chubasco +chubbiness +chuckhole +chucklehead +chuckleheadedness +chuckler +chuckwalla +chucky +chuddar +chufa +chuff +chuffiness +chug +chugger +chukar +chukker +chulpa +chum +chumminess +chump +chumping +chumpishness +chung +chunk +chunkiness +chupatti +chuppah +chuprassi +churada +churinga +churl +churlishness +churn +churnability +churner +churning +chute +chutist +chutney +chuttie +chutzpa +chutzpah +chyle +chyme +chymist +chymistry +chymosin +chymotrypsin +chymotrypsinogen +chypre +cianaga +cibarium +ciborium +cicada +cicala +cicatricle +cicatrisation +cicatriser +cicatrix +cicatrization +cicatrizer +cicely +cicero +cicerone +cichlid +cicisbeism +cicisbeo +cider +cierzo +cilia +ciliation +cilice +cilium +cimaise +cimbalom +cimeliarch +cimex +cinch +cinchona +cinchonidine +cinchonine +cinchonisation +cinchonism +cinchonization +cincture +cinder +cine +cineaste +cinema +cinematheque +cinematics +cinematograph +cinematographer +cinematographist +cinematography +cineol +cineole +cineradiography +cineraria +cinerarium +cineration +cinerator +cinerin +cingulectomy +cingulum +cinnabar +cinnamene +cinnamon +cinquain +cinque +cinquecentism +cinquecentist +cinquecento +cinquedea +cinquefoil +cion +cipher +cipherer +cipolin +cippus +cira +circ +circle +circler +circlet +circuit +circuiter +circuitousness +circuitry +circuity +circularisation +circulariser +circularity +circularization +circularizer +circularness +circulation +circulator +circulus +circumambience +circumambiency +circumambulation +circumambulator +circumbendibus +circumcenter +circumference +circumferentor +circumflex +circumfluence +circumfusion +circumgyration +circumincession +circumjacence +circumjacency +circumlocution +circumlocutionist +circumnavigation +circumnavigator +circumnutation +circumradius +circumrotation +circumscriber +circumscription +circumspection +circumspectness +circumstance +circumstantiality +circumstantiation +circumvallation +circumventer +circumvention +circumventor +circumvolution +circus +cirque +cirrhosis +cirri +cirriped +cirripede +cirrocumulus +cirrostratus +cirrus +cirsectomy +cisco +ciseaux +ciseleur +ciselure +cissing +cissoid +cist +cistern +cisterna +cistophorus +cistron +cistus +cistvaen +cit +citadel +citation +citer +cithara +citharist +cither +citification +citizen +citizenry +citizenship +citole +citoyen +citral +citrange +citrate +citriculture +citriculturist +citrin +citrine +citron +citronalis +citronella +citronellal +citronellol +citrulline +citrus +cittern +city +cityscape +civ +civet +civics +civilian +civilisation +civilisedness +civiliser +civility +civilization +civilizedness +civilizer +civilness +civism +civvy +ck +ckw +cl +clabber +clabularium +clachan +clacker +cladding +cladoceran +cladode +cladophyll +cladoptosis +claimant +claimer +claimsman +clairaudience +clairseach +clairseacher +clairvoyance +clam +clambake +clamberer +clamjamfry +clamminess +clamor +clamorer +clamorist +clamorousness +clamour +clamourer +clamourist +clamp +clampdown +clamper +clamshell +clamworm +clan +clandestineness +clandestinity +clanger +clangor +clank +clankingness +clannishness +clansman +clansmanship +clanswoman +clapboard +clapotis +clapper +clapperboard +clapperclawer +claptrap +claque +claqueur +clar +clarabella +clarain +clarence +clarendon +claret +clarificant +clarification +clarifier +clarin +clarinet +clarinetist +clarinettist +clarion +clarity +clarkia +claro +clarsach +clary +clasher +clasp +clasped +clasper +class +classbook +classer +classicality +classicalness +classicism +classicist +classics +classification +classifier +classiness +classis +classmate +classroom +classwork +clatterer +claudication +clause +clausthalite +claustrophilia +claustrophobe +claustrophobia +clausula +clava +clave +clavicembalist +clavicembalo +clavichord +clavichordist +clavicle +clavicorn +clavicylinder +clavicytherium +clavier +clavierist +clavola +clavus +claw +clawer +clay +claybank +clayiness +claymore +claypan +claystone +claytonia +cleaner +cleanhandedness +cleaning +cleanliness +cleanness +cleanout +cleanser +cleanskin +cleanup +clearance +clearcole +clearer +clearheadedness +clearing +clearness +clearstarcher +clearstory +clearway +clearwing +cleat +cleavability +cleavage +cleaver +cleavers +cleek +clef +cleg +cleistocarp +cleistogamy +cleistothecium +clematis +clemency +clementine +cleoid +cleome +clepsydra +cleptobiosis +cleptomania +cleptomaniac +clerestory +clergy +clergyman +cleric +clericalism +clericalist +clericality +clerihew +clerisy +clerk +clerkess +clerkliness +clerkship +cleromancy +cleruch +cleruchy +cleveite +cleverness +clevis +clew +clewgarnet +clianthus +clich +clicha +cliche +click +clicker +client +clientage +clientele +cliff +cliffhanger +clift +climacteric +climate +climatologist +climatology +climax +climber +climbingfish +clime +clinah +clinandrium +clincher +cline +clinger +clingfish +clinginess +clingingness +clingstone +clinic +clinician +clinid +clinker +clinkstone +clinograph +clinometer +clinometry +clinostat +clintonia +clipboard +clipper +clippie +clipping +clipsheet +clique +cliquishness +cliquism +clishmaclaver +clistocarp +clistothecium +clitellum +clivers +clk +cloaca +cloak +cloakroom +clobberer +cloche +clock +clocker +clockmaker +clockmaking +clockwork +clod +cloddiness +cloddishness +clodhopper +clodpoll +clogginess +cloison +cloisonn +cloisonna +cloister +cloke +cloky +clomp +clone +clonicity +clonism +clonus +cloot +clootie +clos +closedown +closefistedness +closeness +closeout +closer +closet +clostridium +closure +clot +cloth +clothesbasket +clotheshorse +clothesline +clothespin +clothespress +clothier +clothing +cloture +clou +cloud +cloudage +cloudberry +cloudburst +cloudiness +cloudland +cloudlessness +cloudlet +cloudscape +clough +clout +clouter +clove +clover +cloverleaf +clowder +clown +clownery +clownishness +cloyedness +cloyingness +club +clubability +clubbability +clubbed +clubber +clubbing +clubfoot +clubhand +clubhouse +clubland +clubman +clubroom +clubroot +clubwoman +cluck +clue +clump +clumsiness +clunk +clupeid +cluster +clutcher +clypeus +clysis +clyster +cm +cml +cnemis +cnida +cnidarian +cnidoblast +cnidocil +cnidocyst +cnidophore +co +coacervate +coacervation +coach +coachability +coachbuilder +coachbuilding +coacher +coachman +coachmanship +coachwhip +coachwood +coachwork +coaction +coactivity +coactor +coadjutor +coadjutrix +coadunation +coagulability +coagulant +coagulase +coagulation +coagulin +coagulum +coak +coal +coalbin +coaler +coalescence +coalface +coalfield +coalfish +coalition +coalitioner +coalitionist +coaming +coaptation +coarctation +coarseness +coarticulation +coast +coaster +coastguard +coastguardsman +coastland +coastline +coat +coatdress +coatee +coati +coating +coatrack +coatroom +coauthor +coaxer +cob +cobalt +cobaltammine +cobaltite +cobb +cobber +cobble +cobbler +cobblestone +cobbra +cobelligerent +cobia +coble +cobnut +cobra +coburg +cobweb +coca +cocaine +cocainisation +cocainism +cocainization +cocci +coccid +coccidioidomycosis +coccidiosis +coccobacillus +coccolith +coccus +coccyx +coch +cochairman +cochin +cochineal +cochlea +cockade +cockalorum +cockateel +cockatiel +cockatoo +cockatrice +cockboat +cockchafer +cockcrow +cocker +cockerel +cockeye +cockfight +cockfighting +cockhorse +cockiness +cockishness +cockle +cockleboat +cocklebur +cockleshell +cockloft +cockney +cockneydom +cockneyfication +cockneyism +cockpit +cockroach +cockscomb +cocksfoot +cockshead +cockshut +cockshy +cockspur +cocksureness +cockswain +cocktail +cockup +coco +cocoa +cocobolo +cocomat +coconsciousness +coconut +cocoon +cocopan +cocotte +cocoyam +cocozelle +cod +coda +codder +coddler +code +codeclination +codefendant +codeine +coder +codetta +codex +codfish +codger +codices +codicil +codicology +codification +codifier +coding +codline +codling +codomain +codon +codpiece +codswallop +coed +coeditor +coeditorship +coeducation +coeducationalism +coefficient +coehorn +coelacanth +coelenterate +coelenteron +coelom +coeloscope +coelostat +coemption +coenacle +coenaculum +coenesthesia +coenobite +coenobitism +coenocyte +coenosarc +coenurus +coenzyme +coequality +coequalness +coercer +coercion +coercionist +coerciveness +coercivity +coesite +coessentiality +coessentialness +coetaneity +coetaneousness +coeternity +coevality +coexecutor +coexecutrix +coexistence +coexistency +coextension +cofactor +coffee +coffeeberry +coffeecake +coffeehouse +coffeepot +coffeeweed +coffer +cofferdam +coffin +coffinite +coffle +coffret +cofunction +cog +cogency +cogitability +cogitation +cogitativeness +cogitator +cognac +cognateness +cognation +cognisability +cognisableness +cognisance +cogniser +cognition +cognizability +cognizableness +cognizance +cognizer +cognomen +cognoscibility +cognovit +cogon +cogwheel +cohabitant +cohabitation +cohabiter +coheir +coheirship +cohenite +coherence +coherer +cohesion +cohesiveness +coho +cohobation +cohobator +cohort +cohosh +cohune +coif +coiffeur +coiffure +coign +coigne +coin +coinage +coincidence +coiner +coinheritance +coinsurance +coinsurer +cointise +coir +coistrel +coit +coition +coitus +coke +coker +cokernut +cokuloris +col +cola +colacobiosis +colander +colascione +colat +colatitude +colcannon +colchicine +colchicum +colcothar +coldness +coldslaw +cole +colectomy +colemanite +colent +coleopteran +coleopteron +coleoptile +coleorhiza +coleseed +coleslaw +coleus +colewort +coley +colic +colichemarde +colicroot +colicweed +colin +coliseum +colitis +coll +colla +collab +collaboration +collaborationism +collaborationist +collaborator +collada +collage +collagen +collagenase +collagist +collapsability +collapsar +collapsibility +collar +collarbone +collard +collaret +collarette +collarino +collat +collateral +collaterality +collateralness +collation +collator +colleague +colleagueship +collectability +collectedness +collectibility +collection +collectivism +collectivist +collectivity +collectivization +collector +collectorate +collectorship +colleen +college +colleger +collegian +collegiateness +collegium +collembolan +collenchyma +collet +collie +collier +colliery +collieshangie +colligation +collimation +collimator +collinearity +collins +collinsia +collision +colloblast +collocation +collocutor +collodion +colloid +colloidality +collop +collophane +collophore +colloq +colloquialism +colloquialist +colloquialness +colloquist +colloquium +colloquy +collotype +collotypy +colluder +collun +collunarium +collusion +collusiveness +collut +collutorium +collutory +colluvium +colly +collyr +collyrium +colob +colobus +colocynth +colog +cologarithm +cologne +colomb +colombier +colon +colonate +colonel +colonelcy +colonette +colonialism +colonialist +colonialization +colonisability +colonisation +colonisationist +coloniser +colonist +colonitis +colonizability +colonization +colonizationist +colonizer +colonnade +colonus +colony +colophon +colophony +coloquintida +color +colorability +colorableness +coloradoite +colorant +coloration +coloratura +colorbearer +colorcast +colorer +colorfastness +colorfulness +colorimeter +colorimetrist +coloring +colorist +colorlessness +colorman +colossality +colosseum +colossus +colostomy +colostrum +colotomy +colour +colourability +colourableness +colouration +colourer +colourfulness +colouring +colourist +colourlessness +colpitis +colportage +colporteur +colpotomy +colt +colter +coltishness +coltsfoot +colubrid +colugo +columbarium +columbary +columbate +columbeion +columbier +columbine +columbite +columbium +columella +column +columnarity +columniation +columnist +colure +coly +colza +com +coma +comaker +comal +comandante +comatoseness +comatosity +comatulid +comb +combat +combatant +combater +combativeness +combativity +combatter +combe +comber +combfish +combinableness +combination +combinedness +combiner +comblessness +combo +combustibility +combustibleness +combustion +combustor +comdg +comeback +comedian +comedienne +comedietta +comedist +comedo +comedown +comedy +comeliness +comer +comes +comestible +comet +comeuppance +comfiness +comfit +comfort +comfortableness +comforter +comfortlessness +comfrey +comicality +comicalness +comitia +comity +comm +comma +commandant +commander +commandership +commandery +commandingness +commandment +commando +commemoration +commemorativeness +commencement +commencer +commendableness +commendam +commendation +commender +commensalism +commensality +commensurability +commensurableness +commensurateness +commensuration +comment +commentary +commentator +commenter +commerce +commercialisation +commercialism +commercialist +commercialization +commie +commination +comminator +commingler +comminution +commis +commiseration +commiserator +commissar +commissariat +commissary +commission +commissionaire +commissioner +commissionership +commissure +commissurotomy +commitment +committal +committee +committeeism +committeeman +committeeship +committeewoman +committer +commixture +commo +commode +commodiousness +commodity +commodore +commonage +commonality +commonalty +commoner +commonness +commonplaceness +commons +commonweal +commonwealth +commorancy +commotion +communalisation +communaliser +communalism +communalist +communality +communalization +communalizer +communard +communer +communicability +communicableness +communicant +communication +communicativeness +communicator +communion +communionist +communiqu +communiqua +communis +communisation +communism +communist +communitarian +community +communization +commutability +commutableness +commutation +commutator +commuter +commutuality +commy +comp +compactedness +compactification +compaction +compactness +compadre +compagnie +compander +companion +companionability +companionableness +companionship +companionway +company +compar +comparability +comparableness +comparatist +comparativeness +comparator +comparer +comparison +comparsa +compartimento +compartment +compartmentalization +compartmentation +compass +compassion +compassionateness +compaternity +compathy +compatibility +compatibleness +compatriot +compatriotism +compauero +compauia +compeer +compellation +compeller +compelling +compendiousness +compendium +compensation +compensator +compere +competence +competency +competer +competition +competitiveness +competitor +competitorship +compilation +compiler +complacency +complainant +complainer +complainingness +complaint +complaisance +complanation +complection +complement +complementariness +complementation +complementer +complementizer +completedness +completeness +completer +completion +complexion +complexity +complexness +compliableness +compliance +compliancy +complicacy +complicatedness +complication +complice +complicity +complier +compliment +complimentariness +complimenter +complin +compline +complot +complotment +complotter +compluvium +compo +component +comportance +comportment +composedness +composer +compositeness +composition +compositor +compossibility +compost +composure +compotation +compotator +compote +compotier +compound +compoundedness +compounder +comprador +comprecation +comprehender +comprehensibility +comprehensibleness +comprehension +comprehensiveness +compressibility +compression +compressor +comprisal +comprizal +compromis +compromise +compromiser +comptroller +comptrollership +compulsion +compulsiveness +compulsoriness +compunction +compurgation +compurgator +computability +computation +computer +computerization +computist +comrade +comradery +comradeship +comsat +comstockery +comte +comtesse +con +conation +conatus +conc +concatenation +concatenator +concaveness +concavity +concealedness +concealer +concealment +conceder +conceit +conceitedness +conceivability +conceivableness +conceiver +concelebration +concent +concentration +concentrativeness +concentrator +concentricity +concept +conceptacle +conception +conceptualisation +conceptualism +conceptualist +conceptuality +conceptualization +concernedness +concerningness +concernment +concert +concertgoer +concertina +concertinist +concertino +concertiser +concertizer +concertmaster +concerto +concession +concessionaire +conch +concha +conchfish +conchie +conchiolin +conchoid +conchologist +conchology +conchy +concierge +conciliation +conciliator +conciliatoriness +concinnity +conciseness +concision +conclave +conclavist +concluder +conclusion +conclusiveness +concocter +concoction +concoctor +concomitance +concord +concordance +concordat +concorporation +concourse +concrescence +concrete +concreteness +concretion +concretization +concubinage +concubine +concupiscence +concurrence +concussion +cond +condemnation +condemner +condensability +condensary +condensate +condensation +condensedness +condenser +condensery +condescendence +condescendent +condescender +condescension +condignity +condiment +condisciple +condition +conditionality +conditioner +conditioning +conditivium +conditorium +condolence +condoler +condom +condominium +condonation +condoner +condor +condottiere +conduceability +conducer +conducibleness +conduciveness +conduct +conductance +conductibility +conduction +conductivity +conductor +conductorship +conduit +conduplication +condylarth +condyle +condyloma +cone +coneflower +conenose +coney +conf +confab +confabulation +confabulator +confarreation +confection +confectionary +confectioner +confectionery +confederacy +confederalist +confederate +confederation +confederationism +confederationist +conferee +conference +conferment +conferral +conferrer +conferva +confessant +confession +confessionalism +confessor +confetti +confidant +confidante +confidence +confidente +confidentiality +confidentialness +confider +configuration +configurationism +configurationist +confinedness +confinement +confiner +confirmand +confirmation +confirmedness +confirmer +confirmor +confiscation +confiscator +confiture +conflagration +conflation +conflict +confliction +confluence +conformability +conformableness +conformance +conformation +conformer +conformism +conformist +conformity +confoundedness +confounder +confr +confraternity +confrere +confricamentum +confrontation +confronter +confrontment +confusability +confusedness +confusion +confutation +confuter +cong +conga +congealability +congealableness +congealedness +congealer +congealment +congee +congelation +congelifract +congelifraction +congeliturbation +congener +congeniality +congenialness +congenitalness +conger +congeries +congestion +congius +conglobation +conglomerate +conglomeration +conglutination +congo +congou +congratulation +congratulator +congregant +congregation +congregationalism +congregationalist +congregativeness +congregator +congress +congressionalist +congressman +congresswoman +congruence +congruency +congruity +congruousness +conicalness +conicity +conicoid +conics +conidiophore +conidium +conifer +coniferin +coniine +coniology +coniroster +conium +conjecture +conjecturer +conjoiner +conjointness +conjugality +conjugant +conjugation +conjugator +conjunction +conjunctiva +conjunctivitis +conjuncture +conjuration +conjurator +conjurer +conjuring +conker +conkers +connateness +connation +connaturalness +connectedness +connection +connectionism +connectivity +connector +connexion +conniption +connivance +conniver +connoisseur +connoisseurship +connotation +connubiality +conodont +conoid +conoscope +conquerableness +conqueror +conquest +conquian +conquistador +consanguinity +conscience +consciencelessness +conscientiousness +conscionableness +consciousness +conscript +conscription +conscriptionist +consecratedness +consecrater +consecration +consecrator +consecution +consecutiveness +consensus +consentaneity +consentaneousness +consenter +consentience +consequence +consequentiality +consequentialness +conservancy +conservation +conservationist +conservatism +conservativeness +conservatoire +conservator +conservatorium +conservatory +conserver +considerance +considerateness +consideration +considerer +consignation +consignee +consignment +consignor +consistency +consistory +consociation +consocies +consol +consolation +consoler +consolette +consolidation +consolidator +consolitoriness +consomm +consomma +consonance +consonant +consonantism +consorter +consortion +consortium +conspectus +consperg +conspicuity +conspicuousness +conspiracy +conspirator +constable +constableship +constabulary +constancy +constantan +constatation +constellation +consternation +constipation +constituency +constituter +constitution +constitutionalism +constitutionalist +constitutionality +constitutor +constr +constrainer +constraint +constriction +constrictor +constringency +construability +constructer +construction +constructionism +constructionist +constructiveness +constructivism +constructor +construer +consubstantialism +consubstantialist +consubstantiality +consubstantiation +consuetude +consul +consulate +consulship +consultant +consultation +consulter +consumer +consumerism +consumingness +consummation +consummator +consumption +consumptiveness +cont +conta +contact +contactant +contactor +contagion +contagiosity +contagiousness +contagium +container +containerboard +containerization +containment +contakion +contam +contaminant +contamination +contaminator +contango +contd +conte +contemner +contemp +contemplation +contemplativeness +contemplator +contemporaneity +contemporaneousness +contemporariness +contempt +contemptibility +contemptibleness +contemptuousness +content +contentedness +contention +contentiousness +contentment +contentness +conterminousness +contest +contestableness +contestant +contestation +contester +context +contexture +contg +contiguity +contiguousness +continence +continent +continentalism +continentalist +continentality +contingence +contingency +continuality +continualness +continuance +continuant +continuateness +continuation +continuativeness +continuator +continuedness +continuer +continuity +continuo +continuousness +continuum +conto +contoise +contortedness +contortion +contortionist +contour +contr +contraband +contrabandism +contrabandist +contrabass +contrabassist +contrabassoon +contrabassoonist +contractedness +contractibility +contractibleness +contractility +contraction +contractiveness +contractor +contracture +contradance +contradicter +contradiction +contradictiousness +contradictiveness +contradictor +contradictoriness +contradistinction +contrail +contraindicant +contraindication +contralto +contraoctave +contraplete +contraposition +contrapposto +contraprop +contraption +contrapuntist +contrariety +contrariness +contrariousness +contraste +contravallation +contravener +contravention +contrayerva +contrecoup +contredanse +contretemps +contrib +contribution +contributiveness +contributor +contriteness +contrition +contrivance +contriver +controllability +controllableness +controller +controllership +controversialism +controversialist +controversy +controverter +controvertist +contumaciousness +contumacity +contumacy +contumeliousness +contumely +contusion +conundrum +conurbation +conure +convalescence +convection +convector +convenance +convener +convenience +conveniency +convent +conventicle +conventicler +convention +conventionalisation +conventionalism +conventionalist +conventionality +conventionalization +conventioneer +conventioner +convergence +conversableness +conversance +conversancy +conversation +conversationalist +conversazione +converser +conversion +conversus +converter +convertibility +convertibleness +convertin +convertiplane +convertite +convexedness +convexity +conveyance +conveyancer +conveyancing +conveyor +conveyorization +conveyorizer +convictfish +conviction +convincedness +convincer +convincibility +convincingness +convive +convivialist +conviviality +convocant +convocation +convocator +convoker +convolutedness +convolution +convolvement +convolvulus +convoy +convulsibility +convulsion +convulsiveness +cony +cooboo +cooch +cooer +cooey +coof +cook +cookbook +cooker +cookery +cookhouse +cookie +cooking +cookout +cookshop +cookstove +cookware +cooky +coolabah +coolamon +coolant +cooler +coolie +coolingness +coolness +coolth +cooly +coom +coomb +cooncan +cooner +coonhound +coonskin +coontie +coop +cooper +cooperage +cooperation +cooperationist +cooperativeness +cooperator +cooperite +coopery +cooption +coordinateness +coordination +coordinator +coot +cootch +cooter +cootie +cooty +cop +copaiba +copal +copalite +copalm +coparcenary +coparcener +copartner +copartnership +copeck +copemate +copepod +coper +copesmate +copestone +copier +copilot +coping +copiosity +copiousness +copita +coplanarity +copolymer +copolymerization +copper +copperah +copperas +copperhead +copperplate +coppersmith +coppice +copping +copra +coprecipitation +copremia +coprolagnist +coprolalia +coprolite +coprology +coprosma +coprosterol +copse +copter +copula +copulation +copy +copybook +copyboy +copycat +copycutter +copyfitter +copyfitting +copygraph +copyhold +copyholder +copyist +copyreader +copyright +copyrighter +copywriter +copywriting +coquelicot +coquetry +coquette +coquettishness +coquillage +coquille +coquina +coquito +coracle +coracoid +coraji +coral +coralberry +corallita +corallite +coralroot +coranto +corban +corbeil +corbeille +corbel +corbeling +corbelling +corbicula +corbie +corbiestep +corbina +corby +cord +cordage +cordelle +corder +cordiality +cordialness +cordierite +cordillera +cording +cordite +cordoba +cordon +cordonazo +cordovan +corduroy +cordwain +cordwainer +cordwainery +cordwood +core +corelation +coreligionist +corella +coremaker +coremium +coreopsis +corer +corespondent +corf +corgi +coriander +coring +corita +corium +cork +corkage +corkboard +corker +corkiness +corkscrew +corkwood +corm +cormel +cormophyte +cormorant +corn +cornball +corncob +corncockle +corncrake +corncrib +cornea +cornel +cornelian +cornemuse +corner +cornerstone +cornet +cornetcy +cornetfish +cornetist +cornett +cornetto +cornfield +cornflag +cornflour +cornflower +cornhusk +cornhusker +cornhusking +cornice +corniche +cornicle +cornstalk +cornstarch +cornstone +cornu +cornucopia +cornuto +corody +coroll +corolla +corollary +coromell +corona +coronach +coronagraph +coronal +coronation +coronel +coroner +coronership +coronet +coronitis +coronograph +coroplast +corozo +corp +corpl +corpn +corpora +corporalcy +corporality +corporalship +corporateness +corporation +corporatism +corporator +corporeality +corporealness +corporeity +corposant +corps +corpse +corpsman +corpulence +corpus +corpuscle +corpuscularity +corr +corral +corrasion +correctedness +correction +correctitude +correctness +corrector +corregidor +corregimiento +correl +correlation +correlativeness +correlativity +corrente +corresp +correspondence +correspondency +correspondent +corrida +corridor +corrie +corrigendum +corrigibility +corrigibleness +corrival +corrivalry +corrobboree +corroboration +corroborator +corroboree +corrodant +corroder +corrodibility +corrody +corrosion +corrosiveness +corrosivity +corrugation +corrugator +corruptedness +corrupter +corruptibility +corruptibleness +corruption +corruptionist +corruptness +corruptor +corsac +corsage +corsair +corse +corselet +corset +corsetior +corsetry +corslet +cort +cortage +cortege +cortex +cortication +corticosteroid +corticosterone +corticotrophin +cortin +cortisol +cortisone +corundum +coruscation +corv +corvae +corves +corvette +corvina +corvo +corydalis +corymb +corynebacterium +coryph +coryphae +coryphaeus +coryza +cos +cosec +cosecant +coset +cosh +cosignatory +cosine +cosiness +cosmetic +cosmetician +cosmetologist +cosmetology +cosmicality +cosmine +cosmism +cosmist +cosmochemistry +cosmodrome +cosmogonist +cosmogony +cosmographer +cosmographist +cosmography +cosmoline +cosmologist +cosmology +cosmonaut +cosmonautics +cosmopolis +cosmopolitan +cosmopolitanisation +cosmopolitanism +cosmopolitanization +cosmopolite +cosmopolitism +cosmorama +cosmos +coss +cossie +cost +costa +costard +costectomy +coster +costermonger +costiveness +costlessness +costliness +costmary +costotome +costotomy +costrel +costume +costumer +costumier +costusroot +cosuretyship +cot +cotangent +cote +coteau +cotehardie +cotenancy +cotenant +cotenure +coterie +coth +cothamore +cothurnus +cotice +cotillion +cotillon +cotinga +cotise +cotoneaster +cotquean +cotta +cottage +cottager +cottar +cotte +cotter +cottier +cotton +cottonade +cottonmouth +cottonseed +cottontail +cottonweed +cottonwick +cottonwood +cotula +cotwal +cotyledon +cotype +coucal +couch +coucher +couchette +couching +cougar +cougher +coulae +coulee +coulibiaca +coulisse +couloir +coulomb +coulometer +coulter +coumarin +coumarone +council +councillor +councillorship +councilman +councilor +councilorship +councilwoman +counsel +counsellor +counsellorship +counselor +counselorship +countableness +countdown +countenance +countenancer +counter +counteraccusation +counteracter +counteraction +counteractor +counterargument +counterattack +counterattraction +counterbalance +counterblast +counterblow +counterbore +counterborer +counterbrace +counterbracing +counterbrand +countercharge +countercheck +counterclaim +counterclaimant +counterculture +countercurrent +counterdeclaration +counterdemonstration +counterearth +counterespionage +counterfact +counterfeiter +counterfeitness +counterflashing +counterfoil +counterforce +counterfort +counterglow +counterinsurgency +counterinsurgent +counterintelligence +counterirritant +counterjumper +counterman +countermanifesto +countermark +countermeasure +countermine +countermove +countermovement +counteroffensive +counteroffer +counterpane +counterpart +counterplot +counterpoint +counterpoise +counterpoison +counterpotent +counterpressure +counterproof +counterpropaganda +counterproposal +counterproposition +counterreformation +counterreply +counterrevolution +counterrevolutionary +counterscarp +countershading +countershaft +countershafting +countersignature +counterspy +counterstain +counterstamp +counterstatement +counterstroke +countersubject +countertendency +countertenor +counterthrust +countertransference +counterturn +countertype +countervair +counterview +counterweight +counterword +counterwork +countess +countrifiedness +country +countryfiedness +countryfolk +countryman +countrypeople +countryseat +countryside +countrywoman +countship +county +coup +coupa +coupe +couperationist +couperativeness +couperator +couple +couplement +coupler +couplet +coupling +coupon +couption +courage +courageousness +courante +courdinateness +courdinator +courgette +courier +courlan +course +courser +coursing +court +courteousness +courtesan +courtesy +courthouse +courtier +courtliness +courtroom +courtship +courtyard +couscous +cousin +cousinage +cousinhood +cousinry +cousinship +couteau +couter +couthiness +coutil +couture +couturiare +couturier +couvade +covalence +covalency +covariance +cove +covellite +coven +covenant +covenantee +covenanter +covenantor +coverage +coverall +coverer +covering +coverlet +covers +covertness +coverture +coveter +covetousness +covey +covin +cow +cowage +coward +cowardic +cowardice +cowardliness +cowbane +cowbell +cowberry +cowbind +cowbird +cowboy +cowcatcher +cowfish +cowgirl +cowhage +cowherb +cowherd +cowhide +cowitch +cowl +cowlick +cowling +cowlstaff +cowman +cowpat +cowpea +cowpoke +cowpox +cowpuncher +cowrie +cowry +cowshed +cowskin +cowslip +cowtail +cox +coxa +coxalgia +coxcomb +coxcombry +coxswain +coyishness +coyness +coyote +coyotillo +coypu +coz +cozenage +cozener +coziness +cp +cpd +cpl +cpm +cpo +cps +cpt +cr +craal +crab +crabbedness +crabber +crabbing +crabeater +crabeating +crabstick +crabwood +crache +crackajack +crackbrain +crackbrainedness +crackdown +crackedness +cracker +crackerberry +cracket +crackleware +crackling +cracknel +crackpot +cracksman +cracky +cracovienne +cradle +cradler +cradlesong +cradling +craft +craftiness +craftsman +craftsmanship +craftwork +craftworker +crag +craggedness +cragginess +cragsman +crake +crakow +crambo +crame +cramel +crammer +cramp +crampedness +cramper +crampfish +crampon +cran +cranage +cranberry +crancelin +crandall +crane +craneman +cranemanship +cranesbill +craniol +craniologist +craniology +craniom +craniometer +craniometrist +craniometry +craniophore +cranioscopist +cranioscopy +craniotome +craniotomy +cranium +crank +crankcase +crankiness +crankle +crankness +crankpin +crankplate +crankshaft +crannog +cranny +cranreuch +crapaud +crape +crapehanger +craps +craquelure +crare +crasher +crasis +crassitude +crassness +cratch +crate +crater +craton +cravat +cravenness +craver +craving +cravingness +craw +crawfish +crawler +cray +crayer +crayfish +crayon +crayonist +craze +crazedness +craziness +crazyweed +crcao +creakiness +cream +creamcups +creamer +creamery +creaminess +creamware +creance +crease +createdness +creatine +creatinine +creation +creationism +creationist +creativeness +creativity +creator +creatorship +creature +creatureliness +creche +credence +credendum +credential +credenza +credibility +credibleness +credit +creditability +creditableness +creditor +creditorship +credo +credulity +credulousness +cree +creed +creedlessness +creek +creel +creeper +creepie +creepiness +creese +creesh +cremaster +cremation +cremationism +cremationist +cremator +crematorium +crenation +crenature +crenel +crenelation +crenelet +crenelle +crenulation +creodont +creole +creolization +creosol +creosote +crepe +crepehanger +crepidoma +crepis +crepitation +crepitus +crepon +crepuscle +crepuscule +cres +crescendo +crescent +cresol +cress +cresset +crest +crestfallenness +crestfish +cresting +cretic +cretin +cretinism +cretonne +crevasse +crevice +crew +crewel +crewelist +crewelwork +crewman +crewmanship +crib +cribbage +cribber +cribbing +cribbiter +cribellum +cribwork +crick +cricket +cricketer +crier +crim +crime +crimelessness +criminal +criminalist +criminalistics +criminality +crimination +criminator +criminologist +criminology +crimmer +crimper +crimpness +crimson +crimsonness +crine +crinet +cringer +cringingness +cringle +crinkleroot +crinoid +crinoline +crinosity +crinum +criolla +criollo +criosphinx +cripple +crippler +crisis +crispation +crispbread +crisper +crispiness +crispness +crissum +crista +cristobalite +crit +criterion +critic +criticalness +criticaster +criticasterism +criticastry +criticiser +criticism +criticizer +critique +critter +crivetz +crl +croaker +croakiness +crocein +crocheter +crocidolite +crock +crockery +crocket +crocking +crocodile +crocodilian +crocoite +crocus +croft +crofter +croisette +croissant +crojack +crombec +cromlech +cromorne +crone +crony +cronyism +crook +crookback +crookedness +crookesite +crookneck +crooner +crop +cropland +cropper +croppie +croquet +croquette +croquignole +crore +crosette +crosier +cross +crossability +crossband +crossbanding +crossbar +crossbeam +crossbencher +crossbill +crossbirth +crossbow +crossbowman +crosscurrent +crosscut +crosscutter +crosse +crossette +crossfire +crossgrainedness +crosshatcher +crosshead +crossing +crossjack +crosslap +crosslet +crosslight +crossline +crossness +crossopterygian +crossover +crosspatch +crosspiece +crossrail +crossroad +crossroads +crossrow +crossruff +crosstail +crosstalk +crosstie +crosstree +crosswalk +crossway +crosswind +crosswort +crotalaria +crotalin +crotch +crotchet +crotchetiness +crotchwood +croton +croucher +croup +croupade +croupier +croupiness +croute +crouton +crow +crowbar +crowberry +crowboot +crowd +crowdedness +crowdy +crower +crowfoot +crowhop +crowhopper +crowkeeper +crown +crowner +crownet +crownland +crownpiece +crownwork +crowstep +croze +crozier +crs +cru +cruces +cruciality +crucian +crucible +crucifer +crucifier +crucifix +crucifixion +cruciformity +cruck +crud +crudeness +crudity +cruelness +cruelty +cruet +cruiser +cruiserweight +cruiseway +cruller +crum +crumb +crumber +crumbliness +crumblingness +crumbum +crumhorn +crummie +crumpet +crunchiness +crunchingness +crunode +cruor +crupper +crura +crus +crusade +crusader +crusado +cruse +crushability +crusher +crust +crustacean +crustiness +crutch +crux +cruzado +cruzeiro +crwth +crybaby +crymotherapy +cryobiology +cryogen +cryogenics +cryohydrate +cryolite +cryology +cryometer +cryometry +cryonics +cryophyte +cryoscope +cryoscopy +cryostat +cryosurgery +cryotherapy +cryotron +crypt +cryptaesthesia +cryptanalysis +cryptanalyst +cryptanalytics +cryptoanalysis +cryptoanalyst +cryptoclimate +cryptoclimatology +cryptococcosis +cryptogam +cryptogamist +cryptogamy +cryptogram +cryptogrammatist +cryptograph +cryptographer +cryptographist +cryptography +cryptolith +cryptologist +cryptology +cryptomeria +cryptometer +cryptonym +cryptophyte +cryptoporticus +cryptorchidism +cryptovolcanism +cryptozoite +cryptozygy +cryst +crystal +crystall +crystallinity +crystallisability +crystallisation +crystallite +crystallizability +crystallization +crystallographer +crystallography +crzette +cs +csc +csch +csk +ct +ctenidium +ctenizid +ctenophoran +ctenophore +ctg +ctimo +ctn +ctr +cts +cu +cuadrilla +cuamuchil +cub +cubage +cubane +cubature +cubbing +cubbishness +cubby +cubbyhole +cubbyu +cube +cubeb +cuber +cubicalness +cubicity +cubicle +cubiculum +cubism +cubist +cubit +cubitiere +cubitus +cubmaster +cuckold +cuckoldry +cuckoo +cuckooed +cuckooflower +cuckooing +cuckoopint +cucumber +cucurbit +cud +cuda +cudbear +cuddy +cudgel +cudgeler +cudgeller +cudgerie +cudweed +cue +cueca +cueist +cuesta +cuff +cuiajo +cuif +cuirass +cuirassier +cuirie +cuisine +cuisse +cuj +culch +culet +culex +culicid +culinarian +cullender +culler +cullet +cullion +cullis +cully +culm +culmination +culpa +culpability +culpableness +culprit +cult +cultch +cultellus +cultigen +cultism +cultist +cultivability +cultivar +cultivation +cultivator +culture +culturist +cultus +culver +culverin +culvert +cumarin +cumarone +cumberer +cumberment +cumbersomeness +cumbrance +cumbrousness +cumin +cummer +cummerbund +cummingtonite +cumquat +cumshaw +cumulation +cumulativeness +cumulet +cumulonimbus +cumulostratus +cumulus +cunctation +cunctator +cunctatorship +cuneiformist +cuneus +cuniculus +cunjevoi +cunner +cunningness +cup +cupbearer +cupboard +cupcake +cupel +cupeler +cupellation +cupful +cupholder +cupidity +cupola +cuppa +cupper +cupping +cuprammonium +cuprite +cupronickel +cuprum +cupule +cur +cura +curability +curableness +curacy +curage +curagh +curare +curarine +curarization +curassow +curate +curateship +curativeness +curator +curatorship +curatrix +curb +curbing +curbstone +curch +curculio +curcuma +curd +curdiness +curdler +curer +curet +curettage +curette +curf +curfew +curia +curie +curio +curiosa +curiosity +curiousness +curium +curledness +curler +curlew +curlicue +curliness +curling +curlpaper +curlycue +curlyhead +curmudgeon +curn +currach +currajong +currant +currantworm +currawong +currency +currentness +curricle +curriculum +currie +currier +curriery +currijong +currishness +curry +currycomb +curse +cursedness +curser +cursiveness +cursor +cursoriness +curstness +curtailer +curtailment +curtain +curtains +curtalax +curtana +curtesy +curtilage +curtness +curtsey +curtsy +curvature +curve +curved +curvedness +curvet +curvette +curvilinearity +curving +cuscus +cusec +cushat +cushaw +cushion +cusk +cusp +cuspid +cuspidation +cuspidor +cuss +cussedness +cusso +cussword +custard +custodes +custodian +custodianship +custody +custom +customableness +customariness +customer +customs +custos +custumal +cutaway +cutback +cutbank +cutch +cutcherry +cutchery +cutdown +cuteness +cutey +cuticle +cuticula +cutie +cutin +cutinisation +cutinization +cutis +cutlass +cutlassfish +cutler +cutlery +cutlet +cutline +cutoff +cutout +cutpurse +cuttage +cutter +cutthroat +cutting +cuttingness +cuttle +cuttlebone +cuttlefish +cuttyhunk +cutup +cutwater +cutwork +cutworm +cuvae +cuvette +cwm +cwo +cwt +cy +cyan +cyanamide +cyanate +cyanide +cyanine +cyanite +cyanochroia +cyanocobalamin +cyanoderma +cyanogen +cyanogenamide +cyanoguanidine +cyanohydrin +cyanometer +cyanopathy +cyanoplatinite +cyanosis +cyanotype +cyathium +cyathus +cybernetician +cyberneticist +cybernetics +cyc +cycad +cyclamate +cyclamen +cyclas +cycle +cyclecar +cyclicity +cycling +cyclist +cyclization +cyclo +cycloacetylene +cycloalkane +cyclocephaly +cyclogenesis +cyclograph +cyclohexane +cyclohexatriene +cyclolysis +cyclometer +cyclone +cyclonite +cycloolefin +cyclopaedist +cycloparaffin +cyclopedia +cyclopedist +cyclopentadiene +cyclopentane +cyclopia +cycloplegia +cyclopropane +cyclorama +cyclosilicate +cyclosis +cyclostome +cyclostyle +cyclothymia +cyclothymiac +cyclotome +cyclotomy +cyclotrimethylenetrinitramine +cyclotron +cyder +cyesis +cygnet +cyke +cyl +cylinder +cylindricality +cylindricalness +cylindrite +cylindroid +cylindroma +cylix +cyma +cymaise +cymar +cymation +cymatium +cymbal +cymbaleer +cymbaler +cymbalist +cymbalo +cymbalom +cymbocephaly +cyme +cymene +cymogene +cymograph +cymometer +cymophane +cymotrichy +cynghanedd +cynic +cynicalness +cynicism +cynosure +cyphella +cypher +cypress +cyprinid +cyprinodont +cypripedium +cyprus +cypsela +cyrtosis +cyrtostyle +cyst +cystectomy +cysteine +cysticercoid +cysticercus +cystidium +cystine +cystitis +cystocarp +cystocele +cystolith +cystoma +cystometer +cystoscope +cystoscopy +cystostomy +cystotome +cystotomy +cytaster +cytidine +cytoarchitecture +cytochemistry +cytochrome +cytoclasis +cytogenesis +cytogeneticist +cytogenetics +cytokinesis +cytologist +cytology +cytolysin +cytolysis +cyton +cytopathology +cytopenia +cytophagy +cytopharynx +cytoplasm +cytoplast +cytosine +cytosome +cytost +cytostome +cytotaxis +cytotaxonomy +cytotoxin +cytotrophoblast +cytotropism +cytozoon +czar +czardas +czardom +czarevitch +czarevna +czarina +czarism +czaritza +d +da +dabber +dabbler +dabchick +daboota +daboucha +dabster +dace +dacha +dachshund +dacoit +dacoity +dacolletage +dacor +dacryon +dacryorrhea +dactyl +dactylogram +dactylographer +dactylography +dactylology +dactylomegaly +dad +daddy +dado +daemon +daemonian +daemonology +daff +daffadilly +daffadowndilly +daffing +daffodil +daffodilly +daffodowndilly +daftness +dagga +dagger +daggerboard +daglock +dago +dagoba +daguerreotype +daguerreotyper +daguerreotypist +daguerreotypy +dah +dahabeah +dahlia +dahoon +dailiness +daimon +daimyo +daintiness +daiquiri +dairy +dairying +dairymaid +dairyman +dairywoman +dais +daisy +daisycutter +dajeuner +dak +dakhma +dakoit +dakoity +dal +dalan +dalasi +dale +dalesman +daleth +dallan +dalliance +dallier +dalmatic +dalton +daltonism +dam +damage +damageability +damageableness +damager +daman +damar +damarche +damask +damaskeening +dame +damenti +damfool +damiana +dammar +damner +damningness +damoiselle +dampcourse +dampener +damper +dampishness +dampness +damsel +damselfish +damselfly +damson +damyankee +dan +danaite +danburite +danceability +dancer +dancette +dandelion +dander +dandification +dandiprat +dandler +dandruff +dandy +dandyism +danewort +danger +dangerousness +dangleberry +dangler +danio +dankness +danny +dansant +danseur +danseuse +dapartement +daphne +daphnia +dapperness +daraf +darby +dard +daredevil +daredeviltry +darer +darg +dargah +daric +daringness +dariole +darkener +darkishness +darkness +darkroom +darksomeness +darktown +darling +darlingness +darnel +darner +darning +darogha +dart +dartboard +darter +dartingness +darts +dasein +dashboard +dasheen +dasher +dashiki +dashpot +dassie +dastard +dastardliness +dastur +dasymeter +dasyure +dat +data +datableness +datary +datcha +date +dateableness +dateline +datente +datenu +datenue +dater +dato +datolite +datto +datum +datura +dau +daube +dauber +daubery +daud +dauerschlaf +daughter +daughterliness +dauk +dauntingness +dauntlessness +dauphin +dauphine +dauphiness +dautie +davenport +davit +daw +dawdler +dawk +dawn +dawtie +day +dayan +daybeacon +daybill +daybook +dayboy +daybreak +daydream +daydreamer +dayflower +dayfly +daylight +daymark +dayside +daysman +dayspring +daystar +daytime +daywork +dayworker +dazzler +db +dbl +dbridement +dcolletage +dcor +dd +de +deacetylation +deacon +deaconess +deaconry +deaconship +deactivation +deactivator +deadbeat +deadener +deadening +deadeye +deadfall +deadhead +deadlight +deadline +deadliness +deadlock +deadman +deadness +deadrise +deadwood +deadwork +deaeration +deaerator +deafening +deafmuteness +deafness +dealation +dealer +dealership +dealfish +dealing +deambulatory +deamidase +deaminase +deamination +deaminization +dean +deanery +deanship +deanthropomorphism +dearness +dearth +deary +death +deathbed +deathblow +deathday +deathiness +deathlessness +deathliness +deathsman +deathtrap +deathwatch +deb +debacle +debarkation +debarment +debasedness +debasement +debaser +debate +debater +debauchedness +debauchee +debaucher +debauchery +debauchment +debe +debeaker +debenture +debilitant +debilitation +debility +debit +debitor +debonairness +debouchment +debridement +debris +debt +debtor +debunker +debut +debutant +debutante +debye +dec +decade +decadence +decadrachm +decagon +decagram +decahedron +decahydrate +decal +decalcification +decalcifier +decalcomania +decalescence +decaliter +decameter +decampment +decan +decancellation +decane +decantation +decanter +decapitation +decapitator +decapod +decarbonation +decarbonisation +decarboniser +decarbonization +decarbonizer +decarbonylation +decarboxylase +decarboxylation +decarburation +decarburisation +decarburization +decare +decartelization +decastere +decastyle +decastylos +decasualisation +decasualization +decasyllable +decathlon +decating +decd +decease +decedent +deceit +deceitfulness +deceivability +deceivableness +deceiver +deceleration +decelerator +decelerometer +deceleron +decemvir +decemvirate +decency +decennary +decennium +decentness +decentralisation +decentralist +decentralization +deception +deceptiveness +decerebration +decertification +dechenite +dechloridation +deciare +decibar +decibel +decidedness +decider +decidua +deciduitis +deciduousness +decigram +decile +deciliter +decillion +decimal +decimalisation +decimalization +decimation +decimator +decimeter +decimetre +decipherability +decipherer +decipherment +decision +decisiveness +decistere +deck +deckel +decker +deckhead +deckhouse +decking +deckle +deckpipe +decl +declaimer +declamation +declarant +declaration +declarator +declarer +declassification +declension +declination +declinature +decliner +declinometer +declivity +decoction +decoder +decollation +decollator +decolonisation +decolonization +decoloration +decolorisation +decoloriser +decolorization +decolorizer +decolouration +decolourisation +decolouriser +decolourization +decolourizer +decompensation +decomposability +decomposer +decomposition +decompression +deconsecration +decontamination +decontaminator +decoration +decorativeness +decorator +decorousness +decortication +decorticator +decorum +decoupage +decoupling +decoy +decoyer +decree +decreet +decrement +decremeter +decrepitation +decrepitude +decresc +decrescence +decrescendo +decretal +decretist +decrial +decrier +decubitus +decumbence +decumbency +decurion +decurrence +decurrency +decury +decussation +dedans +dedendum +dedication +dedicator +dedifferentiation +dedolomitization +deducibility +deducibleness +deductibility +deduction +dee +deed +deejay +deemster +deemstership +deepener +deepfreeze +deepness +deer +deergrass +deerhound +deerskin +deerstalker +deerstalking +deescalation +deesis +def +defacement +defacer +defalcation +defalcator +defamation +defamer +default +defaulter +defeasance +defeasibility +defeasibleness +defeater +defeatism +defeatist +defeature +defecation +defect +defectibility +defection +defectiveness +defector +defeminisation +defeminization +defence +defencelessness +defendant +defender +defenestration +defense +defenselessness +defenseman +defensibility +defensibleness +defensiveness +deference +deferment +deferral +deferrer +defervescence +defiance +defiantness +defibrillation +defibrillator +deficience +deficiency +deficit +defier +defilade +defilement +defiler +definability +definer +definiendum +definiens +definiteness +definition +definitiveness +definitude +deflagrability +deflagration +deflation +deflationist +deflator +deflection +deflector +deflexion +deflocculant +deflocculation +defloration +deflowerer +defluxion +defoliant +defoliation +defoliator +deforcement +deforcer +deforciant +deforestation +deforester +deformability +deformation +deformedness +deformer +deformeter +deformity +defraudation +defrauder +defraudment +defrayal +defrayer +defroster +defs +deftness +defunctness +defusion +deg +degausser +degeneracy +degenerateness +degeneration +deglaciation +deglamorization +deglut +deglutination +deglutition +degradation +degradedness +degrader +degradingness +degratia +degreaser +degree +degression +degummer +degustation +dehiscence +dehorner +dehortation +dehorter +dehumanisation +dehumanization +dehumidification +dehumidifier +dehydration +dehydrator +dehydrogenase +dehydrogenation +dehydrogenisation +dehydrogeniser +dehydrogenization +dehydrogenizer +dehydroretinol +deicer +deicide +deification +deifier +deiformity +deil +deionization +deionizer +deipnosophist +deism +deist +deisticalness +deity +deixis +dejectedness +dejection +dekadrachm +dekagram +dekaliter +dekameter +dekare +dekastere +dekko +del +delabialization +delaine +delamination +delater +delation +delator +delayer +dele +delectability +delectableness +delectation +delegacy +delegate +delegation +deleteriousness +deletion +delft +deli +deliberateness +deliberation +deliberativeness +deliberator +delicacy +delicateness +delicatessen +deliciousness +delict +delightedness +delighter +delightfulness +delightsomeness +delimitation +delimitative +delineation +delineator +delineavit +delinquency +delinquent +deliquescence +deliration +deliriousness +delirium +delitescence +delitescency +deliverance +deliverer +delivery +deliveryman +dell +della +delocalisation +delocalization +delphinin +delphinine +delphinium +delta +deltiology +deltoid +delubrum +deluder +deluge +delusion +delusiveness +delusterant +delustering +delver +demagnetisation +demagnetiser +demagnetization +demagnetizer +demagogue +demagoguery +demagoguism +demagogy +demandant +demander +demantoid +demarcation +demarcator +demasculinisation +demasculinization +dematerialisation +dematerialization +deme +demeanor +demeanour +dementedness +dementia +demerara +demerit +demesne +demethylchlortetracycline +demibastion +demicanton +demigod +demijohn +demilitarisation +demilitarization +demilune +demimetope +demimondaine +demimonde +demineralization +demipique +demirelief +demirep +demisability +demise +demisemiquaver +demission +demitasse +demiurge +demivierge +demivolt +demo +demobilisation +demobilization +democracy +democrat +democratisation +democratization +demodulation +demodulator +demographer +demographist +demography +demoiselle +demolisher +demolishment +demolition +demon +demonetisation +demonetization +demonism +demonist +demonographer +demonography +demonolater +demonolatry +demonologist +demonology +demonstrability +demonstrableness +demonstrant +demonstration +demonstrativeness +demonstrator +demoralisation +demoraliser +demoralization +demoralizer +demos +demotion +demountability +dempster +demulsification +demulsifier +demureness +demurrage +demurral +demurrer +demy +demythologisation +demythologization +den +denarius +denationalisation +denationalization +denaturalisation +denaturalization +denaturant +denaturation +denaturisation +denaturiser +denaturization +denaturizer +dendrite +dendrochronologist +dendrochronology +dendrologist +dendrology +dendron +dene +denegation +dengue +denial +denier +denigration +denigrator +denim +denitration +denitrification +denitrificator +denitrifier +denization +denizen +denizenation +denizenship +denom +denomination +denominationalism +denominationalist +denominator +denotation +denotativeness +denotement +denouement +denouncement +denouncer +dens +denseness +densification +densifier +densimeter +densimetry +densitometer +densitometry +density +dent +dentalisation +dentality +dentalium +dentalization +dentalman +dentary +dentation +dentelle +dentex +denticle +denticulation +dentifrice +dentil +dentin +dentine +dentiphone +dentist +dentistry +dentition +denture +denudation +denuder +denunciation +denunciator +deodand +deodar +deodorant +deodorisation +deodoriser +deodorization +deodorizer +deontologist +deontology +deoxidisation +deoxidiser +deoxidization +deoxidizer +deoxycorticosterone +deoxygenation +deoxygenization +deoxyribonuclease +deoxyribonucleoprotein +deoxyribose +dep +department +departmentalisation +departmentalism +departmentalization +departure +depauperation +dependability +dependableness +dependant +dependence +dependency +depersonalization +depeter +depicter +depiction +depictor +depilation +depilator +depletion +deplorability +deplorableness +deploration +deplorer +deployment +deplumation +depolarisation +depolariser +depolarization +depolarizer +depolymerization +depopulation +depopulator +deportation +deportee +deporter +deportment +deposal +deposer +depositary +deposition +depositor +depository +depot +depravation +depravedness +depraver +depravity +deprecation +deprecator +deprecatoriness +depreciation +depreciator +depredation +depredationist +depredator +depressibility +depression +depressiveness +depressor +depreter +deprival +deprivation +depriver +depside +dept +depth +depuration +depurator +deputation +deputy +deputyship +der +deracination +deraignment +derailleur +derailment +derangement +deranger +deratization +deray +derby +dereism +dereliction +derelictness +derequisition +derider +deringer +derision +derisiveness +deriv +derivation +derivativeness +deriver +derma +dermabrasion +dermatherm +dermatitis +dermatogen +dermatographia +dermatologist +dermatology +dermatome +dermatophyte +dermatophytosis +dermatoplasty +dermatosis +dermatozoon +dermis +dermographia +dermotherm +dero +derogation +derogatoriness +derri +derriare +derrick +derringer +derris +derry +dertrum +derv +dervish +dervishhood +dervishism +desalination +desalinization +desalter +desamidase +desaminase +desc +descamisado +descant +descanter +descendability +descendant +descender +descendibility +descension +descensory +descent +descloizite +describability +describer +descrier +description +descriptiveness +descriptivism +desecrater +desecration +desecrator +desegregation +desensitization +desensitizer +desert +desertedness +deserter +desertion +deservedness +deserver +deservingness +deshabille +desiccation +desiccator +desideration +desideratum +designation +designator +designedness +designee +designer +designment +desinence +desirability +desirableness +desiredness +desirer +desirousness +desistance +desistence +desk +deskman +desman +desmid +desmitis +desmolase +desmotropy +desolateness +desolater +desolation +desolator +desorption +desoxyribonuclease +desoxyribonucleoprotein +desoxyribose +despairer +despairfulness +despairingness +despatcher +desperado +desperateness +desperation +despicability +despicableness +despisableness +despiser +despitefulness +despoiler +despoilment +despoliation +despondency +desponder +despot +despoticalness +despotism +despumation +desquamation +dessert +dessertspoon +dessertspoonful +dessiatine +desterilization +destination +destiny +destituteness +destitution +destoolment +destrier +destroyer +destructibility +destructibleness +destruction +destructionist +destructiveness +destructivity +destructor +desuetude +desulfuration +desulfurisation +desulfuriser +desulfurization +desulfurizer +desulphuration +desultoriness +desuperheater +det +detachability +detachedness +detacher +detachment +detail +detailedness +detainer +detainment +detectaphone +detection +detective +detector +detent +detention +detergency +detergent +deterioration +deteriorationist +determent +determinability +determinableness +determinateness +determination +determinativeness +determinedness +determiner +determinism +determinist +deterrence +deterrent +detersiveness +detestability +detestableness +detestation +detester +dethronement +dethroner +detinue +detonability +detonatability +detonation +detonator +detour +detoxication +detoxicator +detoxification +detraction +detractiveness +detractor +detrainment +detribalization +detriment +detrimentality +detrimentalness +detrition +detritus +detruncation +detrusion +detumescence +deuce +deuteragonist +deuteranomal +deuteranomaly +deuteranope +deuteranopia +deuteride +deuterium +deuterogamist +deuterogamy +deuteron +deuterotoky +deuton +deutoplasm +deutzia +deva +devadasi +devaluation +devastation +devastator +devel +developability +developer +development +developpa +deviability +deviance +deviascope +deviation +deviationism +deviationist +deviator +device +devicefulness +devil +devilfish +devilishness +devilkin +devilment +devilry +deviltry +devilwood +deviousness +devisal +devisee +deviser +devisor +devitalisation +devitalization +devitrification +devocalisation +devocalization +devoir +devolatilisation +devolatilization +devolution +devolvement +devotedness +devotee +devotement +devotion +devotionality +devotionalness +devourer +devouringness +devoutness +dew +dewan +dewberry +dewclaw +dewdrop +dewfall +dewiness +dewlap +dexamethasone +dexiocardia +dexterity +dexterousness +dextrality +dextran +dextrin +dextroamphetamine +dextrocardia +dextrocularity +dextroglucose +dextrorotation +dextrose +dextrousness +dey +dezincification +dfsenwind +dg +dhak +dhal +dharana +dharma +dharna +dhikr +dhobi +dhole +dhooly +dhoti +dhow +dhurna +dhurrie +dhyana +di +diabase +diabetes +diablerie +diablery +diabolicalness +diabolisation +diabolism +diabolist +diabolization +diabolo +diacetyl +diacetylmorphine +diachylon +diaconate +diaconicon +diaconicum +diacritic +diactinism +diadem +diadochokinesia +diadochy +diaeresis +diag +diagenesis +diageotropism +diagnosis +diagnostication +diagnostician +diagnostics +diagram +diagraph +diakinesis +diakonikon +dial +dialect +dialectic +dialectician +dialecticism +dialectics +dialectologist +dialectology +dialer +dialing +diallage +dialler +dialogism +dialogist +dialogite +dialogue +dialoguer +dialysability +dialysate +dialysation +dialyser +dialysis +dialyzability +dialyzate +dialyzation +dialyzer +diam +diamagnet +diamagnetism +diameter +diamine +diaminopropyltetramethylenediamine +diamond +diamondback +diamorphine +dianetics +dianoia +dianthus +diapason +diapause +diapedesis +diapente +diaper +diaphane +diaphaneity +diaphanometer +diaphanometry +diaphanousness +diaphone +diaphony +diaphoresis +diaphototropism +diaphragm +diaphysis +diapir +diaplasis +diapophysis +diapositive +diarchy +diarist +diarrhea +diarrhoea +diarthrosis +diary +diaschisis +diascope +diaspore +diastalsis +diastase +diastasis +diastema +diaster +diastole +diastrophism +diasystem +diatessaron +diathermancy +diathermy +diathesis +diatom +diatomicity +diatomite +diatonicism +diatreme +diatribe +diatropism +diazine +diazoalkane +diazole +diazomethane +diazonium +diazotizability +diazotization +diazotype +dibasicity +dibatag +dibble +dibbuk +dibrach +dibromide +dibucaine +dicacodyl +dicast +dicastery +dicentra +dicephalism +dicer +dichasium +dichloride +dichlorodifluoromethane +dichlorodiphenyltrichloroethane +dichloromethane +dichogamy +dichondra +dichotomisation +dichotomist +dichotomization +dichotomy +dichroiscope +dichroism +dichroite +dichromat +dichromate +dichromaticism +dichromatism +dichroscope +dicing +dickens +dickey +dickeybird +dickie +dickite +dicky +diclinism +dicophane +dicot +dicotyledon +dicoumarin +dicrotism +dict +dicta +dictagraph +dictation +dictator +dictatorialness +dictatorship +diction +dictionary +dictum +dicyandiamide +dicyclopentadienyliron +dicynodont +didacticism +didactics +didapper +diddikai +diddler +didgeridoo +didicoy +dido +didrachm +didy +didymium +didynamy +dieback +dieldrin +dielectric +diencephalon +diene +dieresis +dies +diesel +dieselization +diesinker +diesinking +diesis +diestock +diestrus +diet +dieter +dietetics +diethylacetal +diethylaminoethanol +diethylethanolamine +diethylmalonylurea +diethylstilbestrol +diethylstilboestrol +dietitian +diff +difference +differentia +differentiation +differentiator +difficulty +diffidence +diffidentness +diffluence +diffraction +diffractiveness +diffractometer +diffusate +diffusedness +diffuseness +diffuser +diffusibility +diffusibleness +diffusion +diffusiveness +diffusivity +difluence +digamma +digamy +digenesis +digestant +digestedness +digester +digestibility +digestibleness +digestif +digestion +digestor +digger +digit +digitalin +digitalis +digitalism +digitalization +digitation +digitisation +digitization +digitoxin +digitron +diglyceride +diglyph +dignifiedness +dignitary +dignity +digraph +digresser +digression +digressiveness +dihedron +dihybrid +dihybridism +dihydrate +dihydromorphinone +dihydrosphingosine +dihydrostreptomycin +dihydrotachysterol +dike +diker +diketone +dikkop +diktat +dil +dilaceration +dilapidation +dilapidator +dilatability +dilatableness +dilatancy +dilatation +dilater +dilation +dilatometer +dilatometry +dilator +dilatoriness +dilemma +dilettante +dilettantism +diligence +diligentness +dill +dilly +diluteness +dilution +diluvium +dime +dimenhydrinate +dimension +dimensionality +dimer +dimercaprol +dimerism +dimeter +dimethoxymethane +dimethyl +dimethylanthranilate +dimethylbenzene +dimethylcarbinol +dimethyldiketone +dimethylketol +dimethylketone +dimethylmethane +dimethylsulphoxide +dimidiation +diminishableness +diminuendo +diminution +diminutiveness +dimity +dimmer +dimness +dimorph +dimorphism +dimorphite +dimple +dimwit +din +dinanderie +dinar +dinarchy +diner +dinergate +dinette +dingbat +dinge +dingey +dinghy +dinginess +dingle +dingo +dingus +dinitrobenzene +dinkey +dinmont +dinner +dinnerware +dinoceras +dinoflagellate +dinosaur +dinothere +dint +diocese +diode +dioeciousness +dioestrum +dioestrus +dioicousness +diol +dionaea +diopside +diopsimeter +dioptase +diopter +dioptometer +dioptre +dioptrics +diorama +diorite +diorthosis +diosgenin +diosmosis +dioxan +dioxane +dioxide +dipeptide +diphenhydramine +diphenyl +diphenylacetylene +diphenylamine +diphenylaminechlorarsine +diphenylhydantoin +diphonia +diphosgene +diphosphate +diphtheria +diphtheriaphor +diphthong +diphthongia +diphthongisation +diphthongization +dipl +diplacusis +diplegia +dipleurula +diploae +diplococcus +diplodocus +diploe +diploma +diplomacy +diplomat +diplomate +diplomatics +diplomatist +diplont +diplophonia +diplopia +diplopod +diplosis +diplostemony +diplotene +dipneedle +dipody +dipole +dipper +dipropellant +diprotodont +dipso +dipsomania +dipsomaniac +dipstick +dipteran +dipteron +dipteros +diptote +diptych +dipylon +dipyramid +dir +directcarving +directdiscourse +directexamination +direction +directive +directiveness +directivity +directness +director +directorate +directorship +directory +directrix +direfulness +direness +direx +direxit +dirge +dirham +dirhem +dirigibility +dirigo +dirk +dirndl +dirt +dirtfarmer +dirtiness +dis +disability +disablement +disabler +disabusal +disaccharide +disaccord +disaccustomedness +disadvantage +disadvantageousness +disaffectedness +disaffection +disaffiliation +disaffirmance +disaffirmation +disafforestation +disafforestment +disagreeability +disagreeableness +disagreement +disallowableness +disallowance +disannuller +disannulment +disappearance +disappointer +disappointingness +disappointment +disapprobation +disapproval +disapprover +disarmament +disarmer +disarrangement +disarranger +disarray +disarticulation +disarticulator +disassembly +disassociation +disaster +disastrousness +disavowal +disavower +disbandment +disbarment +disbelief +disbeliever +disburdenment +disbursement +disburser +disc +discant +discanter +discarder +discarnation +disceptation +discernableness +discerner +discernibleness +discernment +discerptibility +discerptibleness +discharger +disciple +discipleship +disciplinability +disciplinableness +disciplinant +disciplinarian +discipline +discipliner +discission +disclaimer +disclamation +disclimax +discloser +disclosure +disco +discobolus +discographer +discography +discoloration +discomfiter +discomfiture +discomfort +discommender +discommodiousness +discommodity +discomposure +disconcertedness +disconcertingness +disconcertion +disconcertment +disconformity +disconnectedness +disconnecter +disconnection +disconnectiveness +disconsideration +disconsolateness +disconsolation +discontent +discontentedness +discontinuance +discontinuation +discontinuer +discontinuity +discontinuousness +discophile +discord +discordance +discordancy +discotheque +discountenancer +discounter +discouragement +discourse +discourser +discourteousness +discourtesy +discoverer +discoverture +discovery +discreation +discreditability +discreetness +discrepancy +discreteness +discretion +discriminant +discrimination +discriminator +discursion +discursiveness +discus +discussant +discusser +discussion +discutient +disdain +disdainfulness +disease +diseasedness +disegno +disembarkation +disembarkment +disembarrassment +disembodiment +disemboguement +disembowelment +disenchanter +disenchantment +disendower +disendowment +disenfranchisement +disengagedness +disengagement +disentailment +disentanglement +disentangler +disenthrallment +disenthralment +disenthronement +disentombment +disentrancement +disequilibrium +disestablishment +disestablishmentarian +disestablishmentarianism +diseur +diseuse +disfavor +disfavorer +disfavour +disfavourer +disfeaturement +disfigurement +disfigurer +disforestation +disfranchisement +disfurnishment +disgorgement +disgorger +disgrace +disgracefulness +disgracer +disgregation +disgruntlement +disguisedness +disguiser +disgustedness +disgustingness +dish +dishabille +disharmonism +disharmony +dishcloth +dishcross +disheartener +disheartenment +disherison +disheritor +dishevelment +dishful +dishonesty +dishonorableness +dishonorer +dishonourableness +dishonourer +dishpan +dishrag +dishtowel +dishwasher +dishwater +disillusioniser +disillusionist +disillusionizer +disillusionment +disimprisonment +disincentive +disinclination +disinfectant +disinfection +disinfector +disinfestation +disinflation +disingenuousness +disinheritance +disinhibition +disintegration +disintegrator +disinterest +disinterestedness +disinterment +disjection +disjointedness +disjunction +disjuncture +disjune +disk +diskography +diskophile +dislocation +dislodgement +dislodgment +disloyalty +dismality +dismalness +dismantlement +dismantler +dismastment +dismayedness +dismemberer +dismemberment +dismissal +disobedience +disobeyer +disobligingness +disoperation +disorder +disorderedness +disorderliness +disorganiser +disorganization +disorganizer +disorientation +disparagement +disparager +disparateness +disparity +dispartment +dispassion +dispassionateness +dispatcher +dispeller +dispensability +dispensableness +dispensary +dispensation +dispensationalism +dispensator +dispensatory +dispenser +dispeoplement +dispeopler +dispermy +dispersal +dispersant +dispersedelement +dispersedye +disperser +dispersibility +dispersion +dispersiveness +dispersoid +disphenoid +dispiritedness +dispiteousness +displacement +displacer +displayer +displeasingness +displeasure +disposability +disposableness +disposal +disposedness +disposer +disposition +dispossession +dispossessor +disposure +dispraiser +dispreader +disproof +disproportion +disproportionableness +disproportionality +disproportionalness +disproportionateness +disproportionation +disprover +disputability +disputableness +disputant +disputation +disputatiousness +disputer +disqualification +disquiet +disquietedness +disquietude +disquisition +disregarder +disregardfulness +disrepair +disreputability +disreputableness +disreputation +disrepute +disrespect +disrespectability +disrespectfulness +disrobement +disrober +disrupter +disruption +disruptor +disrupture +dissatisfaction +dissatisfactoriness +dissatisfiedness +dissection +dissector +disseisin +disseisor +disseizee +disseizin +disseizor +dissemblance +dissembler +dissemination +disseminator +disseminule +dissension +dissenter +dissentience +dissentiency +dissepiment +dissertation +dissertationist +dissertator +disservice +disseverance +disseveration +disseverment +dissidence +dissilience +dissiliency +dissimilarity +dissimilation +dissimilitude +dissimulation +dissimulator +dissipatedness +dissipater +dissipation +dissipativity +dissipator +dissociability +dissociableness +dissociality +dissociation +dissogeny +dissolubility +dissolubleness +dissoluteness +dissolution +dissolvability +dissolvableness +dissolvent +dissolver +dissonance +dissonancy +dissuader +dissuasion +dissuasiveness +dissyllabism +dissyllable +dissymmetry +dist +distaff +distance +distantness +distaste +distastefulness +distelfink +distemper +distemperature +distemperedness +distendedness +distender +distensibility +distention +distich +distilery +distilland +distillate +distillation +distiller +distillery +distillment +distinction +distinctiveness +distinctness +distinguishability +distinguishableness +distinguisher +distinguishment +distomatosis +distortedness +distorter +distortion +distr +distractedness +distracter +distractibility +distraction +distrail +distrainee +distrainer +distrainment +distrainor +distraint +distressedness +distressfulness +distributary +distributee +distribution +distributiveness +distributor +distributorship +district +distringas +distruster +distrustfulness +disturbance +disturber +disty +disulfate +disulfide +disulfiram +disulphate +disulphide +disunion +disunionism +disunionist +disuniter +disunity +disuse +disutility +disvalue +disyllabism +disyllable +dit +dita +ditch +ditchdigger +ditchdigging +ditcher +ditchwater +ditheism +ditheist +dithionate +dithionite +dithyramb +ditriglyph +dittander +dittany +ditto +dittograph +dittography +ditty +diuresis +diureticalness +diurnalness +div +diva +divagation +divalence +divan +divarication +divaricator +dived +diver +divergence +divergency +diverseness +diversifiability +diversification +diversifier +diversion +diversity +diverter +diverticulitis +diverticulosis +diverticulum +divertimento +divertissement +divestiture +divi +divid +dividableness +dividedness +dividend +divider +divination +divineness +diviner +divinisation +divinity +divinization +divisibility +divisibleness +division +divisionism +divisiveness +divisor +divorca +divorce +divorcee +divorcement +divorcer +divot +divulgater +divulgation +divulgator +divulgement +divulgence +divulger +divulsion +divvy +diwan +dixie +dixit +dixy +dizenment +dizziness +dj +djebel +djellabah +djibbah +djin +djinni +dk +dkg +dkl +dkm +dks +dlr +dlvy +dm +dmarche +doab +doater +dobber +dobbin +dobby +dobie +dobl +dobla +doblun +dobra +dobson +dobsonfly +doc +docent +docentship +docility +dock +dockage +docker +docket +dockland +dockmackie +dockmaster +dockside +dockyard +doctor +doctorate +doctorfish +doctorship +doctrinairism +doctrinality +doctrine +document +documentation +dodderer +doddie +doddle +dodecagon +dodecahedron +dodecanal +dodecaphonism +dodecaphonist +dodecastylos +dodecasyllable +dodecylphenol +dodger +dodo +dodoism +doe +doek +doer +doeskin +doffer +dog +dogbane +dogberry +dogbody +dogcart +dogcatcher +dogdom +doge +dogedom +dogeship +dogey +dogface +dogfight +dogfish +doggedness +dogger +doggerel +doggery +doggishness +doggy +doghouse +dogie +dogleg +dogma +dogman +dogmaticalness +dogmatics +dogmatisation +dogmatiser +dogmatism +dogmatist +dogmatization +dogmatizer +dogsbody +dogshore +dogtooth +dogtrot +dogvane +dogwatch +dogwood +dogy +doh +doily +doing +doit +dojo +dol +doldrums +dole +dolefulness +dolerite +dolichocephalism +dolichocephaly +dolichosaurus +doline +dolium +doll +dollar +dollarbird +dollarfish +dollface +dollhouse +dollishness +dollop +dolly +dollyman +dolman +dolmas +dolmen +dolomite +dolomitization +dolor +dolorimeter +dolorimetry +dolorousness +dolour +dolphin +dolphinfish +dols +dolt +doltishness +dolus +dom +domain +dome +domesday +domestication +domesticator +domesticity +domicile +domiciliar +domiciliation +dominance +dominator +domine +dominee +domineeringness +dominicale +dominie +dominion +dominium +domino +dominoes +dona +donation +donative +donator +donatory +donee +dong +donga +donjon +donkey +donna +donnishness +donnism +donny +donnybrook +donor +donorship +donut +donzel +doodad +doodah +doodlebug +doodler +doodlesack +doohickey +dook +doolie +dooly +doom +doomsday +doomwatcher +door +doorbell +doorbrand +doorcase +doorframe +doorjamb +doorkeeper +doorknob +doorman +doormat +doornail +doorpiece +doorplate +doorpost +doorsill +doorstead +doorstep +doorstone +doorstop +doorway +dooryard +doover +dop +dopa +dopant +dopatta +dope +doper +dopesheet +dopester +dor +dorab +dorado +dorje +dorm +dormancy +dormer +dormeuse +dormitory +dormouse +dornick +doronicum +dorp +dorr +dorse +dorser +dorsiflexion +dorsiflexor +dorsiventrality +dorsum +dorter +dortiness +dory +doryman +dosage +dose +dosimeter +dosimetrician +dosimetrist +dosimetry +dossal +dosser +dosseret +dosshouse +dossier +dossil +dot +dotage +dotard +dotation +doter +dotingness +dotter +dotterel +dottiness +dottle +doua +douane +doubleganger +doubleheader +doubleness +doubler +doubles +doublet +doublethink +doubleton +doubletree +doubloon +doublure +doubt +doubter +doubtfulness +doubtingness +doubtlessness +douc +douceness +doucepere +douceur +douche +dough +doughbelly +doughboy +doughface +doughiness +doughnut +doughtiness +douma +doup +douppioni +doura +douricouli +dourine +dourness +douroucouli +douser +douter +douzaine +douziame +dove +dovecote +dovekie +dovetail +dovetailer +dowager +dowagerism +dowdiness +dowdyism +dowel +dower +dowery +dowiness +dowitcher +downbeat +downcastness +downcome +downcomer +downdraft +downer +downfall +downhaul +downheartedness +downiness +downpipe +downpour +downrightness +downspout +downstater +downstroke +downswing +downtake +downthrow +downtime +downtown +downtowner +downtrend +downtroddenness +downturn +downwardness +downwash +dowry +dowsabel +dowser +doxographer +doxology +doxy +doyen +doyenne +doyley +dozer +doziness +dpt +dr +drabbet +drabbler +drabness +dracaena +drachm +drachma +dracone +draegerman +draff +draft +draftee +drafter +draftiness +draftsman +draftsmanship +drag +dragae +dragger +draggletail +draghound +dragline +dragnet +dragoman +dragon +dragoness +dragonet +dragonfly +dragonhead +dragonnade +dragonroot +dragoon +dragoonage +dragrope +dragsaw +dragsawing +dragster +drahthaar +drail +drain +drainage +drainageway +drainboard +drainer +drainfield +drainpipe +drainspout +drainway +drake +drakefly +dram +drama +dramatics +dramatiser +dramatist +dramatization +dramatizer +dramaturge +dramaturgist +dramaturgy +drame +drammock +dramshop +draper +drapery +draught +draughtboard +draughter +draughtiness +draughts +draughtsman +dravite +drawability +drawback +drawbar +drawbench +drawbore +drawboy +drawbridge +drawee +drawer +drawing +drawknife +drawler +drawlingness +drawplate +drawshave +drawstring +drawtube +dray +drayage +drayhorse +draying +drayman +drch +dreadfulness +dreadness +dreadnought +dream +dreamboat +dreamer +dreamfulness +dreaminess +dreamland +dreamlessness +dreamtime +dreariness +dreck +dredge +dredger +dreg +dreidel +drencher +dressage +dresser +dressiness +dressing +dressmaker +dressmaking +dressoir +drib +dribbler +driblet +driftage +driftbolt +drifter +driftfish +driftlessness +driftpin +driftwood +drill +drillbit +driller +drilling +drillmaster +drillstock +drinkability +drinkableness +drinker +dripolator +drippage +dripping +dripstone +driveler +driveller +driver +driveway +drizzle +drogher +drogue +droit +drollery +drollness +dromedary +dromond +dromos +drone +drongo +droob +droopiness +drop +dropforger +droplet +droplight +dropline +dropout +droppage +dropper +dropping +dropsicalness +dropsonde +dropsy +dropwort +droshky +drosky +drosometer +drosophila +dross +drossiness +drought +droughtiness +drouthiness +drover +drowner +drowsihead +drowsiness +drubber +drubbing +drudge +drudger +drudgery +drug +drugget +druggist +drugstore +druid +druidism +druidology +drum +drumbeat +drumbeater +drumfire +drumfish +drumhead +drumlin +drummer +drummock +drumstick +drunkard +drunkenness +drunkometer +drupe +drupelet +druse +dryad +dryas +dryasdust +drybrush +dryer +dryfarmer +dryness +dryopithecine +drypoint +drysalter +drysaltery +ds +dt +dtd +dtente +du +duad +dualism +dualist +duality +duarchy +dubbeltje +dubbin +dubbing +dubiety +dubiousness +dubitation +dubonnet +duc +ducat +ducatoon +duce +duchess +duchesse +duchy +duck +duckbill +duckboard +ducker +duckling +duckpin +ducktail +duckweed +duckwheat +ducky +duct +ductileness +ductility +ductor +ductule +ductwork +dud +dude +dudeen +dudelsack +dudgeon +due +duecentist +duecento +duel +duelist +duello +dueness +duenna +duet +duettist +duff +duffel +duffer +dugento +dugong +dugout +duiker +duikerbok +duit +duka +duke +dukedom +dukkha +dulc +dulcetness +dulciana +dulcification +dulcimer +dulcinea +dulia +dullard +dullness +dullsville +dulness +dulocracy +dulosis +dulse +duma +dumbbell +dumbfounderment +dumbhead +dumbness +dumbwaiter +dumdum +dumfounderment +dumka +dummkopf +dummy +dumortierite +dumpcart +dumper +dumpiness +dumpishness +dumpling +dunce +dunch +dundavoe +dunder +dunderhead +dunderheadedness +dune +dung +dungaree +dungeon +dunghill +duniewassal +dunite +duniwassal +dunker +dunlin +dunnage +dunnakin +dunnite +dunno +dunnock +dunny +dunt +duo +duodecagon +duodecillion +duodecillionth +duodecimality +duodecimo +duodenitis +duodenojejunostomy +duodenum +duodiode +duodiodepentode +duologue +duomo +duopoly +duopsony +duotone +duotriode +duotype +dupability +dupatta +dupe +duper +dupery +dupion +duplation +duplet +duplex +duplexer +duplexity +duplicability +duplication +duplicator +duplicature +duplicity +dupondius +duppy +dura +durability +durableness +durain +duralumin +duramen +durance +duration +durbar +duress +duressor +durgah +durian +durmast +duro +durra +durrie +durum +durzi +dusk +duskiness +dust +dustbin +dustcart +dustcloth +duster +dustheap +dustiness +dusting +dustman +dustoor +dustpan +dustsheet +dustup +dutch +duteousness +dutiability +duty +duumvir +duumvirate +duvet +duvetyn +dux +duyker +dvaita +dvandva +dwale +dwalm +dwarf +dwarfishness +dwarfism +dweller +dwelling +dwt +dyad +dyarchy +dybbuk +dye +dyeing +dyer +dyestuff +dyeweed +dyewood +dyn +dynameter +dynamics +dynamism +dynamist +dynamite +dynamiter +dynamo +dynamogenesis +dynamometer +dynamometry +dynamotor +dynast +dynasty +dynatron +dyne +dynode +dysacousia +dysadaptation +dysanagnosia +dysanalyte +dysarthria +dysbarism +dyscrasia +dyscrinism +dysentery +dysergia +dysesthesia +dysfunction +dysgenics +dysgnosia +dysgraphia +dyskinesia +dyslalia +dyslexia +dyslogia +dysmenorrhea +dysmenorrhoea +dysmetria +dysmnesia +dyspareunia +dyspathy +dyspepsia +dysphagia +dysphasia +dysphemia +dysphemism +dysphonia +dysphoria +dysplasia +dyspnea +dyspnoea +dyspraxia +dysprosium +dysrhythmia +dysteleologist +dysteleology +dysthymia +dystonia +dystopia +dystrophy +dysuria +dytiscid +dz +dziggetai +dzo +e +ea +ead +eager +eagerness +eagle +eaglestone +eaglet +eaglewood +eagre +ealdorman +eanling +ear +earache +earbob +eardrop +eardrum +earflap +earful +earing +earl +earlap +earldom +earliness +earlship +earmindedness +earmuff +earner +earnestness +earning +earphone +earpiece +earplug +earreach +earring +earshot +earth +earthenware +earthiness +earthlight +earthliness +earthling +earthman +earthmover +earthnut +earthpea +earthquake +earthrise +earthshaker +earthshine +earthstar +earthwork +earthworm +earwax +earwig +earwitness +ease +easefulness +easel +easement +easer +easiness +easing +east +easterliness +easterling +easterner +easting +eastness +easygoingness +eatage +eater +eatery +eath +eating +eau +eave +eavesdropper +ebonist +ebonite +ebony +ebullience +ebullioscopy +ebullition +eburnation +ec +ecad +ecart +eccentricity +ecchymosis +eccl +ecclesia +ecclesiarch +ecclesiastic +ecclesiasticism +ecclesiolater +ecclesiolatry +ecclesiologist +ecclesiology +eccrinology +ecdysiast +ecdysis +ecdysone +ecesis +echard +echelette +echelle +echelon +echelonment +echeveria +echidna +echinococcus +echinoderm +echinoid +echinus +echiuroid +echo +echoer +echogram +echograph +echoism +echolalia +echolocation +echopraxia +echovirus +eclair +eclampsia +eclat +eclecticism +eclipse +eclipser +eclipsis +ecliptic +eclogite +eclogue +eclosion +ecocide +ecol +ecologist +ecology +econ +econometrician +econometrics +econometrist +economics +economiser +economist +economizer +economy +ecorch +ecospecies +ecosphere +ecossaise +ecosystem +ecotone +ecotype +ecphonesis +ecraseur +ecru +ecstasy +ectasis +ectene +ecthlipsis +ecthyma +ectoblast +ectocornea +ectocrine +ectoderm +ectoenzyme +ectogenesis +ectomere +ectomorph +ectomorphy +ectoparasite +ectophyte +ectopia +ectoplasm +ectoproct +ectosarc +ectostosis +ectozoa +ectrodactylism +ectromelia +ectropion +ectropionization +ectype +ecu +ecumenicalism +ecumenicism +ecumenicist +ecumenicity +ecumenics +ecumenism +ecumenist +ecurie +eczema +ed +edacity +edaphon +eddo +eddy +edelweiss +edema +edentate +edge +edgebone +edger +edginess +edging +edh +edibility +edibleness +edict +edicule +edification +edifice +edifier +edifyingness +edile +edition +editor +editorialist +editorialization +editorializer +editorship +eds +educ +educability +educatability +educatee +education +educationalist +educationist +educator +educt +eduction +eductor +edulcoration +ee +eel +eelback +eelgrass +eelpout +eelworm +eeriness +ef +effacement +effacer +effect +effecter +effectiveness +effectivity +effector +effectuality +effectualness +effectuation +effeminacy +effeminateness +effemination +effeminisation +effeminization +effendi +efference +effervescence +effervescency +effeteness +efficaciousness +efficacy +efficiency +effigiation +effigy +effleurage +efflorescence +effluence +effluent +effluvium +efflux +effort +effortlessness +effraction +effractor +effrontery +effulgence +effusiometer +effusion +effusiveness +efph +eft +eg +egalitarianism +egestion +egg +eggbeater +eggcrate +eggcup +egger +egghead +eggnog +eggplant +eggshell +egis +eglantine +ego +egocentricity +egocentrism +egoism +egoist +egomania +egomaniac +egotism +egotist +egregiousness +egress +egression +egret +eider +eiderdown +eidolon +eidos +eigenfrequency +eigenfunction +eigenvalue +eigenvector +eight +eightball +eighteen +eighteenmo +eightvo +eighty +eikon +einkanter +einkorn +einsteinium +eirenicon +eisegesis +eisteddfod +ejection +ejectment +ejector +ejido +ejusd +ekistics +ektene +el +elaborateness +elaboration +elaborator +elaeoptene +elaeothesium +elan +eland +elapid +elasmobranch +elasmosaur +elastance +elasticity +elastin +elastomer +elatedness +elater +elaterid +elaterin +elaterite +elaterium +elation +elayl +elbow +elbowroom +eld +elderberry +elderliness +elding +elecampane +election +electioneerer +electiveness +elector +electorate +electret +electricalness +electrician +electricity +electrification +electrifier +electro +electroacoustics +electroanalysis +electroballistician +electroballistics +electrobiologist +electrobiology +electrocardiogram +electrocardiograph +electrocardiography +electrocautery +electrochemist +electrochemistry +electrocoagulation +electrocorticogram +electrocution +electrode +electrodeposition +electrodiagnosis +electrodialysis +electrodissolution +electrodynamics +electrodynamometer +electroencephalogram +electroencephalograph +electroencephalography +electroextraction +electroforming +electrograph +electrography +electrohemostasis +electrojet +electrokinetics +electrolier +electrologist +electroluminescence +electrolysation +electrolyser +electrolysis +electrolyte +electrolyzation +electrolyzer +electromagnet +electromagnetics +electromagnetism +electromagnetist +electromerism +electrometallurgist +electrometallurgy +electrometeor +electrometer +electrometry +electromotor +electromyogram +electromyography +electron +electronarcosis +electronegativity +electroneutrality +electronics +electronvolt +electrophone +electrophoresis +electrophorus +electrophotography +electrophysiologist +electrophysiology +electroplaque +electroplater +electroreduction +electrorefining +electroscope +electroshock +electrostatics +electrostriction +electrosurgery +electrosynthesis +electrotaxis +electrotechnician +electrotechnics +electrotechnology +electrotherapeutics +electrotherapist +electrotherapy +electrothermics +electrotonus +electrotropism +electrotype +electrotyper +electrotypist +electrotypy +electrovalence +electrovalency +electrowinning +electrum +electuary +elegance +elegancy +elegist +elegit +elegy +elektra +elem +element +elementariness +elemi +elemong +elenchus +eleoptene +elephant +elephanta +elephantiasis +elevation +elevator +eleven +elevon +elf +elfinwood +elfishness +elfland +elflock +elicitation +elicitor +eligibility +eliminability +eliminant +elimination +eliminator +elinguation +elision +elisor +elite +elitism +elitist +elix +elixir +elk +elkhound +ell +ellipse +ellipsis +ellipsograph +ellipsoid +ellipticalness +ellipticity +elliptograph +elm +elocution +elocutionist +eloigner +eloignment +eloiner +eloinment +elongation +elopement +eloper +eloquence +eloquentness +eluant +eluate +elucidation +elucidator +eluder +eluent +elusion +elusiveness +elution +elutriation +elutriator +eluviation +eluvium +elver +elves +elytra +elytron +elytrum +em +emaciation +emagram +emanation +emanator +emancipation +emancipationist +emancipator +emancipist +emargination +emasculation +emasculator +embacle +embalmer +embalmment +embankment +embarcation +embargo +embarkation +embarkment +embarrassment +embassador +embassage +embassy +embattlement +embayment +embedding +embedment +embellisher +embellishment +ember +embezzlement +embezzler +embiid +embiotocid +embitterer +embitterment +emblazer +emblazoner +emblazonment +emblazonry +emblem +emblematicalness +emblematist +embodier +embodiment +embolectomy +embolism +embolite +embolus +emboly +embonpoint +emboota +embosser +embossment +embouchure +embowment +embracement +embraceor +embracer +embracery +embranchment +embranglement +embrasure +embrectomy +embrittlement +embrocation +embroiderer +embroidery +embroiler +embroilment +embryectomy +embryo +embryogeny +embryol +embryologist +embryology +embryotomy +embryotroph +embryotrophy +embryulcia +embryulcus +embusqu +emcee +eme +emeer +emeerate +emendation +emendator +emerald +emergence +emergency +emergentness +emersion +emery +emesis +emetine +emeu +emf +emiction +emigr +emigrant +emigration +eminence +eminency +emir +emirate +emissary +emission +emissivity +emittance +emitter +emmenagogue +emmenia +emmeniopathy +emmer +emmet +emmetrope +emmetropia +emollience +emollition +emolument +emoter +emotion +emotionalism +emotionalist +emotionality +emotiveness +emotivism +emotivity +emp +empalement +empaler +empanada +empathy +empennage +emperor +emperorship +empery +emphasis +emphaticalness +emphysema +empire +empiric +empiricalness +empiricism +empiricist +empirism +emplacement +emplectite +employability +employee +employer +employment +empoisonment +emporium +empowerment +empress +empressement +emprise +emptier +emptiness +empyema +empyrean +empyreuma +emu +emulation +emulator +emulgens +emulousness +emuls +emulsibility +emulsifiability +emulsification +emulsifier +emulsion +emulsoid +en +enabler +enactment +enactor +enallage +enamel +enameler +enamelist +enameller +enamellist +enamelware +enamelwork +enami +enamoredness +enamouredness +enantiomorph +enantiomorphism +enantiosis +enantiotropy +enargite +enarme +enarthrosis +enc +encaenia +encampment +encapsulation +encarpus +encasement +encephalalgia +encephalasthenia +encephalin +encephalitis +encephalogram +encephalograph +encephalography +encephaloma +encephalomalacia +encephalomyelitis +encephalon +encephalopathy +encephalosis +encephalotomy +enchainment +enchanter +enchantingness +enchantment +enchaonement +enchaser +enchilada +enchiridion +enchondroma +encina +encipherer +encipherment +encirclement +encl +enclave +encloser +enclosure +encodement +encoder +encoignure +encolpion +encomiast +encomienda +encomium +encompassment +encopresis +encounterer +encouragement +encourager +encrinite +encroacher +encroachment +encrustation +encryption +enculturation +encumbrance +encumbrancer +ency +encyclical +encyclopedia +encyclopedism +encyclopedist +encystation +encystment +end +endamagement +endamoeba +endangeitis +endangerment +endaortitis +endarchy +endarteritis +endarterium +endbrain +endearment +endeavorer +endeavourer +endemism +ender +endgame +endhand +ending +endive +endlessness +endnote +endoangiitis +endoaortitis +endoarteritis +endoblast +endocarditis +endocardium +endocarp +endocranium +endocrinologist +endocrinology +endocrinopath +endocrinopathy +endocrinotherapy +endoderm +endodermis +endodontics +endodontist +endodontium +endoenzyme +endogamy +endogen +endogenicity +endogeny +endolymph +endometriosis +endometritis +endometrium +endomorph +endomorphism +endomorphy +endoneurium +endoparasite +endopeptidase +endoperidium +endophasia +endophyte +endoplasm +endopodite +endorsee +endorsement +endorser +endorsor +endosarc +endoscope +endoscopist +endoscopy +endoskeleton +endosmosis +endosome +endosperm +endospore +endosporium +endosteum +endostosis +endothecium +endothelioma +endothelium +endothermism +endotoxin +endotoxoid +endover +endower +endowment +endpaper +endpiece +endplate +endplay +endpoint +endrin +endshake +endurability +endurableness +endurance +endurer +enduringness +enema +enemy +energeticist +energetics +energid +energiser +energism +energist +energizer +energumen +energy +enervation +enervator +enfacement +enfeeblement +enfeebler +enfeoffment +enfilade +enfleurage +enfolder +enfoldment +enforceability +enforcement +enforcer +enfranchisement +enfranchiser +eng +engagedness +engagement +engager +engagingness +engarde +engenderer +engenderment +engin +engine +engineer +engineering +engineman +enginery +engobe +engorgement +engr +engraftation +engraftment +engrailment +engram +engraver +engraving +engrosser +engrossingness +engrossment +engulfment +enhancement +enhancer +enigma +enjambement +enjambment +enjoiner +enjoinment +enjoyableness +enjoyer +enjoyment +enkindler +enkolpion +enl +enlacement +enlargedness +enlargement +enlarger +enlightenedness +enlightener +enlightenment +enlistee +enlister +enlistment +enlivener +enlivenment +enmeshment +enmity +ennage +ennead +enneagon +enneahedron +enneastylos +ennoblement +ennobler +ennui +enol +enolate +enolization +enology +enormity +enormousness +enosis +enosist +enouncement +enquiry +enragement +enregistration +enricher +enrichment +enrober +enrollee +enroller +enrollment +enrolment +ens +ensample +ensemble +enshrinement +ensign +ensigncy +ensignship +ensilability +ensilage +enslavement +enslaver +ensnarement +ensnarer +ensorcellment +enstatite +ensurer +enswathement +entablature +entablement +entailer +entailment +entangledness +entanglement +entangler +entasis +entelechy +entellus +entente +enteralgia +enterclose +enterectomy +enterer +enteritis +enterobiasis +enterocolitis +enterogastrone +enterohepatitis +enterokinase +enterology +enteron +enteropneust +enterorrhexis +enterostomy +enterotomy +enterotoxemia +enterovirus +enterprise +enterpriser +enterrologist +entertainer +entertainingness +entertainment +enthalpy +enthraller +enthrallment +enthralment +enthronement +enthusiasm +enthusiast +enthymeme +enticement +enticingness +entireness +entirety +entitlement +entity +entoblast +entoderm +entombment +entomol +entomolegist +entomology +entomophily +entomostracan +entophyte +entourage +entozoa +entozoon +entr +entrada +entrae +entrainer +entrance +entrancement +entranceway +entrant +entrapment +entrapper +entreatment +entreaty +entrec +entrechat +entrecote +entrelac +entremets +entrenchment +entrep +entrepot +entrepreneur +entrepreneurship +entrepreneuse +entresol +entropy +entrustment +entry +entryway +entwinement +enucleation +enucleator +enumeration +enumerator +enunciability +enunciation +enunciator +enuresis +envelope +enveloper +envelopment +enviableness +envier +enviousness +environment +environmentalism +environmentalist +envisagement +envoy +envy +enzyme +enzymologist +enzymology +enzymolysis +eo +eobiont +eohippus +eolipile +eolith +eom +eon +eonism +eosin +eosinophil +eosinophilia +ep +epact +epagoge +epanaphora +epanodos +epanorthosis +eparch +eparchy +epaulet +epeirogeny +epeisodion +epencephalon +ependyma +epenthesis +epergne +epexegesis +ephah +ephebe +ephebeion +ephebeum +ephebos +ephebus +ephedra +ephedrine +ephemera +ephemerality +ephemeralness +ephemerid +ephemeris +ephemeron +ephippium +ephod +ephor +ephorate +epiblast +epiboly +epic +epicalyx +epicanthus +epicardium +epicarp +epicedium +epicenism +epicenter +epicentre +epicentrum +epicist +epiclesis +epicondyle +epicotyl +epicrisis +epicure +epicycle +epicycloid +epidemicity +epidemiologist +epidemiology +epidermis +epidiascope +epididymis +epidiorite +epidote +epigastrium +epigenesis +epigenesist +epigenist +epiglottis +epigone +epigoneion +epigonism +epigram +epigrammatism +epigrammatist +epigraph +epigrapher +epigraphist +epigraphy +epigynum +epigyny +epiklesis +epilation +epilator +epilepsy +epilimnion +epilogist +epilogue +epimer +epimere +epimerism +epimorphism +epimorphosis +epimyocardium +epimysium +epinaos +epinasty +epinephrine +epineurium +epionychium +epiphany +epiphenomenalism +epiphenomenalist +epiphenomenon +epiphonema +epiphora +epiphragm +epiphylaxis +epiphyll +epiphysis +epiphyte +epiplexis +epiploon +epirogeny +episcopacy +episcopalism +episcopate +episcope +episcotister +episememe +episiotomy +episode +episome +epist +epistasis +epistaxis +episteme +epistemologist +epistemology +episternum +epistle +epistoler +epistolography +epistrophe +epistyle +episyllogism +epit +epitaph +epitaphist +epitasis +epitaxis +epitaxy +epithalamion +epithalamium +epithalamus +epithecium +epithelioma +epithelium +epithelization +epithet +epitome +epitomisation +epitomiser +epitomist +epitomization +epitomizer +epitrachelion +epizoism +epizoite +epizoon +epizooty +epoch +epode +eponychium +eponym +eponymy +epop +epopee +epos +epoxide +epsilon +epsomite +epulo +epuration +epyllion +eq +eqpt +equability +equableness +equalisation +equalitarianism +equality +equalization +equalizer +equanimity +equanimousness +equatability +equation +equator +equerry +equestrianism +equestrienne +equiangularity +equidistance +equilibrant +equilibration +equilibrator +equilibrist +equilibrium +equinity +equinox +equipage +equipartition +equipment +equipoise +equipollence +equipollency +equiponderance +equiponderation +equipotentiality +equipper +equiprobabilism +equiprobability +equisetum +equitableness +equitation +equity +equiv +equivalence +equivalency +equivocacy +equivocality +equivocalness +equivocation +equivocator +equivoque +era +eradiation +eradication +eradicator +erasability +eraser +erasion +erasure +erbium +erectility +erection +erectness +erector +eremite +eremitism +eremophyte +erepsin +erethism +erg +ergastoplasm +ergate +ergatocracy +ergocalciferol +ergodicity +ergograph +ergometer +ergometrine +ergonomics +ergonovine +ergosterol +ergot +ergotamine +ergotin +ergotinine +ergotism +ergotoxine +eric +erica +erigeron +eringo +erk +erlking +ermine +ermines +erminois +erne +erodability +erodibility +erodium +erogeneity +erosion +erosiveness +erosivity +erotesis +erotica +eroticism +erotogenesis +erotology +erotomania +erotomaniac +errability +errancy +errand +errantry +errata +erraticism +erratum +erron +erroneousness +error +ers +erubescence +eructation +eruditeness +erudition +eruption +eruptiveness +eruptivity +ervil +eryngo +erysipelas +erysipeloid +erysipelothrix +erythema +erythrism +erythrite +erythritol +erythroblast +erythroblastosis +erythrocyte +erythrocytometer +erythrocytometry +erythromycin +erythrophobia +erythrophyll +erythropoiesis +erythropsin +escadrille +escalade +escalader +escalation +escalator +escallonia +escallop +escalope +escapade +escapee +escapement +escaper +escapeway +escapism +escapologist +escargot +escarole +escarp +escarpment +eschalot +eschar +eschatologist +eschatology +escheat +escheatage +escheator +eschewal +eschewer +escolar +esconson +escritoire +escrow +escuage +escudo +esculent +esculin +escutcheon +eserine +esker +eslisor +esne +esnecy +esonarthex +esophagitis +esophagus +esotericism +esotericist +esoterism +esoterist +esotery +esotropia +esp +espada +espadrille +espagnole +espagnolette +espalier +espantoon +esparto +espauol +espec +especialness +esperance +espial +espionage +esplanade +espousal +espouser +espresso +esprit +esquire +esrog +ess +essay +essayer +essayist +esse +essence +essentialism +essentialist +essentiality +essentialness +essonite +est +estab +establisher +establishment +establishmentarianism +estafette +estamin +estaminet +estampie +estancia +estanciero +estate +ester +esterase +esterification +esthesia +esthesiometer +esthesiometry +esthesis +esthete +esthetician +estheticism +esthetics +estimableness +estimation +estimator +estivation +estivator +estoc +estocada +estoile +estoppage +estoppel +estrade +estradiol +estragon +estrangedness +estrangement +estranger +estray +estreat +estrin +estriol +estrogen +estrone +estrus +estuary +esu +esurience +esuriency +eta +etaerio +etalon +etamine +etc +etcetera +etchant +etcher +etching +eternality +eternalness +eternisation +eternity +eternization +eth +ethal +ethanamide +ethane +ethanediol +ethanethiol +ethanol +ethchlorvynol +ethene +ether +etherealisation +ethereality +etherealization +etherealness +etherialisation +etherialization +etherification +etherization +etherizer +ethic +ethicality +ethicalness +ethician +ethics +ethinamate +ethine +ethnarch +ethnarchy +ethnicity +ethnobotany +ethnocentricity +ethnocentrism +ethnocracy +ethnog +ethnogenist +ethnogeny +ethnographer +ethnography +ethnohistorian +ethnohistory +ethnol +ethnolinguist +ethnolinguistics +ethnologist +ethnology +ethnomusicologist +ethnomusicology +ethnos +ethologist +ethology +ethonone +ethos +ethoxide +ethoxyethane +ethrog +ethyl +ethylation +ethylbenzene +ethyldichloroarsine +ethylenation +ethylene +ethyne +ethynylation +etiologist +etiology +etiquette +etna +etrier +etude +etui +etym +etymologist +etymology +etymon +eu +eubacterium +eucaine +eucalyptol +eucalyptus +eucharis +euchlorine +euchologion +euchology +euchre +euchromatin +euchromosome +euclase +eucrite +eucryptite +eudaemonist +eudemon +eudemonia +eudemonics +eudemonism +eudemonist +eudiometer +eudiometry +euflavine +eugenicist +eugenics +eugenol +euglena +euhemerism +euhemerist +eulachon +eulogia +eulogisation +eulogiser +eulogist +eulogium +eulogization +eulogizer +eulogy +eumelanin +eunomy +euonymus +eupatorium +eupatrid +eupepsia +euphausiid +euphemisation +euphemiser +euphemism +euphemist +euphemization +euphemizer +euphonia +euphonicalness +euphoniousness +euphonium +euphony +euphorbia +euphoria +euphrasy +euphroe +euphuism +euphuist +eupnea +eupnoea +eurhythmics +eurhythmy +euripus +eurithermophile +europium +euryphage +eurypterid +eurythmics +eurythmy +eurytopicity +eusol +eustacy +eutaxy +euthanasia +euthenics +euthenist +eutocia +eutrophication +eutrophy +euxenite +evacuation +evacuator +evacuee +evader +evagination +evaluation +evaluator +evanescence +evangel +evangeliary +evangelicalism +evangelicality +evangelicalness +evangelisation +evangeliser +evangelism +evangelist +evangelistary +evangelization +evangelizer +evaporability +evaporation +evaporator +evaporimeter +evaporite +evapotranspiration +evasion +evasiveness +eve +evection +evener +evenfall +evening +evenness +evensong +event +eventfulness +eventide +eventration +eventuality +eventuation +everglade +everlastingness +eversion +evertor +everydayness +evictee +eviction +evictor +evidence +evidentness +evildoer +evildoing +evilness +evisceration +eviscerator +evocation +evocativeness +evocator +evoker +evolute +evolution +evolutionism +evolutionist +evolvement +evolver +evonymus +evulsion +evzone +ewe +ewer +ewery +exacerbation +exacter +exactingness +exaction +exactitude +exactness +exactor +exaggeration +exaggerator +exaltation +exaltedness +exalter +exam +examen +examinant +examination +examinee +examiner +example +exanimation +exanthem +exanthema +exarch +exarchate +exasperater +exasperation +exc +excardination +excavation +excavator +exceeder +excellence +excellency +exception +exceptionableness +exceptionality +exceptionalness +excerpt +excerpter +excerption +excerptor +excess +excessiveness +exch +exchangeability +exchangee +exchanger +exchequer +excipient +exciple +excipulum +excircle +excise +exciseman +excision +excitability +excitableness +excitation +excitedness +excitement +exciter +exciton +excitor +excl +exclaimer +exclam +exclamation +exclaustration +exclave +exclosure +excludability +excluder +exclusion +exclusioner +exclusionism +exclusiveness +exclusivism +exclusivist +exclusivity +excogitation +excogitator +excommunication +excommunicator +excoriation +excrement +excrescence +excrescency +excreter +excretion +excruciation +excubitorium +excud +excudit +exculpation +excursion +excursionist +excursiveness +excursus +excurvature +excusableness +excusal +excuser +excussio +excussion +exeat +exec +execrableness +execration +execrator +executant +executer +execution +executioner +executive +executiveness +executor +executorship +executrix +exedra +exegesis +exegete +exegetics +exemplar +exemplariness +exemplarism +exemplarity +exemplification +exemplifier +exemplum +exemption +exenteration +exequatur +exequy +exerciser +exercitation +exergue +exertion +exfoliation +exhalation +exhauster +exhaustibility +exhaustion +exhaustiveness +exhaustlessness +exhedra +exhibitant +exhibiter +exhibition +exhibitioner +exhibitionism +exhibitionist +exhibitor +exhilaration +exhilarator +exhortation +exhorter +exhumation +exhumer +exigency +exiguity +exiguousness +exilarch +exile +exiler +exine +existence +existentialism +exister +exit +exitance +exobiologist +exobiology +exocarp +exoderm +exodermis +exodontics +exodontist +exodos +exodus +exoenzyme +exogamy +exogen +exogenism +exon +exonarthex +exoneration +exonerator +exonym +exopeptidase +exoperidium +exophasia +exophthalmos +exoplasm +exopodite +exorability +exorbitance +exorcisement +exorciser +exorcism +exorcist +exorcizer +exordium +exoskeleton +exosmosis +exosphere +exospore +exostosis +exotericism +exothermicity +exoticism +exoticist +exoticness +exotoxin +exotropia +exp +expandability +expandedness +expander +expandibility +expanse +expansibility +expansion +expansionism +expansionist +expansivity +expatiation +expatiator +expatriation +expectancy +expectation +expecter +expectoration +expectorator +expediency +expeditation +expediter +expedition +expeditiousness +expeditor +expellee +expeller +expendability +expender +expenditure +expense +expensiveness +experience +experiencer +experientialism +experientialist +experiment +experimentalism +experimentalist +experimentation +experimentator +experimenter +experimentor +expert +expertise +expertism +expertness +expiation +expiator +expiration +expiree +expirer +expiry +expiscation +explainer +explanation +explanator +explantation +explement +expletive +explicandum +explicans +explication +explicator +explicitness +explodent +exploder +exploit +exploitation +exploiter +exploration +explorer +explosibility +explosimeter +explosion +explosiveness +expo +exponent +export +exportation +exporter +expos +exposa +exposal +exposedness +exposer +exposition +expositor +expostulation +expostulator +exposure +expounder +expressage +expresser +expression +expressionism +expressiveness +expressivity +expressman +expresso +expressor +expressway +expropriation +expropriator +expulsion +expunction +expunger +expurgation +expurgator +exquisiteness +exr +exsanguination +exsanguinity +exsec +exsecant +exsection +exsertion +exsiccation +exsiccator +exsolution +exstrophy +ext +extemporaneity +extemporaneousness +extemporariness +extemporisation +extemporiser +extemporization +extemporizer +extendability +extendedness +extender +extendibility +extensibility +extensibleness +extensimeter +extension +extensionalism +extensionality +extensity +extensiveness +extensivity +extensometer +extensor +extent +extenuation +extenuator +exterior +exteriorisation +exteriorization +extermination +exterminator +extern +externalisation +externalism +externalist +externality +externalization +exteroceptor +exterritoriality +extinction +extine +extinguishant +extinguisher +extinguishment +extirpation +extirpator +extoller +extollment +extolment +extorter +extortion +extortioner +extrabold +extractability +extractant +extractibility +extraction +extractor +extradition +extrados +extraneousness +extraordinariness +extrapolation +extrapolator +extraposition +extrasystole +extraterritoriality +extravagance +extravagancy +extravagantness +extravaganza +extravasation +extraversion +extravert +extremeness +extremism +extremist +extremity +extremum +extrication +extrospection +extroversion +extrovert +extruder +extrusion +exuberance +exudate +exudation +exultation +exurb +exurbanite +exurbia +exuviation +eyalet +eyas +eye +eyeball +eyebar +eyebath +eyebeam +eyebolt +eyebright +eyebrow +eyecup +eyedropper +eyeful +eyeglass +eyeground +eyehole +eyehook +eyelash +eyelet +eyeleteer +eyelid +eyeliner +eyen +eyeopener +eyepiece +eyepit +eyer +eyeservant +eyeservice +eyeshade +eyeshot +eyesight +eyesore +eyespot +eyestalk +eyestone +eyestrain +eyetooth +eyewash +eyewater +eyewink +eyewinker +eyewitness +eyne +eyot +eyra +eyre +eyrie +eyrir +f +fa +fable +fabler +fabliau +fabric +fabricant +fabrication +fabricator +fabulist +fabulousness +faburden +fac +facade +face +facebar +faceplate +facer +facet +faceteness +facetiousness +facia +faciend +facies +facileness +facilitation +facilitator +facility +facing +facsim +facsimile +fact +factice +faction +factionalism +factionalist +factiousness +factitiousness +factor +factorability +factorage +factorial +factoring +factorization +factorship +factory +factotum +factualism +factualist +factuality +factualness +facture +facula +faculty +fad +faddishness +faddism +faddist +fadedness +fader +fading +fado +faena +faence +faerie +faery +fahlband +faiade +failing +failingness +faille +failure +fainaiguer +fainant +faineance +faineancy +fainter +faintheart +faintheartedness +faintishness +faintness +fairbanks +fairground +fairing +fairlead +fairness +fairwater +fairway +fairy +fairyfloss +fairyhood +fairyism +fairyland +faith +faithfulness +faithlessness +faitour +fakeer +fakement +faker +fakery +fakir +falbala +falchion +falcon +falconer +falconet +falconry +falda +falderal +faldstool +fallaciousness +fallacy +fallal +fallalery +faller +fallfish +fallibilism +fallibilist +fallibility +fallibleness +fallout +fallowness +falsehood +falseness +falsetto +falsework +falsie +falsifiability +falsification +falsifier +falsity +faltboat +falterer +falx +fam +famacide +famatinite +fame +familiarisation +familiariser +familiarity +familiarization +familiarizer +familiarness +familism +familist +famille +family +famine +famousness +famulus +fan +fana +fanakalo +fanatic +fanaticalness +fanaticism +fancier +fancifulness +fanciness +fancywork +fandangle +fandango +fane +fanega +fanegada +fanfare +fanfaron +fanfaronade +fanfish +fanfold +fang +fangle +fango +fanion +fanjet +fanleaf +fanlight +fanner +fanny +fanon +fantail +fantasia +fantasist +fantasm +fantasmagoria +fantast +fantasticality +fantasticalness +fantasy +fantigue +fantod +fantom +fanweed +fanwort +faoence +faqir +farad +faraday +faradisation +faradiser +faradism +faradization +faradizer +faradmeter +farandole +farawayness +farce +farcemeat +farcetta +farceur +farceuse +farcicality +farcicalness +farcy +fard +fardel +fare +farer +farewell +farfel +farfetchedness +farina +farkleberry +farl +farm +farmer +farmerette +farmery +farmhouse +farming +farmland +farmstead +farmyard +farnesol +farness +faro +farrago +farrier +farriery +farrow +farseeingness +farseer +farsightedness +fart +farthing +farthingale +fartlek +fascia +fasciation +fascicle +fasciculation +fascicule +fasciculus +fascination +fascinator +fascine +fascioliasis +fascism +fascist +fash +fashion +fashionability +fashionableness +fashioner +fashionmonger +fastback +fastener +fastening +fastidiousness +fastigium +fastness +fat +fatalism +fatalist +fatality +fatalness +fatback +fate +fatefulness +fath +fathead +father +fatherhood +fatherland +fatherliness +fathogram +fathom +fathomer +fathomlessness +fatigability +fatigableness +fatigation +fatigue +fatling +fatness +fats +fatso +fattener +fattest +fattiness +fattishness +fatuitousness +fatuity +fatuousness +fatwa +faubourg +fauces +faucet +fauchard +fauld +fault +faultfinder +faultfinding +faultiness +faultlessness +faun +fauna +fauteuil +fauxbourdon +favella +favellidium +faveolus +favism +favor +favorableness +favoredness +favorer +favorite +favoritism +favosite +favour +favourableness +favouredness +favourer +favouritism +favus +fawn +fawner +fawningness +fay +fayalite +fazenda +fb +fc +fcp +fcs +fe +fealty +fear +fearfulness +fearlessness +fearnought +fearsomeness +feasance +feasibility +feasibleness +feast +feaster +feat +feather +featherback +featherbedding +featherbone +featherbrain +feathercut +featheredge +featherfoil +featherhead +featheriness +feathering +featherlessness +featherstitch +featherweight +featliness +feature +featurette +feazing +febricity +febricula +febrifuge +febrility +febris +fec +fecket +fecklessness +fecula +feculence +fecundation +fecundator +fecundity +fedayee +feddan +fedelini +federacy +federalese +federalisation +federalism +federalist +federalization +federalness +federation +fedora +fee +feebleness +feedback +feedbag +feedbox +feeder +feeding +feedlot +feedstuff +feedwater +feeler +feeling +feelingness +feet +feignedness +feigner +feint +feist +felafel +feldsher +feldspar +felicitation +felicitator +felicitousness +felicity +felid +felineness +felinity +fellah +feller +fellmonger +fellmongering +fellmongery +fellness +felloe +fellow +fellowship +felon +feloniousness +felonry +felony +felsite +felspar +felting +felucca +felwort +fem +femaleness +feme +femerell +femicide +feminacy +femineity +feminie +feminineness +femininity +feminisation +feminism +feminist +feminization +femme +femur +fen +fenagler +fence +fencepost +fencer +fencing +fender +feneration +fenestella +fenestra +fenestration +fenland +fenman +fennec +fennel +fennelflower +fenugreek +feod +feodality +feodary +feoff +feoffee +feoffeeship +feoffer +feoffment +feoffor +feracity +ferbam +fere +feretory +fergusonite +feria +ferity +fermata +ferment +fermentability +fermentation +fermentativeness +fermi +fermion +fermium +fern +fernbrake +fernery +fernseed +ferociousness +ferocity +ferrate +ferret +ferreter +ferriage +ferricyanide +ferrihemoglobin +ferrimagnetism +ferrite +ferritin +ferroalloy +ferroaluminum +ferrocalcite +ferrocene +ferrocerium +ferrochromium +ferroconcrete +ferrocyanide +ferroelectricity +ferromagnet +ferromagnetism +ferromanganese +ferrometer +ferromolybdenum +ferronickel +ferrosilicon +ferrotitanium +ferrotungsten +ferrotype +ferrovanadium +ferrozirconium +ferrule +ferry +ferryboat +ferryman +fertileness +fertilisability +fertilisation +fertiliser +fertility +fertilizability +fertilization +fertilizer +fertilizin +ferula +ferule +ferv +fervency +ferventness +fervidity +fervidness +fervor +fervour +fescue +fess +fesse +festa +festination +festival +festiveness +festivity +festoon +festoonery +festschrift +feta +fetation +fetcher +fete +feterita +fetial +fetich +fetichism +fetichist +feticide +fetidity +fetidness +fetish +fetishism +fetishist +fetlock +fetor +fetter +fetterbush +fetterer +fetterlock +fettling +fettucine +fettucini +fetus +feu +feuage +feuar +feud +feudalisation +feudalism +feudalist +feudality +feudalization +feudatory +feudist +feuilleton +feuilletonism +feuilletonist +fever +feverfew +feverishness +feverroot +feverweed +feverwort +fewness +fewterer +fez +ff +fg +fgn +fi +fiacre +fianca +fiancae +fiance +fianchetto +fiar +fiasco +fiat +fib +fibber +fiber +fiberboard +fiberglass +fiberscope +fibre +fibreboard +fibrefill +fibreglass +fibril +fibrilla +fibrillation +fibrin +fibrinogen +fibrinokinase +fibrinolysin +fibrinolysis +fibro +fibroblast +fibrocartilage +fibrocement +fibroin +fibrolite +fibroma +fibroplasia +fibrosis +fibrositis +fibrousness +fibster +fibula +fice +fiche +fichu +fickleness +fico +fict +fiction +fictionalization +fictioneer +fictioneering +fictionisation +fictionist +fictionization +fictitiousness +fid +fiddle +fiddleback +fiddlehead +fiddleneck +fiddler +fiddlerfish +fiddlestick +fiddlewood +fideicommissary +fideicommissum +fideism +fidelity +fidley +fiduciary +fief +field +fielder +fieldfare +fieldmouse +fieldpiece +fieldsman +fieldstone +fieldwork +fieldworker +fiend +fiendishness +fierceness +fieriness +fiesta +fife +fifer +fifteen +fifty +fig +figeater +fighter +figment +figurant +figuration +figurativeness +figure +figurehead +figurer +figurine +figwort +fike +fikh +fil +fila +filagree +filament +filaria +filariasis +filasse +filature +filbert +filcher +file +filecard +filefish +filename +filer +filet +filialness +filiation +filibeg +filibuster +filibusterer +filibusterism +filicide +filigrain +filigree +filioque +filister +fillagree +fille +filler +fillet +filleting +filling +fillingness +fillip +fillipeen +fillister +filly +film +filmdom +filmgoer +filminess +filming +filmland +filmmaking +filmography +filmsetting +filmstrip +filoplume +filoselle +fils +filt +filter +filterability +filterableness +filterer +filth +filthiness +filtrability +filtrate +filtration +filum +fimble +fimbria +fimbriation +fin +finableness +finagler +finale +finalis +finalism +finalist +finality +finalization +finance +financier +finback +finca +finch +finder +finding +fine +fineableness +fineness +finery +finesse +finestra +finfoot +finger +fingerboard +fingerbreadth +fingerer +fingerflower +fingerling +fingermark +fingernail +fingerprint +fingerstall +fingertip +finial +finicality +finicalness +fining +finis +finisher +finiteness +finitude +fink +finlet +finmark +finner +finnmark +fino +finochio +finspot +fiord +fiorin +fioritura +fipple +fiqh +fir +fire +firearm +fireback +fireball +firebase +firebird +fireboard +fireboat +firebomb +firebox +firebrand +firebrat +firebreak +firebrick +firebug +firecracker +firecrest +firedamp +firedog +firedrake +fireflaught +firefly +fireguard +firehouse +firelight +firelock +fireman +firepan +fireplace +fireplug +firepower +fireproofing +firer +fireside +firestone +firestorm +firethorn +firetrap +firewarden +firewater +fireweed +firewood +firework +fireworm +firing +firkin +firmament +firman +firmness +firmware +firn +firnification +firstling +firth +fisc +fish +fishbolt +fishbowl +fisher +fisherman +fishery +fisheye +fishfinger +fishgig +fishhook +fishiness +fishing +fishline +fishmonger +fishnet +fishplate +fishpond +fishpound +fishtail +fishwife +fishworm +fishyback +fishybacking +fission +fissionability +fissiparousness +fissure +fist +fistfight +fistful +fistiana +fisticuff +fisticuffer +fistmele +fistnote +fistula +fistulization +fit +fitch +fitchew +fitfulness +fitment +fitness +fittedness +fitter +fittingness +five +fivepins +fiver +fives +fixation +fixedness +fixer +fixing +fixity +fixture +fixure +fizgig +fizzer +fizzwater +fjeld +fjord +fl +flab +flabbiness +flabellum +flaccidity +flaccidness +flache +flachette +flack +flacon +flag +flagella +flagellant +flagellantism +flagellation +flagellator +flagellum +flageolet +flagfish +flagger +flagging +flagitiousness +flagman +flagon +flagpole +flagrance +flagrancy +flagrantness +flagship +flagstaff +flagstone +flail +flair +flak +flake +flakeboard +flakelet +flaker +flakiness +flam +flambeau +flamboyance +flamboyancy +flame +flamefish +flameholder +flamen +flamenco +flameout +flamer +flamethrower +flamingo +flammability +flan +flanch +flanchard +flange +flanger +flangeway +flank +flanker +flannel +flannelboard +flannelet +flannelette +flannelleaf +flannelmouth +flanning +flapdoodle +flapdragon +flaperon +flapjack +flapper +flapperdom +flapperism +flaps +flareback +flash +flashback +flashboard +flashbulb +flashcube +flasher +flashiness +flashing +flashlight +flashover +flashtube +flask +flasket +flatboat +flatbread +flatcar +flatette +flatfish +flatfoot +flatfootedness +flathead +flatiron +flatlet +flatmate +flatness +flattener +flatterer +flattery +flattest +flattie +flatting +flattop +flatulence +flatulency +flatus +flatware +flatwoods +flatwork +flatworm +flaubert +flaunch +flaunter +flauntiness +flautist +flav +flavin +flavine +flavobacterium +flavone +flavonol +flavoprotein +flavopurpurin +flavor +flavoring +flavour +flavouring +flaw +flawedness +flawlessness +flax +flaxseed +flayer +flchette +fld +fldxt +flea +fleabag +fleabane +fleabite +fleam +fleapit +fleawort +fleck +flection +fledgling +fleece +fleecer +fleeciness +fleet +fleetingly +fleetingness +fleetness +flenerie +fleneur +flenser +flesh +flesher +fleshhook +fleshiness +fleshliness +fleshpot +fletcher +fleurette +fleuron +flews +flex +flexibility +flexibleness +flexility +flexion +flexitime +flexo +flexography +flexor +flexuoseness +flexuosity +flexuousness +flexure +fleyedness +flibbertigibbet +flicflac +flickertail +flier +flight +flightiness +flimflam +flimflammer +flimsiness +flincher +flinger +flint +flinthead +flintiness +flintlock +flippancy +flippantness +flipper +flirtation +flirtatiousness +flitch +flitchplate +fliting +flittermouse +flivver +flneur +floatability +floatage +floatation +floater +floatman +floatplane +floatstone +floc +floccillation +flocculant +flocculation +flocculator +floccule +flocculence +flocculency +flocculus +floccus +flock +flockbed +floe +floeberg +flogger +flogging +flong +flood +floodgate +floodlight +floodwater +floor +floorage +floorboard +floorcloth +floorer +flooring +floorman +floorwalker +floozy +flophouse +flopover +flopper +floppiness +flor +flora +flores +florescence +floret +floribunda +florican +floriculture +floriculturist +floridity +floridness +floriferousness +florigen +florilegium +florin +florist +floristics +floss +flosser +flotage +flotation +flotilla +flotsam +flouncing +flour +flourisher +flouter +flowage +flower +flowerage +flowerbed +flowerer +floweret +floweriness +flowerlessness +flowerlet +flowerpecker +flowerpot +flowingness +flrie +flu +flubdub +fluctuation +flue +fluency +fluentness +fluff +fluffer +fluffiness +flugelhorn +flugelman +fluid +fluidextract +fluidics +fluidisation +fluidiser +fluidity +fluidization +fluidizer +fluidness +fluke +flukiness +flume +flummery +flunkey +flunkeyism +flunky +flunkyism +fluoborate +fluophosphate +fluor +fluorene +fluorescein +fluorescence +fluoridation +fluoride +fluoridisation +fluoridization +fluorimeter +fluorination +fluorine +fluorite +fluorocarbon +fluorometer +fluorometry +fluorophosphate +fluoroscope +fluoroscopy +fluorosis +fluosilicate +flurry +flusher +flushness +flusteration +flustration +flute +fluter +fluting +flutist +flutterboard +flutterer +flux +fluxgraph +fluxion +fluxmeter +fluyt +flyability +flyback +flybelt +flyboat +flybook +flyboy +flyby +flycatcher +flyer +flyleaf +flyman +flyoff +flyover +flypaper +flyspeck +flytrap +flyway +flyweight +flywheel +fm +fn +fo +foal +foam +foamflower +foaminess +fob +focalisation +focalization +foci +focometer +focus +focuser +fodder +foe +foehn +foeman +foetation +foeticide +foetor +foetus +fog +fogbow +fogdog +fogey +foggage +fogginess +foghorn +fogram +fogy +fogyism +foible +foilsman +foin +foison +fol +folacin +foldboat +folder +folderol +foldout +folia +foliaceousness +foliage +foliation +foliature +folie +folio +foliole +foliot +folium +folk +folkishness +folklore +folklorist +folkmoot +folkright +folksay +folksiness +foll +follicle +folliculin +folliculitis +follis +follower +folly +fomentation +fomenter +fomes +fond +fondant +fondler +fondness +fondue +font +fontanel +fontanelle +fontange +food +foodlessness +foodstuff +foofaraw +fool +foolery +foolfish +foolhardiness +foolishness +foolscap +foot +footage +football +footboard +footboy +footbridge +footcloth +footer +footfall +footgear +foothill +foothold +footie +footing +footlight +footlocker +footmaker +footman +footmark +footnote +footpace +footpad +footpath +footplate +footprint +footrest +footrope +footscraper +footsie +footsoreness +footstalk +footstall +footstep +footstock +footstone +footstool +footwall +footway +footwear +footwork +footy +fop +foppery +foppishness +forage +forager +foramen +foramination +foraminifer +foray +forayer +forb +forbearance +forbearer +forbiddance +forbiddenness +forbidder +forbiddingness +force +forcedness +forcefulness +forcemeat +forceps +forcer +forcibility +forcibleness +forcipressure +ford +forearm +forebear +foreboder +foreboding +forebodingness +forebody +forebrain +forecaddie +forecaster +forecastle +forechoir +foreclosure +foreconscious +forecourse +forecourt +foredeck +forefather +forefinger +forefoot +forefront +foregift +foreglimpse +foregoer +foregoneness +foreground +foregut +forehandedness +forehead +forehearth +forehock +foreigner +foreignism +foreignness +forejudger +foreknower +foreknowledge +forel +forelady +foreland +foreleg +forelimb +forelock +foreman +foremanship +foremast +forename +forenoon +forensicality +forensics +foreordainment +foreordination +forepart +forepaw +forepeak +foreplay +forepleasure +forepole +forequarter +forerake +forerunner +foresaddle +foresail +foreseeability +foreseer +foreshadower +foreshank +foresheet +foreshock +foreshore +foreside +foresight +foresightedness +foreskin +foresleeve +forest +forestaff +forestage +forestaller +forestallment +forestalment +forestation +forestay +forestaysail +forester +forestick +forestry +foretaste +foreteller +forethought +forethoughtfulness +foretime +foretoken +foretooth +foretop +foretriangle +forewarner +forewind +forewing +forewoman +foreword +foreyard +forfeit +forfeiter +forfeiture +forge +forger +forgery +forgetfulness +forgetter +forgettery +forging +forgiveness +forgiver +forgivingness +forgoer +forint +forjudgment +fork +forkedness +forkiness +forklift +forlana +forlornness +form +formability +formaldehyde +formalin +formalisation +formaliser +formalism +formalist +formality +formalization +formalizer +formalness +formant +format +formate +formation +formativeness +formboard +forme +formeret +formicarium +formicary +formication +formidability +formidableness +formlessness +formnail +formol +formula +formularisation +formulariser +formularization +formularizer +formulary +formulation +formulator +formulisation +formuliser +formulism +formulist +formulization +formulizer +formwork +formyl +formylation +fornent +fornication +fornicator +fornicatrix +fornix +forrel +forsakenness +forsaker +forsterite +forswearer +forswornness +forsythia +fort +fortalice +forte +fortepiano +forthcomingness +forthrightness +fortification +fortifier +fortitude +fortnight +fortress +fortuitism +fortuitist +fortuitousness +fortuity +fortunateness +fortune +fortuneteller +fortunetelling +forty +forum +forwarder +forwarding +forwardness +fossa +fossarian +fosse +fossette +fossicker +fossil +fossilisation +fossilization +fossor +fossula +fosterage +fosterer +fosterling +fouett +fouetta +foulard +foulbrood +foulmart +foulness +fouls +foumart +foundation +founder +foundling +foundry +fount +fountain +fountainhead +four +fourbagger +fourchette +fourflusher +fourgon +fourpence +fourposter +fourrag +fourragare +foursome +foursquareness +fourteen +fourteener +fouter +fovea +foveola +foveole +fowl +fowler +fowling +fox +foxberry +foxfire +foxglove +foxhole +foxhound +foxiness +foxing +foxtail +foxtrot +foy +foyboat +foyer +foziness +fp +fpm +fps +fpsps +fr +fracas +fractable +fraction +fractionation +fractionator +fractionisation +fractionization +fractiousness +fractocumulus +fractostratus +fracture +fraenulum +fraenum +fragging +fragileness +fragility +fragment +fragmentariness +fragmentation +fragmentisation +fragmentization +fragrance +fragrancy +fragrantness +frailero +frailness +frailty +fraise +framableness +frambesia +framboesia +framboise +frame +frameableness +framer +framework +framing +franc +franchise +franchisement +franchiser +francium +francolin +francophone +franger +frangibility +frangibleness +frangipane +frangipani +frankalmoign +franker +frankforter +frankfurter +frankincense +franklin +franklinite +frankness +frankpledge +franticness +frapp +frappa +frare +frass +frat +fratcher +fratching +frater +fraternalism +fraternisation +fraterniser +fraternity +fraternization +fraternizer +fratricide +fratry +fraud +fraudulency +fraxinella +fray +frazil +freak +freakiness +freakishness +freckle +freebie +freeboard +freebooter +freebooty +freedman +freedom +freedwoman +freehold +freeholder +freelance +freeloader +freeloading +freeman +freemartin +freemason +freemasonry +freeness +freesheet +freesia +freestone +freestyle +freethinker +freetrader +freeway +freewheel +freewheeler +freezer +freight +freightage +freighter +freightliner +fremdness +fremitus +frenulum +frenum +frenzy +freq +frequency +frequentation +frequenter +frequentness +fresco +frescoer +freshener +fresher +freshet +freshman +freshmanship +freshness +freshwater +fresnel +fresser +fretfulness +fretwork +friability +friableness +friar +friarbird +friary +fribbler +fricandeau +fricando +fricassee +frication +fricative +friction +fridge +friedcake +friend +friendlessness +friendliness +friendship +frier +fries +frieze +friezing +frigate +frigger +fright +frightener +frightfulness +frigidarium +frigidity +frigidness +frigidoreceptor +frijol +frill +friller +frilling +fringe +fringehead +frippery +frippet +fris +frisa +frisette +friseur +frisker +frisket +friskiness +frisson +frit +frith +frithstool +fritillaria +fritillary +fritterer +fritz +frivoler +frivolity +frivoller +frivolousness +frizer +frizette +frizzer +frizziness +frizzler +frock +frocking +froe +frog +frogbit +frogeye +frogfish +frogging +froghopper +frogman +frogmarch +frogmouth +frogspawn +frolic +frolicker +frolicsomeness +fromage +fromenty +frond +frondescence +frons +front +frontage +frontality +frontier +frontiersman +frontis +frontispiece +frontlash +frontlessness +frontlet +frontogenesis +frontolysis +fronton +frontrunner +frontstall +frosh +frost +frostbite +frostbiter +frostbiting +frostfish +frostflower +frostiness +frosting +frostwork +froth +frother +frothiness +frottage +frotteur +frottola +froufrou +frounce +frow +frowardness +frowner +frowsiness +frowst +frowstiness +frowziness +frozenness +frs +frt +fructification +fructifier +fructosan +fructose +fructoside +fructuousness +frug +frugality +frugalness +fruit +fruitage +fruitarian +fruitcake +fruiter +fruiterer +fruitery +fruitfulness +fruitiness +fruition +fruitlessness +fruitwood +frump +frumpiness +frumpishness +frustrater +frustration +frustule +frustulum +frustum +frutescence +fryer +fs +ft +fth +fuage +fuchsia +fuchsin +fuchsite +fucus +fudge +fuel +fueler +fueller +fug +fugaciousness +fugacity +fugard +fugate +fughetta +fugio +fugitive +fugitiveness +fugitivity +fugleman +fugu +fugue +fuguist +fuhn +fulcrum +fulfiller +fulfillment +fulgentness +fulgor +fulguration +fulgurite +fulham +fuliginousness +fullam +fullback +fuller +fullface +fullness +fullom +fulmar +fulmination +fulminator +fulness +fulsomeness +fumage +fumarole +fumatorium +fumbler +fumblingness +fumer +fumet +fumeuse +fumigant +fumigation +fumigator +fumitory +fun +funambulism +funambulist +function +functionalism +functionalist +functionary +functor +fund +fundament +fundamentalism +fundamentalist +fundamentality +fundamentalness +fundi +fundus +funeral +funfair +funfest +fungi +fungibility +fungible +fungicide +fungistat +fungitoxicity +fungo +fungosity +fungus +funicle +funicular +funiculus +funk +funker +funkia +funned +funnel +funniness +funning +funnyman +funster +fur +furaldehyde +furan +furbelow +furbisher +furcation +furcula +furculum +furfur +furfural +furfuraldehyde +furfuran +furfurol +furiant +furiousness +furlana +furler +furlong +furlough +furmenty +furmint +furnace +furnisher +furnishing +furnit +furniture +furor +furore +furphy +furrier +furriery +furriness +furring +furrow +furrower +furtherance +furtherer +furtiveness +furuncle +furunculosis +fury +furze +fusain +fusarole +fuse +fusee +fuselage +fusetron +fusibility +fusibleness +fusil +fusilier +fusillade +fusion +fusionism +fusionist +fusobacterium +fuss +fussbudget +fusser +fussiness +fusspot +fustanella +fustet +fustian +fustic +fustigation +fustigator +fustinella +fustiness +fusula +fusuma +fut +futhark +futileness +futilitarianism +futility +futtock +futurama +future +futurism +futurity +futurology +fuze +fuzee +fuzz +fuzzball +fuzziness +fv +fw +fwd +fyke +fylfot +fyrd +fytte +g +ga +gabardine +gabbard +gabber +gabbler +gabbro +gabelle +gaberdine +gaberlunzie +gabfest +gabion +gabionade +gable +gablet +gaboon +gaby +gadabout +gadder +gaddi +gadfly +gadget +gadgeteer +gadgetry +gadid +gadling +gadolinite +gadolinium +gadroon +gadroonage +gadrooning +gadwall +gaff +gaffe +gaffer +gaffsail +gage +gager +gagger +gagman +gagroot +gagster +gahnite +gaiety +gaillard +gaillardia +gaine +gainer +gainfulness +gainlessness +gainliness +gainsayer +gait +gaiter +gal +gala +galactan +galactin +galactite +galactometer +galactometry +galactophore +galactopoiesis +galactosan +galactoscope +galactose +galago +galah +galangal +galantine +galatea +galatine +galax +galaxy +galbanum +gale +galea +galeas +galeass +galeeny +galena +galenical +galenite +galet +galilee +galimatias +galingale +galiot +galipot +gall +gallantness +gallantry +gallate +gallbladder +galleass +galleon +gallery +galleryite +gallet +galleting +galley +gallfly +galliard +galliardise +galliass +gallimaufry +gallinacean +gallingness +gallinipper +gallinule +galliot +gallipot +gallium +gallivanter +galliwasp +gallnut +galloglass +gallon +gallonage +galloon +galloot +gallopade +galloper +gallowglass +gallows +gallstone +galoot +galop +galosh +galoubet +gals +galvanisation +galvaniser +galvanism +galvanization +galvanizer +galvanocautery +galvanometer +galvanometry +galvanoplastics +galvanoplasty +galvanoscope +galvanotaxis +galvanothermy +galvanotropism +galvo +galvvanoscopy +galyak +gam +gamb +gamba +gambado +gambeson +gambier +gambit +gambler +gamboge +gambrel +gambusia +game +gamebag +gamecock +gamekeeper +gamekeeping +gamelan +gameness +gamer +gamesmanship +gamesomeness +gamest +gamester +gametangium +gamete +gametocyte +gametogenesis +gametophore +gametophyte +gamin +gamine +gaminess +gaming +gamma +gammadion +gammer +gammon +gammoner +gammoning +gamogenesis +gamone +gamp +gamut +gander +ganef +gang +gangbang +gangboard +ganger +gangland +ganglia +ganglion +ganglionectomy +ganglioside +gangplank +gangrel +gangrene +gangster +gangue +gangway +ganister +ganja +gannet +ganoblast +ganof +ganoin +ganosis +gansey +gantlet +gantline +gantlope +gantry +gaol +gaolbird +gaoler +gap +gaper +gapes +gapeseed +gapeworm +gaposis +gapping +gar +garage +garb +garbage +garbanzo +garbler +garbo +garboard +garboil +garcon +gardbrace +garden +gardener +gardenia +gardening +garderobe +gare +garefowl +garfish +garg +garganey +garget +gargler +gargoyle +gargoylism +garibaldi +garion +garishness +garland +garlic +garment +garnet +garnetter +garnierite +garnishee +garnisher +garnishment +garniture +garote +garoter +garotte +garotter +garpike +garret +garreteer +garrison +garrot +garrote +garroter +garrotte +garrotter +garrulity +garrulousness +garrya +garter +garth +garvey +gas +gasbag +gascon +gasconade +gasconader +gaseity +gaselier +gaseousness +gasholder +gasification +gasifier +gasket +gaskin +gaslight +gasman +gasogene +gasolier +gasoline +gasometer +gasometry +gasper +gaspereau +gaspergou +gasser +gassiness +gassing +gassit +gaster +gasteropod +gasthaus +gastightness +gastralgia +gastrectasia +gastrectomy +gastrin +gastritis +gastrocnemius +gastrodermis +gastroduodenostomy +gastroenteritis +gastroenterologist +gastroenterology +gastroenterostomy +gastrojejunostomy +gastrolith +gastrologist +gastrology +gastronome +gastronomy +gastropod +gastroschisis +gastroscope +gastroscopy +gastrostomy +gastrotomy +gastrotrich +gastrula +gastrulation +gasworks +gata +gate +gateau +gatefold +gatehouse +gatekeeper +gateman +gatepost +gater +gateway +gatherer +gathering +gator +gaucheness +gaucherie +gaucho +gaud +gaudeamus +gaudery +gaudiness +gauffer +gauffering +gauger +gaultheria +gauntlet +gauntness +gauntry +gaur +gauss +gaussmeter +gauze +gauziness +gavage +gavel +gavelkind +gavelock +gavial +gavotte +gaw +gawk +gawkiness +gawkishness +gayal +gayatri +gayety +gaylussite +gayness +gaz +gazabo +gazebo +gazehound +gazelle +gazer +gazette +gazetteer +gazogene +gazpacho +gd +gds +ge +gean +geanticline +gear +gearbox +gearing +gearshift +gearwheel +geb +geck +gecko +gedact +geegaw +geek +geepound +geese +geest +geezer +gegenion +gegenschein +gehlenite +geisha +geison +geitonogamy +gel +gelada +gelatification +gelatin +gelatination +gelatinisation +gelatiniser +gelatinity +gelatinization +gelatinizer +gelatinousness +gelation +gelder +geldesprung +gelding +gelechiid +gelendeleufer +gelendesprung +gelidity +gelidness +gelignite +gelsemium +gem +gemeinschaft +gemel +gemination +gemini +gemma +gemmation +gemmed +gemminess +gemming +gemmiparity +gemmologist +gemmulation +gemmule +gemologist +gemology +gemot +gempylid +gems +gemsbok +gemsbuck +gemstone +gen +gena +genappe +gendarme +gendarmerie +gender +gene +geneal +genealogist +genealogy +genearch +genera +generability +generableness +generalcy +generalisation +generaliser +generalissimo +generalist +generality +generalization +generalizer +generalness +generalship +generation +generativeness +generator +generatrix +genericalness +generosity +generousness +genesic +genesis +genet +genethlialogy +geneticist +genetics +geneva +geniality +genialness +geniculation +genie +genii +genip +genipap +genista +genit +genitor +geniture +genius +genizah +genoa +genocide +genome +genotype +genre +genro +gens +genseng +gent +genteelism +genteelness +gentian +gentianella +gentilesse +gentilism +gentility +gentisate +gentisin +gentlehood +gentleman +gentlemanliness +gentleness +gentlewoman +gentrification +gentry +gents +genu +genuflection +genuflector +genuineness +genus +geochemist +geochemistry +geochronologist +geochronology +geod +geode +geodesist +geodesy +geodynamicist +geodynamics +geog +geognosy +geographer +geography +geoid +geoisotherm +geol +geologise +geology +geom +geomagnetician +geomagnetism +geomagnetist +geomancer +geomancy +geomechanics +geomedicine +geometer +geometrician +geometrid +geometry +geomorphologist +geomorphology +geophagist +geophagy +geophysicist +geophysics +geophyte +geopolitician +geopolitics +geopolitist +geoponics +geopotential +georama +georgette +geoscience +geosphere +geostatics +geostrategy +geosyncline +geotaxis +geotropism +ger +gerah +geranial +geraniol +geranium +geratology +gerbil +gerefa +gerent +gerenuk +gerfalcon +geriatrician +geriatrics +geriatrist +germ +german +germander +germaneness +germanite +germanium +germen +germicide +germinance +germinancy +germination +germinator +gerodontics +gerontine +gerontocracy +gerontologist +gerontology +gerrymanderer +gersdorffite +gertrude +gerund +gerundive +gervais +gesellschaft +gesith +gesso +gest +gestalt +gestation +geste +gesticulation +gesticulator +gestion +gesture +gesturer +getatability +getatableness +getaway +getter +gettering +getup +geum +gewgaw +geyser +geyserite +ggr +ghain +gharial +gharry +ghastfulness +ghastliness +ghat +ghaut +ghazal +ghazi +ghee +gherao +gherkin +ghetto +ghibellinism +ghibli +ghillie +ghost +ghostdom +ghostfish +ghostliness +ghoul +ghoulishness +ghyll +gi +giant +giantess +giantism +giaour +gib +gibberellin +gibberish +gibbet +gibbon +gibboseness +gibbosity +gibbousness +gibbsite +giber +giblet +gibli +gibus +gid +giddiness +gidgee +gift +giftedness +giftwrapping +gig +gigacycle +gigahertz +gigameter +giganticness +gigantism +gigantomachia +gigantomachy +gigasecond +gigaton +gigawatt +giggler +giglet +gigolo +gigot +gigsman +gigue +gilbert +gilder +gildhall +gilding +gildsman +giles +gilet +gilgai +gilgul +gilguy +gill +gillie +gilling +gillion +gilly +gillyflower +gilsonite +gilthead +gimcrackery +gimel +gimlet +gimmal +gimmick +gimmickry +gimp +gin +ginep +gingal +gingeli +gingelly +ginger +gingerbread +gingerliness +gingersnap +gingham +gingili +gingiva +gingivitis +ginglymus +gink +ginkgo +ginnel +ginner +ginnery +ginseng +ginzo +gipon +gipper +gippy +gipsydom +gipsyhood +gipsyism +gipsywort +giraffe +girandole +girasol +girder +girdering +girdle +girdlecake +girdler +girl +girlfriend +girlhood +girlie +girlishness +girn +giro +giron +girosol +girouette +girth +girthline +gisant +gisarme +gist +git +gitim +gittern +giveaway +giver +gizmo +gizzard +gl +glabella +glabellum +glacialist +glaciation +glacier +glaciologist +glaciology +glacis +gladdener +gladdon +glade +gladiator +gladiola +gladiolus +gladius +gladness +gladsomeness +glaiketness +glaikitness +glair +glaire +glairiness +glaive +glamor +glamorization +glamorizer +glamorousness +glamour +glamourization +glamourizer +glamourousness +gland +glanders +glandule +glandulousness +glans +glariness +glaringness +glass +glassblowing +glassful +glasshouse +glassine +glassiness +glassmaker +glassmaking +glassman +glassware +glasswork +glassworker +glassworks +glasswort +glauberite +glaucescence +glaucodote +glaucoma +glauconite +glaucophane +glave +glazement +glazer +glazier +glaziery +glaziness +glazing +glb +gleam +gleaner +gleaning +gleba +glebe +glede +glee +gleed +gleefulness +gleek +gleeman +gleesomeness +gleet +glegness +glen +glengarry +gley +glia +gliadin +glibness +glidder +glider +gliff +glim +glime +glimmering +glimpse +glimpser +glioma +glisk +glissade +glissader +glissando +gloam +gloaming +gloater +glob +globe +globefish +globeflower +globetrotter +globetrotting +globigerina +globin +globoseness +globosity +globularity +globularness +globule +globulin +glochidium +glochis +glockenspiel +glogg +glomeration +glomerule +glomerulonephritis +glomerulus +glomus +glonoin +gloom +gloominess +glooming +glop +gloria +glorification +glorifier +gloriole +gloriousness +glory +gloss +glossa +glossarist +glossary +glossator +glossectomy +glossematics +glosseme +glosser +glossiness +glossitis +glossmeter +glossographer +glossography +glossolalia +glossolalist +glossologist +glossology +glossotomy +glost +glottalization +glottis +glottochronology +glottogony +glottologist +glottology +glove +gloveman +glover +glow +glowfly +glowworm +gloxinia +glt +glucagon +glucide +glucinum +glucocorticord +glucogenesis +gluconeogenesis +gluconokinase +glucoprotein +glucosan +glucose +glucoside +glucosulfone +glucosuria +glucuronide +glue +gluepot +gluer +glueyness +glume +glumness +glumpiness +gluon +gluside +glut +glutamate +glutamine +glutathione +glutelin +gluten +glutethimide +gluteus +glutin +glutinant +glutinosity +glutinousness +glutose +glutton +gluttonousness +gluttony +glyc +glycemia +glyceraldehyde +glyceride +glycerin +glycerinate +glycerine +glycerite +glycerol +glycerolysis +glyceryl +glycine +glycocoll +glycogen +glycogenase +glycogenesis +glycogenolysis +glycogenosis +glycogeny +glycol +glycolipid +glycolysis +glyconeogenesis +glycopeptide +glycopexis +glycoprotein +glycoside +glycosuria +glycuronide +glyoxaline +glyph +glyphograph +glyphographer +glyphography +glyptal +glyptics +glyptodont +glyptograph +glyptographer +glyptography +gm +gnamma +gnarl +gnarliness +gnat +gnatcatcher +gnateater +gnathion +gnathite +gnawer +gnawing +gneiss +gnome +gnomist +gnomologist +gnomology +gnomon +gnosis +gnotobiosis +gnotobiote +gnotobiotics +gnu +go +goa +goad +goaf +goal +goalie +goalkeeper +goalkeeping +goalmouth +goaltender +goanna +goat +goatee +goatfish +goatherd +goatishness +goatpox +goatsbeard +goatskin +goaves +gob +gobang +gobbet +gobbledegook +gobbler +goblet +goblin +gobo +gobstopper +goby +god +godchild +goddaughter +godded +goddess +goddesshood +goddessship +godding +godendag +godet +godetia +godfather +godhood +godlessness +godlikeness +godliness +godling +godmother +godown +godparent +godroon +godsend +godship +godson +godwit +goer +goethite +gofer +goffer +goffering +gogga +gogglebox +goggler +goglet +gogo +goi +going +goiter +goitre +gold +goldbeater +goldbeating +goldbrick +goldbricker +goldcrest +goldcup +goldeneye +goldenness +goldenrod +goldenseal +goldeye +goldfields +goldfinch +goldfinny +goldfish +goldilocks +goldminer +goldsmith +goldstone +goldthread +goldurn +golem +golf +golfer +goliard +goliardery +golilla +golliwog +golliwogg +gollywobbler +golosh +golp +gombeen +gombo +gombroon +gomerel +gomphosis +gomuti +gonad +gonadotrope +gonadotropin +gonangium +gondola +gondoletta +gondolier +goneness +goner +gonfalon +gonfalonier +gonfanon +gong +goniatite +gonidium +gonif +goniometer +goniometry +gonion +gonium +gonk +gonococcus +gonocyte +gonof +gonoph +gonophore +gonopodium +gonopore +gonorrhea +gonorrhoea +gonotheca +gonyaulax +gonycampsis +gonys +goo +goober +goodbye +goodheartedness +goodliness +goodman +goodness +goodwife +goodwill +goodwily +goof +goofball +goofiness +goog +googly +googol +googolplex +gook +goon +goonda +goop +goosander +goose +gooseberry +goosefish +goosefoot +goosegog +goosegrass +gooseherd +gooseneck +goosewing +gopak +gopher +gopherberry +gopherwood +goral +gorbelly +gorcock +gore +gorge +gorgeousness +gorger +gorgerin +gorget +gorgoneion +gorgonian +gorhen +gorilla +goriness +goring +gormand +gormandiser +gormandism +gormandizer +gorse +goshawk +goshenite +gosling +gosmore +gospel +gospeler +gospeller +gospodin +gosport +gossamer +gossan +gossip +gossipiness +gossipmonger +gossipred +gossipry +gossoon +gossypose +gotra +gouache +gouger +goujon +goulash +gourami +gourd +gourde +gourmand +gourmandise +gourmandism +gourmet +gout +goutiness +goutte +goutweed +gouvernante +gov +governability +governableness +governance +governess +government +governor +governorship +gowan +gowd +gowk +gown +gownsman +goy +gpad +gpcd +gpd +gph +gpm +gps +gr +grabber +grabbler +graben +grace +gracefulness +gracelessness +gracileness +gracilis +gracility +graciosity +gracioso +graciousness +grackle +grad +gradation +grade +grademark +grader +gradient +gradienter +gradin +gradualism +gradualist +gradualness +graduand +graduate +graduation +graduator +gradus +graffito +graft +graftage +grafter +grafting +grager +graham +grahamite +grain +grainedness +grainer +grainfield +graininess +graining +grains +gram +grama +gramarye +gramicidin +gramineousness +grammalogue +grammar +grammarian +grammaticality +grammaticalness +grammaticism +grammatology +gramme +gramophone +gramps +grampus +granadilla +granary +grandam +grandaunt +grandchild +granddad +granddaddy +granddaughter +grandee +grandeeship +grandeur +grandfather +grandiloquence +grandiosity +grandma +grandmamma +grandmaster +grandmother +grandmotherliness +grandnephew +grandness +grandniece +grandpa +grandpapa +grandparent +grandrelle +grandsire +grandson +grandstand +grandstander +granduncle +grange +grangerisation +grangeriser +grangerism +grangerization +grangerizer +granite +graniteware +granitite +granitization +granivore +granny +granodiorite +granolith +granophyre +grantee +granter +grantor +granularity +granulater +granulation +granulator +granule +granulite +granuloblast +granulocyte +granuloma +granulomatosis +granum +grape +grapefruit +grapeline +grapery +grapes +grapeshot +grapestone +grapevine +graph +grapheme +graphemics +graphicalness +graphicness +graphics +graphite +graphitization +graphologist +graphology +graphonomy +grapnel +grappa +grappler +grappling +graptolite +grasper +graspingness +grass +grasscutter +grasserie +grassfinch +grasshook +grasshopper +grassiness +grassland +grassplot +grassquit +grasswidowhood +gratefulness +grater +graticule +gratification +gratifier +gratin +grating +gratitude +gratuitousness +gratuity +gratulation +graupel +grav +gravamen +grave +gravedigger +gravel +graveldiver +gravelweed +graveness +graver +graverobber +graverobbing +gravestone +graveyard +gravicembalo +gravidity +gravidness +gravimeter +gravimetry +gravitater +gravitation +graviton +gravity +gravure +gravy +grayback +graybeard +grayfish +grayhound +graylag +grayling +graysby +graywacke +graywether +grazer +grazier +grazing +grease +greaseball +greasebush +greaselessness +greasepaint +greaser +greasewood +greasiness +greatcoat +greatheartedness +greatness +greave +grebe +grecale +gree +greed +greediness +green +greenage +greenback +greenboard +greenbottle +greenbrier +greenery +greenfinch +greenfish +greenfly +greengage +greengrocer +greengrocery +greenhead +greenheart +greenhorn +greenhornism +greenhouse +greening +greenkeeper +greenlet +greenling +greenness +greenockite +greenroom +greensand +greenshank +greensickness +greenskeeper +greenstone +greenstuff +greensward +greenth +greenwood +greeter +greeting +gregale +gregarine +gregariousness +gregorianist +greisen +gremial +gremlin +grenade +grenadier +grenadiership +grenadine +grewsomeness +grex +greyback +greybeard +greyhen +greyhound +greylag +greyness +greywacke +gribble +grice +grid +gridder +griddle +griddlecake +gridiron +grief +grieflessness +griege +grieshoch +grievance +griever +grievousness +griff +griffe +griffin +griffinage +griffinhood +griffinism +griffon +grift +grifter +grig +grigri +grillade +grillage +grille +griller +grillroom +grillwork +grilse +grimace +grimacer +grimalkin +grime +griminess +grimness +grindelia +grinder +grindery +grindle +grindstone +gringo +grinner +grip +griper +gripman +grippe +gripper +grippingness +gripsack +grisaille +griseofulvin +grisette +griskin +grisliness +grison +grist +grister +gristle +gristliness +gristmill +gristmiller +gristmilling +grit +grith +gritter +grittiness +grivation +grivet +grizzler +grizzling +gro +groan +groaner +groat +grocer +grocery +groceryman +grockle +grog +groggery +grogginess +grogram +grogshop +groin +groining +groma +grommet +gromwell +groom +groomer +groomsman +groove +groover +groper +grosbeak +groschen +grosgrain +grossness +grossularite +grosz +grot +grotesqueness +grotesquery +grotto +grouchiness +ground +groundage +groundbreaker +groundedness +grounder +groundkeeper +groundlessness +groundling +groundmass +groundnut +groundplot +groundsel +groundsheet +groundsill +groundsman +groundspeed +groundwave +groundway +groundwood +groundwork +group +grouper +groupie +grouping +groupoid +grouse +grouser +grout +grouter +grove +groveler +groveller +grovet +growan +grower +growler +grownup +growth +groyne +grubber +grubbiness +grubstake +grubstaker +grubworm +grudge +grudger +gruel +gruesomeness +gruffiness +gruffness +grugru +grumbler +grume +grummet +grumness +grumousness +grump +grumphie +grumpiness +grunion +grunter +grutch +gryphon +grysbok +gt +gtc +gtd +gteau +gtt +gu +guacamole +guacharo +guacin +guaco +guaguanche +guaiacol +guaiacum +guajira +guamachil +guan +guanabana +guanaco +guanase +guanay +guanidine +guanine +guano +guanosine +guar +guaracha +guarani +guarantee +guarantor +guaranty +guardedness +guardee +guarder +guardhouse +guardian +guardianship +guardrail +guardroom +guardsman +guarite +guava +guayabera +guayule +gubbins +gubernaculum +guberniya +guck +gudgeon +guemal +guenon +guerdon +guerdoner +guereza +guergal +gueridon +guerillaism +guerrilla +guerrillaism +guesser +guesstimate +guesswork +guest +guesthouse +guestimate +guestimated +guestimating +guff +guffaw +guglet +guib +guidance +guideboard +guidebook +guideline +guidepost +guider +guidon +guidwillie +guige +guild +guilder +guildhall +guildship +guildsman +guile +guilefulness +guilelessness +guillemot +guilloche +guillotine +guilt +guiltiness +guiltlessness +guimpe +guinea +guipure +guiro +guisarme +guise +guitar +guitarfish +guitarist +guitguit +gula +gulch +gulden +gulf +gulfweed +gulgul +gull +gullability +gullet +gulley +gullibility +gully +gulosity +gum +gumbo +gumboil +gumbotil +gumdrop +gumi +gumma +gumminess +gummite +gummosis +gump +gumption +gumshield +gumshoe +gumtree +gumwood +gun +guna +gunboat +guncotton +gunda +gundalow +gunfight +gunfighter +gunfire +gunflint +gunge +gunk +gunlock +gunmaker +gunmaking +gunman +gunmanship +gunmetal +gunnel +gunner +gunnership +gunnery +gunning +gunny +gunnysack +gunpaper +gunplay +gunpoint +gunpowder +gunrunner +gunrunning +guns +gunsel +gunshot +gunslinger +gunsmith +gunsmithing +gunstock +gunstocking +gunter +gunwale +gunyah +guppy +gurdwara +gurge +gurges +gurgitation +gurglet +gurjun +gurnard +guru +guruship +gusher +gushiness +gusset +gust +gustation +gustativeness +gustiness +gusto +gut +gutbucket +guthite +gutser +gutsiness +gutta +guttation +gutter +guttering +guttersnipe +guttler +gutturalisation +gutturalism +gutturality +gutturalization +gutturalness +gutty +guv +guy +guyot +guzzler +gv +gwyniad +gym +gymel +gymkhana +gymnasia +gymnasiarch +gymnasiarchy +gymnasiast +gymnasium +gymnast +gymnastics +gymnoplast +gymnosophist +gymnosophy +gymnosperm +gymnospermism +gymnospore +gymslip +gynaeceum +gynaecocracy +gynaecocrat +gynaecologist +gynaecology +gynaecomastia +gynaecomasty +gynandromorph +gynandromorphism +gynandromorphy +gynandry +gynarchy +gynecium +gynecocracy +gynecocrat +gynecol +gynecologist +gynecology +gynecomastia +gynecomasty +gynecopathy +gynephobia +gyniatrics +gynobase +gynodioecism +gynoecium +gynomonoecism +gynophore +gynostegium +gynostemium +gypsophila +gypsum +gypsydom +gypsyhead +gypsyhood +gypsyism +gyration +gyrator +gyre +gyrectomy +gyrene +gyrfalcon +gyro +gyrocompass +gyrofrequency +gyron +gyropilot +gyroplane +gyroscope +gyroscopics +gyrostabilizer +gyrostat +gyrostatics +gyrovague +gyrus +gyttja +h +haaf +haar +habanera +habbub +habenula +haberdasher +haberdashery +habergeon +habiliment +habilitation +habilitator +habit +habitability +habitableness +habitacle +habitan +habitancy +habitant +habitat +habitation +habitua +habitualness +habituation +habitude +habitue +habitus +haboob +habu +habutai +hacek +hachure +hacienda +hackamore +hackberry +hackbut +hackbuteer +hacker +hackery +hackie +hackle +hackleback +hackler +hackman +hackmatack +hackney +hackneyism +hacksaw +haddock +hade +hadj +hadji +hadron +hadrosaur +haecceity +haem +haemachrome +haemacytometer +haemagglutination +haemagglutinin +haemangioma +haemangiomatosis +haematein +haematemesis +haematin +haematinic +haematite +haematoblast +haematocele +haematocrit +haematocyst +haematocystis +haematocyte +haematogenesis +haematologist +haematology +haematolysis +haematoma +haematophyte +haematosis +haematoxylin +haematoxylon +haematozoon +haematuria +haemin +haemoblast +haemochrome +haemocoel +haemoconcentration +haemocyanin +haemocyte +haemocytoblast +haemodialysis +haemodynamics +haemoflagellate +haemoglobin +haemoglobinuria +haemolysin +haemophil +haemophile +haemophilia +haemophiliac +haemopoiesis +haemoptysis +haemorrhage +haemorrhoid +haemorrhoidectomy +haemorrhoids +haemostasis +haemostat +haemothorax +haemotoxin +haeres +haet +haffet +hafiz +hafnium +haft +hafter +hafynite +hag +hagberry +hagbut +hagdon +hagfish +haggadist +haggardness +haggis +haggishness +haggler +hagiarchy +hagiocracy +hagiographer +hagiography +hagiolater +hagiolatry +hagiologist +hagiology +hagioscope +hagmenay +hagrider +hagseed +hagueton +haick +haik +haikal +haiku +hail +hailer +hailstone +hailstorm +hair +hairball +hairbreadth +hairbrush +haircloth +haircut +haircutter +haircutting +hairdo +hairdresser +hairdressing +hairgrip +hairif +hairiness +hairlessness +hairline +hairnet +hairpiece +hairpin +hairsplitter +hairsplitting +hairspring +hairstreak +hairstyle +hairtail +hairweaving +hairworm +haji +hajj +hajji +hake +hakea +hakim +halakist +halalah +halation +halavah +halberd +halberdier +haleness +haler +half +halfback +halfbeak +halfheartedness +halfmoon +halfpace +halfpenny +halftone +halfwit +halibut +halicot +halide +halidom +halite +halitosis +halituosity +halitus +hall +hallah +hallan +halliard +halling +hallmark +hallmarker +halloo +hallowedness +hallower +hallroom +hallucination +hallucinator +hallucinogen +hallucinosis +hallux +hallway +halm +halma +halo +halobiont +halogen +halogenation +halophile +halophilism +halophyte +halothane +halotrichite +halt +halter +haltere +haltingness +halutz +halvah +halves +halyard +ham +hamadryad +hamadryas +hamal +hamantasch +hamantash +hamartia +hamaul +hambone +hambroline +hamburg +hamburger +hame +hametz +hamlet +hammal +hammer +hammercloth +hammerer +hammerhead +hammering +hammerlock +hammertoe +hammock +hamperedness +hamperer +hamster +hamstring +hamulus +hamza +hanap +hanaper +hance +hand +handbag +handball +handballer +handbarrow +handbell +handbill +handbook +handbrake +handbreadth +handcar +handcart +handclap +handclasp +handcraft +handcuffs +handedness +handfast +handfasting +handful +handgrip +handgun +handhold +handicap +handicapper +handicraft +handicraftship +handicraftsman +handicraftsmanship +handiness +handiwork +handkerchief +handle +handlebar +handler +handling +handloader +handloom +handmaid +handmaiden +handout +handrail +hands +handsaw +handsawfish +handsel +handset +handshake +handshaker +handshaking +handsomeness +handspike +handspring +handstand +handstroke +handweaving +handwheel +handwork +handwriting +handybilly +handyman +hanefiyeh +hangability +hangar +hangbird +hanger +hangfire +hanging +hangman +hangnail +hangout +hangover +hank +hankerer +hankering +hankie +hanky +hansel +hansom +hanuman +haole +haoma +haori +hap +haphazardness +haplessness +haplite +haplography +haplology +haplopia +haplosis +happening +happenstance +happiness +hapten +hapteron +haptics +haptometer +haptotropism +harakiri +haram +harambee +haranguer +harasser +harassment +harbinger +harbingership +harbor +harborage +harborer +harbour +harbourage +harbourer +hardback +hardbake +hardball +hardboard +hardcover +hardenability +hardener +hardening +hardfistedness +hardhack +hardhandedness +hardhead +hardheadedness +hardheads +hardheartedness +hardie +hardihood +hardiment +hardiness +hardness +hardpan +hardship +hardtack +hardtail +hardtop +hardwall +hardware +hardwood +hare +harebell +harebrainedness +hareem +harelip +harem +harewood +haricot +harikari +harim +harkener +harl +harle +harlequin +harlequinade +harlequinism +harlot +harlotry +harm +harmattan +harmer +harmfulness +harmlessness +harmonica +harmonicalness +harmonicon +harmonics +harmoniousness +harmonisation +harmoniser +harmonist +harmonium +harmonization +harmonizer +harmony +harmost +harmotome +harness +harnesser +haroseth +harp +harper +harping +harpist +harpoon +harpooner +harpsichord +harpsichordist +harpy +harquebus +harquebusier +harridan +harrier +harrow +harrower +harrowment +harshness +harslet +harst +hart +hartal +hartebeest +hartshorn +haruspex +haruspicy +harvest +harvester +harvestfish +harvestman +hasenpfeffer +hash +hasher +hashing +hashish +haslet +haslock +hasp +hassenpfeffer +hassle +hassock +haste +hastelessness +hastener +hastiness +hat +hatband +hatbox +hatchability +hatchback +hatcher +hatchery +hatchet +hatchetfish +hatchettite +hatching +hatchment +hatchway +hatefulness +hatemonger +hatemongering +hater +hathpace +hatlessness +hatpin +hatrack +hatred +hatter +haubergeon +hauberk +hauerite +haugh +haughtiness +haulage +haulback +hauler +haulier +haulm +haunch +haunter +hausen +hausfrau +haust +haustellum +haustorium +hautbois +hautboy +hautboyist +hauteur +hav +havelock +haven +haverel +haversack +haversine +havildar +havior +havoc +havocker +haw +hawfinch +hawk +hawkbill +hawker +hawkey +hawkie +hawking +hawknose +hawksbeak +hawkshaw +hawkweed +hawse +hawsehole +hawsepiece +hawsepipe +hawser +hawthorn +hay +haybox +haycock +hayfield +hayfork +haylift +hayloft +haymaker +haymow +hayrack +hayrick +hayride +hayseed +haystack +hayward +haywire +hazan +hazard +hazarder +hazardousness +haze +hazel +hazelhen +hazelnut +hazemeter +hazer +haziness +hazing +hazzan +hb +hcl +hd +hdkf +hdqrs +head +headache +headband +headboard +headbox +headcheese +headcloth +headdress +header +headfast +headfish +headframe +headgear +headhunt +headhunter +headhunting +heading +headland +headledge +headlessness +headlight +headline +headliner +headlock +headlongness +headman +headmaster +headmastership +headmistress +headnote +headphone +headpiece +headpin +headrace +headrail +headreach +headrest +headrig +headright +headroom +headsail +headsaw +headscarf +headset +headsheet +headship +headshrinker +headsman +headspring +headsquare +headstall +headstand +headstay +headstock +headstone +headstream +headstrongness +headwaiter +headway +headwind +headword +headwork +headworker +headworking +heaf +heald +healer +health +healthfulness +healthiness +heap +heaper +hearer +hearing +hearkener +hearsay +hearse +heart +heartache +heartbeat +heartbreak +heartbreaker +heartbrokenness +heartburn +heartburning +heartedness +heartener +hearth +hearthside +hearthstead +hearthstone +heartiness +hearting +heartland +heartlessness +hearts +heartsease +heartshake +heartsickness +heartsomeness +heartthrob +heartwood +heartworm +heat +heatedness +heater +heath +heathberry +heathbird +heathen +heathendom +heathenesse +heathenhood +heathenishness +heathenism +heathenness +heathenry +heathenship +heather +heatheriness +heathfowl +heatstroke +heaume +heaven +heavenliness +heavenwardness +heaver +heaves +heaviness +heavyweight +hebdomad +hebdomadary +hebephrenia +hebetation +hebetude +hecatomb +hecatonstylon +hechsher +heckelphone +heckler +hectare +hecticness +hectocotylus +hectogram +hectograph +hectography +hectoliter +hectometer +hectostere +heddle +hedenbergite +heder +hedge +hedgehog +hedgehopper +hedger +hedgerow +hedonics +hedonism +hedonist +heed +heeder +heedfulness +heedlessness +heel +heelball +heeler +heeling +heelpiece +heelplate +heelpost +heeltap +heer +hefter +heftiness +hegari +hegemonist +hegemony +hegumen +heifer +height +heightener +heighth +heinie +heinousness +heir +heirdom +heirloom +heirship +heist +heister +heitiki +hekhsher +hektare +hektogram +hektograph +hektoliter +hektometer +hektostere +heldentenor +heliaea +helianthus +heliast +helices +helichrysum +helicline +helicograph +helicon +helicopter +helio +heliocentricity +heliochromy +heliodor +heliogram +heliograph +heliographer +heliography +heliogravure +heliolater +heliolatry +heliometer +helioscope +helioscopy +heliostat +heliotaxis +heliotherapy +heliotrope +heliotropin +heliotropism +heliotype +heliozoan +helipad +heliport +helium +helix +hellbender +hellbox +hellbroth +hellcat +helldiver +hellebore +helleborein +helleborin +helleborine +heller +hellery +hellfire +hellgrammite +hellhole +hellhound +hellion +hellishness +hellkite +hello +helm +helmet +helminth +helminthiasis +helminthologist +helminthology +helmsman +helmsmanship +helotage +helotism +helotry +helper +helpfulness +helping +helplessness +helpmate +helpmeet +helterskelteriness +helve +helver +hem +hemachrome +hemacytometer +hemagglutination +hemanalysis +hemangioma +hematein +hematin +hematinic +hematite +hematoblast +hematocele +hematocrit +hematocyst +hematocyte +hematogenesis +hematologist +hematology +hematoma +hematophyte +hematopoiesis +hematoporphyria +hematosis +hematoxylin +hematozoon +hematuria +heme +hemelytron +hemeralopia +hemiacetal +hemialgia +hemianopsia +hemicellulose +hemichordate +hemicrania +hemicycle +hemicyclium +hemidemisemiquaver +hemielytron +hemiglobin +hemihydrate +hemikaryon +hemimetabolism +hemimetaboly +hemimorphism +hemimorphite +hemimorphy +hemin +hemiola +hemiparasite +hemiparesis +hemiplegia +hemipode +hemipteran +hemiscotosis +hemisphere +hemispheroid +hemistich +hemiterpene +hemitrope +hemitropism +hemitropy +hemizygote +hemline +hemlock +hemmer +hemoblast +hemochromatosis +hemoconcentration +hemocyte +hemocytoblast +hemocytometer +hemodia +hemodialysis +hemodialyzer +hemodynamics +hemoflagellate +hemofuscin +hemogenia +hemoglobin +hemoglobinuria +hemogram +hemolysin +hemolysis +hemophile +hemophilia +hemophiliac +hemophobia +hemoptysis +hemorrhage +hemorrhoid +hemorrhoidectomy +hemosiderin +hemosiderosis +hemostasis +hemostat +hemotherapeutics +hemotherapy +hemothorax +hemotoxin +hemotrophe +hemp +hempseed +hemstitch +hemstitcher +hen +henbane +henbit +henchman +henchmanship +hencoop +hendecagon +hendecahedron +hendecasyllable +hendiadys +henequen +henge +henhawk +henhouse +henna +hennery +hennin +henotheism +henotheist +henry +heortology +hepar +heparin +heparinization +hepatatrophia +hepatectomy +hepatica +hepaticoenterostomy +hepatisation +hepatitis +hepatization +hepatoscopy +hepatotoxin +hepcat +heptachlor +heptachord +heptad +heptagon +heptahedron +heptahydrate +heptameter +heptane +heptanone +heptarch +heptarchist +heptarchy +heptastich +heptastylos +heptasyllable +heptode +heptose +herald +heraldist +heraldry +herb +herbage +herbalist +herbarium +herbicide +herbivore +herbivority +herborist +herd +herder +herdic +herdman +herdsman +heredes +hereditability +hereditament +hereditarianism +hereditariness +hereditist +heredity +herem +heres +heresiarch +heresimach +heresiographer +heresiography +heresiologist +heresiology +heresy +heretic +hereticalness +heriot +heritability +heritage +heritance +heritor +herl +herm +herma +hermaphrodism +hermaphrodite +hermaphroditism +hermeneutics +hermes +hermit +hermitage +hermitry +hermitship +hern +hernia +hernioplasty +herniorrhaphy +herniotomy +hernshaw +hero +heroicalness +heroicity +heroicness +heroin +heroine +heroism +heron +heronry +heronsew +heroworshipper +herp +herpangina +herpes +herpetologist +herpetology +herquein +herring +herringbone +herryment +hertz +hesitancy +hesitater +hesitation +hesitator +hesperidin +hesperidium +hesperinos +hessian +hessite +hessonite +hest +hetaera +hetaerism +hetaerist +hetaira +hetairist +heteroaromatic +heteroauxin +heterocercality +heterochromatin +heterochromatism +heterochromosome +heterocycle +heterodoxy +heteroecism +heterogamete +heterogamy +heterogeneity +heterogeneousness +heterogenesis +heterogeny +heterogony +heterograft +heterography +heterokinesia +heterology +heterolysis +heteromorphism +heteromorphy +heteronomy +heteronym +heterophony +heterophoria +heterophylly +heterophyte +heteroplasty +heteropolarity +heteroptics +heteroscedasticity +heterosis +heterosphere +heterospory +heterostracan +heterostyly +heterotaxis +heterotelism +heterothallism +heterotopia +heterotrich +heterotroph +heterozygosis +heterozygosity +heterozygote +heth +hetman +hetmanate +heugh +heulandite +hevea +hewer +hexachloride +hexachlorocyclohexane +hexachloroethane +hexachlorophene +hexachord +hexad +hexadecane +hexaemeron +hexafluoride +hexagon +hexagram +hexahedron +hexahemeron +hexahydrate +hexahydrobenzene +hexahydrothymol +hexahydroxycyclohexane +hexamerism +hexameron +hexameter +hexamethonium +hexamethylene +hexamethylenetetramine +hexamine +hexanaphthene +hexane +hexanitrate +hexapla +hexapod +hexapody +hexarchy +hexastich +hexastichon +hexastyle +hexastylos +hexasyllable +hexer +hexobarbital +hexode +hexone +hexosamine +hexosan +hexose +hexyl +hexylresorcinol +heyday +hf +hg +hgt +hhd +hiatus +hibachi +hibernaculum +hibernation +hibernator +hibiscus +hiccup +hick +hickey +hickory +hickwall +hidage +hidalgism +hidalgo +hidalgoism +hiddenite +hiddenness +hideaway +hideboundness +hideosity +hideousness +hideout +hider +hiding +hidropoiesis +hidrosis +hielamon +hieracosphinx +hierarch +hierarchism +hierarchist +hierarchy +hierocracy +hierodeacon +hierodule +hieroglyphics +hieroglyphist +hieroglyphologist +hieroglyphology +hierogram +hierogrammat +hierogrammatist +hierolatry +hierologist +hierology +hieromonk +hieron +hierophant +hierurgy +higgler +highball +highbinder +highboy +highbrow +highbrowism +highchair +highdaddy +highflier +highhandedness +highhole +highjacker +highland +highlife +highlight +highline +highness +highroad +highway +highwayman +hijacker +hijinks +hiker +hilariousness +hilarity +hilding +hill +hillbilly +hiller +hillfort +hilliness +hillock +hillside +hillsite +hilltop +hilltopper +hilt +hilum +hilus +himation +hin +hindbrain +hinderer +hindgut +hindi +hindquarter +hindrance +hindsight +hinge +hinny +hint +hinter +hinterland +hip +hipbone +hiphuggers +hippalectryon +hipparch +hippeastrum +hippiatrics +hippiatrist +hippie +hipping +hippo +hippocampus +hippocras +hippodrome +hippogriff +hippologist +hippology +hippophagist +hippophagy +hippophile +hippopotamus +hippus +hipster +hiragana +hireling +hirer +hirsuteness +hirsutism +hirudin +hirudinean +hispanidad +hispanism +hispidity +hiss +hisser +hissing +histaminase +histamine +histidine +histiocyte +histoblast +histochemistry +histogen +histogenesis +histogram +histographer +histography +histologist +histology +histolysis +histomorphology +histone +histopathologist +histopathology +histophysiology +histoplasmosis +historian +historicalness +historicism +historicist +historicity +historiographer +historiographership +historiography +history +histothrombin +histotome +histotomy +histrionics +histrionism +hitcher +hitchiness +hitter +hive +hiver +hives +hl +hm +hoactzin +hoar +hoard +hoarder +hoarding +hoarfrost +hoarhound +hoariness +hoarseness +hoatzin +hoax +hoaxer +hob +hobber +hobblebush +hobbledehoy +hobbler +hobby +hobbyhorse +hobbyist +hobgoblin +hobnail +hobo +hoboism +hochhuth +hock +hocker +hocket +hockey +hockshop +hod +hodden +hodge +hodgepodge +hodman +hodograph +hodometer +hodoscope +hoe +hoecake +hoedown +hoer +hoeshin +hog +hogan +hogback +hogchoker +hogfish +hogg +hoggery +hogget +hoggin +hoggishness +hogmanay +hogmolly +hognut +hogshead +hogwash +hogweed +hoiden +hoister +hoistway +hokku +hokum +holdall +holdback +holder +holdership +holdfast +holding +holdout +holdover +holdup +hole +holiday +holiness +holism +holist +holland +hollo +hollowheartedness +hollowness +hollowware +holluschick +holly +hollyhock +holm +holmium +holoenzyme +hologonidium +hologram +holograph +holography +holohedrism +holohedry +hololith +holometabolism +holometaboly +holomorphism +holomorphy +holophote +holophrase +holophrasis +holophyte +holoplankton +holothurian +holotype +holster +holt +holystone +holytide +hom +homage +homager +hombre +homburg +home +homebody +homecomer +homecoming +homeland +homelessness +homelikeness +homeliness +homemaker +homemaking +homeomorph +homeomorphism +homeopathist +homeopathy +homeoplasia +homeostasis +homeotherapy +homeotherm +homeothermism +homeothermy +homeplace +homer +homeroom +homesickness +homesite +homestall +homestead +homesteader +homestretch +hometown +homework +homeworker +homeyness +homicide +homiletics +homiliary +homilist +homily +hominess +homing +hominid +hominy +hommock +homobront +homocercy +homochromatism +homochromy +homoeomorph +homoeomorphism +homoeopathist +homoeopathy +homogamy +homogenate +homogeneity +homogenesis +homogenization +homogenizer +homogeny +homogony +homograft +homograph +homoiotherm +homoiothermism +homoiothermy +homologation +homologiser +homologizer +homologue +homologumena +homology +homolysis +homomorphism +homonid +homonym +homonymity +homonymy +homopause +homophile +homophone +homophony +homophyly +homoplasy +homopolarity +homoscedasticity +homosphere +homospory +homostylism +homostyly +homotaxis +homothallism +homotherm +homothermism +homothermy +homothety +homotype +homozygosis +homozygote +homunculus +hon +honan +honda +hone +honestness +honesty +honewort +honey +honeybee +honeybunch +honeycomb +honeycreeper +honeydew +honeyedness +honeymoon +honeymooner +honeysucker +honeysuckle +honeywort +hong +honk +honker +honky +honor +honorableness +honorand +honorarium +honorer +honour +honourableness +honourer +hooch +hood +hoodedness +hoodie +hoodle +hoodlum +hoodlumism +hoodman +hoodoo +hoodwinker +hooey +hoof +hoofbeat +hoofer +hoofiness +hoofprint +hook +hookah +hookedness +hookey +hooknose +hookswinging +hookup +hookworm +hooky +hooligan +hooliganism +hooly +hoop +hooper +hoopla +hoopman +hoopoe +hoopster +hoopwood +hoosegow +hoot +hootch +hootenanny +hooter +hooves +hop +hope +hopefulness +hopelessness +hoper +hophead +hoplite +hoplology +hopper +hopping +hopsack +hopsacking +hopscotch +hoptoad +hoptree +hopvine +hor +hora +horde +hordein +hordeolum +horehound +horizon +horizontality +horizontalness +horme +hormone +horn +hornbeam +hornbill +hornblende +hornbook +hornedness +hornet +hornfels +horniness +hornito +hornlessness +hornpipe +hornpout +hornstone +horntail +hornworm +hornwort +horol +horologe +horologist +horologium +horology +horopter +horoscope +horoscoper +horoscopy +horotely +horribleness +horridness +horrification +horripilation +horror +horse +horseback +horsebox +horsecar +horsecloth +horsed +horsefeathers +horsefish +horseflesh +horsefly +horsehair +horsehead +horsehide +horselaugh +horselaughter +horseleech +horseman +horsemanship +horsemint +horseplay +horseplayer +horsepower +horsepox +horseradish +horseshoe +horseshoer +horseshoes +horsetail +horseweed +horsewhip +horsewhipper +horsewoman +horsewomanship +horsiness +horsing +horst +hort +hortensia +horticulture +horticulturist +hose +hosecock +hosel +hosier +hosiery +hosp +hospice +hospitableness +hospital +hospitalism +hospitality +hospitalization +hospitaller +hospitalman +hospitium +hospodar +host +hosta +hostage +hostageship +hostel +hosteler +hosteller +hostelling +hostelry +hostess +hostie +hostility +hostler +hostlership +hostship +hotbed +hotbox +hotch +hotchpot +hotchpotch +hotel +hotelier +hotelkeeper +hotelman +hothead +hotheadedness +hothouse +hotness +hotplate +hotpot +hotspur +hottie +houbara +houdah +hough +houmous +hound +hounder +houndfish +hounding +hounskull +houppelande +hour +hourglass +houri +house +houseboat +houseboy +housebreaker +housebreaking +housecarl +housecleaner +housecleaning +housecoat +housedress +housefather +housefly +houseful +houseguest +household +householder +householdership +housekeeper +housekeeping +housel +houseleek +houselessness +houseline +housemaid +houseman +housemaster +housemastership +housemother +houseparent +housephone +houseroom +housetop +housewarming +housewife +housewifeliness +housewifery +housework +houseworker +housewrecker +housing +houstonia +houting +hovel +hovercraft +hoverer +hoverport +hovertrain +howdah +howdie +howe +howel +howf +howff +howitzer +howl +howler +howlet +howtowdie +hoy +hoya +hoyden +hoydenishness +hoydenism +hp +hr +hrs +hs +hsien +ht +huamuchil +huapango +huarache +huaracho +hub +hubble +hubbob +hubbub +hubby +hubcap +hubris +huckaback +huckle +huckleberry +hucklebone +huckster +hucksterer +hucksterism +huddle +huddler +hue +huemul +huff +huffiness +huffishness +hugeness +hugeousness +hugger +huggermugger +huia +huisache +hula +hulk +hull +hullaballoo +hullabaloo +huller +hulling +hullo +humaneness +humanics +humanisation +humaniser +humanism +humanist +humanitarianism +humanitarianist +humanity +humanization +humanizer +humankind +humanness +humblebee +humbleness +humbug +humbugger +humbuggery +humdinger +humdrumness +humerus +humidification +humidifier +humidistat +humidity +humidness +humidor +humiliation +humiliator +humility +hummer +hummingbird +hummock +humor +humoresque +humorist +humorlessness +humorousness +humour +humourlessness +hump +humpback +humpiness +humpty +humuhumunukunukuapuaa +humulon +humus +hunch +hunchback +hund +hundred +hundredweight +hunger +hungriness +hunk +hunks +huntaway +hunter +hunting +huntsman +huntsmanship +huppah +hurcheon +hurdle +hurdler +hurler +hurley +hurling +hurly +hurricane +hurriedness +hursinghar +hurst +hurter +hurtfulness +hurtleberry +hurtlessness +husband +husbandage +husbander +husbandman +husbandry +hushion +husk +husker +huskiness +husking +hussar +hussitism +hussy +hustings +hustler +hut +hutch +hutchie +hutment +hwan +hwyl +hy +hyacinth +hyacinthin +hyaena +hyalin +hyalinization +hyalite +hyalogen +hyalograph +hyalographer +hyalography +hyalomere +hyalophane +hyaloplasm +hyaluronidase +hybrid +hybridiser +hybridism +hybridist +hybridizer +hybris +hyd +hydantoin +hydathode +hydatid +hydnocarpate +hydra +hydracid +hydraemia +hydralazine +hydrangea +hydrant +hydranth +hydrargyrism +hydrargyrum +hydrase +hydrastine +hydrastinine +hydrastis +hydrate +hydration +hydrator +hydraul +hydraulics +hydraulus +hydrazine +hydrazoate +hydrazone +hydremia +hydria +hydride +hydro +hydroa +hydroairplane +hydrobomb +hydrobromide +hydrocarbon +hydrocele +hydrocellulose +hydrocephalus +hydrochloride +hydrochlorothiazide +hydrocoral +hydrocortisone +hydrocracking +hydrodesulfurization +hydrodynamics +hydroelectricity +hydrofoil +hydroformylation +hydrogen +hydrogenate +hydrogenation +hydrogenisation +hydrogenization +hydrogenolysis +hydrogeologist +hydrogeology +hydrograph +hydrographer +hydrography +hydrokineter +hydrokinetics +hydrolant +hydrolase +hydrologist +hydrology +hydrolysate +hydrolysation +hydrolyser +hydrolysis +hydrolyte +hydrolyzation +hydrolyzer +hydromagnetics +hydromancer +hydromancy +hydromechanics +hydromedusa +hydromel +hydrometallurgy +hydrometeor +hydrometeorology +hydrometer +hydrometry +hydronaut +hydronitrogen +hydropac +hydropath +hydropathist +hydropathy +hydroperoxide +hydrophane +hydrophily +hydrophobe +hydrophobia +hydrophobicity +hydrophone +hydrophyte +hydrophytism +hydroplane +hydropneumatization +hydroponics +hydroponist +hydropower +hydrops +hydroquinone +hydrorhiza +hydros +hydroscope +hydroscopicity +hydrosere +hydroski +hydrosol +hydrosoma +hydrosome +hydrosphere +hydrostat +hydrostatics +hydrosulfate +hydrosulfide +hydrosulfite +hydrosulphate +hydrosulphide +hydrosulphite +hydrotaxis +hydrotheca +hydrotherapeutics +hydrotherapist +hydrotherapy +hydrothorax +hydrotropism +hydroxide +hydroxybenzene +hydroxyketone +hydroxyl +hydroxylamine +hydroxyproline +hydroxyzine +hydrozoan +hyena +hyetograph +hyetography +hyetologist +hyetology +hygiene +hygienics +hygienist +hygristor +hygrogram +hygrograph +hygrometer +hygrometry +hygrophyte +hygroscope +hygroscopicity +hygrostat +hygrothermograph +hyla +hylomorphism +hylomorphist +hylotheism +hylotheist +hylozoism +hylozoist +hymen +hymenium +hymenopter +hymenopteran +hymenopteron +hymenotome +hymenotomy +hymn +hymnal +hymnarium +hymnary +hymner +hymnist +hymnodist +hymnody +hymnologist +hymnology +hyolithid +hyoscine +hyoscyamine +hyoscyamus +hyp +hypacusia +hypaesthesia +hypalgesia +hypallage +hypanthium +hypaspist +hype +hyperabsorption +hyperaccuracy +hyperaccurateness +hyperacidity +hyperacoustics +hyperaction +hyperactivity +hyperacuity +hyperacuness +hyperacusis +hyperadenosis +hyperadiposity +hyperadrenalemia +hyperadrenalism +hyperaemia +hyperaesthesia +hyperaesthete +hyperalgesia +hyperalimentation +hyperalkalinity +hyperaltruism +hyperaltruist +hyperanabolism +hyperanakinesia +hyperanarchy +hyperaphia +hyperazoturia +hyperbarbarism +hyperbarbarousness +hyperbaton +hyperbola +hyperbole +hyperbolism +hyperboloid +hyperbrachycephaly +hypercalcemia +hypercalciuria +hypercapnia +hypercatabolism +hypercatharsis +hyperchloremia +hyperchlorhydria +hyperchlorination +hypercholesterolemia +hypercholesterolia +hypercholia +hypercivilization +hyperclassicality +hyperclimax +hypercoagulability +hyperconcentration +hyperconfidence +hyperconformist +hyperconformity +hyperconscientiousness +hyperconservatism +hyperconservativeness +hyperconstitutionalism +hypercorrection +hypercorrectness +hypercrinism +hypercritic +hypercriticism +hypercryalgesia +hypercyanosis +hypercythemia +hypercytosis +hyperdactylia +hyperdeification +hyperdelicacy +hyperdelicateness +hyperdelness +hyperdiabolicalness +hyperdicrotism +hyperdistention +hyperdivision +hyperdolichocephaly +hyperdulia +hyperelegance +hyperelegancy +hyperemesis +hyperemia +hyperemization +hyperemotiveness +hyperemotivity +hyperendocrinism +hyperenthusiasm +hyperepinephrinemia +hyperepinephry +hypererethism +hyperesthesia +hyperesthete +hyperethicalness +hyperexaltation +hyperexcitability +hyperexcitableness +hyperexcitement +hyperexcursiveness +hyperextension +hyperfastidiousness +hyperfederalist +hyperflexibility +hyperflexibleness +hyperflexion +hyperform +hyperfunction +hypergalactia +hypergamy +hypergenesis +hypergeneticalness +hypergeusesthesia +hyperglobulia +hyperglycaemia +hyperglycemia +hyperglycistia +hypergol +hypergrammaticalness +hyperhepatia +hyperhidrosis +hyperhilariousness +hyperhypocrisy +hypericum +hyperimmunity +hyperimmunization +hyperingenuity +hyperinsulinism +hyperintellectualness +hyperintelligence +hyperirritability +hyperkalemia +hyperkatabolism +hyperkeratosis +hyperkinesia +hyperlactation +hyperlethargy +hyperleucocytosis +hyperlipemia +hyperlogicality +hyperlogicalness +hyperlustrousness +hypermarket +hypermedication +hypermegasoma +hypermetabolism +hypermetamorphosis +hypermeter +hypermetrope +hypermetropia +hypermetropy +hypermicrosoma +hypermiraculousness +hypermnesia +hypermodestness +hypermotility +hypermysticalness +hypernatremia +hypernaturalness +hypernormality +hypernormalness +hypernutrition +hyperobtrusiveness +hyperon +hyperope +hyperopia +hyperorthodoxy +hyperosmia +hyperosteogeny +hyperostosis +hyperovaria +hyperoxemia +hyperoxide +hyperoxygenation +hyperparasite +hyperparasitism +hyperparathyroidism +hyperparoxysm +hyperpatriotism +hyperperfection +hyperperistalsis +hyperphagia +hyperphospheremia +hyperpiesia +hyperpigmentation +hyperpituitarism +hyperplane +hyperplasia +hyperploidy +hyperpnea +hyperpnoea +hyperpotassemia +hyperprosexia +hyperpurist +hyperpyrexia +hyperresonance +hyperridiculousness +hyperritualism +hyperromanticism +hypersalivation +hyperscrupulosity +hypersecretion +hypersensibility +hypersensitisation +hypersensitiveness +hypersensitivity +hypersensitization +hypersensualism +hypersensualness +hypersensuousness +hypersomnia +hypersophistication +hyperspace +hyperspeculativeness +hypersphere +hypersthene +hypersubtlety +hypersuggestibility +hypersuggestibleness +hypersusceptibility +hypertechnicalness +hypertely +hypertenseness +hypertensin +hypertensinase +hypertensinogen +hypertension +hyperthermia +hyperthrombinemia +hyperthymia +hyperthyroidism +hypertocicity +hypertonicity +hypertrophy +hyperurbanism +hypervascularity +hypervenosity +hyperventilation +hypervigilantness +hyperviscosity +hypervitalization +hypervitaminosis +hypesthesia +hypha +hyphen +hyphenation +hyphenisation +hyphenization +hyphopodium +hypnoanalysis +hypnogenesis +hypnograph +hypnologist +hypnology +hypnone +hypnopaedia +hypnosis +hypnosperm +hypnosporangium +hypnospore +hypnotherapy +hypnotisability +hypnotisation +hypnotiser +hypnotism +hypnotist +hypnotizability +hypnotization +hypnotizer +hypnotoxin +hypo +hypoacidity +hypoacussis +hypoadenia +hypoalbuminemia +hypoalimentation +hypoalonemia +hypoazoturia +hypobaropathy +hypobasis +hypoblast +hypocalcemia +hypocaust +hypocentre +hypochil +hypochilium +hypochloremia +hypochlorhydria +hypochlorite +hypocholesteremia +hypochondria +hypochondriac +hypochondriasis +hypochondrium +hypochromia +hypocorism +hypocotyl +hypocrinism +hypocrisy +hypocrite +hypocycloid +hypocytosis +hypoderm +hypoderma +hypodermis +hypodynamia +hypoendocrinism +hypofunction +hypogastrium +hypogenesis +hypogeum +hypogeusia +hypoglobulia +hypoglottis +hypoglycaemia +hypoglycemia +hypognathism +hypogonadism +hypogyny +hypohepatia +hypohidrosis +hypohydrochloria +hypohypophysism +hypoinosemia +hypokalemia +hypokinemia +hypokinesia +hypolimnion +hypomania +hypomnesia +hypomotility +hypomyotonia +hyponasty +hyponatremia +hyponitrite +hyponoia +hypophalangism +hypopharyngoscope +hypopharyngoscopy +hypopharynx +hypophonesis +hypophonia +hypophoria +hypophosphate +hypophosphite +hypophyge +hypophysectomy +hypophysis +hypophysitis +hypopiesis +hypopituitarism +hypoplasia +hypoploidy +hypopnea +hypopnoea +hypopodium +hypopotassemia +hypopraxia +hypoprosexia +hypoproteinemia +hypoproteinosis +hypopselaphesia +hypopsychosis +hypoptyalism +hypopyon +hyporchema +hyposalemia +hyposarca +hyposecretion +hyposensitization +hyposmia +hypospray +hypostasis +hypostatisation +hypostatization +hyposthenia +hypostome +hyposulfite +hyposulphite +hypotaxis +hypotension +hypotenuse +hypoth +hypothalamus +hypothallus +hypothec +hypothecater +hypothecation +hypothecator +hypothecium +hypothenar +hypothenuse +hypothermia +hypothesis +hypothesiser +hypothesizer +hypothyroidism +hypotonicity +hypotrachelium +hypotrich +hypotyposis +hypoxanthine +hypoxemia +hypoxia +hypozeugma +hypozeuxis +hypsicephaly +hypsography +hypsometer +hypsometrist +hypsometry +hyrax +hyson +hyssop +hysterectomy +hysteresis +hysteria +hysteric +hysterics +hysterocatalepsy +hysterogeny +hysterotomy +hystricomorph +hythergraph +hyzone +i +ia +iamb +iambus +iarovization +iatrochemist +iatrochemistry +iatrogenicity +ib +ibex +ibid +ibis +ic +ice +iceberg +iceblink +iceboat +iceboating +icebox +icebreaker +icecap +icefall +icehouse +iceman +ich +ichneumon +ichnite +ichnography +ichnology +ichor +ichth +ichthammol +ichthyographer +ichthyography +ichthyol +ichthyolite +ichthyologist +ichthyology +ichthyophagist +ichthyophagy +ichthyophthirius +ichthyornis +ichthyosaur +ichthyosaurus +ichthyosis +icicle +iciness +icing +icker +icon +iconicity +iconoclasm +iconoclast +iconodule +iconoduly +iconograph +iconographer +iconography +iconolater +iconolatry +iconologist +iconology +iconoscope +iconostasis +icosahedron +icositetrahedron +icterus +ictus +id +idcue +iddhi +ide +idea +ideal +idealisation +idealiser +idealism +idealist +ideality +idealization +idealizer +idealness +ideamonger +ideation +ideatum +idemfactor +identicalness +identifiableness +identification +identifier +identity +ideogram +ideograph +ideography +ideologist +ideology +ideomotion +ides +idioblast +idiocrasy +idiocy +idiodynamics +idioglossia +idiograph +idiolect +idiom +idiomaticalness +idiomaticity +idiomorphism +idiopathy +idiophone +idioplasm +idiorrhythmism +idiorrhythmy +idiosyncrasy +idiot +idioticalness +idiotism +idleness +idler +idlesse +idocrase +idol +idolater +idolatriser +idolatrizer +idolatrousness +idolatry +idolisation +idoliser +idolism +idolist +idolization +idolizer +idolum +idoneity +idoneousness +idyll +idyllist +ie +iff +igloo +ign +ignitability +igniter +ignitibility +ignition +ignitron +ignobility +ignobleness +ignominiousness +ignominy +ignoramus +ignorance +ignorantness +ignorer +iguana +iguanid +iguanodon +ihp +ihram +ijithad +ijma +ikan +ike +ikebana +ikon +il +ileitis +ileocolitis +ileostomy +ileum +ileus +ilex +iliocostalis +ilium +ilk +illamon +illation +illdisposedness +illegalisation +illegality +illegalization +illegibility +illegibleness +illegitimacy +illhumor +illiberalism +illiberality +illiberalness +illicitness +illimitability +illimitableness +illinium +illiteracy +illiterateness +illmanneredness +illnature +illness +illocution +illogic +illogicality +illogicalness +illtreatment +illuminability +illuminance +illuminant +illumination +illuminator +illuminism +illuminist +illuminometer +illus +illusion +illusionism +illusionist +illusiveness +illusoriness +illust +illustration +illustrator +illustriousness +illuviation +illuvium +ilmenite +ilth +image +imager +imagery +imaginariness +imagination +imaginativeness +imaginer +imagism +imagist +imagnableness +imago +imam +imamate +imambarah +imamship +iman +imaret +imbalance +imbalmer +imbalmment +imbarkation +imbarkment +imbecile +imbecility +imbiber +imbibition +imbitterer +imbitterment +imbodiment +imbracery +imbrex +imbrication +imbroglio +imbruement +imbrutement +imbuement +imidazole +imide +imidogen +imine +iminourea +imit +imitability +imitableness +imitation +imitativeness +imitator +immaculacy +immaculateness +immanency +immaneness +immanentism +immaterialism +immaterialist +immateriality +immaterialness +immatureness +immaturity +immeasurability +immeasurableness +immediacy +immediateness +immediatism +immediatist +immedicableness +immenseness +immensity +immensurability +immensurableness +immergence +immersion +immersionism +immersionist +immethodicalness +immigrant +immigration +immigrator +imminence +imminentness +immiscibility +immitigability +immixture +immobilisation +immobilism +immobility +immobilization +immoderacy +immoderateness +immoderation +immodesty +immolation +immolator +immoralism +immoralist +immorality +immortalisation +immortaliser +immortality +immortalization +immortalizer +immortelle +immovability +immovableness +immoveability +immoveableness +immunisation +immuniser +immunity +immunization +immunizer +immunoassay +immunochemistry +immunogenetics +immunogenicity +immunoglobulin +immunol +immunologist +immunology +immunoreaction +immunotherapy +immuration +immurement +immutability +immutableness +imp +impact +impaction +impactite +impairer +impairment +impala +impalement +impaler +impalpability +impanation +impanator +impanelment +imparity +imparkation +imparlance +impartation +imparter +impartiality +impartialness +impartibility +impartment +impassability +impassableness +impasse +impassibility +impassibleness +impassionedness +impassiveness +impassivity +impastation +impasto +impatience +impatiens +impatientness +impavidity +impeachability +impeacher +impeachment +impeccability +impeccance +impeccancy +impecuniosity +impecuniousness +impedance +impeder +impedibility +impediment +impeller +impendence +impendency +impenetrability +impenetrableness +impenitence +impenitency +impenitentness +imper +imperativeness +imperator +imperatorship +imperceptibility +imperceptibleness +imperception +imperceptiveness +imperceptivity +impercipience +imperf +imperfectibility +imperfection +imperfectness +imperforation +imperialisation +imperialism +imperialist +imperialization +imperialness +imperilment +imperiousness +imperishability +imperishableness +imperium +impermanence +impermanency +impermeability +impermeableness +impermissibility +impers +impersonalisation +impersonalism +impersonality +impersonalization +impersonation +impersonator +impertinence +impertinency +impertinentness +imperturbability +imperturbableness +imperturbation +imperviousness +impetigo +impetration +impetrator +impetuosity +impetuousness +impetus +impf +impi +impiety +impignoration +impingement +impinger +impiousness +impishness +implacability +implacableness +implantation +implanter +implausibility +impleader +implement +implementation +implementer +implementor +impletion +implication +implicitness +implicity +imploration +implorer +imploringness +implosion +impluvium +impolicy +impoliteness +impoliticness +imponderability +imponderableness +imponent +importability +importance +importation +importee +importer +importunacy +importunateness +importuner +importunity +imposer +imposingness +imposition +impossibility +impossibleness +impost +imposter +impostor +impostume +imposture +imposure +impotence +impoundage +impounder +impoundment +impoverisher +impoverishment +impracticability +impracticableness +impracticality +impracticalness +imprecation +imprecator +impreciseness +imprecision +impregnability +impregnableness +impregnation +impregnator +impresa +impresario +imprescriptibility +impresser +impressibility +impressibleness +impression +impressionability +impressionableness +impressionism +impressionist +impressiveness +impressment +impressure +imprest +imprimatur +imprimatura +imprint +imprinter +imprinting +imprisoner +imprisonment +improbability +improbableness +improbity +improperness +impropriation +impropriator +impropriety +improvability +improvableness +improvement +improver +improvidence +improvisation +improvisator +improviser +improvvisatore +imprudence +imprudency +imprudentness +impsonite +impudence +impudentness +impudicity +impugnability +impugner +impugnment +impuissance +impulse +impulsion +impulsiveness +impunity +impureness +impurity +imputability +imputableness +imputation +imputativeness +imputer +imputrescibility +impv +inability +inaccessibility +inaccessibleness +inaccuracy +inaccurateness +inaction +inactivation +inactiveness +inactivity +inadaptability +inadequacy +inadequateness +inadmissibility +inadvertence +inadvertency +inadvisability +inadvisableness +inalienability +inalienableness +inalterability +inalterableness +inamorata +inamorato +inanimateness +inanimation +inanition +inanity +inappetence +inapplicability +inapplicableness +inappositeness +inappreciativeness +inapprehension +inapprehensiveness +inapproachability +inappropriateness +inaptitude +inaptness +inarticulateness +inartificiality +inartificialness +inattention +inattentiveness +inaudibility +inaudibleness +inauguration +inaugurator +inauspiciousness +inbeing +inbreeding +inburst +inby +inc +incalculability +incalculableness +incalescence +incandescence +incantation +incapability +incapableness +incapaciousness +incapacitation +incapacity +incarceration +incarcerator +incardination +incarnation +incasement +incaution +incautiousness +incendiarism +incense +incensement +incensory +incenter +incentive +inception +inceptor +incertitude +incessancy +incessantness +inch +inchoateness +inchoation +inchworm +incidence +incident +incidentalness +incienso +incineration +incinerator +incipience +incipiency +incipit +incision +incisiveness +incisor +incisure +incitation +incitement +inciter +incivility +incivism +incl +inclemency +inclementness +inclination +incliner +inclining +inclinometer +incloser +inclosure +includedness +incluse +inclusion +inclusiveness +incogitability +incognizance +incoherence +incoherency +incombustibility +incombustibleness +income +incomer +incommensurability +incommensurableness +incommensurateness +incommodiousness +incommodity +incommunicability +incommunicableness +incommunicativeness +incommutability +incommutableness +incompactness +incomparability +incomparableness +incompatibility +incompatibleness +incompetence +incompleteness +incompletion +incompliance +incompliancy +incomprehensibility +incomprehensibleness +incomprehension +incomprehensiveness +incompressibility +inconceivability +inconceivableness +inconclusiveness +incondensability +incondensibility +inconformity +incongruence +incongruity +incongruousness +inconnu +inconsecutiveness +inconsequence +inconsequentiality +inconsequentness +inconsiderableness +inconsiderateness +inconsideration +inconsistency +inconsolability +inconsolableness +inconsonance +inconspicuousness +inconstancy +incontestability +incontestableness +incontinence +incontinency +incontinuity +incontrovertibility +incontrovertibleness +inconvenience +inconveniency +inconvertibility +inconvertibleness +inconvincibility +incoordination +incor +incorporatedness +incorporation +incorporator +incorporeality +incorporeity +incorr +incorrectness +incorrigibility +incorrigibleness +incorruptibility +incorruptibleness +incorruption +incorruptness +incr +incrassation +increaser +incredibility +incredibleness +incredulity +incredulousness +increment +increscence +incretion +incrimination +incriminator +incross +incrustation +incubation +incubator +incubus +incudes +inculcation +inculcator +inculpability +inculpableness +inculpation +incumbency +incumbrance +incurability +incurableness +incuriosity +incuriousness +incurrence +incursion +incurvation +incurvature +incurve +incus +incuse +ind +indaba +indagation +indagator +indamine +indebtedness +indecency +indecipherability +indecipherableness +indecision +indecisiveness +indecl +indeclinableness +indecomposableness +indecorousness +indecorum +indef +indefatigability +indefatigableness +indefeasibility +indefeasibleness +indefectibility +indefensibility +indefensibleness +indefinableness +indefiniteness +indehiscence +indeliberateness +indeliberation +indelibility +indelibleness +indelicacy +indelicateness +indemnification +indemnifier +indemnitee +indemnitor +indemnity +indemonstrability +indemonstrableness +indene +indentation +indenter +indention +indentor +indenture +indentureship +independence +independency +indescribability +indescribableness +indestructibility +indestructibleness +indeterminableness +indeterminacy +indeterminateness +indetermination +indeterminism +indeterminist +index +indexer +indic +indican +indicant +indication +indicator +indices +indicium +indicolite +indicter +indiction +indictment +indictor +indifference +indifferency +indifferentism +indifferentist +indigence +indigene +indigenity +indigenousness +indiges +indigestibility +indigestibleness +indigestion +indigitation +indignation +indignity +indigo +indigotin +indirection +indirectness +indiscernibility +indiscernibleness +indiscerptibility +indiscerptibleness +indiscipline +indiscreetness +indiscretion +indiscriminateness +indiscrimination +indispensability +indispensableness +indisposedness +indisposition +indisputability +indisputableness +indissolubility +indissolubleness +indistinctiveness +indistinctness +indistinguishability +indistinguishableness +inditement +inditer +indium +individ +individualisation +individualiser +individualism +individualist +individuality +individualization +individualizer +individuation +individuator +indivisibility +indivisibleness +indocility +indoctrination +indoctrinator +indoctrinization +indole +indolence +indomethacin +indomitability +indomitableness +indophenol +indorsee +indorsement +indorser +indorsor +indoxyl +indraft +indraught +indri +indris +indubitability +indubitableness +induc +inducement +inducer +inductance +inductee +inductility +induction +inductiveness +inductor +inductothermy +indulgence +indulgency +indulger +induline +indult +indumentum +induna +induplication +induration +indus +indusium +industrialisation +industrialism +industrialist +industrialization +industrialness +industriousness +industry +indweller +inebriation +inebriety +inedibility +ineducability +ineducation +ineffability +ineffableness +ineffaceability +ineffectiveness +ineffectuality +ineffectualness +inefficaciousness +inefficacity +inefficacy +inefficiency +inelasticity +inelegance +inelegancy +ineligibility +ineligibleness +ineloquence +ineluctability +ineptitude +ineptness +inequality +inequitableness +inequity +ineradicableness +inerasableness +inerrability +inerrableness +inerrancy +inertance +inertia +inertness +inescapableness +inescutcheon +inessentiality +inestimability +inestimableness +inevitability +inevitableness +inexactitude +inexactness +inexcusability +inexcusableness +inexecution +inexertion +inexhaustibility +inexhaustibleness +inexistence +inexistency +inexorability +inexorableness +inexpedience +inexpediency +inexpensiveness +inexperience +inexpertness +inexpiableness +inexplicability +inexplicableness +inexplicitness +inexpressibility +inexpressibleness +inexpressiveness +inexpugnability +inexpugnableness +inexpungibility +inextensibility +inextirpableness +inextricability +inf +infallibilism +infallibility +infallibleness +infamousness +infamy +infancy +infant +infanta +infante +infanthood +infanticide +infantilism +infantility +infantry +infantryman +infarct +infarction +infare +infatuation +infatuator +infeasibility +infeasibleness +infectedness +infecter +infection +infectiousness +infectiveness +infectivity +infector +infecundity +infelicity +infeoffment +inference +inferiority +infernality +inferno +inferrer +infertileness +infertility +infestation +infester +infeudation +infidel +infidelity +infield +infielder +infighter +infighting +infill +infiltration +infiltrator +infimum +infin +infiniteness +infinitesimality +infinitesimalness +infinitive +infinitude +infinity +infirmarian +infirmary +infirmity +infirmness +infixion +inflamedness +inflamer +inflammability +inflammableness +inflammation +inflatable +inflatedness +inflater +inflation +inflationism +inflationist +inflator +inflectedness +inflection +inflector +inflexibility +inflexibleness +inflexion +inflicter +infliction +inflictor +inflorescence +inflow +influence +influencer +influenza +influx +info +infolder +infoldment +informality +informant +information +informativeness +informer +infortunateness +infortune +infraction +infractor +infralapsarian +infralapsarianism +infrangibility +infrangibleness +infrared +infrasonics +infrastructure +infrequency +infringement +infringer +infundibulum +infuriation +infuser +infusibility +infusibleness +infusion +infusionism +infusionist +infusorian +inganue +ingate +ingatherer +ingathering +ingemination +ingeneration +ingeniousness +ingenuity +ingenuousness +ingestion +ingine +ingle +inglenook +ingleside +ingloriousness +ingnue +ingot +ingraftation +ingrafter +ingraftment +ingrainedness +ingrate +ingratiation +ingratitude +ingravescence +ingredient +ingress +ingression +ingressiveness +ingroup +ingrowth +ingulfment +ingurgitation +inhabitability +inhabitancy +inhabitant +inhabitation +inhabitedness +inhabiter +inhalation +inhalator +inhaler +inharmoniousness +inharmony +inhaul +inherence +inherency +inheritability +inheritableness +inheritance +inheritor +inheritrix +inhesion +inhibiter +inhibition +inhibitor +inhomogeneity +inhospitableness +inhospitality +inhumanity +inhumanness +inhumation +inhumer +inimicality +inimicalness +inimitability +inimitableness +inion +iniquitousness +iniquity +init +initialer +initialler +initiation +initiative +initiator +initiatrix +injection +injector +injudiciousness +injunction +injuredness +injurer +injuriousness +injury +injustice +ink +inkberry +inkblot +inker +inkhorn +inkie +inkiness +inkle +inkling +inkstand +inkwell +inkwood +inlander +inlawry +inlayer +inlet +inlier +inline +inmate +inn +innage +innateness +innerness +innervation +inning +innings +innkeeper +innocence +innocency +innocuity +innocuousness +innomine +innovation +innovator +innoxiousness +innuendo +innumerability +innumerableness +innutrition +inobservance +inoculability +inoculant +inoculation +inoculator +inoculum +inodorousness +inoffensiveness +inofficiosity +inofficiousness +inoperativeness +inopportuneness +inopportunity +inordinacy +inordinateness +inorg +inorganization +inosculation +inosilicate +inositol +inpatient +input +inqilab +inquartation +inquest +inquietness +inquietude +inquiline +inquilinity +inquirer +inquiry +inquisition +inquisitionist +inquisitiveness +inquisitor +inquisitorialness +inradius +inrigger +inroad +inrush +inrushing +ins +insalivation +insalubrity +insaneness +insanitariness +insanitation +insanity +insatiability +insatiableness +insatiateness +insatiety +inscape +inscribableness +inscriber +inscription +inscrutability +inscrutableness +insect +insectarium +insectary +insecticide +insectifuge +insectivore +insectologer +insectology +insecureness +insecurity +inselberg +insemination +insensateness +insensibility +insensitiveness +insensitivity +insentience +insentiency +insep +inseparability +inseparableness +inserter +insertion +insetter +inshoot +inside +insider +insidiousness +insight +insigne +insignia +insignificance +insignificancy +insincerity +insinuation +insinuator +insipidity +insipidness +insipience +insistence +insistency +insister +insnarement +insnarer +insobriety +insociability +insolation +insole +insolence +insolubility +insolubilization +insolubleness +insolvability +insolvency +insomnia +insomnolence +insouciance +insp +inspectability +inspection +inspector +inspectorate +inspectorship +inspiration +inspirer +inspiriter +inspiritment +inspissation +inspissator +inst +instability +installant +installation +installer +installment +instalment +instance +instancy +instant +instantaneity +instantaneousness +instar +instatement +instauration +instaurator +instep +instigant +instigation +instigator +instillation +instillator +instiller +instillment +instilment +instinct +instituter +institutes +institution +institutionalisation +institutionalism +institutionalist +institutionalization +institutor +instr +instroke +instructedness +instruction +instructiveness +instructor +instructorship +instrument +instrumentalism +instrumentalist +instrumentality +instrumentation +insubordination +insubstantiality +insufferableness +insufficiency +insufflation +insufflator +insula +insularism +insularity +insulation +insulator +insulin +insulination +insultation +insulter +insuperability +insuperableness +insupportableness +insurability +insurance +insurant +insurer +insurgence +insurgency +insurmountability +insurmountableness +insurrection +insurrectionism +insurrectionist +insusceptibility +inswathement +inswing +inswinger +int +intactness +intaglio +intake +intangibility +intangibleness +intarsia +intarsist +integer +integrability +integrality +integrand +integraph +integration +integrationist +integrator +integrity +integument +intellect +intellection +intellectualisation +intellectualiser +intellectualism +intellectualist +intellectuality +intellectualization +intellectualizer +intellectualness +intelligence +intelligencer +intelligentsia +intelligibility +intelligibleness +intemerateness +intemperance +intemperateness +intendance +intendancy +intendant +intendedness +intendency +intender +intendment +inteneration +intens +intenseness +intensification +intensifier +intension +intensitometer +intensity +intensiveness +intent +intention +intentionality +intentness +interabsorption +interaction +interactionism +interactionist +interadaption +interaffiliation +interagency +interagent +interagglutination +interagreement +interambulacrum +interantagonism +interapplication +interarboration +interassociation +interattrition +interavailability +interaxis +interbalance +interbrain +intercalation +intercarrier +interceder +interception +interceptor +intercession +intercessor +interchangeability +interchangeableness +interchanger +intercirculation +intercivilization +interclash +interclavicle +intercohesion +intercolonization +intercolumniation +intercom +intercombat +intercombination +intercommission +intercommonage +intercommoner +intercommunicability +intercommunication +intercommunicator +intercommunion +intercommunity +intercomparison +intercomplexity +intercondenser +interconnectedness +interconnection +intercontradiction +interconversion +interconvertibility +intercooler +intercorrelation +intercrop +intercupola +intercurrence +interdenominationalism +interdentil +interdependability +interdependence +interdependency +interdestructiveness +interdetermination +interdict +interdiction +interdictor +interdifferentiation +interdiffusiness +interdiffusion +interdigitation +interdivision +interdome +interelectrode +interentanglement +interest +interestedness +interesterification +interestingness +interface +interfacing +interfederation +interfenestration +interference +interferer +interferometer +interferometry +interferon +interfertility +interfilling +interfiltration +interflashing +interfluence +interfluve +interforce +interfriction +interfusion +intergeneration +interglyph +intergradation +intergrowth +interhabitation +interincorporation +interindependence +interinhibition +interinsurance +interior +interiorism +interiorist +interiority +interjacence +interjection +interjector +interjoist +interjudgment +interjunction +interkinesis +interlacement +interlamellation +interlamination +interlanguage +interlardation +interlardment +interlaudation +interleaf +interlight +interlineation +interliner +interlingua +interlining +interlocation +interlocker +interloculus +interlocution +interlocutor +interlocutrix +interloop +interloper +interlude +interlunation +intermarriage +intermatch +intermean +intermeddler +intermediacy +intermediary +intermediateness +intermediation +intermediator +interment +intermessage +intermezzo +intermigration +interminability +interminableness +interminglement +intermission +intermittence +intermittency +intermitter +intermittor +intermixture +intermobility +intermodification +intermodillion +intermodulation +intermotion +intermunicipality +intermuscularity +intermutule +internality +internalization +internalness +internat +internationalisation +internationalism +internationalist +internationality +internationalization +interne +internee +internegative +interneuron +internist +internment +internode +internship +internuncio +interoceptor +interosculation +interownership +interpellation +interpellator +interpenetration +interpervasiveness +interphase +interphone +interplay +interpleader +interpolater +interpolation +interpolator +interposal +interposer +interposition +interpretability +interpretableness +interpretation +interpreter +interpretership +interquarter +interradiation +interreflection +interregnum +interrelatedness +interrelation +interrelationship +interrepulsion +interresistance +interresistibility +interreticulation +interrex +interrobang +interrog +interrogation +interrogator +interruptedness +interrupter +interruption +intersale +interscene +interschool +intersection +intersession +intersolubility +interspersal +interspersion +interstade +interstice +interstimulation +interstratification +interstriation +interstructure +intersubsistence +intersubstitution +intertexture +intertrade +intertraffic +intertransformability +intertriglyph +intertrigo +intertwinement +interunion +interval +intervale +intervalley +intervalometer +intervariation +intervener +intervenor +intervention +interventionism +interview +interviewee +interviewer +intervisitation +intervolution +interweavement +interweaver +interworld +intestacy +intestine +inthrallment +inthralment +intima +intimacy +intimateness +intimater +intimation +intimidation +intimidator +intinction +intine +intitulation +intolerability +intolerableness +intolerance +intombment +intonaco +intonation +intoner +intorsion +intoxicant +intoxication +intoxicator +intr +intractability +intractableness +intrados +intrans +intransigeance +intransigeancy +intransigence +intransigency +intransitiveness +intrant +intravasation +intrencher +intrenchment +intrepidity +intrepidness +intricacy +intricateness +intrigant +intrigante +intriguer +intro +introducer +introduction +introductoriness +introgression +introit +introjection +intromissibility +intromission +intromitter +introscope +introspection +introspectionist +introspectiveness +introspector +introsusception +introversion +introvert +intruder +intrusion +intrusiveness +intubation +intuition +intuitionalism +intuitionalist +intuitionism +intuitionist +intuitiveness +intuitivism +intuitivist +intumescence +inturn +intussusception +intwinement +inulase +inulin +inunction +inundation +inundator +inurbaneness +inurbanity +inuredness +inurement +inurnment +inutility +inv +invader +invagination +invalid +invalidation +invalidator +invalidism +invalidity +invalidness +invaluableness +invariability +invariableness +invariant +invasion +invective +invectiveness +inveigher +inveiglement +inveigler +invenit +inventer +invention +inventiveness +inventor +inventory +inveracity +inversion +inversor +invertase +invertebracy +invertebrate +invertebrateness +inverter +invertibility +invertin +invertor +investigation +investigator +investiture +investment +investor +inveteracy +inveterateness +invidiousness +invigilation +invigilator +invigorant +invigoration +invigorator +invincibility +invincibleness +inviolability +inviolableness +inviolacy +inviolateness +invisibility +invisibleness +invitation +inviter +invitingness +invocation +invocator +invoice +invoker +involucel +involucre +involucrum +involuntariness +involution +involvedness +involvement +involver +invt +invulnerability +invulnerableness +invultuation +inwale +inwardness +inyala +iodate +iodation +iodide +iodimetry +iodine +iodism +iodization +iodizer +iodoform +iodometry +iodopsin +iolite +ion +ionisation +ioniser +ionium +ionization +ionizer +ionogen +ionomer +ionone +ionopause +ionosphere +iontophoresis +iota +iotacism +ipecac +iph +ipm +ipomoea +ipr +iproniazid +ips +iq +ir +iracundity +irade +irascibility +irascibleness +ire +irefulness +irenicon +irenics +iridectome +iridectomy +irides +iridescence +iridium +iridization +iridocapsulitis +iridochoroiditis +iridocyclitis +iridosmine +iridotomy +iris +irisation +iritis +irksomeness +iron +ironbark +irone +ironer +ironhandedness +ironicalness +ironing +ironist +ironmaster +ironmonger +ironmongery +ironside +ironsides +ironsmith +ironstone +ironware +ironweed +ironwood +ironwork +ironworker +ironworking +ironworks +irony +irradiance +irradiation +irradiator +irrationalism +irrationality +irrationalness +irreclaimability +irreclaimableness +irreconcilability +irreconcilableness +irrecoverableness +irredeemability +irredeemableness +irredenta +irredentism +irredentist +irreducibility +irreducibleness +irrefragability +irrefragableness +irrefrangibility +irrefrangibleness +irrefutability +irrefutableness +irreg +irregularity +irrelativeness +irrelevance +irrelevancy +irreligion +irreligionist +irreligiosity +irreligiousness +irremediableness +irremissibility +irremissibleness +irremovability +irremovableness +irreparability +irreparableness +irrepealability +irrepealableness +irrepressibility +irrepressibleness +irreproachability +irreproachableness +irresistibility +irresistibleness +irresolubility +irresoluteness +irresolution +irresolvability +irresolvableness +irresponsibility +irresponsibleness +irresponsiveness +irretention +irretentiveness +irretrievability +irretrievableness +irreverence +irreversibility +irreversibleness +irrevocability +irrevocableness +irrigation +irrigator +irritability +irritableness +irritancy +irritation +irritativeness +irritator +irroration +irruption +isabnormal +isagoge +isagogics +isallobar +isallotherm +isanomal +isarithm +isatin +isauxesis +isba +ischaemia +ischemia +ischium +isentrope +ishime +isidium +isinglass +isl +island +islander +isle +islet +isls +ism +isnad +isoabnormal +isoagglutination +isoagglutinin +isoantigen +isobar +isobarism +isobath +isobathytherm +isobront +isobutane +isobutylene +isocephaly +isochasm +isocheim +isochor +isochrone +isochronism +isochrony +isocline +isocracy +isocrat +isocyanate +isocyanide +isocyanine +isodef +isodiaphere +isodimorphism +isodomum +isodrosotherm +isogamete +isogamy +isogeny +isogeotherm +isogloss +isogon +isogonality +isogone +isogradient +isograft +isogram +isograph +isogriv +isohaline +isohel +isohume +isohyet +isolability +isolation +isolationism +isolationist +isolator +isoleucine +isolex +isoline +isologue +isomer +isomerism +isomerization +isometrics +isometropia +isometry +isomorph +isomorphism +isoneph +isoniazid +isonomy +isooctane +isopach +isopag +isopectic +isopedin +isoperimeter +isoperimetry +isophone +isopleth +isopod +isopolity +isopor +isoprene +isopropanol +isopropyl +isopropylideneacetone +isopyre +isorhythm +isostasy +isostemony +isostere +isosterism +isotac +isotach +isoteniscope +isothere +isotherm +isothermobath +isotone +isotonicity +isotope +isotopy +isotron +isotropy +isotype +issuance +issue +issuer +istana +isthmectomy +isthmus +istle +itacolumite +ital +italicization +itch +itchiness +item +itemization +itemizer +iter +iterance +iteration +iterativeness +itherness +itinerancy +itinerarium +itinerary +itineration +iv +ivory +ivorytype +ivy +ivyberry +iw +ixia +ixodid +ixtle +izard +izba +izzard +j +jaap +jabberer +jabberwocky +jabiru +jaborandi +jabot +jaburan +jacal +jacamar +jacana +jacaranda +jacinth +jack +jackal +jackanapes +jackaroo +jackass +jackassery +jackassism +jackassness +jackboot +jackdaw +jackeroo +jacket +jackey +jackfish +jackfruit +jackhammer +jackknife +jacklight +jacklighter +jackpile +jackpiling +jackpot +jacks +jackscrew +jackshaft +jacksmelt +jacksnipe +jackstay +jackstone +jackstraw +jackyard +jacobsite +jacobus +jaconet +jacquard +jacquemart +jactation +jacteleg +jactitation +jaculation +jaculator +jad +jadder +jade +jadedness +jadeite +jadishness +jaeger +jaga +jagamohan +jager +jaggedness +jaggery +jaguar +jaguarondi +jaguarundi +jai +jaiana +jail +jailbird +jailbreak +jailer +jailhouse +jak +jakes +jalap +jalapin +jalee +jalopy +jalor +jalousie +jamb +jambalaya +jambart +jambeau +jambiya +jamboree +jambos +jamboy +jambstone +jamesonite +jampan +jane +jangler +janissary +janitor +janitorship +japan +japanner +jape +japer +japery +japonica +japygid +jar +jardini +jardiniere +jargon +jargoneer +jargonisation +jargonist +jargonization +jarl +jarldom +jarosite +jarovization +jarrah +jarvey +jarvy +jasey +jasmine +jasper +jass +jasy +jato +jaundice +jaunt +jauntiness +jaup +javanine +javelin +jaw +jawan +jawbone +jawbreaker +jawfish +jawp +jawrope +jay +jaybird +jayvee +jaywalker +jazey +jazy +jazz +jazzer +jazziness +jazzman +jct +jealousness +jealousy +jean +jebel +jeep +jeerer +jefe +jehad +jejunectomy +jejuneness +jejunity +jejunostomy +jejunum +jellaba +jellib +jelliedness +jellification +jello +jelly +jellybean +jellyfish +jellying +jemadar +jembe +jemmy +jen +jennet +jenny +jeopardousness +jeopardy +jequirity +jer +jerbil +jerboa +jereed +jeremiad +jerid +jerker +jerkin +jerkiness +jerkinhead +jeroboam +jerreed +jerry +jersey +jess +jessamine +jesse +jest +jestbook +jester +jet +jeta +jetavator +jetliner +jetport +jetsam +jetted +jettiness +jetting +jetton +jetty +jeu +jewel +jeweler +jewelfish +jeweller +jewellery +jewelry +jewelweed +jewfish +jg +jger +jiao +jib +jibba +jibber +jiber +jiffy +jig +jigger +jiggermast +jigging +jigsaw +jihad +jill +jillaroo +jillet +jillion +jilter +jim +jimigaki +jimmy +jimpness +jin +jingal +jingler +jingo +jingoism +jingoist +jingu +jinja +jinker +jinn +jinni +jinrikisha +jinx +jipijapa +jissom +jitney +jitterbug +jiujitsu +jiva +jive +jizya +jo +joannes +job +jobbed +jobber +jobbery +jobbing +jobholder +joblessness +jock +jockey +jockeyship +jocko +jockstrap +jockteleg +jocoseness +jocosity +jocularity +jocundity +jodhpur +joe +joey +jogger +joggler +johannes +john +johnin +johnny +johnnycake +joinder +joiner +joinery +joint +jointedness +jointer +jointure +jointweed +jointworm +joist +jojoba +joke +jokebook +joker +jokester +joktaleg +jole +jollification +jolliness +jollity +jolter +joltiness +jongleur +jonquil +jordan +jornada +joropo +jorum +joseph +josher +joskin +joss +josser +jostlement +jostler +jota +jotter +jotting +joual +jouk +joule +jour +journal +journalese +journalism +journalist +journalization +journalizer +journey +journeyer +journeyman +journeywork +journo +joust +jouster +joviality +jovialness +jow +jowl +joy +joyance +joyfulness +joylessness +joyousness +joyride +jr +juba +jubbah +jube +jubilance +jubilancy +jubilatio +jubilation +jubilee +jubilus +jud +judaiser +judas +judge +judger +judgeship +judgment +judicator +judicature +judicialness +judiciousness +judo +judogi +judoist +judoka +jug +jugful +juggernaut +juggins +juggler +jugglery +jughead +jugulation +jugum +juice +juicer +juiciness +jujitsu +juju +jujube +jujuism +jujuist +jujutsu +jukebox +julep +jumblement +jumbler +jumbo +jumbuck +jumper +jumpiness +jumpmaster +jumprock +junco +junction +juncture +jundy +jungle +junglegym +juniorate +juniority +juniper +junk +junket +junketeer +junketter +junkie +junkman +junkyard +junta +junto +jupe +jupon +jura +juramentado +jurat +juration +jurel +jurisconsult +jurisdiction +jurisp +jurisprudence +jurist +juror +jury +jus +justaucorps +juster +justice +justicer +justiceship +justiciability +justiciar +justiciarship +justicoat +justifiability +justifiableness +justification +justifier +justness +jute +jutty +juvenescence +juvenileness +juvenility +juxtaposition +k +ka +kab +kabaka +kabala +kabaragoya +kabbala +kabob +kabuki +kabuzuchi +kachina +kadi +kaf +kaffiyeh +kaftan +kago +kagu +kahuna +kaiak +kaif +kail +kailyard +kailyarder +kailyardism +kain +kainite +kainogenesis +kaiser +kaiserdom +kaiserism +kaisership +kajeput +kaka +kakapo +kakemono +kaki +kakistocracy +kal +kalam +kalanchoe +kalathos +kale +kaleidoscope +kalema +kalendar +kaleyard +kali +kalian +kalif +kalifate +kalinite +kaliph +kalmia +kalong +kalpa +kalpak +kalpis +kalsomine +kalsominer +kaltemail +kamacite +kamala +kambal +kame +kamelaukion +kami +kamikaze +kampong +kampylite +kamseen +kana +kanamycin +kane +kaneelhart +kang +kanga +kangaroo +kangarooing +kanji +kanone +kans +kantar +kantele +kantharos +kanzu +kaoliang +kaolin +kaolinisation +kaolinite +kaolinization +kaon +kapellmeister +kaph +kapok +kapote +kappa +kapuka +kaput +karabiner +karaburan +karakul +karanda +karat +karate +karma +karmadharaya +karo +karoo +kaross +karpas +karri +karrusel +karst +kart +karuna +karyogamy +karyokinesis +karyolymph +karyolysis +karyomitome +karyoplasm +karyosome +karyotin +karyotype +kas +kasbah +kasha +kasher +kashira +kashmir +kashruth +kat +katabasis +katabolism +katakana +katalase +katalysis +katalyst +katalyzer +katamorphism +kataplasia +katatonia +katcina +katcr +katharsis +kathisma +kathode +katholikos +kation +katydid +katzenjammer +kauch +kauri +kaury +kava +kaver +kayak +kayo +kazachok +kazatsky +kazoo +kb +kc +kcal +kea +keat +kebab +kebar +kebbuck +keblah +keckling +kecksy +ked +keddah +kedgeree +keef +keek +keel +keelage +keelboat +keelboatman +keelson +keener +keening +keenness +keeper +keepership +keeping +keepnet +keepsake +keeshond +keet +kef +keffiyeh +keg +kegler +kehillah +keir +keister +keitloa +kelebe +kelek +kelep +kelleg +kellet +kellion +kelly +keloid +kelotomy +kelp +kelpfish +kelpie +kelpy +kelson +kelt +kelter +kelvin +kemp +ken +kenaf +kench +kendo +kendoist +kennel +kenning +keno +kenogenesis +kenosis +kente +kentledge +kepi +keramics +keratalgia +keratectasia +keratectomy +keratin +keratinization +keratitis +keratoconus +keratode +keratoderma +keratoma +keratometer +keratometry +keratoplasty +keratoscope +keratoscopy +keratosis +keratotomy +kerb +kerbaya +kerbing +kerbstone +kerchief +kerf +kerfuffle +kermes +kermesite +kermis +kern +kernel +kernite +kernos +kero +kerogen +kerosene +kerry +kersey +kerseymere +kerygma +kestrel +ketch +ketchup +ketene +ketogenesis +ketohexose +ketolysis +ketone +ketonemia +ketonuria +ketose +ketosis +ketoxime +kettle +kettledrum +kettledrummer +ketubah +kevalin +kevel +kewpie +kex +key +keyboard +keyhole +keyman +keynote +keynoter +keypuncher +keyslot +keystone +keystroke +keyway +keyword +kfmmel +kfrsch +kg +kgf +kgr +kha +khaddar +khaki +khakis +khalif +khalifate +khalsa +khamsin +khan +khanate +khanda +khanga +khansamah +kharif +khat +khatri +khayal +kheda +khedive +khediviate +khidmatgar +khoja +khuskhus +kiaat +kiang +kiaugh +kibble +kibbutz +kibbutznik +kibe +kibitka +kibitzer +kiblah +kibosh +kickback +kickball +kickboard +kickdown +kicker +kickoff +kickshaw +kicksorter +kickstand +kicktail +kickup +kickwheel +kid +kidder +kidding +kiddishness +kiddle +kiddo +kiddy +kidnaper +kidnapper +kidney +kidneywort +kidskin +kief +kielbasa +kier +kieselguhr +kieserite +kif +kikoi +kikumon +kil +kilderkin +kilerg +kiley +kilij +killdee +killdeer +killer +killick +killickinnic +killifish +killikinick +killock +kiln +kilo +kiloampere +kilobar +kilobaud +kilocalorie +kilocurie +kilocycle +kilodyne +kilogauss +kilograin +kilogram +kilohertz +kilohm +kilojoule +kiloline +kiloliter +kilolumen +kilom +kilomegacycle +kilometer +kilometre +kilomole +kiloparsec +kilopoise +kilopound +kilostere +kiloton +kilovar +kilovolt +kilowatt +kilt +kilter +kiltie +kilting +kimberlite +kimchi +kimmer +kimono +kin +kina +kinaesthesia +kinase +kinchin +kincob +kindergarten +kindergartner +kindheartedness +kindjal +kindler +kindliness +kindling +kindness +kindredness +kindredship +kine +kinema +kinematics +kinematograph +kinematographer +kinematography +kinescope +kinesics +kinesiology +kinesthesia +kinetics +kinetograph +kinetographer +kinetography +kinetoplast +kinetoscope +kinetosis +king +kingbird +kingbolt +kingcraft +kingcup +kingdom +kingfish +kingfisher +kinghood +kinglessness +kinglet +kingliness +kingmaker +kingmaking +kingpin +kingship +kingsnake +kingwood +kinin +kink +kinkajou +kinkiness +kinkle +kinnikinnick +kino +kinoo +kinship +kinsman +kinswoman +kionectomy +kionotomy +kiosk +kiotomy +kip +kipper +kipuka +kirby +kirigami +kirk +kirkman +kirmess +kirpan +kirschwasser +kirtle +kisan +kish +kishke +kismet +kissability +kissableness +kissel +kisser +kist +kistvaen +kiswah +kit +kitambilla +kitbag +kitchen +kitchener +kitchenette +kitchenmaid +kitchenware +kite +kitenge +kiter +kith +kithara +kitling +kitsch +kittel +kitten +kittenishness +kittiwake +kitty +kiva +kiwi +kiyas +kiyi +kl +klaberjass +klangfarbe +klavern +klavier +klaxon +kleagle +klebsiella +klepht +kleptomania +kleptomaniac +klesha +klippe +klipspringer +klismos +klister +klong +kloof +klootchman +klusse +klutz +klystron +km +kmel +kmole +kn +knack +knacker +knackery +knackwurst +knag +knaidel +knap +knapper +knapsack +knapweed +knar +knave +knavery +knavishness +knawel +kneadability +kneader +kneckebrud +knee +kneecap +kneehole +kneeler +kneepad +kneepan +kneepiece +knell +knickknack +knife +knifer +kniferest +knight +knighthead +knighthood +knightliness +knish +knitter +knitting +knitwear +knives +knob +knobbiness +knobbler +knobkerrie +knockabout +knocker +knockout +knockwurst +knoll +knoller +knop +knorr +knosp +knot +knotgrass +knothole +knotroot +knotter +knottiness +knotting +knotweed +knotwork +knout +knowability +knowableness +knowe +knower +knowingness +knowledgableness +knowledge +knowledgeableness +knownothingism +knuckle +knucklebone +knucklebones +knucklehead +knuckler +knulling +knur +knurling +koa +koala +koan +kob +kobold +kodaker +kodogu +koel +kofta +koftgar +kogai +kohl +kohlrabi +koilonychia +koine +kokanee +koko +kola +kolinsky +kolkhoz +kolo +komatik +kona +konak +kondo +kongoni +konimeter +koniology +kontakion +koodoo +kook +kookaburra +koorajong +kop +kopeck +kopfring +koph +kopis +kopje +koppa +kor +koradji +kore +korfball +korma +korona +koruna +kos +kosha +koso +koto +kotower +kottabos +kotwal +kotwali +koulibiaca +koumis +kouprey +kourbash +kouros +kousso +kowhai +kowtower +kpc +kr +kraal +kraft +krait +kraken +krakowiak +krameria +krans +krater +kraurosis +kremlin +krepis +kreutzer +kriegspiel +krill +krimmer +kris +krivu +krna +kromesky +krona +krone +kroon +krs +kruller +krumhorn +krummhorn +kruna +krypton +ksi +kt +kuchen +kudos +kudu +kudzu +kueh +kufiyeh +kugel +kukri +kula +kulak +kumiss +kummerbund +kumquat +kundalini +kunzite +kurbash +kurchatovium +kurn +kurrajong +kursaal +kurta +kurtosis +kurus +kusso +kuvasz +kvass +kwacha +kwanza +kwartje +kwashiorkor +kwela +kyack +kyak +kyanite +kyat +kyathos +kyle +kylie +kylin +kylix +kyloe +kymograph +kyphoscoliosis +kyphosis +kyte +kytoon +kyu +l +la +laager +lab +labarum +labdanum +labefaction +label +labeler +labeller +labellum +labialisation +labialism +labiality +labialization +labiate +lability +labilization +labiogression +labiovelarisation +labiovelarization +labium +lablab +laboratorian +laboratory +laboredness +laborer +laboriousness +labour +labouredness +labourer +labourism +labourist +labradorite +labret +labrid +labroid +labrum +laburnum +labyrinth +labyrinthitis +labyrinthodont +lac +laccolith +lace +lacebark +lacemaking +lacer +lacerability +laceration +lacerna +lacertid +lacewing +lacewood +lacework +laches +lachrymator +lachrymatory +lachrymosity +laciness +lacing +lack +lackadaisicalness +lacker +lackerer +lackey +laconicum +laconism +lacquer +lacquerer +lacquey +lacrimation +lacrimator +lacrosse +lactalbumin +lactam +lactase +lactate +lactation +lactescency +lactescense +lactiferousness +lactobacillus +lactoflavin +lactogen +lactometer +lactone +lactonization +lactoprotein +lactoscope +lactose +lacuna +lacunar +lacunosity +lacunule +lad +ladanum +ladder +ladderman +ladderway +laddie +lader +ladhood +ladies +lading +ladino +ladle +ladleful +ladler +ladrone +lady +ladybird +ladybug +ladyfinger +ladyfish +ladyhood +ladyishness +ladykin +ladylikeness +ladylove +ladyship +ladysnow +laevorotation +laevulin +laevulose +lagan +lagen +lagena +lager +laggard +laggardness +laggen +lagger +laggin +lagging +lagniappe +lagomorph +lagoon +lagune +lah +lahar +lai +laicisation +laicism +laicization +lair +laird +lairdship +laitance +laith +laity +lake +lakefront +lakeport +laker +lakeshore +lakh +lakin +laksa +lalang +lalapalooza +lallation +lalopathy +lalophobia +laloplegia +lam +lama +lamasery +lamb +lambda +lambdacism +lambency +lambert +lambkill +lambkin +lamboy +lambrequin +lambskin +lamebrain +lamed +lamella +lamellibranch +lamellicorn +lamellosity +lameness +lamentableness +lamentation +lamenter +lamia +lamina +laminaria +lamination +laminator +lamington +laminitis +lamister +lammergeier +lamp +lampad +lampadaire +lampas +lampern +lampers +lampion +lamplight +lamplighter +lampoon +lampooner +lampoonery +lampoonist +lamppost +lamprey +lamprophony +lamprophyre +lampshade +lampworker +lampworking +lampyrid +lamster +lanai +lance +lancejack +lancelet +lancepod +lancer +lancers +lancet +lancetfish +lancewood +lancination +land +landammann +landau +landaulet +landfall +landform +landgrave +landgraviate +landgravine +landholder +landing +landlady +landlessness +landloper +landlord +landlordism +landlordry +landlordship +landlubber +landman +landmark +landmass +landowner +landownership +landowning +landrace +landscape +landscaper +landscapist +landshark +landside +landskip +landsknecht +landslide +landsman +landsmanshaft +landwaiter +lane +langeel +langiel +langlauf +langlaufer +langouste +langrage +langsat +language +langue +languet +languette +languidness +languisher +languishment +languor +langur +laniard +lankiness +lankness +lanner +lanneret +lanolin +lanosity +lansa +lansquenet +lantana +lantern +lanternfish +lanthanide +lanthanum +lanthorn +lanuginousness +lanugo +lanyard +lap +laparectomy +laparotome +laparotomist +laparotomy +lapboard +lapel +lapful +lapidary +lapidation +lapidification +lapillus +lapin +lapis +lappage +lapper +lappet +lapse +lapser +lapsus +lapwing +laqueus +lar +lararium +larboard +larcener +larceny +larch +lard +larder +lardon +lares +largeness +largess +lariat +larithmics +lark +larker +larkiness +larkishness +larkspur +larnax +larrigan +larrikin +larrikinism +larruper +larry +larum +larva +larvicide +laryngectomee +laryngectomy +laryngitis +laryngologist +laryngology +laryngopharynx +laryngoscope +laryngoscopist +laryngoscopy +laryngotomy +larynx +lasagne +lascar +lasciviousness +laser +lash +lasher +lashing +lashkar +lasket +lass +lassie +lassitude +lasso +lassoer +laster +lastingness +lat +latah +latch +latchet +latching +latchkey +latchstring +latecomer +latency +lateness +latensification +laterality +lateran +laterite +lateroversion +latex +lath +lathe +lathee +lather +latherer +lathi +lathing +lati +latices +latifundium +latimeria +latino +latitude +latitudinarianism +latke +latria +latrine +latten +lattice +latticework +latticing +latticinio +laudability +laudableness +laudanum +laudation +laudator +lauder +lauds +laughableness +laugher +laughing +laughingstock +laughter +laumontite +launce +launcher +launchplex +launderability +launderer +launderette +laundry +laundryman +laundrywoman +laura +lauraldehyde +laurate +laureateship +laurel +laurence +laurite +laurustinus +lautenclavicymbal +lauwine +lav +lava +lavabo +lavage +lavaliere +lavaret +lavation +lavatory +laveche +lavender +laver +laverock +lavisher +lavishment +lavishness +lavolta +lavrock +law +lawabidingness +lawbook +lawbreaker +lawbreaking +lawfulness +lawgiver +lawgiving +lawine +lawing +lawlessness +lawmaker +lawmaking +lawman +lawn +lawrencium +lawsuit +lawyer +laxation +laxative +laxativeness +laxity +laxness +layabout +laydown +layer +layerage +layering +layette +layman +layoff +layout +layover +layshaft +laystall +layup +laywoman +lazar +lazaretto +laziness +lazuli +lazulite +lazurite +lazybones +lb +lbf +lc +lca +le +lea +leachability +leacher +leadenness +leader +leadership +leadoff +leadplant +leadsman +leadwort +leaf +leafage +leafbird +leafhopper +leafiness +leaflessness +leaflet +leafstalk +league +leaguer +leak +leakage +leakance +leaker +leakiness +lealty +leaner +leangle +leaning +leanness +leaper +leapfrog +leapfrogger +lear +learnedness +learner +learning +lease +leaseback +leasehold +leaseholder +leaseman +leaser +leash +leasing +leat +leather +leatherback +leatherfish +leatherflower +leatherhead +leatheriness +leatherjacket +leatherleaf +leatherneck +leatherwood +leatherwork +leatherworker +leaven +leavening +leaver +leaves +leaving +lebbek +leben +lebes +lebkuchen +lechatelierite +lechayim +lecher +lecherousness +lechery +lechuguilla +lechwe +lecithality +lecithin +lecithinase +lect +lectern +lection +lectionary +lector +lectorate +lectorship +lecture +lecturer +lectureship +lecythus +ledge +ledger +lee +leeboard +leech +leefang +leek +leeriness +leet +leeway +leftism +leftover +leftwinger +lefty +leg +legacy +legalese +legalism +legalist +legality +legalization +legate +legatee +legateship +legation +legato +legator +legend +legendist +legendry +leger +legerdemain +legerdemainist +legerity +leges +legginess +legging +legharness +leghorn +legibility +legion +legionnaire +legislation +legislator +legislatorship +legislatrix +legislature +legist +legitim +legitimacy +legitimateness +legitimation +legitimisation +legitimism +legitimist +legitimization +leglen +legman +legroom +legume +legumin +legwork +lehayim +lehr +lehua +lei +leiomyoma +leishmania +leishmaniasis +leister +leisure +leisureliness +leisureness +leitmotif +leitmotiv +lek +lekane +lekythos +lekythus +leman +lemma +lemming +lemniscate +lemniscus +lemon +lemonade +lemonfish +lempira +lemur +lender +length +lengthener +lengthiness +lengthman +leniency +lenition +lenity +leno +lens +lensman +lenticel +lenticle +lentigo +lentil +leone +leopard +leopardess +leotard +leper +lepidolite +lepidopteran +lepidopterist +lepidopterology +lepidopteron +lepidosiren +leporide +leprechaun +leprologist +leprology +leprosarium +leprosy +leprousness +leptocephalus +leptokurtosis +lepton +leptoprosopy +leptorrhiny +leptosome +leptospira +leptospirosis +leptotene +lequear +lesbian +lesbianism +lesche +lesion +lespedeza +lessee +lesseeship +lesson +lessor +leste +lestobiosis +lesya +letdown +lethality +lethargy +letter +letterer +lettergram +letterhead +lettering +letterman +letterpress +letters +letterset +lettuce +letup +leu +leucemia +leucine +leucite +leucitite +leucoblast +leucocidin +leucocyte +leucocythemia +leucocytosis +leucoderma +leucoline +leucoma +leucomaine +leucon +leuconostoc +leucopenia +leucoplast +leucopoiesis +leucorrhea +leucorrhoea +leucosis +leucosticte +leucotaxine +leucotome +leucotomy +leud +leukoblast +leukocidin +leukocyte +leukocythemia +leukocytopenia +leukocytosis +leukoderma +leukoma +leukopedesis +leukopenia +leukopoiesis +leukorrhea +leukosis +leukotaxine +leukotomy +lev +levade +levant +levanter +levantera +levantine +levanto +levarterenol +levator +leveche +levee +leveler +leveller +levelness +lever +leverage +leveret +leviathan +levier +levigation +levigator +levin +levirate +levitation +levitator +levity +levoglucose +levorotation +levulose +lewis +lewisite +lewisson +lex +lexeme +lexicality +lexicog +lexicographer +lexicography +lexicologist +lexicology +lexicon +lexicostatistics +lexigraphy +lexis +ley +lf +lg +lgth +lh +lhb +li +liability +liaison +liana +liang +liar +liard +lib +libation +libeccio +libel +libelant +libelee +libeler +libellant +libellee +liber +liberalisation +liberaliser +liberalism +liberalist +liberality +liberalization +liberalizer +liberalness +liberation +liberator +libertarian +libertarianism +liberticide +libertinage +liberty +libra +librarian +librarianship +library +libration +librettist +libretto +libri +lice +licence +licensee +licenser +licensor +licentiate +licentiateship +licentiation +licentiousness +licet +lich +lichee +lichen +lichenification +lichenin +lichenism +lichenologist +lichenology +lichi +licht +licker +lickerishness +licking +lickspittle +licorice +lictor +lid +lidia +lido +lidocaine +liebfraumilch +lied +liegeman +lien +lienectomy +lienitis +lientery +lier +lierne +lieu +lieutenancy +lieutenant +life +lifeblood +lifeboat +lifeboatman +lifeguard +lifelessness +lifelikeness +lifeline +lifer +lifesaver +lifetime +lifework +liftboy +lifter +liftoff +ligament +ligamentum +ligan +ligand +ligation +ligature +ligeance +liger +light +lightboat +lightener +lightening +lighter +lighterage +lighterman +lightface +lightfastness +lighthead +lightheartedness +lighthouse +lighting +lightlessness +lightness +lightning +lightship +lightsomeness +lightwood +lignaloes +ligne +lignification +lignin +lignite +lignocaine +lignocellulose +ligroin +ligula +ligule +ligure +likability +likableness +likeability +likeableness +likelihood +likeness +liker +likin +liking +likker +likuta +lila +lilac +lilt +lily +limacon +limaion +limb +limberneck +limberness +limbo +limbus +lime +limeade +limekiln +limelight +limelighter +limen +limequat +limerick +limes +limestone +limesulfur +limewater +limewood +limey +liminess +limit +limitableness +limitarian +limitation +limitedness +limiter +limitlessness +limmer +limner +limnologist +limnology +limonene +limonite +limousine +limper +limpet +limpidity +limpidness +limpkin +limpness +limulus +lin +linac +linage +linalool +linarite +linch +linchpin +lincrusta +linctus +lindane +linden +lindy +line +lineage +lineament +lineamentation +linearisation +linearity +linearization +lineation +linebacker +linebreeding +linecaster +lineman +linen +linenfold +liner +linesman +ling +linga +lingam +lingcod +lingerer +lingerie +lingo +lingoe +lingonberry +lingua +linguini +linguist +linguistician +linguistics +linhay +liniment +linin +lining +link +linkage +linkboy +linkman +linkwork +linn +linnet +lino +linocut +linoleate +linoleum +linotyper +linotypist +linsang +linseed +linsey +linstock +lint +lintel +linter +linyphiid +lion +lioncel +lioness +lionet +lionfish +lionheart +lionheartedness +lionisation +lioniser +lionization +lionizer +lip +lipase +lipectomy +lipemia +lipid +lipocaic +lipochrome +lipocyte +lipogram +lipogrammatism +lipogrammatist +lipography +lipolysis +lipoma +lipopexia +lipoprotein +lipotropism +lippen +lipper +lippie +lipstick +liq +liquation +liquefacient +liquefaction +liquefier +liquer +liquescence +liqueur +liquid +liquidambar +liquidation +liquidator +liquidity +liquidizer +liquidness +liquidus +liquor +liquorice +lira +lirella +liriodendron +liripipe +lisle +lisp +lisper +lissomeness +lissomness +list +listel +listener +lister +listerellosis +listeria +listeriasis +listeriosis +listing +listlessness +litany +litas +litchi +liter +literacy +literalisation +literaliser +literalism +literalist +literality +literalization +literalizer +literalness +literariness +literation +literator +literature +lith +litharge +lithemia +litheness +lithia +lithiasis +lithium +litho +lithograph +lithographer +lithography +lithol +litholapaxy +lithology +lithomarge +lithometeor +lithonephrotomy +lithophane +lithophone +lithophyte +lithopone +lithoprinter +lithosere +lithosol +lithosphere +lithotomist +lithotomy +lithotrite +lithotritist +lithotrity +lithuresis +lithuria +litigant +litigation +litigator +litigiosity +litigiousness +litmus +litotes +litre +litter +litterbug +littleneck +littleness +littrateur +litu +liturgics +liturgiologist +liturgiology +liturgism +liturgist +liturgy +lituus +livability +livableness +liveability +liveableness +livebearer +livelihood +liveliness +livener +liveness +liver +liverberry +liverishness +liverleaf +liverwort +liverwurst +livery +liveryman +lives +livestock +liveware +lividity +lividness +livingness +livraison +livre +liwen +lixiviation +lixivium +liza +lizard +lizardfish +lizzie +ll +llama +llano +ller +lm +ln +loach +load +loader +loading +loadstar +loadstone +loaf +loafer +loaiasis +loam +loaminess +loan +loanblend +loaner +loaning +loanshift +loather +loathing +loathness +loathsomeness +loaves +lob +lobation +lobber +lobby +lobbyer +lobbyism +lobbyist +lobe +lobectomy +lobelia +lobeline +loblolly +lobo +lobola +lobolo +lobotomy +lobscouse +lobster +lobstering +lobstick +lobulation +lobule +lobulus +lobus +lobworm +loca +locale +localisation +localiser +localism +localist +locality +localization +localizer +localness +locater +location +locator +loch +loche +lochia +lochus +loci +lock +lockage +lockbox +locker +locket +lockjaw +locknut +lockout +locksmith +locksmithery +locksmithing +lockup +loco +locoed +locoing +locoism +locoman +locomobility +locomotion +locomotive +locomotiveness +locomotivity +locoweed +loculation +locule +loculus +locum +locus +locust +locusta +locution +locutorium +locutory +lode +loden +lodestar +lodestone +lodge +lodger +lodging +lodgment +lodicule +loe +loellingite +loess +loft +lofter +loftiness +loftsman +log +logan +loganberry +logarithm +logbook +loge +logger +loggerhead +loggia +logginess +logging +logia +logic +logicality +logicalness +logician +logicism +loginess +logion +logistic +logistician +logistics +logjam +loglog +logo +logogram +logographer +logography +logogriph +logomach +logomachist +logomachy +logopaedics +logopedics +logorrhea +logorrhoea +logos +logotype +logotypy +logperch +logroller +logrolling +logway +logwood +loiasis +loin +loincloth +loiterer +lokacara +lollapalooza +loller +lollipop +lolly +loma +loment +lomentum +lonelihood +loneliness +loneness +loner +lonesomeness +longa +longan +longanimity +longbeard +longboat +longbow +longcloth +longe +longeron +longevity +longhair +longhand +longhead +longheadedness +longhorn +longicorn +longies +longing +longingness +longitude +longness +longship +longshoreman +longsleever +longsomeness +longspur +longueur +lonicera +loo +looby +loof +loofa +loofah +looie +lookdown +looker +lookout +lookum +loom +looming +loon +looniness +loop +looper +loophole +loosebox +loosener +looseness +loosestrife +loosing +loot +looter +loper +lophobranch +lophophore +lopolith +lopper +lopseed +lopsidedness +lopstick +loq +loquaciousness +loquacity +loquat +loquitur +loran +lord +lording +lordliness +lordling +lordosis +lordship +lore +lorgnette +lorgnon +lorica +lorication +lorikeet +lorimer +loris +lornness +lorry +lory +losableness +losel +loser +loss +lota +lote +lotion +lotted +lotter +lottery +lotting +lotto +lotus +loudmouth +loudness +loudspeaker +lough +louie +louis +loun +lounger +loup +loupcervier +loupe +louringness +louse +lousewort +lousiness +lout +loutishness +loutrophoros +louvar +louver +louvre +lovability +lovableness +lovage +lovat +loveability +loveableness +lovebird +lovegrass +lovelessness +loveliness +lovelock +lovelornness +lover +lovesickness +lovey +lovingness +lowan +lowball +lowboy +lowbrow +lowbrowism +lowerclassman +lowland +lowlife +lowlihead +lowliness +lowness +lox +loxodrome +loxodromics +loyalism +loyalist +loyalness +loyalty +lozenge +ls +lsc +lst +lt +luau +lub +lubber +lubberliness +lube +lubra +lubricant +lubrication +lubricator +lubricity +lubritorium +lucarne +luce +lucence +lucency +lucerne +luces +lucida +lucidity +lucidness +lucifer +luciferase +luciferin +luck +luckie +luckiness +lucklessness +lucrativeness +lucre +lucubration +lucubrator +lud +ludicrousness +ludo +lues +luff +luffa +luge +luggage +lugger +luggie +lugsail +lugubriosity +lugubriousness +lugworm +lukewarmness +lukewarmth +lulab +lulav +lullaby +luller +lullingite +lulu +lumbago +lumber +lumberer +lumbering +lumberingness +lumberjack +lumberjacket +lumberman +lumbermill +lumberyard +lumbrical +lumbricalis +lumen +luminance +luminary +luminescence +luminophore +luminosity +luminousness +lumisterol +lummox +lump +lumpenproletariat +lumper +lumpfish +lumpiness +lumpishness +lumpsucker +lunacy +lunarian +lunation +lunch +luncheon +luncheonette +luncher +lunchhook +lunchroom +lunchtime +lune +lunes +lunette +lung +lungan +lunge +lungee +lunger +lungfish +lungi +lungworm +lungwort +lungyi +lunkhead +lunt +lunula +lupin +lupoma +lupulin +lupulone +lupus +lur +lurcher +lurdan +lurement +lurer +luridness +lurker +lusciousness +lushness +lust +luster +lusterer +lustering +lusterware +lustfulness +lustihood +lustiness +lustration +lustre +lustreware +lustring +lustrousness +lustrum +lutanist +lute +lutecium +lutein +luteinization +lutenist +luteolin +luteotropin +lutestring +lutetium +luthern +luting +lutist +lux +luxation +luxe +luxulianite +luxuriance +luxuriation +luxuriousness +luxury +lv +lwm +lwop +lwp +lx +lyc +lycae +lycanthrope +lycanthropy +lyceum +lych +lychee +lychnis +lychnoscope +lycine +lycopod +lycopodium +lycosid +lyddite +lye +lygaeid +lymph +lymphad +lymphadenitis +lymphadenoma +lymphangioma +lymphangitis +lymphatolysis +lymphoadenoma +lymphoblast +lymphocyte +lymphocytosis +lymphogranuloma +lymphoidocyte +lymphoma +lymphopenia +lymphopoiesis +lymphosarcoma +lyncher +lynchet +lynching +lynx +lyolysis +lyophilization +lyre +lyrebird +lyricalness +lyricisation +lyricism +lyricist +lyricization +lyrism +lyrist +lysimeter +lysin +lysine +lysis +lysosome +lysozyme +lyssa +lyssophobia +lytta +m +ma +maar +mabela +mac +macaco +macadam +macadamia +macadamise +macaque +macaroni +macaroon +macaw +maccaboy +maccaroni +mace +macebearer +macedoine +macer +macerater +maceration +macerator +macfarlane +machaira +machan +machete +machicolation +machinability +machination +machinator +machine +machinery +machinist +machismo +machree +machtpolitik +machzor +macintosh +mack +mackerel +mackinaw +mackintosh +mackle +macle +maco +macoma +macram +macrencephaly +macro +macrobiotics +macrocephalus +macrocephaly +macroclimate +macroclimatology +macrocosm +macrocyst +macrocyte +macrodome +macrodontia +macroeconomics +macrogamete +macrograph +macrography +macrolinguistics +macrolith +macromolecule +macron +macronucleus +macronutrient +macrophage +macrophysics +macropsia +macroptery +macrosporangium +macrospore +macrostomia +macrostructure +macruran +macula +maculation +macule +macumba +madafu +madaillon +madam +madame +maddeningness +madder +madeleine +mademoiselle +madhouse +madman +madness +madras +madre +madrepore +madreporite +madrigal +madrigalist +madril +madrilene +madtom +madwoman +madwort +maelstrom +maenad +maenadism +maestro +mafficker +mafioso +maftir +mag +magazine +magazinism +magazinist +magdalen +mage +magenta +maggie +maggot +magic +magician +magilp +magistery +magistracy +magistrality +magistrate +magistrateship +magma +magmatism +magnalium +magnanimity +magnate +magnesia +magnesite +magnesium +magnet +magnetics +magnetisation +magnetiser +magnetism +magnetite +magnetizability +magnetization +magnetizer +magneto +magnetochemistry +magnetoelectricity +magnetogenerator +magnetograph +magnetohydrodynamics +magnetometer +magnetometry +magneton +magnetooptics +magnetosphere +magnetostriction +magnetothermoelectricity +magnetron +magnification +magnificence +magnifico +magniloquence +magnitude +magnolia +magnum +magot +magpie +maguey +magus +mahaleb +maharajah +maharanee +maharani +maharishi +mahatma +mahayanist +mahdism +mahewu +mahjong +mahlstick +mahogany +mahonia +mahout +mahseer +mahua +maid +maidan +maiden +maidenhair +maidenhead +maidenhood +maidenship +maidhood +maidservant +maihem +mail +mailability +mailbag +mailbox +mailcatcher +mailcoach +mailer +maill +maillot +mailman +mailsack +maimedness +maimer +mainbrace +mainland +mainlander +mainliner +mainmast +mains +mainsail +mainsheet +mainspring +mainstay +mainstream +maintainer +maintainor +maintenance +maintop +maintopsail +maiolica +maisonette +maithuna +maize +majesty +majolica +major +majorette +majority +majuscule +makefast +maker +makeshiftness +makeup +makeweight +makimono +making +makluk +mako +maksoorah +makuta +malabsorption +malacca +malachite +malacia +malacologist +malacology +malacostracan +maladaptation +maladdress +maladjustment +maladministrator +maladroitness +malady +malaguena +malaise +malam +malamute +malanders +malanga +malange +malapertness +malapportionment +malapropism +malaria +malarkey +malassimilation +malate +malcontentedness +maleate +malediction +malee +malefaction +malefactor +maleficence +malemute +maleness +malfeasance +malformation +mali +malice +maliciousness +malie +malignancy +maligner +malignity +malihini +malines +malingerer +malison +malkin +mall +mallam +mallanders +mallard +malleability +malleableness +malleation +mallee +mallemuck +mallenders +malleolus +mallet +malleus +mallow +malm +malmsey +malnutrition +malocclusion +malodorousness +malonylurea +malposition +malpractice +malpractitioner +malt +maltase +maltha +malthene +maltiness +malting +maltol +maltose +maltster +malvasia +malversation +malvoisie +malwa +mam +mama +mamba +mambo +mamelon +mamey +mamilla +mamma +mammal +mammalian +mammality +mammalogist +mammalogy +mammee +mammet +mammilla +mammock +mammon +mammonism +mammonist +mammonite +mammoth +mammotropin +mammula +mammy +mamoncillo +mampara +mamzer +man +mana +manacle +management +manager +managership +manak +manakin +manana +manas +manatee +manbote +manche +manchet +manchette +manchineel +manciple +mandacaru +mandala +mandamus +mandarin +mandatary +mandate +mandi +mandible +mandilion +mandioca +mandir +mandola +mandolin +mandolinist +mandorla +mandragora +mandrake +mandrel +mandrill +manducation +mandyas +mane +maneuver +maneuverability +maneuverer +mangabey +manganate +manganese +manganite +manganophyllite +mange +mangelwurzel +manger +mangler +mango +mangonel +mangosteen +mangrove +manhole +manhood +manhunt +mania +maniac +manicotti +manicure +manicurist +manifer +manifestant +manifestation +manifesto +manifolder +manifoldness +manikin +manilla +manille +manioc +maniple +manipulative +manipulator +manism +manit +manitou +manjak +mankind +manlessness +manlikeness +manliness +manna +mannan +mannequin +manner +mannerism +mannerist +mannerlessness +mannerliness +manness +mannikin +mannishness +mannitol +mannose +manoeuvre +manometer +manor +manorialism +manpower +manque +manroot +manrope +mansard +manse +manservant +mansion +manslaughter +manslayer +manslaying +manstealing +manstopper +mansuetude +manta +mantapa +manteau +mantel +mantelet +mantelletta +mantellone +mantelpiece +manteltree +mantid +mantilla +mantis +mantispid +mantissa +mantle +mantlet +mantletree +mantling +mantra +mantrap +mantua +manubrium +manucode +manuf +manufactory +manufacturer +manuka +manumission +manumitter +manure +manus +manuscript +manway +manyplies +manzanilla +map +maple +mapping +maquette +maqui +maquillage +maquis +mara +marabou +marabout +maraboutism +marabunta +maraca +marasca +maraschino +marasmus +marathon +marathoner +marauder +maravedi +marbelization +marble +marbleization +marbler +marbles +marbling +marc +marcasite +marcel +marcella +marceller +marcescence +marcher +marchesa +marchese +marchioness +marchland +marchpane +marconigram +marconigraph +mare +marekanite +maremma +mareograph +marezzo +marg +marga +margarine +margarita +margarite +margay +marge +margent +margin +margination +margravate +margrave +margravine +marguerite +maria +mariachi +marialite +mariculture +maridienne +marigold +marigraph +marijuana +marimba +marina +marinade +marinara +marination +mariner +marionette +mariposa +maritage +marjoram +mark +markdown +markedness +marker +market +marketability +marketableness +marketer +marketing +marketplace +markhor +marking +markka +marksman +markswoman +markup +marl +marlin +marline +marlinespike +marlinsucker +marlite +marmalade +marmite +marmoset +marmot +marocain +maroquin +maror +marouflage +marque +marquee +marquess +marquessate +marquetry +marquis +marquisate +marquise +marquisette +marriage +marriageability +marriageableness +marron +marrow +marrowbone +marrowfat +marse +marseille +marseilles +marsh +marshal +marshall +marshiness +marshland +marshmallow +marsipobranch +marsupial +marsupialization +marsupium +mart +martagon +martellato +marten +martensite +martialism +martialist +martialness +martin +martinet +martingale +martini +martlet +martnet +martyr +martyrdom +martyrisation +martyrium +martyrologist +martyrology +martyry +marvellousness +marver +mary +marzipan +mas +masalliance +masc +mascara +mascaron +mascle +mascon +mascot +masculineness +masculinity +masculinization +maser +mash +mashgiach +mashgiah +mashie +masjid +mask +maskalonge +maskanonge +masker +maskinonge +maslin +masochism +masochist +mason +masonry +masque +masquer +masquerade +masquerader +mass +massacre +massage +massager +massagist +massasauga +masseter +masseur +masseuse +massicot +massif +massiness +massiveness +massivity +masslessness +massotherapy +mast +mastaba +mastax +mastectomy +master +masterdom +masterfulness +masterhood +masterliness +masterpiece +mastership +mastersinger +masterstroke +mastery +masthead +mastic +mastication +mastiff +mastigium +mastigophoran +mastitis +mastix +mastocarcinoma +mastodon +mastoidectomy +mastoiditis +mastopathy +mastopexy +masturbation +masurium +mat +mata +matador +match +matchboard +matchboarding +matchbook +matchbox +matcher +matchlessness +matchlock +matchmaker +matchmaking +matchmark +matchstick +matchwood +mate +matelassa +matelot +matelote +mater +materfamilias +material +materialisation +materialiser +materialism +materialist +materiality +materialization +materializer +materialness +materiel +maternalism +maternity +mateyness +math +mathematician +mathematics +maths +matilda +matinae +matindol +matiness +mating +matins +matis +matisse +matlo +matoke +matrass +matriarch +matriarchalism +matriarchate +matriarchy +matric +matrices +matricide +matriculation +matriculator +matrilineage +matrilocality +matrimony +matrix +matron +matronage +matronhood +matronliness +matronship +matsu +mattamore +matte +matter +matting +mattins +mattock +mattoid +mattrass +mattress +maturation +maturement +matureness +maturer +maturity +matzah +matzo +matzoon +mauby +maud +maudlinism +maudlinness +mauler +maulstick +maulvi +maumet +maumetry +maunche +maund +maunderer +maundy +mausoleum +mauve +maverick +mavin +mavis +mavourneen +maw +mawkin +mawkishness +mawsie +max +maxilla +maxilliped +maxim +maxima +maximalist +maximation +maximin +maximization +maximizer +maximum +maximus +maxisingle +maxiskirt +maxixe +maxwell +maya +mayflower +mayfly +mayhem +mayonnaise +mayor +mayoralty +mayorship +maypole +maypop +mayweed +mazaedium +mazair +mazard +mazarine +mazdoor +maze +mazedness +maziness +mazopathy +mazuma +mazurka +mazzard +mb +mc +meacon +mead +meadow +meadowlark +meadowsweet +meagerness +meagreness +meal +mealie +mealies +mealiness +mealtime +mealworm +meanderer +meanie +meaning +meaningfulness +meaninglessness +meaningness +means +meanspiritedness +meantime +meany +measles +measurability +measurableness +measure +measurelessness +measurement +measurer +measuringworm +meat +meatball +meathead +meatiness +meatman +meatus +mecamylamine +mech +mechanic +mechanicality +mechanicalness +mechanician +mechanics +mechanism +mechanist +mechanization +mechanizer +mechanomorphism +mechanotherapist +mechanotherapy +mechitzah +meck +meclizine +mecometer +meconium +medaka +medal +medallion +medallist +meddlesomeness +media +mediacy +mediaevalism +mediaevalist +mediant +mediastinum +mediateness +mediation +mediatisation +mediatization +mediator +mediatorship +mediatory +medic +medicament +medication +medicine +medick +medico +medievalism +medievalist +medina +mediocrity +meditation +meditativeness +meditator +medius +medlar +medley +medulla +medullation +medullization +medusa +mee +meed +meekness +meerkat +meerschaum +meeter +meeting +meetness +meg +megabit +megabuck +megacephaly +megacity +megacycle +megadeath +megadontia +megagamete +megahertz +megajoule +megakaryoblast +megalith +megaloblast +megalocardia +megalocephaly +megalomania +megalomaniac +megalopolis +megalopolitanism +megalopsia +megalosaur +megameter +megaphone +megapod +megapode +megarad +megaron +megascope +megasporangium +megaspore +megasporophyll +megass +megathere +megatherm +megaton +megavolt +megawatt +megger +megillah +megilp +megohm +megrim +megrims +mehitzah +meiny +meionite +meiophylly +meiosis +mel +mela +melaleuca +melamed +melamine +melammed +melancholia +melancholiness +melancholy +melanin +melanism +melanite +melanocyte +melanoderm +melanoma +melanosis +melaphyre +melatonin +melder +melee +melena +meletin +melezitose +melilot +melinite +melioration +meliorator +meliorism +meliorist +meliority +melisma +mell +meller +mellifluousness +mellite +mellitum +mellophone +mellowness +melodeon +melodia +melodics +melodion +melodist +melodizer +melodrama +melodramatist +melody +meloid +melolonthine +melon +melos +meltability +meltage +melter +meltingness +melton +meltwater +melungeon +mem +member +membership +membrane +membranophone +memento +memo +memoir +memorability +memorableness +memorandum +memorialisation +memorialiser +memorialist +memorialization +memorializer +memorization +memorizer +memory +memsahib +men +menacer +menacme +menad +menadione +menagerie +menaquinone +menarche +menat +mendaciousness +mendacity +mendelevium +mender +mendicancy +mendicity +mending +mene +menhaden +menhir +meningitis +meningocele +meningococcus +meniscocytosis +meniscus +menology +menopause +menophania +menorah +menorrhagia +menoschesis +menostaxis +mense +menservants +menses +menshevism +menstruation +menstruum +mensurability +mensuration +menswear +mentalism +mentalist +mentality +menthene +menthol +menticide +mentioner +mentor +mentorship +menu +menuiserie +menuisier +menyie +mepacrine +meperidine +mephitis +meprobamate +meq +merbromin +merc +mercantilism +mercaptan +mercaptide +mercaptopurine +mercenariness +mercer +mercerization +mercerizer +mercery +merchandise +merchandiser +merchant +merchantableness +merchantman +merchet +mercifulness +mercilessness +mercurialisation +mercurialism +mercurous +mercury +mercy +merengue +meretriciousness +merganser +merger +mericarp +merida +meridian +meringue +merino +merisis +meristem +merit +meritocracy +meritoriousness +merk +merkin +merle +merlin +merlon +mermaid +merman +merogony +meroplankton +meros +merozoite +merrimack +merriment +merrymaker +merrymaking +merrythought +mesa +mescal +mescaline +mesdames +mesdemoiselles +mesembryanthemum +mesencephalon +mesenchyme +mesenteritis +mesenteron +mesentery +mesh +meshrebeeyeh +meshugaas +meshugana +meshwork +mesitylene +mesmerisation +mesmeriser +mesmerism +mesmerist +mesmerization +mesmerizer +mesnalty +mesobenthos +mesoblast +mesocardium +mesocarp +mesocephal +mesocephaly +mesocolon +mesoderm +mesogastrium +mesoglea +mesognathism +mesognathy +mesolite +mesometeorology +mesomorph +mesomorphism +mesomorphy +meson +mesonephros +mesopause +mesopeak +mesophyll +mesophyte +mesorectum +mesorrhiny +mesosphere +mesothelioma +mesothelium +mesothorax +mesothorium +mesotron +mesquite +mess +message +messaline +messan +messenger +messieurs +messin +messiness +messmate +messroom +messuage +mestee +mester +mestizo +mestranol +metabiosis +metabolism +metabolite +metacarpus +metacenter +metacentre +metachromatism +metacinnabar +metacinnabarite +metacryst +metafemale +metagalaxy +metage +metagenesis +metagnathism +metal +metalanguage +metalepsis +metalinguistics +metall +metallicity +metallicize +metallisation +metallist +metallization +metallocene +metallographer +metallographist +metallography +metalloid +metallophone +metallotherapy +metallurgy +metalsmith +metalware +metalwork +metalworking +metamale +metamathematician +metamathematics +metamer +metamere +metamerism +metamorphism +metamorphosis +metanephros +metanitrophenol +metaph +metaphase +metaphor +metaphoricalness +metaphosphate +metaphrase +metaphrast +metaphys +metaphysic +metaphysics +metaphyte +metaplasia +metaplasm +metapolitics +metaprotein +metapsychology +metascope +metasomatism +metastability +metastasis +metatarsus +metatheory +metathesis +metathesise +metathorax +metatoluidine +metatroph +metatrophy +metaxylem +metazoan +metempiricist +metempirics +metempsychosis +metencephalon +meteor +meteorite +meteoritics +meteorograph +meteorography +meteoroid +meteorol +meteorology +meter +meterage +metestrus +methacrylate +methadone +methaemoglobin +methane +methanol +methantheline +metheglin +methenamine +methionine +metho +method +methodicalness +methodiser +methodizer +methodology +methotrexate +methoxide +methoxybenzene +methoxychlor +meths +methyl +methylal +methylamine +methylation +methylator +methylbenzene +methylcatechol +methyldopa +methylene +methylheptenone +methylnaphthalene +methylparaben +methyltrinitrobenzene +methyprylon +metic +meticulosity +meticulousness +metoestrus +metol +metonym +metonymy +metope +metralgia +metre +metrician +metricism +metrics +metridium +metrification +metrifier +metrise +metrist +metritis +metrization +metro +metrology +metronidazole +metronome +metropolis +metropolitanism +metrorrhagia +metroscope +metrotome +mettle +meu +mews +mezcal +mezcaline +mezereon +mezereum +mezuza +mezuzah +mezzanine +mezzotint +mezzotinter +mf +mfd +mg +mgd +mgr +mgt +mho +mi +miaow +miasma +miazine +mib +mica +micawberism +mice +micelle +micher +michigan +mickery +mickey +micky +micra +microaerophile +microaerophilic +microampere +microanalysis +microanalyst +microangstrom +microbacterium +microbalance +microbarograph +microbe +microbicide +microbiologist +microbiology +microcephalia +microcephaly +microchemistry +microcircuit +microclimate +microclimatologist +microclimatology +microcline +micrococcus +microconstituent +microcopy +microcosm +microcoulomb +microcrystal +microcrystallinity +microcurie +microcyte +microdetector +microdissection +microdistillation +microdontia +microdot +microdyne +microeconomics +microelectronics +microelectrophoresis +microelement +microenvironment +microfarad +microfiche +microfilm +microfossil +microgamete +microgamy +microglia +microgram +micrograph +micrographer +micrography +microgroove +microhabitat +microhardness +microhenry +microhm +microlambert +microlite +microliter +microlith +micrologist +microlux +micrometeorite +micrometeorogram +micrometeorograph +micrometeorology +micrometer +micrometry +micromho +micromicrocurie +micromillimeter +microminiaturization +micromotion +micron +micronucleus +micronutrient +microorganism +micropalaeontology +micropaleontologist +micropaleontology +microparasite +micropathology +microphage +microphone +microphonism +microphot +microphotograph +microphotography +microphotometer +microphotometric +microphysics +microphyte +microprint +microprocessor +micropsia +micropyle +micropyrometer +microreader +microreproduction +micros +microscope +microscopist +microscopy +microsecond +microsegment +microseism +microsiemens +microsome +microspectrophotometry +microsporangium +microspore +microsporophyll +microstat +microstethoscope +microstructure +microsurgery +microswitch +microtherm +microtome +microtomist +microtomy +microtonality +microtone +microvolt +microwatt +microwave +micrurgy +micturition +midafternoon +midair +midband +midbrain +midcourse +midday +midden +middlebreaker +middlebrow +middlebrowism +middlebuster +middlehand +middleman +middlesail +middletone +middleweight +middy +midfield +midge +midget +midgut +midinette +midiron +midland +midleg +midline +midnight +midnoon +midpoint +midrash +midrib +midriff +midsection +midshipman +midshipmite +midst +midstream +midsummer +midterm +midtown +midweek +midwife +midwifery +midwinter +midyear +mien +mig +miggle +mightiness +mignonette +migraine +migrant +migration +mihrab +mikado +mike +mikron +mikvah +mil +milady +milage +milch +mildew +mildness +mile +mileage +mileometer +milepost +miler +milestone +milfoil +miliarensis +miliaria +milieu +milit +militancy +militantness +militariness +militarisation +militarism +militarist +militarization +militia +militiaman +milium +milk +milker +milkfish +milkiness +milkmaid +milkman +milko +milksop +milksopism +milkweed +milkwood +milkwort +mill +millboard +millcake +milldam +millefeuille +millefiori +millefleurs +millenarianism +millenary +millennium +millepede +millepore +miller +millerite +millet +milliangstrom +milliard +milliare +millibar +millibarn +millieme +millier +millifarad +milligal +milligram +millihenry +milliliter +millilitre +millilux +millime +millimeter +millimetre +millimicron +millimole +milline +milliner +millinery +milling +milliohm +million +millionaire +millionth +millipede +milliphot +millipoise +millirem +milliroentgen +millisecond +millisiemens +millivolt +millpond +millrace +millrind +millrun +millstone +millstream +millwheel +millwork +millwright +milo +milometer +milord +milquetoast +milreis +milt +milter +mimbar +mime +mimeograph +mimer +mimesis +mimetite +mimicker +mimicry +mimosa +mimosis +min +mina +minah +minaret +mincemeat +mincer +mind +minder +mindfulness +mindlessness +minefield +minelayer +miner +mineral +mineralizer +mineralocorticoid +mineralogist +mineralogy +mineraloid +minestrone +minesweeper +minge +minglement +mingler +minhag +miniature +miniaturist +miniaturization +minibus +minicab +minicam +minicomputer +minidress +minikin +minim +minima +minimalist +minimax +minimisation +minimiser +minimization +minimizer +minimum +mining +minion +minipill +miniskirt +minister +ministerialist +ministerium +ministration +ministry +minium +miniver +minivet +mink +minkfish +minnesinger +minnie +minnow +minny +minority +minster +minstrel +minstrelsy +mint +mintage +minter +minuend +minuet +minuscule +minute +minuteness +minutia +minx +minyan +miombo +miosis +mir +miracidium +miracle +miraculousness +mirador +mirage +mire +mirepoix +miriness +mirk +mirliton +mirror +mirth +mirthfulness +mirthlessness +mirza +mis +misadaptation +misadjustment +misadministration +misadventure +misadvice +misalignment +misallegation +misalliance +misallotment +misanalysis +misanthrope +misanthropy +misappellation +misapplier +misapprehension +misapprehensiveness +misarrangement +misarticulation +misassertion +misassignment +misauthorization +misbehaver +misbehavior +misbelief +misc +miscalculation +miscalculator +miscaller +miscarriage +miscegenation +miscellanist +miscellany +mischance +mischanter +mischief +mischievousness +misclassification +miscoinage +miscomputation +misconceiver +misconception +misconduct +misconstruction +miscreance +miscreancy +miscreant +miscreator +miscue +misdate +misdeed +misdelivery +misdemeanant +misdemeanor +misdemeanour +misdirection +misdoer +mise +misease +miseducation +misemphasis +miser +miserableness +miserere +misericord +misericordia +miserliness +misery +misestimation +misfashion +misfeasance +misfeasor +misfeature +misfit +misformation +misfortune +misgiving +misguidance +misguidedness +misguider +mishanter +mishap +mishit +mishmash +misidentification +misinference +misinformant +misinformation +misinformer +misinstruction +misintention +misinterpretation +misinterpreter +misjoinder +misknowledge +mislayer +misleader +misliker +mislocation +mismanagement +mismanager +mismarriage +misnavigation +misnomer +miso +misocainea +misogamist +misogamy +misogynist +misogyny +misologist +misology +misoneism +misopaedist +misopedist +misorganization +mispagination +misperception +misperformance +mispick +mispickel +misplacement +mispleading +mispractice +mispractise +misprint +mispriser +misprision +mispronouncer +mispronunciation +misproportion +misproposal +mispunctuation +misquotation +misquoter +misreader +misreckon +misreference +misreliance +misreporter +misrepresentation +misrepresenter +misruler +misrun +missa +missal +missayer +misshapenness +misshipment +missile +missilery +mission +missionary +missioner +missis +missive +misspelling +misstatement +misstater +misstep +missus +missy +missyllabification +mist +mistakableness +mistake +mistakenness +mistaker +mistal +mistbow +mistcoat +misteacher +mister +mistigris +mistletoe +mistral +mistranscription +mistranslation +mistreatment +mistress +mistrial +mistruster +mistrustfulness +misunderstander +misunderstanding +misunion +misusage +misuse +misuser +misventure +mite +miter +miterer +mitergate +miterwort +mither +mithridate +mithridatism +miticide +mitigation +mitigator +mitis +mitochondrion +mitokoromono +mitosis +mitra +mitrailleuse +mitre +mitrewort +mitt +mitten +mittimus +mitzvah +mixability +mixableness +mixedness +mixer +mixologist +mixoploid +mixoploidy +mixture +mizrah +mizzen +mizzenmast +mk +mkt +ml +mlange +mlx +mm +mmf +mmfd +mnage +mneme +mnemonics +mo +moa +moan +moat +mob +mobber +mobbishness +mobbism +mobbist +mobcap +mobilisation +mobiliser +mobility +mobilization +mobilizer +mobocracy +mobocrat +mobster +moc +moccasin +mocha +mochila +mockernut +mockers +mockery +mockingbird +modality +mode +model +modeler +modeling +modeller +modem +moderateness +moderation +moderator +moderatorship +modernisation +moderniser +modernism +modernity +modernization +modernizer +modernness +modesty +modicum +modifiability +modifiableness +modificand +modification +modifier +modillion +modiolus +modishness +modiste +modularity +modulation +modulator +module +modulus +mofette +mog +mogilalia +mogo +mogote +mogul +mohair +mohawk +mohel +mohur +mohwa +moidore +moiety +moiler +moire +moistener +moistness +moisture +moit +mojarra +moke +moksha +mol +mola +molality +molar +molarity +molasses +mold +moldavite +moldboard +moldiness +molding +moldwarp +mole +molecularity +molecule +molehill +moleskin +molestation +molester +molilalia +moll +mollah +mollescence +mollification +mollifier +mollusc +molluscum +molly +mollycoddler +moloch +molter +molvi +moly +molybdate +molybdenite +molybdenum +mom +mome +moment +momentariness +momentousness +momentum +momism +mommy +momser +mon +mona +monacillo +monad +monades +monadism +monadnock +monal +monarch +monarchism +monarchist +monarchy +monarda +monas +monastery +monasticism +monazite +monde +mondo +moneme +monergism +monetarist +monetise +monetization +money +moneybag +moneybags +moneychanger +moneyer +moneylender +moneymaker +moneymaking +moneywort +mong +monger +mongo +mongol +mongolism +mongoose +mongrel +mongrelisation +mongreliser +mongrelism +mongrelness +monies +moniker +monism +monist +monition +monitor +monitorship +monk +monkery +monkey +monkeyishness +monkeypot +monkfish +monkhood +monkshood +monnion +monobasicity +monobath +monocarp +monochasium +monochloride +monochord +monochromat +monochromaticity +monochromatism +monochrome +monochromist +monochromy +monocle +monocline +monoclinism +monocoque +monocot +monocotyledon +monocracy +monoculture +monocycle +monocycly +monocyte +monodactyl +monodactylism +monodactyly +monodrama +monodramatist +monody +monoecism +monoecy +monofilament +monogamist +monogamy +monogenesis +monogenism +monogenist +monogram +monograph +monographer +monographist +monogyny +monohull +monohybrid +monohydrate +monoid +monokini +monolater +monolatrist +monolatry +monolayer +monolith +monolithism +monologue +monomania +monomaniac +monomark +monomer +monometallism +monometer +monomethylamine +monomial +mononucleosis +monophagia +monophobia +monophony +monophthong +monophthongization +monoplane +monoplanist +monoplegia +monopode +monopodium +monopody +monopolisation +monopoliser +monopolism +monopolist +monopoly +monopolylogue +monopropellant +monopsony +monopteron +monopteros +monorail +monorhyme +monosaccharide +monosemy +monosome +monostich +monostrophe +monosyllabicity +monosyllabism +monosyllable +monosyllogism +monosymmetry +monosymptomatic +monotheism +monotint +monotone +monotonousness +monotony +monotreme +monotriglyph +monotron +monotropy +monotype +monovalence +monovalency +monoxide +mons +monsieur +monsoon +monster +monstrance +monstrosity +monstrousness +montage +montbretia +monte +monteith +montero +montgolfier +month +monticule +montilla +monument +monumentalism +monumentality +monzonite +mood +moodiness +moolah +moolvee +moolvie +moon +moonbeam +moonbow +mooncalf +mooneye +moonfish +moonflower +mooniness +moonlight +moonlighting +moonquake +moonraker +moonrise +moonscape +moonseed +moonset +moonshine +moonshiner +moonshot +moonsif +moonstone +moonwort +moor +moorage +moorcock +moorfowl +moorhen +mooring +moorland +moorwort +moose +moosemilk +moosewood +mooter +mootness +mop +mopboard +moped +moper +mopoke +moppet +moquette +mor +mora +moraine +morale +moralioralist +moralism +moralist +morality +morass +moratorium +moray +morbidity +morbilli +morceau +morcha +mordacity +mordancy +mordent +moreen +morel +morello +moreness +morepork +morganite +morgen +morgue +moribundity +morion +mormyrid +morn +morning +morocco +moron +moronism +moronity +moror +moroseness +morosity +morph +morphallaxis +morpheme +morphine +morphinism +morphogenesis +morphol +morpholine +morphologist +morphology +morphoneme +morphonemics +morphophoneme +morphophonemics +morphosis +morphotonemics +morro +morrow +morse +morsel +mort +mortadella +mortality +mortar +mortarboard +mortgage +mortgagee +mortgagor +mortice +mortician +mortification +mortifier +mortise +mortiser +mortling +mortmain +mortuary +morula +morwong +mosaic +mosaicism +mosaicist +mosasaur +moschatel +moshav +mosocecum +mosque +mosquito +mosquitofish +moss +mossback +mossbunker +mossie +mossiness +mosstrooper +mosstroopery +mosstrooping +mot +mote +motel +motet +moth +mothball +mother +motherhood +mothering +motherland +motherlessness +motherliness +motherwort +motif +motility +motion +motioner +motivation +motive +motivelessness +motivity +motmot +motocross +moton +motoneuron +motor +motorbicycle +motorbike +motorboat +motorboating +motorbus +motorcade +motorcar +motorcoach +motorcycle +motorcyclist +motordrome +motoring +motorisation +motorist +motorization +motorman +motorway +motte +mottlement +mottler +motto +mottramite +moue +mouflon +moujik +moulage +mould +mouldboard +mouldiness +moulding +mouldwarp +moulin +moulter +mound +mounding +moundsman +mountain +mountaineer +mountaineering +mountainousness +mountainside +mountaintop +mountebank +mounter +mounting +mourner +mourning +mouse +mousebird +mouser +mousetail +mousetrap +mousiness +mousing +moussaka +mousse +mousseline +moustache +moutarde +mouth +mouthbreeder +mouthbrooder +mouthful +mouthiness +mouthpart +mouthpiece +mouthwash +mouton +movability +movableness +moveability +moveableness +movelessness +movement +mover +movie +movieland +moviemaker +mower +mowing +mowrah +moxa +moxie +moxieberry +mozzarella +mozzetta +mp +mpg +mph +mphps +mrem +mridang +ms +msalliance +msl +mster +mt +mtd +mtg +mtge +mtier +mtn +mu +muchness +mucidness +mucigen +mucilage +mucin +muck +muckamuck +mucker +muckerism +muckrake +muckraker +mucksweat +muckworm +mucluc +mucopolysaccharide +mucoprotein +mucosa +mucosity +mucoviscidosis +mucro +mucronation +mucus +mud +mudcat +muddiness +muddledness +muddlehead +muddlement +muddler +mudfish +mudguard +mudir +mudlark +mudpack +mudpuppy +mudra +mudskipper +mudslinger +mudslinging +mudspringer +mudstone +muenster +muesli +muezzin +muffin +muffineer +muffler +mufti +mug +mugger +muggins +mugwort +mugwump +mugwumpery +mugwumpism +mujik +mujtahid +mukluk +mulatto +mulberry +mulch +mule +muleta +muleteer +mulga +muliebrity +mulier +mulierty +mulishness +mullah +mullein +muller +mullet +mulligan +mulligatawny +mulligrubs +mullion +mullite +mullock +mulloway +multeity +multibirth +multiblade +multicasting +multichannel +multicharge +multichord +multichrome +multicide +multicircuit +multicollinearity +multicolor +multicore +multicourse +multicuspid +multidiscipline +multiengine +multiexhaust +multifariousness +multiflora +multifoil +multigravida +multihead +multihearth +multihull +multijet +multilane +multilobe +multimegaton +multimeter +multimillion +multimillionaire +multimotor +multinomial +multipara +multipartisan +multipath +multiphotography +multiplane +multiplepoinding +multiplet +multiplex +multiplicand +multiplication +multiplicity +multiplier +multiprogramming +multiracialism +multireflex +multishot +multisonorousness +multitester +multitude +multitudinousness +multivalence +multiversity +multivibrator +multiwall +multure +mum +mumbler +mummer +mummery +mummification +mummy +mumps +mun +muncher +mundungus +munga +municipality +municipalization +munificence +munificentness +muniment +munnion +munshi +munsif +munt +muntin +muntjac +muon +murage +mural +muralist +murder +murderer +murderousness +murdrum +murex +murgeon +muriate +murk +murmur +murmuration +murmurer +murphy +murra +murrain +murre +murrelet +murther +mus +muscadel +muscadine +muscarine +muscat +muscatel +muscavado +muscid +muscle +muscleman +muscovado +muscovite +musculamine +muscularity +musculature +museologist +museology +muser +musette +museum +mush +musher +mushiness +mushroom +music +musicale +musicality +musicalness +musician +musicianship +musicologist +musicology +musjid +musk +muskallonge +muskeg +muskellunge +musket +musketeer +musketry +muskie +muskiness +muskmelon +muskone +muskrat +muslin +muso +musquash +mussel +mussuck +mustache +mustachio +mustang +mustard +mustee +musth +mustiness +mut +mutability +mutableness +mutagen +mutant +mutarotation +mutase +mutation +mutch +mutchkin +mutilation +mutilator +mutineer +mutinousness +mutiny +mutism +mutoscope +mutt +mutterer +mutton +muttonhead +mutualisation +mutualism +mutualization +mutuel +mutule +muumuu +muzhik +muzziness +muzzle +muzzleloader +muzzler +mv +mwalimu +myalgia +myalism +myall +myasthenia +myatonia +myatrophy +mycelium +mycetoma +mycetozoan +mycobacterium +mycocecidium +mycol +mycologist +mycology +mycorrhiza +mycosis +mycosozin +mycostat +mydriasis +myelencephalon +myelin +myelination +myelitis +myeloblast +myelography +myeloma +myg +myiasis +mylohyoideus +mylonite +mym +myna +myoatrophy +myocardiogram +myocardiograph +myocarditis +myocardium +myoclonus +myocoele +myocyte +myoedema +myogenicity +myoglobin +myoglobinuria +myograph +myography +myohemoglobin +myohemoglobinuria +myokymia +myology +myoma +myoneuralgia +myoneurasthenia +myopathy +myope +myopia +myosin +myosis +myosotis +myotome +myotomy +myotonia +myriagram +myrialiter +myriameter +myriapod +myriare +myrica +myriopod +myrmecologist +myrmecology +myrmecophile +myrmecophilism +myrmecophily +myrobalan +myron +myrrh +myrtle +mysophilia +mystagogue +mystagogy +mysteriousness +mystery +mystic +mysticality +mysticalness +mysticise +mysticism +mysticity +mystification +mystifier +mystique +myth +mythicalness +mythiciser +mythicizer +mythoclast +mythogenesis +mythographer +mythography +mythol +mythologist +mythologization +mythologizer +mythology +mythomania +mythomaniac +mythopoeia +mythopoeism +mythopoeist +mythos +myxasthenia +myxedema +myxoedema +myxoma +myxomatosis +myxomatous +myxomycete +myxovirus +mzee +mzungu +n +nabber +nabob +nabobery +nabobism +nabobship +nacelle +nacre +nadir +nae +naething +naevus +nagana +naggingness +nagor +nagual +naiad +nail +nailbrush +nailer +nailfile +nailhead +nailsickness +nainsook +naira +naiskos +naivete +naivetivet +naivety +nakedness +naker +nalorphine +namability +namaste +namaycush +name +nameability +named +nameplate +namer +namesake +nametape +naming +namma +nan +nana +nanako +nance +nancy +nanism +nankeen +nanny +nannyberry +nanocurie +nanometer +nanometre +nanoplankton +nanosecond +nanowatt +naos +napalm +nape +napery +naphtha +naphthalene +naphthene +naphthol +naphthyl +napier +napkin +naplessness +napoleon +nappa +nappe +napper +nappy +naprapath +naprapathy +narceine +narcissism +narcissist +narcissus +narcist +narcoanalysis +narcolepsy +narcoma +narcomania +narcomaniac +narcosis +narcosynthesis +narcotic +narcoticalness +narcoticness +narcotisation +narcotism +narcotist +nard +nardoo +narghile +nark +narrater +narration +narrative +narrator +narrowness +narthex +narwhal +nasalism +nasality +nasalization +nascence +nascency +naseberry +nasion +nasologist +nasology +nasopharynx +nastiness +nasturtium +nasute +nasuteness +nat +natality +natation +natator +natatorium +natheless +nation +nationaliser +nationalism +nationalist +nationality +nationalization +nationalizer +nationhood +nativeness +nativism +nativist +nativity +natl +natrium +natrolite +natron +natterjack +nattiness +naturalisation +naturaliser +naturalism +naturalist +naturalization +naturalizer +nature +naturism +naturopath +naturopathy +nauch +naught +naughtiness +naumachia +naumachy +nauplius +nausea +nauseation +nauseousness +naut +nautch +nauticality +nautiloid +nautilus +nav +navar +navarin +nave +navel +navelwort +navette +navew +navicert +navicula +navig +navigability +navigableness +navigation +navigator +navvy +navy +nawab +nawabship +nay +nazir +nearness +nearside +neatness +neb +nebbish +nebris +nebula +nebulisation +nebuliser +nebulization +nebulizer +nebulosity +nebulousness +necessarian +necessarianism +necessariness +necessitarianism +necessitation +necessitousness +necessitude +necessity +neck +neckband +neckcloth +neckerchief +necking +necklace +necklet +neckline +neckpiece +necktie +neckwear +necremia +necro +necrobacillosis +necrobiosis +necrolatry +necrologist +necrology +necromancer +necromancy +necromania +necromimesis +necrophile +necrophilia +necrophilism +necrophobia +necropolis +necropsy +necroscopy +necrosis +necrotomist +necrotomy +nectar +nectareousness +nectarine +nectary +neddy +needer +needfire +neediness +needle +needlecord +needlecraft +needlefish +needleful +needlepoint +needlewoman +needlework +neencephalon +neep +nef +nefariousness +negatedness +negater +negation +negationist +negativeness +negativism +negativist +negativity +negator +negatron +neglectedness +neglecter +neglectfulness +neglector +negligee +negligence +negligibility +negligibleness +negotiability +negotiant +negotiation +negotiator +negritude +negus +neigh +neighbor +neighborhood +neighborliness +neighbour +neighbourhood +neighbourliness +neisseria +nek +nekton +nelly +nelson +nelumbo +nemathecium +nemathelminth +nematocyst +nematode +nematologist +nematology +nemertean +nemesia +nemo +nene +neoarsphenamine +neoclassic +neoclassicism +neoclassicist +neocolonialism +neocolonialist +neocortex +neodymium +neoformation +neoimpressionism +neolith +neologism +neologist +neology +neomycin +neon +neonate +neophyte +neophytism +neoplasm +neoplasticism +neoplasticist +neoplasty +neoprene +neostigmine +neostyle +neoteny +neoterism +neotype +neoytterbium +nepenthe +nepenthes +neper +nepheline +nephelinite +nephelometer +nephew +nephogram +nephograph +nephologist +nephology +nephoscope +nephralgia +nephrectomy +nephridium +nephrism +nephrite +nephritis +nephrocele +nephrolith +nephrolithotomy +nephron +nephropathy +nephrosis +nephrostome +nephrotome +nephrotomise +nephrotomy +nephrotoxicity +nepit +nepman +nepotism +neptunium +neral +nereis +nerol +nervation +nerve +nervelessness +nerviness +nerving +nervousness +nervule +nervuration +nervure +nescience +nesosilicate +ness +nesselrode +nest +nester +nestler +nestling +net +netball +netman +netsuke +netting +nettle +nettler +netty +network +neuk +neume +neuralgia +neurasthenia +neuration +neuraxitis +neurectomy +neurilemma +neurite +neuritis +neuroanatomist +neuroblast +neurocoele +neuroembryological +neuroembryology +neurofibril +neuroglia +neurogram +neurohypophysis +neurolemma +neurologist +neurology +neuroma +neuromast +neuron +neuropath +neuropathology +neuropathy +neurophysiologist +neurophysiology +neuroplasm +neuropsychiatry +neuropteran +neuropteron +neurosis +neurosurgeon +neurosurgery +neuroticism +neurotomy +neurotrophy +neurotropism +neurula +neuston +neut +neutralise +neutralism +neutrality +neutralization +neutretto +neutrino +neutron +neutrophil +neutrosphere +nevermind +nevus +newcomer +newel +newfangledness +newground +newlywed +newmarket +newness +news +newsagent +newsbeat +newsboard +newsboy +newsbreak +newscast +newscaster +newscasting +newsdealer +newshawk +newshen +newsiness +newslessness +newsletter +newsmagazine +newsman +newsmonger +newspaper +newspaperdom +newspaperman +newspaperwoman +newspeak +newsprint +newsreader +newsreel +newsstand +newswoman +newsworthiness +newt +newton +nexus +ngaio +ngoma +ngwee +niacin +niacinamide +nib +nibbana +nibbler +niblick +niccolite +niceness +nicety +niche +nick +nickel +nickelodeon +nickeltype +nickey +nicknack +nickname +nicknamer +nickpoint +nicotiana +nicotinamide +nicotine +nicotinism +nictitation +nidana +niddering +nide +nidification +nidus +niece +niellist +niello +nies +nieve +niff +niggard +niggardliness +niggler +night +nightcap +nightclub +nightclubber +nightdress +nightfall +nightgown +nighthawk +nightie +nightingale +nightjar +nightlife +nightmare +nightmarishness +nightrider +nightriding +nightshade +nightshirt +nightside +nightspot +nightstand +nightwalker +nightwear +nighty +nigrification +nigritude +nigrosine +nihil +nihilism +nihilist +nihility +nikethamide +nikkud +nil +nilgai +nim +nimbleness +nimblewit +nimbostratus +nimbus +nimiety +nincompoop +nincompoopery +nine +ninebark +ninepence +ninepins +nineteen +ninety +ninny +ninnyhammer +ninon +niobite +niobium +nipa +niphablepsia +nipper +nipplewort +nirvana +nisus +nit +nitchie +niter +niton +nitramine +nitrate +nitration +nitre +nitride +nitriding +nitrification +nitrile +nitrite +nitrobenzene +nitrocellulose +nitrochloroform +nitrogen +nitrogenation +nitrogenisation +nitrogenization +nitroglycerin +nitromannitol +nitromersol +nitrometer +nitromethane +nitroparaffin +nitrophenol +nitrosamine +nitroso +nitrosyl +nitrotrichloromethane +nitwit +nivation +nixer +niyama +nizamate +nob +nobbler +nobelium +nobility +nobleman +nobleness +noblesse +nocardia +nock +noctambule +noctambulism +noctambulist +noctiluca +noctilucence +noctuid +noctule +nocturn +nocturnality +nocturne +nocuousness +noddle +noddy +node +nodosity +nodule +nodus +noegenesis +noesis +noetics +nog +nogg +noggin +nogging +noil +noise +noiselessness +noisemaker +noisiness +noisomeness +nom +noma +nomad +nomadism +nomarch +nomarchy +nombril +nome +nomen +nomenclator +nomenclature +nominalism +nominalist +nomination +nominator +nominee +nomism +nomocanon +nomocracy +nomogram +nomographer +nomography +nomologist +nomology +nonabandonment +nonabdication +nonabidingness +nonabjuration +nonabolition +nonabortiveness +nonabrasiveness +nonabridgment +nonabsentation +nonabsoluteness +nonabsolution +nonabsolutist +nonabsorbability +nonabsorbency +nonabsorption +nonabstainer +nonabstemiousness +nonabstention +nonabstractedness +nonabstractness +nonabusiveness +nonacademicalness +nonaccedence +nonacceleration +nonaccent +nonacceptance +nonacceptation +nonaccession +nonaccidentalness +nonaccommodatingness +nonaccompaniment +nonaccord +nonaccretion +nonaccumulation +nonaccumulativeness +nonacid +nonacidity +nonacquaintance +nonacquaintanceship +nonacquiescence +nonacquisitiveness +nonacquittal +nonaction +nonactivation +nonactivator +nonactivity +nonactuality +nonactualness +nonacuity +nonacuteness +nonadaptability +nonadaptabness +nonadaptation +nonadapter +nonadaptor +nonaddict +nonadeptness +nonadherence +nonadhesion +nonadhesiveness +nonadjacency +nonadjournment +nonadjudication +nonadjustability +nonadjuster +nonadjustment +nonadjustor +nonadmissibility +nonadmissibleness +nonadmission +nonadopter +nonadoption +nonadorner +nonadornment +nonadvancement +nonadvantageousness +nonadventitiousness +nonadventurousness +nonadvertence +nonadvertency +nonadvocacy +nonadvocate +nonaffectation +nonaffiliation +nonaffinity +nonaffirmance +nonaffirmation +nonage +nonagenarian +nonaggression +nonagon +nonagreement +nonalien +nonalienation +nonalignment +nonalinement +nonalkaloid +nonallegation +nonalliterativeness +nonallotment +nonambiguity +nonambitiousness +nonamenability +nonamenableness +nonamendment +nonamorousness +nonamphibiousness +nonamputation +nonanalogicalness +nonanalogousness +nonanimal +nonanimality +nonanimation +nonannexation +nonannihilability +nonannulment +nonanonymity +nonanonymousness +nonanticipation +nonaphasiac +nonapparentness +nonappealability +nonappealingness +nonappearance +nonappeasability +nonappendance +nonappendence +nonapplicability +nonapplicabness +nonapplication +nonapportionment +nonappreciation +nonappreciativeness +nonapprehensibility +nonapprehension +nonapproachability +nonapproachabness +nonarbitrariness +nonargumentativeness +nonarmament +nonarraignment +nonarrival +nonarrogance +nonarrogancy +nonarticulateness +nonascendance +nonascendancy +nonascendence +nonascendency +nonascertainableness +nonascertainment +nonascetic +nonasceticism +nonaspersion +nonaspirate +nonassault +nonassertion +nonassertiveness +nonassessability +nonassignabilty +nonassignment +nonassimilability +nonassimilation +nonassistant +nonassister +nonassociability +nonassociation +nonassonance +nonassumption +nonastringency +nonathlete +nonattachment +nonattainability +nonattainment +nonattendance +nonattestation +nonattributiveness +nonaudibility +nonaudibleness +nonauthentication +nonauthenticity +nonauthoritativeness +nonautonomousness +nonavailability +nonavoidableness +nonavoidance +nonbachelor +nonballoting +nonbanishment +nonbarbarousness +nonbase +nonbeauty +nonbeing +nonbeliever +nonbelligerency +nonbeneficence +nonbeneficialness +nonbenevolence +nonbibulousness +nonbiliousness +nonbindingness +nonblamableness +nonblamefulness +nonblasphemousness +nonblasphemy +nonbleach +nonboaster +nonbookishness +nonborrower +nonbourgeois +nonbreach +nonbreeder +nonbrowser +nonbuoyancy +nonburdensomeness +nonburgage +nonbusyness +noncaffeine +noncandescence +noncapillarity +noncapitalist +noncapitulation +noncapriciousness +noncaptiousness +noncarbohydrate +noncarbon +noncarbonate +noncarnivorousness +noncarrier +noncastigation +noncategoricalness +noncatholicity +noncausality +noncausation +noncausativeness +nonce +noncelebration +noncensoriousness +noncensurableness +nonceremoniousness +noncertainty +noncertification +noncertitude +nonchalance +nonchallenger +nonchampion +nonchangeableness +noncharitableness +nonchastisement +nonchastity +nonchemist +nonchivalrousness +nonchurch +nonchurchgoer +noncircuitousness +noncirculation +noncircumspectness +noncitation +noncitizen +noncivilian +nonclarification +nonclassicality +nonclassification +nonclearance +nonclosure +noncoagulability +noncoagulation +noncoalescence +noncoercion +noncoerciveness +noncogency +noncognition +noncognizance +noncohabitation +noncoherence +noncoherency +noncohesion +noncohesiveness +noncoinage +noncoincidence +noncollaboration +noncollapsibility +noncollection +noncolloid +noncollusion +noncollusiveness +noncolorability +noncolorableness +noncom +noncombatant +noncombination +noncombustibility +noncombustion +noncomicality +noncomicalness +noncommemoration +noncommencement +noncommendableness +noncommerciality +noncommiseration +noncommitment +noncommodiousness +noncommunication +noncommunicativeness +noncommunist +noncompensation +noncompetency +noncompetitiveness +noncomplacence +noncomplacency +noncomplaisance +noncompletion +noncompliance +noncompliant +noncomplicity +noncompositeness +noncomposure +noncomprehension +noncomprehensiveness +noncompressibility +noncompression +noncompulsion +noncompulsoriness +noncomputation +nonconcealment +nonconceiving +nonconcentratiness +nonconcentration +nonconcentricity +nonconcession +nonconcision +nonconclusion +nonconclusiveness +nonconcurrence +noncondemnation +noncondensation +noncondensibility +noncondescendingness +noncondescension +noncondiment +noncondonation +nonconduciness +nonconductibility +nonconductor +nonconfederation +nonconfidence +nonconfidentiality +nonconfidentialness +nonconfinement +nonconfirmation +nonconfiscation +nonconformance +nonconformist +nonconformity +nonconfrontation +noncongestion +noncongruence +noncongruency +noncongruity +noncongruousness +nonconjugality +nonconjugation +nonconjunction +nonconnectivity +nonconnivance +nonconnivence +nonconnubiality +nonconscientiousness +nonconsciousness +nonconscription +nonconsecration +nonconsecutiveness +nonconsent +nonconsequence +nonconsequentiality +nonconsequentialness +nonconservation +nonconsideration +nonconsignment +nonconsolidation +nonconsonance +nonconspirator +nonconstant +nonconstraint +nonconstruability +nonconstructiveness +nonconsummation +nonconsumption +nonconsumptiveness +noncontact +noncontagion +noncontagiousness +noncontamination +noncontemplativeness +noncontemporaneousness +noncontemptibility +noncontemptibleness +noncontemptuousness +noncontention +noncontestation +noncontiguity +noncontiguousness +noncontinence +noncontinency +noncontinuance +noncontinuation +noncontinuity +noncontinuousness +noncontraband +noncontraction +noncontradiction +noncontrariety +noncontribution +noncontributiveness +noncontributor +noncontrivance +noncontumaciousness +nonconvergence +nonconvergency +nonconversableness +nonconversance +nonconversancy +nonconversion +nonconvertibility +nonconvertibleness +nonconveyance +nonconviction +nonconviviality +noncooperation +noncooperationist +noncooperator +noncoordination +noncorporation +noncorporeality +noncorrection +noncorrectional +noncorrelation +noncorrespondence +noncorroboration +noncorrosiveness +noncorrupter +noncorruptibility +noncorruptibleness +noncorruptness +noncosmopolitanism +noncosmopolite +noncosmopolitism +noncottager +noncouperationist +noncouperator +noncovetousness +noncreativeness +noncreativity +noncredence +noncredibility +noncredibleness +noncreditableness +noncreditor +noncredulousness +noncriminality +noncriticalness +nonculmination +nonculpability +nonculpableness +noncultivability +noncultivation +nonculture +noncumbrousness +noncurativeness +noncuriosity +noncuriousness +noncurtailment +nondamnation +nondancer +nondangerousness +nondeafness +nondebater +nondebilitation +nondebtor +nondecadence +nondecadency +nondecalcification +nondecasyllable +nondeceit +nondeceleration +nondeception +nondeceptiveness +nondeciduousness +nondecision +nondecisiveness +nondeclaration +nondeclarer +nondecoration +nondecorousness +nondedication +nondeduction +nondefalcation +nondefeasance +nondefeasibility +nondefeasibness +nondefeat +nondefection +nondefectiveness +nondefector +nondefendant +nondefense +nondefensibility +nondefensibleness +nondefensiveness +nondeference +nondefiance +nondefiantness +nondeficiency +nondefilement +nondefinability +nondefiner +nondefiniteness +nondefinitiveness +nondeflation +nondeflection +nondeformation +nondeformity +nondegeneracy +nondegenerateness +nondegeneration +nondegradation +nondeist +nondelegate +nondelegation +nondeleteriousness +nondeliberateness +nondeliberation +nondelicateness +nondelineation +nondeliquescence +nondeliriousness +nondeliverance +nondelivery +nondemise +nondemobilization +nondemocracy +nondemolition +nondemonstrability +nondemonstrableness +nondemonstrativeness +nondenial +nondenseness +nondensity +nondenunciation +nondeodorant +nondeparture +nondependability +nondependableness +nondependance +nondependancy +nondependence +nondependency +nondepletion +nondeportation +nondepositor +nondepravation +nondepravity +nondepreciation +nondepression +nondeprivation +nonderivability +nonderogation +nonderogatoriness +nondescriptiveness +nondesecration +nondesistance +nondesistence +nondestruction +nondestructiveness +nondesulfurization +nondetachability +nondetachment +nondetention +nondeterioration +nondeterminant +nondetermination +nondeterminativeness +nondeterminist +nondevelopment +nondeviation +nondeviousness +nondevoutness +nondexterity +nondexterousness +nondiabolicalness +nondiaphanousness +nondichogamy +nondictation +nondictatorialness +nondifferentiation +nondiffidence +nondiffractiveness +nondiffusibleness +nondiffusion +nondigestibility +nondigestibleness +nondigestion +nondilatability +nondilation +nondiligence +nondilution +nondiplomacy +nondirigibility +nondisagreement +nondisarmament +nondisastrousness +nondisbursement +nondiscernment +nondisclosure +nondiscontinuance +nondiscovery +nondiscrimination +nondiscursiveness +nondisfigurement +nondisingenuousness +nondisintegration +nondisjunction +nondismemberment +nondismissal +nondisparateness +nondisparity +nondispensation +nondispersal +nondispersion +nondisposal +nondisputatiousness +nondissidence +nondissipatedness +nondissolution +nondistillation +nondistinguishableness +nondistortedness +nondistortion +nondistribution +nondistributiveness +nondisturbance +nondivergence +nondivergency +nondiversification +nondivinity +nondivisibility +nondivision +nondivisiveness +nondivorce +nondivulgence +nondominance +nondomination +nondoubter +nondrinker +nondriver +nondualism +nonduality +nonductility +nonduplication +nonduplicity +nondurability +nondurableness +noneagerness +nonebullience +nonebulliency +noneconomy +nonedibility +nonedibness +noneducation +noneffeteness +nonefficacy +nonefficiency +noneffusion +noneffusiveness +nonego +nonegregiousness +nonejection +nonelaborateness +nonelasticity +nonelect +nonelection +nonelectiveness +nonelector +nonelectrification +nonelectrolyte +nonelevation +noneligibility +nonelimination +nonelite +nonelongation +nonelopement +noneloquence +nonelucidation +nonelusiveness +nonemancipation +nonembarkation +nonembellishment +nonembezzlement +nonemendation +nonemergence +nonemigrant +nonemigration +nonemission +nonemotionalism +nonemotiveness +nonempiric +nonempiricism +nonemployment +nonemulation +nonemulousness +nonenactment +nonenclosure +nonencroachment +nonendorsement +nonendowment +nonenemy +nonenforcement +nonengagement +nonengineering +nonentertainment +nonentity +nonentrant +nonentry +nonenunciation +nonenviableness +nonenviousness +nonequability +nonequableness +nonequalization +nonequation +nonequilibrium +nonequivalence +nonequivalency +nonerasure +nonerection +nonerroneousness +noneruditeness +nonerudition +noneruption +nones +nonespionage +nonespousal +nonestablishment +nonestimableness +nonesuch +nonet +noneternalness +noneternity +nonethereality +nonetherealness +nonethicalness +nonethyl +noneuphoniousness +nonevacuation +nonevaluation +nonevaporation +nonevasion +nonevasiveness +nonevent +noneviction +nonevilness +nonevolutionist +nonexactingness +nonexaction +nonexaggeration +nonexcavation +nonexcessiveness +nonexchangeability +nonexcitableness +nonexclusion +nonexculpation +nonexcusableness +nonexecution +nonexemplification +nonexemption +nonexercise +nonexerciser +nonexertion +nonexhaustiveness +nonexhibition +nonexhibitionism +nonexhortation +nonexistence +nonexistentialism +nonexpansibility +nonexpansion +nonexpansiveness +nonexpedience +nonexpediency +nonexpeditiousness +nonexpiation +nonexpiration +nonexpiry +nonexploitation +nonexplosiveness +nonexportation +nonexposure +nonexpressiveness +nonexpulsion +nonextendibleness +nonextensibility +nonextensibness +nonextension +nonextensiveness +nonextermination +nonexternality +nonextinction +nonextortion +nonextraction +nonextradition +nonextraneousness +nonextrication +nonexuberance +nonexuberancy +nonexultation +nonfacetiousness +nonfacility +nonfactiousness +nonfactitiousness +nonfaddist +nonfailure +nonfallaciousness +nonfamily +nonfanatic +nonfantasy +nonfarcicality +nonfarcicalness +nonfascist +nonfashionableness +nonfastidiousness +nonfatality +nonfatalness +nonfavorableness +nonfavorite +nonfealty +nonfeasance +nonfeasibility +nonfeasibleness +nonfecundity +nonfeebleness +nonfelicitousness +nonfelicity +nonfeloniousness +nonfermentability +nonfermentation +nonferociousness +nonferocity +nonfertility +nonferventness +nonfervidness +nonfestiveness +nonfeverishness +nonfiction +nonfictitiousness +nonfidelity +nonfighter +nonfigurativeness +nonfilter +nonfinding +nonfiniteness +nonfisherman +nonfissility +nonfixation +nonflagitiousness +nonflagrancy +nonflakiness +nonflatulence +nonflatulency +nonflexibility +nonflexibleness +nonflirtatiousness +nonfluctuation +nonfluency +nonfluentness +nonfluid +nonfluidity +nonfluorescence +nonflux +nonfood +nonforbearance +nonforeclosure +nonforeigness +nonforest +nonforfeiture +nonform +nonformalism +nonformalness +nonformation +nonformidability +nonformidableness +nonformulation +nonfortification +nonfortuitousness +nonfragileness +nonfragility +nonfrangibility +nonfraternity +nonfraudulence +nonfraudulency +nonfreedom +nonfreeman +nonfrequence +nonfrequency +nonfriction +nonfrigidity +nonfrigidness +nonfrugality +nonfrugalness +nonfruition +nonfrustration +nonfugitiveness +nonfulfillment +nonfundamentalist +nonfusibility +nonfusion +nong +nongarrulity +nongarrulousness +nongas +nongaseness +nongelatinousness +nongenuineness +nongermination +nonglare +nonglucose +nongod +nongold +nongolfer +nongovernance +nongovernment +nongracefulness +nongraciosity +nongraciousness +nongraduate +nongraduation +nongrain +nongraphicalness +nongratification +nongratuitousness +nongravitation +nongravity +nongregariousness +nongrievousness +nonguarantee +nonguidance +nonguilt +nongutturalness +nongymnast +nonhabitability +nonhabitableness +nonhabitation +nonhabitualness +nonhallucination +nonhandicap +nonharmoniousness +nonharmony +nonhazardousness +nonheading +nonheinousness +nonhereditability +nonhereditariness +nonheritability +nonheritor +nonhero +nonheroicalness +nonheroicness +nonhistoricalness +nonhistrionicalness +nonhomogeneity +nonhomogeneousness +nonhostility +nonhouseholder +nonhumaness +nonhumanist +nonhumorousness +nonhumus +nonidentification +nonidentity +nonidiomaticalness +nonidolatrousness +nonignitability +nonignitibility +nonignominiousness +nonillion +nonillionth +nonilluminant +nonillumination +nonillusiveness +nonillustration +nonimaginariness +nonimitability +nonimitativeness +nonimmanence +nonimmanency +nonimmersion +nonimmigrant +nonimmigration +nonimmunity +nonimmunization +nonimpact +nonimpairment +nonimpartation +nonimpartment +nonimpeachability +nonimpeachment +nonimperativeness +nonimperialness +nonimperiousness +nonimplement +nonimplication +nonimportation +nonimposition +nonimpressionability +nonimpressionabness +nonimprovement +nonimpulsiveness +nonimputability +nonimputableness +nonimputativeness +nonincandescence +nonincestuousness +nonincident +nonincitement +noninclination +noninclusion +noninclusiveness +nonincrease +nonincrimination +nonindictment +nonindividuality +noninductivity +nonindulgence +nonindustrialization +nonindustriousness +noninertness +noninfallibility +noninfallibleness +noninfantry +noninfection +noninfectiousness +noninfiniteness +noninflammability +noninflammableness +noninflation +noninfluence +noninformativeness +noninfraction +noninfusibility +noninfusibness +noninhabitability +noninhabitance +noninhabitancy +noninherence +noninheritability +noninheritabness +noninjuriousness +noninjury +noninoculation +noninsect +noninsertion +noninsistence +noninsistency +noninstitution +noninstructiveness +noninsurance +nonintegration +nonintellectualness +nonintelligence +noninterchangeability +noninterchangeableness +nonintercourse +noninterdependence +noninterdependency +noninterference +nonintermittence +nonintermittentness +noninterpolation +noninterposition +noninterpretability +noninterpretiveness +noninterruptedness +nonintervention +noninterventionalist +noninterventionist +nonintrospectiveness +nonintroversiveness +nonintrovertedness +nonintuitiveness +noninvidiousness +noninvincibility +noninvincibleness +noniridescence +nonironicalness +nonirrationalness +nonirrevocability +nonirrevocableness +nonirrigation +nonirritability +nonirritableness +nonirritancy +nonjoinder +nonjuror +nonjury +nonlegitimacy +nonlegume +nonliability +nonliberalism +nonliberation +nonlibidinousness +nonlicentiate +nonlicentiousness +nonlife +nonlimitation +nonlinearity +nonliquidation +nonliteracy +nonliteralness +nonliterariness +nonlitigation +nonlitigiousness +nonlixiviation +nonlocation +nonlogic +nonlogicality +nonlogicalness +nonloser +nonlover +nonloyalty +nonlubricant +nonlubriciousness +nonlucidity +nonlucidness +nonlucrativeness +nonlugubriousness +nonluminescence +nonluminosity +nonluminousness +nonluster +nonlustrousness +nonlyricalness +nonlyricism +nonmaintenance +nonmajority +nonmaliciousness +nonmalignance +nonmalignancy +nonmalignity +nonmalleability +nonmalleabness +nonmammalian +nonmanagement +nonmanifestation +nonmanifestness +nonmanufacture +nonmanufacturing +nonmarket +nonmarketability +nonmarriage +nonmarriageability +nonmarriageabness +nonmartialness +nonmasculineness +nonmasculinity +nonmason +nonmastery +nonmathematician +nonmatter +nonmaturation +nonmatureness +nonmaturity +nonmeasurability +nonmeasurableness +nonmechanicalness +nonmediation +nonmeditativeness +nonmelodiousness +nonmember +nonmembership +nonmendicancy +nonmetal +nonmetamorphosis +nonmethodicalness +nonmigration +nonmilitancy +nonmillionaire +nonmineral +nonministration +nonmiraculousness +nonmischievousness +nonmiscibility +nonmitigation +nonmobility +nonmoderateness +nonmodernness +nonmomentariness +nonmonarchist +nonmonist +nonmotility +nonmotion +nonmotivation +nonmotorist +nonmoveability +nonmoveableness +nonmultiplication +nonmusicalness +nonmutability +nonmutableness +nonmutinousness +nonmutuality +nonmysticalness +nonmysticism +nonnarcism +nonnarcissism +nonnarration +nonnasality +nonnationalism +nonnationalization +nonnativeness +nonnattiness +nonnaturalism +nonnaturalist +nonnaturalness +nonnavigability +nonnavigableness +nonnavigation +nonnebulousness +nonnecessitousness +nonnecessity +nonnegation +nonnegativism +nonnegativity +nonnegligence +nonnegligibility +nonnegligibleness +nonnegotiability +nonnegotiation +nonnervousness +nonnescience +nonneutrality +nonnihilism +nonnihilist +nonnobility +nonnomad +nonnomination +nonnormality +nonnormalness +nonnotableness +nonnotification +nonnourishment +nonnullification +nonnumeral +nonnutriment +nonnutritiousness +nonnutritiveness +nonobedience +nonobjectification +nonobjection +nonobscurity +nonobservance +nonobservation +nonobsession +nonobsessiveness +nonobstructiveness +nonobviousness +nonocclusion +nonoccupant +nonoccupation +nonodoriferousness +nonodorousness +nonoffender +nonoffensiveness +nonofficeholder +nonomission +nononerousness +nonopacity +nonopinionaness +nonopinionativeness +nonopposition +nonoppression +nonoppressiveness +nonopprobriousness +nonordination +nonorganization +nonorientation +nonornamentality +nonostentation +nonoutlawry +nonoverhead +nonowner +nonoxidation +nonoxidization +nonpacification +nonpacifist +nonpagan +nonpainter +nonpalatability +nonpalatableness +nonpalatalization +nonpalliation +nonpalpability +nonpapist +nonpar +nonparadoxicalness +nonparallelism +nonparalysis +nonparasitism +nonpareil +nonparent +nonparishioner +nonparity +nonpartiality +nonparticipant +nonparticipation +nonpartner +nonpassenger +nonpassionateness +nonpatentability +nonpause +nonpayment +nonpedestrian +nonpeltast +nonpendency +nonpenetrability +nonpenetration +nonpensioner +nonperceptibility +nonperceptibleness +nonperception +nonperceptiveness +nonperceptivity +nonpercipience +nonpercipiency +nonperfectibility +nonperfection +nonperformance +nonperformer +nonperjury +nonpermanence +nonpermanency +nonpermeability +nonpermeation +nonpermissibility +nonpermission +nonpermissiveness +nonperpendicularity +nonperpetration +nonperpetuance +nonperpetuation +nonperpetuity +nonpersecution +nonperseverance +nonpersistence +nonpersistency +nonpersonification +nonperspective +nonpersuasiveness +nonpertinence +nonpertinency +nonperverseness +nonperversion +nonperversity +nonphilosophy +nonplasticity +nonplausibility +nonplausibleness +nonpliability +nonpliableness +nonpliancy +nonpliantness +nonplurality +nonpoet +nonpoisonousness +nonpolarity +nonpolemic +nonponderability +nonponderosity +nonponderousness +nonpopularity +nonpopulousness +nonporness +nonportability +nonportentousness +nonportrayal +nonpossession +nonpossessiveness +nonpostponement +nonpracticability +nonpracticableness +nonpracticality +nonpracticalness +nonpractice +nonpreciousness +nonprecipitation +nonpredatoriness +nonpreferability +nonpreferableness +nonpreference +nonpreferentialism +nonpremium +nonpreparation +nonpresbyter +nonprescriber +nonpresence +nonpresentability +nonpresentableness +nonpresentation +nonpreservation +nonpressure +nonprevalence +nonprevention +nonpreventiveness +nonprimitiveness +nonprivity +nonprobability +nonprobation +nonprocreation +nonprocuration +nonprocurement +nonproducer +nonproduction +nonproductiveness +nonproductivity +nonprofaneness +nonprofanity +nonprofession +nonprofessionalism +nonproficiency +nonprofitability +nonprofitableness +nonprofiteering +nonprogressiveness +nonprohibition +nonprojection +nonproletariat +nonproliferation +nonprolificacy +nonprolifiness +nonprolixity +nonprolixness +nonprolongation +nonprominence +nonpromiscuousness +nonpromotion +nonpromulgation +nonpronunciation +nonpropagandist +nonpropagation +nonpropitiation +nonproportionateness +nonproprietor +nonpropriety +nonprorogation +nonprosaicness +nonproscription +nonprosecution +nonprospect +nonprosperity +nonprosperousness +nonprotection +nonprotein +nonprotestation +nonprotraction +nonprotrusion +nonprotrusiveness +nonprotuberance +nonprotuberancy +nonprovider +nonprovocation +nonprovocativeness +nonproximity +nonprudence +nonpublication +nonpublicity +nonpuerility +nonpulsation +nonpunctualness +nonpunctuation +nonpungency +nonpunishment +nonpurchasability +nonpurchase +nonpurchaser +nonpurgation +nonpurification +nonpurposiveness +nonpursuance +nonpurulence +nonpurveyance +nonputrescence +nonqualification +nonquality +nonquantitativeness +nonradiance +nonradiancy +nonradiation +nonradicness +nonrandomness +nonrapport +nonratability +nonratableness +nonrateability +nonrateableness +nonratification +nonrationalism +nonrationalist +nonrationality +nonrationalization +nonreaction +nonreactor +nonreadability +nonreadableness +nonreader +nonreading +nonrealism +nonrealist +nonreality +nonrealization +nonreasonability +nonreasonableness +nonreasoner +nonrebel +nonrebellion +nonrebelliousness +nonrecalcitrance +nonrecalcitrancy +nonreceipt +nonreception +nonreceptiveness +nonreceptivity +nonrecess +nonrecession +nonrecipience +nonrecipiency +nonreciprocity +nonrecision +nonrecital +nonrecitation +nonreclamation +nonrecognition +nonrecoil +nonrecollection +nonreconcilability +nonreconcilableness +nonreconciliation +nonrecourse +nonrectangularity +nonrecuperatiness +nonrecuperation +nonredemption +nonreducibility +nonreduction +nonreference +nonrefinement +nonreflection +nonreflectiveness +nonreflector +nonreformation +nonrefraction +nonrefractiveness +nonrefutal +nonrefutation +nonregeneration +nonregent +nonregistration +nonregression +nonregulation +nonrehabilitation +nonreimbursement +nonreinforcement +nonreinstatement +nonrejection +nonrejoinder +nonrelatiness +nonrelation +nonrelative +nonrelativity +nonrelaxation +nonrelease +nonreliability +nonreliableness +nonreliance +nonreligion +nonreligiousness +nonrelinquishment +nonremediability +nonremedy +nonremembrance +nonremission +nonremonstrance +nonremuneration +nonrendition +nonrenewal +nonrenunciation +nonrepair +nonreparation +nonrepatriation +nonrepeat +nonrepeater +nonrepellence +nonrepellency +nonrepeller +nonrepentance +nonrepetition +nonrepetitiousness +nonreplacement +nonreplication +nonreprehensibility +nonreprehensibleness +nonrepresentation +nonrepresentative +nonrepresentativeness +nonrepressibleness +nonrepression +nonreprisal +nonreproduction +nonreproductiveness +nonrepudiation +nonrequirement +nonrequisiteness +nonrequisition +nonrequital +nonrescission +nonrescue +nonresemblance +nonreservation +nonreserve +nonresidence +nonresidency +nonresident +nonresignation +nonresilience +nonresiliency +nonresistance +nonresistibility +nonresolution +nonresolvability +nonresolvabness +nonrespectability +nonrespectableness +nonresponsibility +nonresponsibleness +nonrestitution +nonrestoration +nonrestraint +nonrestriction +nonresumption +nonresurrection +nonresuscitation +nonretainment +nonretaliation +nonretardation +nonretardment +nonretention +nonretentiveness +nonreticence +nonretirement +nonretractility +nonretraction +nonretrenchment +nonretroactivity +nonrevaluation +nonrevelation +nonrevenge +nonrevenger +nonreverence +nonreversibility +nonreversibleness +nonreversion +nonrevision +nonrevival +nonrevivalist +nonrevocability +nonrevocation +nonrevolution +nonrhyme +nonrhythm +nonrioter +nonrival +nonromanticism +nonrotation +nonroyalist +nonroyalty +nonrubber +nonrudimentariness +nonruinousness +nonruling +nonruminant +nonrumination +nonrupture +nonsaccharinity +nonsacredness +nonsacrifice +nonsacrilegiousness +nonsailor +nonsalability +nonsale +nonsaleability +nonsalinity +nonsalubriousness +nonsalutariness +nonsalutation +nonsalvation +nonsanctification +nonsanctimoniousness +nonsanctimony +nonsanction +nonsanctity +nonsaneness +nonsanguineness +nonsanity +nonsaponification +nonsatiability +nonsatiation +nonsatire +nonsatiricalness +nonsatisfaction +nonsaturation +nonscarcity +nonscholar +nonschooling +nonscience +nonscientist +nonscrutiny +nonseasonableness +nonsecession +nonsecludedness +nonseclusion +nonseclusiveness +nonsecrecy +nonsecretion +nonsecurity +nonsedentariness +nonseditiousness +nonsegmentation +nonsegregation +nonseizure +nonselection +nonsensation +nonsense +nonsensibility +nonsensibleness +nonsensicality +nonsensicalness +nonsensitiveness +nonsensitivity +nonsensitization +nonsensuality +nonsensuousness +nonsententiousness +nonsentience +nonsentiency +nonseparability +nonseparableness +nonseparation +nonsequaciousness +nonsequacity +nonsequestration +nonserial +nonseriousness +nonserviceability +nonserviceableness +nonservileness +nonsettlement +nonseverance +nonseverity +nonshatter +nonshipper +nonsibilance +nonsibilancy +nonsignificance +nonsignificancy +nonsignification +nonsilicate +nonsilver +nonsimilarity +nonsimilitude +nonsimplicity +nonsimplification +nonsimular +nonsimulation +nonsingularity +nonsister +nonsmoker +nonsoberness +nonsobriety +nonsociability +nonsociableness +nonsocialist +nonsociality +nonsocialness +nonsociety +nonsoldier +nonsolicitation +nonsolicitousness +nonsolidarity +nonsolidification +nonsolubleness +nonsolution +nonsolvability +nonsolvableness +nonsolvency +nonsolvent +nonsophisticalness +nonsovereign +nonspaciousness +nonspatiality +nonspeaker +nonspecialist +nonspecification +nonspecificity +nonspeciousness +nonspectrality +nonspeculation +nonspeculativeness +nonsphericality +nonspinning +nonspinosity +nonspirit +nonspiritedness +nonspirituality +nonspiritualness +nonspirituness +nonspontaneousness +nonspuriousness +nonstability +nonstableness +nonstainer +nonstaple +nonstarter +nonstatement +nonsterility +nonsterilization +nonstimulant +nonstimulation +nonstipticity +nonstipulation +nonstock +nonstoicalness +nonstorage +nonstress +nonstriker +nonstructure +nonstudent +nonstudiousness +nonstudy +nonstultification +nonstylization +nonsubconsciousness +nonsubject +nonsubjectification +nonsubjection +nonsubjectiveness +nonsubjectivity +nonsubjugation +nonsublimation +nonsubmergence +nonsubmergibility +nonsubmission +nonsubmissiveness +nonsubordination +nonsubscriber +nonsubscription +nonsubsidy +nonsubsistence +nonsubstantiality +nonsubstantialness +nonsubstantiation +nonsubstantiveness +nonsubstitution +nonsubtileness +nonsubtility +nonsubtleness +nonsubtlety +nonsubtraction +nonsubversion +nonsubversiveness +nonsuccess +nonsuccession +nonsuccessiveness +nonsuccor +nonsuch +nonsuction +nonsufferableness +nonsufferance +nonsuffrage +nonsugar +nonsuggestion +nonsuggestiveness +nonsuit +nonsummons +nonsupervision +nonsupplication +nonsupportability +nonsupportableness +nonsupporter +nonsuppression +nonsuppressiveness +nonsurface +nonsurrender +nonsurvival +nonsurvivor +nonsusceptibility +nonsusceptibleness +nonsusceptiness +nonsusceptivity +nonsuspect +nonsuspension +nonsuspensiveness +nonsustenance +nonswimmer +nonsyllogistic +nonsymbolicalness +nonsymmetry +nonsympathizer +nonsympathy +nonsymphoniousness +nonsynchronousness +nonsyncopation +nonsyndication +nonsynthesis +nontactic +nontactility +nontalkativeness +nontangibleness +nontannin +nontax +nontaxability +nontaxableness +nontaxation +nontaxer +nonteachability +nonteachableness +nonteacher +nontechnicalness +nonteetotaler +nonteetotalist +nontemperateness +nontemporariness +nontemptation +nontenability +nontenableness +nontenant +nontensility +nontentativeness +nonterminability +nonterminableness +nontermination +nonterritoriality +nonthinker +nontolerableness +nontolerance +nontoleration +nontonality +nontourist +nontraceability +nontraceableness +nontractability +nontractableness +nontraction +nontrade +nontrader +nontradition +nontraditionalist +nontragedy +nontragicalness +nontraitorousness +nontranscription +nontransferability +nontransference +nontransformation +nontransgression +nontransience +nontransiency +nontransientness +nontransitiveness +nontranslocation +nontransmission +nontransmittance +nontransparence +nontransparency +nontransparentness +nontransportability +nontransportation +nontransposition +nontraveler +nontraveller +nontreasonableness +nontreatment +nontreaty +nontrespass +nontrial +nontribesman +nontrier +nontriviality +nontruancy +nontruant +nontrust +nontruth +nontumultuousness +nontypicalness +nontyrannicalness +nontyrannousness +nonubiquitousness +nonulcerousness +nonunanimousness +nonundergraduate +nonunification +nonuniformity +nonunionism +nonunionist +nonuniqueness +nonunison +nonunitarian +nonunity +nonuniversalist +nonuniversality +nonuniversity +nonuprightness +nonurbanite +nonusage +nonuse +nonuser +nonusuriousness +nonutility +nonutilization +nonutterance +nonvacancy +nonvaccination +nonvacillation +nonvacuousness +nonvacuum +nonvagrancy +nonvagrantness +nonvalidation +nonvalidity +nonvalidness +nonvalorousness +nonvalue +nonvaporosity +nonvaporousness +nonvariability +nonvariableness +nonvariance +nonvariation +nonvariety +nonvariousness +nonvassal +nonvegetable +nonvegetation +nonvegetativeness +nonvendibility +nonvendibleness +nonvenomousness +nonvenousness +nonventilation +nonveraciousness +nonveracity +nonverbosity +nonverification +nonveritableness +nonverminousness +nonversatility +nonverticality +nonverticalness +nonvesture +nonveteran +nonveterinary +nonvexatiousness +nonviability +nonvibration +nonvibrator +nonvicariousness +nonvictory +nonvigilance +nonvigilantness +nonvillager +nonvillainousness +nonvindication +nonvinosity +nonviolability +nonviolableness +nonviolation +nonviolence +nonvirility +nonvirtue +nonvirtuousness +nonviscidity +nonviscidness +nonviscousness +nonvisibility +nonvitality +nonvitalness +nonvitiation +nonviviparity +nonviviparousness +nonvocality +nonvocalization +nonvocalness +nonvolatility +nonvolatiness +nonvolition +nonvolubility +nonvolubleness +nonvoter +nonvulgarity +nonwar +nonweakness +nonworker +nonzealousness +noodle +noodlehead +nook +nookery +nookie +noon +noonday +nooning +noontide +noontime +noose +nooser +nopal +noradrenaline +norepinephrine +noria +norite +nork +norland +norm +normalcy +normalisation +normality +normalness +normativeness +normocyte +north +northcountryman +northeast +northeaster +northeasterner +norther +northerliness +northernness +northing +northwest +northwester +northwesterner +nos +nose +nosebag +noseband +nosebleed +nosegay +nosepiece +nosewheel +nosewing +nosey +nosh +nosher +nosiness +nosing +nosogeography +nosographer +nosography +nosology +nostalgia +nostalgy +nostoc +nostology +nostomania +nostril +nostrum +notability +notableness +notary +notaryship +notation +notch +note +notebook +notecase +notedness +notelessness +notelet +notepaper +noteworthiness +nothingness +notice +noticer +notification +notifier +notion +notionality +notitia +notochord +notoriousness +notornis +nototherium +notoungulate +notturno +notum +nougat +nought +noumenalism +noumenalist +noumenality +noumenon +noun +nourice +nourisher +nourishment +nous +nouveauta +nov +nova +novaculite +novation +novel +novelese +novelette +novelisation +novelist +novella +novelty +novena +novice +novitiate +novobiocin +nowness +nowt +nowy +noxiousness +noyade +noyau +nozzle +nr +ns +nt +nu +nuance +nub +nubbin +nubble +nubecula +nubility +nucellus +nucha +nuclease +nucleation +nucleator +nuclei +nuclein +nucleolus +nucleon +nucleonics +nucleoplasm +nucleoprotein +nucleosidase +nucleoside +nucleotidase +nucleotide +nucleus +nuclide +nuddy +nudeness +nudger +nudibranch +nudnik +nuggar +nugget +nuisance +nuke +nullah +nullification +nullificationist +nullificator +nullifidian +nullifier +nullipara +nullipore +nullity +nullo +numbat +number +numberer +numberplate +numbfish +numbness +numbskull +numdah +numen +numeral +numeration +numerator +numericalness +numerology +numerosity +numerousness +numis +numismatics +numismatist +numismatologist +numismatology +nummulite +numnah +numskull +nun +nunatak +nunation +nunciature +nuncio +nuncle +nunhood +nunnation +nunnery +nuraghe +nurl +nurse +nursemaid +nurser +nursery +nurseryman +nursling +nurture +nurturer +nut +nutation +nutcase +nutcracker +nutgall +nuthatch +nuthouse +nutlet +nutmeat +nutmeg +nutpick +nutria +nutrient +nutrilite +nutriment +nutrition +nutritionist +nutritiousness +nutritiveness +nutshell +nutter +nuttiness +nutting +nutwood +nv +nyala +nyanza +nyckelharpa +nyctalgia +nyctalopia +nyctinasty +nyctitropism +nyctophobia +nye +nylghai +nylghau +nylon +nymph +nympha +nymphaeum +nymphalid +nystagmus +nystatin +nytril +o +oaf +oak +oakmoss +oakum +oar +oarfish +oarlock +oarsman +oasis +oast +oat +oatcake +oater +oath +oatmeal +ob +oba +obb +obdt +obeah +obeahism +obeche +obedience +obedientiary +obeisance +obelisk +obelus +obesity +obeyer +obfuscation +obi +obit +obituary +obj +object +objection +objectionability +objectionableness +objectiveness +objectivism +objectivist +objectivity +objectlessness +objector +objurgation +objurgator +oblast +oblation +obligation +obligator +obligatoriness +obligedness +obligee +obliger +obligingness +obligor +obliquity +obliteration +oblivescence +oblivion +obliviousness +oblongata +oblongness +obloquy +obmutescence +obnoxiousness +oboe +obole +obolus +obreption +obrogation +obs +obscenity +obscurant +obscurantism +obscurantist +obscureness +obscurity +obsecration +obsequence +observability +observableness +observance +observation +observatory +observer +observership +obsession +obsidian +obsolesc +obsoleteness +obstacle +obstet +obstetrician +obstetrics +obstinacy +obstinateness +obstipant +obstipation +obstreperosity +obstreperousness +obstructer +obstruction +obstructionism +obstructionist +obstructiveness +obstructivity +obstructor +obtestation +obtruder +obtrusiveness +obtundity +obturation +obturator +obumbration +obversion +obviousness +obvolution +oc +oca +ocarina +occas +occasion +occasionalism +occasionality +occasionalness +occident +occidentality +occiput +occlusion +occlusiveness +occultation +occulter +occultism +occultist +occultness +occupancy +occupant +occupation +occupier +occurrence +ocean +oceanarium +oceanfront +oceanicity +oceanog +oceanographer +oceanography +oceanology +ocellation +ocellus +ocelot +ocher +ochlesis +ochlocracy +ochlocrat +ochlophobia +ochlophobist +ochre +ochrea +ocker +ocotillo +ocrea +oct +octachord +octad +octagon +octahedrite +octahedron +octameter +octane +octangle +octangularness +octant +octarchy +octaroon +octastylos +octateuch +octave +octavo +octet +octillion +octillionth +octocentenary +octodecillion +octodecimo +octofoil +octogenarian +octogenarianism +octopod +octopus +octoroon +octosyllable +octroi +octuple +octuplet +ocularist +oculist +oculus +od +odalisque +oddball +oddity +oddment +oddness +oddside +ode +odeum +odiousness +odium +odometer +odometry +odontalgia +odontiasis +odontoblast +odontogeny +odontoglossum +odontograph +odontography +odontolite +odontology +odontophore +odor +odoriferosity +odoriferousness +odour +odyl +odylism +odylist +oe +oecology +oedema +oeillade +oenologist +oenology +oenomel +oersted +oesophagus +oestradiol +oestrin +oestriol +oestrogen +oestrone +oestrus +oeuvre +ofay +offal +offbeat +offence +offendedness +offender +offense +offensiveness +offerer +offering +offeror +offertory +office +officeholder +officer +officialdom +officialese +officialisation +officialism +officialization +officiant +officiary +officiation +officiator +officiousness +offing +offishness +offlap +offprint +offscouring +offset +offshoot +offsider +offspring +offtake +oftenness +og +ogam +ogdoad +ogee +ogham +ogive +ogre +ohm +ohmage +ohmmeter +oidium +oik +oil +oilbird +oilcan +oilcloth +oilcup +oiler +oilfield +oilfish +oiliness +oillessness +oilman +oilseed +oilskin +oilstone +oinochoe +ointment +oiticica +oka +okapi +oke +okoume +okra +okta +oktastylos +oldie +oldster +oldwife +oleaginousness +oleander +oleandomycin +oleaster +oleate +olecranon +olefin +olefine +olein +oleograph +oleography +oleomargarine +oleoresin +olericulture +olericulturist +olethreutid +oleum +olfaction +olfactoreceptor +olibanum +oligarch +oligarchy +oligochaete +oligoclase +oligocythemia +oligophrenia +oligopoly +oligopsony +oligosaccharide +oligotrophy +oliguria +olio +olive +olivenite +olivette +olivine +olla +olm +ology +oloroso +olympiad +omadhaun +omasum +omber +ombre +ombrellino +ombudsman +omega +omelet +omelette +omen +omentum +omer +omicron +ominousness +omission +ommatidium +ommatophore +omni +omnibearing +omnibus +omnidistance +omnificence +omnigraph +omnipotence +omnipresence +omnirange +omniscience +omnivore +omnivorousness +omophagia +omophagist +omophorion +omphalocele +omphalos +omphaloskepsis +onager +onanism +onanist +oncer +oncology +oncosis +oncost +ondine +onding +ondogram +ondograph +ondometer +ondoscope +oneirocritic +oneirocriticism +oneiromancy +oneness +oner +onerosity +onerousness +oniomania +oniomaniac +onion +onionskin +onker +onlap +onlay +onlooker +onomasiology +onomastics +onomatologist +onomatology +onomatopoeia +onrush +onset +onslaught +ontogenist +ontogeny +ontologism +ontologist +ontology +onus +onychia +onychophagia +onychophoran +onyx +onyxis +oocyte +oof +oogamy +oogenesis +oogonium +oolachan +oolite +oolith +oology +oolong +oomiak +oompah +oomph +oophore +oophorectomy +oophoritis +oophyte +oos +oose +oosperm +oosphere +oospore +ootheca +ootid +op +opa +opacification +opacifier +opacimeter +opacity +opah +opaion +opal +opaqueness +opcode +openairness +opener +openhandedness +opening +openwork +opera +operability +operand +operation +operationalism +operativeness +operativity +operator +opercle +operculum +operetta +operettist +operon +operoseness +ophicleide +ophiolater +ophiolatry +ophiologist +ophiology +ophite +ophthalm +ophthalmia +ophthalmiac +ophthalmitis +ophthalmodynamometer +ophthalmologist +ophthalmology +ophthalmometer +ophthalmometry +ophthalmoscope +ophthalmoscopist +ophthalmoscopy +opiate +opinicus +opinion +opinionatedness +opinionativeness +opisthenar +opisthobranch +opisthodomos +opisthognathism +opium +opiumism +opodeldoc +opossum +opp +oppilation +opponency +opponens +opponent +opportunism +opportunist +opportunity +opposability +opposer +oppositeness +opposition +oppression +oppressiveness +oppressor +opprobriousness +opprobrium +oppugner +opsimath +opsin +opsonin +optician +opticist +optics +optime +optimise +optimism +optimist +optimization +optimum +option +optionality +optionee +optometer +optometrist +optometry +optotype +opulence +opuntia +opus +opuscule +oquassa +or +ora +orach +orache +oracle +oracularity +oracularness +oracy +orang +orange +orangeade +orangery +orangewood +orangutan +orarion +orarium +oration +orator +oratorio +oratorship +oratory +oratrix +orb +orbicularis +orbicularity +orbiculation +orbit +orbital +orbitale +orc +orca +orcein +orch +orchard +orchardist +orchardman +orchectomy +orchestra +orchestrater +orchestration +orchestrator +orchestrion +orchid +orchidectomy +orchidologist +orchidology +orchidotomy +orchiectomy +orchil +orchis +orchitis +orchotomy +orcinol +ord +ordainer +ordainment +ordeal +order +ordinance +ordinand +ordinariate +ordinate +ordination +ordn +ordnance +ordo +ordonnance +ordure +ore +oread +oregano +oreshoot +orexis +orfe +orfray +organ +organa +organdie +organdy +organelle +organicalness +organicism +organicist +organicity +organisability +organism +organist +organizability +organization +organizer +organogenesis +organographist +organography +organologist +organology +organon +organotherapeutics +organotherapy +organum +organza +organzine +orgeat +oribi +oriel +orient +orientation +orienteering +orifice +oriflamme +orig +origami +origan +origin +originality +origination +originator +orihon +oriole +orison +orle +orlo +orlop +ormer +ormolu +ornament +ornamentality +ornamentation +ornateness +orneriness +ornis +ornith +ornithine +ornithol +ornithologist +ornithology +ornithomancy +ornithopod +ornithopter +ornithorhynchus +ornithoscopy +ornithosis +orogeny +orographic +orography +oroide +orologist +orometer +orometry +orotundity +orphan +orphanage +orphanhood +orpharion +orphrey +orpiment +orpine +orrery +orris +orrisroot +orseille +ortanique +orthicon +orthocenter +orthocentre +orthocephaly +orthoclase +orthodontics +orthodontist +orthodoxness +orthodoxy +orthoepy +orthogenesis +orthogonality +orthogonalization +orthographer +orthography +orthohydrogen +orthopaedics +orthopedics +orthopedist +orthophosphate +orthopnea +orthopraxia +orthopraxy +orthopsychiatry +orthopter +orthopteran +orthopteron +orthoptics +orthoscope +orthoselection +orthostat +orthostates +orthostichy +orthotropism +orthros +ortolan +oryx +os +oscar +oscillation +oscillator +oscillogram +oscillograph +oscillometry +oscilloscope +oscitance +oscitancy +oscularity +osculation +osculum +osier +osmaterium +osmeterium +osmics +osmidrosis +osmiridium +osmium +osmometer +osmometry +osmosis +osmund +osmunda +osnaburg +osophone +osprey +ossa +ossein +osselet +ossicle +ossification +ossifier +ossifrage +ossuary +ostectomy +osteectomy +osteitis +ostensorium +ostensory +ostentation +ostentatiousness +osteoarthritis +osteoblast +osteoclasis +osteoclast +osteogenesis +osteologer +osteologist +osteology +osteoma +osteomalacia +osteomyelitis +osteopath +osteopathy +osteophyte +osteoplasty +osteoporosis +osteotome +osteotomist +osteotomy +ostiary +ostinato +ostiole +ostium +ostler +ostmark +ostosis +ostracise +ostracism +ostracization +ostracizer +ostracod +ostracoderm +ostracon +ostrich +ostringer +ot +otalgia +otherness +otitis +otocyst +otohemineurasthenia +otolaryngologist +otolaryngology +otolith +otologist +otology +otoneurasthenia +otoplasty +otorhinolaryngology +otosclerosis +otoscope +otoscopy +ottar +ottava +otter +otto +ottoman +ottrelite +ouabain +ouananiche +oubliette +oud +ougamy +ounce +ouphe +ourari +ousel +ouster +outage +outback +outbidder +outbreak +outbuilding +outburst +outcast +outcaste +outcity +outclerk +outcome +outcrop +outcrossing +outcry +outcurve +outdistrict +outdweller +outdwelling +outerness +outerwear +outfall +outfield +outfielder +outfighting +outfit +outfitter +outflanker +outflow +outflux +outgroup +outgrowth +outguard +outhaul +outhouse +outing +outkitchen +outlander +outlandishness +outlaw +outlawry +outlay +outlet +outlier +outline +outliver +outlook +outmerchant +outness +outoffice +outparish +outpath +outpatient +outport +outporter +outpost +outpour +outpouring +outpupil +output +outquarters +outrage +outrageousness +outrance +outrider +outrigger +outrightness +outrunner +outrush +outsentry +outsert +outset +outshot +outsider +outskirt +outsole +outspan +outspokenness +outstation +outstretcher +outswing +outswinger +outturn +outwardness +outwash +outwork +outworker +ouzel +ouzo +ova +ovality +ovalness +ovariectomy +ovariotomist +ovariotomy +ovaritis +ovarium +ovary +ovation +oven +ovenbird +ovenware +ovenwood +overabsorption +overabstemiousness +overabundance +overabusiveness +overacceleration +overaccentuation +overaccumulation +overacidity +overaction +overacuteness +overaddiction +overaffect +overaffirmation +overaffirmativeness +overaffliction +overaggravation +overaggressiveness +overagitation +overallegiance +overambitiousness +overanalysis +overanimation +overanxiety +overanxiousness +overappraisal +overappreciation +overappreciativeness +overapprehension +overapprehensiveness +overaptness +overargumentativeness +overartificiality +overassertion +overassertiveness +overassumption +overassuredness +overattachment +overattention +overattentiveness +overbashfulness +overbearer +overbearingness +overbet +overbite +overbitterness +overblouse +overboast +overboastfulness +overbookishness +overboot +overbounteousness +overbravado +overbraveness +overbravery +overbreak +overbrightness +overbrilliance +overbrilliancy +overbrutality +overbrutalization +overbulkiness +overbumptiousness +overcall +overcapability +overcapacity +overcapitalisation +overcapitalization +overcaptiousness +overcare +overcarefulness +overcarelessness +overcasting +overcasualness +overcausticity +overcaution +overcautiousness +overcensoriousness +overcentralization +overcharger +overcharitableness +overcharity +overcheapness +overcheck +overchildishness +overcircumspection +overcivility +overcivilization +overcleanness +overclemency +overcleverness +overclinicalness +overcloseness +overclothes +overcoat +overcoating +overcoil +overcoloration +overcomer +overcommercialization +overcommonness +overcompensation +overcompetitiveness +overcomplacence +overcomplacency +overcomplexity +overconcentration +overconcern +overcondensation +overconfidence +overconscientiousness +overconsciousness +overconservatism +overconservativeness +overconsiderateness +overconsideration +overconstantness +overconsumption +overcontentedness +overcontentiousness +overcontentment +overcontraction +overcontribution +overcontriteness +overcontrol +overcoolness +overcopiousness +overcorruption +overcostliness +overcourteousness +overcourtesy +overcovetousness +overcoyness +overcredulity +overcredulousness +overcriticalness +overcriticism +overcrowdedness +overcultivation +overcunningness +overcuriosity +overdaintiness +overdearness +overdecadence +overdecoration +overdecorativeness +overdedication +overdefensiveness +overdefiantness +overdeliberateness +overdeliberation +overdelicacy +overdelicateness +overdeliciousness +overdemandiness +overdenunciation +overdependence +overdepressiveness +overderisiveness +overdescriptiveness +overdesire +overdesirousness +overdestructiveness +overdevelopment +overdevotedness +overdiffuseness +overdiffusion +overdilation +overdiligence +overdiligentness +overdilution +overdiscouragement +overdiscreetness +overdistention +overdistortion +overdiverseness +overdiversification +overdiversity +overdogmaticalness +overdogmatism +overdose +overdraft +overdrainage +overdraught +overdrawer +overdrive +overdyer +overeagerness +overearnestness +overeasiness +overeater +overeducation +overeffort +overeffusiveness +overelegance +overelegantness +overembellishment +overemotionalness +overemphasis +overemphaticalness +overemployment +overemulation +overenthusiasm +overenviousness +overestimation +overexcitability +overexcitement +overexertion +overexpansion +overexpansiveness +overexpectantness +overexpenditure +overexplanation +overexposure +overexpressiveness +overexuberance +overexuberantness +overfacility +overfactiousness +overfaintness +overfaithfulness +overfall +overfamiliarity +overfancifulness +overfastidiousness +overfavorableness +overfearfulness +overfee +overfemininity +overfertility +overferventness +overfierceness +overflap +overflatness +overflexion +overflight +overfloridness +overfluency +overfluentness +overfold +overfondness +overfoolishness +overforce +overforwardness +overfoulness +overfrailness +overfrailty +overfrankness +overfreedom +overfrequency +overfrugality +overfruitfulness +overfrustration +overgarment +overgeneralization +overgenerosity +overgeniality +overgenialness +overgesticulation +overgesticulativeness +overglazed +overglazing +overgloominess +overgraciousness +overgratefulness +overgratification +overgratitude +overgreasiness +overgreatness +overgreediness +overgrievousness +overgrossness +overgrowth +overhappiness +overharassment +overharshness +overhastiness +overheadiness +overhearer +overheartiness +overheaviness +overhelpfulness +overhomeliness +overhonestness +overhonesty +overhostility +overhugeness +overhumanity +overhumbleness +overidealism +overidness +overidolatrousness +overillustration +overimaginativeness +overimitation +overimitativeness +overimportation +overimpressibility +overimpressionability +overimpressionableness +overinclination +overindividualism +overindividualization +overindulgence +overindustrialism +overindustrialization +overinflation +overinsistence +overinsistency +overinsolence +overinstruction +overinstructiveness +overintellectualism +overintellectualization +overintellectualness +overintenseness +overintensification +overintensity +overinterest +overinterestedness +overinterference +overinvestment +overirrigation +overjealousness +overjocularity +overjoyfulness +overjoyousness +overjudiciousness +overkeenness +overkill +overlactation +overlaness +overlasciviousness +overlaudation +overlavishness +overlaxness +overlearnedness +overline +overliterariness +overliveliness +overloftiness +overlogicality +overlogicalness +overlooker +overlooseness +overlord +overloudness +overlowness +overloyalty +overlubrication +overlusciousness +overlushness +overlustiness +overluxuriance +overluxuriancy +overmagnification +overmagnitude +overmantel +overmast +overmasterfulness +overmatter +overmatureness +overmeanness +overmeasure +overmeekness +overmellowness +overmelodiousness +overmercifulness +overmerriment +overmerriness +overminuteness +overmodernization +overmodesty +overmodification +overmournfulness +overmultiplication +overmystification +overnarrowness +overnationalization +overneatness +overneglectfulness +overnegligence +overnegligentness +overnervousness +overness +overneutralization +overneutralizer +overnicety +overnobleness +overnormality +overnormalization +overnourishment +overnumerousness +overobedience +overobeseness +overobesity +overobjectification +overobsequiousness +overoffensiveness +overofficiousness +overoptimism +overoptimist +overorganization +overorganize +overornamentality +overoxidization +overpainfulness +overpartiality +overpartialness +overparticularness +overpass +overpassionateness +overpatriotism +overpayment +overpenalization +overpensiveness +overperemptoriness +overpersuasion +overpessimism +overpiteousness +overplainness +overplausibleness +overplenitude +overplentifulness +overplenty +overplus +overpolemicalness +overponderousness +overpopularity +overpopulation +overpopulousness +overpositiveness +overpotency +overpotential +overpotentness +overpowerfulness +overpoweringness +overpreciseness +overprecision +overpreoccupation +overpresumption +overpresumptiveness +overpresumptuousness +overprocrastination +overproficiency +overprolixity +overprolixness +overprominence +overprominentness +overpromptness +overproness +overpronunciation +overprosperousness +overprotection +overprotraction +overprovidentness +overprovision +overprovocation +overpublicity +overpunishment +overqualification +overquietness +overraness +overrashness +overrationalization +overreaction +overreadiness +overrealism +overreduction +overrefinement +overreflection +overreflectiveness +overregimentation +overregulation +overreliance +overreligiosity +overreligiousness +overremissness +overrepresentation +overrepresentativeness +overreservedness +overresoluteness +overrestriction +overretention +overrichness +overrider +overrighteousness +overrigidity +overrigidness +overrigorousness +overroughness +overrudeness +overruler +oversacrificialness +oversadness +oversanguineness +oversatiety +oversaturation +overscepticalness +overscepticism +overscrupulousness +oversecretion +oversecurity +oversedation +overseer +oversensibleness +oversentimentalism +oversentimentality +overserenity +overseriousness +overservileness +overservility +oversetter +oversettlement +oversevereness +overseverity +overshirt +overshoe +oversight +oversilence +oversilentness +oversimpleness +oversimplicity +oversimplification +overskepticalness +overskeptticism +overskirt +overslaugh +overslavishness +oversleeve +overslowness +oversmoothness +oversness +oversoftness +oversolemnity +oversolemnness +oversolidification +oversophistication +oversorrowfulness +oversoul +oversourness +overspaciousness +oversparingness +overspecialization +overspeculation +overspeculativeness +overspeediness +overspill +overspin +oversqueamishness +overstaleness +overstand +oversteadfastness +oversteadiness +overstiffness +overstimulation +overstimulativeness +overstitch +overstocking +overstoutness +overstraightness +overstridence +overstridency +overstridentness +overstrongness +overstudiousness +oversubscriber +oversubscription +oversubtlety +oversufficiency +oversuperstitiousness +oversupply +oversureness +oversurety +oversusceptibility +oversusceptibleness +oversuspiciousness +oversweetness +oversystematicalness +overtalkativeness +overtalker +overtameness +overtartness +overtaxation +overtechnicality +overtediousness +overtenaciousness +overtenacity +overtenderness +overtenseness +overtension +overtheatricalness +overtheorization +overthickness +overthinness +overthoughtfulness +overthriftiness +overthrower +overthrust +overtightness +overtime +overtimidity +overtimidness +overtimorousness +overtint +overtolerance +overtone +overtread +overtreatment +overtrick +overtrustfulness +overtruthfulness +overture +overurbanization +overvaliantness +overvaluableness +overvaluation +overvariation +overvariety +overvehemence +overvehementness +overventilation +overventurousness +overview +overvigorousness +overviolentness +overvoltage +overwariness +overweakness +overwealth +overweener +overweeningness +overwhelmingness +overwideness +overwildness +overwillingness +overword +overzealousness +oviduct +oviparity +oviparousness +oviposition +ovipositor +ovisac +ovolo +ovotestis +ovovitellin +ovoviviparism +ovoviviparity +ovoviviparousness +ovule +ovum +owelty +owl +owlet +owlishness +owner +ownership +ox +oxalate +oxalis +oxazine +oxbow +oxcart +oxen +oxeye +oxford +oxgang +oxheart +oxhide +oxidant +oxidase +oxidation +oxide +oxidimetry +oxidizability +oxidization +oxidizer +oxidoreductase +oxime +oximeter +oximetry +oxlip +oxpecker +oxtail +oxter +oxtongue +oxyacetylene +oxyacid +oxyaldehyde +oxybenzene +oxycephaly +oxychloride +oxydase +oxydation +oxygen +oxygenate +oxygenation +oxygenator +oxygenicity +oxygenizer +oxyhaemoglobin +oxyhydrogen +oxymoron +oxyneurine +oxysalt +oxysulphide +oxytetracycline +oxytocia +oxytocin +oy +oyelet +oyer +oyster +oystercatcher +oystering +oysterman +oysterwoman +oz +ozocerite +ozone +ozonide +ozonizer +ozonolysis +ozonosphere +p +pa +paal +pabulum +paca +paccha +pace +pacemaker +pacer +pacesetter +paceway +pacha +pachadom +pachalic +pachinko +pachisi +pachouli +pachyderm +pachylosis +pachysandra +pachytene +pacification +pacificism +pacificist +pacifico +pacifier +pacifism +pacifist +pack +package +packaging +packer +packet +packhorse +packing +packman +packplane +packsack +packsaddle +packthread +packtrain +pact +paction +pad +padang +padauk +padding +paddle +paddleboard +paddlefish +paddler +paddock +paddy +paddymelon +paddywhack +pademelon +padeye +padlock +padnag +padouk +padre +padrone +padsaw +paduasoy +paean +paeanism +paedagogy +paederast +paederasty +paediatrician +paediatrics +paedobaptism +paedobaptist +paedogenesis +paedology +paedomorphosis +paedophilia +paella +paenula +paeon +paeony +pagan +pagandom +paganisation +paganiser +paganism +paganization +page +pageant +pageantry +pageboy +pagne +pagoda +pagodite +pagurian +pagurid +paho +pahoehoe +pahutan +paidology +paigle +paik +paiker +pail +pailful +paillasse +paillette +pain +painfulness +painkiller +painstakingness +paint +paintbox +paintbrush +painter +painting +painty +pair +pairle +pairmasts +paisa +paisano +paisley +pajama +pakeha +pal +palabra +palace +paladin +palaeethnology +palaeoanthropology +palaeobiologist +palaeobiology +palaeobotany +palaeoclimatologist +palaeoclimatology +palaeoecologist +palaeoecology +palaeoencephalon +palaeoentomologist +palaeoentomology +palaeoethnobotany +palaeogenesis +palaeography +palaeolith +palaeologist +palaeology +palaeomagnetism +palaeontography +palaeontol +palaeontologist +palaeontology +palaeozoologist +palaeozoology +palaestra +palais +palankeener +palanquin +palanquiner +palatability +palatableness +palatalization +palate +palatialness +palatinate +palatium +palaver +palaverer +palaverist +palaverment +palazzo +palea +paleencephalon +paleethnologist +paleethnology +paleface +paleobiologist +paleobiology +paleobotany +paleoclimatologist +paleoclimatology +paleoecologist +paleoecology +paleoencephalon +paleoentomologist +paleog +paleogenesis +paleogeography +paleographer +paleography +paleolith +paleologist +paleomagnetism +paleon +paleontography +paleontol +paleontology +paleopathologist +paleopedology +paleopsychology +paleozoologist +paleozoology +paleozoulogist +palestra +palet +paletot +palette +palfrey +palikar +palimpsest +palindrome +palindromist +paling +palingenesis +palingenesist +palinode +palinodist +palisade +palisado +palki +pall +palladium +pallbearer +pallet +palletization +pallette +palliasse +palliation +palliator +pallidness +pallium +pallor +palm +palmation +palmer +palmerworm +palmette +palmetto +palmist +palmiste +palmistry +palmitate +palmitin +palmyra +palolo +palometa +palomino +palooka +paloverde +palp +palpability +palpableness +palpation +palpi +palpitation +palsgrave +palsgravine +palstave +palsy +palterer +paltriness +paludamentum +paludism +palynology +pam +pamaquine +pampas +pamperedness +pamperer +pampero +pamphlet +pamphleteer +pamphrey +pamplegia +pampre +panacea +panache +panada +panatella +panatrophy +pancake +pancarditis +panchax +panchromatism +pancosmism +pancratium +pancreas +pancreatectomize +pancreatin +pancreatitis +pancreatotomy +panda +pandanus +pandect +pandemia +pandemicity +pandemonium +pandiculation +pandit +pandora +pandore +pandour +pandowdy +pandy +pandybat +pane +panegyric +panel +panelboard +paneling +panelist +panelling +panellist +panettone +panfish +pang +panga +pangenesis +pangolin +panguingue +panhandle +panhead +panic +panicle +panicmonger +panier +panjandrum +panleukopenia +panlogism +panmixia +pannage +panne +pannier +pannikin +pannus +panocha +panoply +panorama +panpipe +panplegia +panpsychist +pansophism +pansophist +pansophy +panspermia +pansy +pantagraph +pantaloon +pantechnicon +pantelegraph +pantelegraphy +panter +pantheism +pantheon +panther +pantie +pantihose +pantile +pantisocracy +pantler +panto +pantofle +pantograph +pantographer +pantography +pantologist +pantology +pantomime +pantomimicry +pantomimist +pantonality +pantothere +pantoum +pantry +pantryman +pantsuit +pantywaist +panus +panzer +pap +papa +papable +papacy +papain +papalise +papalization +papaverine +papaw +papaya +papelera +paper +paperback +paperbark +paperboard +paperbound +paperboy +paperclip +paperer +papergirl +paperhanger +paperhanging +paperiness +paperknife +paperweight +paperwork +papeterie +papilla +papilloma +papillomatosis +papillon +papillosity +papillote +papism +papist +papistry +papoose +pappenheimer +pappus +paprika +papule +papyrologist +papyrology +papyrus +par +para +parabasis +parabiosis +parablast +parable +parabola +parabole +parabolicalism +parabolist +parabolization +parabolizer +paraboloid +paraboloidal +parabrake +paracasein +paracentesis +paracetaldehyde +paracetamol +parachor +parachronism +parachute +parachuter +parachutism +parachutist +paraclete +paracyesis +paracystitis +parade +parader +paradiddle +paradigm +paradise +parados +paradox +paradoxicality +paradoxicalness +paradoxology +paradrop +paraesthesia +paraffin +paraffine +paraformaldehyde +paragenesis +parageusia +paraglider +paraglossa +paragoge +paragon +paragonite +paragraph +paragrapher +paragraphia +paragraphism +parahydrogen +paraison +parakeet +paralanguage +paraldehyde +paraleipsis +paralipsis +parallax +parallelepiped +parallelisation +parallelism +parallelization +parallelogram +paralogism +paralysation +paralyser +paralysis +paralyzation +paralyzer +paramagnet +paramagnetism +paramatta +paramecium +paramedic +parament +parameter +paramita +paramnesia +paramo +paramorph +paramorphine +paramorphism +paramountcy +paramour +paranephros +parang +paranoia +paranymph +paraparesis +parapet +paraph +paraphrase +paraphraser +paraphrasis +paraphrast +paraphyllium +paraphysis +paraplegia +parapodium +parapraxis +paraprofessional +parapsychology +parasang +parascenium +paraselene +parasite +parasiticalness +parasiticide +parasitism +parasitologist +parasitology +parasitosis +parasol +parastas +parastichy +parasynapsis +parasynaptist +parasynthesis +parasyntheton +parataxic +parataxis +parathion +parathyroidectomy +paratrooper +paratuberculin +paratuberculosis +paravane +paravent +parazoan +parbuckle +parcel +parceling +parcenary +parcener +parchedness +parcheesi +parchment +parclose +pard +pardah +pardalote +pardner +pardonableness +pardoner +pareciousness +parecism +parecy +paregmenon +paregoric +pareira +parenchyma +parens +parent +parentage +parenthesis +parentheticality +parentheticalness +parenthood +parenticide +parergon +paresis +paresthesia +paretic +paretta +pareu +parfait +parfleche +pargasite +parget +pargeting +parging +parhelion +pariah +pariahdom +pariahism +paries +paring +parish +parishioner +parishionership +parison +parity +park +parka +parkin +parking +parkland +parkway +parlance +parle +parley +parleyer +parliament +parliamentarian +parliamentarianism +parlor +parlormaid +parlour +parlousness +parochialism +parochialness +parodist +parodontium +parodos +parody +parol +parole +parolee +paronomasia +paronychia +paronym +paroquet +parotitis +parotoid +parousia +paroxysm +parpen +parpend +parquet +parquetry +parr +parrakeet +parramatta +parrel +parricide +parroket +parrot +parrotfish +pars +parsec +parser +parsimoniousness +parsimony +parsley +parsnip +parson +parsonage +part +partaker +partan +parterre +parthenocarpy +parthenogenesis +parthenogone +parthenospore +parti +partiality +participance +participant +participation +participiality +participialization +participle +particle +particularisation +particulariser +particularism +particularity +particularization +particularizer +parting +partisan +partisanry +partisanship +partita +partition +partitioner +partitionist +partitionment +partizan +partizanship +partlet +partner +partnership +parton +partridge +partridgeberry +parturiency +parturition +party +partyism +parulis +parure +parvenu +parvenudom +parvenuism +parvis +parvulus +pas +pascal +pase +paseo +pash +pasha +pashadom +pashalik +pashka +pashm +pasqueflower +pasquil +pasquinade +passableness +passacaglia +passade +passado +passage +passageway +passament +passaree +passbook +passe +passel +passementerie +passenger +passepied +passer +passibility +passingness +passion +passionary +passionateness +passionflower +passionfruit +passionlessness +passivism +passivist +passkey +passport +passus +password +pasta +paste +pasteboard +pastel +pastelist +paster +pastern +pasteurella +pasteurellosis +pasteurisation +pasteurism +pasteurization +pasteurizer +pasticcio +pastiche +pasticheur +pasticheuse +pastille +pastime +pastiness +pastis +pastor +pastorale +pastoralisation +pastoralism +pastoralist +pastoralization +pastorate +pastorship +pastosity +pastrami +pastry +pasturable +pasturage +pasture +pasturer +pataca +patagium +patch +patcher +patchouli +patchstand +patchwork +pate +patella +paten +patency +patent +patentability +patentee +patentor +pater +paterfamilias +paternalism +paternity +paternoster +path +patheticalness +pathfinder +pathfinding +pathic +pathobiologist +pathocure +pathogen +pathogenesis +pathognomy +pathography +pathol +pathology +pathoneurosis +pathos +pathosis +pathway +patience +patientness +patin +patina +patinated +patio +patisserie +patness +patois +patresfamilias +patrial +patriarch +patriarchate +patriarchdom +patriarchship +patriarchy +patrician +patricianhood +patricianism +patricianship +patriciate +patricide +patriliny +patrilocality +patrimony +patriot +patriotism +patrol +patroller +patrolman +patrology +patron +patronage +patrondom +patroniser +patronizer +patronship +patroon +patroonship +patsy +patten +patterer +patterist +pattern +patterner +patternmaking +pattle +patty +patulousness +paua +paucal +paucity +paughty +pauldron +paulownia +paunch +paunchiness +pauper +pauperage +pauperdom +pauperisation +pauperiser +pauperism +pauperization +pauperizer +pauraque +pauser +pav +pava +pavage +pavane +pavement +paver +pavilion +pavillon +pavin +paving +pavior +paviour +pavis +paviser +paw +pawer +pawl +pawnage +pawnbroker +pawner +pawnshop +pawpaw +pax +paxwax +paybox +paycheck +payday +payee +payer +payload +paymaster +paymastership +payment +paynim +paynimhood +payoff +payola +payroll +payt +pazaree +pc +pcf +pci +pct +pd +pe +pea +peace +peaceableness +peaced +peacelessness +peacemaker +peacemaking +peacetime +peach +peachblow +peacher +peachiness +peacing +peacoat +peacock +peacockery +peacockishness +peacockism +peafowl +peag +peahen +peak +peakiness +peakishness +peal +peamouth +pean +peanut +peanuts +peapod +pear +pearl +pearler +pearleye +pearlfish +pearliness +pearlite +pearloyster +pearlwort +pearmain +peartness +peasant +peasantry +pease +peasecod +peashooter +peasouper +peat +peavey +peavy +peba +pebble +pebbling +pebrine +pecan +peccadillo +peccancy +peccantness +peccary +peccatophobia +peccavi +pech +peck +pecker +pectase +pectate +pecten +pectin +pectinatella +pectination +pectinose +pectization +pectolite +pectoralis +pectose +peculiarity +peculium +ped +pedagogery +pedagogics +pedagogism +pedagogue +pedagoguery +pedagogy +pedal +pedalfer +pedalo +pedant +pedanthood +pedanticalness +pedanticism +pedantry +peddler +peddlery +pederast +pederasty +pedesis +pedestal +pedestrian +pedestrianism +pediatrician +pedicab +pedicel +pedicellation +pedicle +pediculosis +pedicure +pedicurist +pedigree +pediment +pediococcus +pedipalp +pedlar +pedlary +pedlery +pedobaptism +pedobaptist +pedocal +pedodontist +pedograph +pedologist +pedology +pedometer +pedro +peduncle +peekaboo +peeler +peeling +peen +peeper +peephole +peepshow +peepul +peer +peerage +peerie +peerlessness +peetweet +peevedness +peevers +peevishness +peewit +peg +pegboard +pegbox +pegh +pegmatite +pegwood +peh +peignoir +pein +pejoration +pekan +peke +pekin +pekoe +pelage +pelargonium +pele +pelecypod +pelerine +pelf +pelham +pelican +pelike +pelisse +pelite +pellagra +pellagrin +pellet +pellicle +pellitory +pellucidity +pellucidness +pelmet +peloid +peloria +pelorization +pelorus +pelota +peltast +peltation +pelter +peltry +pelvis +pemmican +pemphigoid +pemphigus +pen +penalisation +penalization +penalty +penance +penang +penaria +pence +pencel +penchant +pencil +pendant +pendative +pendency +pendentive +pendragon +pendragonship +pendulum +peneplain +penetrability +penetrableness +penetrameter +penetrance +penetratingness +penetration +penetrativeness +penetrativity +penetrator +penetrometer +peng +penguin +penholder +penicil +penicillation +penicillin +penicillium +peninsula +peninsularism +peninsularity +penitence +penitentiary +penknife +penlight +penman +penmanship +penna +pennaceous +pennant +penni +pennilessness +penninite +pennon +pennoncel +penny +pennycress +pennyroyal +pennyweight +pennywort +pennyworth +penologist +penology +penoncel +penpusher +pensae +pensil +pension +pensioner +pensionership +penstemon +penstock +pentachlorophenol +pentacle +pentad +pentadactylism +pentadecagon +pentagon +pentagram +pentahedron +pentalpha +pentamerism +pentamery +pentameter +pentamethylenediamine +pentane +pentangle +pentapody +pentaprism +pentaquine +pentarch +pentarchy +pentastich +pentastylos +pentasyllabism +pentasyllable +pentathlon +pentatron +pentene +penthouse +pentimento +pentlandite +pentobarbital +pentode +pentolite +pentosan +pentose +pentoxide +pentstemon +pentyl +pentylenetetrazol +penuche +penuchle +penult +penumbra +penuriousness +penury +peon +peonage +peonism +peony +people +peopler +pep +peperoni +pepino +peplos +peplum +pepo +pepper +peppercorn +pepperer +peppergrass +pepperidge +peppermint +peppershrike +pepperwood +pepperwort +peppiness +pepsin +pepsinogen +peptidase +peptide +peptone +peptonisation +peptoniser +peptonization +peptonizer +peptonoid +peracid +perambulation +perambulator +perborate +perborax +percale +percaline +perceivedness +perceiver +perceivingness +percent +percentage +percentile +percept +perceptibility +perceptibleness +perception +perceptiveness +perceptivity +perch +percher +perchlorate +perchloride +perchlorination +perchloroethylene +perchloromethane +percipience +percipiency +percolation +percolator +percussion +percussionist +percussiveness +percussor +perdifume +perdition +perdu +perdurability +perdurableness +peregrination +peregrinator +peregrinity +pereion +pereirine +perenniality +perfecter +perfectibilist +perfectibility +perfection +perfectionism +perfectionist +perfectiveness +perfectivity +perfectness +perfecto +perfervor +perfervour +perfidiousness +perfidy +perfin +perforation +perforator +performance +performer +perfume +perfumer +perfumery +perfunctoriness +perfusion +pergelisol +pergola +perh +perhydrogenation +perhydrol +peri +perianth +periapt +periarteritis +periastron +periauger +periblast +periblem +peribolos +peribolus +pericarditis +pericardium +pericarp +pericementum +pericenter +perichaetium +perichondrium +periclase +pericline +pericope +pericranium +pericycle +pericynthion +periderm +peridiole +peridiolum +peridium +peridot +peridotite +peridrome +peridromos +perigee +perigon +perigone +perigonium +perihelion +peril +perilousness +perilune +perilymph +perimeter +perimorph +perimorphism +perimysium +perinephrium +perineum +perineuritis +perineurium +period +periodate +periodical +periodicalism +periodicalist +periodicalness +periodicity +periodide +periodization +periodontics +perionychia +perionychium +periosteum +periostitis +periostracum +peripateticism +peripeteia +periphery +periphrasis +periphyton +peripteros +periptery +perique +perisarc +periscope +perishability +perishableness +perishment +perisperm +perispore +perissodactyl +peristalith +peristalsis +peristerite +peristome +peristyle +perithecium +perithelium +peritoneum +peritonitis +peritrack +peritrich +peritrichan +periwig +periwinkle +perjuredness +perjurement +perjurer +perjury +perknite +perling +perlite +perlocution +perm +permafrost +permalloy +permanence +permanency +permanentness +permanganate +permatron +permeability +permeableness +permeameter +permeance +permeator +permillage +permissibility +permissibleness +permission +permissiveness +permittivity +permutability +permutableness +permutation +permutationist +permuter +pernancy +perniciousness +pernicketiness +pernio +pernor +peroneus +peroration +peroratory +perosis +peroxidase +peroxidation +peroxide +peroxyacid +peroxyborate +perpend +perpendicularity +perpendicularness +perpent +perpetration +perpetrator +perpetuality +perpetualness +perpetuance +perpetuation +perpetuator +perpetuity +perphenazine +perplexedness +perplexer +perplexity +perquisite +perron +perruquier +perry +persalt +persecution +persecutor +perseity +perseverance +perseveration +persicaria +persiflage +persimmon +persistence +person +persona +personableness +personage +personalisation +personalism +personalist +personality +personalization +personalness +personalty +personation +personator +personification +personificator +personifier +personnel +persorption +perspective +perspectivism +perspectivist +perspicaciousness +perspicuity +perspicuousness +perspirability +perspiration +persuadability +persuadableness +persuadedness +persuader +persuasibility +persuasion +persuasiveness +persulfate +pertinaciousness +pertinacity +pertness +perturbation +perturbative +perturbator +perturbedness +perturber +perturbment +pertussis +peruke +perusal +peruser +perv +pervasion +pervasiveness +perverseness +perversion +perversity +perverter +pervertibility +pervicaciousness +perviousness +pes +pesade +peseta +pesewa +peso +pessary +pessimism +pessimist +pest +pesterer +pesthole +pesthouse +pesticide +pestiferousness +pestilence +pestilentialness +pestle +pet +peta +petal +petalage +petalody +petard +petasus +petcock +pete +petechia +peteman +peterman +petersham +pethidine +petiole +petiolule +petiteness +petition +petitioner +petitionist +petitor +peto +petrel +petrifaction +petrifier +petrochemical +petrochemistry +petrodollar +petrog +petrogenesis +petrogeny +petroglyph +petrogram +petrograph +petrographer +petrography +petrol +petrolatum +petroleum +petrologist +petrology +petronel +pettedness +petticoat +pettifogger +pettishness +petto +petulance +petulancy +petunia +petuntse +pew +pewage +pewee +pewholder +pewit +pewter +peyote +peytral +pf +pfennig +pfg +pg +phacolite +phaeton +phage +phagedena +phagocyte +phagocytolysis +phagocytosis +phagolysis +phagomania +phagophobia +phalange +phalanger +phalanges +phalanstery +phalanx +phalarope +phallicism +phallicist +phallist +phallus +phanatron +phanerite +phanerogam +phanerogamy +phanerophyte +phano +phanotron +phantasm +phantasmagoria +phantasmagorist +phantasmagory +phantasy +phantom +pharmaceutics +pharmacist +pharmacodynamics +pharmacognosist +pharmacognosy +pharmacolite +pharmacologist +pharmacology +pharmacopoeia +pharmacopoeist +pharmacopsychosis +pharmacy +pharyngectomy +pharyngitis +pharyngology +pharyngoscope +pharyngoscopy +pharyngotomy +pharynx +phase +phasis +phasmajector +phasmid +pheasant +phellem +phelloderm +phellogen +phelonion +phenacaine +phenacetin +phenacite +phenanthraquinone +phenanthrene +phenanthrenequinone +phenazine +phenetidine +phenetole +phenformin +phenix +phenmetrazine +phenobarbital +phenobarbitone +phenocopy +phenocryst +phenol +phenolion +phenology +phenolphthalein +phenomena +phenomenalism +phenomenalist +phenomenality +phenomenology +phenomenon +phenoplast +phenosafranine +phenothiazine +phenotype +phenoxide +phenoxybenzamine +phenyl +phenylacetaldehyde +phenylalanine +phenylamine +phenylbenzene +phenylcarbinol +phenyldiethanolamine +phenylethylene +phenylethylmalonylurea +phenylketonuria +phenylmethane +phenylthiourea +pheon +pheromone +phi +phial +phiale +phies +phil +philabeg +philadelphus +philanderer +philanthropist +philanthropy +philatelist +philately +philhellene +philhellenism +philibeg +philippic +philippus +phillumenist +philodendron +philogyny +philologer +philologian +philologist +philology +philomel +philopena +philos +philosopher +philosophership +philosophicalness +philosophisation +philosophiser +philosophism +philosophization +philosophizer +philosophy +philter +philterer +philtre +philtrum +phimosis +phiz +phlebitis +phlebosclerosis +phlebothrombosis +phlebotome +phlebotomisation +phlebotomist +phlebotomization +phlebotomy +phlegm +phlegmaticalness +phlegmaticness +phloem +phlogiston +phlogopite +phlogosis +phlorizin +phloroglucinol +phlox +phlyctaena +phlyctena +phobia +phocomelia +phoebe +phoenix +phokomelia +phon +phonasthenia +phonation +phonautograph +phone +phonematics +phoneme +phonemicist +phonemics +phonendoscope +phonet +phonetician +phonetics +phonetist +phonics +phoniness +phono +phonocardiogram +phonocardiograph +phonocardiography +phonogram +phonograph +phonographer +phonographist +phonography +phonol +phonolite +phonologist +phonology +phonometer +phonon +phonophore +phonoreception +phonoreceptor +phonoscope +phonotactics +phonotype +phonotyper +phonotypist +phonotypy +phoresy +phoronid +phosgene +phosgenite +phosphagen +phosphatase +phosphate +phosphatide +phosphation +phosphatisation +phosphatization +phosphaturia +phosphene +phosphide +phosphine +phosphite +phosphocreatine +phospholipid +phospholipide +phosphonium +phosphonuclease +phosphoprotein +phosphor +phosphorescence +phosphorisation +phosphorism +phosphorite +phosphoroscope +phosphorus +phosphorylase +phosphorylation +phot +photalgia +photics +photism +photo +photocathode +photocell +photochemist +photochemistry +photochromy +photochronograph +photochronography +photocomposer +photocomposition +photoconduction +photoconductivity +photoconductor +photocopier +photocopy +photocurrent +photodisintegration +photodissociation +photodrama +photodramatics +photodramatist +photoduplicate +photoduplication +photodynamics +photoelasticity +photoelectron +photoelectrotype +photoemission +photoeng +photoengraver +photoengraving +photofinisher +photofinishing +photofission +photoflash +photoflood +photofluorography +photogen +photogene +photogeology +photogram +photogrammetry +photograph +photographer +photography +photogravure +photoheliography +photoionization +photojournalism +photojournalist +photokinesis +photolithograph +photolithographer +photolithography +photolithoprint +photoluminescence +photolysis +photom +photomap +photometer +photometrician +photometrist +photometry +photomicrograph +photomicrography +photomicroscope +photomicroscopy +photomontage +photomultiplier +photomural +photon +photonasty +photoneutron +photopathy +photoperiod +photoperiodism +photophily +photophobia +photophore +photophosphorylation +photopia +photoplay +photopography +photopolymer +photoprinting +photoproton +photoreception +photoreceptor +photoreconnaissance +photorecorder +photorecording +photospectroscopy +photosphere +photostater +photostatter +photosynthate +photosynthesis +phototaxis +phototelegraph +phototelegraphy +phototheodolite +phototherapeutics +phototherapist +phototherapy +phototonus +phototopography +phototransistor +phototroph +phototropism +phototube +phototype +phototypesetting +phototypography +phototypy +photozincography +photuria +phr +phrase +phraseogram +phraseograph +phraseologist +phraseology +phrasing +phratry +phreatophyte +phren +phreneticness +phrenitis +phrenol +phrenologist +phrenology +phrensy +phthalein +phthalocyanine +phthiocol +phthiriasis +phthisis +phut +phycocolloid +phycocyanin +phycologist +phycology +phycomycete +phyla +phylactery +phyle +phyllary +phyllite +phylloclade +phyllocladium +phyllode +phyllody +phyllome +phyllophore +phyllopod +phylloquinone +phyllosilicate +phyllotaxis +phylloxera +phylogeny +phylum +phyma +phys +physiatrics +physiatrist +physic +physicalism +physicality +physician +physicianship +physicist +physics +physiocrat +physiognomist +physiognomy +physiography +physiologist +physiology +physiotherapist +physiotherapy +physique +physis +physostigmine +phytobiology +phytocide +phytoclimatology +phytocoenosis +phytogenesis +phytogeographer +phytogeography +phytographer +phytographist +phytography +phytohormone +phytology +phyton +phytonadione +phytopathologist +phytopathology +phytoplankton +phytoplasm +phytosociologist +phytosociology +phytotoxin +phytotron +piaffe +pian +pianette +pianism +pianist +piano +pianoforte +pias +piassava +piastre +piazza +pibgorn +piblokto +pibroch +pic +pica +picador +picaninny +picara +picaro +picaroon +picayunishness +piccalilli +piccanin +piccaninny +piccolo +piccoloist +pice +pich +pichiciego +pickaback +pickaninny +pickaroon +pickax +pickaxe +picker +pickerel +pickerelweed +picket +picketer +pickin +pickle +picklock +pickpocket +pickthank +pickwick +picnic +picnicker +picocurie +picofarad +picoline +picometer +picong +picosecond +picot +picotee +picowatt +picrate +picrite +picrotoxin +pictogram +pictograph +pictorialisation +pictorialization +pictorialness +picture +picturegoer +picturesqueness +picturization +picul +piddler +piddock +pidgin +pidginization +pie +piebaldness +piece +piecer +piecework +pieceworker +piecrust +piedmontite +piefort +pieman +piend +pieplant +pier +piercer +piercingness +pierhead +piet +pietism +piety +piezochemistry +piezoelectricity +piezometer +piezometry +piffle +pig +pigboat +pigeon +pigeonberry +pigeonhole +pigeonite +pigeonwing +pigface +pigfish +pigg +piggery +piggie +piggin +piggishness +piggy +piggyback +piglet +pigling +pigmeat +pigment +pigmentation +pignolia +pignon +pignus +pignut +pigpen +pigskin +pigsticker +pigsticking +pigsty +pigswill +pigtail +pigweed +pika +pike +pikelet +pikeman +pikeperch +piker +pikestaff +pil +pilaf +pilaster +pilastered +pilau +pilch +pilchard +pilcher +pile +pileum +pileup +pileus +pilewort +pilferage +pilferer +pilgarlic +pilgrim +pilgrimage +pili +piling +pill +pillar +pillaret +pillbox +pillion +pilliwinks +pillory +pillow +pillowcase +pillwort +pilocarpine +pilosity +pilot +pilotage +pilotfish +pilothouse +piloti +piloting +pilpul +pilpulist +pilular +pilule +pilus +pimelitis +pimento +pimiento +pimola +pimp +pimpernel +pimple +pimply +pin +pinacoid +pinafore +pinang +pinard +pinaster +pinball +pinchbeck +pinchbottle +pinchcock +pincher +pincushion +pine +pineapple +pinene +pinery +pinetum +pinfall +pinfeather +pinfish +pinfold +ping +pingo +pinguidity +pinhead +pinhole +pinion +pinite +pinitol +pink +pinkeye +pinkie +pinko +pinkroot +pinky +pinna +pinnace +pinnacle +pinnation +pinner +pinnula +pinnule +pinny +pinochle +pinole +pinprick +pinsetter +pinspotter +pinstripe +pint +pinta +pintadera +pintado +pintail +pintano +pintle +pinup +pinweed +pinwheel +pinwork +pinworm +pinx +pinxit +piolet +pion +pioneer +piosity +piousness +pip +pipa +pipage +pipal +pipe +pipeclay +pipefish +pipefitting +pipeful +pipeline +piper +piperazine +piperidine +piperine +piperonal +pipestone +pipet +pipette +pipewort +piping +pipistrelle +pipit +pipkin +pipper +pippin +pipsissewa +pipsqueak +piqu +piqua +piquancy +piquantness +pique +piquet +piracy +piragua +piranha +pirate +piriformis +pirn +pirog +pirogen +pirogue +pirouette +pisa +pisay +piscary +piscatology +piscator +pisciculture +pisciculturist +piscina +pishogue +pisistance +pismire +pisolite +pistachio +pistareen +piste +pistil +pistol +pistole +pistoleer +pistology +piston +pit +pita +pitahaya +pitanga +pitchblende +pitcher +pitcherful +pitchfork +pitchiness +pitching +pitchman +pitchometer +pitchout +pitchpot +pitchstone +piteousness +pitfall +pith +pithead +pithecanthropid +pithecanthropus +pithiness +pithos +pitiableness +pitier +pitifulness +pitilessness +pitman +piton +pitsaw +pitta +pittance +pituitary +pituitousness +pituri +pity +pityriasis +pivot +pivoting +pixel +pixie +pizaine +pizz +pizza +pizzeria +pizzle +pk +pkg +pkt +pl +placability +placableness +placage +placard +placarder +place +placebo +placeman +placemanship +placement +placenta +placentation +placer +placet +placidity +placidness +plack +placket +placode +placoderm +plafond +plaga +plage +plagiariser +plagiarism +plagiarist +plagiary +plagiocephaly +plagioclase +plagioclastic +plagioclimax +plagiotropism +plague +plaguer +plaice +plaid +plainchant +plainness +plainsman +plainsong +plaint +plaintiff +plaintiffship +plaintiveness +plaister +plait +plaiting +plan +planarian +planation +plancer +planch +planchet +planchette +plane +planer +planet +planetarium +planetesimal +planetoid +planetology +planform +planigraph +planigraphy +planimeter +planimetry +planisphere +plank +planker +planking +plankter +plankton +planoblast +planogamete +planograph +planography +planometer +planometry +planosol +planospore +plansheer +plant +plantain +plantation +planter +plantocracy +planula +plaque +plash +plasher +plasm +plasma +plasmacyte +plasmagel +plasmagene +plasmalogen +plasmapheresis +plasmasol +plasmin +plasmocyte +plasmodesma +plasmodium +plasmogamy +plasmolysis +plasmolytic +plasmon +plasmoquine +plasmosome +plaster +plasterboard +plasterer +plasteriness +plastering +plasterwork +plastic +plasticisation +plasticity +plasticization +plasticizer +plastid +plastique +plastiqueur +plastometer +plastometry +plastotype +plastral +plastron +plat +platan +platband +plate +plateau +plateholder +platelayer +platelet +platemark +platen +plater +platform +platina +platinate +plating +platiniridium +platinisation +platinization +platinocyanide +platinotron +platinotype +platinum +platitude +platitudinisation +platitudiniser +platitudinization +platitudinizer +platitudinousness +platoon +platteland +platter +platycephaly +platyhelminth +platykurtosis +platypus +platysma +plaudit +playa +playacting +playback +playbill +playbook +playday +playdown +player +playfulness +playgirl +playgoer +playground +playhouse +playlet +playmaker +playmate +playpen +playreader +playroom +playschool +playsuit +plaything +playtime +playwright +playwriting +plaza +plea +pleader +pleading +pleadingness +pleasance +pleasantness +pleasantry +pleasedness +pleaser +pleasingness +pleasurableness +pleasure +pleat +pleater +pleb +plebe +plebeianisation +plebeianism +plebeianization +plebeianness +plebiscite +plebs +plectognath +plectron +plectrum +pledge +pledgee +pledger +pledget +pledgor +pleiad +pleiomery +pleiophylly +pleiotaxy +pleiotropism +plenitude +plenteousness +plentifulness +plenty +plenum +pleochroism +pleomorphism +pleon +pleonasm +pleopod +plerergate +plesiosaur +plessor +plethora +plethysmograph +pleura +pleurisy +pleurite +pleurodynia +pleuron +pleuropneumonia +pleurotomy +pleuston +plew +pleximeter +pleximetry +plexor +plexus +plia +pliability +pliableness +pliancy +pliantness +plica +plication +plie +plier +plight +plimsoll +plinker +plinth +pliss +plisse +ploce +plodder +ploddingness +plonko +plop +plosion +plot +plotlessness +plottage +plotter +plough +ploughboy +plougher +ploughman +ploughmanship +ploughshare +ploughstaff +plover +plow +plowboy +plower +plowman +plowmanship +plowshare +ploy +plu +plucker +pluckiness +plucklessness +plug +plugboard +plugger +plum +plumage +plumb +plumbago +plumber +plumbery +plumbicon +plumbing +plumbism +plumbness +plumbum +plumcot +plume +plumoseness +plumosity +plumper +plumule +plunderage +plunger +plunker +plupf +plur +pluralisation +pluraliser +pluralism +plurality +pluralization +pluralizer +pluripresence +plush +plushness +pluteus +plutocracy +plutocrat +pluton +plutonium +pluviometer +pluviometry +pluviosity +plyer +plywood +pm +pneum +pneuma +pneumaticity +pneumatics +pneumatocyst +pneumatograph +pneumatologist +pneumatology +pneumatolysis +pneumatometer +pneumatophore +pneumatotherapy +pneumectomy +pneumobacillus +pneumococcus +pneumoconiosis +pneumodynamics +pneumoencephalitis +pneumoencephalogram +pneumograph +pneumography +pneumonectomy +pneumonia +pneumonitis +pneumonoconiosis +pneumonoultramicroscopicsilicovolcanoconiosis +pneumothorax +po +poacher +poachiness +pochade +pochard +pochette +pocill +pock +pocket +pocketbook +pocketful +pocketing +pocketknife +pockmark +pococurante +pococuranteism +pococurantism +pocosin +pocul +pod +podagra +poddock +poddy +podesta +podetium +podginess +podiatrist +podiatry +podite +podium +pododynia +podomere +podophyllin +podophyllum +podotheca +podsolization +podzol +podzolization +poem +poenology +poesy +poet +poetaster +poetastering +poetasterism +poetastery +poetastry +poetess +poetics +poetiser +poetizer +poetry +pogamoggan +pogey +pogge +pogonia +pogrom +pogy +pohutukawa +poi +poignancy +poikilie +poikiloblast +poikilothermism +poikilothermy +poil +poilu +poimenics +poinciana +poinsettia +point +pointal +pointe +pointedness +pointel +pointer +pointillism +pointillist +pointing +pointlessness +pointsman +pointwise +poise +poiser +poison +poisoner +poisoning +pokeberry +pokelogan +poker +pokie +pokiness +pol +polacca +polacre +polarimeter +polarisability +polarisation +polariscope +polariser +polarity +polarization +polarogram +polarography +polder +pole +poleax +poleaxe +polecat +polejumper +polemarch +polemics +polemist +polenta +poler +poleyn +polianite +police +policeman +policewoman +policlinic +policy +policyholder +poliencephalitis +poliencephalomyelitis +polimetrum +polio +polioencephalitis +poliomyelitis +polis +polisher +polit +politeness +politesse +politicalization +politician +politicking +politico +politics +polity +polje +polka +poll +pollack +pollakiuria +pollan +pollard +pollbook +pollen +pollenosis +pollera +pollex +pollicitation +pollination +pollinator +pollinium +pollinization +pollinosis +polliwog +pollock +pollster +pollucite +pollutant +pollutedness +polluter +pollution +pollyfish +pollywog +polo +polocyte +poloist +polonaise +polonium +polony +polos +poltergeist +poltroon +poltroonery +poly +polyacrylonitrile +polyamide +polyamine +polyandrist +polyandry +polyanthus +polyarchy +polyarteritis +polyarthritis +polybasicity +polybasite +polybutene +polybutylene +polycarpy +polycentrism +polychaete +polychasium +polychromy +polyclad +polyclinic +polycotyledon +polycrystal +polycythemia +polydactylism +polydaemonism +polydaemonist +polydemonist +polydipsia +polydontia +polyembryony +polyester +polyethylene +polygala +polygamist +polygamy +polygene +polygenesis +polygenetic +polygenist +polygon +polygonum +polygraph +polygrapher +polygraphist +polygynist +polygyny +polyhedron +polyhistor +polyhistory +polyimide +polyisoprene +polymath +polymer +polymerism +polymerization +polymorph +polymorphism +polymyxin +polyneuritis +polynucleotide +polynya +polyp +polypary +polypeptide +polypetaly +polyphagia +polyphagian +polyphagist +polyphone +polyphony +polypidom +polyploidy +polypnea +polypody +polypropylene +polyprotodont +polyptych +polypus +polyrhythm +polysaccharide +polysemy +polyspast +polystyrene +polysulfide +polysulfonate +polysulphide +polysuspensoid +polysyllable +polysyllogism +polysyndeton +polysynthesism +polytechnic +polytetrafluoroethylene +polytheism +polytheist +polythene +polytomy +polytonality +polyunsaturate +polyurethane +polyuria +polyvalence +polyvinyl +polyvinylpyrrolidone +polyvoltine +polyzoan +polyzoarium +pomace +pomade +pomander +pomatum +pombe +pome +pomegranate +pomelo +pomey +pomfret +pomiculture +pomiculturist +pommel +pommy +pomologist +pomology +pomp +pompadour +pompano +pompom +pompon +pomposity +ponce +ponceau +poncho +pond +ponderer +ponderosity +ponderousness +pondokkie +pondweed +pone +pong +pongee +pongid +poniard +ponograph +pons +pont +pontage +pontianak +pontic +ponticello +pontifex +pontiff +pontil +pontlevis +pontonier +pontoon +pony +ponytail +pooch +pood +poodle +pooftah +pooka +pool +poolroom +poon +poonce +poorhouse +poorness +poort +poortith +poove +popcorn +pope +popedom +popery +popgun +popie +popinac +popinjay +popishness +poplar +poplin +popliteus +popover +poppa +poppadom +popper +poppet +poppethead +poppy +poppycock +poppyhead +popsy +populace +popularisation +populariser +popularity +popularization +popularizer +population +populist +populousness +por +porbeagle +porcelain +porcelainization +porcelaneous +porch +porcupine +porgy +porion +porism +pork +porkchop +porker +porkfish +porkiness +porkpie +pornocracy +pornographer +pornography +porosity +porousness +porphyria +porphyrin +porphyrisation +porphyrization +porphyrogenite +porphyropsin +porphyry +porpoise +porrection +porridge +porringer +port +portage +portal +portamento +portance +portcullis +portent +portentousness +porter +porterage +porterhouse +portfire +portfolio +porthole +portiare +portico +portiere +portion +portioner +portliness +portmanteau +portolano +portrait +portraitist +portraiture +portrayal +portrayer +portulaca +pos +posada +poser +poseur +posho +positif +position +positivism +positron +positronium +posologist +posology +posse +possession +possessiveness +possessor +possessoriness +possessorship +posset +possibility +possie +possum +possy +post +postabdomen +postact +postage +postarmistice +postbag +postbox +postboy +postbrachium +postcard +postcava +postcode +postcommunion +postconfinement +postcontract +postembryonic +poster +posterity +postern +postexistence +postfactor +postgraduate +posthumousness +postie +postil +postilion +postimpressionism +posting +postlegitimation +postliminy +postlude +postman +postmark +postmarriage +postmaster +postmastership +postmillennialism +postmillennialist +postmistress +postnotum +postposition +postredemption +postremogeniture +postresurrection +postrider +postscript +postscutellum +postsigner +postulant +postulantship +postulation +postulator +posture +posturer +posy +pot +potability +potableness +potage +potamogale +potamology +potamoplankton +potash +potass +potassa +potassium +potation +potato +potbelly +potboiler +potboy +potch +poteen +potence +potency +potentate +potentiality +potentiation +potentiator +potentilla +potentiometer +potentness +potful +pothead +pothecary +potheen +pother +potherb +potholder +pothole +potholer +potholing +pothook +pothouse +pothunter +pothunting +potiche +potion +potlatch +potlicker +potlikker +potline +potluck +potman +potometer +potoo +potoroo +potpie +potpourri +potsherd +potstone +potsy +pott +pottage +potter +pottery +pottle +potto +potus +pouch +poudrin +pouf +poulard +poult +poulterer +poultice +poultry +poultryman +poundage +poundal +pounder +pourability +pourboire +pourer +pourparler +pourpoint +poussette +poussie +poussin +pouter +poverty +powan +powder +power +powerboat +powerfulness +powerhouse +powerlessness +powwow +pox +poyntell +pozzuolana +pozzy +pp +ppd +pph +ppl +ppm +pq +pr +praam +pracharak +pracieuse +pracis +practicality +practicalness +practice +practicer +practicum +practitioner +prad +praecipitatio +praediality +praefect +praelection +praelector +praemunire +praencipe +praenomen +praepostor +praetexta +praetor +praetorianism +praetorship +pragmaticality +pragmaticalness +pragmaticism +pragmatics +pragmatism +pragmatist +prahm +prahu +prairie +prairillon +praise +praiseworthiness +prajna +praline +pralltriller +pram +prana +pranava +prancer +prand +prang +pranidhana +prank +prankishness +prankster +prao +prase +praseodymium +prat +prater +pratfall +pratincole +pratique +prattler +prau +pravenance +prawn +prawner +praxis +prayer +prayerfulness +prayerlessness +preabundance +preacceptance +preaccess +preaccommodation +preaccomplishment +preaccord +preaccordance +preaccumulation +preaccusation +preacher +preachment +preacidity +preacknowledgement +preacknowledgment +preacness +preacquaintance +preacquisition +preacquisitiveness +preacquittal +preaction +preactiveness +preactivity +preadamite +preadaptation +preaddition +preaddress +preadequacy +preadequateness +preadherence +preadjournment +preadjustment +preadministration +preadministrator +preadmirer +preadmission +preadmonition +preadoption +preadornment +preadulthood +preadvertisement +preadvertiser +preadvice +preadvocacy +preadvocate +preaemptor +preaexistence +preaffection +preaffidavit +preaffiliate +preaffiliation +preaffirmation +preaffliction +preafternoon +preaggravation +preaggression +preaggressiveness +preagitation +preagreement +preagriculture +prealgebra +preallegation +prealliance +preallotment +preallowance +preallusion +preally +prealteration +preamalgamation +preambition +preamble +preamplifier +preanesthetic +preannouncement +preannouncer +preantiquity +preappearance +preapperception +preapplication +preappointment +preapprehension +preapprobation +preapproval +preaptitude +prearrangement +prearrestment +preascertainment +preassembly +preassumption +preassurance +preattachment +preavowal +prebankruptcy +prebarbarousness +prebelief +prebeliever +prebend +prebendary +prebenediction +prebeneficiary +prebestowal +prebetrayal +prebid +preblockade +preboast +preborrowing +preboyhood +prebudget +precalculation +precampaign +precancellation +precandidacy +precandidature +precanning +precapitalist +precaptivity +precariousness +precaution +precedence +precedency +precedent +precelebrant +precelebration +precensus +precentor +precentorship +precept +preceptor +preceptorship +preceptory +preceremony +precertification +precession +prechampionship +prechildhood +prechoice +precinct +preciosity +precipice +precipitancy +precipitateness +precipitation +precipitator +precipitin +precipitousness +precirculation +precis +preciseness +precisian +precisianism +precision +precitation +precivilization +preclaimant +preclaimer +preclassification +precleaner +preclimax +preclosure +precociousness +precocity +precogitation +precognition +precoiler +precoincidence +precollapsibility +precollection +precollector +precollege +precollusion +precolor +precoloration +precolour +precolouration +precombat +precombatant +precombination +precombustion +precommand +precomment +precommunication +precomparison +precompensation +precompilation +precompiler +precompleteness +precompletion +precompliance +precomplication +precomprehension +precomprehensiveness +precompression +precompulsion +precomradeship +preconcealment +preconcentration +preconception +preconcern +preconcernment +preconcertedness +preconcession +preconclusion +preconcurrence +precondemnation +precondensation +precondition +preconduction +preconductor +preconference +preconfession +preconfiguration +preconfinement +preconfirmation +preconformity +preconfusion +precongestion +precongratulation +preconise +preconization +preconizer +preconnection +preconquest +preconsecration +preconsent +preconsideration +preconsolidation +preconspiracy +preconspirator +preconstituent +preconstruction +preconsultation +preconsultor +preconsumer +preconsumption +precontemplation +precontemporaneity +precontention +precontentment +precontest +precontract +precontribution +precontrivance +precontrol +precontroversy +preconvention +preconversation +preconversion +preconveyance +preconviction +precooler +precopy +precoronation +precorrection +precorrectness +precorrespondence +precorridor +precorruption +precorruptness +precounsel +precounsellor +precreation +precreditor +precreed +precriticism +precultivation +preculture +precure +precurriculum +precursor +precurtain +precyclone +pred +predamage +predamnation +predarkness +predata +predation +predatism +predator +preday +predaylight +predaytime +predealer +predealing +predeath +predebate +predebater +predebit +predebtor +predeceiver +predeception +predecessor +predecision +predeclaration +predeclination +prededication +prededuction +predefault +predefeat +predefect +predefence +predefense +predefiance +predeficiency +predefinition +predegeneracy +predegree +predelay +predelegate +predelegation +predeliberation +predelineation +predelinquency +predelivery +predella +predelusion +predemocracy +predemonstration +predeparture +predependence +predepletion +predeposit +predepository +predepreciation +predepression +predeprivation +prederivation +predescent +predescription +predeserter +predesertion +predespondency +predestinarian +predestinarianism +predestination +predestitution +predestruction +predetachment +predetainer +predetection +predetention +predetermination +predeterminer +predevelopment +predevotion +prediagnosis +predicability +predicableness +predicament +predication +predictability +prediction +predictiveness +predictor +prediet +predifficulty +predigestion +predikant +predilection +prediminishment +prediminution +predinner +prediploma +prediplomacy +predirection +predirector +predisagreement +predisappointment +predisaster +prediscernment +predischarge +predisclosure +prediscontent +prediscontentment +prediscount +prediscouragement +prediscourse +prediscoverer +prediscovery +prediscrimination +prediscriminator +prediscussion +predisgrace +predisguise +predisgust +predislike +predismissal +predisorder +predispatch +predispatcher +predispersion +predisplacement +predisplay +predisposal +predisposedness +predisposition +predisputant +predisputation +predispute +predisruption +predissatisfaction +predissolution +predistortion +predistress +predistribution +predistributor +predistrict +predistrust +predisturbance +prediversion +predivider +predivinity +predivision +predivorce +predivorcement +prednisone +predoctorate +predominance +predomination +predominator +predonation +predonor +predormition +predoubt +predoubter +predraft +predrawer +predread +predriller +predriver +preduplication +predusk +predynastic +preedition +preeditor +preeducation +preeffect +preeffort +preelection +preeligibility +preeligibleness +preelimination +preeliminator +preemancipation +preembarrassment +preembodiment +preemie +preeminence +preemotion +preemperor +preemployee +preemployer +preemployment +preemption +preemptor +preenaction +preenclosure +preencounter +preencouragement +preendeavor +preendorsement +preendorser +preener +preenforcement +preenjoyment +preenlargement +preenlightener +preenlightenment +preenlistment +preenrollment +preentailment +preentertainer +preentertainment +preenthusiasm +preentrance +preentry +preenumeration +preenvelopment +preepidemic +preequalization +preequipment +preequity +preerection +preeruption +preescape +preessay +preessential +preestimate +preestimation +preeternity +preevaporation +preevaporator +preevasion +preevidence +preevolutionist +preexaction +preexamination +preexaminer +preexception +preexcitation +preexclusion +preexcursion +preexecution +preexecutor +preexemption +preexhaustion +preexhibit +preexhibition +preexhibitor +preexistence +preexpansion +preexpectant +preexpectation +preexpedition +preexpenditure +preexpense +preexperience +preexperiment +preexpiration +preexplanation +preexplosion +preexposition +preexposure +preexpounder +preexpression +preextent +preextinction +preextinguishment +preextraction +pref +prefab +prefabrication +prefabricator +preface +prefacer +prefactor +prefamiliarity +prefavor +prefavorite +prefeast +prefect +prefecture +prefecundation +preferability +preferableness +preference +preferentialist +preferment +prefermentation +preferredness +preferrer +prefertility +prefertilization +prefestival +prefeudalism +prefiguration +prefigurativeness +prefigurement +prefiller +prefix +prefixion +preflavor +preflight +preforgiveness +preformation +preformulation +prefoundation +prefounder +prefrankness +prefraud +prefreshman +prefriendship +prefulfillment +prefunction +prefurlough +pregainer +pregeneration +pregirlhood +pregnability +pregnancy +pregnantness +pregraduation +pregranite +pregratification +pregrievance +pregrowth +preguarantee +preguarantor +preguess +preguidance +preguilt +prehandicap +prehardener +preharmoniousness +preharmony +preharvest +prehatred +prehearing +preheater +prehension +prehesitancy +prehesitation +prehistorian +prehistory +prehnite +preholder +preholding +prehominid +prehostility +prehumor +prehunger +preidea +preidentification +preignition +preilium +preillumination +preillustration +preimage +preimagination +preimitation +preimmigration +preimpairment +preimport +preimportance +preimportation +preimposition +preimpression +preimprovement +preincentive +preinclination +preinclusion +preincorporation +preincrease +preindebtedness +preindemnification +preindemnity +preindependence +preindication +preindisposition +preinducement +preinduction +preindulgence +preindustry +preinfection +preinference +preinflection +preinfliction +preinfluence +preinhabitant +preinhabitation +preinheritance +preinitiate +preinitiation +preinquisition +preinscription +preinsertion +preinsinuation +preinspection +preinspector +preinstallation +preinstillation +preinstruction +preinsulation +preinsurance +preintelligence +preintention +preintercession +preinterchange +preintercourse +preinterest +preinterpretation +preinterview +preintimation +preinvention +preinventory +preinvestigation +preinvestigator +preinvestment +preinvitation +preinvocation +preinvolvement +preirrigation +preissuance +preissue +prejudgement +prejudger +prejudgment +prejudice +prejurisdiction +prejustification +prekindergarten +preknowledge +prelabel +prelabor +prelacy +prelate +prelateship +prelatism +prelatist +prelature +prelawfulness +prelease +prelection +prelecture +prelegend +preliability +prelibation +preliberality +preliberation +prelicense +prelim +prelimit +preliquidation +preliterature +prelitigation +preloan +preloss +prelude +preluder +preluxuriousness +prem +premadness +premaintenance +premaker +premanhood +premanifestation +premankind +premarriage +premastery +prematch +premate +prematernity +prematureness +prematurity +premaxilla +premeasurement +premedian +premedication +premeditatedness +premeditation +premeditator +prememorandum +premenace +premention +premidnight +premidsummer +premie +premier +premiere +premiership +premillenarian +premillenarianism +premillennialism +premillennialist +preministry +premisrepresentation +premiss +premium +premixer +premixture +premodification +premold +premolder +premonition +premonopoly +premorality +premorbidness +premortification +premuddle +premunition +premutiny +prenegligence +prenegotiation +prenomen +prenomination +prenotion +prentice +preobedience +preobjection +preobligation +preoblongata +preobservance +preobservation +preobstruction +preobtrusion +preobviousness +preocclusion +preoccultation +preoccupancy +preoccupant +preoccupation +preoccupiedness +preoccupier +preoccurrence +preoffensiveness +preoffer +preomission +preoperation +preoperator +preopinion +preopposition +preoppression +preoppressor +preoption +preorder +preordinance +preorganization +preoutline +preoverthrow +prep +preparation +preparator +preparedness +preparental +preparticipation +prepartition +prepartnership +prepatent +prepavement +prepayment +prepeduncle +prepenetration +prepersuasion +prepetition +preplacement +prepolish +prepollex +preponderance +preportrayal +preposition +prepositor +prepossessingness +prepossession +preposterousness +prepostor +prepotency +prepreparation +preprimer +preprint +preprohibition +prepromise +prepromotion +prepronouncement +preprovision +preprovocation +prepsychology +prepubis +prepublication +prepuce +prepunishment +prepupa +prepurchase +prepurchaser +prequalification +prequarantine +prequotation +prereadiness +prerealization +prereceiver +prerecital +prereckoning +prerecognition +prerecommendation +prereconcilement +prereconciliation +preredemption +prereference +prerefinement +prerefusal +preregistration +prerejection +prerelation +prerelationship +prerelease +prereluctance +preremittance +preremorse +preremoval +preremuneration +prerental +prereport +prerepresentation +prerequest +prerequirement +preresemblance +preresolution +prerespectability +prerespiration +preresponsibility +prerestraint +prerestriction +prereturn +prerevelation +prerevenge +prereversal +prereverse +prereview +prerevision +prerevival +prerighteousness +prerogative +preromanticism +preroyalty +pres +presa +presacrifice +presage +presager +presanctification +presatisfaction +presavagery +presbycusis +presbyope +presbyopia +presbyter +presbyterate +presbytery +prescience +prescriber +prescript +prescription +prescriptiveness +prescriptivism +preseal +presearch +preseason +preselection +preselector +presence +presenility +presentability +presentableness +presentation +presentationalism +presentationism +presentationist +presentee +presentiment +presentist +presentiveness +presentment +preseparation +preseparator +preservability +preservation +preservative +preserver +presession +presettlement +preshadow +preshape +preshare +preshipment +preshortage +presidency +president +presidentship +presider +presidio +presidium +presignal +presocialism +presocialist +presolicitation +presolution +presound +prespecialist +prespecification +prespeculation +pressboard +presser +pressie +pressingness +pressman +pressmark +pressoreceptor +pressroom +pressrun +pressure +pressurization +presswork +prestamp +prestandard +prestandardization +presteel +prestidigitation +prestidigitator +prestige +prestimulation +prestimulus +prestissimo +prestock +prestorage +prestrain +prestruggle +prestudiousness +presubjection +presubmission +presubordination +presubscriber +presubscription +presubsistence +presubstitution +presuccess +presufficiency +presuffrage +presuggestion +presuitability +presumer +presumption +presumptuousness +presuperintendence +presuperintendency +presupervision +presupervisor +presupplication +presupply +presupport +presupremacy +presurmise +presurrender +presurvey +presusceptibility +presuspension +presuspicion +presuspiciousness +preswallow +presympathy +presymphony +presymptom +presystole +pret +preta +pretabulation +pretariff +pretarsus +pretaste +pretaster +pretemptation +pretence +pretender +pretense +pretension +preterist +preterit +preterite +preteriteness +preterition +preteritness +pretermission +pretermitter +preternaturalism +preternaturality +preternaturalness +pretestimony +pretext +pretexta +prethrust +pretimeliness +pretincture +pretoken +pretor +pretournament +pretrace +pretraining +pretransaction +pretranscription +pretranslation +pretransmission +pretransportation +pretravel +prettification +prettifier +prettiness +pretyranny +pretzel +preutilization +prevacation +prevaccination +prevailingness +prevalence +prevalentness +prevalidity +prevaluation +prevariation +prevaricator +prevegetation +prevenance +preventer +prevention +preventiveness +preventorium +preventure +preverification +preversion +preview +previgilance +previolation +previsibility +prevision +previsit +previsitor +previsor +prevogue +prevoidance +prevolunteer +prevote +prewarrant +prewash +prewelcome +prewillingness +prewitness +preworldliness +preworship +preworthiness +prewound +prexy +prey +preyer +priapism +priapitis +price +pricelessness +pricer +pricket +pricking +prickle +prickleback +prickspur +pride +pridefulness +prier +primacy +primage +primaquine +primariness +primate +primateship +primatologist +primatology +primavera +primely +primeness +primer +primero +primigravida +primine +priming +primipara +primitiveness +primitivism +primitivist +primitivity +primness +primo +primogenitor +primogeniture +primogenitureship +primordiality +primordium +primrose +primula +primus +prince +princedom +princekin +princeliness +princeling +princeship +princess +principality +principalship +principate +principe +principium +principle +prinker +printability +printableness +printer +printery +printing +printmaker +printmaking +prion +priorate +priority +priorship +priory +prisage +prisiadka +prism +prismatoid +prismoid +prison +prisoner +prissiness +priv +privacy +privatdocent +privateer +privateness +privation +privet +privilege +privileger +privity +prize +prizefight +prizefighter +prizefighting +prn +proa +proabolitionist +proaccelerin +proagon +proanarchism +proarbitrationist +prob +probabilism +probability +proband +probang +probate +probation +probationer +probationership +prober +probity +problem +proboscis +proc +procaine +procambium +procapitalist +procarp +procathedral +procbal +procedure +proceeder +proceeding +procellas +process +procession +processor +prochlorite +prochoos +prochronism +proclaimer +proclamation +proclivity +procollectivism +procommunism +proconstitutionalism +proconsul +proconsulate +procrastination +procrastinativeness +procrastinator +procreant +procreation +procreativeness +procreator +proctoclysis +proctodaeum +proctodeum +proctologist +proctology +proctor +proctorship +proctoscope +proctoscopy +procuracy +procurance +procuration +procurator +procuratorate +procuratorship +procuratory +procurement +procurer +prodd +prodder +prodigiousness +prodigy +prodomos +prodrome +producer +product +production +productiveness +productivity +proem +proempiricism +proempiricist +proenzyme +proestrus +prof +profaneness +profanity +profascism +profeminism +profeminist +proferment +profert +profession +professionalisation +professionalism +professionalization +professionless +professor +professorate +professoriate +professorship +profferer +proficiency +proficientness +profile +profiler +profit +profitability +profitableness +profiteer +profiterole +profligateness +profoundness +profunda +profundity +profuseness +profusion +profusiveness +progenitiveness +progenitor +progeny +progesterone +progestin +proglottis +prognosis +prognostication +program +programme +programmer +progress +progression +progressionism +progressionist +progressism +progressist +progressiveness +progressivist +prohibiter +prohibition +prohibitionist +prohibitiveness +prohibitor +project +projectile +projection +projectionist +projectivity +projector +projet +prolactin +prolamin +prolamine +prolan +prolapse +prolateness +prolation +prole +proleg +prolegomenon +prolepsis +proletarianization +proletarianness +proletariat +proletarization +prolicide +proliferation +proline +prolixity +prolixness +prolocutor +prolocutorship +prologist +prologue +prologuiser +prologuist +prologuizer +prologus +prolongation +prolonge +prolonger +prolongment +prolusion +prom +promazine +promenade +promenader +prometacenter +promethazine +promethium +prominence +promiscuity +promiscuousness +promisee +promiser +promisor +promonarchist +promontory +promoter +promotion +promotiveness +promptbook +prompter +promptitude +promptness +promulgation +promulgator +promulger +promycelium +pronaos +pronation +pronationalism +pronator +proneness +pronephros +prong +pronghorn +pronotum +pronoun +pronounceableness +pronouncedness +pronouncement +pronouncer +pronucleus +pronunciamento +pronunciation +proof +proofing +proofreader +propacifism +propacifist +propaedeutic +propagability +propagableness +propaganda +propagandism +propagandist +propagation +propagator +propagule +propagulum +propane +propapist +propatriotism +propellant +propeller +propene +propenol +propensity +properness +property +prophage +prophase +prophecy +prophesier +prophet +propheticality +propheticalness +prophylaxis +propinquity +propionaldehyde +propionate +propitiousness +propjet +propman +propolis +proponent +proportion +proportionability +proportionableness +proportionality +proportionateness +proportioner +proportionment +proposal +proposer +proposition +propositus +propr +propraetor +propranolol +proprietor +proprietorship +propriety +proprioceptor +proptosis +propulsion +propyl +propylaea +propylaeum +propylene +propylhexedrine +propylite +prorealism +proreality +prorogation +proromanticism +pros +prosaicness +prosaism +proscenium +proscholasticism +prosciutto +proscriber +proscription +prose +prosector +prosecution +prosecutor +proselyte +proselyter +proselytisation +proselytiser +proselytism +proselytization +prosencephalon +prosenchyma +proser +prosimian +proslaver +proslaveryism +prosodist +prosody +prosopopoeia +prospect +prospectiveness +prospector +prospectus +prosperity +prosperousness +prosphora +prosphoron +pross +prosser +prostaglandin +prostas +prostasis +prostate +prostatectomy +prostatitis +prosternum +prosthesis +prosthetics +prosthetist +prosthion +prosthodontics +prosthodontist +prostitute +prostitution +prostitutor +prostomium +prostoon +prostration +prostrator +prosyndicalism +prosyndicalist +protactinium +protagonism +protagonist +protamine +protandry +protanomaly +protanope +protanopia +protasis +protea +protease +protection +protectionism +protectionist +protector +protectorate +protectorship +protectory +protege +protein +proteinase +proteinuria +proteolysis +proteose +proterandrousness +proterandry +proterogyny +proterotype +protest +protestation +protester +prothalamion +prothalamium +prothallus +prothesis +prothonotary +prothorax +prothrombin +protist +protistology +protium +protoactinium +protochordate +protocol +protogine +protogyny +protohistory +protohuman +protolanguage +protolog +protomartyr +protomorph +proton +protonema +protonotary +protopathy +protopectin +protophloem +protoplasm +protoplast +protopope +protopresbyter +protostar +protostele +prototype +protoxide +protoxylem +protozoan +protozoologist +protozoology +protozoon +protozoulogist +protractedness +protractility +protraction +protractor +protrusion +protuberancy +proturan +protyle +proudness +prounionism +proustite +prov +provability +provableness +provenance +provender +provenience +proventriculus +prover +proverb +providence +providentness +provider +province +provincialism +provinciality +provision +provisionality +provisionalness +provisioner +proviso +provitamin +provocation +provocativeness +provokingness +provolone +provost +provostship +prow +prowess +prowfish +prowler +prox +proximateness +proximation +proximity +proxy +prp +prs +prude +prudence +prudery +prudishness +prunability +prunableness +prune +prunella +prunelle +pruner +prunt +prurience +pruriency +prurigo +pruritus +prussianisation +prussianiser +prussianization +prussianizer +prussiate +pruta +prutah +pryer +pryingness +prytaneum +prythee +ps +psalm +psalmbook +psalmist +psalmodist +psalmody +psalterium +psaltery +psammite +psammosere +pschent +psec +psellism +psephite +psephologist +psephology +pseud +pseudamphora +pseudaxis +pseudepigrapha +pseudoacquaintance +pseudoacromegaly +pseudoamateurism +pseudoanemia +pseudoappendicitis +pseudobrachium +pseudocarp +pseudocercaria +pseudocercus +pseudoclassicality +pseudoclassicism +pseudocoel +pseudoconcha +pseudocosta +pseudocyclosis +pseudocyesis +pseudocyphella +pseudodementia +pseudoderm +pseudoedema +pseudogenus +pseudohemophilia +pseudohermaphrodite +pseudohermaphroditism +pseudolabium +pseudolegality +pseudoleucite +pseudoleucocyte +pseudolunula +pseudolunule +pseudomalaria +pseudomemory +pseudometric +pseudoministry +pseudomonas +pseudomorph +pseudomorphism +pseudomutuality +pseudonym +pseudonymity +pseudonymousness +pseudoparalysis +pseudophone +pseudopodium +pseudoscope +pseudoscopy +pseudoscorpion +pseudosphere +pseudovary +psf +psi +psia +psid +psilanthropist +psilocybin +psilomelane +psittacinite +psittacosis +psoas +psocid +psoralea +psoriasis +psorosis +psychasthenia +psychataxia +psyche +psychedelia +psychiatrist +psychiatry +psycho +psychoacoustics +psychoanal +psychoanalysis +psychoanalyzer +psychobiologist +psychobiology +psychochemical +psychodiagnosis +psychodiagnostics +psychodrama +psychodynamics +psychogalvanometer +psychogenesis +psychognosis +psychographer +psychohistory +psychokinesis +psychol +psycholinguistics +psychologism +psychologist +psychology +psychomancy +psychometrician +psychometrics +psychometrist +psychometry +psychoneurosis +psychopath +psychopathist +psychopathologist +psychopathology +psychopathy +psychopharmacology +psychophysics +psychophysiologist +psychophysiology +psychopomp +psychoprophylaxis +psychosis +psychosomatics +psychosurgery +psychotechnics +psychotechnology +psychotherapeutist +psychotherapist +psychotherapy +psychrometer +psychrometry +psychrophile +psyllid +pt +ptarmigan +pteranodon +pteridologist +pteridology +pteridophyte +pteridosperm +pterodactyl +pteroma +pteron +pteropod +pterosaur +pterygium +pteryla +pterylography +pterylology +pterylosis +ptg +ptilosis +ptisan +ptochocracy +ptomaine +ptosis +ptp +pts +ptyalectasis +ptyalin +ptyalism +pub +puberty +pubis +publ +publican +publication +publicist +publicity +publicness +publicute +publisher +publishing +publishment +puca +puccoon +puce +puck +puckerer +pudding +puddingwife +puddle +puddler +puddling +puddock +pudency +pudendum +pudginess +pueblo +puerilism +puerility +puerpera +puerperium +puff +puffball +puffbird +puffer +puffery +puffin +pug +pugaree +pugdog +puggaree +pugginess +pugging +puggree +pugilism +pugnaciousness +pugnacity +puirness +puissance +puja +puku +pul +pulchritude +pulchritudinous +puler +puli +pulka +pullet +pulley +pullover +pullus +pulp +pulpboard +pulpit +pulpiteer +pulpitum +pulpwood +pulque +pulsar +pulsatility +pulsation +pulsator +pulse +pulsebeat +pulsejet +pulsimeter +pulsojet +pulsometer +pulu +pulverisation +pulveriser +pulverization +pulverizer +pulverulence +pulvillus +pulvinus +puma +pumice +pumicer +pump +pumpernickel +pumping +pumpkin +pumpkinseed +pumpman +pumpwell +pun +puna +punchball +punchboard +punchbowl +puncheon +puncher +punctation +punctilio +punctiliousness +punctuality +punctualness +punctuation +punctuator +puncture +pundit +pung +pungency +pungy +puniness +punisher +punishment +punitiveness +punk +punka +punkah +punkie +punner +punnet +punster +punt +punter +puntilla +puntillero +punty +pup +pupa +puparium +pupil +pupillage +puppet +puppeteer +puppetry +puppy +puppydom +puppyfoot +puppyhood +purae +purblindness +purchaser +purdah +puree +pureness +purfle +purfler +purga +purgation +purgative +purgatory +purger +purificator +purine +purism +purist +puritan +puritanicalness +purity +purl +purler +purlieu +purlin +purloiner +purpart +purparty +purple +purpleheart +purpleness +purplishness +purpose +purposelessness +purposiveness +purpresture +purpura +purpure +purpurin +purree +purse +purser +pursiness +purslane +pursuance +pursuer +pursuit +pursuivant +purtenance +purulence +purusha +purveyance +purveyor +purview +pus +pushball +pushcard +pushcart +pushchair +pusher +pushiness +pushingness +pushover +pushpin +pushrod +pusillanimity +puss +pussley +pustulation +pustule +putamen +putlog +putrefaction +putrefier +putrescence +putrescency +putrescibility +putrescine +putridity +putridness +putrilage +putt +puttee +putter +puttie +puttier +putto +putty +puttying +puttyroot +puzzledness +puzzlement +puzzler +puzzlingness +puzzolana +pwr +pwt +pya +pyaemia +pycnidium +pycniospore +pycnometer +pye +pyelitis +pyelography +pyelonephritis +pyelonephrosis +pyemia +pygidium +pygmy +pygmyism +pyin +pyjama +pylon +pylorectomy +pylorus +pyoderma +pyogenesis +pyometra +pyonephritis +pyopericardium +pyophthalmia +pyorrhea +pyorrhoea +pyosalpinx +pyosepticemia +pyosis +pyothorax +pyracantha +pyralid +pyramid +pyramidion +pyran +pyranometer +pyrargyrite +pyrazole +pyrazoline +pyrazolone +pyre +pyrene +pyrenocarp +pyrenoid +pyrethrin +pyrethrum +pyretologist +pyretology +pyretotherapy +pyrexia +pyrheliometer +pyridine +pyridoxal +pyridoxamine +pyridoxine +pyrimidine +pyrite +pyrites +pyritohedron +pyrobi +pyrobitumen +pyrocatechol +pyrochlore +pyroconductivity +pyroelectricity +pyrogallate +pyrogallol +pyrogen +pyrographer +pyrography +pyrologist +pyrology +pyrolusite +pyrolysis +pyromancer +pyromancy +pyromania +pyromaniac +pyrometallurgy +pyrometer +pyrometry +pyromorphite +pyrone +pyrope +pyrophosphate +pyrophotometer +pyrophyllite +pyrosis +pyrostat +pyrosulfate +pyrosulphate +pyrotechnics +pyrotoxin +pyroxene +pyroxenite +pyroxylin +pyrrhic +pyrrhotite +pyrrhuloxia +pyrrole +pyrrolidine +pythogenesis +python +pythoness +pyuria +pyx +pyxidium +pyxie +pyxis +q +qadi +qaf +qaid +qasida +qat +qe +qh +qibla +qid +qintar +ql +qoph +qp +qr +qt +qto +qtr +qu +quackery +quacksalver +quad +quadra +quadragenarian +quadrangle +quadrangular +quadrant +quadraphonics +quadrat +quadrate +quadratic +quadratics +quadrature +quadrel +quadrella +quadrennium +quadricentennial +quadriceps +quadricycle +quadricycler +quadricyclist +quadriga +quadrigatus +quadrilateralness +quadrille +quadrillion +quadrinomial +quadriplegia +quadriplegic +quadrireme +quadrisection +quadrisyllable +quadrivalence +quadrivalency +quadrivium +quadroon +quadrumane +quadruped +quadrupedism +quadrupleness +quadruplet +quadruplicity +quaere +quaestor +quaestorship +quaffer +quag +quagga +quagmire +quahog +quaich +quail +quaintness +quakiness +quale +qualification +qualifiedness +qualifier +qualimeter +quality +qualm +qualmishness +quamash +quandary +quandong +quango +quant +quanta +quantic +quantifier +quantitativeness +quantitiveness +quantity +quantization +quantong +quantum +quarantine +quarantiner +quark +quarrel +quarreler +quarreller +quarrelsomeness +quarrian +quarrier +quarry +quarryman +quart +quarte +quarter +quarterage +quarterback +quarterdeck +quarterer +quarterfinal +quarterfinalist +quartering +quarterlight +quartermaster +quartermastership +quartern +quarterpace +quarterstaff +quartet +quartile +quarto +quartz +quartzite +quasar +quass +quassia +quatercentenary +quaternion +quaternity +quatorze +quatrain +quatre +quatrefoil +quattrocento +quaverer +quay +quayage +quayside +quean +queasiness +quebracho +quebrada +queen +queencake +queendom +queenfish +queenhood +queening +queenliness +queller +quelquechose +quenchableness +quencher +quenchlessness +quenelle +quercetin +quercitron +querist +quern +quersprung +query +ques +quest +quester +question +questionability +questionableness +questionary +questioner +questionnaire +questor +questorship +quetsch +quetzal +queue +queuer +quey +quibbler +quiche +quickhatch +quickie +quicklime +quickness +quicksand +quickset +quicksilver +quickstep +quickwittedness +quickwork +quid +quiddity +quidnunc +quiescence +quiescency +quietener +quieter +quietism +quietist +quietness +quietude +quietus +quiff +quill +quillai +quiller +quillet +quillfish +quilling +quillon +quillwort +quilt +quilter +quilting +quim +quin +quinacrine +quinarius +quinazoline +quince +quincentenary +quincunx +quincy +quindecagon +quindecaplet +quinhydrone +quinia +quinidine +quinine +quinoa +quinoid +quinoidine +quinol +quinoline +quinone +quinonimine +quinoxaline +quinquagenarian +quinquagenary +quinquecentenary +quinquefoil +quinquennium +quinquereme +quinquevalence +quinquevalency +quinsy +quint +quintain +quintal +quintant +quinte +quintessence +quintet +quintile +quintillion +quintillionth +quinton +quintuplet +quintuplication +quinua +quinze +quip +quippishness +quipster +quipu +quire +quirk +quirkiness +quirt +quisling +quist +quitch +quitclaim +quitrent +quittance +quittor +quiverer +quiverful +quixotism +quiz +quizmaster +quizzer +quizzicality +quizzicalness +quod +quodlibet +quodlibetz +quoin +quoit +quokka +quor +quorum +quot +quota +quotation +quoter +quoteworthy +quotid +quotidianness +quotient +r +rab +rabal +rabato +rabban +rabbet +rabbi +rabbin +rabbinate +rabbinism +rabbit +rabbiter +rabbitfish +rabbitoh +rabbitry +rabble +rabblement +rabbler +rabi +rabidity +rabidness +rabies +raccoon +race +racecard +racecourse +racegoer +racehorse +raceme +racemism +racemization +racemule +racer +racerunner +racetrack +raceway +rachauffa +rachilla +rachis +rachitis +racialism +racialist +racinage +raciness +racist +rack +rackboard +racket +racketeer +rackets +rackett +rackwork +racon +raconteur +racoon +racquet +rad +radar +radarman +radarscope +raddleman +radeau +radectomy +radian +radiance +radiancy +radiation +radiator +radicalism +radicalness +radicand +radicel +radices +radicle +radiculitis +radii +radio +radioactinium +radioactivity +radioautograph +radioautography +radiobiologist +radiobiology +radiobroadcast +radiobroadcaster +radiocarbon +radiochemist +radiochemistry +radiocommunication +radiodiagnosis +radioelement +radiogram +radiograph +radiographer +radiography +radioiron +radioisotope +radiolarian +radiolocation +radiologist +radiology +radiolucence +radiolucency +radioluminescence +radiolysis +radioman +radiometeorograph +radiometer +radiometry +radiomicrometer +radionuclide +radiopacity +radiophare +radiophone +radiophotograph +radiophotography +radioscope +radioscopy +radiosonde +radiostrontium +radiosurgery +radiotelegram +radiotelegraphy +radiotelemetry +radiotelephone +radiotelephony +radioteletype +radiotherapist +radiotherapy +radiothermy +radiothorium +radiotracer +radiotransparency +radiotransparent +radiov +radish +radium +radius +radix +radome +radon +radula +raff +raffee +raffia +raffinate +raffinose +raffishness +raffle +raffles +rafflesia +rafraochissoir +raft +rafter +rag +raga +ragamuffin +ragbag +ragbolt +rage +ragfish +raggedness +raggle +ragi +ragisseur +raglan +ragman +ragout +ragpicker +ragtag +ragtime +ragweed +ragwork +ragworm +ragwort +raia +raid +raider +rail +railcar +railer +railhead +railing +raillery +railroad +railroader +railroading +railway +railwayman +raiment +rain +rainband +rainbird +rainbow +raincheck +raincoat +raindrop +rainfall +rainforest +raininess +rainlessness +rainmaker +rainmaking +rainout +rainstorm +rainwater +rainwear +raiser +raisin +raising +raj +rajah +rajas +rake +rakee +rakehell +raker +raki +rakishness +rale +rall +rallier +rallycross +rallye +ram +ramark +rambla +rambler +ramblingness +rambutan +ramekin +ramentum +rami +ramie +ramification +ramjet +rammer +rammishness +ramon +ramoulade +ramp +rampager +rampart +rampike +rampion +ramrod +ramshackleness +ramson +ramtil +ramus +rance +ranch +rancher +rancherie +ranchero +ranchman +rancho +rancidity +rancidness +rancorousness +rancour +rand +randan +randomness +ranee +range +rangefinder +ranger +rangpur +rani +rank +ranker +rankness +ransacker +ranseur +ransom +ransomer +ranter +ranula +ranunculus +raob +rapaciousness +rapacity +rapatiteur +rapeoil +rapeseed +raphe +raphia +raphide +rapidity +rapier +rapine +raploch +rapparee +rappee +rapper +rapping +rapport +rapporteur +rapprochement +rapscallion +raptor +rapture +rapturousness +raptus +rarebit +rarefaction +rarefier +rareness +rarity +rasa +rasbora +rascal +rascality +rascasse +raser +rasher +rasistant +rasistante +rason +rasophore +rasp +raspatory +raspberry +rasper +raspingness +rasse +raster +rasuma +rasure +rat +rata +ratability +ratableness +ratafia +ratal +ratan +rataplan +ratatouille +ratbag +ratbaggery +ratcatcher +ratch +ratchet +rate +rateability +rateableness +rateen +ratel +ratepayer +rater +ratfink +ratfish +ratha +ratheness +rathole +rathskeller +ratificationist +ratifier +ratina +ratine +rating +ratio +ratiocination +ratiocinator +ration +rationale +rationalisation +rationaliser +rationalism +rationality +rationalization +rationalizer +rationalness +ratline +ratoon +ratsbane +rattan +ratteen +rattener +rattening +ratter +rattlebox +rattlebrain +rattlehead +rattlepate +rattlesnake +rattletrap +ratton +rattoon +rattrap +raucity +raucousness +raught +rauwolfia +ravagement +ravager +raveler +ravelin +raveling +raveller +ravelment +raven +raver +ravigote +ravine +ravioli +ravisher +ravishment +rawhide +rawin +rawinsonde +rawishness +rawness +ray +rayah +raylessness +raylet +rayon +rayonny +razee +razer +razoo +razor +razorback +razorbill +razorfish +razzia +rcd +rchauff +rclame +rcpt +rcvr +rd +re +reabsorption +reacceptance +reaccession +reacclimatization +reaccumulation +reaccusation +reacher +reacidification +reacknowledgment +reacquaintance +reacquisition +reactance +reactant +reaction +reactionarism +reactionaryism +reactionism +reactivation +reactor +readability +readaptability +readaptation +readaptiness +readdition +reader +readership +readiness +reading +readjournment +readjudication +readjuster +readjustment +readmission +readmittance +readoption +readornment +readvertisement +readvocation +reaeducation +reaentrance +reaexportation +reaexporter +reaffiliation +reaffirmation +reaffront +reagent +reaggregation +reagitation +realgar +realienation +realignment +realisation +realiser +realism +realist +reality +realizability +realizableness +realizer +reallegation +realliance +reallocation +reallotment +realm +realpolitik +realterableness +realteration +realtor +realty +ream +reamalgamation +reamassment +reamendment +reamer +reanalysis +reanimation +reannexation +reannotation +reannouncement +reanointment +reaper +reapology +reappearance +reappliance +reapplication +reappointment +reapportionment +reappraisal +reapprehension +reappropriation +reapproval +rear +rearbitration +rearguard +reargument +rearmouse +rearousal +rearrangement +rearticulation +rearwardness +reascent +reason +reasonability +reasonableness +reasoner +reasoning +reassembly +reassertion +reassessment +reassignation +reassignment +reassimilation +reassistance +reassociation +reassortment +reassumption +reassurance +reassurement +reassurer +reata +reattachment +reattainment +reattraction +reaudit +reaudition +reauthentication +reauthorization +reavowal +reawakening +reb +rebab +reballot +rebaptism +rebate +rebatement +rebato +rebbe +rebec +rebeldom +rebellion +rebelliousness +rebirth +rebop +rebore +reboso +rebounder +rebozo +rebroadcast +rebuilder +reburial +rebus +rebuttal +rebutter +rec +recalcitrance +recalcitrancy +recalcitration +recalculation +recalescence +recancellation +recanter +recapitalization +recapitulation +recaption +recarburization +recarburizer +recaster +recce +receipt +receiptor +receivability +receivableness +receiver +receivership +recelebration +recency +recension +recentness +recentralization +recept +receptacle +reception +receptionism +receptionist +receptor +recertification +recess +recession +recessiveness +recharger +recheck +recidivism +recidivist +recipe +recipience +recipient +reciprocality +reciprocalness +reciprocation +reciprocator +reciprocity +recirculation +recision +recital +recitatif +recitation +recitative +recitativo +reciter +reckoner +reckoning +reclaimant +reclaimer +reclamation +reclassification +reclination +recliner +recluse +reclusion +recoagulation +recodification +recogniser +recognition +recognizance +recognizee +recognizer +recognizor +recoinage +recollectedness +recollection +recollectiveness +recolonisation +recolonization +recoloration +recolouration +recombination +recommencement +recommendation +recommender +recommission +recommitment +recommittal +recomparison +recompilation +recomposition +recomputation +recon +reconcealment +reconcentration +reconcilability +reconcilableness +reconcilement +reconciler +recondemnation +recondensation +reconditeness +reconfirmation +reconfrontation +reconfusion +reconnaissance +reconnection +reconnoiterer +reconnoitrer +reconquest +reconsecration +reconsideration +reconsignment +reconsolidation +reconstitution +reconstruction +reconstructiveness +reconsultation +recontact +recontemplation +recontraction +reconvention +reconvergence +reconversion +reconveyance +reconviction +record +recorder +recording +recoronation +recountal +recoupment +recourse +recoverableness +recoverer +recovery +recpt +recreance +recreancy +recreation +recreativeness +recreator +recrement +recrimination +recriminator +recrudescence +recruiter +recruitment +recrystallization +rect +recta +rectangle +rectangularity +rectangularness +rectectomy +recti +rectification +rectifier +rectitude +recto +rectocele +rector +rectorial +rectory +rectrix +rectus +recultivation +recuperation +recuperativeness +recuperator +recurrence +recursion +recusancy +recusant +red +redaction +redactor +redan +redbird +redbone +redbreast +redbrick +redbud +redbug +redcap +redcoat +redcurrant +reddle +reddleman +rede +redeal +redebate +redecision +redeclaration +redecoration +rededication +redeemability +redeemableness +redeemer +redefinition +redelegation +redeliberation +redeliverer +redelivery +redemonstration +redemption +redemptioner +redenial +redeployment +redepreciation +redescent +redescription +redesignation +redeveloper +redevelopment +redeye +redfin +redfish +redhandedness +redhead +redhibition +redhorse +redia +redifferentiation +rediffusion +redigestion +redingote +redintegration +redisbursement +rediscovery +rediscussion +redismissal +redispersal +redisposition +redissection +redissolubleness +redissolution +redistillabness +redistillation +redistribution +redivision +redivorce +redleg +redneck +redness +redolence +redolency +redoubler +redoubt +redoubtableness +redowa +redox +redpoll +redraft +redrawer +redresser +redressor +redroot +redshank +redskin +redstart +redtapism +redtop +reducer +reducibility +reducibleness +reduct +reductase +reduction +reductionism +reductor +redundancy +redupl +reduplication +reduviid +reduzate +redware +redwing +redwood +reebok +reed +reedbird +reedbuck +reediness +reeding +reedling +reeducation +reef +reefer +reeffish +reeker +reel +reelection +reeler +reelevation +reeligibility +reeligibleness +reembarcation +reembarkation +reemergence +reemersion +reemigration +reemission +reemphasis +reemployment +reen +reenaction +reenactment +reencounter +reencouragement +reendorsement +reendowment +reengagement +reenjoyment +reenlargement +reenlightenment +reenlistment +reentrance +reentry +reenumeration +reenunciation +reerection +reeruption +reestablishment +reestimate +reestimation +reevacuation +reevaluation +reevasion +reeve +reexcavation +reexecution +reexhibition +reexpansion +reexplanation +reexplication +reexploration +reexportation +reexporter +reexposition +reexposure +reexpression +ref +refamiliarization +refection +refectory +refederalization +refederation +referee +reference +referendum +referent +referential +referral +refertilization +reffo +refinedness +refinement +refinery +refl +reflation +reflectance +reflection +reflectiveness +reflectivity +reflectometer +reflector +reflectorize +reflet +reflex +reflexion +reflexiveness +reflexivity +reflexness +reflorescence +reflower +refluence +reforfeiture +reformability +reformableness +reformation +reformativeness +reformatory +reformer +reformism +reformulation +refortification +refractedness +refraction +refractiveness +refractivity +refractometer +refractometry +refractor +refractoriness +refrainer +refrainment +refresher +refreshingness +refreshment +refrigerant +refrigeration +refrigerator +refringence +refringency +refuge +refugee +refugium +refulgence +refulgency +refulgentness +refunder +refundment +refusal +refuser +refutability +refutation +refuter +regainer +regalia +regality +regalness +regalvanization +regardfulness +regatta +regelation +regency +regeneracy +regenerateness +regeneration +regenerator +regent +regermination +reggae +regicide +regime +regimen +regiment +regimentation +regina +region +regionalism +regionalist +register +registerer +registrability +registrant +registrar +registrarship +registration +registry +regle +reglet +reglorification +regma +rego +regolith +regosol +regovernment +regr +regradation +regrater +regression +regressiveness +regressor +regretableness +regretfulness +regrettableness +regretter +regrowth +reguarantee +reguaranty +regularity +regularization +regularizer +regularness +regulation +regulator +regulus +regurgitation +rehabilitation +rehearing +rehearsal +rehearser +reheater +reheating +rehoboam +rehospitalization +rehumanization +rehumiliation +reichsthaler +reidentification +reif +reign +reignition +reillumination +reillustration +reimplantation +reimportation +reimposition +reimpression +reimprisonment +rein +reinauguration +reincarnation +reincarnationist +reinclusion +reindeer +reindication +reindictment +reindoctrination +reindorsement +reinducement +reinduction +reindulgence +reindustrialization +reinfection +reinfestation +reinfiltration +reinflation +reinforcement +reinforcer +reinfusion +reinjury +reinoculation +reinquiry +reinsertion +reinspection +reinspiration +reinstallation +reinstallment +reinstalment +reinstatement +reinstation +reinstator +reinstitution +reinstruction +reinsurance +reinsurer +reintegration +reinterest +reinterment +reinterpretation +reinterrogation +reinterruption +reintervention +reinterview +reintrenchment +reintroduction +reinvasion +reinvention +reinvestigation +reinvestment +reinvigoration +reinvitation +reinvolvement +reirrigation +reis +reisolation +reiver +rejectee +rejecter +rejection +rejoinder +rejudgement +rejudgment +rejustification +rejuvenescence +rel +relapser +relatability +relatedness +relater +relation +relationship +relativeness +relativism +relativist +relativity +relator +relatum +relaxant +relaxation +relaxedness +relaxin +relay +releasability +releaser +relegation +relentlessness +releva +relevance +relevancy +reliability +reliance +relic +relict +relief +reliefer +relier +reliever +religieuse +religieux +religion +religionism +religionist +religiosity +religiousness +relinquisher +relinquishment +reliquary +relique +reliquidation +relitigation +reload +reloan +relocation +reluctance +reluctivity +rem +remagnetization +remainder +remainderman +remake +remaker +remanence +remanifestation +remarker +remarque +remarriage +remastery +remastication +rematch +rematerialization +remblai +remeasurement +remediableness +remediation +remedy +rememberer +remembrance +remembrancer +remex +remigrant +remigration +remilitarization +reminiscence +remissibility +remissibleness +remission +remissiveness +remissness +remital +remittance +remittee +remittence +remittency +remitter +remittor +remnant +remobilization +remodeler +remodification +remolade +remonetisation +remonetization +remonstrance +remonstrant +remonstration +remonstrator +remontoir +remontoire +remora +remorse +remorsefulness +remorselessness +remoteness +remotion +removability +removableness +removal +removalist +removedness +remover +remultiplication +remunerability +remuneration +remunerativeness +remunerator +renascence +renavigation +rencontre +renderer +rendering +rendezvous +rendition +rendu +rendzina +renegade +renegado +renegation +reneger +renegotiation +renewal +renewer +renga +renin +renitence +renitency +rennet +rennin +renomination +renormalization +renotation +renotification +renouncement +renouncer +renourishment +renovation +renovator +renown +renownedness +rensselaerite +rent +rentability +rental +rente +renter +rentier +renullification +renunciation +renvoi +reobligation +reobservation +reoccupation +reoccurrence +reoperation +reorchestration +reorganiser +reorganization +reorganizer +reorientation +rep +repagination +repairableness +repairer +repairman +reparation +repartee +repartition +repassage +repast +repayment +repealability +repealableness +repealer +repeatability +repeater +repechage +repellence +repellency +repeller +repellingness +repentance +reperception +repercussion +repercussiveness +reperforator +reperformance +repertoire +repertory +reperusal +repetend +repetiteur +repetition +repetitiveness +repic +repiner +replacement +replay +repleader +repleteness +repletion +replevin +replica +replication +replier +repolarization +repopularization +repopulation +report +reportage +reporter +reposal +repose +reposedness +reposefulness +reposer +reposition +repository +repossession +repossessor +repostulation +repoussage +repp +reprehender +reprehensibility +reprehensibleness +reprehension +representation +representationalism +representationalist +representative +representativeness +represser +repression +repressiveness +repressor +reprimand +reprimander +reprint +reprinter +reprisal +reprise +repro +reproachableness +reproacher +reproachfulness +reproachlessness +reprobation +reproclamation +reproducer +reproducibility +reproduction +reproductiveness +reprography +repromulgation +reproof +reprotest +reprovableness +reproval +rept +reptile +republic +republicanisation +republicaniser +republicanism +republicanization +republicanizer +republication +repudiation +repugnance +repulser +repulsion +repulsiveness +repunctuation +repunishment +repurification +reputability +reputableness +reputation +req +requalification +requiescat +requirement +requisiteness +requisition +requisitioner +requisitionist +requital +requitement +requiter +reradiation +reredos +reregistration +reregulation +reremouse +rerental +res +resale +resawer +resawyer +rescission +rescript +rescrutiny +research +reseau +resect +resection +reseda +resegregation +reseizure +reselection +reseller +resemblance +resensation +resensitization +resentence +resentfulness +resentment +reseparation +reserpine +reservation +reservedness +reservist +reservoir +resetter +resettlement +resh +reshipment +reshuffle +residence +residency +resident +residentship +resider +residue +residuum +resignation +resilement +resilience +resin +resinification +resinousness +resipiscence +resistance +resistate +resister +resistibility +resistibleness +resistiveness +resistivity +resistlessness +resistor +resnatron +resolicitation +resolidification +resolubility +resolubleness +resoluteness +resolution +resolutioner +resolvability +resolvableness +resolvedness +resolver +resonance +resonation +resonator +resorbence +resorcinol +resorcinolphthalein +resorption +resource +resourcefulness +resp +respecification +respect +respectability +respecter +respectfulness +respectiveness +respirability +respirableness +respiration +respirator +respiratory +respirometry +respite +resplendence +respondence +respondent +response +responser +responsibility +responsibleness +responsion +responsiveness +responsor +responsory +responsum +ressentiment +rest +restabilization +restatement +restaurant +restaurateur +rester +resterilization +restfulness +restharrow +restimulation +restipulation +restitution +restiveness +restlessness +restorableness +restoration +restorationism +restorer +restr +restrainability +restrainer +restraint +restrictedness +restriction +restrictiveness +restringer +restudy +resubjection +resublimation +resubmission +resubscription +resubstantiation +resuit +result +resumer +resummons +resumption +resuppression +resurgam +resurgence +resurrection +resurrectionism +resurrectionist +resuscitation +resuscitator +resuspension +resymbolization +resynthesis +retable +retail +retailer +retainer +retaker +retaliation +retaliator +retally +retardant +retardate +retardation +retarder +retardment +retaxation +retd +rete +retem +retene +retention +retentionist +retentivity +retepore +retest +retestimony +retiarius +reticle +reticulation +reticule +reticulocyte +reticulum +retina +retinaculum +retinene +retinite +retinitis +retinol +retinoscope +retinoscopy +retinue +retiredness +retiree +retirement +retirer +retorsion +retorter +retortion +retoucher +retractability +retractation +retractibility +retractility +retraction +retractiveness +retractor +retranscription +retransfer +retransference +retranslation +retransmission +retransplantation +retreatingness +retrenchment +retrial +retribution +retrieval +retriever +retro +retroaction +retrocedence +retrocession +retrochoir +retrofire +retroflexion +retrogradation +retrogression +retropack +retrorocket +retrospect +retrospection +retrospectiveness +retroussage +retroversion +retrusion +retsina +returnee +reunification +reunion +reunionism +reunionist +reuniter +reupholsterer +reupholstery +reusability +reusabness +reuseabness +reutilization +reutterance +rev +revaccination +revalidation +revaluation +revamper +revampment +revanche +revanchism +revaporization +revealability +revealableness +revealer +revealingness +revealment +revegetation +reveille +revelation +revelationist +revelator +revelry +revenant +revenge +revengefulness +revenger +reventilation +revenue +revenuer +reverberation +reverberator +reverence +reverencer +reverendship +reverentiality +reverentialness +reverer +reverie +reverification +revers +reversal +reverser +reversibility +reversibleness +reversion +reversioner +reverso +reverter +revertibility +revetment +revibration +reviewability +revilement +reviler +revindication +reviolation +revisal +revision +revisionism +revisionist +revisitation +revisualization +revitalisation +revitalization +revivability +revival +revivalism +revivalist +reviver +revivification +reviviscence +revivor +revocability +revocableness +revocation +revolt +revolter +revolution +revolutionariness +revolutionary +revolutioniser +revolutionist +revolutionizer +revolver +revote +revoyage +revue +revuist +revulsant +revulsion +reward +rewriter +rex +rf +rfb +rg +rgen +rgisseur +rh +rhabdomancy +rhabdomyoma +rhachis +rhagon +rhamphotheca +rhapsodist +rhapsody +rhatany +rhb +rhea +rhebok +rheda +rhenic +rhenium +rheo +rheobase +rheologist +rheology +rheometer +rheometry +rheopexy +rheoscope +rheostat +rheotaxis +rheotron +rheotrope +rheotropism +rhet +rhetor +rhetoric +rhetorician +rheum +rheumatics +rheumatism +rheumatology +rheuminess +rhexis +rhigolene +rhinarium +rhinencephalon +rhinestone +rhinitis +rhino +rhinoceros +rhinologist +rhinology +rhinoplasty +rhinorrhea +rhinoscope +rhinoscopy +rhizobium +rhizocephalan +rhizoid +rhizome +rhizomorph +rhizopod +rhizopus +rhizosphere +rhizotomy +rho +rhodamine +rhodinal +rhodium +rhodochrosite +rhododendron +rhodolite +rhodonite +rhodopsin +rhomb +rhombencephalon +rhombohedron +rhomboid +rhombus +rhonchus +rhotacism +rhubarb +rhumb +rhumba +rhumbatron +rhyacolite +rhyme +rhymester +rhyolite +rhythm +rhythmics +rhythmist +rhyton +ria +rial +rialto +riata +rib +ribaldry +riband +ribband +ribbing +ribbon +ribbonfish +ribbonwood +ribgrass +riboflavin +ribonuclease +ribose +riboso +ribosome +ribozo +ribwort +rice +ricebird +ricer +ricercar +ricercare +richness +richweed +ricin +ricinolein +rick +ricketiness +rickets +rickettsia +rickey +rickle +rickrack +rickshaw +ricotta +ricrac +rictus +ridability +riddance +ridder +riddle +rider +ridge +ridgeling +ridgepole +ridgetree +ridgeway +ridicule +ridiculer +ridiculosity +ridiculousness +riding +ridley +ridotto +riebeckite +riel +riempie +riesling +rifacimento +rifeness +riff +riffler +riffraff +rifle +riflebird +rifleman +riflemanship +rifler +riflery +rifling +rift +rigadoon +rigamarole +rigatoni +rigaudon +rigger +rigging +rightabout +righteousness +rightfulness +rightism +rightness +rights +rigmarole +rigol +rigolet +rigor +rigorism +rigorist +rigourism +rigourist +rigsdaler +rijksdaaler +rikisha +rilievo +rill +rillet +rillette +rim +rime +rimer +rimester +rimosity +rimple +rimrock +rimstone +rimu +rin +rinceau +rind +rinderpest +ring +ringbolt +ringbone +ringdove +ringer +ringgit +ringhals +ringingness +ringleader +ringlet +ringmaster +ringneck +ringsail +ringside +ringster +ringtail +ringworm +rink +riot +rioter +riotist +riotousness +ripcord +ripeness +ripidolite +ripieno +riposte +ripper +rippingness +ripple +rippler +ripplet +riprap +ripsaw +ripsnorter +riptide +riser +rishi +risibility +rising +risk +risker +riskiness +risotto +rissole +rit +rita +rite +ritelessness +ritornello +ritter +ritual +ritualise +ritualism +ritualist +ritualization +ritz +ritziness +riv +rivage +rival +rivalrousness +rivalry +river +riverbank +riverhead +rivet +riveter +riviere +rivulet +riyal +rm +rmoulade +rms +ro +roach +road +roadability +roadbed +roadblock +roadholding +roadhouse +roadlessness +roadroller +roadrunner +roadstead +roadster +roadway +roadwork +roak +roarer +roaster +robalo +roband +robber +robbery +robbin +robe +rober +robin +robinia +roble +robomb +robot +robotization +robustness +roc +rocaille +rocambole +rochet +rock +rockabilly +rockaway +rocker +rockery +rocket +rocketeer +rocketry +rocketsonde +rockfish +rockiness +rockling +rockoon +rockrose +rockshaft +rockweed +rococo +rod +rodent +rodenticide +rodeo +rodomontade +roe +roebuck +roemer +roentgen +roentgenogram +roentgenograph +roentgenography +roentgenologist +roentgenology +roentgenometer +roentgenoscope +roentgenoscopy +roentgenotherapy +rogation +rogue +roguery +roguishness +roisterer +roisterous +rojak +roke +role +rollaway +rollback +rollbar +roller +rollicker +rollickingness +rollmop +rollock +rollway +rom +romaine +romaji +romance +romancer +romanticalness +romanticise +romanticism +romanticization +romaunt +romero +romper +rompishness +romyko +ronco +ronde +rondeau +rondel +rondelet +rondelle +rondo +rondure +rone +ronggeng +ronin +ronquil +ronyon +roo +rood +roof +roofer +roofing +rooftree +rooinek +rook +rookery +rookie +room +roomer +roomette +roomful +roominess +roommate +roorback +roost +rooster +root +rootage +rooter +rooti +rootlessness +rootlet +rootstalk +rootstock +rootworm +rooty +rope +ropedance +ropedancer +ropedancing +ropemaker +ropemaking +roper +ropery +ropewalk +ropeway +ropiness +roping +roque +roquelaure +rorqual +rort +ros +rosa +rosace +rosaniline +rosarian +rosarium +rosary +roscoelite +rose +rosebay +rosebud +rosebush +rosefish +rosehip +rosella +roselle +rosemaling +rosemary +roseola +rosery +roset +rosette +rosewood +rosin +rosiness +rosinweed +ross +rostellum +roster +rostra +rostrocarinate +rostrum +rota +rotation +rotator +rote +rotenone +rotgut +roti +rotifer +rotisserie +rotl +roto +rotogravure +rotor +rotorcraft +rotte +rottenstone +rotter +rotunda +roturier +roua +rouble +roucou +roue +rouge +roughage +roughcast +roughcaster +roughener +rougher +roughhouse +roughneck +roughness +roughrider +roughstring +roulade +rouleau +roulette +rounce +roundabout +roundedness +roundel +roundelay +rounder +rounders +roundheadedness +roundhouse +roundishness +roundlet +roundline +roundness +roundsman +roundup +roundworm +roup +rouseabout +rousedness +rouser +roustabout +rout +route +routeman +routemarch +router +routh +routine +routing +routinism +routinist +roux +rover +roving +rovingness +row +rowan +rowboat +rowdiness +rowdyishness +rowdyism +rowel +rowen +rower +rowlock +royale +royalisation +royalism +royalist +royalization +royalty +rozener +rozzer +rpm +rps +rpt +rs +rsum +rt +rubaboo +rubasse +rubato +rubber +rubberneck +rubbing +rubbish +rubble +rubblework +rubby +rubdown +rube +rubefaction +rubella +rubellite +rubeola +rubescence +rubicundity +rubidium +ruble +rubric +rubrication +rubricator +rubrician +rubstone +ruby +ruche +ruching +ruck +rucksack +ruckus +ruction +rudbeckia +rudd +rudder +rudderfish +rudderhead +rudderpost +ruddiness +ruddleman +ruddock +rudeness +rudenture +ruderal +rudiment +rudimentariness +ruer +rufescence +ruff +ruffe +ruffian +ruffianism +ruffler +rug +ruga +rugby +rugger +rugging +rugosity +ruin +ruination +ruiner +ruinousness +rule +ruler +ruling +rum +rumanite +rumba +rumbler +rumen +ruminant +rummager +rummer +rummy +rumormonger +rumour +rump +rumpus +rumrunner +rumrunning +runabout +runagate +runback +runch +rundle +rundlet +rundown +rune +runesmith +rung +runkle +runlet +runnel +runner +runoff +runout +runround +runt +runtgenography +runtgenologist +runtgenology +runtgenoscope +runtgenoscopy +runtiness +runtishness +runway +rupee +rupiah +rupture +ruralisation +ruralism +ruralist +ruralite +rurality +ruralization +ruse +rushee +rusher +rushing +rushwork +rusk +russet +rust +rusticalness +rustication +rusticator +rusticness +rustiness +rustler +rut +rutabaga +ruth +ruthenium +rutherford +rutherfordium +ruthfulness +ruthlessness +rutile +rutin +ruttiness +ruttishness +ryal +rye +ryegrass +ryke +ryokan +ryot +s +sa +saance +sabadilla +sabalo +sabaton +sabayon +sabbat +saber +sabin +sable +sablefish +sabora +sabot +sabotage +saboteur +sabra +sabre +sabretache +sabulosity +sac +sacaton +sacbut +saccharase +saccharate +saccharide +saccharify +saccharimeter +saccharimetry +saccharin +saccharinity +saccharization +saccharometer +saccharometry +saccharose +sacculation +saccule +sacculus +sacellum +sacerdotalism +sacerdotalist +sachem +sachemdom +sachemship +sachet +sack +sackbut +sackcloth +sacker +sackful +sacking +sacque +sacrament +sacramentalism +sacramentalist +sacramentality +sacramentalness +sacrarium +sacrifice +sacrificer +sacrilege +sacrilegiousness +sacring +sacristan +sacristy +sacrosanctity +sacrosanctness +sacrum +sadaqat +saddle +saddleback +saddlebag +saddlebill +saddlebow +saddlecloth +saddler +saddlery +saddletree +sadhaka +sadhe +sadhu +sadi +sadiron +sadness +sadware +safari +safeguard +safekeeping +safelight +safeness +safety +saffian +safflower +saffron +safranine +safrole +saga +sagaciousness +sagacity +sagamore +sagbut +sage +sagebrush +saggar +sagger +sagittary +sago +saguaro +sahib +saice +saiga +sail +sailboat +sailcloth +sailer +sailfish +sailing +sailmaker +sailor +sailoring +sailplane +sainfoin +saint +saintdom +sainthood +saintliness +saintpaulia +saithe +sakai +sake +saker +saki +sakkos +sal +salaam +salability +salaciousness +salacity +salad +salade +salal +salamander +salami +salary +salchow +sale +saleability +salep +saleratus +saleroom +sales +salesclerk +salesgirl +salesman +salesmanship +salesperson +salesroom +salet +salicin +salicional +salicornia +salicylate +salience +salientian +salimeter +salina +salinity +salinometer +saliva +salivation +salivator +sallee +sallenders +sallet +sallier +sallowness +sally +salmagundi +salmi +salmon +salmonberry +salmonella +salol +salon +saloon +saloop +salopette +salpa +salpicon +salpiglossis +salpingectomy +salpingitis +salpingostomy +salpingotomy +salpinx +salsify +salt +saltando +saltarello +saltation +saltbox +saltbush +saltcellar +saltchuck +saltchucker +salter +saltern +saltfish +saltgrass +salticid +saltine +saltiness +saltire +saltishness +saltness +saltpan +saltpeter +saltpetre +saltus +saltworks +saltwort +salubriousness +salubrity +salugi +salutariness +salutation +salutatorian +salutatorium +saluter +salvability +salvableness +salvage +salvager +salvation +salvationism +salvationist +salve +salver +salvia +salvo +salvor +samadhi +samaj +samara +samarium +samarskite +samba +sambar +sambo +sambuca +sambuk +samekh +sameness +samfoo +samiel +samisen +samite +samiti +samizdat +samlet +sammy +samovar +samp +sampan +samphire +sample +sampler +sampling +samsara +samshu +samurai +sanatorium +sanbenito +sanctifiableness +sanctification +sanctifier +sanctimoniousness +sanctimony +sanction +sanctioner +sanctitude +sanctity +sanctuary +sanctum +sand +sandal +sandalwood +sandarac +sandbag +sandbank +sandblast +sandblaster +sandblindness +sandbox +sandbug +sandbur +sandculture +sander +sanderling +sandfish +sandfly +sandglass +sandgrouse +sandhi +sandhog +sandhya +sandiver +sandlot +sandman +sandpaper +sandpiper +sandpit +sandroller +sandsoap +sandstone +sandstorm +sandwich +sandworm +sandwort +saneness +sangaree +sanglier +sangria +sanguification +sanguinaria +sanguinariness +sanguineness +sanguineousness +sanguinolency +sanicle +sanidine +sanies +sanitariness +sanitarium +sanitation +sanitisation +sanitization +sanitizer +sanity +sanjak +sannyasi +sansevieria +sant +santal +santims +santir +santonica +santonin +sap +sapajou +sapanwood +sapele +saphead +sapheadedness +saphena +sapidity +sapidness +sapience +sapiency +saplessness +sapling +sapodilla +saponaceousness +saponification +saponifier +saponin +saponite +sapor +saporosity +sapota +sappanwood +sapper +sapphire +sapphirine +sapphism +sappiness +sapraemia +sapremia +saprobe +saprolegnia +saprolite +sapropel +saprophyte +sapsago +sapwood +saraband +saran +sarangi +sarape +sarcasm +sarcenet +sarcina +sarcoadenoma +sarcocarcinoma +sarcocarp +sarcode +sarcoenchondroma +sarcoidosis +sarcolemma +sarcology +sarcoma +sarcomatosis +sarcophagus +sarcophile +sarcoplasm +sard +sardar +sardine +sardius +sardonicism +sardonyx +sargasso +sargassum +sargassumfish +sarge +sargo +sari +sarmentum +sarong +saros +sarpanch +sarracenia +sarrazin +sarrusophone +sarsaparilla +sarsen +sarsenet +sartor +sartorius +sash +sasin +saskatoon +sass +sassaby +sassafras +sastruga +satai +satang +satanicalness +satchel +sateen +satellite +satellitium +satiability +satiableness +satiation +satiety +satin +satinet +satinflower +satinleaf +satinpod +satinwood +satire +satiricalness +satirisation +satiriser +satirist +satisfaction +satisfactoriness +satisfier +satisfyingness +satori +satrap +satrapy +satsuma +sattva +saturability +saturant +saturater +saturation +saturator +saturniid +saturnism +satyagraha +satyagrahi +satyaloka +satyr +satyriasis +satyrid +satyromaniac +sauce +sauceboat +saucebox +saucepan +saucer +sauch +sauerbraten +sauerkraut +sauger +saugh +sauna +saurel +sauropod +saury +sausage +saussurite +sav +savableness +savageness +savagery +savagism +savanna +savant +savarin +savate +saveableness +saveloy +saver +savin +saviorhood +saviorship +saviour +saviourhood +saviourship +savor +savorer +savory +savour +savourer +savouriness +savoy +saw +sawbill +sawbones +sawbuck +sawder +sawdust +sawer +sawfish +sawfly +sawhorse +sawmill +sawyer +sax +saxhorn +saxifrage +saxony +saxophone +saxophonist +saxtuba +sayer +saying +says +sayyid +sazerac +sb +scab +scabbard +scabbedness +scabbiness +scabies +scabland +scabrousness +scad +scaffold +scaffolding +scag +scagliola +scalableness +scalade +scalage +scalar +scalare +scalawag +scalawaggery +scaldfish +scale +scaleboard +scalenohedron +scalenus +scaler +scaliness +scall +scallawaggery +scallion +scallop +scalloper +scalloping +scallywag +scaloppine +scalp +scalpel +scalper +scalping +scamillus +scammony +scamp +scampi +scampishness +scandal +scandalisation +scandaliser +scandalization +scandalizer +scandalmonger +scandalousness +scandia +scandium +scanner +scansion +scantiness +scantling +scantness +scape +scapegoat +scapegoatism +scapegrace +scapewheel +scaphocephaly +scaphopod +scapolite +scapula +scar +scarab +scarabaeid +scarabaeus +scarcement +scarceness +scarcity +scarecrow +scaremonger +scaremongering +scarer +scarf +scarfer +scarfskin +scarification +scarificator +scarlatina +scarlet +scarp +scarpe +scarph +scarves +scatology +scatoma +scatophagy +scatoscopy +scatt +scatterbrain +scatteredness +scatterer +scattering +scaup +scauper +scavenger +scelp +scenario +scenarist +scene +scenery +scenographer +scenography +scent +scentlessness +sceptic +scepticism +sceptre +scf +scfh +scfm +sch +schappe +schatchen +schav +schedule +scheelite +schefferite +schema +schematisation +schematiser +schematism +scheme +schemer +scherm +scherzo +schiavone +schiffli +schiller +schillerization +schilling +schipperke +schism +schist +schistosis +schistosity +schistosome +schistosomiasis +schiz +schizocarp +schizogamy +schizogenesis +schizogony +schizomycete +schizomycosis +schizont +schizophrene +schizophrenia +schizophyte +schizopod +schizothymia +schlemiel +schlieren +schlimazel +schlock +schmaltz +schmo +schmuck +schnapper +schnapps +schnauzer +schnitzel +schnook +schnorkle +schnorrer +schnozzle +scholar +scholarch +scholarship +scholasticate +scholasticism +scholiast +scholium +school +schoolbag +schoolbook +schoolboy +schoolchild +schoolgirl +schoolhouse +schoolie +schooling +schoolman +schoolmarm +schoolmate +schoolroom +schoolteacher +schoolwork +schoolyard +schooner +schorl +schottische +schrank +schrik +schryari +schuit +schul +schuss +schuyt +schwa +schynbald +sci +sciamachy +sciatica +sciatically +science +scientism +scientist +scilicet +scilla +scimitar +scintigraphy +scintilla +scintillation +scintillator +scintillometer +sciolism +sciomachy +sciomancy +scion +sciosophist +sciosophy +scirrhosity +scirrhus +scissel +scission +scissure +scivvy +sclaffer +sclent +sclera +sclerectomy +sclerema +sclerenchyma +scleriasis +sclerite +scleritis +scleroblast +sclerocauly +scleroderma +sclerodermatitis +scleroma +sclerometer +sclerophyll +sclerophylly +scleroprotein +sclerosis +sclerotin +sclerotitis +sclerotium +sclerotization +sclerotome +sclerotomy +scoffer +scofflaw +scoke +scolder +scolecite +scolex +scolion +scoliosis +scollop +scolopendrid +scolophore +scolops +scombrid +sconce +sconcheon +scone +scoop +scooper +scoopful +scooter +scop +scope +scopolamine +scopoline +scopophilia +scopophiliac +scopula +scorcher +scordatura +score +scoreboard +scorecard +scored +scorekeeper +scorekeeping +scorepad +scores +scoria +scorn +scorner +scornfulness +scorpaenid +scorper +scorpion +scorpionfish +scorpionfly +scot +scoter +scotia +scotoma +scotopia +scoundrel +scourer +scourge +scourger +scouring +scouse +scout +scouter +scouth +scouthood +scouting +scoutmaster +scow +scowler +scr +scrabbler +scrag +scragginess +scramasax +scrambler +scran +scrap +scrapbook +scrapeage +scraper +scraperboard +scrapheap +scrapie +scrapper +scrappiness +scrapple +scratchboard +scratcher +scratches +scrawler +scrawliness +scrawniness +screamer +scree +screech +screecher +screed +screen +screening +screeno +screenplay +screw +screwball +screwdriver +screwer +screwhead +screwplate +screwworm +scribanne +scribbler +scribe +scriber +scribeship +scrim +scrimmage +scrimmager +scrimshaw +scrinium +scrip +script +scriptorium +scripturalness +scripture +scriptwriter +scriptwriting +scrivener +scrod +scrofula +scrofulousness +scrog +scroll +scrollwork +scrubber +scrubboard +scrubland +scrubwoman +scruff +scrum +scrummage +scrummager +scrumptiousness +scrumpy +scruple +scrupulosity +scrupulousness +scrutability +scrutator +scrutineer +scrutinisation +scrutinization +scrutinizer +scrutiny +scrutoire +scuba +scudo +sculduddery +sculduggery +sculker +scull +sculler +scullery +scullion +sculp +sculpin +sculptor +sculpture +scum +scumboard +scuncheon +scup +scupper +scuppernong +scurf +scurrility +scurrilousness +scurviness +scut +scuta +scutage +scutcheon +scute +scutellation +scutellum +scuttle +scuttlebutt +scutum +scyelite +scyphistoma +scyphozoan +scyphus +scythe +sd +sea +seaboard +seacoast +seacock +seadog +seadrome +seafarer +seafighter +seafood +seafowl +seafront +seakindliness +seal +sealant +sealer +sealery +sealskin +seam +seaman +seamanship +seamark +seamer +seaminess +seamlessness +seamount +seance +seaplane +seaport +seaquake +searchableness +searcher +searchingness +searchlight +seascape +seascout +seascouting +seashell +seashore +seasickness +seaside +season +seasonableness +seasonalness +seasoner +seasoning +seat +seater +seating +seatrain +seatwork +seawan +seaware +seaway +seaweed +seaworthiness +seborrhea +seborrhoea +sebum +secant +secco +secernment +secession +secessionism +secessionist +sech +secludedness +seclusion +seclusiveness +secobarbital +seconde +seconder +secondo +secondrater +secondsightedness +secrate +secrecy +secretaire +secretariat +secretary +secretaryship +secretin +secretion +secretness +sect +sectarianism +sectary +section +sectionalisation +sectionalism +sectionalist +sector +secularisation +seculariser +secularism +secularist +secularity +secularization +secularizer +secundine +security +sedan +sedateness +sedation +sedge +sedile +sedilia +sediment +sedimentation +sedimentologist +sedimentology +sedition +seditiousness +seducer +seduction +seductiveness +sedulity +sedulousness +sedum +seeableness +seecatch +seed +seedbed +seedcake +seedcase +seeder +seediness +seedlessness +seedling +seedman +seedsman +seedtime +seeing +seeker +seemer +seemliness +seepage +seer +seersucker +seesaw +segar +segment +segmentation +segno +sego +segregatedness +segregation +segregationist +segregator +seguidilla +sei +seicento +seiche +seif +seigneur +seigneury +seignior +seigniorage +seigniory +seine +seiner +seiren +seiser +seisin +seising +seism +seismism +seismogram +seismograph +seismographer +seismography +seismol +seismologist +seismology +seismometry +seismoscope +seisure +seizer +seizin +seizing +seizor +seizure +sekos +selaginella +selah +selamlik +selectance +selectee +selection +selectiveness +selectivity +selectman +selectness +selector +selenate +selenide +selenite +selenium +selenodesy +selenodonty +selenograph +selenographer +selenographist +selenography +selenolog +selenology +selenomorphology +self +selfheal +selfhood +selfhypnotization +selflessness +selfmovement +selfness +selfsameness +selfseekingness +selfsufficiency +selfward +seller +sellout +selsyn +selva +selvage +selves +sem +semainier +semaise +semanteme +semanticist +semantics +semaphore +semasiologist +semasiology +sematology +semblance +semeiologist +semeiology +sememe +semester +semi +semiactiveness +semiadhesiveness +semianarchism +semianarchist +semiangle +semianimal +semibaldness +semiblasphemousness +semibreve +semicatalyst +semicellulose +semicircle +semicircularness +semicivilization +semicolloid +semicolon +semicoma +semiconduction +semiconductor +semiconfinement +semiconformist +semiconformity +semiconsciousness +semiconventionality +semiconversion +semicotton +semicretin +semicylinder +semidangerousness +semidecay +semidefensiveness +semidefiniteness +semideification +semidelirium +semidependence +semidesert +semidestruction +semidiameter +semidiaphanousness +semidictatorialness +semidiness +semidivision +semidivisiveness +semidome +semidomestication +semidrying +semidurables +semienclosure +semierectness +semiexclusiveness +semiexhibitionist +semiexposure +semifiction +semifigurativeness +semifinal +semifinalist +semifluidity +semifrontier +semifunctionalism +semiglaze +semigod +semigroup +semih +semihaness +semihibernation +semihostility +semihumanism +semiliberalism +semiliquidity +semiluminousness +semiluxury +semimaliciousness +semimatureness +semimaturity +semiminess +semimysticalness +seminar +seminarian +seminary +seminasality +semination +seminationalism +seminervousness +seminess +semineutrality +seminoma +seminomad +seminomadism +seminormality +seminormalness +seminudity +semiobjectiveness +semiobliviousness +semiology +semiopacity +semiopenness +semiotics +semiovalness +semipagan +semiparalytic +semiparasitism +semipassiveness +semipaste +semipatriot +semipeace +semipendulousness +semipermeability +semiperviness +semiphosphorescence +semipiousness +semipolitician +semipopularity +semiporcelain +semiprivacy +semiproductiveness +semiproductivity +semiprofaneness +semiprofanity +semiprogressiveness +semiproneness +semipurposiveness +semiquaver +semiradicalness +semirareness +semirawness +semirebel +semirebellion +semirebelliousness +semireflex +semireflexiveness +semirelief +semirepublic +semiresoluteness +semirespectability +semiretirement +semirevolution +semirevolutionist +semirigorousness +semiruralism +semis +semisecrecy +semiseriousness +semishade +semislave +semisocialism +semisocialist +semisolemnity +semisolemnness +semisomnolence +semispeculation +semispeculativeness +semisphere +semispontaneousness +semistiffness +semisupernaturalness +semitheatricalism +semitone +semitrailer +semitransparency +semitransparentness +semitruthfulness +semivowel +semiwarfare +semiwildness +semolina +sen +sena +senarmontite +senate +senator +senatorship +sendal +sendee +sender +sendoff +senega +senescence +seneschal +senhor +senhorita +senility +seniority +senna +sennet +sennight +sennit +senor +sensation +sensationalism +sensationism +sensationist +sense +senselessness +sensibilia +sensibility +sensibleness +sensillum +sensitisation +sensitiser +sensitiveness +sensitivity +sensitization +sensitizer +sensitometer +sensitometry +sensor +sensorium +sensualisation +sensualism +sensualist +sensuality +sensualization +sensum +sentence +sentencer +sententiosity +sententiousness +sentience +sentiment +sentimentalisation +sentimentaliser +sentimentalism +sentimentalist +sentimentality +sentimentalization +sentinel +sentinelship +sentry +sepal +separability +separableness +separateness +separates +separation +separatism +separatist +separativeness +separator +separatrix +sepia +sepiolite +sepoy +seppuku +sepsis +sept +septa +septarium +septectomy +septemvir +septemvirate +septendecillion +septennium +septentrion +septet +septicaemia +septicemia +septicity +septillion +septillionth +septimana +septime +septolet +septuagenarian +septum +septuor +septuplet +septuplicate +sepulcher +sepulchre +sepulture +seqq +sequaciousness +sequacity +sequel +sequela +sequence +sequencer +sequentiality +sequestrant +sequestration +sequestrator +sequestrectomy +sequestrum +sequin +sequoia +ser +sera +seraglio +serai +seraph +seraphicalness +seraphim +serdab +serein +serenade +serenader +serenata +serendipity +sereneness +serenity +serf +serfdom +serfishness +serge +sergeant +sergeantfish +sergeanty +serial +serialisation +serialism +serialist +serialization +sericin +sericite +sericterium +sericulture +sericulturist +seriema +series +serif +serigraph +serigrapher +serigraphy +serin +serine +seringa +seriousness +seriplane +serjeant +serjeanty +sermon +sermoniser +sermonizer +serologist +serology +serosa +serositis +serosity +serotherapist +serotherapy +serotonin +serousness +serow +serpent +serpentinization +serpigo +serpulid +serranid +serration +serriedness +serrulation +serrurerie +sertularian +serum +serval +servant +server +service +serviceability +serviceableness +serviceberry +serviceman +services +serviette +servileness +servility +serving +servitor +servitude +servomechanism +servomotor +sesame +sescuncia +sesquialtera +sesquicarbonate +sesquih +sesquioxide +sesquipedality +sesquiplane +sesquiterpene +sessility +session +sesterce +sestertium +sestet +sestina +seta +setaria +setline +seton +setscrew +sett +settee +setter +setting +settleability +settledness +settlement +settler +settlor +setula +setup +seuora +seuorita +seven +sevenbark +sevens +seventeen +seventy +severalty +severance +severeness +severity +severy +sewage +sewan +sewellel +sewer +sewerage +sewing +sexagenarian +sexdecillion +sexfoil +sextain +sextant +sextet +sextile +sextillion +sexto +sextodecimo +sextolet +sexton +sextuple +sextuplet +sextuplicate +sf +sferics +sfm +sfumato +sfz +sg +sgabello +sgd +sgraffito +shabbiness +shack +shackle +shackler +shad +shadberry +shadbush +shadchan +shaddock +shade +shadelessness +shadiness +shading +shadoof +shadow +shadower +shadowgraph +shadowgraphist +shadowgraphy +shadowiness +shadowland +shaduf +shaft +shafting +shaftway +shag +shaganappi +shagbark +shagginess +shagreen +shah +shahdom +shakefork +shakeout +shaker +shaking +shako +shakudo +shale +shalloon +shallop +shallot +shallowness +shalwar +sham +shamal +shaman +shamanism +shamanist +shamba +shambles +shame +shamefacedness +shamelessness +shammash +shammer +shammes +shammy +shampoo +shampooer +shamrock +shamshir +shamus +shandrydan +shandy +shandygaff +shank +shankpiece +shanny +shantey +shanti +shantung +shanty +shantytown +shape +shapelessness +shard +share +sharecropper +sharefarmer +shareholder +sharer +sharia +sharif +shark +sharkskin +sharksucker +sharpbill +sharper +sharpie +sharpness +sharpshooter +sharpshooting +sharpy +shashlik +shastra +shastracara +shatterer +shaveling +shaver +shavetail +shavie +shaving +shaw +shawl +shawm +shay +shea +sheading +sheaf +shealing +shearer +shearhog +shearlegs +shearling +shearwater +sheatfish +sheath +sheathbill +sheather +sheathing +sheaves +shebang +shebeen +shebeening +shechitah +shed +shedder +sheefish +sheen +sheeny +sheep +sheepberry +sheepcote +sheepdog +sheepfold +sheepherder +sheepherding +sheepishness +sheepshank +sheepshead +sheepshearing +sheepskin +sheepwalk +sheepweed +sheerlegs +sheers +sheet +sheeting +shegetz +shehitah +sheik +sheikdom +sheila +sheitel +shekel +shelduck +shelf +shell +shellacking +shellback +shellbark +shellfire +shellfish +shellflower +shelter +shelterer +shelterlessness +sheltie +shelty +shelver +shelves +shelving +shemaal +shenanigan +shepherd +sherbet +sherd +sheria +sherif +sheriff +sherlock +sherry +sherwani +sheugh +sheveret +shewbread +shiai +shibah +shibbeen +shibboleth +shicer +shicker +shiel +shield +shielder +shieldlessness +shieling +shiftiness +shiftingness +shigella +shikar +shikari +shiksa +shillelagh +shilling +shim +shimal +shimmy +shin +shinbone +shindig +shiner +shingle +shingler +shingles +shininess +shinkin +shinleaf +shinnery +shinny +shinplaster +shinty +ship +shipboard +shipboy +shipbuilder +shipentine +shipfitter +shiplap +shipload +shipman +shipmaster +shipmate +shipment +shipowner +shippen +shipper +shipping +shippon +shipway +shipworm +shipwreck +shipwright +shipyard +shiralee +shire +shirker +shirt +shirtband +shirting +shirtmaker +shirtmaking +shirtsleeve +shirtwaist +shirtwaister +shishya +shiv +shivah +shivaree +shive +shiverer +shivoo +shkotzim +shlemiel +shnaps +shnook +shoad +shoal +shoat +shochet +shocker +shockingness +shockstall +shoddiness +shoe +shoebill +shoehorn +shoelace +shoemaker +shoemaking +shoer +shoeshine +shoeshop +shoestring +shoetree +shofar +shogun +shogunate +shohet +shoji +shole +shook +shool +shoon +shooter +shop +shopful +shopgirl +shophar +shopkeeper +shoplifter +shoplifting +shopman +shopped +shopper +shopping +shoptalk +shopwalker +shopwindow +shopwoman +shoran +shore +shoreline +shoring +shortage +shortbread +shortcake +shortcoming +shortcut +shortener +shortening +shortfall +shorthand +shorthorn +shortia +shortie +shortness +shortstop +shortwave +shorty +shot +shote +shotgun +shott +shotting +shoulder +shouldna +shouse +shout +shovel +shovelboard +shoveler +shovelful +shovelhead +shovelnose +shover +showboat +showbread +showcase +showdown +shower +showeriness +showgirl +showiness +showing +showjumping +showman +showmanship +showoffishness +showpiece +showplace +showroom +shp +shpt +shr +shraddha +shrapnel +shreadhead +shred +shredder +shrew +shrewdie +shrewdness +shrewishness +shrewmouse +shriek +shrieker +shrievalty +shrieve +shrift +shrike +shrillness +shrimp +shrimper +shrine +shrinkage +shrinker +shroff +shroud +shrub +shrubbery +shrubbiness +shtg +shtreimel +shuck +shucker +shucks +shuffleboard +shufty +shuggy +shul +shulwar +shumal +shunner +shunter +shuntwinding +shusher +shutdown +shuteye +shutoff +shutout +shutter +shuttering +shuttle +shuttlecock +shwa +shyness +shypoo +shyster +si +siacle +sial +sialagogue +sialid +siamang +siamoise +sib +siberite +sibilance +sibilancy +sibling +sibship +sibyl +siccative +sice +siciliano +sickbay +sickener +sickie +sickle +sicklebill +sickleweed +sickliness +sickness +sickroom +sicle +siddur +side +sideband +sidebar +sideboard +sidebone +sidecar +sidecheck +sidehead +sidehill +sidekick +sidelight +sideline +sideman +siderite +siderocyte +siderographer +siderography +siderolite +siderophilin +sideroscope +siderosis +siderostat +sidesaddle +sideshake +sideshow +sideslip +sidesman +sidespin +sidestick +sidestroke +sideswipe +sideswiper +sidewalk +sidewall +sideway +sidewheel +sidewheeler +sidewinder +siding +siege +siemens +sienna +sierra +siesta +sieur +sieve +sifaka +sifter +sig +siganid +sigher +sight +sighter +sightlessness +sightliness +sightscreen +sigil +sigillation +sigla +siglos +sigma +sigmation +sigmatism +sigmoidoscope +sign +signal +signalman +signalment +signatory +signature +signboard +signet +significance +significancy +signification +significativeness +significs +signor +signora +signore +signorina +signorino +signory +signpost +sika +sike +siker +sikra +silage +sild +silence +silencer +silentness +silesia +silex +silhouette +silica +silicate +silication +silicide +siliciferous +silicification +silicium +silicle +silicon +silicone +silicosis +siliqua +silique +silk +silkaline +silkiness +silkscreen +silkweed +silkworm +sill +sillabub +sillcock +siller +sillimanite +silliness +silo +siloxane +silt +siltation +siltstone +silundum +silurid +silva +silvanity +silver +silverberry +silverer +silverfish +silverizer +silverleaf +silverness +silverpoint +silverrod +silverside +silversmith +silversmithing +silvertail +silverware +silverweed +silverwork +silviculture +silviculturist +sim +sima +simar +simarouba +simba +simianity +similarity +simile +similitude +simiousness +simitar +simoleon +simoniac +simonist +simony +simoom +simp +simpleton +simplicity +simplism +simpulum +simsim +simulacre +simulacrum +simular +simulation +simulator +simultaneity +simultaneousness +sin +sinalbin +sinanthropus +sinapine +sinapism +sincereness +sincerity +sinciput +sindon +sine +sinecure +sinecureship +sinecurism +sinecurist +sinew +sinewiness +sinfonia +sinfonietta +sinfulness +singability +singableness +singer +singingfish +singleness +singlestick +singlesticker +singlet +singleton +singletree +singsong +singspiel +singularity +singularization +singularness +singultus +sinh +sinhalite +sinigrin +sinisterness +sinistrality +sinistrocularity +sinistrogyration +sinkage +sinker +sinkhole +sinking +sinlessness +sinner +sinnet +sinningness +sinopis +sinter +sinuation +sinuosity +sinuousness +sinus +sinusitis +sinusoid +siper +siphon +siphonage +siphonophore +siphonostele +sipper +sippet +sipunculid +sir +sirdar +sire +siree +siren +siriasis +sirloin +sirocco +sirop +sirrah +sirup +sirvente +sis +sisal +siscowet +siskin +sissonne +sissy +sister +sisterhood +sisterliness +sistrum +sitar +sitarist +sitatunga +sitcom +site +sitella +sitfast +sitology +sitomania +sitosterol +sitter +sitting +situation +situla +situs +situtunga +sitzkrieg +sitzmark +siwash +six +sixain +sixmo +sixpence +sixte +sixteen +sixteenmo +sixty +sizableness +sizar +sizarship +size +sizeableness +sizer +siziness +sizing +sizzler +sjambok +skald +skaldship +skat +skate +skateboard +skatemobile +skatepark +skater +skatole +skean +skedaddler +skeech +skeet +skeg +skeif +skeigh +skein +skeleton +skeletonization +skeletonizer +skelf +skellum +skelly +skep +skepful +skeptic +skepticism +skeptophylaxis +skerrick +skerry +sketch +sketchability +sketchbook +sketcher +sketchiness +skete +skewback +skewer +skewerwood +skewing +skewness +ski +skiagraph +skiagrapher +skiamachy +skiascope +skiascopy +skiatron +skibob +skidlid +skidpan +skidway +skiff +skiffle +skiing +skijorer +skijoring +skilfulness +skill +skillet +skilletfish +skillfulness +skilling +skillion +skilly +skimmer +skimmia +skimming +skimpiness +skin +skinflint +skinflintiness +skinful +skinhead +skink +skinner +skinnery +skinniness +skiograph +skipdent +skipjack +skiplane +skipper +skippet +skipway +skirling +skirmish +skirmisher +skirret +skirt +skirter +skirting +skit +skittishness +skittle +skiver +skivvy +skivy +sklent +skokiaan +skolly +skouth +skua +skulduggery +skulker +skull +skullcap +skullduggery +skunk +skunkweed +skutterudite +sky +skycap +skydiver +skydiving +skyey +skyjacker +skylark +skylarker +skylight +skyline +skyphos +skypipe +skyrocket +skysail +skyscape +skyscraper +skysweeper +skyway +skywriter +skywriting +slab +slacker +slackness +slag +slaister +slaker +slalom +slander +slanderousness +slang +slanginess +slap +slapjack +slapper +slapshot +slapstick +slask +slat +slatch +slate +slater +slather +slatiness +slating +slattern +slaughter +slaughterer +slaughterhouse +slaughterman +slave +slaveholder +slaveholding +slaver +slavery +slavey +slavishness +slavocracy +slavocrat +slaw +sld +sleave +sleaziness +sled +sledge +sledgehammer +sleeker +sleep +sleepcoat +sleeper +sleepiness +sleeping +sleeplessness +sleepwalker +sleepwear +sleepyhead +sleet +sleetiness +sleeve +sleeving +sleigh +sleigher +sleight +slenderness +sleuth +sleuthhound +sley +slice +slicer +slickenside +slicker +slickness +slidableness +slider +slideway +slighter +slime +sling +slingback +slingshot +slipcase +slipcover +slipknot +slipnoose +slippage +slipper +slipperwort +slippiness +slipsheet +slipslop +slipsole +slipstick +slipstone +slipstream +slipware +slipway +sliver +slivovitz +slob +slobberer +sloe +slogan +sloganeer +slogger +sloid +sloop +sloot +slopingness +sloppiness +slopshop +slopwork +slosh +sloshiness +slot +slote +sloth +slothfulness +slotter +sloucher +slouchiness +slough +sloughiness +sloven +slovenliness +slowcoach +slowdown +slowness +slowpoke +slowworm +slub +slubberdegullion +sludge +slue +sluff +slug +slugabed +slugfest +sluggard +sluggardly +slugger +sluggishness +sluice +sluicegate +sluiceway +sluit +slum +slumberer +slumberland +slumberousness +slumgullion +slumlord +slummer +slurried +slurry +slurrying +slush +slushiness +sluttishness +slyness +slype +smack +smacker +smackeroo +smallage +smallboy +smallholding +smallpox +smallsword +smalt +smaltite +smalto +smaragd +smaragdite +smartie +smasher +smatch +smatter +smatterer +smattering +smaze +smearcase +smearer +smeariness +smeek +smeller +smelliness +smelter +smeltery +smew +smidgen +smiercase +smilax +smile +smirk +smirker +smit +smitch +smiter +smith +smithery +smithsonite +smithy +smock +smocking +smog +smoke +smokechaser +smokeho +smokehouse +smokejack +smokejumper +smokelessness +smoker +smokestack +smoking +smoko +smolt +smoodger +smoothbore +smoother +smoothhound +smoothie +smoothness +smoothy +smorebro +smorgasbord +smriti +smudginess +smuggler +smugness +smytrie +snack +snackette +snaffle +snafu +snag +snaggletooth +snail +snailfish +snailflower +snailing +snake +snakebird +snakebite +snakefish +snakefly +snakehead +snakemouth +snakeroot +snakeskin +snakeweed +snakiness +snapback +snapdragon +snapline +snapout +snapper +snapperback +snappiness +snappishness +snapshot +snare +snarer +snarler +snash +snatcher +snath +snazziness +sneakbox +sneaker +sneakiness +sneck +snecker +sneer +sneerer +sneerfulness +sneesh +sneezewort +snell +snib +snick +snicker +snickersnee +snicket +snideness +sniffer +sniffiness +sniffler +sniffles +snifter +snigger +sniggerer +snipe +snipefish +sniper +sniperscope +snippet +snippetiness +snippiness +snit +sniveler +sniveller +snob +snobbery +snobbiness +snobbism +snollygoster +snood +snook +snooker +snool +snooper +snooperscope +snoose +snoot +snootiness +snoozer +snorkel +snorter +snot +snottiness +snout +snow +snowball +snowbell +snowberry +snowbird +snowblink +snowbush +snowcap +snowcreep +snowdrift +snowdrop +snowfall +snowfield +snowflake +snowiness +snowman +snowmast +snowmobile +snowpack +snowplough +snowplow +snowshed +snowshoe +snowshoer +snowslide +snowstorm +snubber +snubbiness +snuffbox +snuffer +snuffiness +snuffler +snuggery +snuggies +snugness +snye +soakage +soakaway +soaker +soap +soapbark +soapberry +soapbox +soapfish +soapolallie +soapstone +soapwort +soarer +soave +sobber +soberer +soberness +sobriety +sobriquet +socage +socager +soccer +sociability +sociableness +socialisation +socialism +socialist +socialite +sociality +socialization +socializer +society +sociobiology +sociogenesis +sociogram +sociol +sociolinguistics +sociological +sociologism +sociologist +sociology +sociometry +sociopath +sociopathy +sock +sockdologer +sockeroo +socket +sockeye +socklessness +socle +socman +sod +soda +sodalite +sodality +sodamide +sodbuster +soddenness +sodium +sodomite +sofa +sofar +soffit +soffritto +softa +softball +softboard +softener +softhead +softie +softness +software +softwood +softy +soh +soil +soilage +soilure +soirae +soiree +soja +sojourn +soke +sokeman +sokemanry +soken +sol +solace +solacer +solan +solander +solano +solanum +solarimeter +solarism +solarist +solarium +solarization +solatium +soldan +solder +soldier +soldierfish +soldiership +soldiery +soldo +solecism +solemnise +solemnity +solemnization +solemnizer +solemnness +solenodon +solenoid +soleplate +soleprint +solfage +solfatara +solfeggio +solferino +solicitor +solicitorship +solicitude +solidago +solidarity +solidifiability +solidifiableness +solidification +solidifier +solidness +solidomind +solidus +solifidian +solifidianism +solifluction +soliloquiser +soliloquy +soling +soliped +solipsism +solitaire +solitude +sollar +solleret +sollicker +solmization +solo +soloist +solonchak +solonetz +solstice +solubility +solubleness +solum +solute +solution +solutizer +solv +solvation +solvency +solver +solvolysis +soma +somatism +somatologist +somatology +somatoplasm +somatopleure +somatotonia +somatotype +somberness +sombreness +sombrero +somersault +somite +sommelier +somnambulance +somnambulation +somnambulator +somnambulism +somnambulist +somniloquist +somniloquy +somnolence +somnolency +son +sonagram +sonar +sonarman +sonata +sonatina +sondage +sonde +sonderclass +sone +song +songbird +songfest +songfulness +songkok +songwriter +sonics +sonnet +sonneteer +sonnetisation +sonnetization +sonny +sonobuoy +sonometer +sonorant +sonorousness +sonship +soogee +sook +soom +soot +sooth +soother +soothfastness +soothingness +soothsayer +sootiness +sop +sopher +sophism +sophist +sophister +sophisticalness +sophistication +sophistry +sophomore +sophrosyne +sopor +soporiferousness +soppiness +sopranino +soprano +sora +soralium +sorb +sorbet +sorbitol +sorbol +sorbose +sorcerer +sorcery +sordidness +sordino +soredium +sorehead +soreheadedness +sorghum +sorgo +sori +sorites +sorner +soroban +soroptimist +sororate +sororicide +sorority +sorosis +sorption +sorrel +sorriness +sorrow +sorrower +sorrowfulness +sort +sorter +sortie +sortilege +sortition +sorus +sot +soteriology +sotie +sotol +sou +soubise +soubresaut +soubrette +soubriquet +souchong +souffle +souk +soul +soulfulness +sound +soundboard +soundbox +sounder +soundingness +soundlessness +soundness +soundpost +soundproofing +soundtrack +soup +soupbone +soupcon +soupfin +soupiere +souple +soupmeat +soupspoon +source +sourcefulness +sourdine +sourness +sourpuss +soursop +sourwood +sousaphone +sousaphonist +souslik +soutache +soutane +souter +souterrain +south +southeast +southeaster +southeasterner +souther +southerliness +southerner +southernliness +southernwood +southing +southland +southlander +southpaw +southwest +southwester +soutter +souvenir +sovereign +sovereignty +soviet +sovietdom +sovietism +sovkhoz +sovran +sowans +sowar +sowback +sowbelly +sowbread +sowcar +sowens +sox +soy +soybean +sozin +sp +spa +space +spaceband +spacecraft +spaceman +spaceport +spacer +spaceship +spacesuit +spacewalk +spaciality +spacing +spaciousness +spackle +spade +spadefish +spadeful +spader +spadework +spadix +spaeing +spaer +spaetzle +spaghetti +spahi +spale +spall +spallation +spaller +spalpeen +span +spancel +spandex +spandrel +spangle +spaniel +spanker +spanking +spanner +spanworm +spar +sparable +spareness +sparer +sparerib +sparger +sparid +sparingness +spark +sparker +sparkishness +sparkler +sparklet +sparks +sparling +sparrow +sparrowgrass +sparrowhawk +sparteine +sparver +spasm +spasmodism +spasmodist +spasmolysis +spasmophilia +spat +spatchcock +spate +spathe +spatiality +spatiography +spatterdash +spatterdock +spatterware +spatula +spatzle +spaulder +spavin +spawn +spawner +speakableness +speakeasy +speaker +speakership +spean +spear +spearer +spearfish +spearhead +spearman +spearmint +spearwort +spec +specialisation +specialism +specialist +speciality +specialization +specialty +speciation +specie +species +specification +specifier +specimen +speciosity +speciousness +speck +speckedness +speckle +specklessness +spectacle +spectacularism +spectacularity +spectator +specter +spectra +spectrality +spectralness +spectre +spectrobolometer +spectrochemistry +spectrocolorimetry +spectrogram +spectrograph +spectrographer +spectrography +spectroheliogram +spectroheliograph +spectrohelioscope +spectrology +spectrometer +spectrometry +spectrophotometer +spectrophotometry +spectropolarimeter +spectropolariscope +spectroradiometer +spectroscope +spectroscopist +spectroscopy +spectrum +speculation +speculativeness +speculator +speculum +speech +speechlessness +speechmaker +speechmaking +speechway +speed +speedball +speedboat +speedboating +speeder +speedfulness +speediness +speedingness +speedo +speedometer +speedster +speedwalk +speedway +speedwell +speel +speer +speiss +speleology +spelk +spellbinder +spelldown +speller +spellican +spelling +spelter +spelunker +spence +spencer +spender +spendthrift +speos +spere +spergillum +sperm +spermaceti +spermary +spermatheca +spermatid +spermatium +spermatocyte +spermatogenesis +spermatogonium +spermatophore +spermatophyte +spermatophytic +spermatorrhoea +spermatozoid +spermatozoon +spermicide +spermine +spermiogenesis +spermogonium +spermophile +spermophyte +sperrylite +spessartite +spewer +sphacelation +sphacelism +sphacelus +sphaeristerium +sphagnum +sphalerite +sphene +sphenodon +sphenogram +sphenographer +sphenographist +sphenography +spherality +sphere +sphericality +sphericity +spherics +spheroid +spheroidicity +spherometer +spherule +spherulite +sphincter +sphingomyelin +sphingosine +sphinx +sphragistic +sphragistics +sphygmogram +sphygmograph +sphygmography +sphygmomanometer +sphygmus +spica +spiccato +spice +spiceberry +spicebush +spicery +spicewood +spiciness +spick +spicula +spicule +spiculum +spider +spiderhunter +spiderling +spiderman +spiderwort +spiegeleisen +spiel +spieler +spier +spif +spiffiness +spignel +spigot +spike +spikedace +spikefish +spikelet +spikenard +spiker +spikiness +spile +spillage +spillikin +spillikins +spillover +spillpipe +spillway +spilosite +spilth +spina +spinacene +spinach +spincaster +spindle +spindleage +spindrift +spine +spinel +spinelessness +spinet +spinifex +spininess +spink +spinnability +spinnaker +spinner +spinneret +spinnery +spinney +spinning +spinny +spinode +spinosity +spinster +spinsterhood +spinthariscope +spinule +spira +spiracle +spiraea +spirality +spirantism +spirantization +spire +spirea +spirelet +spireme +spirillum +spirit +spiritedness +spiritism +spiritist +spiritlessness +spiritualisation +spiritualiser +spiritualism +spiritualist +spirituality +spiritualization +spiritualizer +spiritualty +spirituousness +spirket +spirketing +spirketting +spirochaete +spirochaetosis +spirochete +spirograph +spirogyra +spirometer +spirometry +spironolactone +spirt +spirula +spital +spitball +spitballer +spitchcock +spite +spitefulness +spitfire +spitsticker +spitter +spittle +spittoon +spitz +spitzenburg +spiv +splake +splanchnicectomy +splanchnology +splashback +splashboard +splashdown +splasher +splashiness +splat +splayfoot +spleen +spleenwort +splendidness +splendiferousness +splendor +splendour +splenectomy +splenitis +splenius +splenomegaly +spleuchan +splicer +spline +splint +splinter +splits +splittail +splitter +splodge +splore +splotch +splurge +splutterer +spode +spodumene +spoilage +spoiler +spoilfive +spoilsman +spoilsport +spokeshave +spokesman +spokeswoman +spoliation +spondee +spondulicks +spondulix +spondylitis +sponge +spongefly +sponger +spongillafly +spongin +spongioblast +spongocoel +sponsion +sponson +sponsor +spontaneity +spontaneousness +spontoon +spoof +spoofery +spook +spookiness +spool +spoom +spoon +spoonback +spoonbill +spoondrift +spooner +spoonerism +spoonful +spooniness +spoor +sporadicalness +sporadicity +sporadism +sporangium +spore +sporicide +sporocarp +sporocyst +sporocyte +sporogenesis +sporogonium +sporogony +sporophore +sporophyll +sporophyte +sporotrichosis +sporozoan +sporozoite +sporran +sport +sporter +sportfulness +sportiness +sportiveness +sports +sportscast +sportsman +sportsmanliness +sportsmanship +sportswear +sportswoman +sporulation +sporule +spot +spotlessness +spotlight +spottedness +spotter +spottiness +spotting +spousal +spouse +spousehood +spouter +spp +sprag +sprat +sprattle +spray +sprayer +spreader +sprechgesang +sprechstimme +spree +sprig +sprightliness +sprigtail +springald +springboard +springbok +springe +springer +springhaas +springhalt +springhead +springhouse +springiness +springing +springlet +springlock +springtail +springtime +springwood +sprinkler +sprinkling +sprint +sprit +sprite +spritehood +spritsail +sprocket +spruce +spruceness +sprue +spruiker +spruit +spud +spudder +spuggy +spumante +spume +spumone +spunkie +spunkiness +spunware +spur +spurge +spuriousness +spurrer +spurrey +spurrier +spurrite +spurry +spurter +spurtle +sputnik +sputum +spy +spyglass +sq +sqd +sqq +squab +squabbler +squacco +squad +squadder +squadron +squalene +squalidity +squalidness +squall +squaller +squalor +squama +squamation +squamosal +squamoseness +squamousness +square +squareface +squarehead +squareness +squarer +squaretail +squashiness +squassation +squatness +squatter +squatterdom +squattiness +squattocracy +squaw +squawbush +squawfish +squawk +squawker +squawroot +squeak +squeaker +squeal +squealer +squeamishness +squeegee +squeezer +squelcher +squelchingness +squeteague +squib +squid +squiffer +squiggle +squilgee +squill +squilla +squillagee +squillgee +squinancy +squinch +squinter +squintingness +squirarchy +squire +squirearch +squirearchy +squiredom +squireen +squireling +squirrel +squirrelfish +squirter +squit +squiz +squush +srac +sri +sruti +ss +stabile +stabilisation +stabiliser +stability +stabilivolt +stabilization +stabilizer +stable +stableboy +stableman +stableness +stabling +stacc +stachering +stack +stacker +stackering +stackfreed +stackyard +stacte +staddle +staddlestone +stade +stadholder +stadholderate +stadholdership +stadia +stadimeter +stadiometer +stadium +stadle +staff +staffer +staffman +stag +stage +stagecoach +stagecraft +stagehand +stager +stagflation +staggard +staggerbush +staggerer +staggers +staggy +staghound +staginess +staging +stagnance +stagnancy +stagnation +staidness +stainability +stainableness +stainer +stainlessness +stair +staircase +stairhead +stairway +stairwell +stake +stakeout +stalactite +stalag +stalagmite +stalagmometer +stalemate +staleness +stalk +stalker +stall +stallage +stallion +stalwartness +stamba +stamen +stamin +stamina +staminode +staminodium +staminody +stammel +stammerer +stammeringness +stammrel +stamnos +stampede +stampeder +stamper +stance +stancher +stanchion +standard +standardization +standardizer +standee +standfast +standing +standish +standoff +standout +standpipe +standpoint +standstill +stane +stanhope +stannary +stannate +stannite +stannum +stanza +stanzaic +stapelia +stapes +staph +staphylococcus +staphyloplasty +staphylorrhaphy +staphylotomy +staple +stapler +star +starboard +starch +starchiness +stardom +stardust +starfish +starflower +starkness +starlessness +starlet +starlight +starling +starriness +starter +startler +starvation +starveling +starver +starwort +stasidion +stasimon +stasis +stat +statampere +state +statecraft +statehood +statelessness +stateliness +statement +stater +stateroom +statesman +statesmanship +statfarad +stathenry +statics +station +stationer +stationery +stationmaster +statism +statist +statistic +statistician +statistics +statoblast +statocyst +statohm +statolatry +statolith +stator +statoscope +statuary +statue +statuette +stature +status +statute +statvolt +staurolite +stauropegion +stauroscope +stave +staves +stavesacre +staw +staybolt +stayer +staysail +std +stead +steadfastness +steadiness +steading +steak +steakhouse +stealability +stealage +stealer +stealing +stealth +stealthiness +steam +steamboat +steamer +steamie +steaminess +steampipe +steamroller +steamship +steamtightness +steapsin +stearate +stearin +stearoptene +stearrhea +steatite +steatolysis +steatopygia +steatorrhoea +stech +stedfastness +steed +steek +steel +steelhead +steeliness +steelmaker +steelmaking +steelman +steelwork +steelworker +steelworks +steelyard +steenbok +steening +steeper +steeple +steeplebush +steeplechase +steeplechaser +steeplechasing +steeplejack +steerage +steerageway +steerer +steersman +steeve +stegh +stegodon +stegomyia +stegosaur +stein +steinbok +stela +stele +stellarator +stellionate +stem +stemhead +stemma +stemmer +stemmery +stemson +stemware +stench +stencil +stenciler +stenciller +steno +stenograph +stenographer +stenography +stenosis +stenotype +stenotypist +stenotypy +stentor +step +stepbrother +stepchild +stepdame +stepdance +stepdancer +stepdancing +stepdaughter +stepfather +stephanite +stephanotis +stephead +stepladder +stepmother +stepparent +steppe +stepper +stepsister +stepson +stepstool +steptoe +ster +steradian +stere +stereobate +stereocamera +stereochemistry +stereochrome +stereochromy +stereognosis +stereogram +stereograph +stereography +stereoisomer +stereoisomerism +stereometry +stereomicroscopy +stereopair +stereophony +stereophotograph +stereophotography +stereopsis +stereopter +stereoptician +stereopticon +stereoscope +stereoscopist +stereoscopy +stereotaxis +stereotomist +stereotomy +stereotropism +stereotype +stereotypy +stereovision +sterigma +sterilant +sterileness +sterilisability +steriliser +sterility +sterilizability +sterilization +sterlet +sterling +sterlingness +sternbergia +sternite +sternpost +sternson +sternum +sternutation +sternutator +sternway +sternwheel +sternwheeler +steroid +sterol +stertor +stertorousness +stet +stethometry +stethoscope +stethoscopist +stethoscopy +stetson +stevedore +stew +steward +stewardess +stewardship +stewbum +stewpan +stewpot +stg +stge +sthenia +stibine +stibium +stibnite +stich +sticharion +stichic +stichometry +stichomythia +stick +stickability +sticker +stickful +stickiness +stickjaw +stickleback +stickler +stickout +stickpin +stickseed +sticktight +stickum +stickup +stickweed +stickwork +stickybeak +stiffneckedness +stiffness +stifler +stigma +stigmasterol +stigmatiser +stigmatism +stigmatization +stigmatizer +stigmatypy +stilb +stilbene +stilbestrol +stilbite +stilboestrol +stile +stiletto +stilettoing +stillage +stillbirth +stiller +stillicide +stillness +stilt +stilyaga +stime +stimulability +stimulant +stimulater +stimulation +stimulator +stimuli +stimulus +stimy +stingaree +stinger +stinginess +stingingness +stingo +stingray +stinker +stinkeroo +stinkhorn +stinkpot +stinkstone +stinkweed +stinkwood +stintedness +stinter +stipe +stipel +stipend +stipes +stipo +stippler +stipulation +stipulator +stipule +stirabout +stirk +stirlessness +stirpiculture +stirpiculturist +stirps +stirrup +stitch +stitcher +stitching +stitchwork +stitchwort +stithy +stiver +stlg +stoa +stoat +stoating +stob +stoccado +stock +stockade +stockateer +stockbreeder +stockbroker +stockbrokerage +stocker +stockfish +stockholder +stockhorn +stockiness +stockinet +stocking +stockishness +stockist +stockjobber +stockman +stockpiler +stockpot +stockrider +stockroom +stocktaking +stockyard +stodge +stogey +stogy +stoic +stoichiology +stoichiometry +stoicism +stokehold +stokehole +stoker +stokes +stollen +stolon +stolonization +stoma +stomach +stomachache +stomacher +stomack +stomata +stomate +stomatitis +stomatologist +stomatology +stomatoplasty +stomatopod +stomatotomy +stomodaeum +stomode +stomodeum +stomper +stone +stoneblindness +stoneboat +stonecast +stonecat +stonechat +stonecrop +stonecutter +stonecutting +stonefish +stonefly +stonelessness +stonemason +stonemasonry +stoner +stoneroller +stonewalling +stoneware +stonework +stoneworker +stonewort +stoniness +stooge +stook +stooker +stool +stooper +stopcock +stope +stoper +stopgap +stoping +stoplessness +stoplight +stopover +stoppability +stoppableness +stoppage +stopper +stopping +stopple +stops +stopwatch +stopwater +storability +storage +storax +storefront +storehouse +storekeeper +storer +storeroom +storey +storiette +stork +storksbill +storm +stormer +stormlessness +story +storyboard +storybook +storyteller +storytelling +stoting +stotinka +stotter +stound +stoup +stour +stoutness +stove +stovepipe +stover +stowage +stowaway +stowp +str +strabismus +strabotomy +straddler +strafer +straightedge +straightener +straightforwardness +straightjacket +straightness +strainedness +strainer +strait +straitjacket +straitness +strake +stramonium +strangeness +stranger +stranglehold +strangles +strangulation +strangury +strap +straphanger +straphanging +strapper +strass +strata +stratagem +strategics +strategist +strategos +strategus +strategy +strath +strathspey +straticulation +stratification +stratig +stratigrapher +stratigraphy +stratocracy +stratocrat +stratocumulus +stratopause +stratosphere +stratovision +stratum +stratus +stravaiger +straw +strawberry +strawboard +strawflower +strawworm +strawy +strayer +streak +streakedness +streaker +streakiness +stream +streamer +streaminess +streaming +streamlet +streamline +streamway +streek +street +streetcar +streetlight +streetwalker +streetwalking +strelitzia +strength +strengthener +strenuosity +strenuousness +strep +streptococcus +streptodornase +streptokinase +streptomyces +streptomycin +streptothricin +stress +stresslessness +stretchability +stretcher +stretto +streusel +streuselkuchen +stria +striation +strick +strickle +striction +stricture +stride +strider +stridor +stridulation +stridulousness +strife +strigil +strikeboard +strikebreaker +strikebreaking +strikeover +striker +string +stringboard +stringcourse +stringer +stringhalt +stringhaltedness +stringholder +stringiness +stringing +stringpiece +stripe +striper +striplight +stripling +stripper +striptease +stripteaser +stripteuse +striver +strix +strobe +strobila +strobilation +strobile +strobilus +stroboradiograph +stroboscope +stroboscopy +strobotron +stroganoff +stroke +stroking +stroller +stroma +stromateid +stromatolite +strongbark +strongbox +stronghold +strongman +strongness +strongpoint +strongroom +strongyle +strongylosis +strontia +strontian +strontianite +strontium +strop +strophanthin +strophanthus +strophe +strophoid +strophulus +strops +stroud +stroyer +structuralism +structuralist +structure +structurelessness +strudel +struggler +struma +strummer +strumousness +strumpet +strunt +strutter +strychnine +strychninism +stub +stubbed +stubber +stubbiness +stubble +stubbornness +stucco +stuccowork +stuccoworker +stud +studbook +studdie +studding +studdingsail +student +studentship +studfish +studhorse +studiedness +studier +studio +studiousness +studwork +stuffiness +stuffing +stuiver +stull +stum +stumer +stump +stumpage +stumper +stumpiness +stumpknocker +stunner +stunsail +stupa +stupe +stupefacient +stupefaction +stupendousness +stupidity +stupidness +stupor +sturdiness +sturgeon +sturt +sty +style +stylebook +stylelessness +stylet +stylisation +styliser +stylist +stylite +stylization +stylizer +stylobate +stylograph +stylography +stylolite +stylopodium +stylops +stylostixis +stylus +stymy +stypsis +styrax +styrene +su +suability +suasion +suasiveness +suavity +sub +subabbot +subability +subabsoluteness +subaccount +subacetate +subacidity +subacidness +subacridity +subacridness +subacumination +subadar +subadministration +subadministrator +subadvocate +subaeration +subaffluence +subage +subagency +subagent +subaggregation +subah +subalgebraist +subalimentation +suballiance +subalmoner +subaltern +subalternation +subalternity +subangularity +subangularness +subangulation +subantiqueness +subantiquity +subapparentness +subappearance +subapprobatiness +subapprobation +subarborescence +subarchitect +subarea +subarmor +subarousal +subarticle +subarticulateness +subarticulation +subassemblage +subassembly +subassociation +subattenuation +subattorney +subattorneyship +subaudibility +subaudibleness +subaudition +subauditor +subbailie +subbailiff +subbailiwick +subballast +subband +subbank +subbase +subbasement +subbass +subbeadle +subbias +subbreed +subbrigade +subbroker +subbromid +subbromide +subbureau +subcandidness +subcaptain +subcaptaincy +subcaptainship +subcarbide +subcase +subcash +subcashier +subcasing +subcasino +subcast +subcaste +subcategory +subcause +subcavity +subcell +subception +subch +subchairman +subchamberer +subchancel +subchapter +subchaser +subchief +subchloride +subcinctorium +subcircuit +subcity +subcivilization +subclan +subclass +subclause +subclavius +subclerk +subclerkship +subclimate +subclimax +subclique +subcollector +subcollectorship +subcommander +subcommandership +subcommendation +subcommissary +subcommissaryship +subcommission +subcommissioner +subcommissionership +subcompensation +subcompleteness +subcompletion +subconcaveness +subconcavity +subconcession +subconcessionaire +subconcessioner +subconference +subconformability +subconformableness +subconnation +subconscience +subconsciousness +subconservator +subconsideration +subconstellation +subconsul +subconsulship +subcontest +subcontinent +subcontract +subcontractor +subcontraoctave +subcorporation +subcortex +subcosta +subcouncil +subcover +subcreativeness +subcreek +subcrepitation +subcrest +subcrossing +subculture +subcurate +subcurator +subcuratorship +subcurrent +subcutaneousness +subcyanid +subcyanide +subdatary +subdeacon +subdeaconate +subdealer +subdebutante +subdefinition +subdelegate +subdelegation +subdelirium +subdemonstration +subdentation +subdepartment +subdeposit +subdepository +subdepot +subdeputy +subderivative +subdevil +subdiaconate +subdialect +subdiapason +subdichotomy +subdie +subdirector +subdirectorship +subdistich +subdistinction +subdistinctiveness +subdistrict +subdivineness +subdivision +subdoctor +subdolichocephalism +subdolichocephaly +subdominant +subdruid +subduableness +subdual +subduction +subduedness +subduer +subecho +subeditor +subeditorial +subeffectiveness +subelection +subelement +subendorsement +subengineer +subepoch +subequality +suberectness +suberin +suberization +subescheator +subessentialness +subexaminer +subexecutor +subextensibility +subextensibness +subface +subfacies +subfactor +subfactory +subfamily +subferryman +subfestiveness +subfield +subfigure +subfissure +subfloor +subflooring +subflora +subflush +subfoliation +subforeman +subforemanship +subform +subformation +subformativeness +subfossil +subfraction +subframe +subfreshman +subfumigation +subfunction +subgelatinization +subgelatinousness +subgeniculation +subgens +subgenus +subglobosity +subglobularity +subgod +subgoverness +subgovernor +subgovernorship +subgrade +subgranularity +subgrin +subgroup +subgum +subgyre +subgyrus +subhall +subhatchery +subhead +subheading +subheadquarters +subheadwaiter +subhealth +subherd +subhero +subhirsuness +subhorizontalness +subhouse +subhymenium +subhypothesis +subhysteria +subidea +subideal +subilium +subincision +subindex +subinfection +subinfeudation +subinfeudatory +subinflammation +subinfluent +subinsertion +subinspector +subinspectorship +subintention +subintercessor +subinterval +subintroduction +subiodide +subitem +subj +subjacency +subjack +subject +subjectification +subjection +subjectiveness +subjectivism +subjectivity +subjoinder +subjoint +subjudge +subjudgeship +subjugation +subjugator +subjunction +subking +subkingdom +sublapsar +sublapsarianism +subleader +sublease +sublecturer +sublegislation +sublegislature +sublessee +sublessor +sublibrarian +sublibrarianship +sublicense +sublid +sublieutenancy +sublieutenant +sublimableness +sublimation +sublimeness +sublimer +sublimity +sublot +sublustrousness +subluxation +submaid +subman +submanager +submanagership +submania +submanor +submarine +submariner +submarshal +submaster +submatrix +submaxilla +submeaning +submediant +submediation +submeeting +submember +submergence +submergibility +submersibility +submersion +submind +subminiaturization +submission +submissiveness +submolecule +submortgage +submucosa +submultiple +submuriate +subnaturalness +subnet +subnitrate +subnotation +subnote +subnucleus +subnumber +subnutritiousness +subobliqueness +subobscureness +subobsoleteness +subobtuseness +suboffice +subofficer +subofficial +subopaqueness +suboppositeness +suboptimum +suborbicularity +suborder +subordinary +subordination +subordinationism +subornation +suborner +suboverseer +suboxide +subpackage +subpagoda +subpanel +subparagraph +subparliament +subpart +subpartition +subpartitionment +subparty +subpass +subpastor +subpastorship +subpatron +subpatroness +subpattern +subpavement +subpectination +subpeduncle +subpellucidity +subpellucidness +subperiod +subphosphate +subphratry +subphylum +subpilosity +subpiston +subplacenta +subplant +subplot +subplow +subpoena +subpool +subpopulation +subport +subpost +subpostmaster +subpostmastership +subpostscript +subpreceptor +subpreceptorate +subpredicate +subpredication +subprefect +subprefecture +subprehensility +subprincipal +subprior +subpriorship +subproblem +subproctor +subproctorship +subprofessor +subprofessorate +subprofessoriate +subprofessorship +subprofitableness +subprotector +subprotectorship +subprovince +subpulverizer +subpurlin +subquality +subquarter +subquestion +subrace +subradiance +subradiancy +subradicness +subrail +subrange +subreader +subreason +subrebellion +subrector +subrectory +subreference +subregent +subregion +subregularity +subrelation +subreligion +subreport +subreption +subrigidity +subrigidness +subring +subrogation +subroot +subrotundity +subrotundness +subroutine +subrule +subruler +subsale +subsalinity +subsample +subsatiricalness +subsaturation +subschedule +subscheme +subschool +subscience +subscriber +subscribership +subscription +subscripture +subsecretary +subsecretaryship +subsect +subsection +subsecurity +subsegment +subsellium +subsensation +subsensuousness +subsept +subsequence +subseries +subservience +subserviency +subset +subsewer +subshaft +subsheriff +subshire +subshrub +subsibilance +subsibilancy +subsidence +subsider +subsidiariness +subsidization +subsidizer +subsidy +subsilicate +subsistence +subsizar +subsizarship +subsmile +subsneer +subsoil +subsolid +subsort +subsorter +subsovereign +subspace +subspecialist +subspecialization +subspecialty +subspecies +subsphere +subspontaneousness +subsquadron +substage +substance +substandardization +substantialism +substantiality +substantialness +substantiation +substantiator +substantive +substantiveness +substation +substituent +substitution +substock +substore +substoreroom +substory +substrate +substratosphere +substratum +substructure +subsulcus +subsulfate +subsulfid +subsulfide +subsulphid +subsulphide +subsumption +subsuperficialness +subsurety +subsyndicate +subsyndication +subsynod +subtangent +subtaxer +subteen +subtenancy +subtenant +subtepidity +subtepidness +subterfuge +subterrane +subterritory +subtext +subthrill +subtileness +subtilisation +subtiliser +subtitle +subtleness +subtlety +subtonic +subtopia +subtopic +subtotal +subtotem +subtower +subtracter +subtraction +subtrahend +subtranslucence +subtranslucency +subtransparentness +subtread +subtreasurer +subtreasurership +subtreasury +subtrench +subtriangularity +subtribe +subtriplication +subtruncation +subtrunk +subtunic +subtunnel +subtutor +subtutorship +subtype +subunequalness +subunit +subuniverse +suburb +suburbanisation +suburbanite +suburbanization +suburbia +subutopian +subvariety +subvassal +subvassalage +subvein +subvention +subversion +subversiveness +subversivism +subvertebrate +subverter +subverticalness +subvestment +subvicar +subvicarship +subvillain +subvitalisation +subvitalization +subvitreousness +subwar +subwarden +subwardenship +subway +subwink +subworker +subworkman +subzone +succah +succedaneum +succeeder +succentor +success +successfulness +succession +successiveness +successlessness +successor +succinate +succinctness +succinctorium +succinylsulfathiazole +succor +succorer +succory +succotash +succoth +succour +succourer +succuba +succubus +succulence +succulency +succumber +succussion +suckerfish +suckfish +suckler +suckling +sucrase +sucre +sucrier +sucrose +suction +sudarium +sudatorium +sudd +suddenness +sudor +sudoriferousness +suede +suer +suet +sufferableness +sufferance +sufferer +suffering +sufficiency +suffix +suffixion +sufflation +suffrage +suffragette +suffragettism +suffragist +suffumigation +suffusion +sugar +sugarbush +sugarhouse +sugariness +sugarplum +suggestedness +suggester +suggestibility +suggestibleness +suggestion +suggestiveness +sugh +sugi +suicide +suimate +suint +suit +suitcase +suite +suiting +suitor +sukiyaki +sukkah +sukkoth +sulcation +sulcus +sulfaguanidine +sulfamerazine +sulfanilamide +sulfantimonide +sulfapyrazine +sulfapyridine +sulfarsenide +sulfarsphenamine +sulfate +sulfathiazole +sulfation +sulfisoxazole +sulfite +sulfonamide +sulfonate +sulfonation +sulfone +sulfonic +sulfonmethane +sulfur +sulfureousness +sulfuret +sulfurization +sulfurousness +sullage +sullenness +sulphadiazine +sulphanilamide +sulphantimonide +sulphapyrazine +sulphapyridine +sulpharsenide +sulphate +sulphathiazole +sulphation +sulphatization +sulphide +sulphinyl +sulphisoxazole +sulphite +sulphonamide +sulphonate +sulphonation +sulphone +sulphonium +sulphonmethane +sulphonyl +sulphur +sulphuration +sulphurator +sulphureous +sulphurization +sulphurousness +sulphuryl +sultan +sultana +sultanate +sultanship +sultriness +sum +sumac +sumach +sumi +summa +summability +summand +summariness +summarisation +summariser +summarist +summarization +summarizer +summary +summation +summer +summerhouse +summerliness +summersault +summerset +summertime +summertree +summerwood +summit +summitry +summoner +summons +sumo +sumoist +sump +sumpter +sumptuousness +sun +sunbake +sunbather +sunbathing +sunbeam +sunberry +sunbird +sunbonnet +sunbow +sunbreak +sunburn +sunburst +sundae +sunderance +sundew +sundial +sundog +sundown +sundowner +sundress +sundriness +sundrops +sunfish +sunflower +sunglass +sunglow +sungrebe +sunhat +sunket +sunlessness +sunlight +sunn +sunniness +sunray +sunrise +sunroom +sunset +sunshade +sunshine +sunspot +sunspottedness +sunstar +sunstone +sunstroke +sunsuit +suntan +suntans +suntrap +sunup +suovetaurilia +superability +superableness +superabominableness +superabomination +superabstractness +superabsurdity +superabsurdness +superabundance +superaccumulation +superaccurateness +superachievement +superacidity +superacknowledgment +superacquisition +superactiveness +superactivity +superacuteness +superadaptableness +superaddition +superadequateness +superadministration +superadmirableness +superadmiration +superadornment +superaerodynamics +superaffiliation +superaffluence +superaffusion +superagency +superaggravation +superagitation +superalimentation +superalkalinity +superallowance +superaltar +superambition +superambitiousness +superanimality +superannuation +superannuity +superapology +superappreciation +superarbiter +superarduousness +superarrogance +superartificiality +superaspiration +superassertion +superassociate +superassumption +superastonishment +superattachment +superattainableness +superattendant +superattraction +superattractiveness +superauditor +superaveraness +superaward +superbazaar +superbelief +superbelievableness +superbenefit +superbenevolence +superbias +superblessedness +superblunder +superbness +superboldness +superbomb +superbrain +superbraveness +superbrute +supercabinet +supercalender +supercandidness +supercanonization +supercanopy +supercapability +supercapableness +supercapital +supercaption +supercargo +supercatastrophe +supercaution +supercavitation +supercensure +superceremoniousness +supercharger +superchivalrousness +superciliousness +supercilium +supercivilization +superclaim +superclass +supercoincidence +supercombination +supercommendation +supercommentary +supercommentator +supercommercialness +supercompetition +supercomplexity +supercomprehension +supercompression +superconduction +superconductivity +superconductor +superconfidence +superconfirmation +superconformableness +superconformist +superconformity +superconfusion +supercongestion +superconsequence +superconservativeness +supercontest +supercontribution +supercontrol +supercordialness +supercorporation +supercredit +supercrime +supercritic +supercriticalness +superculture +supercuriousness +supercycle +supercynicalness +superdanger +superdebt +superdecoration +superdeficit +superdeity +superdejection +superdelegate +superdelicateness +superdemand +superdemonstration +superdensity +superdeposit +superdevelopment +superdevilishness +superdevotion +superdiabolicalness +superdiplomacy +superdirection +superdiscount +superdistention +superdistribution +superdividend +superdivision +superdoctor +superdominant +superdonation +superdose +superdramatist +superdreadnought +superdubiousness +superduplication +supereconomy +supereducation +supereffectiveness +supereffluence +superego +superelaborateness +superelegance +superelegancy +superelevation +supereligibility +supereligibleness +supereloquence +supereminence +superemphasis +superendorsement +superenforcement +superenrollment +superepoch +supererogation +supererogator +superestablishment +superether +superethicalness +superevidence +superexaltation +superexaminer +superexcellence +superexcellency +superexcitation +superexcitement +superexcrescence +superexertion +superexpansion +superexpectation +superexpenditure +superexport +superexpression +superexpressiveness +superexquisiteness +superextension +superextremity +superfamily +superfarm +superfecundation +superfecundity +superfee +superfemale +superfemininity +superfetation +superfibrination +superficies +superfinance +superfiniteness +superfissure +superfit +superfix +superfleet +superflexion +superfluid +superfluidity +superfluity +superflux +superfoliation +superfolly +superformalness +superformation +superformidableness +superfulfillment +superfunction +superfusion +supergaiety +supergalaxy +supergallantness +supergenerosity +supergiant +supergloriousness +supergoddess +supergoodness +supergraduate +supergrant +supergratification +supergravitation +superguarantee +supergun +supergyre +superheartiness +superheater +superheresy +superhero +superhet +superhighway +superhumanity +superhumanness +superhumeral +superhypocrite +superidealness +superillustration +superimposition +superimprobableness +superincentive +superinclination +superinclusiveness +superincomprehensibleness +superincrease +superincumbence +superincumbency +superindependence +superindictment +superindifference +superindividualism +superindividualist +superinduction +superindulgence +superindustriousness +superindustry +superinference +superinfiniteness +superinfirmity +superinfluence +superinformality +superingeniousness +superingenuity +superinitiative +superinjection +superinjustice +superinnocence +superinquisitiveness +superinscription +superinsistence +superintendency +superintendent +superintenseness +superintensity +superintolerableness +superinundation +superinvolution +superiority +superirritability +superjurisdiction +superjustification +superknowledge +superl +superlaboriousness +superlactation +superlativeness +superlikelihood +superline +superliner +superload +superlogicality +superluxuriousness +supermalate +supermale +superman +supermarket +supermarvelousness +supermasculinity +supermaterial +supermedicine +supermentality +supermixture +supermolecule +supermoroseness +supermotility +supermystery +supernatation +supernation +supernationalism +supernationalist +supernaturalism +supernaturalness +supernecessity +supernegligence +supernormality +supernormalness +supernotableness +supernova +supernumerousness +supernutrition +superobedience +superobjection +superobligation +superobstinateness +superoffensiveness +superofficiousness +superopposition +superoptimist +superorder +superordination +superorganization +superornament +superoutput +superoxalate +superoxide +superoxygenation +superparasite +superparasitism +superpassage +superpatience +superpatriot +superpatriotism +superperfection +superperson +superphosphate +superpiety +superpiousness +superplausibleness +superpoliteness +superpolymer +superpopulatedness +superpopulation +superposition +superpositiveness +superpossition +superpower +superpraise +superprecariousness +superpreciseness +superpreparation +superprobability +superproduce +superproduction +superproportion +superpublicity +superpurgation +superpurity +superrace +superradicalness +superreaction +superrefinement +superreflection +superreform +superreformation +superregistration +superregulation +superreliance +superremuneration +superrequirement +superrespectability +superrespectableness +superresponsibility +superresponsibleness +superrestriction +superrighteousness +supersacrifice +supersafeness +supersafety +supersagaciousness +supersaint +supersalesman +supersalesmanship +supersanguinity +supersanity +supersarcasm +supersatisfaction +supersaturation +superscandal +superscription +superseaman +supersecret +supersecretion +supersecretiveness +supersecureness +superseder +supersedure +superselection +superseniority +supersensitisation +supersensitiser +supersensitiveness +supersensualism +supersensualist +supersensuality +supersensuousness +superseriousness +superservice +superserviceableness +supersession +supersevereness +superseverity +supershipment +supersimplicity +supersincerity +supersize +supersmartness +supersoil +supersolemnity +supersolemnness +supersolicitation +supersonics +supersovereignty +superspecies +superspecification +superspirituality +superstage +superstamp +superstandard +superstar +superstate +superstatesman +superstimulation +superstition +superstrain +superstratum +superstrenuousness +superstrictness +superstructure +superstylishness +supersubtlety +supersufficiency +supersulfate +supersulphate +supersurprise +supersuspicion +supersuspiciousness +supersweetness +supersympathy +supersyndicate +supersystem +supertanker +supertartrate +supertax +supertemptation +supertension +superthankfulness +superthoroughness +supertoleration +supertonic +supertotal +supertower +supertragedy +supertranscendentness +supertreason +supertunic +superunit +superunity +superuniversalness +superuniverse +superurgency +supervalue +supervastness +supervenience +supervenosity +supervestment +supervexation +supervictoriousness +supervictory +supervigilance +supervigorousness +supervision +supervisor +supervitality +supervitalness +supervolition +superwager +superwoman +superworldliness +superyacht +superzealousness +supination +supinator +supineness +suplex +supp +suppedaneum +supper +suppertime +supplantation +supplanter +supplejack +supplement +supplementer +suppleness +suppletion +suppliance +suppliantness +supplicant +supplication +supplier +supportability +supportableness +supporter +suppos +supposal +supposition +suppository +suppression +suppuration +supr +supralapsarian +supralapsarianism +supranationalism +supranaturalism +supranaturalist +supraprotest +supremacist +supremacy +supremeness +supremo +supremum +suq +sura +surah +surat +surbase +surcease +surcharge +surcharger +surcingle +surcoat +surd +sureness +surety +surf +surface +surfacer +surfactant +surfbird +surfboard +surfboarder +surfboarding +surfboat +surfcasting +surfeit +surfer +surffish +surfie +surfing +surfperch +surfrider +surg +surge +surgeon +surgeoncy +surgeonfish +surgery +suricate +surjection +surliness +surmiser +surmountableness +surmounter +surmullet +surname +surpassingness +surplice +surplus +surplusage +surprisal +surpriser +surprisingness +surra +surrealism +surrebuttal +surrebutter +surrejoinder +surrenderer +surrey +surrogate +surrogateship +surrogation +surrounder +surrounding +surtax +surtout +surv +surveillance +surveying +surveyor +surveyorship +survivability +survival +survivor +survivorship +susceptance +susceptibility +sushi +suslik +suspectedness +suspecter +suspender +suspendibility +suspense +suspensibility +suspension +suspensiveness +suspensoid +suspensor +suspensory +suspicion +suspiciousness +suspiration +susso +sustainer +sustainment +sustenance +sustentation +sustention +susu +susurration +susurrus +sutler +sutlership +sutra +suttee +suture +suzerain +suzerainty +swab +swabber +swag +swage +swager +swagman +swagsman +swain +swale +swallet +swallower +swallowtail +swallowwort +swami +swamp +swamper +swampland +swamy +swan +swanherd +swankiness +swannery +swanskin +swapper +swaraj +swarajism +swarajist +sward +swarf +swarm +swarmer +swarthiness +swartzite +swashbuckler +swatch +swath +swather +swatter +swayer +swearer +swearword +sweat +sweatband +sweatbox +sweater +sweatiness +sweatshop +sweatweed +swede +sweeny +sweepback +sweeper +sweepingness +sweeps +sweepstake +sweepstakes +sweetbread +sweetbrier +sweetener +sweetening +sweetheart +sweetie +sweetiewife +sweeting +sweetman +sweetmeat +sweetness +sweetsop +sweetweed +swellfish +swellheadedness +swelling +swerver +sweven +swifter +swiftie +swiftlet +swiftness +swig +swigger +swiller +swimmeret +swimming +swimmingness +swimsuit +swindler +swine +swineherd +swineherdship +swinepox +swingback +swingboat +swingle +swinglebar +swingletree +swingometer +swingtree +swinishness +swinker +swipple +switch +switchback +switchblade +switchboard +switcher +switcheroo +switchgirl +switchman +switchover +switchyard +swither +swivel +swiveltail +swivet +swizzle +swob +swollenness +swoose +swop +sword +swordbearer +swordbill +swordcraft +swordfish +swordman +swordmanship +swordplay +swordplayer +swordsman +swordsmanship +swordstick +swordtail +swotter +swound +swy +sybarite +sybaritism +sycamine +sycamore +syce +sycee +sycon +syconium +sycophant +sycosis +syenite +syke +syll +syllabary +syllabi +syllabication +syllabification +syllabism +syllable +syllabogram +syllabography +syllabub +syllabus +syllepsis +syllogisation +syllogiser +syllogism +sylph +sylphid +sylva +sylvanite +sylviculture +sylvite +sym +symbiont +symbiosis +symbol +symbolicalness +symbolics +symbolisation +symbolism +symbolist +symbologist +symbology +symmetalism +symmetallism +symmetricalness +symmetrisation +symmetrization +symmetry +sympathectomy +sympathetectomy +sympathin +sympathizer +sympathy +symphile +symphonette +symphonia +symphonisation +symphonist +symphonization +symphony +symphysis +symploce +sympodium +symposiarch +symposium +symptom +symptomatology +symptosis +synaeresis +synaesthesia +synagogue +synalepha +synalgia +synapse +synapsis +synapte +synaptene +synarchy +synarthrodia +synarthrosis +synaxarion +synaxarium +synaxary +synaxis +syncarp +syncarpy +synchro +synchrocyclotron +synchroflash +synchronisation +synchroniser +synchronism +synchronization +synchronizer +synchronoscope +synchronousness +synchroscope +synchrotron +syncline +synclinorium +syncopation +syncopator +syncope +syncretism +syncrisis +syncytium +synd +syndactylism +syndactylus +synderesis +syndesis +syndesmosis +syndet +syndeton +syndic +syndical +syndicalism +syndicate +syndicship +syndrome +synecdoche +synechia +synechist +synecology +synectics +syneresis +synergism +synergist +synergy +synesis +synesthesia +syngamy +syngenesis +synizesis +synkaryon +synod +synoekete +synonym +synonymity +synonymousness +synonymy +synophthalmia +synopsis +synoptist +synosteosis +synostosis +synovia +synovitis +syntactics +syntagma +syntality +syntax +synteresis +synthesis +synthesist +synthesization +synthesizer +synthetisation +synthetiser +synthetism +synthetizer +synthol +syntonisation +syntonization +syntonizer +syntype +syph +syphilis +syphilisation +syphilise +syphilization +syphilologist +syphilology +syphiloma +syphon +syr +syringa +syringe +syringomyelia +syrinx +syrphid +syrup +syssarcosis +syst +system +systematics +systematisation +systematiser +systematism +systematist +systematization +systematizer +systematology +systemisation +systemiser +systemization +systemizer +systole +syzygy +taata +tab +tabanid +tabard +tabaret +tabbinet +tabel +taber +tabernacle +tabes +tabescence +tabi +tabinet +tabla +tablature +table +tableau +tablecloth +tableful +tableland +tablespoon +tablespoonful +tablet +tableware +tabling +tablinum +tabloid +tabor +taborer +taboret +taborin +tabourer +tabret +tabularisation +tabularization +tabulation +tabulator +tacamahac +tace +tache +tacheometer +tacheometry +tachi +tachisme +tachistoscope +tachogram +tachograph +tachometer +tachyauxesis +tachycardia +tachygraph +tachygrapher +tachygraphist +tachygraphy +tachylyte +tachymeter +tachymetry +tachyon +tachyphylaxis +tachypnea +tachysterol +tacitness +taciturnity +tack +tacker +tacket +tackiness +tackle +tackler +tackling +tacmahack +tacnode +taco +taconite +tacpoint +tact +tactic +tactician +taction +tactlessness +tactus +tad +tadpole +tael +taenia +taeniacide +taeniafuge +taeniasis +taenidium +taenite +taffarel +taffeta +taffrail +taffy +tafia +tag +tagliarini +tagliatelle +taglock +tagmeme +tagrag +tahina +tahr +tahsil +tahsildar +taig +taiga +taiglach +tail +tailback +tailband +tailboard +tailer +tailgate +tailgater +tailing +taille +taillessness +taillight +tailor +tailorbird +tailpiece +tailpipe +tailplane +tailrace +tailskid +tailspin +tailstock +tailwater +tailwind +tain +taintlessness +taipan +taj +taka +takahe +takeoff +takeover +taker +takin +tal +talapoin +talc +tale +talebearer +talent +talented +taler +tales +talesman +talion +talipes +talipot +talisman +talkability +talkathon +talkativeness +talker +talkfest +talkie +tallage +tallboy +tallith +tallness +tallow +tallowiness +tallyho +tallyman +tallyshop +talon +taluk +talus +talweg +tam +tamable +tamale +tamandua +tamara +tamarack +tamarao +tamarau +tamarin +tamarind +tamarisk +tamas +tamasha +tambac +tambour +tamboura +tambourin +tambourine +tameability +tameableness +tamelessness +tamis +tammy +tamperer +tampion +tampon +tamponade +tampur +tan +tana +tanager +tanbark +tanbur +tandem +tang +tanga +tangelo +tangency +tangent +tangerine +tangibility +tangibleness +tangle +tangleberry +tanglement +tangler +tango +tangoreceptor +tangram +tanguile +tanh +tanist +tanistry +tank +tanka +tankage +tankard +tanker +tankful +tankship +tanna +tannage +tannate +tanner +tannery +tannin +tanning +tansy +tantalate +tantalisation +tantaliser +tantalite +tantalization +tantalum +tantalus +tantara +tantrum +tapa +tapaculo +tapadera +tapas +tape +tapeman +taperer +taperstick +tapestry +tapetum +tapeworm +taphephobia +taphole +taphouse +tapioca +tapiolite +tapir +tapis +tapper +tappet +tapping +taproom +taproot +taps +tapster +tar +taradiddle +taramasalata +tarantass +tarantella +tarantism +tarantist +tarantula +tarata +taraxacum +tarboosh +tarbrush +tarbuttite +tardigrade +tare +tarentism +targe +target +targeteer +tariff +tarlatan +tarn +tarnation +tarnkappe +taro +tarogato +tarok +tarot +tarp +tarpan +tarpaulin +tarpon +tarradiddle +tarragon +tarred +tarriance +tarrier +tarring +tarsia +tarsier +tarsometatarsus +tarsus +tart +tartan +tartar +tartarization +tartlet +tartness +tartrate +tartrazine +tarweed +tasimeter +task +taskmaster +taskmastership +taskmistress +taskwork +tass +tasse +tassel +tasseler +tasseller +tasset +tassie +taste +tastefulness +tastelessness +taster +tastiness +tatami +tater +tatouay +tatterdemalion +tattered +tattersall +tattiness +tatting +tattler +tattletale +tattoo +tattooer +tattooist +tau +taunter +taupe +taurobolium +tauromachy +tauromaquia +tautochrone +tautog +tautologism +tautologist +tautology +tautomer +tautomerism +tautomerization +tautonym +tav +tavern +taverner +taw +tawdriness +tawer +tawny +tawpy +taws +tawse +tawyer +tax +taxability +taxableness +taxation +taxeme +taxgathering +taxi +taxicab +taxidermist +taxidermy +taximeter +taxiplane +taxis +taxite +taxiway +taxon +taxonomer +taxonomist +taxonomy +taxpayer +taxpaying +tay +tayra +tazza +tb +tbs +tc +tcheckup +tchervonetz +tchr +te +tea +teaberry +teacake +teacart +teacher +teachership +teaching +teacup +teacupful +teahouse +teak +teakettle +teakwood +teal +team +teamer +teammate +teamster +teamwork +teapot +teapoy +tear +tearableness +teardown +teardrop +tearer +tearfulness +teariness +tearlessness +tearoom +teasableness +teasel +teaseler +teaseller +teaser +teashop +teaspoon +teaspoonful +teat +teataster +teatime +teazel +teazle +tecassir +tech +techiness +technetium +technic +technicality +technicalness +technician +technics +technique +technocracy +technography +technologist +technology +technostructure +tectonics +tectrix +tedder +teddy +tediousness +tedium +tee +teel +teemer +teemingness +teenager +teenybopper +teepee +teeterboard +teeth +teether +teething +teethridge +teetotaler +teetotalism +teetotum +tef +teff +teg +tegmen +tegula +tegument +teiglach +teil +teknonymy +tektite +tektosilicate +tela +telaesthesia +telamon +telangiectasis +telautography +tele +telecommunication +telecommunications +telecourse +teledu +telefilm +teleg +telega +telegnosis +telegony +telegram +telegraph +telegraphese +telegraphist +telegraphone +telegraphy +telekinesis +telemark +telemechanics +telemeter +telemetry +telemotor +telencephalon +teleologist +teleology +teleost +telepathist +telepathy +teleph +telephone +telephonist +telephonograph +telephony +telephotography +telephotometer +teleplasm +teleplay +teleport +teleprinter +teleran +telescope +telescopist +telescopy +telescript +telesis +telespectroscope +telestereoscope +telesthesia +telestich +telethermometer +telethermometry +telethon +teletranscription +teletube +teletypesetting +teletypewriter +teletypist +teleutosorus +teleutospore +television +televisor +telewriter +telex +telfer +telferage +teliospore +telium +teller +tellership +tellin +telltale +tellurate +telluride +tellurion +tellurite +tellurium +tellurometer +telly +telomerization +telophase +telotaxis +telpher +telpherage +telson +temblor +temerariousness +temerity +temp +temper +tempera +temperament +temperance +temperateness +temperature +tempest +tempestuousness +template +temple +templet +templon +tempo +temporality +temporalness +temporariness +temporisation +temporiser +temporization +temporizer +temporomaxillary +temptation +temptingness +tempura +ten +tenability +tenableness +tenace +tenaculum +tenaille +tenaim +tenancy +tenant +tenantry +tench +tendance +tendenciousness +tendency +tendentiousness +tenderability +tenderer +tenderfoot +tenderheartedness +tenderisation +tenderiser +tenderization +tenderizer +tenderloin +tenderness +tendon +tendril +tenebriousness +tenebrism +tenebrousness +tenement +tenesmus +tenet +tenia +teniacide +teniafuge +teniasis +tennantite +tenner +tennis +tenno +tenon +tenoner +tenonitis +tenor +tenorite +tenorrhaphy +tenositis +tenotomy +tenpin +tenpins +tenpounder +tenrec +tensegrity +tenselessness +tenseness +tensibility +tensibleness +tensileness +tensility +tensimeter +tensiometer +tension +tensity +tenson +tensor +tent +tentacle +tentage +tentation +tenter +tenterhook +tentmaker +tentorium +tenuis +tenuousness +tenure +teocalli +teosinte +tepal +tepe +tepee +tepefaction +tephra +tephrite +tephroite +tequila +ter +terahertz +teraph +terass +teratism +teratogenesis +teratogeny +teratology +teratoma +terbia +terbium +terce +tercel +tercet +terebene +terebinth +teredo +terephthalate +tergiversant +tergiversation +tergiversator +tergum +term +termagant +termer +terminability +terminableness +termination +terminator +terminism +terminist +terminologist +terminology +terminus +termitarium +termite +termor +tern +terne +ternion +terotechnology +terpene +terpineol +terr +terra +terrace +terracing +terrain +terramara +terrane +terrapin +terrarium +terrazzo +terreplein +terret +terribleness +terricolous +terrier +terrifier +terrine +territorialisation +territorialism +territorialist +territoriality +territorialization +territory +terror +terrorisation +terroriser +terrorism +terrorist +terrorization +terrorizer +terry +terseness +tertianship +tervalence +tervalency +terzetto +teschenite +tesla +tessellation +tessera +tesseract +tessitura +testa +testability +testament +testator +testee +tester +testes +testicle +testification +testifier +testimonial +testimony +testis +testmatch +teston +testosterone +testudo +tetanisation +tetanization +tetanus +tetany +tetartohedrism +tetchiness +teth +tether +tetherball +tetra +tetrabasicity +tetrabrach +tetracaine +tetracene +tetrachloride +tetrachloroethylene +tetrachloromethane +tetrachord +tetracycline +tetrad +tetradrachma +tetradymite +tetrafluoroethylene +tetragon +tetragonalness +tetragram +tetrahedrite +tetrahedron +tetrahydrate +tetrahydropyrrole +tetralite +tetralogy +tetramer +tetramerism +tetrameter +tetramethyldiarsine +tetranitrate +tetranitromethane +tetraplegia +tetraploidy +tetrapod +tetrapody +tetrapylon +tetrarch +tetrarchate +tetrasporangium +tetraspore +tetrastich +tetrasyllable +tetravalence +tetravalency +tetrazene +tetrode +tetroxide +tetryl +tetter +teughness +tew +texas +text +textbook +textile +textualism +textualist +texture +tfr +tg +tgn +thack +thak +thalamencephalon +thalamium +thalamotomy +thalamus +thalassocracy +thalassographer +thalassography +thaler +thalidomide +thallium +thallophyte +thallus +thalweg +thana +thanatophobia +thanatopsis +thane +thanker +thankfulness +thanklessness +thanksgiver +thanksgiving +thar +tharm +thatch +thatching +thaumatology +thaumatrope +thaumaturge +thaumaturgy +theanthropism +theanthropist +thearchy +theat +theater +theatre +theatricalisation +theatricality +theatricalization +theatricalness +theatrician +theatrics +theatticalism +thebaine +theca +thecium +theelin +theft +theftproof +thegn +theine +theism +theist +thelitis +thema +theme +thenar +thenardite +theobromine +theocentricism +theocentricity +theocentrism +theocracy +theocrasy +theodicy +theodolite +theogonist +theogony +theol +theolatry +theologian +theologisation +theologiser +theologization +theologizer +theologue +theology +theomachy +theomancy +theomania +theomaniac +theomorphism +theonomy +theopathy +theophagy +theophany +theophobia +theophylline +theor +theorbist +theorbo +theorem +theoretician +theoretics +theorisation +theoriser +theorist +theory +theosophism +theosophist +theosophy +therapeutics +therapist +therapsid +therapy +therblig +therianthropism +theridiid +theriomorph +therm +thermaesthesia +thermalgesia +therme +thermel +thermesthesia +thermion +thermionics +thermistor +thermite +thermoanesthesia +thermobarograph +thermobarometer +thermochemist +thermochemistry +thermocline +thermocouple +thermocurrent +thermodiffusion +thermodynamics +thermoelectricity +thermoelectrometer +thermoelectron +thermogalvanometer +thermogenesis +thermogeography +thermograph +thermography +thermojunction +thermolability +thermoluminescence +thermolysis +thermomagnetic +thermometer +thermometry +thermomotor +thermophile +thermophone +thermophosphorescence +thermopile +thermoplasticity +thermoscope +thermosiphon +thermosphere +thermostability +thermostat +thermostatics +thermotank +thermotaxis +thermotherapy +thermotropism +therophyte +theropod +thesaurus +thesis +theta +theurgist +theurgy +thew +thiamine +thiasos +thiasus +thiazine +thiazole +thickener +thickening +thicket +thickhead +thickheaded +thickleaf +thickness +thief +thievery +thievishness +thigger +thigh +thighbone +thigmotaxis +thigmotropism +thill +thimble +thimbleful +thimblerig +thimblerigger +thimbleweed +thimblewit +thimerosal +thing +thingamabob +thingstead +thingumabob +thingumajig +thingumbob +thinkableness +thinker +thinking +thinner +thinness +thioalcohol +thioaldehyde +thioantimonate +thioantimonite +thioarsenate +thioarsenite +thiobacillus +thiocarbamide +thiocyanate +thiocyanogen +thioester +thiofuran +thiol +thionate +thionation +thionin +thionine +thionyl +thiopental +thiopentone +thiophen +thiophene +thiophenol +thiosinamine +thiosulphate +thiouracil +thiourea +thirlage +thirst +thirster +thirstlessness +thirteen +thirty +thistle +thistledown +thole +tholos +tholus +thomisid +thong +thoracectomy +thoracopagus +thoracoplasty +thoracostomy +thoracotomy +thorax +thoria +thorianite +thorite +thorium +thorn +thornback +thornbill +thornhead +thornlessness +thoron +thoroughbredness +thoroughfare +thoroughgoingness +thoroughness +thoroughpin +thoroughwort +thorp +thoughtlessness +thousand +thrall +thrasher +thrashing +thrave +thrawnness +thread +threader +threadfin +threadfish +threadiness +threadworm +threaper +threat +threatener +three +threedimensionality +threepence +thremmatology +threnode +threnodist +threnody +threonine +thresher +threshold +thrift +thriftlessness +thriftshop +thrill +thriller +thrippence +thrips +thriver +throat +throatiness +throatlash +throatlatch +throe +thrombectomy +thrombin +thromboclasis +thrombocyte +thromboembolism +thrombogen +thrombokinase +thrombolysis +thrombophlebitis +thromboplastin +thrombosis +thrombus +throne +throng +thronos +throstle +throttle +throttler +throughput +throughway +throwaway +throwback +thrower +throwster +thrummer +thrummy +thruput +thrush +thruster +thruway +thsant +thud +thug +thuggee +thuggery +thuja +thulia +thulium +thumb +thumber +thumbkin +thumbnail +thumbnut +thumbprint +thumbscrew +thumbstall +thumbtack +thump +thunder +thunderbird +thunderbolt +thunderbox +thunderclap +thundercloud +thunderer +thunderhead +thunderpeal +thundershower +thundersquall +thunderstick +thunderstone +thunderstorm +thurible +thurifer +thuya +thwacker +thwarter +thylacine +thyme +thymidine +thymine +thymol +thymus +thyratron +thyristor +thyroadenitis +thyrocalcitonin +thyrocarditis +thyroidectomy +thyroiditis +thyroidotomy +thyrorion +thyrosis +thyrotome +thyrotoxicity +thyrotoxicosis +thyrotropin +thyroxine +thyrse +thyrsus +thysanuran +ti +tiara +tibia +tibiotarsus +tic +tical +tick +ticker +ticket +ticking +tickler +ticklishness +ticktack +ticktock +tid +tidbit +tiddler +tiddlywinks +tidehead +tideland +tidelessness +tidemark +tiderip +tidewaiter +tidewater +tideway +tidiness +tidying +tidytips +tieback +tiebreaker +tieclasp +tiemannite +tiepin +tier +tierce +tiercel +tierceron +tiff +tiffany +tiffin +tiger +tigereye +tigerfish +tigerishness +tightener +tightness +tightrope +tightwad +tiglon +tigon +tigress +tike +tiki +tikoloshe +til +tilapia +tilbury +tilde +tile +tilefish +tilery +tiling +tillage +tillandsia +tiller +tillerman +tillicum +tillite +tilth +tilthead +tiltyard +timarau +timbal +timbale +timber +timberhead +timbering +timberjack +timberland +timberwork +timberyard +timbre +timbrel +time +timecard +timekeeper +timekeeping +timeliness +timepiece +timepleaser +timer +timesaver +timeserver +timeservingness +timetable +timework +timeworker +timidity +timidness +timing +timocracy +timorousness +timothy +tin +tinamou +tincal +tinct +tincture +tinder +tinderbox +tine +tinea +tineid +tinerer +tinfoil +ting +tinglass +tingler +tinhorn +tininess +tinker +tinkler +tinkling +tinman +tinner +tinniness +tinning +tinnitus +tinsel +tinsmith +tinstone +tint +tintack +tinter +tintinnabulation +tintinnabulum +tintlessness +tintometer +tintometry +tintype +tinware +tinwork +tinworks +tipburn +tipcart +tipcat +tipi +tipper +tippet +tippler +tipsiness +tipstaff +tipster +tirade +tirailleur +tirelessness +tirewoman +tirl +tiro +tirrivee +tisane +tissue +tiswin +titan +titanate +titania +titanite +titanium +titanosaur +titanothere +titbit +titer +titfer +tithe +tither +tithing +titi +titillation +titivation +titivator +titlark +title +titleholder +titlist +titman +titmouse +titrant +titration +titre +tittivation +tittivator +tittle +titubation +titularity +tizwin +tizzy +tlo +tm +tmesis +toad +toadeater +toadfish +toadflax +toadishness +toadstone +toadstool +toady +toadyism +toast +toaster +toastiness +toastmaster +tob +tobacco +tobacconist +tobe +tobira +toboggan +toby +toccata +tocher +tocodynamometer +tocology +tocometer +tocopherol +tocsin +tod +today +toddler +toddy +tody +toe +toea +toecap +toehold +toenail +toeshoe +toff +toffee +toft +tog +toga +togated +togetherness +toggery +toggle +toggler +togue +toheroa +tohubohu +toil +toile +toilet +toiletry +toilette +toilsomeness +toilworn +tokay +token +tokenism +tokology +tokoloshe +tokonoma +tola +tolan +tolbooth +tolbutamide +tole +tolerability +tolerableness +tolerance +toleration +tolerationism +tolerationist +tolerator +toleware +tolidine +tollbooth +toller +tollgate +tollhouse +tollkeeper +tollman +tolly +tolu +toluate +toluene +toluide +toluidine +toluol +toluyl +tolyl +tom +tomahawk +tomahawker +tomalley +toman +tomatillo +tomato +tomb +tombac +tombola +tombolo +tomboy +tombstone +tomcat +tome +tomentum +tomfool +tomfoolery +tomfoolishness +tomium +tommy +tommyrot +tomogram +tomograph +tomography +tomorrow +tompion +tomtit +ton +tonalist +tonality +tondo +tone +tonelada +tonelessness +toneme +toner +tonetician +tonetics +tonette +tonga +tongman +tongue +tonguefish +tongues +tonguing +tonic +tonicity +tonight +tonishness +tonite +tonk +tonlet +tonn +tonnage +tonne +tonneau +tonnishness +tonometer +tonsil +tonsillectome +tonsillectomy +tonsillitis +tonsillotomy +tonsure +tontine +tonus +tool +toolbox +tooler +toolholder +tooling +toolmaker +toolmaking +toolroom +toolshed +toom +toon +tooter +tooth +toothache +toothbrush +toothlessness +toothpaste +toothpick +toothsomeness +toothwort +toots +tootsy +top +toparch +topaz +topazolite +topcastle +topcoat +topee +toper +topflighter +topgallant +toph +tophamper +tophus +topi +topic +topicality +topknot +toplessness +topliner +toploftiness +topman +topmast +topminnow +topog +topographer +topography +topologist +topology +toponym +toponymy +topos +topotype +topper +topping +toprail +tops +topsail +topside +topsmelt +topsoil +topspin +topsyturviness +toque +tor +toran +torbanite +torbernite +torc +torch +torchare +torchbearer +torchier +torchwood +toreador +torero +toreutics +tori +torii +tormentil +tormentor +tornado +tornaria +tornillo +toro +toroid +torpedo +torpedoman +torpor +torque +torques +torr +torrent +torridity +torridness +torsade +torse +torsel +torsi +torsibility +torsion +torsk +torso +tort +torte +torteau +tortellini +torticollis +tortilla +tortillon +tortoise +tortoiseshell +tortoni +tortricid +tortuosity +tortuousness +torus +tosh +tosspot +tossup +tot +total +totalitarianism +totality +totalization +totalizer +totaquine +totem +totemism +totemist +toter +totient +toting +totipalmation +totterer +toucan +toucanet +touchableness +touchback +touchdown +toucher +touchhole +touchiness +touchingness +touchline +touchmark +touchstone +touchwood +toughener +toughie +toughness +toughy +toupee +tour +touraco +tourbillion +tourelle +tourer +tourism +tourist +touristry +tourmaline +tournament +tournedos +tourney +tourniquet +touter +tovarich +tovarisch +towage +towardliness +towardness +towbar +towboat +towel +towelling +tower +towerman +towhead +towhee +towkay +towline +towmond +town +townee +towner +townscape +township +townsman +townspeople +townswoman +townwear +towpath +towrope +towser +tox +toxaemia +toxalbumin +toxaphene +toxemia +toxicant +toxicity +toxicol +toxicologist +toxicology +toxicosis +toxin +toxiphobia +toxoid +toxophilite +toxophily +toxoplasmosis +toy +toyer +toyon +tp +tpd +tph +tpi +tpm +tr +trabecula +tracasserie +trace +traceability +traceableness +traceably +tracer +tracery +trachea +tracheal +tracheation +tracheid +tracheitis +trachelium +tracheobronchial +tracheophyte +tracheoscopist +tracheostomy +tracheotomist +tracheotomy +trachle +trachoma +trachybasalt +trachyte +tracing +track +tracker +tracklayer +tracklessness +trackman +tracksuit +tract +tractate +tractility +traction +tractor +tractrix +trad +trade +trademark +trader +tradership +tradescantia +tradesman +tradeswoman +tradition +traditionalism +traditionalist +traditionist +traditor +traducement +traducian +traducianism +traffic +trafficability +trafficator +tragacanth +tragedian +tragedienne +tragedy +tragicalness +tragicomedy +tragion +tragopan +tragus +trailblazer +trailboard +trailer +trainband +trainbearer +trainee +trainer +training +trainline +trainman +trainpipe +trainshed +trait +traitor +traitorousness +traitorship +trajection +trajectory +tram +tramcar +tramline +trammeler +trammeller +trammie +tramontana +trampler +trampoline +trampoliner +trampolinist +tramroad +tramway +trance +tranche +trangam +trank +trannie +tranquilization +tranquilizer +tranquillizer +tranquilness +trans +transactinide +transaction +transactor +transcalency +transceiver +transcendence +transcendentalisation +transcendentalism +transcendentalist +transcendentalization +transchanger +transcoloration +transcolouration +transcriber +transcript +transcription +transculturation +transcurvation +transducer +transduction +transection +transelement +transelementation +transenna +transept +transf +transfashion +transfd +transferability +transferal +transferase +transferee +transference +transferor +transferral +transferrer +transferrin +transfiguration +transfigurement +transfiltration +transfixion +transflux +transformation +transformer +transformism +transformist +transfuser +transfusion +transgression +transhipment +transhumance +transience +transientness +transilience +transillumination +transilluminator +transistor +transit +transitable +transition +transitiveness +transitivity +transitoriness +transitron +transl +translatability +translatableness +translater +translation +translator +translight +translocation +translucence +translucency +translunary +transmethylation +transmigrant +transmissibility +transmission +transmissiveness +transmissivity +transmittal +transmittance +transmittancy +transmitter +transmogrification +transmuscle +transmutability +transmutableness +transmutation +transmuter +transom +transp +transparency +transparentness +transpenetration +transpeptidation +transpiration +transponder +transponibility +transportation +transposability +transposal +transposer +transposition +transprocess +transrectification +transshipment +transubstantiation +transubstantiationalist +transudate +transudation +transvaluation +transvection +transversal +tranter +trap +trapanner +trapball +trapeze +trapezium +trapezius +trapezohedron +trapezoid +trapezophoron +trapper +trappiness +traprock +trapshooter +trapshooting +trapunto +trash +trashiness +trass +trattoria +trauchle +trauma +traumatism +traumatization +trav +travail +trave +traveler +traveller +traversal +traverser +travertine +travesty +travois +trawl +trawlability +trawler +tray +traymobile +treacherousness +treachery +treacle +treacleberry +treader +treadle +treadler +treadmill +treadplate +treason +treasonableness +treasr +treasure +treasurer +treasury +treat +treatise +treatment +treaty +trebuchet +trecento +tredecillion +tree +treehopper +treelessness +treenail +treenware +treetop +trefah +trefoil +trehala +trehalose +treillage +trekker +trellis +trelliswork +trematode +trembler +trembles +tremendousness +tremie +tremolite +tremolo +tremor +tremulant +tremulousness +trenail +trench +trenchancy +trencher +trencherman +trend +trental +trepanation +trepang +trepanner +trephine +trepidation +treponema +treponematosis +treponemiasis +trespasser +tress +tressure +trestle +trestletree +trestlework +tret +trevally +trevette +trey +trf +triableness +triacetate +triacetyloleandomycin +triad +triadism +triage +trial +triangle +triangularity +triangulation +triangulator +triarchy +triaxiality +triazine +triazo +triazole +tribade +tribalism +tribalist +tribe +tribelet +tribesman +triblet +triboelectricity +tribology +triboluminescence +tribrach +tribromoethanol +tribulation +tribunal +tribunate +tribune +tribuneship +tributary +tribute +trice +triceps +triceratops +trichiasis +trichina +trichiniasis +trichinisation +trichinization +trichinosis +trichion +trichite +trichloride +trichloroacetaldehyde +trichloroethylene +trichloromethane +trichloronitromethane +trichocyst +trichogyne +trichologist +trichology +trichome +trichomonad +trichomoniasis +trichopteran +trichosis +trichotomy +trichroism +trichromat +trichromatism +trick +trickery +trickiness +trickishness +trickster +trickstering +tricktrack +triclad +triclinium +tricot +tricotine +tricrotism +trictrac +tricycle +trid +trident +tridimensionality +triduum +tridymite +triennium +triens +trier +trierarch +trierarchy +triethylamine +trifle +trifler +triflingness +trifluoperazine +trifluoride +trifluorochloromethane +trifolium +triforium +triga +trigamist +trigatron +trigger +triggerfish +triglyceride +triglyph +trigness +trigo +trigon +trigone +trigonometer +trigonometria +trigonometry +trigonum +trigraph +trihedron +trihydrate +triiodomethane +triiodothyronine +trike +trilaterality +trilateration +trilby +trilemma +trilingualism +trilithon +trill +trillion +trillionth +trillium +trilobite +trilogy +trimaran +trimer +trimester +trimeter +trimethadione +trimethylene +trimethylglycine +trimetrogon +trimmer +trimming +trimodality +trimorph +trimorphism +trimotor +trination +trine +tringle +trinitrobenzene +trinitrocresol +trinitroglycerin +trinitrophenol +trinitrophenylmethylnitramine +trinitrotoluene +trinity +trinket +trinketer +trinketry +trinkum +trio +triode +triol +triolein +triolet +triose +trioxide +trip +tripalmitin +tripartition +tripe +tripelennamine +tripersonality +triphammer +triphenylmethane +triphosphate +triphthong +triphylite +triplane +triplet +tripletail +triplication +triplicity +triploidy +tripod +tripody +tripoli +tripos +tripper +trippet +triptane +triptych +triptyque +tripwire +triquetra +triradius +trireme +trisaccharide +trishaw +triskaidekaphobia +triskelion +trismus +trisoctahedron +trisomy +trispast +tristearin +tristeza +tristfulness +tristich +trisulphide +trisyllabism +trisyllable +trit +tritanope +tritanopia +tritheism +tritheist +trithing +triticale +triticum +tritium +triton +tritone +trituration +triturator +triumph +triumpher +triumvir +triumvirate +triungulin +trivalence +trivalency +trivet +trivialisation +trivialism +triviality +trivialness +trivium +trocar +troch +trochanter +trochar +troche +trochee +trochelminth +trochilus +trochlea +trochoid +trochophore +troglodyte +troglodytism +trogon +troika +troilism +trois +troke +troker +troland +trolley +trollop +trolly +trombidiasis +trombone +trombonist +trommel +tromometer +tromometry +trompe +trona +trondhjemite +trone +troop +trooper +troopship +troostite +tropaeolin +tropaeolum +tropaion +trope +tropeolin +trophallaxis +trophoblast +trophoplasm +trophozoite +trophy +tropic +tropicalisation +tropicalization +tropicbird +tropine +tropism +tropology +tropopause +tropophyte +troposphere +troth +trothplight +trotline +trotter +trotyl +troubadour +trouble +troubledness +troublemaker +troublemaking +troubler +troubleshooter +troublesomeness +troublousness +trough +trouncer +troupe +trouper +troupial +trouser +trousseau +trout +trouv +trouvaille +trouvere +trouveur +trove +trover +trowel +troweler +troweller +trp +truancy +truant +truce +truck +truckage +truckdriver +trucker +truckie +trucking +truckler +truckload +truculence +truculency +trudgen +trueheartedness +truelove +trueness +truffe +truffle +trug +truism +trull +trullisatio +trumeau +trump +trumpery +trumpet +trumpeter +trumpetfish +trumpetry +trumpetweed +trumscheit +truncation +truncheon +trundler +trundletail +trunk +trunkfish +trunkful +trunnel +trunnion +trusser +trussing +trust +trustability +trustbuster +trustee +trusteeship +truster +trustfulness +trustiness +trustingness +trustlessness +trustor +trustworthiness +trusty +truth +truthlessness +tryingness +tryma +tryout +trypaflavine +trypanosome +trypanosomiasis +tryparsamide +trypsin +trypsinize +trypsinogen +tryptophan +trysail +tryst +tsade +tsar +tsardom +tsarevitch +tsarevna +tsarina +tsarism +tsaritza +tsi +tsk +tsotsi +tsunami +tsurugi +tu +tuart +tuatara +tub +tuba +tubber +tubbiness +tube +tubenose +tuber +tubercle +tubercularisation +tubercularization +tuberculin +tuberculination +tuberculinisation +tuberculinization +tuberculisation +tuberculize +tuberculoma +tuberculosis +tuberose +tuberosity +tubifex +tubing +tubman +tubulation +tubulator +tubule +tubulure +tubuphone +tuchun +tucker +tucket +tucotuco +tufa +tuff +tuffet +tuft +tufter +tufthunter +tufting +tugboat +tugger +tugrik +tui +tuition +tularaemia +tule +tulip +tulipomania +tulipwood +tulle +tullibee +tulwar +tumblebug +tumblehome +tumbler +tumbleweed +tumbrel +tumefaction +tumidity +tumidness +tummeler +tummy +tumor +tumour +tump +tumpline +tumult +tumultuousness +tumulus +tuna +tunableness +tundish +tundra +tune +tuneableness +tunefulness +tuner +tunesmith +tungo +tungstate +tungsten +tungstic +tungstite +tunic +tunica +tunicate +tunicle +tuning +tunka +tunnage +tunnel +tunneler +tunneller +tunny +tupelo +tuppence +tuque +turaco +turban +turbary +turbellarian +turbidimeter +turbidimetry +turbidity +turbidness +turbine +turbit +turbo +turbocar +turbocharger +turbofan +turbogenerator +turbojet +turboprop +turbosupercharger +turbot +turbulence +tureen +turf +turfiness +turfman +turgency +turgidity +turgidness +turgite +turgor +turion +turkey +turkeyfish +turmeric +turmoil +turnabout +turnaround +turnbuckle +turncoat +turncock +turner +turnery +turnhall +turning +turnip +turnkey +turnoff +turnout +turnover +turnpike +turnsole +turnspit +turnstile +turnstone +turntable +turnup +turnverein +turnwrest +turpentine +turpeth +turpitude +turps +turquoise +turret +turrethead +turrilite +turtle +turtleback +turtledove +turtlehead +turtleneck +turtlet +turves +tusche +tushie +tusk +tusker +tussah +tussis +tussock +tussor +tussore +tussur +tutee +tutelage +tutenag +tutiorism +tutor +tutorial +tutsan +tutty +tutu +tuxedo +tuy +tuyere +twaddle +twaddler +twang +twangle +twattle +twayblade +tweed +tweediness +tweeny +tweeter +tweezer +twelve +twelvemo +twelvemonth +twenty +twerp +twibill +twicer +twiddler +twier +twig +twilight +twinberry +twine +twiner +twinflower +twinge +twinkler +twinkling +twirler +twirp +twistability +twister +twite +twitterer +two +twofer +twopence +twosome +tychism +tycoon +tye +tyg +tyke +tyler +tylopod +tylosis +tymbal +tympan +tympanist +tympanites +tympanitis +tympanum +tympany +typ +type +typebar +typecase +typeface +typefoundry +typeholder +typescript +typesetter +typesetting +typewriter +typewriting +typhlitis +typhlology +typhlosis +typhoid +typhoidal +typhoidin +typhon +typhoon +typhus +typicality +typicalness +typicon +typification +typifier +typikon +typist +typo +typographer +typography +typologist +typology +typw +tyramine +tyrannicalness +tyrannicide +tyranniser +tyrannizer +tyrannosaur +tyrannousness +tyranny +tyrant +tyre +tyro +tyrocidine +tyrosinase +tyrosine +tyrothricin +tyum +tzaddik +tzar +tzardom +tzarevich +tzarevna +tzarina +tzarism +tzaritza +tzimmes +tzitzith +u +ubiety +ubiquitarian +uc +udal +udder +udo +udometer +ufology +ugali +ugli +ugliness +ugsomeness +uhlan +uhuru +ui +uintathere +uitlander +ukase +uke +ukiyoe +ukulele +ulan +ulcer +ulceration +ulcerousness +ulema +ulexite +ullage +ulna +ulnoradial +ulotrichy +ulster +ultima +ultimateness +ultimatum +ultimogeniture +ulto +ultracentrifuge +ultrafiche +ultrafilter +ultrafiltrate +ultrafiltration +ultraism +ultraist +ultramarine +ultrametamorphism +ultramicrochemist +ultramicrometer +ultramicroscope +ultramicroscopy +ultramontanism +ultramontanist +ultranationalism +ultranet +ultrasonics +ultrasound +ultrastructure +ultraviolet +ultravirus +ulu +ululation +umbel +umbellet +umbellule +umber +umbilication +umbilicus +umbra +umbrage +umbrageousness +umbrella +umbrette +umiak +umlaut +ump +umpire +umpy +unabidingness +unabjectness +unabortiveness +unabsorptiness +unabstemiousness +unabstractedness +unabusiveness +unacceptability +unacceptableness +unacceptance +unaccessibility +unaccountability +unaccountableness +unaccumulativeness +unaccurateness +unaccustomedness +unacquisitiveness +unacrimoniousness +unadaptabness +unadaptiveness +unadeptness +unadhesiveness +unadmirableness +unadmissibleness +unadorableness +unadornment +unadroitness +unadvantageousness +unadventurousness +unadverseness +unadvisedness +unaffableness +unafflictedness +unaggressiveness +unallusiveness +unalterableness +unamazedness +unambiguousness +unambitiousness +unamiableness +unamicability +unamicableness +unamorousness +unamusingness +unanalagousness +unangularness +unanimity +unanimousness +unanswerableness +unanxiousness +unapologizing +unapparentness +unappealableness +unapplicability +unapplicableness +unappositeness +unappreciativeness +unapprehensiveness +unapproachability +unaptness +unarduousness +unargumentativeness +unartfulness +unassailableness +unassertiveness +unassiduousness +unassumingness +unassuredness +unattainability +unattainableness +unattendance +unattentiveness +unattractiveness +unattributiveness +unau +unaudaciousness +unaustereness +unauthenticalness +unauthenticity +unauthoritativeness +unavailability +unavailableness +unavidness +unavoidability +unavoidableness +unavowableness +unawareness +unawfulness +unawkwardness +unbankableness +unbarbarousness +unbarrenness +unbashfulness +unbearableness +unbeauteousness +unbelief +unbeliever +unbelievingness +unbendingness +unbeneficialness +unbenevolence +unbenignity +unbibulousness +unbiliousness +unbirthday +unblamableness +unblessedness +unblightedness +unblissfulness +unbloodiness +unblushingness +unboastfulness +unboisterousness +unboldness +unbookishness +unboundedness +unbounteousness +unbountifulness +unboyishness +unbraveness +unbrazenness +unbreachableness +unbreakableness +unbriefness +unbrightness +unbrilliantness +unbrittness +unbrokenness +unbrotherliness +unbumptiousness +uncallousness +uncalmness +uncandidness +uncanniness +uncanonisation +uncanonization +uncapaciousness +uncapriciousness +uncaptiousness +uncarnivorousness +uncasualness +uncategoricalness +uncatholicity +uncausativeness +uncautiousness +unceasingness +uncensoriousness +unceremoniousness +uncertainty +unchangeability +unchangefulness +unchangingness +uncharitableness +unchasteness +unchastity +uncheerfulness +uncheeriness +unchildishness +unchivalrousness +unchivalry +unchurlishness +uncia +uncinariasis +uncinus +uncircuitousness +uncircumcision +uncircumspectness +uncivility +uncivilness +unclamorousness +unclannishness +unclarity +unclassifiableness +uncle +uncleanliness +uncleanness +uncleverness +unclipper +uncoarseness +uncognoscibility +uncohesiveness +uncoloredness +uncolouredness +uncomfortableness +uncommonness +uncommunicativeness +uncommutativeness +uncomparableness +uncompassion +uncompassionateness +uncompetitiveness +uncomplaisance +uncompleteness +uncomplexness +uncompliableness +uncomprehensibleness +uncomprehension +uncomprehensiveness +uncompromisingness +uncomputableness +unconcern +uncondensableness +unconditionality +unconditionalness +unconditionedness +unconduciveness +unconformability +unconformity +uncongeniality +uncongruousness +unconscientiousness +unconscionableness +unconsciousness +unconsecration +unconsentaneousness +unconservativeness +unconsolability +unconsolidation +unconstitutionalism +uncontemplativeness +uncontemporaneousness +uncontemptibility +uncontemptibleness +uncontemptuousness +uncontentiousness +uncontestability +uncontestant +uncontiguousness +uncontinence +uncontributiveness +uncontumaciousness +unconventionality +unconvertibility +unconvertibleness +unconvulsiveness +uncooperativeness +uncoordinateness +uncoquettishness +uncordiality +uncordialness +uncorrelativeness +uncorrelativity +uncorruptedness +uncorruptibleness +uncorruptness +uncourageousness +uncourteousness +uncourtesy +uncourtliness +uncouthness +uncovetousness +uncoyness +uncraftiness +uncreativeness +uncreativity +uncreditableness +uncredulousness +uncrudeness +uncrudity +uncruelness +unct +unction +unctuosity +unctuousness +uncubicalness +uncultivation +unculture +uncumbrousness +uncurableness +uncus +undaintiness +undauntedness +undecagon +undeceiver +undeceptiveness +undecorousness +undefeatableness +undefeatedness +undefectiveness +undefendableness +undefensibleness +undefensiveness +undefinedness +undefiniteness +undefinitiveness +undegeneracy +undejectedness +undeleteriousness +undeliberateness +undeliberativeness +undelusiveness +undemocratisation +undemocratization +undemonstrableness +undemonstrativeness +undemureness +undeniableness +undenominational +undependability +undependableness +undepressiveness +underaccident +underachievement +underachiever +underactor +underadjustment +underagency +underagent +underagitation +underaim +underalderman +underbailiff +underbarber +underbeadle +underbeak +underbeam +underbeat +underbelly +underbeveling +underbevelling +underbidder +underbishop +underbishopric +underbodice +underbody +underbottom +underbough +underbox +underbrace +underbranch +underbreeding +underbridge +underbrigadier +underbrush +underbud +underbuilder +underbursar +underbutler +undercap +undercaptain +undercarriage +undercart +undercase +undercasing +undercast +undercause +underceiling +undercellar +underchamber +underchamberlain +underchancellor +underchanter +underchap +underchief +underchin +underchord +undercircle +undercitizen +undercitizenry +undercladding +underclay +underclerk +underclerkship +undercloak +undercloth +underclothing +underclutch +undercoachman +undercoat +undercoating +undercollector +undercommander +undercomment +underconsciousness +underconstable +underconsumption +undercook +undercooper +undercountenance +undercourse +undercourtier +undercrest +undercrier +undercroft +undercrust +undercrypt +undercup +undercurl +undercurrent +undercurve +underdeacon +underdealing +underdevelopement +underdevelopment +underdevil +underdialogue +underdish +underdistinction +underdistributor +underdive +underdoctor +underdog +underdose +underdot +underdown +underdraft +underdrain +underdrainage +underdraught +underdrawers +underdrumming +underedge +underemployment +underengraver +underexposure +undereye +underface +underfaction +underfactor +underfaculty +underfalconer +underfarmer +underfeathering +underfeature +underfeeling +underfelt +underfiend +underfitting +underflame +underflannel +underflood +underflooring +underflow +underfootage +underfootman +underform +underframe +underframework +underfrequency +underfringe +underfrock +underfur +undergamekeeper +undergaoler +undergarb +undergardener +undergarment +undergeneral +undergentleman +undergirth +undergloom +underglow +undergod +undergoer +undergoverness +undergovernment +undergovernor +undergrad +undergraduate +undergraduateship +undergraining +undergrass +undergroan +undergrowl +undergrowth +underguard +underguardian +undergunner +underhabit +underhammer +underhandedness +underhangman +underheaven +underhelp +underhill +underhistory +underhorseman +underhousemaid +underhum +underinstrument +underinsurance +underisiveness +underissue +underivedness +underjacket +underjailer +underjanitor +underjaw +underjobbing +underjoint +underjudge +underjungle +underkeeper +underking +underkingdom +underlaborer +underlabourer +underland +underlash +underlawyer +underlayer +underleather +underlegate +underlessee +underlid +underlier +underlieutenant +underlife +underlift +underlight +underliking +underlimit +underlineation +underlineman +underlinen +underling +underlip +underlock +underlodging +underloft +undermaid +undermaker +undermanager +undermark +undermarshal +undermarshalman +undermaster +undermate +undermeaning +undermediator +undermelody +undermiller +underminer +underminister +underministry +undermist +undermotion +undermount +undermountain +undermuslin +undername +undernote +undernourishment +undernsong +undernurse +undernutrition +underofficer +underopinion +underorganisation +underorganization +underpacking +underpain +underpainting +underpart +underparticipation +underpartner +underpass +underpayment +underpen +underpetticoat +underpier +underpilaster +underpile +underpinning +underplan +underplate +underplot +underply +underpoint +underpopulation +underporch +underporter +underpossessor +underpot +underprefect +underprentice +underpresser +underpressure +underpriest +underprincipal +underprior +underproducer +underproduction +underprompter +underproposition +underpropper +underprospect +underqueen +underranger +underreader +underrealm +underreceiver +underregion +underregistration +underrepresentation +underriddle +underring +underroarer +underrobe +underrogue +underroller +underroof +underroom +underrower +underrule +underruler +undersacristan +undersatisfaction +undersaturation +undersavior +undersawyer +underscheme +underschool +underscoop +underscribe +underscript +underseal +underseam +undersearch +undersecretary +undersecretaryship +undersect +underseller +undersequence +underservant +underservice +underset +undersexton +undersheathing +undershepherd +undersheriff +undershield +undershine +undershire +undershirt +undershoe +undershore +undershrub +underside +undersight +undersignalman +undersigned +undersill +underskin +underskirt +undersky +undersleeve +underslip +undersluice +undersociety +undersoil +undersole +undersorcerer +undersort +undersoul +undersound +undersovereign +undersow +underspan +underspar +underspecies +underspin +underspinner +underspring +undersprout +understaff +understage +understain +understamp +understandability +understandableness +understanding +understandingness +understatement +understay +understem +understep +understeward +understewardship +understimulus +understrain +understrap +understrapper +understream +understress +understrife +understructure +understuffing +undersuit +undersupply +undersupport +undersurface +underswain +underswamp +undersward +underswearer +underswell +undertaker +undertaking +undertalk +undertapster +underteacher +underteller +undertenancy +undertenant +undertenure +underthane +underthief +underthought +underthroating +underthrust +undertide +undertie +undertint +undertitle +undertone +undertow +undertrader +undertreasurer +undertribe +undertrick +undertruck +undertub +undertune +undertunic +undertutor +undertwig +undertyrant +underusher +underutilization +undervalve +undervassal +undervaulting +undervegetation +underventilation +underverse +undervest +undervicar +underviewer +undervillain +undervoice +underwage +underwaist +underwaistcoat +underwarden +underwatcher +underwave +underwaving +underwear +underweft +underwheel +underwing +underwitch +underwood +underworker +underworkman +underworld +underwrap +underwriter +underyield +underyoke +underzeal +underzealot +underzealousness +undescribableness +undescriptiveness +undeservingness +undesigningness +undesirableness +undestructibleness +undestructiveness +undeterminableness +undeterrability +undetestability +undetestableness +undeviousness +undevoutness +undewiness +undexterousness +undextrousness +undiaphanousness +undiffractiveness +undiffusiveness +undigressiveness +undiminishableness +undine +undisputatiousness +undistractedness +undistrustfulness +undiverseness +undivisiveness +undoer +undoing +undolorousness +undoubtfulness +undrossiness +undubiousness +undulance +undulation +undulator +undurability +undurableness +unduteousness +undyingness +uneagerness +unearnestness +unease +uneasiness +uneffectiveness +uneffeness +uneffusiveness +unegregiousness +unelaborateness +unelasticity +unelusiveness +unemotiveness +unemployability +unemployment +unenforceability +unenjoyableness +unenthusiasm +unenviability +unequability +unequableness +unequalness +unequivocalness +unerringness +unetherealness +uneuphoniousness +unevasiveness +unevenness +uneventfulness +unexceptionability +unexceptionableness +unexchangeabness +unexcitability +unexclusiveness +unexhaustion +unexpansiveness +unexpectability +unexpectedness +unexpeditiousness +unexplosiveness +unexpressiveness +unfacetiousness +unfailingness +unfaithfulness +unfamiliarity +unfastener +unfastidiousness +unfavorableness +unfavourableness +unfealty +unfearfulness +unfeasibility +unfeasibleness +unfeebleness +unfeelingness +unfelicitousness +unfeminist +unfertility +unfidelity +unfinishedness +unfirmness +unfitness +unfixity +unfleshliness +unflexibility +unflirtatiousness +unfolder +unfoldment +unfondness +unfoolishness +unforcibleness +unforeseeableness +unforgeability +unforgetfulness +unforgivableness +unformidableness +unfortuitousness +unfortunateness +unfoundedness +unfractiousness +unfragrance +unframableness +unfrankness +unfreakishness +unfriendedness +unfriendliness +unfrigidity +unfrigidness +unfrivolousness +unfrugality +unfrugalness +unfunniness +unfusibility +unfusibness +unfussiness +ung +ungainliness +ungarrulousness +ungaudiness +ungelatinousness +ungenerosity +ungenialness +ungentility +ungentleness +ungenuineness +ungirlishness +unglamorousness +unglutinosity +unglutinousness +ungovernability +ungovernableness +ungraciousness +ungratefulness +ungratitude +ungratuitousness +ungregariousness +ungt +unguardedness +unguent +unguentum +unguis +ungula +ungulate +ungutturalness +unhabitableness +unhairiness +unhandsomeness +unhappiness +unhatchability +unhaziness +unhealthiness +unheaviness +unheedfulness +unheroicalness +unhideousness +unhilariousness +unhingement +unhistory +unholiness +unhomeliness +unhomogeneousness +unhostility +unhumaneness +unhumanness +unhumbleness +unhurriedness +uni +uniatism +unicellularity +unicorn +unicycle +unicyclist +uniface +unification +unifier +uniform +uniformalization +uniformisation +uniformitarianism +uniformity +uniformization +uniformness +unignominiousness +unilateralism +unilaterality +unillustriousness +unimaginableness +unimmaculateness +unimmediateness +unimpeachability +unimpeachableness +unimportunateness +unimpressibility +unincisiveness +uninfectiousness +uninfiniteness +uninflammability +uninhabitability +uninheritability +uniniquitousness +uninjuriousness +uninnateness +uninnocuousness +uninquisitiveness +uninsidiousness +uninstinctiveness +uninsurability +unintellectuality +unintelligibility +unintelligibleness +uninterestedness +unintermediateness +uninterruptedness +unintricateness +uninvincibleness +uninvitingness +union +unionisation +unionism +unionist +unipersonality +unipod +unirascibility +unison +unit +unitarian +unitarianism +unitariness +unitedness +uniter +unity +univ +univalence +universalisation +universaliser +universalism +universalist +universality +universalization +universalizer +universe +universitarian +university +unjocoseness +unjustifiableness +unjustness +unjuvenileness +unkemptness +unkindliness +unknightliness +unknowingness +unknownness +unlaboriousness +unlanguidness +unlaudableness +unlawfulness +unlecherousness +unlegalness +unlevelness +unlicentiousness +unlikableness +unlikeableness +unlikelihood +unlikeness +unlimitedness +unlitigiousness +unliveliness +unloader +unlovableness +unloveableness +unloveliness +unloyalty +unlucidness +unluckiness +unludicrousness +unlugubriousness +unluminousness +unlyricalness +unmagnanimousness +unmaidenliness +unmaker +unmalleability +unmanageableness +unmanfulness +unmanliness +unmannerliness +unmannishness +unmarvellousness +unmarvelousness +unmeaningfulness +unmeaningness +unmeasurableness +unmeasuredness +unmelodiousness +unmercenariness +unmercifulness +unmercurialness +unmeretriciousness +unmeritability +unmeritoriousness +unmethodicalness +unmeticulousness +unmixedness +unmodernity +unmomentousness +unmorality +unmorbidness +unmoroseness +unmusicality +unmusicalness +unmutinousness +unmysteriousness +unmysticalness +unnaturalness +unnavigability +unnavigableness +unneatness +unnecessariness +unnecessitousness +unnefariousness +unneighborliness +unneighbourliness +unnervousness +unness +unneutrality +unniceness +unnimbleness +unnormalness +unnoticeableness +unnumerousness +unobdurateness +unobeseness +unobliviousness +unobsceneness +unobscureness +unobsequiousness +unobtrusiveness +unobviousness +unoccupancy +unodiousness +unodoriferousness +unodorousness +unoffensiveness +unofficiousness +unominousness +unonerousness +unopportuneness +unoppressiveness +unopprobriousness +unopulence +unornateness +unpacker +unpassionateness +unpeevishness +unpendulousness +unpenuriousness +unperceptibleness +unperemptoriness +unperfectiveness +unperfidiousness +unperson +unperspicuousness +unpersuasiveness +unpervasiveness +unperviousness +unpicturesqueness +unpiety +unpitifulness +unplacidness +unplatitudinousness +unplausibleness +unpleasantness +unpliableness +unpliancy +unpliantness +unpoliteness +unpompousness +unponderousness +unpopularity +unpopulousness +unporness +unportentousness +unpositiveness +unpossessiveness +unpracticability +unpracticableness +unpracticality +unpracticalness +unprayerfulness +unprecariousness +unpreciousness +unprecipitateness +unprecipitousness +unpreciseness +unprecociousness +unpredaceousness +unpredaciousness +unpredicableness +unpredictability +unpredictableness +unpreferableness +unprejudicedness +unprematureness +unpreparedness +unpreposterousness +unpresentableness +unpresumptuousness +unpretentiousness +unprettiness +unpreventiveness +unprimitiveness +unprimness +unprintableness +unprivateness +unprodigiousness +unproductiveness +unproductivity +unprofaneness +unprofitability +unprofitableness +unprofuseness +unprogressiveness +unprolifiness +unpromiscuousness +unpromptness +unpropitiousness +unprosaicness +unprosperousness +unprovocativeness +unproximity +unpugnaciousness +unpunctiliousness +unpunctuality +unpunctualness +unpureness +unputridity +unputridness +unqualifiedness +unquerulousness +unquestionableness +unquickness +unrapaciousness +unrapturousness +unrashness +unraveler +unraveller +unravelment +unreadiness +unreality +unreason +unreasonableness +unrebelliousness +unreceptiveness +unreceptivity +unreconcilableness +unrecuperatiness +unreeler +unrefractiveness +unregressiveness +unregretfulness +unrelentingness +unreliability +unreliableness +unremittence +unremittency +unremittingness +unremorsefulness +unremoteness +unremovableness +unrepair +unrepealability +unrepetitiousness +unrepleness +unrepose +unreposefulness +unreprehensibleness +unrepresentativeness +unrepressiveness +unreproachableness +unreproachfulness +unreproductiveness +unrepulsiveness +unrequisiteness +unrequital +unresentfulness +unreserve +unreservedness +unresoluteness +unresourcefulness +unrespectability +unrespectfulness +unresponsibleness +unresponsiveness +unrest +unrestfulness +unrestraint +unretentiveness +unrevengefulness +unreversibleness +unriddler +unridiculousness +unrightfulness +unrigidness +unrigorousness +unriotousness +unripeness +unrobustness +unrove +unruefulness +unruinousness +unruliness +unsacrilegiousness +unsadness +unsafeness +unsafety +unsagaciousness +unsageness +unsalability +unsalaciousness +unsalness +unsalubriousness +unsanctimoniousness +unsanctitude +unsanctity +unsanguinariness +unsanity +unsatiability +unsatiableness +unsatiricalness +unsatisfactoriness +unsaturate +unsaturation +unsavageness +unsavoriness +unsavouriness +unscabrousness +unscarceness +unscornfulness +unscrambler +unsearchableness +unseaworthiness +unseclusiveness +unsecretiveness +unsecureness +unsedateness +unseditiousness +unseducibleness +unseductiveness +unsedulousness +unseeingness +unselfconsciousness +unselfishness +unsensibility +unsensibleness +unsensitiveness +unsensuousness +unsententiousness +unseparableness +unseparateness +unsereneness +unseriousness +unserviceableness +unsettledness +unsettlement +unsevereness +unshadiness +unshapeliness +unsharpness +unshness +unshowiness +unshrewdness +unshrinkability +unshyness +unsickerness +unsightliness +unsimilarity +unsimpleness +unsimultaneousness +unsinfulness +unsingularness +unsinisterness +unsinkability +unsinuousness +unskilfulness +unskillfulness +unslanderousness +unslimness +unslowness +unsluggishness +unslyness +unsmokiness +unsmoothness +unsmugness +unsnobbishness +unsnugness +unsoberness +unsocialism +unsoftness +unsolemnness +unsolicitousness +unsolidarity +unsolidity +unsolidness +unsolubleness +unsolvableness +unsomberness +unsombreness +unsonorousness +unsophisticatedness +unsophistication +unsoporiferousness +unsordidness +unsoreness +unsoulfulness +unsoundness +unsourness +unspaciousness +unsparseness +unspatiality +unspeakableness +unspeciousness +unspeediness +unspiciness +unspirituality +unsplendidness +unspontaneousness +unsportiveness +unspuriousness +unsqueamishness +unstableness +unstaginess +unstaidness +unstatuesqueness +unsteadfastness +unstealthiness +unsternness +unstiffness +unstoniness +unstorminess +unstoutness +unstrangeness +unstrenuousness +unstress +unstrictness +unstubbornness +unstudiousness +unstuffiness +unstupidness +unsturdiness +unstylishness +unsubmissiveness +unsubstantiality +unsubtleness +unsubversiveness +unsuccess +unsuccessfulness +unsuccessiveness +unsufferableness +unsuggestiveness +unsulfureness +unsulkiness +unsulphureness +unsumptuousness +unsuperciliousness +unsuperfluousness +unsuperlativeness +unsupernaturalness +unsuperstitiousness +unsuppleness +unsupportableness +unsureness +unsurliness +unsusceptibility +unsusceptibleness +unsuspectedness +unsuspectfulness +unsuspiciousness +unswervingness +unsynchronousness +untameness +untastefulness +untautness +untemperateness +untempestuousness +untenability +untenableness +untenaciousness +untenacity +untenseness +untensibility +untenuousness +unterseness +unthankfulness +unthickness +unthievishness +unthinkability +unthinkableness +unthinkingness +unthoroughness +unthoughtfulness +unthriftiness +untidiness +untimeliness +untimidness +untimorousness +untolerableness +untorridity +untorridness +untortuousness +untoughness +untowardness +untractability +untractableness +untragicalness +untraitorousness +untranquilness +untransientness +untransitiveness +untransitoriness +untransmutability +untransmutableness +untransparentness +untreacherousness +untremendousness +untremulousness +untriabness +untrimmedness +untriteness +untrustness +untruth +untruthfulness +untumidity +untumidness +untumultuousness +untunableness +untuneableness +unubiquitousness +unulcerousness +ununiqueness +unusableness +unuseableness +unusefulness +unusuality +unusualness +unusuriousness +unuxoriousness +unvacuousness +unvagrantness +unvagueness +unvainness +unvaliantness +unvalorousness +unvaporosity +unvaporousness +unvariableness +unveiling +unvenerability +unvenerableness +unveniality +unvenialness +unvenomousness +unventurousness +unveraciousness +unverboseness +unverdurness +unverifiability +unveritableness +unverminousness +unversatileness +unversatility +unvertiginousness +unvexatiousness +unvicariousness +unviciousness +unvigorousness +unvindictiveness +unviolableness +unvirtuousness +unvisibleness +unvitalness +unvitreosity +unvitreousness +unvituperativeness +unvivaciousness +unvividness +unvociferousness +unvolubleness +unvoluminousness +unvoluptuousness +unvoraciousness +unvulgarness +unwakefulness +unwarranness +unwastefulness +unwatchfulness +unweariedness +unwell +unwhimsicalness +unwholesomeness +unwieldiness +unwildness +unwilfulness +unwillfulness +unwinder +unwisdom +unwiseness +unwishfulness +unwistfulness +unwit +unwittingness +unwoefulness +unwontedness +unworldliness +unworminess +unwrathfulness +unwrongfulness +unyieldingness +unyouthfulness +up +upas +upaya +upbearer +upbeat +upbringing +upbuilder +upburst +upcropping +updater +updraft +upgrader +upgrowth +upheaval +upheaver +upholder +upholsterer +upholstery +uphroe +upkeep +upland +uplander +uplifter +upperclassman +upraiser +uprising +uproar +uproariousness +uprootedness +uprooter +uprush +upsetting +upshot +upside +upsilon +upstandingness +upstart +upstartness +upstroke +upsweep +upswing +uptake +upthrow +upthrust +uptowner +uptrend +upwardness +ur +uracil +uraemia +uraeus +uralite +uranalysis +uranide +uraninite +uranism +uranite +uranium +uranographer +uranographist +uranography +uranology +uranometry +uranyl +urari +urate +urbaneness +urbanisation +urbanism +urbanist +urbanite +urbanity +urbanization +urbiculture +urchin +urd +urea +urease +uredinium +uredium +uredo +uredosorus +uredospore +ureide +uremia +urena +ureter +ureterolithotomy +ureterostomy +urethan +urethane +urethra +urethrectomy +urethritis +urethroscope +urethroscopy +urethrostomy +urgency +urger +urial +uricolysis +uridine +urinal +urinalysis +urinary +urination +urine +urn +urnfield +urning +urochord +urochrome +urodele +urogomphus +urolith +urology +uropod +uropygium +uroscopy +urostyle +uroxanthin +urticaria +urtication +urus +urushiol +usage +usance +usefulness +uselessness +user +ushabti +usher +usherette +usquebaugh +ustulation +usu +usufruct +usurer +usuriousness +usurpation +usurper +usury +usw +ut +uta +ute +utend +utensil +uteralgia +uterus +utilidor +utilitarianism +utility +utilization +utilizer +utopianism +utricle +utriculitis +utterance +utterer +utterness +uvala +uvarovite +uvea +uveitis +uvula +uvulatomy +uvulectomy +uvulitis +uvulotomy +uxoricide +uxoriousness +v +va +vaad +vac +vacancy +vacantness +vacation +vacationist +vaccination +vaccinationist +vaccinator +vaccine +vaccinia +vaccinization +vacherin +vacillation +vacillator +vacua +vacuity +vacuole +vacuousness +vacuum +vagabond +vagabondage +vagary +vagrancy +vagrant +vagueness +vaguio +vagus +vahana +vaingloriousness +vainglory +vair +vaivode +vajra +vakeel +valance +vale +valediction +valedictorian +valedictory +valence +valency +valentine +valerian +valet +valeta +valetudinarian +valetudinarianism +valetudinary +valiantness +validation +validity +validness +valine +valise +vallation +vallecula +valley +valonia +valor +valorisation +valorization +valorousness +valour +valse +valuableness +valuation +valuator +value +valuelessness +valuer +valuta +valve +valvelet +valvule +valvulitis +vambrace +vamp +vamphorn +vampire +vampirism +van +vanadate +vanadinite +vanadium +vanaspati +vanda +vandal +vandalism +vane +vang +vanguard +vanguardist +vanilla +vanillin +vanisher +vanishment +vanity +vanman +vanquisher +vanquishment +vantage +vapidity +vapidness +vapor +vaporescence +vaporetto +vaporimeter +vaporishness +vaporization +vaporizer +vaporosity +vaporousness +vapour +vapourimeter +vapouriser +vapourishness +vapourization +vaquero +var +vara +varactor +varangian +varec +vargueno +variability +variableness +variance +variate +variation +varicella +varicocele +varicosis +varicosity +varicotomy +variedness +variegation +varier +variety +varindor +vario +variocoupler +variola +variolation +variole +variolite +variolosser +variometer +variscite +varistor +varitypist +varix +varlet +varletry +varmannie +varmint +varna +varnish +varnisher +varsity +varve +vas +vascularity +vascularization +vasculum +vase +vasectomy +vasoconstriction +vasoconstrictor +vasodilatation +vasodilator +vasoinhibitor +vasoligation +vasoligature +vasomotion +vasopressin +vasopressor +vasostimulant +vasotribe +vassal +vassalage +vastitude +vastity +vastness +vastus +vat +vaticide +vaticination +vaticinator +vaudeville +vaudevillian +vault +vaulter +vaulting +vaunter +vav +vavasor +vavasory +vaward +vb +vd +veal +vealer +vection +vector +vectorcardiogram +vectorcardiography +vedalia +vedette +veery +veg +vegan +vegetable +vegetarian +vegetarianism +vegetation +vehemence +vehicle +vehiculum +veil +veiling +vein +veining +veinlet +veinstone +veinule +vela +velamen +velarium +velarization +velation +veld +veldskoen +veleta +veliger +velitation +velleity +vellication +vellum +velocipede +velocity +velodrome +velour +velours +velout +velouta +velum +velure +velvet +velveteen +velvetiness +vena +venality +venation +vendace +vendee +vender +vendetta +vendettist +vendibility +vendibleness +vendition +vendor +vendue +veneer +veneerer +veneering +venepuncture +veneration +venerativeness +venerator +venereologist +venereology +venerer +venery +venesection +vengeance +vengefulness +veniality +venialness +venin +venipuncture +venireman +venisection +venison +venom +venomness +venomousness +venosity +venousness +vent +ventage +ventail +venter +ventilation +ventilator +ventosity +ventricle +ventricosity +ventriculogram +ventriculography +ventriculopuncture +ventriculus +ventriloquism +ventriloquist +ventrotomy +venturesomeness +venturousness +venue +venule +veraciousness +veracity +veranda +veratridine +veratrine +verb +verbalisation +verbaliser +verbalism +verbalist +verbality +verbalization +verbalizer +verbena +verbiage +verbid +verbification +verbosity +verdancy +verderer +verderership +verdict +verdigris +verdin +verdite +verditer +verdure +verdurousness +verge +vergeboard +verger +verglas +veridicality +verifiability +verifiableness +verifier +verisimilitude +verism +verismo +verist +veritableness +veritas +verity +verjuice +verkrampte +verligte +vermeil +vermicelli +vermicide +vermiculation +vermiculite +vermifuge +vermilion +vermin +vermination +verminousness +vermis +vermouth +vernacularisation +vernacularism +vernacularization +vernalisation +vernalization +vernation +vernicle +vernier +vernissage +veronica +verriare +verruca +verrucoseness +verrucosity +vers +versant +versatileness +versatility +verse +verset +versicle +versiera +versification +versifier +versine +version +verso +verst +vert +vertebra +vertebrate +vertebration +vertex +vertices +verticil +verticillaster +verticillation +verticity +vertigo +vertu +vervain +verve +vervet +vesica +vesicant +vesication +vesicle +vesiculation +vesp +vesper +vesperal +vespers +vespertide +vespiary +vespid +vessel +vest +vesta +vestiary +vestibule +vestige +vestigium +vesting +vestment +vestry +vestryman +vesture +vesuvian +vesuvianite +vet +vetch +vetchling +veter +veteran +veterinarian +vetiver +veto +vetoer +vexation +vexatiousness +vexedness +vexer +vexillary +vexillology +vexillum +vg +viability +viaduct +vial +viand +viaticum +viator +vibist +vibraculum +vibraharp +vibrance +vibrancy +vibraphone +vibraphonist +vibratile +vibration +vibrato +vibrio +vibriosis +vibrissa +vibrometer +viburnum +vicar +vicarage +vicarate +vicariate +vicariism +vicariousness +vice +vicegerency +vicegerent +viceregency +vicereine +viceroy +viceroyalty +vichyssoise +vicinage +vicinity +vicissitude +vicomte +vicomtesse +victim +victimhood +victimisation +victimiser +victimization +victimizer +victor +victoria +victoriate +victorine +victoriousness +victory +victrix +victualage +victualer +victualler +vicuua +video +videodisk +videophone +vidette +vidicon +vidya +vier +view +viewer +viewfinder +viewing +viewpoint +vigia +vigil +vigilance +vigilante +vigilantism +vigilantness +vignette +vignetter +vignetting +vignettist +vigor +vigorish +vigorousness +vigour +vihara +vihuela +vil +vilayet +vileness +vilification +vilifier +villa +villadom +village +villager +villain +villainage +villainess +villainousness +villainy +villanella +villanelle +villein +villeinage +villosity +villus +vim +vimana +vimen +vimpa +vina +vinaigre +vinaigrette +vinasse +vincibility +vincibleness +vinculum +vindication +vindicator +vindictiveness +vine +vined +vinedresser +vinegar +vinegarette +vinegarroon +vineland +vinery +vineyard +viniculture +viniculturist +vinificator +vino +vinometer +vinosity +vintage +vintager +vintner +vinum +vinyl +vinylacetylene +vinylation +vinylbenzene +vinylethylene +vinylidene +viol +viola +violability +violableness +violence +violet +violin +violinist +violinmaker +violist +violoncello +violone +viosterol +viper +virago +virelay +viremia +vireo +virescence +virga +virgin +virginity +virginium +virgule +virial +viridescence +viridian +viridity +virilism +virility +virl +virology +virosis +virtu +virtuality +virtue +virtuelessness +virtuosity +virtuoso +virtuousness +virucide +virulence +virus +vis +visa +visage +viscacha +viscerotonia +viscerotropic +viscidity +viscidness +viscometer +viscometry +viscose +viscosity +viscount +viscountcy +viscountess +viscounty +viscousness +viscus +vise +visibility +vision +visionariness +visitant +visitation +visitor +visor +vista +visualisation +visualiser +visualist +visualization +visualizer +vita +vitalisation +vitaliser +vitalism +vitality +vitalization +vitalizer +vitalness +vitamin +vitascope +vitellin +vitellus +vitiation +vitiator +viticetum +viticulture +vitiligo +vitrain +vitrescence +vitrics +vitrifiability +vitrification +vitrine +vitriol +vitriolization +vitrum +vitta +vittle +vituperation +vituperator +vivaciousness +vivacity +vivandi +vivandiere +vivarium +vives +vividity +vividness +viviparism +viviparity +viviparousness +vivisection +vivisectionist +vivisector +vixen +vixenishness +viz +vizard +vizcacha +vizier +vizierate +viziership +vizirate +vizirship +vizor +vizsla +vlei +vo +voc +vocab +vocable +vocabulary +vocalise +vocalism +vocalist +vocality +vocalization +vocalizer +vocalness +vocat +vocation +voces +vociferance +vociferation +vociferator +vociferousness +vodka +vogesite +vogue +voice +voicedness +voicefulness +voicelessness +voiceprint +voidance +voider +voidness +voile +voiture +volatileness +volatilisation +volatiliser +volatility +volatilizer +volcanicity +volcanism +volcano +volcanologist +volcanology +vole +volition +volley +volleyball +volleyer +volost +volplanist +vols +volt +volta +voltage +voltaism +voltameter +voltammeter +voltmeter +volume +volumeter +voluminosity +voluminousness +voluntariness +voluntarism +voluntaryism +voluntaryist +volunteer +voluptuary +volution +volva +volvelle +volvox +volvulus +vomer +vomica +vomito +vomitorium +vomiturition +vomitus +voodoo +voodooist +voraciousness +voracity +vorspiel +vortex +vorticella +vortices +vorticism +vorticity +votary +vote +voter +voucher +vouchsafement +vouge +voussoir +vow +vowel +vower +vox +voyage +voyager +voyageur +vp +vr +vraisemblance +vrille +vss +vug +vulcanisation +vulcaniser +vulcanism +vulcanist +vulcanite +vulcanization +vulcanizer +vulcanologist +vulcanology +vulg +vulgarian +vulgarisation +vulgariser +vulgarism +vulgarity +vulgarness +vulgate +vulgus +vulpicide +vulpinite +vulsinite +vulture +vv +vvll +w +wab +wabbler +wack +wacke +wackiness +wad +wadder +wadding +wader +wadi +wadmal +wadna +wadset +wadsetter +wae +wafer +waff +waffie +waffle +waffness +waftage +wafter +wafture +wage +wagelessness +wager +wageworker +wagga +waggery +waggishness +waggon +waggonage +waggoner +waggonette +waggonload +wagon +wagonage +wagoner +wagonette +wagonload +wagtail +wahine +wahoo +waif +wailer +wain +wainage +wainrope +wainwright +waist +waistband +waistcloth +waistcoat +waistcoating +waister +waistline +waiter +waitress +waiver +waka +wake +wakefulness +waken +waker +wakerifeness +wakizashi +waldglas +waldgrave +wale +waling +walkabout +walkaway +walker +walkout +walkover +walkway +wall +walla +wallaba +wallaby +wallah +wallaroo +wallboard +wallet +walleye +wallflower +walloper +walloping +wallower +wallpaper +wallydrag +walnut +walrus +waltz +waltzer +wambliness +wame +wamefou +wammus +wampum +wampumpeag +wampus +wamus +wand +wanderer +wanderlust +wanderoo +wandoo +wangler +wanigan +wanion +wantage +wanter +wantlessness +wapatoo +wapentake +wapinschaw +wapiti +wappenshaw +wapperjaw +waragi +waratah +warb +warbird +warbler +ward +warden +wardenry +wardenship +warder +wardership +wardmote +wardress +wardrobe +wardroom +wardship +ware +warehouse +warehouseman +wareroom +warfare +warfarin +warhead +warhorse +wariness +warison +wark +warlessness +warlock +warlord +warmer +warmheartedness +warmness +warmonger +warmongering +warmouth +warmth +warmthlessness +warner +warning +warpage +warpath +warper +warplane +warragal +warrant +warrantableness +warrantee +warranter +warrantor +warranty +warred +warren +warrener +warrigal +warring +warrior +warrty +warsaw +warship +warsle +warsler +warstler +wart +wartime +wase +washability +washaway +washbasin +washboard +washbowl +washcloth +washday +washer +washerman +washerwoman +washery +washin +washiness +washing +washout +washrag +washroom +washstand +washtub +washwoman +wasp +waspiness +waspishness +wassail +wassailer +wastage +wastebasket +wasteland +wastelot +wasteness +wastepaper +wastepile +wastery +wasteweir +wastingness +wastrel +wastry +wat +watap +watchband +watchcase +watchdog +watcher +watchfulness +watchlessness +watchmaker +watchman +watchout +watchstrap +watchtower +watchword +water +waterage +waterbrain +waterbuck +watercolor +watercolorist +watercolourist +watercourse +watercraft +watercress +waterdog +waterer +waterfall +waterfowl +waterfront +wateriness +watering +waterishness +waterleaf +waterlessness +waterman +watermanship +watermark +watermelon +waterscape +watershed +waterside +watersider +waterskier +waterspout +watertightness +waterway +waterweed +waterworks +watt +wattage +wattle +wattlebird +wattmeter +waucht +waught +waveband +waveform +waveguide +wavelength +wavelet +wavellite +wavemeter +waveoff +wavey +waviness +waw +wawa +wax +waxberry +waxbill +waxer +waxiness +waxplant +waxweed +waxwing +waxwork +way +waybill +wayfarer +waylayer +wayleave +ways +wayside +wayzgoose +wb +wc +wd +weakener +weakfish +weakheartedness +weakishness +weakliness +weakling +weakness +weal +weald +wealth +wealthiness +weanedness +weaner +weanling +weapon +weaponeer +weaponry +weaponshaw +wearability +wearer +weariness +wearisomeness +weasand +weasel +weason +weather +weatherability +weatherboard +weatherboarding +weathercock +weatherer +weatherfish +weatherglass +weathering +weatherliness +weatherman +weathertightness +weaver +weaverbird +weazand +web +webbing +weber +webfoot +webster +websterite +webwheel +webworm +wedding +wedeling +wedeln +wedge +wedlock +weed +weeder +weediness +weedkiller +week +weekday +weekend +weekender +weeknight +weenie +weeny +weeper +weepiness +weever +weevil +weevily +weft +weigela +weighbridge +weigher +weight +weighter +weightiness +weighting +weightlessness +weightlifting +weir +weirdie +weirdness +weirdo +weirdy +weisenheimer +wejack +weka +welcher +welcomeness +weldability +welder +weldment +weldor +welfare +welfarism +welkin +wellbeing +welldoer +welldoing +wellhead +wellhole +wellhouse +wellingtonia +wellness +wellpoint +wellsite +wellspring +welsher +welt +welterweight +welwitschia +wen +wench +wencher +wenchman +wensleydale +wentletrap +weregild +werewolf +wergild +wernerite +werste +werwolf +weskit +wessand +west +westerliness +westerner +westernisation +westernism +westing +westwork +wether +wetness +wettability +wey +wf +whacker +whale +whaleback +whaleboat +whalebone +whaler +whaling +wham +whammed +whamming +whangdoodle +whangee +whapper +whare +wharf +wharfage +wharfie +wharfinger +wharve +whatnot +whaup +wheal +wheat +wheatear +wheatgrass +wheatworm +wheel +wheelbarrow +wheelbarrower +wheelbase +wheelchair +wheeler +wheelhouse +wheelie +wheeling +wheelman +wheelsman +wheelwork +wheelwright +wheezer +wheeziness +whelk +whelp +wherefore +wherewithal +wherry +whetstone +whetter +whey +wheyface +wheyishness +whf +whidah +whiff +whiffer +whiffet +whiffler +whiffletree +whigmaleerie +whigmaleery +whim +whimbrel +whimperer +whimsey +whimsicality +whin +whinchat +whine +whinstone +whipcord +whiplash +whipper +whippersnapper +whippet +whipping +whippletree +whippoorwill +whipray +whips +whipsaw +whipstall +whipstitch +whipstock +whiptail +whipworm +whirlabout +whirlicote +whirligig +whirlpool +whirlwind +whirly +whirlybird +whish +whisker +whiskey +whisky +whisperer +whispering +whist +whistler +whistling +whit +whitleather +whitlow +whitlowwort +whitrack +whittler +whity +whodunit +wholefood +wholeheartedness +wholesale +wholesaler +wholesomeness +wholism +whomp +whooper +whoosh +whoosis +whoosy +whopper +whorl +whort +whortleberry +whosis +whr +whse +whsle +whydah +wi +wick +wickedness +wicker +wickerwork +wicket +wicketkeeper +wicking +wickiup +wickthing +wicopy +widder +widdy +widener +widgeon +widget +widgie +widow +widower +width +wielder +wiener +wienie +wife +wifedom +wifehood +wifelessness +wig +wigan +wigeon +wiggery +wigging +wiggler +wight +wigwagger +wigwam +wikiup +wildcatter +wildebeest +wilderness +wildfire +wildfowl +wilding +wildlife +wildling +wildness +wildwood +wile +wilfulness +wiliness +willemite +willer +willet +willingness +williwaw +willow +willower +willowherb +willpower +willy +wimble +wimple +wincey +winceyette +winch +wincher +winchester +wind +windage +windbag +windbaggery +windbreak +windburn +windcheater +windchest +windedness +winder +windfall +windflaw +windflower +windgall +windhover +windiness +winding +windingness +windjammer +windlass +windle +windlestraw +windmill +window +windowlight +windowpane +windowsill +windpipe +windrow +windrower +windsail +windscreen +windshield +windsock +windstorm +windsucker +windup +windwardness +windway +wine +wineberry +winebibber +wineglass +wineglassful +winegrower +winegrowing +winepress +winery +wineshop +wineskin +wing +wingback +wingding +wingedness +winger +winglessness +winglet +wingover +wingspan +wingspread +winker +winkle +winklehawk +winlestrae +winner +winningness +wino +winsomeness +winter +winterberry +winterbourne +winterer +wintergreen +winterization +wintertide +wintertime +wintle +wintriness +winze +wiper +wire +wiredancer +wiredancing +wirehair +wireless +wirelessness +wireman +wirepuller +wirepulling +wirer +wiresonde +wiretap +wiretapper +wirewalker +wirework +wireworks +wireworm +wiring +wisdom +wiseacre +wisecrack +wisenheimer +wisent +wishbone +wishfulness +wisp +wispiness +wisteria +wistfulness +wit +witan +witch +witchcraft +witchery +witchhood +wite +witenagemot +withamite +withdrawal +withdrawer +withdrawingness +withdrawnness +withe +witheredness +witherer +witherite +withholder +withstander +withstandingness +withy +witlessness +witling +witloof +witness +wittedness +witticism +wittiness +wittol +wivern +wives +wiz +wizard +wizardry +wk +wkly +wl +wmk +wo +woad +woadwaxen +woald +wobbegong +wobbler +wodge +woe +woefulness +wofulness +wog +woggle +wok +wold +wolf +wolfer +wolffish +wolfhound +wolfishness +wolfman +wolfram +wolframate +wolframite +wolframium +wolfsbane +wollastonite +wolly +wolver +wolverine +wolves +woman +womanhood +womanishness +womanizer +womankind +womanliness +womanness +womanpower +womb +wombat +women +womenfolk +womera +wommera +wonder +wonderberry +wonderer +wonderfulness +wonderland +wonderment +wonderwork +wondrousness +wonna +wont +wontedness +wood +woodbine +woodborer +woodbox +woodcarving +woodchat +woodchopper +woodchopping +woodchuck +woodcock +woodcraft +woodcreeper +woodcut +woodcutter +woodcutting +woodenhead +woodenness +woodenware +woodgrouse +woodhewer +woodhouse +woodiness +woodland +woodlark +woodlouse +woodman +woodmancraft +woodnote +woodpecker +woodpile +woodprint +woodruff +woodrush +woodscrew +woodshed +woodsia +woodsman +woodturner +woodwaxen +woodwork +woodworker +woodworking +woodworm +woof +woofer +wool +wooler +woolfell +woolgatherer +woolgathering +woolgrower +woolliness +woollybutt +woolpack +woolsack +woolshed +woomera +woomerang +woorali +woosh +wootz +wooziness +wop +word +wordage +wordbook +wordbreak +wordiness +wording +wordlessness +wordplay +wordsmith +work +workability +workableness +workbag +workbench +workbook +workday +worker +workhorse +workhouse +working +workingman +workingwoman +worklessness +workload +workman +workmanship +workout +workpiece +workroom +workshop +worktable +workweek +workwoman +world +worldliness +worldling +worm +wormcast +wormer +wormfish +wormhole +worminess +wormroot +worms +wormseed +wormwood +wornness +worrier +worriment +worrywart +worseness +worset +worshipfulness +worssett +worsted +wort +worthiness +worthlessness +wound +woundwort +wourali +wowser +wpm +wr +wrack +wraith +wrangler +wrapper +wrapping +wrasse +wrath +wrathiness +wreaker +wreath +wreather +wreckage +wrecker +wreckfish +wren +wrencher +wrester +wrestler +wrestling +wretch +wretchedness +wriggler +wrigglework +wright +wringer +wrinkle +wrinkledness +wrist +wristband +wristlet +wristlock +wristwatch +writ +writer +writher +writing +wrongdoer +wrongdoing +wronger +wrongfulness +wrongheadedness +wrongness +wrybill +wryneck +wryness +wulfenite +wunderkind +wurley +wurst +wurtzilite +wurtzite +wus +wye +wynd +wynn +wyvern +x +xalostockite +xanthate +xanthation +xanthein +xanthene +xanthin +xanthine +xanthochroism +xanthoma +xanthophyll +xanthosiderite +xat +xc +xcl +xd +xebec +xenia +xenocryst +xenodiagnosis +xenodocheion +xenogamy +xenogenesis +xenoglossia +xenolith +xenon +xenophile +xenophobe +xenophobia +xeroderma +xerography +xerophagy +xerophthalmia +xerophyte +xerophytism +xerosere +xerosis +xi +xiphisternum +xiphosuran +xis +xoanon +xr +xw +xylan +xylem +xylene +xylidine +xylo +xylocarp +xylograph +xylographer +xylography +xylol +xylophage +xylophone +xylose +xylostroma +xylotomist +xylotomy +xylyl +xyst +xyster +xystum +y +yabby +yacht +yachting +yachtmanship +yachtsmanship +yachtswoman +yack +yad +yaffle +yahoo +yahooism +yak +yakka +yam +yamen +yapok +yapon +yapp +yapper +yarak +yarborough +yard +yardage +yardang +yardarm +yardbird +yardman +yardstick +yarmulke +yarn +yarovization +yarraman +yarrow +yashmak +yataghan +yate +yaud +yaupon +yautia +yawl +yawmeter +yawner +yawper +yawweed +yazata +yd +yds +yealing +yeanling +year +yearbook +yearling +yearner +yearning +yeast +yeastiness +yegg +yeggman +yeldring +yelk +yellow +yellowback +yellowbark +yellowbelly +yellowbird +yellowhammer +yellowlegs +yellowness +yellowtail +yellowthroat +yellowweed +yellowwood +yelper +yen +yenta +yeo +yeoman +yeomanry +yerba +yeshiva +yesterday +yesterdayness +yestereve +yesterevening +yesternight +yesternoon +yesterweek +yesteryear +yeti +yett +yew +yi +yid +yieldingness +yike +yippie +ylem +yob +yod +yodeler +yodeller +yodle +yodler +yoga +yogh +yoghurt +yogi +yogini +yogurt +yohimbine +yoke +yokefellow +yokel +yolk +yoni +yonnie +yore +yorker +youngberry +youngling +youngster +younker +yous +youth +youthfulness +yperite +yrs +ytterbia +ytterbite +ytterbium +yttria +yttrium +yttrotantalite +yuan +yucca +yulan +yule +yuletide +yuquilla +yurt +z +zabaglione +zacatun +zack +zaddik +zaffer +zaibatsu +zaire +zakah +zakat +zakuska +zamarra +zamia +zamindar +zamindari +zander +zaniness +zanthoxylum +zanyism +zapateado +zaptiah +zaratite +zareba +zarf +zarzuela +zastruga +zax +zayin +zeal +zealot +zealotry +zealousness +zebec +zebra +zebrafish +zebrass +zebrawood +zebu +zecchino +zed +zedoary +zee +zein +zemindar +zemstvo +zenana +zendo +zenith +zeolite +zephyr +zeppelin +zero +zeroed +zeroing +zest +zestfulness +zeta +zeugma +zho +zibeline +zibet +ziff +zigzag +zigzaggedness +zigzagger +zila +zillion +zimarra +zinc +zincate +zincite +zinckenite +zincograph +zincographer +zincography +zinfandel +zing +zingara +zingaro +zinjanthropus +zinkenite +zinnia +zinnwaldite +zip +zipper +zircalloy +zircon +zirconate +zirconia +zirconium +zirconyl +zither +zitherist +zithern +zittern +zizith +zloty +zo +zoa +zoaea +zoanthropy +zodiac +zoea +zoetrope +zogan +zoisite +zombi +zombie +zonation +zonda +zone +zonetime +zonite +zonule +zoo +zoochem +zoochemistry +zoochore +zoogeog +zoogeography +zoogloea +zoografting +zoographer +zoography +zooid +zool +zoolater +zoolatry +zoologist +zoology +zoometry +zoomorph +zoomorphism +zoon +zoonosis +zoophile +zoophilism +zoophobia +zoophorus +zoophyte +zooplankton +zooplasty +zoosperm +zoosporangium +zoospore +zoosterol +zootechnics +zootomy +zootoxin +zorilla +zoster +zoysia +zucchetto +zucchini +zugzwang +zwieback +zwitterion +zygapophysis +zygoma +zygophyte +zygosis +zygospore +zygote +zygotene +zymase +zymogen +zymogenesis +zymology +zymolysis +zymometer +zymosis diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/AbstractOperationsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/AbstractOperationsTest.java new file mode 100644 index 00000000000..ab1250658a7 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/AbstractOperationsTest.java @@ -0,0 +1,220 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.operations; + +import static org.mockito.Mockito.RETURNS_SMART_NULLS; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.ApplicationsV2; +import org.cloudfoundry.client.v2.buildpacks.Buildpacks; +import org.cloudfoundry.client.v2.domains.Domains; +import org.cloudfoundry.client.v2.events.Events; +import org.cloudfoundry.client.v2.featureflags.FeatureFlags; +import org.cloudfoundry.client.v2.jobs.Jobs; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitions; +import org.cloudfoundry.client.v2.organizations.Organizations; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomains; +import org.cloudfoundry.client.v2.resourcematch.ResourceMatch; +import org.cloudfoundry.client.v2.routes.Routes; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingsV2; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokers; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstances; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeys; +import org.cloudfoundry.client.v2.serviceplans.ServicePlans; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilities; +import org.cloudfoundry.client.v2.services.Services; +import org.cloudfoundry.client.v2.shareddomains.SharedDomains; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitions; +import org.cloudfoundry.client.v2.spaces.Spaces; +import org.cloudfoundry.client.v2.stacks.Stacks; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstances; +import org.cloudfoundry.client.v2.users.Users; +import org.cloudfoundry.client.v3.applications.ApplicationsV3; +import org.cloudfoundry.client.v3.buildpacks.BuildpacksV3; +import org.cloudfoundry.client.v3.domains.DomainsV3; +import org.cloudfoundry.client.v3.jobs.JobsV3; +import org.cloudfoundry.client.v3.organizations.OrganizationsV3; +import org.cloudfoundry.client.v3.routes.RoutesV3; +import org.cloudfoundry.client.v3.spaces.SpacesV3; +import org.cloudfoundry.client.v3.stacks.StacksV3; +import org.cloudfoundry.client.v3.tasks.Tasks; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.routing.v1.routergroups.RouterGroups; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.authorizations.Authorizations; +import org.cloudfoundry.uaa.tokens.Tokens; +import org.junit.jupiter.api.BeforeEach; +import reactor.core.publisher.Mono; + +public abstract class AbstractOperationsTest { + + protected static final Mono MISSING_ID = + Mono.error(new java.lang.IllegalStateException("MISSING_ID")); + + protected static final Mono MISSING_ORGANIZATION_ID = + Mono.error(new java.lang.IllegalStateException("MISSING_ORGANIZATION_ID")); + + protected static final Mono MISSING_SPACE_ID = + Mono.error(new java.lang.IllegalStateException("MISSING_SPACE_ID")); + + protected static final Mono MISSING_USERNAME = + Mono.error(new java.lang.IllegalStateException("MISSING_USERNAME")); + + protected static final String TEST_ORGANIZATION_ID = "test-organization-id"; + + protected static final String TEST_ORGANIZATION_NAME = "test-organization-name"; + + protected static final String TEST_SPACE_ID = "test-space-id"; + + protected static final String TEST_SPACE_NAME = "test-space-name"; + + protected static final String TEST_USERNAME = "test-username"; + + protected static final String APP_FEATURE_SSH = "ssh"; + + protected final ApplicationsV2 applications = mock(ApplicationsV2.class, RETURNS_SMART_NULLS); + + protected final ApplicationsV3 applicationsV3 = mock(ApplicationsV3.class, RETURNS_SMART_NULLS); + + protected final Authorizations authorizations = mock(Authorizations.class, RETURNS_SMART_NULLS); + + protected final Buildpacks buildpacks = mock(Buildpacks.class, RETURNS_SMART_NULLS); + protected final BuildpacksV3 buildpacksV3 = mock(BuildpacksV3.class, RETURNS_SMART_NULLS); + + protected final CloudFoundryClient cloudFoundryClient = + mock(CloudFoundryClient.class, RETURNS_SMART_NULLS); + + protected final Domains domains = mock(Domains.class, RETURNS_SMART_NULLS); + protected final DomainsV3 domainsV3 = mock(DomainsV3.class, RETURNS_SMART_NULLS); + + protected final DopplerClient dopplerClient = mock(DopplerClient.class, RETURNS_SMART_NULLS); + + protected final Events events = mock(Events.class, RETURNS_SMART_NULLS); + + protected final FeatureFlags featureFlags = mock(FeatureFlags.class, RETURNS_SMART_NULLS); + + protected final Jobs jobs = mock(Jobs.class, RETURNS_SMART_NULLS); + protected final JobsV3 jobsV3 = mock(JobsV3.class, RETURNS_SMART_NULLS); + + protected final OrganizationQuotaDefinitions organizationQuotaDefinitions = + mock(OrganizationQuotaDefinitions.class, RETURNS_SMART_NULLS); + + protected final Organizations organizations = mock(Organizations.class, RETURNS_SMART_NULLS); + protected final OrganizationsV3 organizationsV3 = + mock(OrganizationsV3.class, RETURNS_SMART_NULLS); + + protected final PrivateDomains privateDomains = mock(PrivateDomains.class, RETURNS_SMART_NULLS); + + protected final ResourceMatch resourceMatch = mock(ResourceMatch.class, RETURNS_SMART_NULLS); + + protected final RouterGroups routerGroups = mock(RouterGroups.class, RETURNS_SMART_NULLS); + + protected final Routes routes = mock(Routes.class, RETURNS_SMART_NULLS); + protected final RoutesV3 routesV3 = mock(RoutesV3.class, RETURNS_SMART_NULLS); + + protected final RoutingClient routingClient = mock(RoutingClient.class, RETURNS_SMART_NULLS); + + protected final ServiceBindingsV2 serviceBindingsV2 = + mock(ServiceBindingsV2.class, RETURNS_SMART_NULLS); + + protected final ServiceBrokers serviceBrokers = mock(ServiceBrokers.class, RETURNS_SMART_NULLS); + + protected final ServiceInstances serviceInstances = + mock(ServiceInstances.class, RETURNS_SMART_NULLS); + + protected final ServiceKeys serviceKeys = mock(ServiceKeys.class, RETURNS_SMART_NULLS); + + protected final ServicePlanVisibilities servicePlanVisibilities = + mock(ServicePlanVisibilities.class, RETURNS_SMART_NULLS); + + protected final ServicePlans servicePlans = mock(ServicePlans.class, RETURNS_SMART_NULLS); + + protected final Services services = mock(Services.class, RETURNS_SMART_NULLS); + + protected final SharedDomains sharedDomains = mock(SharedDomains.class, RETURNS_SMART_NULLS); + + protected final SpaceQuotaDefinitions spaceQuotaDefinitions = + mock(SpaceQuotaDefinitions.class, RETURNS_SMART_NULLS); + + protected final Spaces spaces = mock(Spaces.class, RETURNS_SMART_NULLS); + protected final SpacesV3 spacesV3 = mock(SpacesV3.class, RETURNS_SMART_NULLS); + + protected final Stacks stacks = mock(Stacks.class, RETURNS_SMART_NULLS); + protected final StacksV3 stacksV3 = mock(StacksV3.class, RETURNS_SMART_NULLS); + + protected final Tasks tasks = mock(Tasks.class, RETURNS_SMART_NULLS); + + protected final Tokens tokens = mock(Tokens.class, RETURNS_SMART_NULLS); + + protected final UaaClient uaaClient = mock(UaaClient.class, RETURNS_SMART_NULLS); + + protected final org.cloudfoundry.uaa.users.Users uaaUsers = + mock(org.cloudfoundry.uaa.users.Users.class, RETURNS_SMART_NULLS); + + protected final UserProvidedServiceInstances userProvidedServiceInstances = + mock(UserProvidedServiceInstances.class, RETURNS_SMART_NULLS); + + protected final Users users = mock(Users.class, RETURNS_SMART_NULLS); + + @BeforeEach + public final void mockClient() { + when(this.cloudFoundryClient.applicationsV2()).thenReturn(this.applications); + when(this.cloudFoundryClient.applicationsV3()).thenReturn(this.applicationsV3); + when(this.cloudFoundryClient.buildpacks()).thenReturn(this.buildpacks); + when(this.cloudFoundryClient.buildpacksV3()).thenReturn(this.buildpacksV3); + when(this.cloudFoundryClient.domains()).thenReturn(this.domains); + when(this.cloudFoundryClient.domainsV3()).thenReturn(this.domainsV3); + when(this.cloudFoundryClient.events()).thenReturn(this.events); + when(this.cloudFoundryClient.featureFlags()).thenReturn(this.featureFlags); + when(this.cloudFoundryClient.jobs()).thenReturn(this.jobs); + when(this.cloudFoundryClient.jobsV3()).thenReturn(this.jobsV3); + when(this.cloudFoundryClient.organizations()).thenReturn(this.organizations); + when(this.cloudFoundryClient.organizationsV3()).thenReturn(this.organizationsV3); + when(this.cloudFoundryClient.organizationQuotaDefinitions()) + .thenReturn(this.organizationQuotaDefinitions); + when(this.cloudFoundryClient.privateDomains()).thenReturn(this.privateDomains); + when(this.cloudFoundryClient.resourceMatch()).thenReturn(this.resourceMatch); + when(this.cloudFoundryClient.routes()).thenReturn(this.routes); + when(this.cloudFoundryClient.routesV3()).thenReturn(this.routesV3); + when(this.cloudFoundryClient.serviceBindingsV2()).thenReturn(this.serviceBindingsV2); + when(this.cloudFoundryClient.serviceBrokers()).thenReturn(this.serviceBrokers); + when(this.cloudFoundryClient.serviceInstances()).thenReturn(this.serviceInstances); + when(this.cloudFoundryClient.serviceKeys()).thenReturn(this.serviceKeys); + when(this.cloudFoundryClient.servicePlans()).thenReturn(this.servicePlans); + when(this.cloudFoundryClient.servicePlanVisibilities()) + .thenReturn(this.servicePlanVisibilities); + when(this.cloudFoundryClient.services()).thenReturn(this.services); + when(this.cloudFoundryClient.sharedDomains()).thenReturn(this.sharedDomains); + when(this.cloudFoundryClient.spaceQuotaDefinitions()) + .thenReturn(this.spaceQuotaDefinitions); + when(this.cloudFoundryClient.spaces()).thenReturn(this.spaces); + when(this.cloudFoundryClient.spacesV3()).thenReturn(this.spacesV3); + when(this.cloudFoundryClient.stacks()).thenReturn(this.stacks); + when(this.cloudFoundryClient.stacksV3()).thenReturn(this.stacksV3); + when(this.cloudFoundryClient.tasks()).thenReturn(this.tasks); + when(this.cloudFoundryClient.userProvidedServiceInstances()) + .thenReturn(this.userProvidedServiceInstances); + when(this.cloudFoundryClient.users()).thenReturn(this.users); + + when(this.routingClient.routerGroups()).thenReturn(this.routerGroups); + + when(this.uaaClient.authorizations()).thenReturn(this.authorizations); + when(this.uaaClient.tokens()).thenReturn(this.tokens); + when(this.uaaClient.users()).thenReturn(this.uaaUsers); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/DefaultCloudFoundryOperationsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/DefaultCloudFoundryOperationsTest.java new file mode 100644 index 00000000000..02e671a3e6c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/DefaultCloudFoundryOperationsTest.java @@ -0,0 +1,104 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +final class DefaultCloudFoundryOperationsTest extends AbstractOperationsTest { + + private final DefaultCloudFoundryOperations operations = + DefaultCloudFoundryOperations.builder() + .cloudFoundryClient(this.cloudFoundryClient) + .dopplerClient(this.dopplerClient) + .routingClient(this.routingClient) + .organization(TEST_ORGANIZATION_NAME) + .space(TEST_SPACE_NAME) + .uaaClient(this.uaaClient) + .build(); + + @Test + void advanced() { + assertThat(this.operations.advanced()).isNotNull(); + } + + @Test + void applications() { + assertThat(this.operations.applications()).isNotNull(); + } + + @Test + void buildpacks() { + assertThat(this.operations.buildpacks()).isNotNull(); + } + + @Test + void domains() { + assertThat(this.operations.domains()).isNotNull(); + } + + @Test + void networkPolicies() { + assertThat(this.operations.networkPolicies()).isNotNull(); + } + + @Test + void organizationAdmin() { + assertThat(this.operations.organizationAdmin()).isNotNull(); + } + + @Test + void organizations() { + assertThat(this.operations.organizations()).isNotNull(); + } + + @Test + void routes() { + assertThat(this.operations.routes()).isNotNull(); + } + + @Test + void serviceAdmin() { + assertThat(this.operations.serviceAdmin()).isNotNull(); + } + + @Test + void services() { + assertThat(this.operations.services()).isNotNull(); + } + + @Test + void spaceAdmin() { + assertThat(this.operations.spaceAdmin()).isNotNull(); + } + + @Test + void spaces() { + assertThat(this.operations.spaces()).isNotNull(); + } + + @Test + void stacks() { + assertThat(this.operations.stacks()).isNotNull(); + } + + @Test + void userAdmin() { + assertThat(this.operations.userAdmin()).isNotNull(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/TestObjects.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/TestObjects.java new file mode 100644 index 00000000000..119b62fabb0 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/TestObjects.java @@ -0,0 +1,245 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.lang.reflect.Array; +import java.lang.reflect.Method; +import java.lang.reflect.Modifier; +import java.lang.reflect.Parameter; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.function.Predicate; +import java.util.stream.Collectors; +import org.springframework.util.ReflectionUtils; + +/** + * {@code TestObjects} provides a generic utility which transforms a builder object of type {@code T}, by calling its configuration methods with default values. + *

          + * A builder object of type T is an object with a {@code build()} method returning a built object whose type has a {@code builder} of type T. + *

          + * A built object of type B is an object with a {@code builder()} method returning a builder object which builds type B. + *

          + * The exported static methods are {@link #fill T fill(T, String)} and {@link #fill T fill(T)}. The {@code T} argument must be an object of builder type (which is returned as result), + * and the {@code String} is a modifier which is used to augment the {@code String} values set. The modifier must not be {@code null}. + *

          + * {@code fill(b)} is equivalent to {@code fill(b, "")}. + *

          + * {@code TestObjects} populates builder objects with test values. Builder setter methods are called with standard values based upon the parameter type and the name of the setter method. + *

            + *
          • {@code enum} types are set to the first enumerated constant value.
          • + *
          • {@link Boolean} types are set to {@code true}.
          • + *
          • {@link Date} types are set to {@code new Date(0)}.
          • + *
          • {@link Double} types are set to {@code 1.0}.
          • + *
          • {@link Duration} types are set to a duration of 15 seconds.
          • + *
          • {@link Integer} or {@link Long} types are set to {@code 1}.
          • + *
          • {@link Iterable} types are set to empty.
          • + *
          • {@link Map} types are set to empty.
          • + *
          • {@link String} types are set to {@code "test-"+modifier+settername}.
          • + *
          • Types of built objects are set to a value built from a (recursively) {@code fill()}ed builder instance.
          • + *
          + *

          + * Only public, chainable, single-parameter setter methods which have a corresponding getter (on the type built) are configured. + *

          + * Non-builder objects, or builder objects that build {@code *Request} types, are rejected (by assertion failure). + */ +public abstract class TestObjects { + + private TestObjects() { // do not instantiate this class + } + + /** + * Fill a builder by calling its configuration methods with default values. + * + * @param builder the builder to fill + * @param The type of the builder + * @return the filled builder + */ + public static T fill(T builder) { + return fill(builder, Optional.empty()); + } + + /** + * Fill a builder by calling its configuration methods with default values. + * + * @param builder the builder to fill + * @param modifier a modifier for the values of {@link String} types + * @param The type of the builder + * @return the filled builder + */ + public static T fill(T builder, String modifier) { + return fill(builder, Optional.of(modifier)); + } + + private static boolean buildsRequestType(Class builderType) { + return getBuiltType(builderType).getName().endsWith("Request"); + } + + private static T fill(T builder, Optional modifier) { + Class builderType = builder.getClass(); + assertThat(isBuilderType(builderType)) + .as("Cannot fill type %s", builderType.getName()) + .isTrue(); + assertThat(buildsRequestType(builderType)).as("Do not fill Request types").isFalse(); + + List builderMethods = getMethods(builderType); + Set builtGetters = getBuiltGetters(builderType); + + return getConfigurationMethods(builderType, builderMethods, builtGetters).stream() + .collect( + () -> builder, + (b, method) -> + ReflectionUtils.invokeMethod( + method, b, getConfiguredValue(method, modifier)), + (a, b) -> {}); + } + + private static Method getBuildMethod(Class builderType) { + return ReflectionUtils.findMethod(builderType, "build"); + } + + private static Method getBuilderMethod(Class builderType) { + return ReflectionUtils.findMethod(builderType, "builder"); + } + + private static Set getBuiltGetters(Class builderType) { + Class builtType = getBuiltType(builderType); + return Arrays.stream(ReflectionUtils.getUniqueDeclaredMethods(builtType)) + .map(Method::getName) + .filter(s -> s.startsWith("get")) + .collect(Collectors.toSet()); + } + + private static Class getBuiltType(Class builderType) { + return getBuildMethod(builderType).getReturnType(); + } + + private static List getConfigurationMethods( + Class builderType, List builderMethods, Set builtGetters) { + return builderMethods.stream() + .filter(TestObjects::isPublic) + .filter(returnsThisType(builderType)) + .filter(TestObjects::hasSingleParameter) + .filter(method -> hasMatchingGetter(method, builtGetters)) + .collect(Collectors.toList()); + } + + private static Object getConfiguredBuilder(Class parameterType, Optional modifier) { + Object builder = ReflectionUtils.invokeMethod(getBuilderMethod(parameterType), null); + Method buildMethod = getBuildMethod(builder.getClass()); + + return ReflectionUtils.invokeMethod(buildMethod, fill(builder, modifier)); + } + + private static Object getConfiguredEnum(Class parameterType) { + return parameterType.getEnumConstants()[0]; + } + + private static String getConfiguredString(Method method, Optional modifier) { + return modifier.map(m -> String.format("test-%s%s", m, method.getName())) + .orElse(String.format("test-%s", method.getName())); + } + + @SuppressWarnings("unchecked") + private static Object getConfiguredValue( + Method configurationMethod, Optional modifier) { + Class parameterType = getParameter(configurationMethod).getType(); + + if (isBuiltType(parameterType)) { + return getConfiguredBuilder(parameterType, modifier); + } else if (Enum.class.isAssignableFrom(parameterType)) { + return getConfiguredEnum(parameterType); + } else if (parameterType == Boolean.class) { + return Boolean.TRUE; + } else if (parameterType == Date.class) { + return new Date(0); + } else if (parameterType == Double.class) { + return 1D; + } else if (parameterType == Duration.class) { + return Duration.ofSeconds(15); + } else if (parameterType == Integer.class) { + return 1; + } else if (parameterType == Iterable.class) { + return Collections.emptyList(); + } else if (parameterType == Long.class) { + return 1L; + } else if (parameterType == Map.class) { + return Collections.emptyMap(); + } else if (parameterType == String.class) { + return getConfiguredString(configurationMethod, modifier); + } else if (parameterType.isArray()) { + return Array.newInstance(parameterType.getComponentType(), 0); + } else { + throw new IllegalStateException( + String.format("Unable to configure %s", configurationMethod)); + } + } + + private static List getMethods(Class builderType) { + return Arrays.asList(ReflectionUtils.getUniqueDeclaredMethods(builderType)); + } + + private static Parameter getParameter(Method method) { + return method.getParameters()[0]; + } + + private static boolean hasMatchingGetter(Method method, Set builtGetters) { + String propertyName = method.getName(); + String candidate = + String.format( + "get%s%s", + propertyName.substring(0, 1).toUpperCase(), propertyName.substring(1)); + return builtGetters.contains(candidate); + } + + private static boolean hasSingleParameter(Method method) { + return 1 == method.getParameterCount(); + } + + private static boolean isBuilderType(Class aType) { + return Optional.ofNullable(getBuildMethod(aType)) + .map(Method::getReturnType) + .map(TestObjects::getBuilderMethod) + .map(Method::getReturnType) + .map(aType::equals) + .orElse(false); + } + + private static boolean isBuiltType(Class aType) { + return Optional.ofNullable(getBuilderMethod(aType)) + .map(Method::getReturnType) + .map(TestObjects::getBuildMethod) + .map(Method::getReturnType) + .map(aType::equals) + .orElse(false); + } + + private static boolean isPublic(Method method) { + return Modifier.isPublic(method.getModifiers()); + } + + private static Predicate returnsThisType(Class aType) { + return method -> aType == method.getReturnType(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/advanced/DefaultAdvancedTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/advanced/DefaultAdvancedTest.java new file mode 100644 index 00000000000..916ec6f857d --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/advanced/DefaultAdvancedTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.advanced; + +import static org.mockito.Mockito.when; + +import java.time.Duration; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantApiRequest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultAdvancedTest extends AbstractOperationsTest { + + private final DefaultAdvanced advanced = new DefaultAdvanced(Mono.just(this.uaaClient)); + + @Test + void sshCode() { + requestAuthorizeByAuthorizationCodeGrantApi(this.uaaClient); + + this.advanced + .sshCode() + .as(StepVerifier::create) + .expectNext("test-code") + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestAuthorizeByAuthorizationCodeGrantApi(UaaClient uaaClient) { + when(uaaClient + .authorizations() + .authorizationCodeGrantApi( + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .clientId("ssh-proxy") + .build())) + .thenReturn(Mono.just("test-code")); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestTest.java new file mode 100644 index 00000000000..2c66a330d67 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestTest.java @@ -0,0 +1,111 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class ApplicationManifestTest { + + @Test + void dockerAndBuildpack() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifest.builder() + .name("test-name") + .buildpack("test-buildpack") + .docker(Docker.builder().image("test-docker-image").build()) + .build(); + }); + } + + @Test + void dockerAndPath() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifest.builder() + .name("test-name") + .docker(Docker.builder().image("test-docker-image").build()) + .path(Paths.get("test-application")) + .build(); + }); + } + + @Test + void dockerCredentialsNoImage() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifest.builder() + .name("test-name") + .docker( + Docker.builder() + .password("test-password") + .username("test-username") + .build()) + .build(); + }); + } + + @Test + void routesAndDomains() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifest.builder() + .name("test-name") + .route(Route.builder().route("test-route").build()) + .domain("test-domain") + .build(); + }); + } + + @Test + void routesAndHosts() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifest.builder() + .name("test-name") + .route(Route.builder().route("test-route").build()) + .host("test-host") + .build(); + }); + } + + @Test + void routesAndNoHostName() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifest.builder() + .name("test-name") + .route(Route.builder().route("test-route").build()) + .noHostname(true) + .build(); + }); + } + + @Test + void valid() { + ApplicationManifest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java new file mode 100644 index 00000000000..7ed8fbb9cef --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsTest.java @@ -0,0 +1,687 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.AssertionsForClassTypes.assertThatExceptionOfType; +import static org.cloudfoundry.operations.applications.ApplicationHealthCheck.NONE; +import static org.cloudfoundry.operations.applications.ApplicationHealthCheck.PORT; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assumptions.assumeTrue; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.Paths; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.NoSuchElementException; +import org.apache.commons.lang3.SystemUtils; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; + +final class ApplicationManifestUtilsTest { + + @Test + void anchorsAndReferences() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("test-application") + .service("test-service-name") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-kilo.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readCommon() throws IOException { + List expected = + Arrays.asList( + ApplicationManifest.builder() + .name("charlie-application-1") + .buildpack("charlie-buildpack") + .command("charlie-command") + .disk(-1) + .healthCheckHttpEndpoint("charlie-health-check-http-endpoint") + .healthCheckType(NONE) + .instances(-1) + .memory(-1) + .noRoute(true) + .path(Paths.get("/charlie-path").toAbsolutePath()) + .randomRoute(true) + .route(Route.builder().route("charlie-route-1").build()) + .route(Route.builder().route("charlie-route-2").build()) + .stack("charlie-stack") + .timeout(-1) + .environmentVariable("CHARLIE_KEY_1", "charlie-value-1") + .environmentVariable("CHARLIE_KEY_2", "charlie-value-2") + .service("charlie-instance-1") + .service("charlie-instance-2") + .build(), + ApplicationManifest.builder() + .name("charlie-application-2") + .buildpacks("charlie-buildpack", "alternate-buildpack") + .command("alternate-command") + .disk(-2) + .healthCheckHttpEndpoint("alternate-health-check-http-endpoint") + .healthCheckType(PORT) + .instances(-2) + .memory(-2) + .noRoute(false) + .path(Paths.get("/alternate-path").toAbsolutePath()) + .randomRoute(false) + .route(Route.builder().route("charlie-route-1").build()) + .route(Route.builder().route("charlie-route-2").build()) + .route(Route.builder().route("alternate-route-1").build()) + .route(Route.builder().route("alternate-route-2").build()) + .stack("alternate-stack") + .timeout(-2) + .environmentVariable("CHARLIE_KEY_1", "charlie-value-1") + .environmentVariable("CHARLIE_KEY_2", "charlie-value-2") + .environmentVariable("ALTERNATE_KEY_1", "alternate-value-1") + .environmentVariable("ALTERNATE_KEY_2", "alternate-value-2") + .service("charlie-instance-1") + .service("charlie-instance-2") + .service("alternate-instance-1") + .service("alternate-instance-2") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-charlie.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readCommonAndInherit() throws IOException { + List expected = + Arrays.asList( + ApplicationManifest.builder() + .name("charlie-application-1") + .buildpacks("charlie-buildpack", "delta-buildpack") + .command("delta-command") + .disk(-3) + .healthCheckHttpEndpoint("delta-health-check-http-endpoint") + .healthCheckType(NONE) + .instances(-3) + .memory(-3) + .noRoute(true) + .path(Paths.get("/delta-path").toAbsolutePath()) + .randomRoute(true) + .route(Route.builder().route("charlie-route-1").build()) + .route(Route.builder().route("charlie-route-2").build()) + .route(Route.builder().route("delta-route-1").build()) + .route(Route.builder().route("delta-route-2").build()) + .stack("delta-stack") + .timeout(-3) + .environmentVariable("CHARLIE_KEY_1", "charlie-value-1") + .environmentVariable("CHARLIE_KEY_2", "charlie-value-2") + .environmentVariable("DELTA_KEY_1", "delta-value-1") + .environmentVariable("DELTA_KEY_2", "delta-value-2") + .service("charlie-instance-1") + .service("charlie-instance-2") + .service("delta-instance-1") + .service("delta-instance-2") + .build(), + ApplicationManifest.builder() + .name("charlie-application-2") + .buildpacks( + "charlie-buildpack", + "delta-buildpack", + "alternate-buildpack") + .command("alternate-command") + .disk(-2) + .healthCheckHttpEndpoint("alternate-health-check-http-endpoint") + .healthCheckType(PORT) + .instances(-2) + .memory(-2) + .noRoute(false) + .path(Paths.get("/alternate-path").toAbsolutePath()) + .randomRoute(false) + .route(Route.builder().route("charlie-route-1").build()) + .route(Route.builder().route("charlie-route-2").build()) + .route(Route.builder().route("delta-route-1").build()) + .route(Route.builder().route("delta-route-2").build()) + .route(Route.builder().route("alternate-route-1").build()) + .route(Route.builder().route("alternate-route-2").build()) + .stack("alternate-stack") + .timeout(-2) + .environmentVariable("CHARLIE_KEY_1", "charlie-value-1") + .environmentVariable("CHARLIE_KEY_2", "charlie-value-2") + .environmentVariable("DELTA_KEY_1", "delta-value-1") + .environmentVariable("DELTA_KEY_2", "delta-value-2") + .environmentVariable("ALTERNATE_KEY_1", "alternate-value-1") + .environmentVariable("ALTERNATE_KEY_2", "alternate-value-2") + .service("charlie-instance-1") + .service("charlie-instance-2") + .service("delta-instance-1") + .service("delta-instance-2") + .service("alternate-instance-1") + .service("alternate-instance-2") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-delta.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readDocker() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("lima-application-1") + .docker( + Docker.builder() + .image("lima-docker-image") + .password("lima-docker-password") + .username("lima-docker-username") + .build()) + .healthCheckHttpEndpoint("lima-health-check-http-endpoint") + .healthCheckType(NONE) + .noRoute(false) + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-lima.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readInherit() throws IOException { + List expected = + Arrays.asList( + ApplicationManifest.builder() + .name("alpha-application-1") + .buildpacks("alpha-buildpack", "beta-buildpack") + .command("beta-command") + .disk(-2) + .healthCheckHttpEndpoint("beta-health-check-http-endpoint") + .healthCheckType(NONE) + .instances(-2) + .memory(2) + .noRoute(false) + .path(Paths.get("/beta-path").toAbsolutePath()) + .randomRoute(false) + .route(Route.builder().route("alpha-route-1").build()) + .route(Route.builder().route("alpha-route-2").build()) + .route(Route.builder().route("beta-route-1").build()) + .route(Route.builder().route("beta-route-2").build()) + .stack("beta-stack") + .timeout(-2) + .environmentVariable("ALPHA_KEY_1", "alpha-value-1") + .environmentVariable("ALPHA_KEY_2", "alpha-value-2") + .environmentVariable("BETA_KEY_1", "beta-value-1") + .environmentVariable("BETA_KEY_2", "beta-value-2") + .service("alpha-instance-1") + .service("alpha-instance-2") + .service("beta-instance-1") + .service("beta-instance-2") + .build(), + ApplicationManifest.builder() + .name("beta-application-1") + .buildpack("beta-buildpack") + .command("beta-command") + .disk(-1) + .healthCheckHttpEndpoint("beta-health-check-http-endpoint") + .healthCheckType(NONE) + .instances(-1) + .memory(2048) + .noRoute(true) + .path(Paths.get("/beta-path").toAbsolutePath()) + .randomRoute(true) + .route(Route.builder().route("beta-route-1").build()) + .route(Route.builder().route("beta-route-2").build()) + .stack("beta-stack") + .timeout(-1) + .environmentVariable("BETA_KEY_1", "beta-value-1") + .environmentVariable("BETA_KEY_2", "beta-value-2") + .service("beta-instance-1") + .service("beta-instance-2") + .build(), + ApplicationManifest.builder() + .name("beta-application-2") + .buildpack("beta-buildpack") + .command("beta-command") + .disk(-1) + .domain("beta-domain") + .domain("beta-domains-1") + .domain("beta-domains-2") + .healthCheckHttpEndpoint("beta-health-check-http-endpoint") + .healthCheckType(NONE) + .host("beta-host") + .host("beta-hosts-1") + .host("beta-hosts-2") + .instances(-1) + .memory(2) + .noHostname(true) + .noRoute(true) + .path(Paths.get("/beta-path").toAbsolutePath()) + .randomRoute(true) + .stack("beta-stack") + .timeout(-1) + .environmentVariable("BETA_KEY_1", "beta-value-1") + .environmentVariable("BETA_KEY_2", "beta-value-2") + .service("beta-instance-1") + .service("beta-instance-2") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-beta.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readInheritCommon() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("juliet-application") + .buildpack("indigo-buildpack") + .command("indigo-command") + .disk(-1) + .healthCheckHttpEndpoint("indigo-health-check-http-endpoint") + .healthCheckType(NONE) + .instances(-1) + .memory(-1) + .noRoute(true) + .path(Paths.get("/indigo-path").toAbsolutePath()) + .randomRoute(true) + .route(Route.builder().route("indigo-route-1").build()) + .route(Route.builder().route("indigo-route-2").build()) + .stack("indigo-stack") + .timeout(-1) + .environmentVariable("INDIGO_KEY_1", "indigo-value-1") + .environmentVariable("INDIGO_KEY_2", "indigo-value-2") + .service("indigo-instance-1") + .service("indigo-instance-2") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-juliet.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readNoApplications() throws IOException { + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-hotel.yml").getFile().toPath()); + + assertThat(actual).isEmpty(); + } + + @Test + void readNoName() throws IOException { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-foxtrot.yml") + .getFile() + .toPath()); + }); + } + + @Test + void readNoRoute() throws IOException { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-golf.yml").getFile().toPath()); + }); + } + + @Test + void relativePath() throws IOException { + Path root = new ClassPathResource("fixtures/manifest-november.yml").getFile().toPath(); + + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("alpha-application-1") + .path(root.getParent().resolve("alpha-path")) + .build()); + + List actual = ApplicationManifestUtils.read(root); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void diskQuotaAndMemoryParsing() throws Exception { + List expected = + Arrays.asList( + ApplicationManifest.builder() + .name("quota-test-1") + .memory(1) + .disk(2) + .build(), + ApplicationManifest.builder() + .name("quota-test-2") + .memory(3) + .disk(4) + .build(), + ApplicationManifest.builder() + .name("quota-test-3") + .memory(5) + .disk(6) + .build(), + ApplicationManifest.builder() + .name("quota-test-4") + .memory(7) + .disk(8) + .build(), + ApplicationManifest.builder() + .name("quota-test-5") + .memory(1024) + .disk(2048) + .build(), + ApplicationManifest.builder() + .name("quota-test-6") + .memory(3072) + .disk(4096) + .build(), + ApplicationManifest.builder() + .name("quota-test-7") + .memory(5120) + .disk(6144) + .build(), + ApplicationManifest.builder() + .name("quota-test-8") + .memory(7168) + .disk(8192) + .build(), + ApplicationManifest.builder() + .name("quota-test-9") + .memory(1234) + .disk(5678) + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-mike.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readSingleBuildpack() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("oscar-application") + .buildpack("oscar-buildpack") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-oscar.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readWithVariableSubstitution() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("papa-1-application") + .buildpack("papa-buildpack") + .instances(2) + .memory(1024) + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-1.yml").getFile().toPath(), + new ClassPathResource("fixtures/vars-papa-1.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readWithVariableSubstitution_throwExceptionOnMissing() throws IOException { + assertThatExceptionOfType(NoSuchElementException.class) + .isThrownBy( + () -> { + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-2.yml") + .getFile() + .toPath(), + new ClassPathResource("fixtures/vars-papa-2.yml") + .getFile() + .toPath()); + }) + .withMessageMatching("Expected to find variable: abcdef"); + } + + @Test + void readWithVariableSubstitution_dontEvaluateRegex() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("papa-7-application") + .buildpack("((regex*))") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-7.yml").getFile().toPath(), + new ClassPathResource("fixtures/vars-papa-7.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readWithVariableSubstitution_avoidEndlessSubstitution() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("papa-3-application") + .buildpack("((endless_2))") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-3.yml").getFile().toPath(), + new ClassPathResource("fixtures/vars-papa-3.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readWithVariableSubstitution_dontAllowInjectionTest() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("papa-4-application") + .buildpack("((test))") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-4.yml").getFile().toPath(), + new ClassPathResource("fixtures/vars-papa-4.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readWithVariableSubstitution_addMultipleVariablesInOneField() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("papa-5-application") + .buildpack("one and two is a very nice buildpack name for three") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-5.yml").getFile().toPath(), + new ClassPathResource("fixtures/vars-papa-5.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void readWithVariableSubstitution_noSubstitutionAtAll() throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("papa-6-application") + .buildpack("buildpack_papa_6") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource("fixtures/manifest-papa-6.yml").getFile().toPath(), + new ClassPathResource("fixtures/vars-papa-6.yml").getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + @Test + void unixRead() throws IOException { + assumeTrue(SystemUtils.IS_OS_UNIX); + read("/alpha-path", "fixtures/manifest-alpha-unix.yml"); + } + + @Test + void unixWrite() throws IOException { + assumeTrue(SystemUtils.IS_OS_UNIX); + write("/alpha-path", "fixtures/manifest-echo-unix.yml"); + } + + @Test + void windowsRead() throws IOException { + assumeTrue(SystemUtils.IS_OS_WINDOWS); + read("c:\\alpha-path", "fixtures/manifest-alpha-windows.yml"); + } + + @Test + void windowsWrite() throws IOException { + assumeTrue(SystemUtils.IS_OS_WINDOWS); + write("c:\\alpha-path", "fixtures/manifest-echo-windows.yml"); + } + + private void read(String path, String expectedManifest) throws IOException { + List expected = + Collections.singletonList( + ApplicationManifest.builder() + .name("alpha-application-1") + .buildpack("alpha-buildpack") + .command("alpha-command") + .disk(-1) + .healthCheckHttpEndpoint("alpha-health-check-http-endpoint") + .healthCheckType(NONE) + .instances(-1) + .memory(1) + .noRoute(true) + .path(Paths.get(path)) + .randomRoute(true) + .route(Route.builder().route("alpha-route-1").build()) + .route(Route.builder().route("alpha-route-2").build()) + .stack("alpha-stack") + .timeout(-1) + .environmentVariable("ALPHA_KEY_1", "alpha-value-1") + .environmentVariable("ALPHA_KEY_2", "alpha-value-2") + .service("alpha-instance-1") + .service("alpha-instance-2") + .build()); + + List actual = + ApplicationManifestUtils.read( + new ClassPathResource(expectedManifest).getFile().toPath()); + + assertThat(actual).isEqualTo(expected); + } + + private void write(String path, String expectedManifest) throws IOException { + Path out = Files.createTempFile("test-manifest-", ".yml"); + + ApplicationManifestUtils.write( + out, + Arrays.asList( + ApplicationManifest.builder() + .name("alpha-application-1") + .buildpack("alpha-buildpack") + .command("alpha-command") + .disk(512) + .healthCheckHttpEndpoint("alpha-health-check-http-endpoint") + .instances(-1) + .memory(512) + .noRoute(true) + .path(Paths.get(path)) + .randomRoute(true) + .route(Route.builder().route("alpha-route-1").build()) + .route(Route.builder().route("alpha-route-2").build()) + .stack("alpha-stack") + .timeout(-1) + .environmentVariable("ALPHA_KEY_1", "alpha-value-1") + .environmentVariable("ALPHA_KEY_2", "alpha-value-2") + .service("alpha-instance-1") + .service("alpha-instance-2") + .build(), + ApplicationManifest.builder() + .name("alpha-application-2") + .buildpack("alpha-buildpack") + .command("alpha-command") + .domain("alpha-domain") + .domain("alpha-domains-1") + .domain("alpha-domains-2") + .healthCheckHttpEndpoint("alpha-health-check-http-endpoint") + .healthCheckType(PORT) + .host("alpha-host") + .host("alpha-hosts-1") + .host("alpha-hosts-2") + .instances(-1) + .noHostname(true) + .noRoute(true) + .path(Paths.get(path)) + .randomRoute(true) + .stack("alpha-stack") + .timeout(-1) + .environmentVariable("ALPHA_KEY_1", "alpha-value-1") + .environmentVariable("ALPHA_KEY_2", "alpha-value-2") + .service("alpha-instance-1") + .service("alpha-instance-2") + .build())); + + List expected = + Files.readAllLines(new ClassPathResource(expectedManifest).getFile().toPath()); + List actual = Files.readAllLines(out); + + assertThat(actual).isEqualTo(expected); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3Test.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3Test.java new file mode 100644 index 00000000000..cf54b8120ba --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationManifestUtilsV3Test.java @@ -0,0 +1,127 @@ +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.*; + +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Path; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.processes.ReadinessHealthCheckType; +import org.junit.jupiter.api.Test; + +class ApplicationManifestUtilsV3Test { + @Test + void testGenericApplication() throws IOException { + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .name("test-app") + .buildpack("test-buildpack") + .command("test-command") + .disk(512) + .healthCheckHttpEndpoint("test-health-check-http-endpoint") + .instances(2) + .memory(512) + .randomRoute(true) + .stack("test-stack") + .timeout(120) + .environmentVariable("TEST_KEY_1", "test-value-1") + .processe( + ManifestV3Process.builder() + .type("web") + .command("test-command-1") + .readinessHealthCheckType( + ReadinessHealthCheckType.HTTP) + .readinessHealthCheckHttpEndpoint( + "test-readiness-health-check-http-endpoint") + .readinessHealthCheckInvocationTimeout(120) + .build()) + .service( + ManifestV3Service.builder() + .name("test-service-1") + .build()) + .build()) + .build(); + + assertSerializeDeserialize(manifest); + } + + @Test + void testWithDockerApp() throws IOException { + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .name("test-app") + .docker(Docker.builder().image("test-image").build()) + .build()) + .build(); + + assertSerializeDeserialize(manifest); + } + + @Test + void testWithMetadata() throws IOException { + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .name("test-app") + .metadata( + Metadata.builder() + .label("test-label", "test-label-value") + .annotation( + "test-annotation", + "test-annotation-value") + .build()) + .build()) + .build(); + + assertSerializeDeserialize(manifest); + } + + @Test + void testWithMetadataOnlyLabel() throws IOException { + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .name("test-app") + .metadata( + Metadata.builder() + .label("test-label", "test-label-value") + .build()) + .build()) + .build(); + + assertSerializeDeserialize(manifest); + } + + @Test + void testWithMetadataOnlyAnnotation() throws IOException { + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .name("test-app") + .metadata( + Metadata.builder() + .annotation( + "test-annotation", + "test-annotation-value") + .build()) + .build()) + .build(); + + assertSerializeDeserialize(manifest); + } + + private void assertSerializeDeserialize(ManifestV3 manifest) throws IOException { + Path file = Files.createTempFile("test-manifest-", ".yml"); + ApplicationManifestUtilsV3.write(file, manifest); + ManifestV3 read = ApplicationManifestUtilsV3.read(file); + + assertEquals(manifest, read); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationSshEnabledRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationSshEnabledRequestTest.java new file mode 100644 index 00000000000..077255e1380 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ApplicationSshEnabledRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ApplicationSshEnabledRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + ApplicationSshEnabledRequest.builder().build(); + }); + } + + @Test + void valid() { + ApplicationSshEnabledRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/CopySourceApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/CopySourceApplicationRequestTest.java new file mode 100644 index 00000000000..08186c384ac --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/CopySourceApplicationRequestTest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CopySourceApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CopySourceApplicationRequest.builder().targetName("test-target-name").build(); + }); + } + + @Test + void noTargetName() { + assertThrows( + IllegalStateException.class, + () -> { + CopySourceApplicationRequest.builder().name("test-name").build(); + }); + } + + @Test + void organizationNoSpace() { + assertThrows( + IllegalStateException.class, + () -> { + CopySourceApplicationRequest.builder() + .name("test-name") + .targetName("test-target-name") + .targetOrganization("test-target-organization") + .build(); + }); + } + + @Test + void valid() { + CopySourceApplicationRequest.builder() + .name("test-name") + .targetName("test-target-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java new file mode 100644 index 00000000000..cdc9619d2db --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DefaultApplicationsTest.java @@ -0,0 +1,5955 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.v3.LifecycleType.BUILDPACK; +import static org.cloudfoundry.client.v3.LifecycleType.DOCKER; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.RETURNS_SMART_NULLS; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.LinkedList; +import java.util.Map; +import java.util.Optional; +import java.util.Queue; +import java.util.function.Supplier; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.OrderDirection; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationInstanceInfo; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesResponse; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsRequest; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsResponse; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.CopyApplicationRequest; +import org.cloudfoundry.client.v2.applications.CopyApplicationResponse; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.applications.DockerCredentials; +import org.cloudfoundry.client.v2.applications.GetApplicationResponse; +import org.cloudfoundry.client.v2.applications.InstanceStatistics; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsResponse; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationServiceBindingRequest; +import org.cloudfoundry.client.v2.applications.RestageApplicationResponse; +import org.cloudfoundry.client.v2.applications.Statistics; +import org.cloudfoundry.client.v2.applications.SummaryApplicationRequest; +import org.cloudfoundry.client.v2.applications.SummaryApplicationResponse; +import org.cloudfoundry.client.v2.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationResponse; +import org.cloudfoundry.client.v2.applications.Usage; +import org.cloudfoundry.client.v2.events.EventEntity; +import org.cloudfoundry.client.v2.events.EventResource; +import org.cloudfoundry.client.v2.events.ListEventsRequest; +import org.cloudfoundry.client.v2.events.ListEventsResponse; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainEntity; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesRequest; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v2.resourcematch.Resource; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.DeleteRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.ListRoutesResponse; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstance; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainEntity; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsResponse; +import org.cloudfoundry.client.v2.spaces.SpaceApplicationSummary; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.stacks.GetStackRequest; +import org.cloudfoundry.client.v2.stacks.GetStackResponse; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.stacks.ListStacksResponse; +import org.cloudfoundry.client.v2.stacks.StackEntity; +import org.cloudfoundry.client.v3.BuildpackData; +import org.cloudfoundry.client.v3.DockerData; +import org.cloudfoundry.client.v3.Lifecycle; +import org.cloudfoundry.client.v3.applications.ApplicationState; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationsResponse; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureResponse; +import org.cloudfoundry.client.v3.tasks.CancelTaskRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskResponse; +import org.cloudfoundry.client.v3.tasks.CreateTaskRequest; +import org.cloudfoundry.client.v3.tasks.CreateTaskResponse; +import org.cloudfoundry.client.v3.tasks.TaskResource; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.doppler.Envelope; +import org.cloudfoundry.doppler.EventType; +import org.cloudfoundry.doppler.LogMessage; +import org.cloudfoundry.doppler.RecentLogsRequest; +import org.cloudfoundry.doppler.StreamRequest; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.cloudfoundry.util.DateUtils; +import org.cloudfoundry.util.FluentMap; +import org.cloudfoundry.util.ResourceMatchingUtils; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DefaultApplicationsTest extends AbstractOperationsTest { + + private RandomWords randomWords = mock(RandomWords.class, RETURNS_SMART_NULLS); + + private final DefaultApplications applications = + new DefaultApplications( + Mono.just(this.cloudFoundryClient), + Mono.just(this.dopplerClient), + this.randomWords, + Mono.just(TEST_SPACE_ID)); + + @Test + void copySourceNoRestartOrgSpace() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestOrganizations(this.cloudFoundryClient, "test-target-organization"); + requestOrganizationSpacesByName( + this.cloudFoundryClient, + "test-organization-resource-metadata-id", + "test-target-space"); + requestApplications( + this.cloudFoundryClient, + "test-target-application-name", + "test-space-resource-metadata-id", + "test-metadata-id"); + requestCopyBits(this.cloudFoundryClient, "test-metadata-id", "test-metadata-id"); + requestJobSuccess(this.cloudFoundryClient, "test-copy-bits-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.copySource( + CopySourceApplicationRequest.builder() + .name("test-application-name") + .targetName("test-target-application-name") + .targetSpace("test-target-space") + .targetOrganization("test-target-organization") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void copySourceNoRestartSpace() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestOrganizationSpacesByName( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-target-space"); + requestApplications( + this.cloudFoundryClient, + "test-target-application-name", + "test-space-resource-metadata-id", + "test-metadata-id"); + requestCopyBits(this.cloudFoundryClient, "test-metadata-id", "test-metadata-id"); + requestJobSuccess(this.cloudFoundryClient, "test-copy-bits-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.copySource( + CopySourceApplicationRequest.builder() + .name("test-application-name") + .targetName("test-target-application-name") + .targetSpace("test-target-space") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void copySourceOrganizationNotFound() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestOrganizationsNotFound(this.cloudFoundryClient, "test-target-organization"); + + this.applications + .copySource( + CopySourceApplicationRequest.builder() + .name("test-application-name") + .targetName("test-target-application-name") + .targetOrganization("test-target-organization") + .targetSpace("test-target-space") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Organization test-target-organization not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void copySourceRestart() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplications( + this.cloudFoundryClient, + "test-target-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestCopyBits(this.cloudFoundryClient, "test-metadata-id", "test-metadata-id"); + requestJobSuccess(this.cloudFoundryClient, "test-copy-bits-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-metadata-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-metadata-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-metadata-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-metadata-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.copySource( + CopySourceApplicationRequest.builder() + .name("test-application-name") + .targetName("test-target-application-name") + .restart(true) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void copySourceSpaceNotFound() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + "test-space-id", + "test-metadata-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestOrganizationSpacesByNameNotFound( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-target-space"); + + this.applications + .copySource( + CopySourceApplicationRequest.builder() + .name("test-application-name") + .targetName("test-target-application-name") + .targetSpace("test-target-space") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-target-space not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAndDeleteRoutes() { + requestApplications( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-metadata-id"); + requestApplicationSummary(this.cloudFoundryClient, "test-metadata-id"); + requestDeleteRoute(this.cloudFoundryClient, "test-route-id"); + requestApplicationServiceBindingsEmpty(this.cloudFoundryClient, "test-metadata-id"); + requestDeleteApplication(this.cloudFoundryClient, "test-metadata-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.delete( + DeleteApplicationRequest.builder() + .deleteRoutes(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAndDeleteRoutesFailure() { + requestApplications( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-metadata-id"); + requestApplicationSummary(this.cloudFoundryClient, "test-metadata-id"); + requestDeleteRoute(this.cloudFoundryClient, "test-route-id"); + requestDeleteApplication(this.cloudFoundryClient, "test-metadata-id"); + requestJobFailure(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.delete( + DeleteApplicationRequest.builder() + .deleteRoutes(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-error-details-errorCode(1):" + + " test-error-details-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteAndDoNotDeleteRoutes() { + requestApplications( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-metadata-id"); + requestApplicationSummary(this.cloudFoundryClient, "test-metadata-id"); + requestApplicationServiceBindingsEmpty(this.cloudFoundryClient, "test-metadata-id"); + requestDeleteApplication(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .delete(DeleteApplicationRequest.builder().name("test-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteWithBoundRoutes() { + requestApplications( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-metadata-id"); + requestApplicationSummary(this.cloudFoundryClient, "test-metadata-id"); + requestDeleteRoute(this.cloudFoundryClient, "test-route-id"); + requestApplicationServiceBindings(this.cloudFoundryClient, "test-metadata-id"); + requestRemoveServiceBinding( + this.cloudFoundryClient, "test-metadata-id", "test-service-binding-id"); + requestDeleteApplication(this.cloudFoundryClient, "test-metadata-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.delete( + DeleteApplicationRequest.builder() + .deleteRoutes(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableSsh() { + requestApplicationsV3( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-application-id"); + requestGetSshEnabled(this.cloudFoundryClient, "test-application-id", true); + requestUpdateApplicationSshV3(this.cloudFoundryClient, "test-application-id", false); + + this.applications + .disableSsh(DisableApplicationSshRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableSshAlreadyDisabled() { + requestApplicationsV3( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-application-id"); + requestGetSshEnabled(this.cloudFoundryClient, "test-application-id", false); + + this.applications + .disableSsh(DisableApplicationSshRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableSshNoApp() { + requestApplicationsEmptyV3(this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID); + + this.applications + .disableSsh(DisableApplicationSshRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableSsh() { + requestApplicationsV3( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-application-id"); + requestGetSshEnabled(this.cloudFoundryClient, "test-application-id", false); + requestUpdateApplicationSshV3(this.cloudFoundryClient, "test-application-id", true); + + this.applications + .enableSsh(EnableApplicationSshRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableSshAlreadyEnabled() { + requestApplicationsV3( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-application-id"); + requestGetSshEnabled(this.cloudFoundryClient, "test-application-id", true); + + this.applications + .enableSsh(EnableApplicationSshRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableSshNoApp() { + requestApplicationsEmptyV3(this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID); + + this.applications + .enableSsh(EnableApplicationSshRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .instanceDetail( + fill(InstanceDetail.builder()) + .index("instance-0") + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getApplicationManifest() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-summary-stackId"); + requestGetApplicationV3BuildpackMultiple(this.cloudFoundryClient, "test-application-id"); + + this.applications + .getApplicationManifest( + GetApplicationManifestRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationManifest.builder() + .buildpacks("test-buildpack-1", "test-buildpack-2") + .command("test-application-summary-command") + .disk(1) + .environmentVariables(Collections.emptyMap()) + .healthCheckHttpEndpoint( + "test-application-summary-healthCheckHttpEndpoint") + .healthCheckType(ApplicationHealthCheck.PORT) + .instances(1) + .memory(1) + .name("test-application-summary-name") + .route( + Route.builder() + .route("test-route-host.test-domain-name/test-path") + .build()) + .service("test-service-instance-name") + .stack("test-stack-entity-name") + .timeout(1) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getApplicationManifestDocker() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationSummaryDocker(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-summary-stackId"); + requestGetApplicationV3Docker(this.cloudFoundryClient, "test-application-id"); + + this.applications + .getApplicationManifest( + GetApplicationManifestRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationManifest.builder() + .command("test-application-summary-command") + .disk(1) + .docker( + Docker.builder() + .image("cloudfoundry/test-app") + .username("admin") + .password("Abcd5") + .build()) + .environmentVariables(Collections.emptyMap()) + .healthCheckHttpEndpoint( + "test-application-summary-healthCheckHttpEndpoint") + .healthCheckType(ApplicationHealthCheck.PORT) + .instances(1) + .memory(1) + .name("test-application-summary-name") + .route( + Route.builder() + .route("test-route-host.test-domain-name/test-path") + .build()) + .service("test-service-instance-name") + .stack("test-stack-entity-name") + .timeout(1) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getApplicationManifestNoRoutes() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationSummaryNoRoutes(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-summary-stackId"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .getApplicationManifest( + GetApplicationManifestRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationManifest.builder() + .buildpack("test-buildpack") + .command("test-application-summary-command") + .disk(1) + .environmentVariables(Collections.emptyMap()) + .healthCheckHttpEndpoint( + "test-application-summary-healthCheckHttpEndpoint") + .healthCheckType(ApplicationHealthCheck.PORT) + .instances(1) + .memory(1) + .name("test-application-summary-name") + .noRoute(true) + .stack("test-stack-entity-name") + .timeout(1) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getApplicationManifestTcp() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationSummaryTcp(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-summary-stackId"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .getApplicationManifest( + GetApplicationManifestRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationManifest.builder() + .buildpack("test-buildpack") + .command("test-application-summary-command") + .disk(1) + .environmentVariables(Collections.emptyMap()) + .healthCheckHttpEndpoint( + "test-application-summary-healthCheckHttpEndpoint") + .healthCheckType(ApplicationHealthCheck.PORT) + .instances(1) + .memory(1) + .name("test-application-summary-name") + .route( + Route.builder() + .route("test-route-host.test-domain-name:999") + .build()) + .service("test-service-instance-name") + .stack("test-stack-entity-name") + .timeout(1) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getBuildpackError() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesError(this.cloudFoundryClient, "test-application-id", 170004); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getDetectedBuildpack() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummaryDetectedBuildpack(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Docker(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-application-summary-detectedBuildpack") + .id("test-application-summary-id") + .instanceDetail( + fill(InstanceDetail.builder()) + .index("instance-0") + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name:1") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEnvironments() { + requestApplicationsV3( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestApplicationEnvironment(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .getEnvironments( + GetApplicationEnvironmentsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationEnvironments.builder() + .running( + FluentMap.builder() + .entry("running-env-name", "running-env-value") + .build()) + .staging( + FluentMap.builder() + .entry("staging-env-name", "staging-env-value") + .build()) + .systemProvided( + FluentMap.builder() + .entry("system-env-name", "system-env-value") + .build()) + .userProvided( + FluentMap.builder() + .entry("env-name", "env-value") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEnvironmentsNoApp() { + requestApplicationsEmptyV3(this.cloudFoundryClient, "test-app", TEST_SPACE_ID); + + this.applications + .getEnvironments( + GetApplicationEnvironmentsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEvents() { + requestApplications(this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestEvents( + this.cloudFoundryClient, + "test-metadata-id", + fill(EventEntity.builder(), "event-") + .timestamp("2016-02-08T15:45:59Z") + .metadata( + "request", + Optional.of( + FluentMap.builder() + .entry("instances", 1) + .entry("memory", 2) + .entry("environment_json", "test-data") + .entry("state", "test-state") + .build())) + .build()); + + this.applications + .getEvents(GetApplicationEventsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationEvent.builder() + .actor("test-event-actorName") + .description( + "instances: 1, memory: 2, state: test-state," + + " environment_json: test-data") + .event("test-event-type") + .id("test-event-id") + .time(DateUtils.parseFromIso8601("2016-02-08T15:45:59Z")) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEventsBadTimeSparseMetadata() { + requestApplications(this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestEvents( + this.cloudFoundryClient, + "test-metadata-id", + fill(EventEntity.builder(), "event-") + .timestamp("BAD-TIMESTAMP") + .metadata( + "request", + Optional.of( + FluentMap.builder() + .entry("memory", 2) + .entry("environment_json", "test-data") + .entry("state", "test-state") + .build())) + .build()); + + this.applications + .getEvents(GetApplicationEventsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationEvent.builder() + .actor("test-event-actorName") + .description( + "memory: 2, state: test-state, environment_json: test-data") + .event("test-event-type") + .id("test-event-id") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEventsFoundZero() { + requestApplications(this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestEvents(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .getEvents(GetApplicationEventsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEventsLimitZero() { + requestApplications(this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestEvents( + this.cloudFoundryClient, + "test-metadata-id", + fill(EventEntity.builder(), "event-") + .timestamp("2016-02-08T15:45:59Z") + .metadata( + "request", + Optional.of( + FluentMap.builder() + .entry("instances", 1) + .entry("memory", 2) + .entry("environment_json", "test-data") + .entry("state", "test-state") + .build())) + .build()); + + this.applications + .getEvents( + GetApplicationEventsRequest.builder() + .name("test-app") + .maxNumberOfEvents(0) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEventsNoRequestMetadata() { + requestApplications(this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestEvents( + this.cloudFoundryClient, + "test-metadata-id", + fill(EventEntity.builder(), "event-") + .timestamp("2016-02-08T15:45:59Z") + .metadata("index", Optional.of(1)) + .build()); + + this.applications + .getEvents(GetApplicationEventsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationEvent.builder() + .actor("test-event-actorName") + .description("") + .event("test-event-type") + .time(DateUtils.parseFromIso8601("2016-02-08T15:45:59Z")) + .id("test-event-id") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getEventsTwo() { + requestApplications(this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-metadata-id"); + requestEvents( + this.cloudFoundryClient, + "test-metadata-id", + fill(EventEntity.builder(), "event-") + .timestamp("2016-02-08T15:45:59Z") + .metadata( + "request", + Optional.of( + FluentMap.builder() + .entry("instances", 1) + .entry("memory", 2) + .entry("environment_json", "test-data") + .entry("state", "test-state") + .build())) + .build(), + fill(EventEntity.builder(), "event-") + .timestamp("2016-02-08T15:49:07Z") + .metadata( + "request", + Optional.of( + FluentMap.builder() + .entry("state", "test-state-two") + .build())) + .build()); + + this.applications + .getEvents(GetApplicationEventsRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + ApplicationEvent.builder() + .actor("test-event-actorName") + .description( + "instances: 1, memory: 2, state: test-state," + + " environment_json: test-data") + .event("test-event-type") + .id("test-event-id") + .time(DateUtils.parseFromIso8601("2016-02-08T15:45:59Z")) + .build(), + ApplicationEvent.builder() + .actor("test-event-actorName") + .description("state: test-state-two") + .event("test-event-type") + .id("test-event-id") + .time(DateUtils.parseFromIso8601("2016-02-08T15:49:07Z")) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getHealthCheck() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + + this.applications + .getHealthCheck( + GetApplicationHealthCheckRequest.builder() + .name("test-application-name") + .build()) + .as(StepVerifier::create) + .expectNext(ApplicationHealthCheck.PORT) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getInstancesError() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesError(this.cloudFoundryClient, "test-application-id", 220001); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getNoBuildpack() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummaryNoBuildpack(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Docker(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack(null) + .id("test-application-summary-id") + .instanceDetail( + fill(InstanceDetail.builder()) + .index("instance-0") + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name:1") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getStagingError() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesError(this.cloudFoundryClient, "test-application-id", 170002); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getStoppedError() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatisticsError(this.cloudFoundryClient, "test-application-id", 200003); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .instanceDetail( + InstanceDetail.builder() + .index("instance-0") + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getWithEmptyInstance() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationEmptyInstance(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .instanceDetail( + fill(InstanceDetail.builder()) + .index("instance-0") + .since(null) + .state(null) + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getWithEmptyInstanceStats() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationEmptyStats(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .instanceDetail( + InstanceDetail.builder() + .index("instance-0") + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getWithNoInstances() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationStatistics(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationNoInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getWithNullStats() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationNullStats(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .instanceDetail( + InstanceDetail.builder() + .index("instance-0") + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getWithNullUsage() { + requestApplications( + this.cloudFoundryClient, "test-app", TEST_SPACE_ID, "test-application-id"); + requestApplicationNullUsage(this.cloudFoundryClient, "test-application-id"); + requestStack(this.cloudFoundryClient, "test-application-stackId"); + requestApplicationSummary(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstances(this.cloudFoundryClient, "test-application-id"); + requestGetApplicationV3Buildpack(this.cloudFoundryClient, "test-application-id"); + + this.applications + .get(GetApplicationRequest.builder().name("test-app").build()) + .as(StepVerifier::create) + .expectNext( + fill(ApplicationDetail.builder()) + .buildpack("test-buildpack") + .id("test-application-summary-id") + .instanceDetail( + InstanceDetail.builder() + .index("instance-0") + .diskQuota(1L) + .memoryQuota(1L) + .since(new Date(1000)) + .state("test-application-instance-info-state") + .build()) + .lastUploaded(new Date(0)) + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .stack("test-stack-entity-name") + .url("test-route-host.test-domain-name/test-path") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + requestSpaceSummary(this.cloudFoundryClient, TEST_SPACE_ID); + + this.applications + .list() + .as(StepVerifier::create) + .expectNext( + fill(ApplicationSummary.builder()) + .id("test-application-summary-id") + .name("test-application-summary-name") + .requestedState("test-application-summary-state") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listTasks() { + requestApplicationsV3( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-metadata-id"); + requestListTasks(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .listTasks(ListApplicationTasksRequest.builder().name("test-name").build()) + .as(StepVerifier::create) + .expectNext( + fill(Task.builder()) + .command("test-command") + .state(TaskState.CANCELING) + .name("test-name") + .sequenceId(1) + .startTime("test-createdAt") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void logs() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestLogsStream(this.dopplerClient, "test-metadata-id"); + + this.applications + .logs(LogsRequest.builder().name("test-application-name").recent(false).build()) + .as(StepVerifier::create) + .expectNext(fill(LogMessage.builder(), "log-message-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void logsNoApp() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + + this.applications + .logs(LogsRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void logsRecent() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestLogsRecent(this.dopplerClient, "test-metadata-id"); + + this.applications + .logs(LogsRequest.builder().name("test-application-name").recent(true).build()) + .as(StepVerifier::create) + .expectNext(fill(LogMessage.builder(), "log-message-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void logsRecentNotSet() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestLogsStream(this.dopplerClient, "test-metadata-id"); + + this.applications + .logs(LogsRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .expectNext(fill(LogMessage.builder(), "log-message-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushDocker() { + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateDockerApplication( + this.cloudFoundryClient, + PushApplicationRequest.builder() + .dockerImage("cloudfoundry/lattice-app") + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestPrivateDomainNotFound( + this.cloudFoundryClient, "test-shared-domain", TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomain(this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestGetSharedDomain(this.cloudFoundryClient, "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .dockerImage("cloudfoundry/lattice-app") + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushDockerPrivateRepository() { + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateDockerApplication( + this.cloudFoundryClient, + PushApplicationRequest.builder() + .dockerImage("cloudfoundry/lattice-app") + .dockerPassword("test-docker-password") + .dockerUsername("test-docker-username") + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestPrivateDomainNotFound( + this.cloudFoundryClient, "test-shared-domain", TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomain(this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestGetSharedDomain(this.cloudFoundryClient, "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .dockerImage("cloudfoundry/lattice-app") + .dockerPassword("test-docker-password") + .dockerUsername("test-docker-username") + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushDomainNotFound() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-application-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomainsEmpty(this.cloudFoundryClient); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + + this.applications + .push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-application-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain test-shared-domain not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushExistingApplication() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplications( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-application-id"); + requestCreateApplication( + cloudFoundryClient, + ApplicationManifest.builder().name("test-name").build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestUpdateApplication( + this.cloudFoundryClient, + "test-application-id", + ApplicationManifest.builder() + .path(testApplication) + .environmentVariable("test-var", "test-value") + .domain("test-shared-domain") + .name("test-name") + .build(), + null); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushExistingApplicationWithEnvironmentVariables() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplications( + this.cloudFoundryClient, + "test-name", + TEST_SPACE_ID, + "test-application-id", + Collections.singletonMap("test-key-1", "test-value-1")); + requestCreateApplication( + cloudFoundryClient, + ApplicationManifest.builder() + .name("test-name") + .environmentVariable("test-key-2", "test-value-2") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestUpdateApplication( + this.cloudFoundryClient, + "test-application-id", + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .environmentVariable("test-key-1", "test-value-1") + .environmentVariable("test-key-2", "test-value-2") + .name("test-name") + .build(), + null); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .environmentVariable( + "test-key-2", + "test-value-2") + .name("test-name") + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushExistingApplicationWithNullEnvironment() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplications( + this.cloudFoundryClient, "test-name", TEST_SPACE_ID, "test-application-id", null); + requestCreateApplication( + cloudFoundryClient, + ApplicationManifest.builder() + .name("test-name") + .environmentVariable("test-key-1", "test-value-1") + .environmentVariable("test-key-2", "test-value-2") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestUpdateApplication( + this.cloudFoundryClient, + "test-application-id", + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .environmentVariable("test-key-1", "test-value-1") + .environmentVariable("test-key-2", "test-value-2") + .name("test-name") + .build(), + null); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .environmentVariable( + "test-key-1", + "test-value-1") + .environmentVariable( + "test-key-2", + "test-value-2") + .name("test-name") + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushExistingRouteWithHost() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .host("test-host") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-host", + null, + null, + "test-space-id", + "test-route-id"); + requestRoutes( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-host", + null, + null, + "test-route-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .host("test-host") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushExistingRouteWithNoHost() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .noHostname(true) + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutes( + this.cloudFoundryClient, "test-shared-domain-id", "", null, null, "test-route-id"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "", + null, + null, + "test-space-id", + "test-route-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .noHostname(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushInvalidStack() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestStackIdEmpty(this.cloudFoundryClient, "invalid-stack"); + + this.applications + .push( + PushApplicationRequest.builder() + .path(testApplication) + .name("test-name") + .stack("invalid-stack") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Stack invalid-stack does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushMultipleRoutes() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestRoutesEmpty(this.cloudFoundryClient, "test-shared-domain-id", "test1", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test1", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestRoutesEmpty(this.cloudFoundryClient, "test-shared-domain-id", "test2", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test2", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .name("test-name") + .route( + Route.builder() + .route( + "test1.test-shared-domain") + .build()) + .route( + Route.builder() + .route( + "test2.test-shared-domain") + .build()) + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNewApplication() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .healthCheckHttpEndpoint("/health") + .healthCheckType(ApplicationHealthCheck.HTTP) + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .healthCheckHttpEndpoint("/health") + .healthCheckType(ApplicationHealthCheck.HTTP) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNewApplicationWithEnvironmentVariables() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplicationsEmpty(this.cloudFoundryClient, "test.name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .environmentVariable("test-key", "test-value") + .domain("test-shared-domain") + .name("test.name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "testname", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "testname", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .environmentVariable( + "test-key", "test-value") + .name("test.name") + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNewRouteWithHost() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .host("test-host") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-host", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-host", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .host("test-host") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNewRouteWithNoHost() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .noHostname(true) + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestRoutesEmpty(this.cloudFoundryClient, "test-shared-domain-id", "", null, null); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .noHostname(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoDomainNoneFound() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder().path(testApplication).name("test-name").build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomainsEmpty(this.cloudFoundryClient); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + + this.applications + .push( + PushApplicationRequest.builder() + .path(testApplication) + .name("test-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("No default domain found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoDomainPrivate() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder().path(testApplication).name("test-name").build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomains( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-private-domain-id"); + requestSharedDomainsEmpty(this.cloudFoundryClient); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + + this.applications + .push( + PushApplicationRequest.builder() + .path(testApplication) + .name("test-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("No default domain found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoDomainShared() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder().path(testApplication).name("test-name").build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoHostnameFlag() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + requestRoutesEmpty(this.cloudFoundryClient, "test-shared-domain-id", "", null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .name("test-name") + .noHostname(true) + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoInstances() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .name("test-name") + .instances(0) + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED", 0); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .name("test-name") + .instances(0) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoRoute() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .noRoute(true) + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .noRoute(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoRouteFlag() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRemoveApplicationRoute( + this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .name("test-name") + .noRoute(true) + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushNoStart() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder().path(testApplication).name("test-name").build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutesEmpty(this.cloudFoundryClient, "test-application-id"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .name("test-name") + .noStart(true) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushPrivateDomain() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-private-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomains( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-private-domain-id"); + requestSharedDomainsEmpty(this.cloudFoundryClient); + requestRoutesEmpty( + this.cloudFoundryClient, "test-private-domain-id", "test-name", null, null); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-private-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushRandomRoute() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-application.name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-application.name") + .randomRoute(true) + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + provideRandomWords(this.randomWords); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-applicationname-test-adjective-test-noun", + null, + null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-applicationname-test-adjective-test-noun", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-application.name") + .randomRoute(true) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushSharedDomain() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushStartFailsRunning() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesFailingTotal(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage("Application test-name failed during start")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushStartFailsStaging() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestPrivateDomains( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-private-domain-id"); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplicationFailing(this.cloudFoundryClient, "test-application-id"); + requestInstancesApplicationFailing(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage("Application test-name failed during staging")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushTcpRandomRoute() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestTcpDomains(this.cloudFoundryClient, "test-tcp-domain", "test-tcp-domain-id"); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-tcp-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty(this.cloudFoundryClient, "test-tcp-domain-id", null, null, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-tcp-domain-id", + true, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-tcp-domain") + .randomRoute(true) + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushTcpRoute() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestTcpDomains(this.cloudFoundryClient, "test-tcp-domain", "test-tcp-domain-id"); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-tcp-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestRoutesEmpty(this.cloudFoundryClient, "test-tcp-domain-id", null, 61001, null); + requestCreateRoute( + this.cloudFoundryClient, + "test-tcp-domain-id", + null, + 61001, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path(testApplication) + .route( + Route.builder() + .route( + "test-tcp-domain:61001") + .build()) + .name("test-name") + .build()) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void pushUploadFails() throws IOException { + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + requestApplicationsEmpty(this.cloudFoundryClient, "test-name", TEST_SPACE_ID); + requestCreateApplication( + this.cloudFoundryClient, + ApplicationManifest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build(), + TEST_SPACE_ID, + null, + "test-application-id"); + requestSpace(this.cloudFoundryClient, TEST_SPACE_ID, TEST_ORGANIZATION_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestApplicationRoutes(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestSharedDomains( + this.cloudFoundryClient, "test-shared-domain", "test-shared-domain-id"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-id", "test-name", null, null); + requestListMatchingResources( + this.cloudFoundryClient, + Arrays.asList( + new ResourceMatchingUtils.ArtifactMetadata( + "da39a3ee5e6b4b0d3255bfef95601890afd80709", "Staticfile", "644", 0), + new ResourceMatchingUtils.ArtifactMetadata( + "45044a6ddbfe11415a8f8a6219de68a2c66b496b", + "index.html", + "644", + 178))); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-id", + "test-name", + null, + null, + TEST_SPACE_ID, + "test-route-id"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + requestUpload( + this.cloudFoundryClient, "test-application-id", testApplication, "test-job-id"); + requestJobFailure(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.push( + PushApplicationRequest.builder() + .path(testApplication) + .domain("test-shared-domain") + .name("test-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-error-details-errorCode(1):" + + " test-error-details-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void rename() { + requestApplications( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-metadata-id"); + requestUpdateApplicationRename( + this.cloudFoundryClient, "test-metadata-id", "test-new-app-name"); + + this.applications + .rename( + RenameApplicationRequest.builder() + .name("test-app-name") + .newName("test-new-app-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void renameNoApp() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID); + + this.applications + .rename( + RenameApplicationRequest.builder() + .name("test-app-name") + .newName("test-new-app-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restage() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestRestageApplication(this.cloudFoundryClient, "test-metadata-id"); + requestGetApplication(this.cloudFoundryClient, "test-metadata-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-metadata-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restage( + RestageApplicationRequest.builder() + .name("test-application-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void restageInvalidApplication() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + + this.applications + .restage(RestageApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restageStagingFailure() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestRestageApplication(this.cloudFoundryClient, "test-metadata-id"); + requestGetApplicationFailing(this.cloudFoundryClient, "test-metadata-id"); + requestInstancesApplicationFailing(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .restage(RestageApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage( + "Application test-application-name failed during" + + " staging")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restageStartingFailurePartial() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestRestageApplication(this.cloudFoundryClient, "test-metadata-id"); + requestGetApplication(this.cloudFoundryClient, "test-metadata-id"); + requestApplicationInstancesFailingPartial(this.cloudFoundryClient, "test-metadata-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restage( + RestageApplicationRequest.builder() + .name("test-application-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void restageStartingFailureTotal() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestRestageApplication(this.cloudFoundryClient, "test-metadata-id"); + requestGetApplication(this.cloudFoundryClient, "test-metadata-id"); + requestApplicationInstancesFailingTotal(this.cloudFoundryClient, "test-metadata-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restage( + RestageApplicationRequest.builder() + .name("test-application-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage( + "Application test-application-name failed during" + + " start")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restageTimeout() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestRestageApplication(this.cloudFoundryClient, "test-metadata-id"); + requestGetApplicationTimeout(this.cloudFoundryClient, "test-metadata-id"); + requestInstancesApplicationFailing(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .restage( + RestageApplicationRequest.builder() + .name("test-application-name") + .stagingTimeout(Duration.ofSeconds(1)) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage( + "Application test-application-name timed out during" + + " staging")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartFailurePartial() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "STARTED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesFailingPartial(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restart( + RestartApplicationRequest.builder() + .name("test-app-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartFailureTotal() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "STARTED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesFailingTotal(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restart( + RestartApplicationRequest.builder() + .name("test-app-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage( + "Application test-app-name failed during start")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartInstance() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestTerminateApplicationInstance(this.cloudFoundryClient, "test-metadata-id", "0"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restartInstance( + RestartApplicationInstanceRequest.builder() + .name("test-application-name") + .instanceIndex(0) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartNoApp() { + requestApplicationsEmpty( + this.cloudFoundryClient, "test-non-existent-app-name", TEST_SPACE_ID); + + this.applications + .restart( + RestartApplicationRequest.builder() + .name("test-non-existent-app-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-non-existent-app-name does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartNotStartedAndNotStopped() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "unknown-state"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restart( + RestartApplicationRequest.builder() + .name("test-app-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartStarted() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "STARTED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restart( + RestartApplicationRequest.builder() + .name("test-app-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void restartStopped() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.restart( + RestartApplicationRequest.builder() + .name("test-app-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void runTask() { + requestApplicationsV3( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestRunTask(this.cloudFoundryClient, "test-metadata-id"); + + this.applications + .runTask( + RunApplicationTaskRequest.builder() + .applicationName("test-application-name") + .command("test-command") + .build()) + .as(StepVerifier::create) + .expectNext( + fill(Task.builder()) + .command("test-command") + .state(TaskState.CANCELING) + .name("test-name") + .sequenceId(1) + .startTime("test-createdAt") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void scaleDiskAndInstancesNotStarted() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "STOPPED"); + requestUpdateApplicationScale( + this.cloudFoundryClient, "test-application-id", 2048, 2, null); + + this.applications + .scale( + ScaleApplicationRequest.builder() + .name("test-app-name") + .instances(2) + .diskLimit(2048) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void scaleDiskAndInstancesStarted() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "STARTED"); + requestUpdateApplicationScale( + this.cloudFoundryClient, "test-application-id", 2048, 2, null); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + + this.applications + .scale( + ScaleApplicationRequest.builder() + .name("test-app-name") + .instances(2) + .diskLimit(2048) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void scaleInstances() { + requestApplications( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-metadata-id"); + requestUpdateApplicationScale(this.cloudFoundryClient, "test-metadata-id", null, 2, null); + + this.applications + .scale(ScaleApplicationRequest.builder().name("test-app-name").instances(2).build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void scaleInstancesNoApp() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID); + + this.applications + .scale(ScaleApplicationRequest.builder().name("test-app-name").instances(2).build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void scaleNoChange() { + requestApplications( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-metadata-id"); + + this.applications + .scale(ScaleApplicationRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setEnvironmentVariable() { + requestApplications( + this.cloudFoundryClient, + "test-app", + TEST_SPACE_ID, + "test-metadata-id", + FluentMap.builder() + .entry("test-var", "test-value") + .entry("test-var2", "test-value2") + .build()); + requestUpdateApplicationEnvironment( + this.cloudFoundryClient, + "test-metadata-id", + FluentMap.builder() + .entry("test-var", "test-value") + .entry("test-var2", "test-value2") + .entry("test-var-name", "test-var-value") + .build()); + + this.applications + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name("test-app") + .variableName("test-var-name") + .variableValue("test-var-value") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setEnvironmentVariableNoApp() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-app", TEST_SPACE_ID); + + this.applications + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name("test-app") + .variableName("test-var-name") + .variableValue("test-var-value") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void setHealthCheck() { + requestApplications( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-application-id"); + requestUpdateApplicationHealthCheck( + this.cloudFoundryClient, "test-application-id", ApplicationHealthCheck.PORT); + + this.applications + .setHealthCheck( + SetApplicationHealthCheckRequest.builder() + .name("test-application-name") + .type(ApplicationHealthCheck.PORT) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void sshEnabled() { + requestApplicationsV3( + this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID, "test-application-id"); + requestGetSshEnabled(this.cloudFoundryClient, "test-application-id", true); + + this.applications + .sshEnabled(ApplicationSshEnabledRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void sshEnabledNoApp() { + requestApplicationsEmptyV3(this.cloudFoundryClient, "test-app-name", TEST_SPACE_ID); + + this.applications + .sshEnabled(ApplicationSshEnabledRequest.builder().name("test-app-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void startApplicationFailurePartial() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesFailingPartial(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.start( + StartApplicationRequest.builder() + .name("test-application-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void startApplicationFailureTotal() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesFailingTotal(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.start( + StartApplicationRequest.builder() + .name("test-application-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage( + "Application test-application-name failed during" + + " start")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void startApplicationTimeout() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesTimeout(this.cloudFoundryClient, "test-application-id"); + + this.applications + .start( + StartApplicationRequest.builder() + .name("test-application-name") + .startupTimeout(Duration.ofSeconds(1)) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalStateException.class) + .hasMessage( + "Application test-application-name timed out during" + + " start")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void startInvalidApplication() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + + this.applications + .start(StartApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void startStartedApplication() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STARTED"); + + this.applications + .start(StartApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void startStoppedApplication() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STOPPED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STARTED"); + requestGetApplication(this.cloudFoundryClient, "test-application-id"); + requestApplicationInstancesRunning(this.cloudFoundryClient, "test-application-id"); + + StepVerifier.withVirtualTime( + () -> + this.applications.start( + StartApplicationRequest.builder() + .name("test-application-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void stopInvalidApplication() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + + this.applications + .stop(StopApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void stopStartedApplication() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STARTED"); + requestUpdateApplicationState(this.cloudFoundryClient, "test-application-id", "STOPPED"); + + this.applications + .stop(StopApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void stopStoppedApplication() { + requestApplicationsSpecificState( + this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID, "STOPPED"); + + this.applications + .stop(StopApplicationRequest.builder().name("test-application-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void terminateTask() { + requestApplicationsV3( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestListTasks(this.cloudFoundryClient, "test-metadata-id", 1); + requestCancelTask(this.cloudFoundryClient, "test-id"); + + this.applications + .terminateTask( + TerminateApplicationTaskRequest.builder() + .applicationName("test-application-name") + .sequenceId(1) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void terminateTaskNoTask() { + requestApplicationsV3( + this.cloudFoundryClient, + "test-application-name", + TEST_SPACE_ID, + "test-metadata-id"); + requestListTasksEmpty(this.cloudFoundryClient, "test-metadata-id", 1); + requestCancelTask(this.cloudFoundryClient, "test-id"); + + this.applications + .terminateTask( + TerminateApplicationTaskRequest.builder() + .applicationName("test-application-name") + .sequenceId(1) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Task with sequence id of 1 does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetEnvironmentVariable() { + requestApplications( + this.cloudFoundryClient, + "test-app", + TEST_SPACE_ID, + "test-metadata-id", + FluentMap.builder() + .entry("test-var", "test-value") + .entry("test-var2", "test-value2") + .entry("test-var-name", "test-var-value") + .build()); + requestUpdateApplicationEnvironment( + this.cloudFoundryClient, + "test-metadata-id", + FluentMap.builder() + .entry("test-var2", "test-value2") + .entry("test-var-name", "test-var-value") + .build()); + + this.applications + .unsetEnvironmentVariable( + UnsetEnvironmentVariableApplicationRequest.builder() + .name("test-app") + .variableName("test-var") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetEnvironmentVariableNoApp() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-app", TEST_SPACE_ID); + + this.applications + .unsetEnvironmentVariable( + UnsetEnvironmentVariableApplicationRequest.builder() + .name("test-app") + .variableName("test-var") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Application test-app does not exist")) + .verify(Duration.ofSeconds(5)); + } + + private static void provideRandomWords(RandomWords randomWords) { + when(randomWords.getAdjective()).thenReturn("test-adjective"); + when(randomWords.getNoun()).thenReturn("test-noun"); + } + + private static void requestApplicationEmptyInstance( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + ApplicationInstancesResponse.builder() + .instance( + "instance-0", + ApplicationInstanceInfo.builder().build()) + .build())); + } + + private static void requestApplicationEmptyStats( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn(Mono.just(ApplicationStatisticsResponse.builder().build())); + } + + private static void requestApplicationEnvironment( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV3() + .getEnvironment( + GetApplicationEnvironmentRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + GetApplicationEnvironmentResponse.builder() + .runningEnvironmentVariable( + "running-env-name", "running-env-value") + .applicationEnvironmentVariable( + "application-env-name", "application-env-value") + .stagingEnvironmentVariable( + "staging-env-name", "staging-env-value") + .environmentVariable("env-name", "env-value") + .systemEnvironmentVariable( + "system-env-name", "system-env-value") + .build())); + } + + private static void requestApplicationInstances( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + ApplicationInstancesResponse.builder() + .instance( + "instance-0", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .build()) + .build())); + } + + private static void requestApplicationInstancesError( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer code) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + null, + code, + "test-exception-description", + "test-exception-errorCode"))); + } + + private static void requestApplicationInstancesFailingPartial( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill( + ApplicationInstancesResponse.builder(), + "application-instances-") + .instance( + "instance-0", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .state("RUNNING") + .build()) + .instance( + "instance-1", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .state("FLAPPING") + .build()) + .build())); + } + + private static void requestApplicationInstancesFailingTotal( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill( + ApplicationInstancesResponse.builder(), + "application-instances-") + .instance( + "instance-0", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .state("FLAPPING") + .build()) + .build())); + } + + private static void requestApplicationInstancesRunning( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill( + ApplicationInstancesResponse.builder(), + "application-instances-") + .instance( + "instance-0", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .state("RUNNING") + .build()) + .build())); + } + + private static void requestApplicationInstancesTimeout( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill( + ApplicationInstancesResponse.builder(), + "application-instances-") + .instance( + "instance-0", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .state("STARTING") + .build()) + .build())); + } + + private static void requestApplicationNoInstances( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn(Mono.just(ApplicationInstancesResponse.builder().build())); + } + + private static void requestApplicationNullStats( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + ApplicationStatisticsResponse.builder() + .instance( + "instance-0", + fill( + InstanceStatistics.builder(), + "instance-statistics-") + .statistics(null) + .build()) + .build())); + } + + private static void requestApplicationNullUsage( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + ApplicationStatisticsResponse.builder() + .instance( + "instance-0", + fill( + InstanceStatistics.builder(), + "instance-statistics-") + .statistics( + fill( + Statistics + .builder(), + "statistics-") + .usage(null) + .build()) + .build()) + .build())); + } + + private static void requestApplicationRoutes( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + when(cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest.builder() + .applicationId(applicationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListApplicationRoutesResponse.builder()) + .resource( + fill(RouteResource.builder()) + .metadata( + fill(Metadata.builder()) + .id(routeId) + .build()) + .build()) + .totalPages(1) + .build())); + } + + private static void requestApplicationRoutesEmpty( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest.builder() + .applicationId(applicationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListApplicationRoutesResponse.builder()) + .totalPages(1) + .build())); + } + + private static void requestApplicationServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .applicationId(applicationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill( + ListApplicationServiceBindingsResponse.builder(), + "test-service-binding-") + .resource( + fill(ServiceBindingResource.builder()) + .metadata( + fill(Metadata.builder()) + .id( + "test-service-binding-id") + .build()) + .build()) + .totalPages(1) + .build())); + } + + private static void requestApplicationServiceBindingsEmpty( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .applicationId(applicationId) + .page(1) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestApplicationStatistics( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + ApplicationStatisticsResponse.builder() + .instance( + "instance-0", + fill( + InstanceStatistics.builder(), + "instance-statistics-") + .statistics( + fill( + Statistics + .builder(), + "statistics-") + .usage( + fill( + Usage + .builder(), + "usage-") + .build()) + .build()) + .build()) + .build())); + } + + private static void requestApplicationStatisticsError( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer code) { + when(cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + null, + code, + "test-exception-description", + "test-exception-errorCode"))); + } + + private static void requestApplicationSummary( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(SummaryApplicationResponse.builder(), "application-summary-") + .buildpack("test-buildpack") + .healthCheckType("port") + .packageUpdatedAt(DateUtils.formatToIso8601(new Date(0))) + .route( + fill( + org.cloudfoundry.client.v2.routes + .Route.builder(), + "route-") + .domain( + fill( + org.cloudfoundry + .client.v2 + .domains + .Domain + .builder(), + "domain-") + .build()) + .path("/test-path") + .port(null) + .build()) + .dockerImage(null) + .dockerCredentials(null) + .service( + ServiceInstance.builder() + .name("test-service-instance-name") + .build()) + .build())); + } + + private static void requestApplicationSummaryDetectedBuildpack( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(SummaryApplicationResponse.builder(), "application-summary-") + .route( + fill( + org.cloudfoundry.client.v2.routes + .Route.builder(), + "route-") + .domain( + fill( + org.cloudfoundry + .client.v2 + .domains + .Domain + .builder(), + "domain-") + .build()) + .build()) + .buildpack(null) + .packageUpdatedAt(DateUtils.formatToIso8601(new Date(0))) + .build())); + } + + private static void requestApplicationSummaryDocker( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(SummaryApplicationResponse.builder(), "application-summary-") + .buildpack(null) + .healthCheckType("port") + .packageUpdatedAt(DateUtils.formatToIso8601(new Date(0))) + .route( + fill( + org.cloudfoundry.client.v2.routes + .Route.builder(), + "route-") + .domain( + fill( + org.cloudfoundry + .client.v2 + .domains + .Domain + .builder(), + "domain-") + .build()) + .path("/test-path") + .port(null) + .build()) + .dockerImage("cloudfoundry/test-app") + .dockerCredentials( + DockerCredentials.builder() + .username("admin") + .password("Abcd5") + .build()) + .service( + ServiceInstance.builder() + .name("test-service-instance-name") + .build()) + .build())); + } + + private static void requestApplicationSummaryNoBuildpack( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(SummaryApplicationResponse.builder(), "application-summary-") + .route( + fill( + org.cloudfoundry.client.v2.routes + .Route.builder(), + "route-") + .domain( + fill( + org.cloudfoundry + .client.v2 + .domains + .Domain + .builder(), + "domain-") + .build()) + .build()) + .buildpack(null) + .detectedBuildpack(null) + .packageUpdatedAt(DateUtils.formatToIso8601(new Date(0))) + .build())); + } + + private static void requestApplicationSummaryNoRoutes( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(SummaryApplicationResponse.builder(), "application-summary-") + .buildpack("test-buildpack") + .healthCheckType("port") + .dockerImage(null) + .dockerCredentials(null) + .packageUpdatedAt(DateUtils.formatToIso8601(new Date(0))) + .build())); + } + + private static void requestApplicationSummaryTcp( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(SummaryApplicationResponse.builder(), "application-summary-") + .buildpack("test-buildpack") + .healthCheckType("port") + .packageUpdatedAt(DateUtils.formatToIso8601(new Date(0))) + .route( + fill( + org.cloudfoundry.client.v2.routes + .Route.builder(), + "route-") + .domain( + fill( + org.cloudfoundry + .client.v2 + .domains + .Domain + .builder(), + "domain-") + .build()) + .port(999) + .build()) + .dockerImage(null) + .dockerCredentials(null) + .service( + ServiceInstance.builder() + .name("test-service-instance-name") + .build()) + .build())); + } + + private static void requestApplications( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + String applicationId) { + requestApplications( + cloudFoundryClient, + application, + spaceId, + applicationId, + Collections.singletonMap("test-var", "test-value")); + } + + private static void requestApplications( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + String applicationId, + Map envResponse) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceApplicationsResponse.builder()) + .resource( + ApplicationResource.builder() + .metadata( + fill(Metadata.builder()) + .id(applicationId) + .build()) + .entity( + fill( + ApplicationEntity + .builder(), + "application-") + .environmentJsons( + envResponse) + .healthCheckType( + ApplicationHealthCheck + .PORT + .getValue()) + .build()) + .build()) + .totalPages(1) + .build())); + } + + private static void requestApplicationsEmpty( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.just(fill(ListSpaceApplicationsResponse.builder()).build())); + } + + private static void requestApplicationsEmptyV3( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + when(cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest.builder() + .name(application) + .spaceId(spaceId) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListApplicationsResponse.builder()).build())); + } + + private static void requestApplicationsSpecificState( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + String stateReturned) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceApplicationsResponse.builder()) + .resource( + fill(ApplicationResource.builder(), "application-") + .entity( + fill( + ApplicationEntity + .builder(), + "application-entity-") + .state(stateReturned) + .build()) + .build()) + .build())); + } + + private static void requestApplicationsV3( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + String applicationId) { + when(cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest.builder() + .name(application) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListApplicationsResponse.builder()) + .resource( + org.cloudfoundry.client.v3.applications + .ApplicationResource.builder() + .createdAt("test-created-at") + .id(applicationId) + .lifecycle( + Lifecycle.builder() + .data( + BuildpackData + .builder() + .buildpack( + "test-buildpack") + .build()) + .type(BUILDPACK) + .build()) + .name("test-name") + .state(ApplicationState.STOPPED) + .updatedAt("test-updated-at") + .build()) + .build())); + } + + private static void requestApplicationsWithSsh( + CloudFoundryClient cloudFoundryClient, + String application, + String spaceId, + Boolean sshEnabled) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .spaceId(spaceId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceApplicationsResponse.builder()) + .resource( + ApplicationResource.builder() + .metadata( + fill(Metadata.builder()) + .id("test-application-id") + .build()) + .entity( + fill( + ApplicationEntity + .builder(), + "application-") + .environmentJson( + "test-var", + "test-value") + .enableSsh(sshEnabled) + .build()) + .build()) + .totalPages(1) + .build())); + } + + private static void requestAssociateRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + when(cloudFoundryClient + .applicationsV2() + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestCancelTask(CloudFoundryClient cloudFoundryClient, String taskId) { + when(cloudFoundryClient.tasks().cancel(CancelTaskRequest.builder().taskId(taskId).build())) + .thenReturn(Mono.just(fill(CancelTaskResponse.builder()).build())); + } + + private static void requestCopyBits( + CloudFoundryClient cloudFoundryClient, + String sourceApplicationId, + String targetApplicationId) { + when(cloudFoundryClient + .applicationsV2() + .copy( + CopyApplicationRequest.builder() + .applicationId(targetApplicationId) + .sourceApplicationId(sourceApplicationId) + .build())) + .thenReturn( + Mono.just(fill(CopyApplicationResponse.builder(), "copy-bits-").build())); + } + + private static void requestCreateApplication( + CloudFoundryClient cloudFoundryClient, + ApplicationManifest manifest, + String spaceId, + String stackId, + String applicationId) { + CreateApplicationRequest.Builder builder = + CreateApplicationRequest.builder() + .command(manifest.getCommand()) + .diskQuota(manifest.getDisk()) + .environmentJsons(manifest.getEnvironmentVariables()) + .healthCheckTimeout(manifest.getTimeout()) + .healthCheckHttpEndpoint(manifest.getHealthCheckHttpEndpoint()) + .healthCheckType( + Optional.ofNullable(manifest.getHealthCheckType()) + .map(ApplicationHealthCheck::getValue) + .orElse(null)) + .instances(manifest.getInstances()) + .memory(manifest.getMemory()) + .name(manifest.getName()) + .spaceId(spaceId) + .stackId(stackId); + + if (manifest.getBuildpacks() != null) { + builder.buildpack(manifest.getBuildpacks().get(0)); + } + + when(cloudFoundryClient.applicationsV2().create(builder.build())) + .thenReturn( + Mono.just( + fill(CreateApplicationResponse.builder(), "create-") + .metadata( + fill(Metadata.builder()).id(applicationId).build()) + .build())); + } + + private static void requestCreateDockerApplication( + CloudFoundryClient cloudFoundryClient, + PushApplicationRequest request, + String spaceId, + String stackId, + String applicationId) { + CreateApplicationRequest.Builder requestBuilder = CreateApplicationRequest.builder(); + requestBuilder.dockerCredentials( + DockerCredentials.builder() + .username(request.getDockerUsername()) + .password(request.getDockerPassword()) + .build()); + + when(cloudFoundryClient + .applicationsV2() + .create( + requestBuilder + .command(request.getCommand()) + .diego(true) + .diskQuota(request.getDiskQuota()) + .dockerImage(request.getDockerImage()) + .healthCheckTimeout(request.getTimeout()) + .healthCheckType( + Optional.ofNullable(request.getHealthCheckType()) + .map(ApplicationHealthCheck::getValue) + .orElse(null)) + .instances(request.getInstances()) + .memory(request.getMemory()) + .name(request.getName()) + .spaceId(spaceId) + .stackId(stackId) + .build())) + .thenReturn( + Mono.just( + fill(CreateApplicationResponse.builder(), "create-") + .metadata( + fill(Metadata.builder()).id(applicationId).build()) + .build())); + } + + private static void requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port, + String spaceId, + String routeId) { + when(cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(host) + .path(path) + .port(port) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(CreateRouteResponse.builder()) + .metadata(fill(Metadata.builder()).id(routeId).build()) + .entity(fill(RouteEntity.builder()).build()) + .build())); + } + + private static void requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + Boolean generatePort, + Integer port, + String spaceId, + String routeId) { + when(cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .generatePort(generatePort) + .port(port) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(CreateRouteResponse.builder()) + .metadata(fill(Metadata.builder()).id(routeId).build()) + .entity(fill(RouteEntity.builder()).build()) + .build())); + } + + private static void requestDeleteApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .delete( + org.cloudfoundry.client.v2.applications.DeleteApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestDeleteRoute(CloudFoundryClient cloudFoundryClient, String routeId) { + when(cloudFoundryClient + .routes() + .delete( + org.cloudfoundry.client.v2.routes.DeleteRouteRequest.builder() + .async(true) + .routeId(routeId) + .build())) + .thenReturn( + Mono.just( + fill(DeleteRouteResponse.builder()) + .entity(fill(JobEntity.builder(), "job-entity-").build()) + .build())); + } + + private static void requestEvents( + CloudFoundryClient cloudFoundryClient, String applicationId, EventEntity... entities) { + ListEventsResponse.Builder responseBuilder = fill(ListEventsResponse.builder()); + + for (EventEntity entity : entities) { + responseBuilder.resource( + EventResource.builder() + .metadata(fill(Metadata.builder()).id("test-event-id").build()) + .entity(entity) + .build()); + } + + when(cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .actee(applicationId) + .orderDirection(OrderDirection.DESCENDING) + .resultsPerPage(50) + .page(1) + .build())) + .thenReturn(Mono.just(responseBuilder.totalPages(1).build())); + } + + private static void requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .get( + org.cloudfoundry.client.v2.applications.GetApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill( + GetApplicationResponse + .builder(), + "job-") + .entity( + fill(ApplicationEntity + .builder()) + .packageState( + "STAGING") + .build()) + .build(), + fill( + GetApplicationResponse + .builder(), + "job-") + .entity( + fill(ApplicationEntity + .builder()) + .packageState( + "STAGED") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestGetApplicationFailing( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .get( + org.cloudfoundry.client.v2.applications.GetApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(GetApplicationResponse.builder()) + .entity( + fill(ApplicationEntity.builder()) + .packageState("FAILED") + .build()) + .build())); + } + + private static void requestInstancesApplicationFailing( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill( + ApplicationInstancesResponse.builder(), + "application-instances-") + .instance( + "instance-0", + fill( + ApplicationInstanceInfo.builder(), + "application-instance-info-") + .state("FAILED") + .build()) + .build())); + } + + private static void requestGetApplicationTimeout( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .get( + org.cloudfoundry.client.v2.applications.GetApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(GetApplicationResponse.builder()) + .entity( + fill(ApplicationEntity.builder()) + .packageState("STAGING") + .build()) + .build())); + } + + private static void requestGetApplicationV3Buildpack( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV3() + .get( + org.cloudfoundry.client.v3.applications.GetApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + org.cloudfoundry.client.v3.applications.GetApplicationResponse + .builder() + .createdAt("test-created-at") + .id(applicationId) + .lifecycle( + Lifecycle.builder() + .data( + BuildpackData.builder() + .buildpack("test-buildpack") + .build()) + .type(BUILDPACK) + .build()) + .name("test-name") + .state(ApplicationState.STOPPED) + .updatedAt("test-updated-at") + .build())); + } + + private static void requestGetApplicationV3BuildpackMultiple( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV3() + .get( + org.cloudfoundry.client.v3.applications.GetApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + org.cloudfoundry.client.v3.applications.GetApplicationResponse + .builder() + .createdAt("test-created-at") + .id(applicationId) + .lifecycle( + Lifecycle.builder() + .data( + BuildpackData.builder() + .buildpacks( + "test-buildpack-1", + "test-buildpack-2") + .build()) + .type(BUILDPACK) + .build()) + .name("test-name") + .state(ApplicationState.STOPPED) + .updatedAt("test-updated-at") + .build())); + } + + private static void requestGetApplicationV3Docker( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV3() + .get( + org.cloudfoundry.client.v3.applications.GetApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + org.cloudfoundry.client.v3.applications.GetApplicationResponse + .builder() + .createdAt("test-created-at") + .id(applicationId) + .lifecycle( + Lifecycle.builder() + .data(DockerData.builder().build()) + .type(DOCKER) + .build()) + .name("test-name") + .state(ApplicationState.STOPPED) + .updatedAt("test-updated-at") + .build())); + } + + private static void requestGetSharedDomain( + CloudFoundryClient cloudFoundryClient, String domainId) { + when(cloudFoundryClient + .sharedDomains() + .get(GetSharedDomainRequest.builder().sharedDomainId(domainId).build())) + .thenReturn( + Mono.just( + fill(GetSharedDomainResponse.builder()) + .entity(SharedDomainEntity.builder().build()) + .build())); + } + + private static void requestJobFailure(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .errorDetails( + fill( + ErrorDetails + .builder(), + "error-details-") + .build()) + .status( + "failed") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestJobSuccess(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "finished") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestListMatchingResources( + CloudFoundryClient cloudFoundryClient, + Collection artifactMetadatas) { + ListMatchingResourcesRequest request = + artifactMetadatas.stream() + .reduce( + ListMatchingResourcesRequest.builder(), + (builder, artifactMetadata) -> + builder.resource( + Resource.builder() + .hash(artifactMetadata.getHash()) + .mode(artifactMetadata.getPermissions()) + .size(artifactMetadata.getSize()) + .build()), + (a, b) -> a.addAllResources(b.build().getResources())) + .build(); + + when(cloudFoundryClient.resourceMatch().list(request)) + .thenReturn(Mono.just(ListMatchingResourcesResponse.builder().build())); + } + + private static void requestListTasks( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV3() + .listTasks( + org.cloudfoundry.client.v3.applications.ListApplicationTasksRequest + .builder() + .applicationId(applicationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(org.cloudfoundry.client.v3.applications + .ListApplicationTasksResponse.builder()) + .resource(fill(TaskResource.builder()).build()) + .build())); + } + + private static void requestListTasks( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer sequenceId) { + when(cloudFoundryClient + .applicationsV3() + .listTasks( + org.cloudfoundry.client.v3.applications.ListApplicationTasksRequest + .builder() + .applicationId(applicationId) + .page(1) + .sequenceId(sequenceId.toString()) + .build())) + .thenReturn( + Mono.just( + fill(org.cloudfoundry.client.v3.applications + .ListApplicationTasksResponse.builder()) + .resource(fill(TaskResource.builder()).build()) + .build())); + } + + private static void requestListTasksEmpty( + CloudFoundryClient cloudFoundryClient, String applicationId, Integer sequenceId) { + when(cloudFoundryClient + .applicationsV3() + .listTasks( + org.cloudfoundry.client.v3.applications.ListApplicationTasksRequest + .builder() + .applicationId(applicationId) + .page(1) + .sequenceId(sequenceId.toString()) + .build())) + .thenReturn( + Mono.just( + fill(org.cloudfoundry.client.v3.applications + .ListApplicationTasksResponse.builder()) + .build())); + } + + private static void requestLogsRecent(DopplerClient dopplerClient, String applicationId) { + when(dopplerClient.recentLogs( + RecentLogsRequest.builder().applicationId(applicationId).build())) + .thenReturn( + Flux.just( + Envelope.builder() + .eventType(EventType.LOG_MESSAGE) + .logMessage( + fill(LogMessage.builder(), "log-message-").build()) + .origin("rsp") + .build())); + } + + private static void requestLogsStream(DopplerClient dopplerClient, String applicationId) { + when(dopplerClient.stream(StreamRequest.builder().applicationId(applicationId).build())) + .thenReturn( + Flux.just( + Envelope.builder() + .eventType(EventType.LOG_MESSAGE) + .logMessage( + fill(LogMessage.builder(), "log-message-").build()) + .origin("rsp") + .build())); + } + + private static void requestOrganizationSpacesByName( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .name(space) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource( + SpaceResource.builder() + .metadata( + fill( + Metadata.builder(), + "space-resource-metadata-") + .build()) + .entity(fill(SpaceEntity.builder()).build()) + .build()) + .totalPages(1) + .build())); + } + + private static void requestOrganizationSpacesByNameNotFound( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .name(space) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .totalPages(1) + .build())); + } + + private static void requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organization) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organization) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + OrganizationResource.builder() + .metadata( + fill( + Metadata.builder(), + "organization-resource-metadata-") + .build()) + .entity( + fill(OrganizationEntity.builder()) + .build()) + .build()) + .totalPages(1) + .build())); + } + + private static void requestOrganizationsNotFound( + CloudFoundryClient cloudFoundryClient, String organization) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organization) + .page(1) + .build())) + .thenReturn( + Mono.just(fill(ListOrganizationsResponse.builder()).totalPages(1).build())); + } + + private static void requestPrivateDomainNotFound( + CloudFoundryClient cloudFoundryClient, String domain, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .name(domain) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just(fill(ListOrganizationPrivateDomainsResponse.builder()).build())); + } + + private static void requestPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId, String domainId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationPrivateDomainsResponse.builder()) + .resource( + fill(PrivateDomainResource.builder()) + .metadata( + fill(Metadata.builder()) + .id(domainId) + .build()) + .entity( + fill(PrivateDomainEntity.builder()) + .name("test-private-domain") + .build()) + .build()) + .build())); + } + + private static void requestPrivateDomainsEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just(fill(ListOrganizationPrivateDomainsResponse.builder()).build())); + } + + private static void requestRemoveApplicationRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + when(cloudFoundryClient + .applicationsV2() + .removeRoute( + RemoveApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestRemoveServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceBindingId) { + when(cloudFoundryClient + .applicationsV2() + .removeServiceBinding( + RemoveApplicationServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceBindingId(serviceBindingId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestRestageApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .applicationsV2() + .restage( + org.cloudfoundry.client.v2.applications.RestageApplicationRequest + .builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(RestageApplicationResponse.builder(), "application-") + .build())); + } + + private static void requestRoutes( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + Integer port, + String routePath, + String routeId) { + ListRoutesRequest.Builder requestBuilder = ListRoutesRequest.builder(); + + Optional.ofNullable(host).ifPresent(requestBuilder::host); + Optional.ofNullable(port).ifPresent(requestBuilder::port); + Optional.ofNullable(routePath).ifPresent(requestBuilder::path); + + when(cloudFoundryClient.routes().list(requestBuilder.domainId(domainId).page(1).build())) + .thenReturn( + Mono.just( + fill(ListRoutesResponse.builder()) + .resource( + RouteResource.builder() + .metadata( + fill(Metadata.builder()) + .id(routeId) + .build()) + .entity( + RouteEntity.builder() + .host(host) + .port(port) + .path( + routePath == null + ? "" + : routePath) + .build()) + .build()) + .build())); + } + + private static void requestRoutesEmpty( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + Integer port, + String routePath) { + ListRoutesRequest.Builder requestBuilder = ListRoutesRequest.builder(); + + Optional.ofNullable(domainId).ifPresent(requestBuilder::domainId); + Optional.ofNullable(host).ifPresent(requestBuilder::host); + Optional.ofNullable(port).ifPresent(requestBuilder::port); + Optional.ofNullable(routePath).ifPresent(requestBuilder::path); + + when(cloudFoundryClient.routes().list(requestBuilder.page(1).build())) + .thenReturn(Mono.just(fill(ListRoutesResponse.builder()).build())); + } + + private static void requestRunTask( + CloudFoundryClient cloudFoundryClient, String applicationId) { + when(cloudFoundryClient + .tasks() + .create( + CreateTaskRequest.builder() + .applicationId(applicationId) + .command("test-command") + .build())) + .thenReturn(Mono.just(fill(CreateTaskResponse.builder()).build())); + } + + private static void requestSharedDomain( + CloudFoundryClient cloudFoundryClient, String domain, String domainId) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).name(domain).build())) + .thenReturn( + Mono.just( + fill(ListSharedDomainsResponse.builder()) + .resource( + SharedDomainResource.builder() + .metadata( + fill(Metadata.builder()) + .id(domainId) + .build()) + .entity( + SharedDomainEntity.builder() + .name(domain) + .build()) + .build()) + .build())); + } + + private static void requestSharedDomains( + CloudFoundryClient cloudFoundryClient, String domain, String domainId) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListSharedDomainsResponse.builder()) + .resource( + SharedDomainResource.builder() + .metadata( + fill(Metadata.builder()) + .id(domainId) + .build()) + .entity( + fill(SharedDomainEntity.builder()) + .internal(false) + .name(domain) + .build()) + .build()) + .build())); + } + + private static void requestSharedDomainsEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).build())) + .thenReturn(Mono.just(fill(ListSharedDomainsResponse.builder()).build())); + } + + private static void requestSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String organizationId) { + when(cloudFoundryClient.spaces().get(GetSpaceRequest.builder().spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(GetSpaceResponse.builder()) + .entity( + fill(SpaceEntity.builder()) + .organizationId(organizationId) + .build()) + .build())); + } + + private static void requestSpaceSummary(CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(GetSpaceSummaryResponse.builder(), "space-summary-") + .application( + fill( + SpaceApplicationSummary.builder(), + "application-summary-") + .build()) + .build())); + } + + private static void requestStack(CloudFoundryClient cloudFoundryClient, String stackId) { + when(cloudFoundryClient.stacks().get(GetStackRequest.builder().stackId(stackId).build())) + .thenReturn( + Mono.just( + fill(GetStackResponse.builder()) + .entity( + fill(StackEntity.builder(), "stack-entity-") + .build()) + .build())); + } + + private static void requestStackIdEmpty(CloudFoundryClient cloudFoundryClient, String stack) { + when(cloudFoundryClient + .stacks() + .list(ListStacksRequest.builder().name(stack).page(1).build())) + .thenReturn(Mono.just(fill(ListStacksResponse.builder()).build())); + } + + private static void requestTcpDomains( + CloudFoundryClient cloudFoundryClient, String domain, String domainId) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListSharedDomainsResponse.builder()) + .resource( + SharedDomainResource.builder() + .metadata( + fill(Metadata.builder()) + .id(domainId) + .build()) + .entity( + fill(SharedDomainEntity.builder()) + .name(domain) + .routerGroupType("tcp") + .build()) + .build()) + .build())); + } + + private static void requestTerminateApplicationInstance( + CloudFoundryClient cloudFoundryClient, String applicationId, String instanceIndex) { + when(cloudFoundryClient + .applicationsV2() + .terminateInstance( + TerminateApplicationInstanceRequest.builder() + .applicationId(applicationId) + .index(instanceIndex) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestUpdateApplication( + CloudFoundryClient cloudFoundryClient, + String applicationId, + ApplicationManifest manifest, + String stackId) { + UpdateApplicationRequest.Builder builder = UpdateApplicationRequest.builder(); + if (manifest.getDocker() != null) { + Optional.ofNullable(manifest.getDocker().getImage()).ifPresent(builder::dockerImage); + String dockerUsername = manifest.getDocker().getUsername(); + String dockerPassword = manifest.getDocker().getPassword(); + builder.dockerCredentials( + DockerCredentials.builder() + .username(dockerUsername) + .password(dockerPassword) + .build()); + } + + if (manifest.getBuildpacks() != null) { + builder.buildpack(manifest.getBuildpacks().get(0)); + } + + when(cloudFoundryClient + .applicationsV2() + .update( + builder.applicationId(applicationId) + .command(manifest.getCommand()) + .diskQuota(manifest.getDisk()) + .environmentJsons(manifest.getEnvironmentVariables()) + .healthCheckTimeout(manifest.getTimeout()) + .healthCheckType( + Optional.ofNullable(manifest.getHealthCheckType()) + .map(ApplicationHealthCheck::getValue) + .orElse(null)) + .instances(manifest.getInstances()) + .memory(manifest.getMemory()) + .name(manifest.getName()) + .stackId(stackId) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationResponse.builder()) + .metadata( + fill(Metadata.builder()).id(applicationId).build()) + .build())); + } + + private static void requestUpdateApplicationEnvironment( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Map environment) { + when(cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .environmentJsons(environment) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationResponse.builder()) + .entity( + fill(ApplicationEntity.builder()) + .environmentJsons(environment) + .build()) + .build())); + } + + private static void requestUpdateApplicationHealthCheck( + CloudFoundryClient cloudFoundryClient, + String applicationId, + ApplicationHealthCheck type) { + when(cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .healthCheckType(type.getValue()) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationResponse.builder()) + .entity( + fill( + ApplicationEntity.builder(), + "application-entity-") + .build()) + .build())); + } + + private static void requestUpdateApplicationRename( + CloudFoundryClient cloudFoundryClient, String applicationId, String name) { + when(cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .name(name) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationResponse.builder()) + .entity( + fill( + ApplicationEntity.builder(), + "application-entity-") + .build()) + .build())); + } + + private static void requestUpdateApplicationScale( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Integer disk, + Integer instances, + Integer memory) { + when(cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .diskQuota(disk) + .instances(instances) + .memory(memory) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationResponse.builder()) + .entity(fill(ApplicationEntity.builder()).build()) + .build())); + } + + private static void requestUpdateApplicationSsh( + CloudFoundryClient cloudFoundryClient, String applicationId, Boolean enabled) { + when(cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .enableSsh(enabled) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationResponse.builder()) + .entity( + fill( + ApplicationEntity.builder(), + "application-entity-") + .build()) + .build())); + } + + private static void requestUpdateApplicationSshV3( + CloudFoundryClient cloudFoundryClient, String applicationId, Boolean enabled) { + + when(cloudFoundryClient + .applicationsV3() + .updateFeature( + UpdateApplicationFeatureRequest.builder() + .applicationId(applicationId) + .featureName(APP_FEATURE_SSH) + .enabled(enabled) + .build())) + .thenReturn( + Mono.just( + fill(UpdateApplicationFeatureResponse.builder()) + .description("test-description") + .name("test-application-name") + .enabled(enabled) + .build())); + } + + private static void requestGetSshEnabled( + CloudFoundryClient cloudFoundryClient, String applicationId, boolean status) { + when(cloudFoundryClient + .applicationsV3() + .getSshEnabled( + GetApplicationSshEnabledRequest.builder() + .applicationId(applicationId) + .build())) + .thenReturn( + Mono.just( + fill(GetApplicationSshEnabledResponse.builder()) + .reason("test-reason") + .enabled(status) + .build())); + } + + private static void requestUpdateApplicationState( + CloudFoundryClient cloudFoundryClient, String applicationId, String state) { + requestUpdateApplicationState(cloudFoundryClient, applicationId, state, 1); + } + + private static void requestUpdateApplicationState( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String state, + int instances) { + when(cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .state(state) + .build())) + .thenReturn( + Mono.just( + UpdateApplicationResponse.builder() + .metadata( + fill(Metadata.builder()).id(applicationId).build()) + .entity( + fill(ApplicationEntity.builder()) + .state(state) + .instances(instances) + .build()) + .build())); + } + + private static void requestUpload( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Path application, + String jobId) { + when(cloudFoundryClient + .applicationsV2() + .upload( + UploadApplicationRequest.builder() + .applicationId(applicationId) + .async(true) + .application(application) + .build())) + .thenReturn( + Mono.just( + fill(UploadApplicationResponse.builder()) + .metadata(fill(Metadata.builder()).id(jobId).build()) + .entity(fill(JobEntity.builder(), "job-entity-").build()) + .build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DeleteApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DeleteApplicationRequestTest.java new file mode 100644 index 00000000000..0c0388ad747 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DeleteApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteApplicationRequest.builder().name("test-name").deleteRoutes(true).build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DisableApplicationSshTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DisableApplicationSshTest.java new file mode 100644 index 00000000000..111b44c9d46 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/DisableApplicationSshTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DisableApplicationSshTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DisableApplicationSshRequest.builder().build(); + }); + } + + @Test + void valid() { + DisableApplicationSshRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/EnableApplicationSshRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/EnableApplicationSshRequestTest.java new file mode 100644 index 00000000000..417ce79ab2b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/EnableApplicationSshRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class EnableApplicationSshRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + EnableApplicationSshRequest.builder().build(); + }); + } + + @Test + void valid() { + EnableApplicationSshRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationEnvironmentsRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationEnvironmentsRequestTest.java new file mode 100644 index 00000000000..c5155719589 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationEnvironmentsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationEnvironmentsRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationEnvironmentsRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationEnvironmentsRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationEventsRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationEventsRequestTest.java new file mode 100644 index 00000000000..e22d9526c0c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationEventsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationEventsRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationEventsRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationEventsRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationHealthCheckRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationHealthCheckRequestTest.java new file mode 100644 index 00000000000..d66ba883720 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationHealthCheckRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationHealthCheckRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationHealthCheckRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationHealthCheckRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationManifestRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationManifestRequestTest.java new file mode 100644 index 00000000000..1ef360c62b5 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationManifestRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationManifestRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationManifestRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationManifestRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationRequestTest.java new file mode 100644 index 00000000000..fb62dd6f7b0 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/GetApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + GetApplicationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ListApplicationTasksRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ListApplicationTasksRequestTest.java new file mode 100644 index 00000000000..66329d022e1 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ListApplicationTasksRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListApplicationTasksRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + ListApplicationTasksRequest.builder().build(); + }); + } + + @Test + void valid() { + ListApplicationTasksRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/LogsRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/LogsRequestTest.java new file mode 100644 index 00000000000..17fb92c9b2b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/LogsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class LogsRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + LogsRequest.builder().build(); + }); + } + + @Test + void valid() { + LogsRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ApplicationTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ApplicationTest.java new file mode 100644 index 00000000000..51bc31cb117 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ApplicationTest.java @@ -0,0 +1,111 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +class ManifestV3ApplicationTest { + + @Test + void dockerAndBuildpack() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Application.builder() + .name("test-name") + .buildpack("test-buildpack") + .docker(Docker.builder().image("test-docker-image").build()) + .build(); + }); + } + + @Test + void dockerAndPath() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Application.builder() + .name("test-name") + .docker(Docker.builder().image("test-docker-image").build()) + .path(Paths.get("test-application")) + .build(); + }); + } + + @Test + void dockerCredentialsNoImage() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Application.builder() + .name("test-name") + .docker( + Docker.builder() + .password("test-password") + .username("test-username") + .build()) + .build(); + }); + } + + @Test + void routesAndDomains() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Application.builder() + .name("test-name") + .route(Route.builder().route("test-route").build()) + .domain("test-domain") + .build(); + }); + } + + @Test + void routesAndHosts() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Application.builder() + .name("test-name") + .route(Route.builder().route("test-route").build()) + .host("test-host") + .build(); + }); + } + + @Test + void routesAndNoHostName() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Application.builder() + .name("test-name") + .route(Route.builder().route("test-route").build()) + .noHostname(true) + .build(); + }); + } + + @Test + void valid() { + ManifestV3Application.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ProcessTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ProcessTest.java new file mode 100644 index 00000000000..02763b2ddd7 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ProcessTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ManifestV3ProcessTest { + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Process.builder().build(); + }); + } + + @Test + void valid() { + ManifestV3Process.builder().type("test-type").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ServiceTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ServiceTest.java new file mode 100644 index 00000000000..284fcf8df4b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3ServiceTest.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ManifestV3ServiceTest { + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Service.builder().build(); + }); + } + + @Test + void valid() { + ManifestV3Service.builder().name("test-service-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3SidecarTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3SidecarTest.java new file mode 100644 index 00000000000..6cd07c9783c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3SidecarTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ManifestV3SidecarTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3Sidecar.builder().build(); + }); + } + + @Test + void valid() { + ManifestV3Sidecar.builder().name("test-service-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3Test.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3Test.java new file mode 100644 index 00000000000..498559c3c69 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ManifestV3Test.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ManifestV3Test { + + private final ManifestV3Application testApplication = + ManifestV3Application.builder().name("test-application-name").build(); + + @Test + void illegalVersion() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3.builder().version(2).application(testApplication).build(); + }); + } + + @Test + void noApplications() { + assertThrows( + IllegalStateException.class, + () -> { + ManifestV3.builder().build(); + }); + } + + @Test + void valid() { + ManifestV3.builder().application(testApplication).build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/PushApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/PushApplicationRequestTest.java new file mode 100644 index 00000000000..d6a8d54c6ab --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/PushApplicationRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +final class PushApplicationRequestTest { + + @Test + void applicationAndDocker() { + assertThrows( + IllegalStateException.class, + () -> { + PushApplicationRequest.builder() + .path(Paths.get("test-application")) + .dockerImage("test-docker") + .name("test-name") + .build(); + }); + } + + @Test + void noApplicationOrDocker() { + assertThrows( + IllegalStateException.class, + () -> { + PushApplicationRequest.builder().name("test-name").build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + PushApplicationRequest.builder().path(Paths.get("test-application")).build(); + }); + } + + @Test + void validApplication() { + PushApplicationRequest.builder() + .path(Paths.get("test-application")) + .name("test-name") + .build(); + } + + @Test + void validDocker() { + PushApplicationRequest.builder().dockerImage("test-docker").name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/PushManifestV3RequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/PushManifestV3RequestTest.java new file mode 100644 index 00000000000..26a1f9f8635 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/PushManifestV3RequestTest.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class PushManifestV3RequestTest { + + @Test + void noManifest() { + assertThrows( + IllegalStateException.class, + () -> { + PushManifestV3Request.builder().build(); + }); + } + + @Test + void valid() { + PushManifestV3Request.builder() + .manifest( + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .name("test-application-name") + .build()) + .build()) + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RestartApplicationInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RestartApplicationInstanceRequestTest.java new file mode 100644 index 00000000000..e878f7c7e89 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RestartApplicationInstanceRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RestartApplicationInstanceRequestTest { + + @Test + void noInstanceIndex() { + assertThrows( + IllegalStateException.class, + () -> { + RestartApplicationInstanceRequest.builder().name("test-name").build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + RestartApplicationInstanceRequest.builder().instanceIndex(0).build(); + }); + } + + @Test + void valid() { + RestartApplicationInstanceRequest.builder().instanceIndex(0).name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RestartApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RestartApplicationRequestTest.java new file mode 100644 index 00000000000..99f99973ffb --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RestartApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RestartApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + RestartApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + RestartApplicationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RouteUtilsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RouteUtilsTest.java new file mode 100644 index 00000000000..51d120c29de --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RouteUtilsTest.java @@ -0,0 +1,258 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.time.Duration; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import org.junit.jupiter.api.Test; +import reactor.test.StepVerifier; + +class RouteUtilsTest { + + @Test + void complexHit() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = DecomposedRoute.builder().domain("test.test.com").build(); + + RouteUtils.decomposeRoute(availableDomains, "test.test.com", null) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void complexPathHit() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = + DecomposedRoute.builder().domain("test.test.com").path("/path").build(); + + RouteUtils.decomposeRoute(availableDomains, "test.test.com/path", null) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void empty() { + assertThrows( + IllegalArgumentException.class, + () -> { + List availableDomains = Collections.emptyList(); + + RouteUtils.decomposeRoute(availableDomains, "test.test.com", null) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "The route test.test.com did not match" + + " any existing domains")) + .verify(Duration.ofSeconds(5)); + }); + } + + @Test + void partialMatchMiss() { + assertThrows( + IllegalArgumentException.class, + () -> { + List availableDomains = new ArrayList<>(); + availableDomains.add( + DomainSummary.builder().id("1").name("test.something.com").build()); + availableDomains.add( + DomainSummary.builder().id("2").name("something.com").build()); + availableDomains.add(DomainSummary.builder().id("3").name("hing.com").build()); + + RouteUtils.decomposeRoute(availableDomains, "thing.com", null) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "The route thing.com did not match any" + + " existing domains")) + .verify(Duration.ofSeconds(5)); + }); + } + + @Test + void partialMiss() { + assertThrows( + IllegalArgumentException.class, + () -> { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add( + DomainSummary.builder().id("2").name("test.test.com").build()); + + RouteUtils.decomposeRoute(availableDomains, "est.com", null) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "The route est.com did not match any" + + " existing domains")) + .verify(Duration.ofSeconds(5)); + }); + } + + @Test + void pathMiss() { + assertThrows( + IllegalArgumentException.class, + () -> { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add( + DomainSummary.builder().id("2").name("test.test.com").build()); + + RouteUtils.decomposeRoute(availableDomains, "miss.com/path", null) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "The route miss.com/path did not match" + + " any existing domains")) + .verify(Duration.ofSeconds(5)); + }); + } + + @Test + void routeDecompositionPathHit() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = + DecomposedRoute.builder().domain("test.com").path("/path").build(); + + RouteUtils.decomposeRoute(availableDomains, "test.com/path", null) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void simpleHit() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = DecomposedRoute.builder().domain("test.com").build(); + + RouteUtils.decomposeRoute(availableDomains, "test.com", null) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void simpleHostHit() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = + DecomposedRoute.builder().domain("test.com").host("host").build(); + + RouteUtils.decomposeRoute(availableDomains, "host.test.com", null) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void simpleHostPathHit() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = + DecomposedRoute.builder().domain("test.com").host("host").path("/path").build(); + + RouteUtils.decomposeRoute(availableDomains, "host.test.com/path", null) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void simpleMiss() { + assertThrows( + IllegalArgumentException.class, + () -> { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add( + DomainSummary.builder().id("2").name("test.test.com").build()); + + RouteUtils.decomposeRoute(availableDomains, "miss.com", null) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "The route miss.com did not match any" + + " existing domains")) + .verify(Duration.ofSeconds(5)); + }); + } + + @Test + void simplePathOverride() { + List availableDomains = new ArrayList<>(); + availableDomains.add(DomainSummary.builder().id("1").name("test.com").build()); + availableDomains.add(DomainSummary.builder().id("2").name("test.test.com").build()); + + DecomposedRoute expected = + DecomposedRoute.builder() + .domain("test.com") + .host("host") + .path("/override-path") + .build(); + + RouteUtils.decomposeRoute(availableDomains, "host.test.com/path", "/override-path") + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RunApplicationTaskRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RunApplicationTaskRequestTest.java new file mode 100644 index 00000000000..f736f3bbdd2 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/RunApplicationTaskRequestTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RunApplicationTaskRequestTest { + + @Test + void noApplicationName() { + assertThrows( + IllegalStateException.class, + () -> { + RunApplicationTaskRequest.builder().command("test-command").build(); + }); + } + + @Test + void noCommand() { + assertThrows( + IllegalStateException.class, + () -> { + RunApplicationTaskRequest.builder() + .applicationName("test-application-name") + .build(); + }); + } + + @Test + void valid() { + RunApplicationTaskRequest.builder() + .applicationName("test-application-name") + .command("test-command") + .disk(1) + .memory(1) + .taskName("test-task-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ScaleApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ScaleApplicationRequestTest.java new file mode 100644 index 00000000000..30237678a69 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/ScaleApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ScaleApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + ScaleApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + ScaleApplicationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/SetApplicationHealthCheckRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/SetApplicationHealthCheckRequestTest.java new file mode 100644 index 00000000000..6f2c068d3cd --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/SetApplicationHealthCheckRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetApplicationHealthCheckRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + SetApplicationHealthCheckRequest.builder() + .type(ApplicationHealthCheck.NONE) + .build(); + }); + } + + @Test + void noType() { + assertThrows( + IllegalStateException.class, + () -> { + SetApplicationHealthCheckRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + SetApplicationHealthCheckRequest.builder() + .name("test-name") + .type(ApplicationHealthCheck.NONE) + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/SetEnvironmentVariableApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/SetEnvironmentVariableApplicationRequestTest.java new file mode 100644 index 00000000000..9a7ccb466b5 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/SetEnvironmentVariableApplicationRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetEnvironmentVariableApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + SetEnvironmentVariableApplicationRequest.builder() + .variableName("test-variable-name") + .variableValue("test-variable-value") + .build(); + }); + } + + @Test + void noVariableName() { + assertThrows( + IllegalStateException.class, + () -> { + SetEnvironmentVariableApplicationRequest.builder() + .name("test-name") + .variableValue("test-variable-value") + .build(); + }); + } + + @Test + void noVariableValue() { + assertThrows( + IllegalStateException.class, + () -> { + SetEnvironmentVariableApplicationRequest.builder() + .name("test-name") + .variableName("test-variable-name") + .build(); + }); + } + + @Test + void valid() { + SetEnvironmentVariableApplicationRequest.builder() + .name("test-name") + .variableName("test-variable-name") + .variableValue("test-variable-value") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/StartApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/StartApplicationRequestTest.java new file mode 100644 index 00000000000..3f339d27b3e --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/StartApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class StartApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + StartApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + StartApplicationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/StopApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/StopApplicationRequestTest.java new file mode 100644 index 00000000000..326f66c309b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/StopApplicationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class StopApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + StopApplicationRequest.builder().build(); + }); + } + + @Test + void valid() { + StopApplicationRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/TerminateApplicationTaskRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/TerminateApplicationTaskRequestTest.java new file mode 100644 index 00000000000..bc6b14e2cf7 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/TerminateApplicationTaskRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class TerminateApplicationTaskRequestTest { + + @Test + void noApplicationName() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationTaskRequest.builder().sequenceId(1).build(); + }); + } + + @Test + void noSequenceId() { + assertThrows( + IllegalStateException.class, + () -> { + TerminateApplicationTaskRequest.builder() + .applicationName("test-application-name") + .build(); + }); + } + + @Test + void valid() { + TerminateApplicationTaskRequest.builder() + .applicationName("test-application-name") + .sequenceId(1) + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/UnsetEnvironmentVariableApplicationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/UnsetEnvironmentVariableApplicationRequestTest.java new file mode 100644 index 00000000000..cb8ba57d349 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/UnsetEnvironmentVariableApplicationRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnsetEnvironmentVariableApplicationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetEnvironmentVariableApplicationRequest.builder() + .variableName("test-variable-name") + .build(); + }); + } + + @Test + void noVariableName() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetEnvironmentVariableApplicationRequest.builder().name("test-name").build(); + }); + } + + @Test + void valid() { + UnsetEnvironmentVariableApplicationRequest.builder() + .name("test-name") + .variableName("test-variable-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/WordListRandomWordsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/WordListRandomWordsTest.java new file mode 100644 index 00000000000..e0f05fa23ff --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/applications/WordListRandomWordsTest.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.applications; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; + +final class WordListRandomWordsTest { + + private final WordListRandomWords randomWords = new WordListRandomWords(); + + @Test + void getAdjective() { + assertThat(this.randomWords.getAdjective()).isNotNull(); + } + + @Test + void getNoun() { + assertThat(this.randomWords.getNoun()).isNotNull(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/CreateBuildpackRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/CreateBuildpackRequestTest.java new file mode 100644 index 00000000000..e25aae7ec99 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/CreateBuildpackRequestTest.java @@ -0,0 +1,67 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +class CreateBuildpackRequestTest { + + @Test + void noBuildpack() { + assertThrows( + IllegalStateException.class, + () -> { + CreateBuildpackRequest.builder().name("test-name").position(0).build(); + }); + } + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateBuildpackRequest.builder() + .buildpack(Paths.get("test-buildpack")) + .position(0) + .build(); + }); + } + + @Test + void noPosition() { + assertThrows( + IllegalStateException.class, + () -> { + CreateBuildpackRequest.builder() + .buildpack(Paths.get("test-buildpack")) + .name("test-name") + .build(); + }); + } + + @Test + void valid() { + CreateBuildpackRequest.builder() + .buildpack(Paths.get("test-buildpack")) + .name("test-name") + .position(0) + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/DefaultBuildpacksTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/DefaultBuildpacksTest.java new file mode 100644 index 00000000000..1d4f928a63b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/DefaultBuildpacksTest.java @@ -0,0 +1,303 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.Mockito.when; + +import java.nio.file.Path; +import java.nio.file.Paths; +import java.time.Duration; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.Queue; +import java.util.function.Supplier; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.buildpacks.BuildpackResource; +import org.cloudfoundry.client.v3.buildpacks.BuildpackState; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksResponse; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackResponse; +import org.cloudfoundry.client.v3.jobs.GetJobRequest; +import org.cloudfoundry.client.v3.jobs.GetJobResponse; +import org.cloudfoundry.client.v3.jobs.JobState; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DefaultBuildpacksTest extends AbstractOperationsTest { + + private final DefaultBuildpacks buildpacks = new DefaultBuildpacks(this.cloudFoundryClient); + + @Test + void create() { + requestBuildpack(this.cloudFoundryClient); + requestCreateBuildpack(this.cloudFoundryClient, "test-buildpack", 1, true); + requestUploadBuildpack( + this.cloudFoundryClient, "test-buildpack-id", Paths.get("test-buildpack")); + + this.buildpacks + .create( + CreateBuildpackRequest.builder() + .buildpack(Paths.get("test-buildpack")) + .name("test-buildpack") + .enable(true) + .position(1) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + requestListBuildpacks(this.cloudFoundryClient, "test-buildpack"); + requestDeleteBuildpack(this.cloudFoundryClient, "test-buildpack-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-id"); + + StepVerifier.withVirtualTime( + () -> + this.buildpacks.delete( + DeleteBuildpackRequest.builder() + .name("test-buildpack") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + requestBuildpacks(this.cloudFoundryClient); + + this.buildpacks + .list() + .as(StepVerifier::create) + .expectNext( + Buildpack.builder() + .enabled(true) + .filename("test-buildpack-filename") + .id("test-buildpack-id") + .locked(true) + .name("test-buildpack-name") + .position(1) + .stack("test-buildpack-stack") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void rename() { + requestListBuildpacks(this.cloudFoundryClient, "test-buildpack"); + requestUpdateBuildpack(this.cloudFoundryClient, "test-buildpack-id", "test-buildpack-new"); + + this.buildpacks + .rename( + RenameBuildpackRequest.builder() + .name("test-buildpack") + .newName("test-buildpack-new") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void update() { + requestBuildpack(this.cloudFoundryClient); + requestListBuildpacks(this.cloudFoundryClient, "test-buildpack"); + requestUpdateBuildpack(this.cloudFoundryClient, "test-buildpack-id", true, true, 5); + + this.buildpacks + .update( + UpdateBuildpackRequest.builder() + .enable(true) + .lock(true) + .name("test-buildpack") + .position(5) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateWithBits() { + requestBuildpack(this.cloudFoundryClient); + requestListBuildpacks(this.cloudFoundryClient, "test-buildpack"); + requestUpdateBuildpack(this.cloudFoundryClient, "test-buildpack-id", true, true, 5); + requestUploadBuildpack( + this.cloudFoundryClient, "test-buildpack-id", Paths.get("test-buildpack")); + + this.buildpacks + .update( + UpdateBuildpackRequest.builder() + .buildpack(Paths.get("test-buildpack")) + .enable(true) + .lock(true) + .name("test-buildpack") + .position(5) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestBuildpack(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient.buildpacksV3().get(any(GetBuildpackRequest.class))) + .thenReturn( + Mono.just( + fill(GetBuildpackResponse.builder(), "buildpack-") + .state(BuildpackState.READY) + .build())); + } + + private static void requestBuildpacks(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .buildpacksV3() + .list(ListBuildpacksRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListBuildpacksResponse.builder()) + .resource( + fill(BuildpackResource.builder(), "buildpack-") + .state(BuildpackState.READY) + .build()) + .build())); + } + + private static void requestCreateBuildpack( + CloudFoundryClient cloudFoundryClient, String name, Integer position, Boolean enable) { + when(cloudFoundryClient + .buildpacksV3() + .create( + org.cloudfoundry.client.v3.buildpacks.CreateBuildpackRequest + .builder() + .name(name) + .position(position) + .enabled(enable) + .build())) + .thenReturn( + Mono.just(fill(CreateBuildpackResponse.builder(), "buildpack-").build())); + } + + private static void requestDeleteBuildpack( + CloudFoundryClient cloudFoundryClient, String buildpackId) { + when(cloudFoundryClient + .buildpacksV3() + .delete( + org.cloudfoundry.client.v3.buildpacks.DeleteBuildpackRequest + .builder() + .buildpackId(buildpackId) + .build())) + .thenReturn(Mono.just("test-job-id")); + } + + private static void requestJobSuccess(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobsV3().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill( + GetJobResponse + .builder(), + "test-job-") + .state(JobState.PROCESSING) + .build(), + fill(GetJobResponse.builder(), "job-") + .state(JobState.COMPLETE) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestListBuildpacks(CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .buildpacksV3() + .list(ListBuildpacksRequest.builder().name(name).page(1).build())) + .thenReturn( + Mono.just( + fill(ListBuildpacksResponse.builder()) + .resource( + fill(BuildpackResource.builder()) + .id("test-buildpack-id") + .name(name) + .build()) + .build())); + } + + private static void requestUpdateBuildpack( + CloudFoundryClient cloudFoundryClient, String buildpackId, String name) { + when(cloudFoundryClient + .buildpacksV3() + .update( + org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest + .builder() + .buildpackId(buildpackId) + .name(name) + .build())) + .thenReturn(Mono.just(fill(UpdateBuildpackResponse.builder()).build())); + } + + private static void requestUpdateBuildpack( + CloudFoundryClient cloudFoundryClient, + String buildpackId, + boolean enabled, + boolean locked, + Integer position) { + when(cloudFoundryClient + .buildpacksV3() + .update( + org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest + .builder() + .buildpackId(buildpackId) + .enabled(enabled) + .locked(locked) + .position(position) + .build())) + .thenReturn(Mono.just(fill(UpdateBuildpackResponse.builder()).build())); + } + + private static void requestUploadBuildpack( + CloudFoundryClient cloudFoundryClient, String buildpackId, Path buildpack) { + when(cloudFoundryClient + .buildpacksV3() + .upload( + org.cloudfoundry.client.v3.buildpacks.UploadBuildpackRequest + .builder() + .buildpackId(buildpackId) + .bits(buildpack) + .build())) + .thenReturn(Mono.just(fill(UploadBuildpackResponse.builder()).build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/DeleteBuildpackRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/DeleteBuildpackRequestTest.java new file mode 100644 index 00000000000..2bf4727d465 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/DeleteBuildpackRequestTest.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.time.Duration; +import org.junit.jupiter.api.Test; + +class DeleteBuildpackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteBuildpackRequest.builder() + .name("test-buildpack-name") + .completionTimeout(Duration.ofSeconds(5)) + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/RenameBuildpackRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/RenameBuildpackRequestTest.java new file mode 100644 index 00000000000..6845064c3a2 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/RenameBuildpackRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class RenameBuildpackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameBuildpackRequest.builder().newName("test-buildpack-new-name").build(); + }); + } + + @Test + void noNewName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameBuildpackRequest.builder().name("test-buildpack-name").build(); + }); + } + + @Test + void valid() { + RenameBuildpackRequest.builder() + .name("test-buildpack-name") + .newName("test-buildpack-new-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/UpdateBuildpackRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/UpdateBuildpackRequestTest.java new file mode 100644 index 00000000000..005547fdbfc --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/buildpacks/UpdateBuildpackRequestTest.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.buildpacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import java.nio.file.Paths; +import org.junit.jupiter.api.Test; + +class UpdateBuildpackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateBuildpackRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateBuildpackRequest.builder() + .buildpack(Paths.get("test-buildpack")) + .enable(false) + .lock(true) + .name("test-name") + .position(0) + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/CreateDomainRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/CreateDomainRequestTest.java new file mode 100644 index 00000000000..d974026dda2 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/CreateDomainRequestTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateDomainRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + CreateDomainRequest.builder().organization("test-organization").build(); + }); + } + + @Test + void valid() { + CreateDomainRequest.builder() + .domain("test-domain") + .organization("test-organization") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/CreateSharedDomainRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/CreateSharedDomainRequestTest.java new file mode 100644 index 00000000000..00b4816aea6 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/CreateSharedDomainRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateSharedDomainRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSharedDomainRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateSharedDomainRequest.builder().domain("test-domain").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/DefaultDomainsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/DefaultDomainsTest.java new file mode 100644 index 00000000000..6fdae8380ff --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/DefaultDomainsTest.java @@ -0,0 +1,391 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.argThat; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.verifyNoInteractions; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.domains.ListDomainsRequest; +import org.cloudfoundry.client.v3.domains.ListDomainsResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsResponse; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultDomainsTest extends AbstractOperationsTest { + + private final DefaultDomains domains = + new DefaultDomains(this.cloudFoundryClient, this.routingClient); + + @Test + void createDomain() { + requestOrganizations(this.cloudFoundryClient, "test-organization"); + requestCreateDomain(this.cloudFoundryClient, "test-domain", "test-organization-id"); + + this.domains + .create( + CreateDomainRequest.builder() + .domain("test-domain") + .organization("test-organization") + .build()) + .as(StepVerifier::create) + .verifyComplete(); + + verify(this.cloudFoundryClient.domainsV3()) + .create( + argThat( + a -> + a.getName().equals("test-domain") + && a.getRelationships() + .getOrganization() + .getData() + .getId() + .equals("test-organization-id"))); + verifyNoInteractions(this.routingClient.routerGroups().list(any())); + } + + @Test + void createSharedDomain() { + requestCreateDomain(this.cloudFoundryClient, "test-domain"); + + this.domains + .createShared(CreateSharedDomainRequest.builder().domain("test-domain").build()) + .as(StepVerifier::create) + .verifyComplete(); + + verify(this.cloudFoundryClient.domainsV3()) + .create(argThat(a -> a.getName().equals("test-domain"))); + verifyNoInteractions(this.cloudFoundryClient.organizationsV3().list(any())); + verifyNoInteractions(this.routingClient.routerGroups().list(any())); + } + + @Test + void createDomainRouterGroup() { + requestCreateDomain(this.cloudFoundryClient, "test-domain"); + requestListRouterGroups(this.routingClient, "test-router-group"); + + this.domains + .create( + CreateDomainRequest.builder() + .domain("test-domain") + .routerGroup("test-router-group") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + + verifyNoInteractions(this.cloudFoundryClient.organizationsV3().list(any())); + verify(this.routingClient.routerGroups()).list(any()); + verify(this.cloudFoundryClient.domainsV3()) + .create(argThat(a -> a.getRouterGroup().getId().equals("test-routerGroupId"))); + } + + @Test + void createSharedDomainRouterGroup() { + requestCreateDomain(this.cloudFoundryClient, "test-domain"); + requestListRouterGroups(this.routingClient, "test-router-group"); + + this.domains + .createShared( + CreateSharedDomainRequest.builder() + .domain("test-domain") + .routerGroup("test-router-group") + .build()) + .as(StepVerifier::create) + .verifyComplete(); + + verifyNoInteractions(this.cloudFoundryClient.organizationsV3().list(any())); + verify(this.routingClient.routerGroups()).list(any()); + verify(this.cloudFoundryClient.domainsV3()) + .create(argThat(a -> a.getRouterGroup().getId().equals("test-routerGroupId"))); + } + + @Test + void listDomains() { + requestListRouterGroups(this.routingClient, "test-router-group"); + requestListDomains(this.cloudFoundryClient, "test-organization-id", null); + + this.domains + .list() + .as(StepVerifier::create) + .expectNext( + Domain.builder() + .id("test-domain-id") + .name("test-domain-name") + .status(Status.OWNED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDomainsShared() { + requestListRouterGroups(this.routingClient, "test-router-group"); + requestListDomains(this.cloudFoundryClient, null, null); + + this.domains + .list() + .as(StepVerifier::create) + .expectNext( + Domain.builder() + .id("test-domain-id") + .name("test-domain-name") + .status(Status.SHARED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listDomainsTcp() { + requestListDomains(this.cloudFoundryClient, null, "test-routerGroupId"); + requestListRouterGroups(this.routingClient, "test-tcp-group"); + + this.domains + .list() + .as(StepVerifier::create) + .expectNext( + Domain.builder() + .id("test-domain-id") + .name("test-domain-name") + .status(Status.SHARED) + .type("tcp") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listRouterGroups() { + requestListRouterGroups(this.routingClient, "test-router-group"); + + this.domains + .listRouterGroups() + .as(StepVerifier::create) + .expectNext( + RouterGroup.builder() + .id("test-routerGroupId") + .name("test-router-group") + .type("tcp") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void shareDomain() { + requestOrganizations(this.cloudFoundryClient, "test-organization"); + requestListDomains(this.cloudFoundryClient, "test-organization-id", null); + requestShareDomain(this.cloudFoundryClient, "test-domain-id", "test-organization-id"); + + this.domains + .share( + ShareDomainRequest.builder() + .domain("test-domain-name") + .organization("test-organization") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void shareDomainDoesNotExist() { + requestOrganizations(this.cloudFoundryClient, "test-organization"); + requestListDomains(this.cloudFoundryClient, "test-organization-id", null); + requestShareDomain(this.cloudFoundryClient, "test-domain-id", "test-organization-id"); + + this.domains + .share( + ShareDomainRequest.builder() + .domain("invalid-domain-name") + .organization("test-organization") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Private domain invalid-domain-name does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unshareDomain() { + requestListDomains(this.cloudFoundryClient, "test-organization-id", null); + requestOrganizations(this.cloudFoundryClient, "test-organization"); + requestUnshareDomain(this.cloudFoundryClient, "test-domain-id", "test-organization-id"); + + this.domains + .unshare( + UnshareDomainRequest.builder() + .domain("test-domain-name") + .organization("test-organization") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestShareDomain( + CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { + when(cloudFoundryClient + .domainsV3() + .share( + org.cloudfoundry.client.v3.domains.ShareDomainRequest.builder() + .domainId(domainId) + .data(Relationship.builder().id(organizationId).build()) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestUnshareDomain( + CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { + when(cloudFoundryClient + .domainsV3() + .unshare( + org.cloudfoundry.client.v3.domains.UnshareDomainRequest.builder() + .domainId(domainId) + .organizationId(organizationId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestCreateDomain(CloudFoundryClient cloudFoundryClient, String domain) { + when(cloudFoundryClient.domainsV3().create(any())) + .thenReturn( + Mono.just( + fill(CreateDomainResponse.builder(), "domain-") + .isInternal(false) + .build())); + } + + private static void requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domain, String organizationId) { + when(cloudFoundryClient + .domainsV3() + .create( + org.cloudfoundry.client.v3.domains.CreateDomainRequest.builder() + .name(domain) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship + .builder() + .id( + organizationId) + .build()) + .build()) + .build()) + .build())) + .thenReturn( + Mono.just( + fill(CreateDomainResponse.builder(), "domain-") + .isInternal(false) + .build())); + } + + private static void requestListDomains( + CloudFoundryClient cloudFoundryClient, String organizationId, String routerGroupId) { + ToOneRelationship organizationRelationShip = + organizationId != null + ? ToOneRelationship.builder() + .data(Relationship.builder().id(organizationId).build()) + .build() + : ToOneRelationship.builder().build(); + org.cloudfoundry.client.v3.domains.RouterGroup routerGroup = + routerGroupId != null + ? org.cloudfoundry.client.v3.domains.RouterGroup.builder() + .id(routerGroupId) + .build() + : null; + + when(cloudFoundryClient.domainsV3().list(ListDomainsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListDomainsResponse.builder()) + .resource( + fill(DomainResource.builder(), "domain-") + .isInternal(false) + .relationships( + DomainRelationships.builder() + .organization( + organizationRelationShip) + .build()) + .routerGroup(routerGroup) + .build()) + .pagination(Pagination.builder().totalPages(1).build()) + .build())); + } + + private static void requestListRouterGroups( + RoutingClient routingClient, String routerGroupName) { + when(routingClient.routerGroups().list(any())) + .thenReturn( + Mono.just( + ListRouterGroupsResponse.builder() + .routerGroup( + fill(org.cloudfoundry.routing.v1.routergroups + .RouterGroup.builder()) + .name(routerGroupName) + .type("tcp") + .build()) + .build())); + } + + private static void requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organization) { + when(cloudFoundryClient + .organizationsV3() + .list( + ListOrganizationsRequest.builder() + .name(organization) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .build()) + .build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/ShareDomainRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/ShareDomainRequestTest.java new file mode 100644 index 00000000000..ca27f273dd7 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/ShareDomainRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ShareDomainRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + ShareDomainRequest.builder().organization("test-organization").build(); + }); + } + + @Test + void noOrganization() { + assertThrows( + IllegalStateException.class, + () -> { + ShareDomainRequest.builder().domain("test-domain").build(); + }); + } + + @Test + void valid() { + ShareDomainRequest.builder() + .domain("test-domain") + .organization("test-organization") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/UnshareDomainRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/UnshareDomainRequestTest.java new file mode 100644 index 00000000000..ebf6d220994 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/domains/UnshareDomainRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.domains; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnshareDomainRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + UnshareDomainRequest.builder().organization("test-organization").build(); + }); + } + + @Test + void noOrganization() { + assertThrows( + IllegalStateException.class, + () -> { + UnshareDomainRequest.builder().domain("test-domain").build(); + }); + } + + @Test + void valid() { + UnshareDomainRequest.builder() + .domain("test-domain") + .organization("test-organization") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/AddNetworkPolicyRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/AddNetworkPolicyRequestTest.java new file mode 100644 index 00000000000..6b2f0d3936a --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/AddNetworkPolicyRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AddNetworkPolicyRequestTest { + + @Test + void noDestination() { + assertThrows( + IllegalStateException.class, + () -> { + AddNetworkPolicyRequest.builder().source("test-source").build(); + }); + } + + @Test + void noSource() { + assertThrows( + IllegalStateException.class, + () -> { + AddNetworkPolicyRequest.builder().destination("test-destination").build(); + }); + } + + @Test + void valid() { + AddNetworkPolicyRequest.builder() + .destination("test-destination") + .source("test-source") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/ListNetworkPoliciesRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/ListNetworkPoliciesRequestTest.java new file mode 100644 index 00000000000..0e8f82caf2e --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/ListNetworkPoliciesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import org.junit.jupiter.api.Test; + +final class ListNetworkPoliciesRequestTest { + + @Test + void valid() { + ListNetworkPoliciesRequest.builder().build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/RemoveNetworkPolicyRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/RemoveNetworkPolicyRequestTest.java new file mode 100644 index 00000000000..127826f0af0 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/networkpolicies/RemoveNetworkPolicyRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.networkpolicies; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RemoveNetworkPolicyRequestTest { + + @Test + void noDestination() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveNetworkPolicyRequest.builder() + .protocol("test-protocol") + .startPort(1234) + .source("test-source") + .build(); + }); + } + + @Test + void noPort() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveNetworkPolicyRequest.builder() + .destination("test-destination") + .protocol("test-protocol") + .source("test-source") + .build(); + }); + } + + @Test + void noProtocol() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveNetworkPolicyRequest.builder() + .destination("test-destination") + .startPort(1234) + .source("test-source") + .build(); + }); + } + + @Test + void noSource() { + assertThrows( + IllegalStateException.class, + () -> { + RemoveNetworkPolicyRequest.builder() + .destination("test-destination") + .protocol("test-protocol") + .startPort(1234) + .build(); + }); + } + + @Test + void valid() { + RemoveNetworkPolicyRequest.builder() + .destination("test-destination") + .protocol("test-protocol") + .startPort(1234) + .source("test-source") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/CreateQuotaRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/CreateQuotaRequestTest.java new file mode 100644 index 00000000000..cbfbcb5dd03 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/CreateQuotaRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateQuotaRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateQuotaRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateQuotaRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/DefaultOrganizationAdminTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/DefaultOrganizationAdminTest.java new file mode 100644 index 00000000000..35bc01d1b6c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/DefaultOrganizationAdminTest.java @@ -0,0 +1,479 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationResponse; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultOrganizationAdminTest extends AbstractOperationsTest { + + private final DefaultOrganizationAdmin organizationAdmin = + new DefaultOrganizationAdmin(Mono.just(this.cloudFoundryClient)); + + @Test + void createQuota() { + requestCreateOrganizationQuota( + this.cloudFoundryClient, 3, 4, "test-quota", true, 1, 2, "test-quota-id"); + + this.organizationAdmin + .createQuota( + CreateQuotaRequest.builder() + .name("test-quota") + .allowPaidServicePlans(true) + .totalRoutes(1) + .totalServices(2) + .instanceMemoryLimit(3) + .memoryLimit(4) + .build()) + .as(StepVerifier::create) + .expectNext( + OrganizationQuota.builder() + .allowPaidServicePlans(true) + .applicationInstanceLimit(-1) + .id("test-quota-id") + .instanceMemoryLimit(3) + .memoryLimit(4) + .name("test-quota") + .totalReservedRoutePorts(0) + .totalRoutes(1) + .totalServices(2) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createQuotaError() { + requestCreateOrganizationQuotaError(this.cloudFoundryClient, "test-quota-error"); + + this.organizationAdmin + .createQuota(CreateQuotaRequest.builder().name("test-quota-error").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-exception-errorCode(999):" + + " test-exception-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void getQuota() { + requestListOrganizationQuotas(this.cloudFoundryClient, "test-quota"); + + this.organizationAdmin + .getQuota(GetQuotaRequest.builder().name("test-quota").build()) + .as(StepVerifier::create) + .expectNext( + OrganizationQuota.builder() + .allowPaidServicePlans(true) + .applicationInstanceLimit(1) + .id("test-quota-id") + .instanceMemoryLimit(1) + .memoryLimit(1) + .name("test-quota-name") + .totalReservedRoutePorts(1) + .totalRoutes(1) + .totalServices(1) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getQuotaNotFound() { + requestListOrganizationQuotasEmpty(this.cloudFoundryClient, "test-quota-not-found"); + + this.organizationAdmin + .getQuota(GetQuotaRequest.builder().name("test-quota-not-found").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Quota test-quota-not-found does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listQuotas() { + requestListOrganizationQuotas(this.cloudFoundryClient); + + this.organizationAdmin + .listQuotas() + .as(StepVerifier::create) + .expectNext( + OrganizationQuota.builder() + .allowPaidServicePlans(true) + .applicationInstanceLimit(1) + .id("test-quota-id") + .instanceMemoryLimit(1) + .memoryLimit(1) + .name("test-quota-name") + .totalReservedRoutePorts(1) + .totalRoutes(1) + .totalServices(1) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setQuota() { + requestListOrganizationQuotas(this.cloudFoundryClient, "test-quota"); + requestListOrganizations(this.cloudFoundryClient, "test-organization"); + requestUpdateOrganization(this.cloudFoundryClient, "test-organization-id", "test-quota-id"); + + this.organizationAdmin + .setQuota( + SetQuotaRequest.builder() + .organizationName("test-organization") + .quotaName("test-quota") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setQuotaOrganizationNotFound() { + requestListOrganizationQuotas(this.cloudFoundryClient, "test-quota"); + requestListOrganizationEmpty(this.cloudFoundryClient, "test-organization-not-found"); + + this.organizationAdmin + .setQuota( + SetQuotaRequest.builder() + .organizationName("test-organization-not-found") + .quotaName("test-quota") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Organization test-organization-not-found does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void setQuotaQuotaNotFound() { + requestListOrganizationQuotasEmpty(this.cloudFoundryClient, "test-quota-not-found"); + requestListOrganizations(this.cloudFoundryClient, "test-organization"); + + this.organizationAdmin + .setQuota( + SetQuotaRequest.builder() + .organizationName("test-organization") + .quotaName("test-quota-not-found") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Quota test-quota-not-found does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateQuota() { + requestListOrganizationQuotas(this.cloudFoundryClient, "test-quota"); + requestUpdateOrganizationQuota( + this.cloudFoundryClient, "test-quota-id", 3, 4, "new-test-quota", true, 1, 2); + + this.organizationAdmin + .updateQuota( + UpdateQuotaRequest.builder() + .name("test-quota") + .allowPaidServicePlans(true) + .newName("new-test-quota") + .totalRoutes(1) + .totalServices(2) + .instanceMemoryLimit(3) + .memoryLimit(4) + .build()) + .as(StepVerifier::create) + .expectNext( + OrganizationQuota.builder() + .allowPaidServicePlans(true) + .applicationInstanceLimit(-1) + .id("test-quota-id") + .instanceMemoryLimit(3) + .memoryLimit(4) + .name("new-test-quota") + .totalReservedRoutePorts(0) + .totalRoutes(1) + .totalServices(2) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateQuotaNotFound() { + requestListOrganizationQuotasEmpty(this.cloudFoundryClient, "test-quota-not-found"); + + this.organizationAdmin + .updateQuota( + UpdateQuotaRequest.builder() + .name("test-quota-not-found") + .newName("new-test-quota") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Quota test-quota-not-found does not exist")) + .verify(Duration.ofSeconds(5)); + } + + private static void requestCreateOrganizationQuota( + CloudFoundryClient cloudFoundryClient, + Integer instanceMemoryLimit, + Integer memoryLimit, + String name, + Boolean nonBasicServicesAllowed, + Integer totalRoutes, + Integer totalServices, + String quotaDefinitionId) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(-1) + .instanceMemoryLimit(instanceMemoryLimit) + .memoryLimit(memoryLimit) + .nonBasicServicesAllowed(nonBasicServicesAllowed) + .totalReservedRoutePorts(0) + .totalRoutes(totalRoutes) + .totalServices(totalServices) + .name(name) + .build())) + .thenReturn( + Mono.just( + CreateOrganizationQuotaDefinitionResponse.builder() + .metadata( + fill(Metadata.builder()) + .id(quotaDefinitionId) + .build()) + .entity( + OrganizationQuotaDefinitionEntity.builder() + .totalServices(totalServices) + .memoryLimit(memoryLimit) + .instanceMemoryLimit(instanceMemoryLimit) + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .name("test-quota") + .nonBasicServicesAllowed( + nonBasicServicesAllowed) + .totalReservedRoutePorts(0) + .totalPrivateDomains(-1) + .totalRoutes(totalRoutes) + .build()) + .build())); + } + + private static void requestCreateOrganizationQuotaError( + CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(-1) + .instanceMemoryLimit(-1) + .memoryLimit(0) + .nonBasicServicesAllowed(false) + .totalReservedRoutePorts(0) + .totalRoutes(0) + .totalServices(0) + .name(name) + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + null, + 999, + "test-exception-description", + "test-exception-errorCode"))); + } + + private static void requestListOrganizationEmpty( + CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .organizations() + .list(ListOrganizationsRequest.builder().name(name).page(1).build())) + .thenReturn(Mono.just(fill(ListOrganizationsResponse.builder()).build())); + } + + private static void requestListOrganizationQuotas(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .list(ListOrganizationQuotaDefinitionsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListOrganizationQuotaDefinitionsResponse.builder()) + .resource( + fill( + OrganizationQuotaDefinitionResource + .builder(), + "quota-") + .build()) + .build())); + } + + private static void requestListOrganizationQuotas( + CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .name(name) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationQuotaDefinitionsResponse.builder()) + .resource( + fill( + OrganizationQuotaDefinitionResource + .builder(), + "quota-") + .build()) + .build())); + } + + private static void requestListOrganizationQuotasEmpty( + CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .name(name) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationQuotaDefinitionsResponse.builder()).build())); + } + + private static void requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .organizations() + .list(ListOrganizationsRequest.builder().name(name).page(1).build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .build()) + .build())); + } + + private static void requestUpdateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String quotaId) { + when(cloudFoundryClient + .organizations() + .update( + UpdateOrganizationRequest.builder() + .organizationId(organizationId) + .quotaDefinitionId(quotaId) + .build())) + .thenReturn( + Mono.just( + fill(UpdateOrganizationResponse.builder(), "organization-") + .build())); + } + + private static void requestUpdateOrganizationQuota( + CloudFoundryClient cloudFoundryClient, + String organizationQuotaDefinitionId, + Integer instanceMemoryLimit, + Integer memoryLimit, + String name, + Boolean nonBasicServicesAllowed, + Integer totalRoutes, + Integer totalServices) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .update( + UpdateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(-1) + .instanceMemoryLimit(instanceMemoryLimit) + .memoryLimit(memoryLimit) + .name(name) + .nonBasicServicesAllowed(nonBasicServicesAllowed) + .organizationQuotaDefinitionId( + organizationQuotaDefinitionId) + .totalReservedRoutePorts(0) + .totalRoutes(totalRoutes) + .totalServices(totalServices) + .build())) + .thenReturn( + Mono.just( + UpdateOrganizationQuotaDefinitionResponse.builder() + .metadata( + fill(Metadata.builder()) + .id(organizationQuotaDefinitionId) + .build()) + .entity( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .instanceMemoryLimit(instanceMemoryLimit) + .memoryLimit(memoryLimit) + .name(name) + .nonBasicServicesAllowed( + nonBasicServicesAllowed) + .totalReservedRoutePorts(0) + .totalPrivateDomains(-1) + .totalRoutes(totalRoutes) + .totalServices(totalServices) + .build()) + .build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/DeleteQuotaRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/DeleteQuotaRequestTest.java new file mode 100644 index 00000000000..7dc0c4c158a --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/DeleteQuotaRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteQuotaRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteQuotaRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteQuotaRequest.builder().name("test-quota").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/GetQuotaRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/GetQuotaRequestTest.java new file mode 100644 index 00000000000..c378096ba77 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/GetQuotaRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetQuotaRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetQuotaRequest.builder().build(); + }); + } + + @Test + void valid() { + GetQuotaRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/SetQuotaRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/SetQuotaRequestTest.java new file mode 100644 index 00000000000..edfe700bd58 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/SetQuotaRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetQuotaRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + SetQuotaRequest.builder().quotaName("test-quota").build(); + }); + } + + @Test + void noQuotaName() { + assertThrows( + IllegalStateException.class, + () -> { + SetQuotaRequest.builder().organizationName("test-organization").build(); + }); + } + + @Test + void valid() { + SetQuotaRequest.builder() + .organizationName("test-organization") + .quotaName("test-quota") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/UpdateQuotaRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/UpdateQuotaRequestTest.java new file mode 100644 index 00000000000..2b97c8778dd --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizationadmin/UpdateQuotaRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizationadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateQuotaRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateQuotaRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateQuotaRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/CreateOrganizationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/CreateOrganizationRequestTest.java new file mode 100644 index 00000000000..0bf6e1febec --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/CreateOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateOrganizationRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateOrganizationRequest.builder().organizationName("test-organization").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/DefaultOrganizationsTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/DefaultOrganizationsTest.java new file mode 100644 index 00000000000..5cf74e14a14 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/DefaultOrganizationsTest.java @@ -0,0 +1,563 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.Queue; +import java.util.function.Supplier; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagResponse; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionResource; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainEntity; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainEntity; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.cloudfoundry.operations.spaceadmin.SpaceQuota; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DefaultOrganizationsTest extends AbstractOperationsTest { + + private final DefaultOrganizations organizations = + new DefaultOrganizations(Mono.just(this.cloudFoundryClient), Mono.just(TEST_USERNAME)); + + @Test + void create() { + requestCreateOrganization(this.cloudFoundryClient, TEST_ORGANIZATION_NAME, null); + requestGetFeatureFlagEnabled(this.cloudFoundryClient, "set_roles_by_username"); + requestAssociateOrganizationManagerByUsername(this.cloudFoundryClient, TEST_USERNAME); + requestAssociateOrganizationUserByUsername(this.cloudFoundryClient, TEST_USERNAME); + + this.organizations + .create( + CreateOrganizationRequest.builder() + .organizationName(TEST_ORGANIZATION_NAME) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createSetRolesByUsernameDisabled() { + requestCreateOrganization(this.cloudFoundryClient, TEST_ORGANIZATION_NAME, null); + requestGetFeatureFlagDisabled(this.cloudFoundryClient, "set_roles_by_username"); + + this.organizations + .create( + CreateOrganizationRequest.builder() + .organizationName(TEST_ORGANIZATION_NAME) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createWithQuota() { + requestOrganizationQuotaDefinitions(this.cloudFoundryClient, "test-quota-definition-name"); + + requestCreateOrganization(this.cloudFoundryClient, TEST_ORGANIZATION_NAME, null); + requestCreateOrganization( + this.cloudFoundryClient, + TEST_ORGANIZATION_NAME, + "test-organization-quota-definition-id"); + requestGetFeatureFlagEnabled(this.cloudFoundryClient, "set_roles_by_username"); + requestAssociateOrganizationManagerByUsername(this.cloudFoundryClient, TEST_USERNAME); + requestAssociateOrganizationUserByUsername(this.cloudFoundryClient, TEST_USERNAME); + + this.organizations + .create( + CreateOrganizationRequest.builder() + .organizationName(TEST_ORGANIZATION_NAME) + .quotaDefinitionName("test-quota-definition-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + requestOrganizations(this.cloudFoundryClient, TEST_ORGANIZATION_NAME); + requestDeleteOrganization(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestJobSuccess(this.cloudFoundryClient, "test-id"); + + StepVerifier.withVirtualTime( + () -> + this.organizations.delete( + DeleteOrganizationRequest.builder() + .name(TEST_ORGANIZATION_NAME) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteFailure() { + requestOrganizations(this.cloudFoundryClient, TEST_ORGANIZATION_NAME); + requestDeleteOrganization(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestJobFailure(this.cloudFoundryClient, "test-id"); + + StepVerifier.withVirtualTime( + () -> + this.organizations.delete( + DeleteOrganizationRequest.builder() + .name(TEST_ORGANIZATION_NAME) + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-error-details-errorCode(1):" + + " test-error-details-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void info() { + requestOrganizations(this.cloudFoundryClient, TEST_ORGANIZATION_NAME); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomains(this.cloudFoundryClient); + requestOrganizationQuotaDefinition( + this.cloudFoundryClient, "test-organization-entity-quotaDefinitionId"); + requestSpaceQuotaDefinitions(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + + this.organizations + .get(OrganizationInfoRequest.builder().name(TEST_ORGANIZATION_NAME).build()) + .as(StepVerifier::create) + .expectNext( + fill(OrganizationDetail.builder()) + .domains("test-private-domain-name", "test-shared-domain-name") + .id(TEST_ORGANIZATION_ID) + .name(TEST_ORGANIZATION_NAME) + .quota( + fill(OrganizationQuota.builder()) + .organizationId(TEST_ORGANIZATION_ID) + .build()) + .space("test-name") + .spaceQuota(fill(SpaceQuota.builder()).build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + requestOrganizations(this.cloudFoundryClient); + + this.organizations + .list() + .as(StepVerifier::create) + .expectNext(fill(OrganizationSummary.builder(), "organization-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void rename() { + requestOrganizations(this.cloudFoundryClient, TEST_ORGANIZATION_NAME); + requestUpdateOrganization( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-new-organization-name"); + + this.organizations + .rename( + RenameOrganizationRequest.builder() + .name(TEST_ORGANIZATION_NAME) + .newName("test-new-organization-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestAssociateOrganizationManagerByUsername( + CloudFoundryClient cloudFoundryClient, String username) { + when(cloudFoundryClient + .organizations() + .associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest.builder() + .organizationId("test-id") + .username(username) + .build())) + .thenReturn( + Mono.just( + fill(AssociateOrganizationManagerByUsernameResponse.builder()) + .build())); + } + + private static void requestAssociateOrganizationUserByUsername( + CloudFoundryClient cloudFoundryClient, String username) { + when(cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId("test-id") + .username(username) + .build())) + .thenReturn( + Mono.just( + fill(AssociateOrganizationUserByUsernameResponse.builder()) + .build())); + } + + private static void requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, + String organization, + String organizationQuotaDefinitionId) { + when(cloudFoundryClient + .organizations() + .create( + org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest + .builder() + .name(organization) + .quotaDefinitionId(organizationQuotaDefinitionId) + .build())) + .thenReturn(Mono.just(fill(CreateOrganizationResponse.builder()).build())); + } + + private static void requestDeleteOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .delete( + org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest + .builder() + .organizationId(organizationId) + .async(true) + .build())) + .thenReturn(Mono.just(fill(DeleteOrganizationResponse.builder()).build())); + } + + private static void requestGetFeatureFlagDisabled( + CloudFoundryClient cloudFoundryClient, String featureFlag) { + when(cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(featureFlag).build())) + .thenReturn(Mono.just(GetFeatureFlagResponse.builder().enabled(false).build())); + } + + private static void requestGetFeatureFlagEnabled( + CloudFoundryClient cloudFoundryClient, String featureFlag) { + when(cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(featureFlag).build())) + .thenReturn(Mono.just(GetFeatureFlagResponse.builder().enabled(true).build())); + } + + private static void requestJobFailure(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + GetJobResponse.builder() + .metadata( + fill(Metadata.builder()) + .build()) + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + GetJobResponse.builder() + .metadata( + fill(Metadata.builder()) + .build()) + .entity( + fill(JobEntity + .builder()) + .errorDetails( + fill( + ErrorDetails + .builder(), + "error-details-") + .build()) + .status( + "failed") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestJobSuccess(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + GetJobResponse.builder() + .metadata( + fill(Metadata.builder()) + .build()) + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + GetJobResponse.builder() + .metadata( + fill(Metadata.builder()) + .build()) + .entity( + fill(JobEntity + .builder()) + .status( + "finished") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestOrganizationQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String quotaDefinitionId) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .get( + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId(quotaDefinitionId) + .build())) + .thenReturn( + Mono.just( + fill(GetOrganizationQuotaDefinitionResponse.builder()) + .entity( + fill(OrganizationQuotaDefinitionEntity.builder()) + .build()) + .build())); + } + + private static void requestOrganizationQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, String organizationQuotaDefinition) { + when(cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .name(organizationQuotaDefinition) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationQuotaDefinitionsResponse.builder()) + .resource( + fill( + OrganizationQuotaDefinitionResource + .builder(), + "organization-quota-definition-") + .entity( + fill( + OrganizationQuotaDefinitionEntity + .builder(), + "organization-quota-definition-entity-") + .build()) + .build()) + .build())); + } + + private static void requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .entity( + fill( + OrganizationEntity + .builder(), + "organization-entity-") + .build()) + .build()) + .build())); + } + + private static void requestOrganizations(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .list(ListOrganizationsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .build()) + .build())); + } + + private static void requestPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationPrivateDomainsResponse.builder()) + .resource( + fill(PrivateDomainResource.builder()) + .entity( + fill(PrivateDomainEntity.builder()) + .name( + "test-private-domain-name") + .build()) + .build()) + .build())); + } + + private static void requestSharedDomains(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + ListSharedDomainsResponse.builder() + .resource( + fill(SharedDomainResource.builder()) + .entity( + fill(SharedDomainEntity.builder()) + .name( + "test-shared-domain-name") + .build()) + .build()) + .build())); + } + + private static void requestSpaceQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpaceQuotaDefinitionsResponse.builder()) + .resource( + fill(SpaceQuotaDefinitionResource.builder()) + .build()) + .build())); + } + + private static void requestSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource(fill(SpaceResource.builder()).build()) + .build())); + } + + private static void requestUpdateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String newName) { + when(cloudFoundryClient + .organizations() + .update( + UpdateOrganizationRequest.builder() + .name(newName) + .organizationId(organizationId) + .build())) + .thenReturn(Mono.empty()); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/DeleteOrganizationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/DeleteOrganizationRequestTest.java new file mode 100644 index 00000000000..ca34ec83f56 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/DeleteOrganizationRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteOrganizationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteOrganizationRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteOrganizationRequest.builder().name("test-organization-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/OrganizationSummaryDetailRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/OrganizationSummaryDetailRequestTest.java new file mode 100644 index 00000000000..98016108f55 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/OrganizationSummaryDetailRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class OrganizationSummaryDetailRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + OrganizationInfoRequest.builder().build(); + }); + } + + @Test + void valid() { + OrganizationInfoRequest.builder().name("test-organization-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/RenameOrganizationRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/RenameOrganizationRequestTest.java new file mode 100644 index 00000000000..9b324f2bc3b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/organizations/RenameOrganizationRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.organizations; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RenameOrganizationRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameOrganizationRequest.builder().newName("new-name").build(); + }); + } + + @Test + void valid() { + RenameOrganizationRequest.builder().name("test-name").newName("test-new-name").build(); + } + + @Test + void validNoNewName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameOrganizationRequest.builder().name("name").build(); + }); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/CheckRouteRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/CheckRouteRequestTest.java new file mode 100644 index 00000000000..7d5b9662409 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/CheckRouteRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CheckRouteRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + CheckRouteRequest.builder().build(); + }); + } + + @Test + void valid() { + CheckRouteRequest.builder().domain("test-domain").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/CreateRouteRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/CreateRouteRequestTest.java new file mode 100644 index 00000000000..eb8ae2cf699 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/CreateRouteRequestTest.java @@ -0,0 +1,78 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateRouteRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder().space("test-space").build(); + }); + } + + @Test + void noSpace() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder() + .domain("test-domain") + .host("test-hostname") + .build(); + }); + } + + @Test + void portConflict() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder() + .domain("test-domain") + .port(123) + .randomPort(true) + .space("test-space") + .build(); + }); + } + + @Test + void setupConflict() { + assertThrows( + IllegalStateException.class, + () -> { + CreateRouteRequest.builder() + .domain("test-domain") + .host("test-hostname") + .port(123) + .space("test-space") + .build(); + }); + } + + @Test + void valid() { + CreateRouteRequest.builder().domain("test-domain").space("test-space").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DefaultRoutesTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DefaultRoutesTest.java new file mode 100644 index 00000000000..fdd46f2effc --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DefaultRoutesTest.java @@ -0,0 +1,1441 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import java.util.Collections; +import java.util.Optional; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsRequest; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsResponse; +import org.cloudfoundry.client.v2.routes.ListRoutesResponse; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.ToManyRelationship; +import org.cloudfoundry.client.v3.ToOneRelationship; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesRequest; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.jobs.GetJobRequest; +import org.cloudfoundry.client.v3.jobs.GetJobResponse; +import org.cloudfoundry.client.v3.jobs.JobState; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsResponse; +import org.cloudfoundry.client.v3.spaces.DeleteUnmappedRoutesRequest; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultRoutesTest extends AbstractOperationsTest { + + private final DefaultRoutes routes = + new DefaultRoutes( + Mono.just(this.cloudFoundryClient), + Mono.just(TEST_ORGANIZATION_ID), + Mono.just(TEST_SPACE_ID)); + private static final String TEST_DOMAIN_ID = "3a5d3d89-3f89-4f05-8188-8a2b298c79d5"; + private static final String TEST_DOMAIN_NAME = "domain-name"; + private static final String TEST_PATH = "test-path"; + private static final String TEST_HOST = "192.168.0,.1"; + + private static final String TEST_JOB_ID = "test-job-id"; + + @Test + void checkRoute() { + mockListDomains(this.cloudFoundryClient); + mockCheckReservedRoutes(this.cloudFoundryClient); + + this.routes + .check( + CheckRouteRequest.builder() + .host(TEST_HOST) + .path(TEST_PATH) + .domain(TEST_DOMAIN_NAME) + .build()) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void mockCheckReservedRoutes(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .domainsV3() + .checkReservedRoutes( + CheckReservedRoutesRequest.builder() + .domainId(TEST_DOMAIN_ID) + .host(TEST_HOST) + .path(TEST_PATH) + .build())) + .thenReturn( + Mono.just( + CheckReservedRoutesResponse.builder().matchingRoute(true).build())); + } + + private static void mockListDomains(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest.builder() + .name(TEST_DOMAIN_NAME) + .page(1) + .organizationId(TEST_ORGANIZATION_ID) + .build())) + .thenReturn( + Mono.just( + ListOrganizationDomainsResponse.builder() + .pagination( + Pagination.builder() + .totalResults(1) + .totalPages(1) + .build()) + .resource( + DomainResource.builder() + .id(TEST_DOMAIN_ID) + .createdAt("2019-03-08T01:06:19Z") + .updatedAt("2019-03-08T01:06:19Z") + .name(TEST_DOMAIN_NAME) + .isInternal(false) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + TEST_ORGANIZATION_ID) + .build()) + .build()) + .sharedOrganizations( + ToManyRelationship + .builder() + .build()) + .build()) + .build()) + .build())); + } + + @Test + void createRouteAssignedPort() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(this.cloudFoundryClient, "test-domain"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-metadata-id", + null, + null, + null, + 9999, + "test-space-id"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .port(9999) + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .expectNext(1) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createRouteInvalidDomain() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomainsEmpty(this.cloudFoundryClient, "test-domain"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .host("test-host") + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain test-domain does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createRouteInvalidSpace() { + requestSpacesEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .host("test-host") + .path("test-path") + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-space-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createRouteNoHost() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + null, + null, + "test-path", + null, + "test-space-id"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .path("test-path") + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .expectNext(1) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createRouteNoPath() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + null, + null, + null, + "test-space-id"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .host("test-host") + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .expectNext(1) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createRoutePrivateDomain() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + null, + "test-path", + null, + "test-space-id"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .host("test-host") + .path("test-path") + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .expectNext(1) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createRouteRandomPort() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(this.cloudFoundryClient, "test-domain"); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-metadata-id", + null, + true, + null, + null, + "test-space-id"); + + this.routes + .create( + CreateRouteRequest.builder() + .domain("test-domain") + .randomPort(true) + .space(TEST_SPACE_NAME) + .build()) + .as(StepVerifier::create) + .expectNext(1) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteOrphanedRoutes() { + mockDeleteOrphanedRoutes(this.cloudFoundryClient); + + this.routes + .deleteOrphanedRoutes(DeleteOrphanedRoutesRequest.builder().build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void mockDeleteOrphanedRoutes(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spacesV3() + .deleteUnmappedRoutes( + DeleteUnmappedRoutesRequest.builder() + .spaceId(TEST_SPACE_ID) + .build())) + .thenReturn(Mono.just(TEST_JOB_ID)); + when(cloudFoundryClient.jobsV3().get(GetJobRequest.builder().jobId(TEST_JOB_ID).build())) + .thenReturn( + Mono.just(fill(GetJobResponse.builder()).state(JobState.COMPLETE).build())); + } + + @Test + void deleteRoute() { + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutes( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path", + null); + mockDeleteRequest(this.cloudFoundryClient, "test-route-id"); + + this.routes + .delete( + DeleteRouteRequest.builder() + .host("test-host") + .path("test-path") + .domain("test-domain") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void mockDeleteRequest(CloudFoundryClient cloudFoundryClient, String routeId) { + when(cloudFoundryClient + .routesV3() + .delete( + org.cloudfoundry.client.v3.routes.DeleteRouteRequest.builder() + .routeId(routeId) + .build())) + .thenReturn(Mono.just("test-delete-job")); + when(cloudFoundryClient + .jobsV3() + .get( + org.cloudfoundry.client.v3.jobs.GetJobRequest.builder() + .jobId("test-delete-job") + .build())) + .thenReturn( + Mono.just( + fill(org.cloudfoundry.client.v3.jobs.GetJobResponse.builder()) + .state(org.cloudfoundry.client.v3.jobs.JobState.COMPLETE) + .build())); + } + + @Test + void listCurrentOrganizationNoSpace() { + requestOrganizationsRoutes(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestPrivateDomainsAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomainsAll(this.cloudFoundryClient); + requestSpacesAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSpaceServiceInstances( + this.cloudFoundryClient, + "test-route-entity-serviceInstanceId", + "test-route-entity-spaceId"); + requestApplications(this.cloudFoundryClient, "test-id"); + + this.routes + .list(ListRoutesRequest.builder().level(Level.ORGANIZATION).build()) + .as(StepVerifier::create) + .expectNext( + Route.builder() + .application("test-application-name") + .domain("test-shared-domain-name") + .host("test-route-entity-host") + .id("test-id") + .path("test-route-entity-path") + .service("test-service-instance-entityname") + .space("test-space-entity-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listCurrentOrganizationNoSpaceNoRoutes() { + requestOrganizationsRoutesEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestPrivateDomainsAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomainsAll(this.cloudFoundryClient); + requestSpacesAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestApplications(this.cloudFoundryClient, "test-id"); + + this.routes + .list(ListRoutesRequest.builder().level(Level.ORGANIZATION).build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listCurrentSpace() { + requestSpaceRoutes(this.cloudFoundryClient, TEST_SPACE_ID); + requestPrivateDomainsAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomainsAll(this.cloudFoundryClient); + requestSpacesAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestApplications(this.cloudFoundryClient, "test-route-id"); + + this.routes + .list(ListRoutesRequest.builder().level(Level.SPACE).build()) + .as(StepVerifier::create) + .expectNext( + Route.builder() + .application("test-application-name") + .domain("test-shared-domain-name") + .host("test-route-entity-host") + .id("test-route-id") + .path("test-route-entity-path") + .space("test-space-entity-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listCurrentSpaceNoPath() { + requestSpaceRoutesNoPath(this.cloudFoundryClient, TEST_SPACE_ID); + requestPrivateDomainsAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestSharedDomainsAll(this.cloudFoundryClient); + requestSpacesAll(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + requestApplications(this.cloudFoundryClient, "test-route-id"); + + this.routes + .list(ListRoutesRequest.builder().level(Level.SPACE).build()) + .as(StepVerifier::create) + .expectNext( + Route.builder() + .application("test-application-name") + .domain("test-shared-domain-name") + .host("test-route-entity-host") + .id("test-route-id") + .space("test-space-entity-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRouteAssignedPort() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(this.cloudFoundryClient, "test-domain"); + requestRoutesEmpty( + this.cloudFoundryClient, "test-shared-domain-metadata-id", null, null, 9999); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-metadata-id", + null, + null, + null, + 9999, + TEST_SPACE_ID); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .port(9999) + .build()) + .as(StepVerifier::create) + .expectNext(9999) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRouteExists() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutes( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path", + null); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRouteInvalidApplicationName() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutesEmpty( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path", + null); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + null, + "test-path", + null, + "test-space-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRouteInvalidDomain() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomainsEmpty(this.cloudFoundryClient, "test-domain"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain test-domain does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRouteNoHost() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutesEmpty( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + null, + "test-path", + null); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + null, + null, + "test-path", + null, + TEST_SPACE_ID); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRoutePath() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutesTwo( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path"); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRoutePrivateDomain() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutesEmpty( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path", + null); + requestCreateRoute( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + null, + "test-path", + null, + TEST_SPACE_ID); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void mapRouteSharedDomain() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(this.cloudFoundryClient, "test-domain"); + requestRoutesEmpty( + this.cloudFoundryClient, + "test-shared-domain-metadata-id", + "test-host", + "test-path", + null); + requestCreateRoute( + this.cloudFoundryClient, + "test-shared-domain-metadata-id", + "test-host", + null, + "test-path", + null, + TEST_SPACE_ID); + requestAssociateRoute(this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .map( + MapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapRouteAssignedPort() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(this.cloudFoundryClient, "test-domain"); + requestRoutes(this.cloudFoundryClient, "test-shared-domain-metadata-id", null, null, 9999); + requestRemoveRouteFromApplication( + this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .unmap( + UnmapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .port(9999) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapRouteInvalidApplicationName() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + + this.routes + .unmap( + UnmapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapRouteInvalidDomain() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomainsEmpty(this.cloudFoundryClient, "test-domain"); + + this.routes + .unmap( + UnmapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain test-domain does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapRouteInvalidRoute() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutesEmpty( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path", + null); + + this.routes + .unmap( + UnmapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Route for test-domain does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapRoutePrivateDomain() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(cloudFoundryClient, "test-domain"); + requestRoutes( + this.cloudFoundryClient, + "test-private-domain-metadata-id", + "test-host", + "test-path", + null); + requestRemoveRouteFromApplication( + this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .unmap( + UnmapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unmapRouteSharedDomain() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestPrivateDomainsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-domain"); + requestSharedDomains(this.cloudFoundryClient, "test-domain"); + requestRoutes( + this.cloudFoundryClient, + "test-shared-domain-metadata-id", + "test-host", + "test-path", + null); + requestRemoveRouteFromApplication( + this.cloudFoundryClient, "test-application-id", "test-route-id"); + + this.routes + .unmap( + UnmapRouteRequest.builder() + .applicationName("test-application-name") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestApplications(CloudFoundryClient cloudFoundryClient, String routeId) { + when(cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest.builder() + .page(1) + .routeId(routeId) + .build())) + .thenReturn( + Mono.just( + fill(ListRouteApplicationsResponse.builder()) + .resource( + fill(ApplicationResource.builder(), "application-") + .build()) + .build())); + } + + private static void requestApplications( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceApplicationsResponse.builder()) + .resource( + fill(ApplicationResource.builder(), "application-") + .build()) + .build())); + } + + private static void requestApplicationsEmpty( + CloudFoundryClient cloudFoundryClient, String routeId) { + when(cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest.builder() + .page(1) + .routeId(routeId) + .build())) + .thenReturn(Mono.just(fill(ListRouteApplicationsResponse.builder()).build())); + } + + private static void requestApplicationsEmpty( + CloudFoundryClient cloudFoundryClient, String application, String spaceId) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(application) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.just(fill(ListSpaceApplicationsResponse.builder()).build())); + } + + private static void requestAssociateRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + when(cloudFoundryClient + .applicationsV2() + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build())) + .thenReturn(Mono.just(fill(AssociateApplicationRouteResponse.builder()).build())); + } + + private static void requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + Boolean randomPort, + String path, + Integer port, + String spaceId) { + when(cloudFoundryClient + .routes() + .create( + org.cloudfoundry.client.v2.routes.CreateRouteRequest.builder() + .domainId(domainId) + .generatePort(randomPort) + .host(host) + .path(path) + .port(port) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.just(fill(CreateRouteResponse.builder(), "route-").build())); + } + + private static void requestOrganizationsRoutes( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .routes() + .list( + org.cloudfoundry.client.v2.routes.ListRoutesRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListRoutesResponse.builder()) + .resource( + fill(RouteResource.builder()) + .entity( + fill( + RouteEntity + .builder(), + "route-entity-") + .domainId("test-domain-id") + .build()) + .build()) + .build())); + } + + private static void requestOrganizationsRoutesEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .routes() + .list( + org.cloudfoundry.client.v2.routes.ListRoutesRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListRoutesResponse.builder()).build())); + } + + private static void requestPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .name(domain) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationPrivateDomainsResponse.builder()) + .resource( + fill( + PrivateDomainResource.builder(), + "private-domain-") + .metadata( + fill( + Metadata.builder(), + "private-domain-metadata-") + .build()) + .build()) + .build())); + } + + private static void requestPrivateDomainsAll( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationPrivateDomainsResponse.builder()) + .resource( + fill( + PrivateDomainResource.builder(), + "private-domain-") + .metadata( + fill( + Metadata.builder(), + "private-domain-metadata-") + .build()) + .build()) + .build())); + } + + private static void requestPrivateDomainsEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId, String domain) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .name(domain) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just(fill(ListOrganizationPrivateDomainsResponse.builder()).build())); + } + + private static void requestRemoveRouteFromApplication( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + when(cloudFoundryClient + .applicationsV2() + .removeRoute( + RemoveApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestRoutes( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port) { + when(cloudFoundryClient + .routes() + .list( + org.cloudfoundry.client.v2.routes.ListRoutesRequest.builder() + .domainId(domainId) + .hosts( + Optional.ofNullable(host) + .map(Collections::singletonList) + .orElse(null)) + .page(1) + .paths( + Optional.ofNullable(path) + .map(Collections::singletonList) + .orElse(null)) + .port(Optional.ofNullable(port).orElse(null)) + .build())) + .thenReturn( + Mono.just( + fill(ListRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + RouteEntity.builder() + .host(host) + .path( + path == null + ? "" + : path) + .port(port) + .build()) + .build()) + .build())); + } + + private static void requestRoutesEmpty( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port) { + when(cloudFoundryClient + .routes() + .list( + org.cloudfoundry.client.v2.routes.ListRoutesRequest.builder() + .domainId(domainId) + .hosts( + Optional.ofNullable(host) + .map(Collections::singletonList) + .orElse(null)) + .organizationId(null) + .page(1) + .paths( + Optional.ofNullable(path) + .map(Collections::singletonList) + .orElse(null)) + .port(Optional.ofNullable(port).orElse(null)) + .build())) + .thenReturn(Mono.just(fill(ListRoutesResponse.builder()).build())); + } + + private static void requestRoutesTwo( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String path) { + when(cloudFoundryClient + .routes() + .list( + org.cloudfoundry.client.v2.routes.ListRoutesRequest.builder() + .domainId(domainId) + .hosts( + Optional.ofNullable(host) + .map(Collections::singletonList) + .orElse(null)) + .page(1) + .paths( + Optional.ofNullable(path) + .map(Collections::singletonList) + .orElse(null)) + .build())) + .thenReturn( + Mono.just( + fill(ListRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + RouteEntity.builder() + .host(null) + .path(null) + .build()) + .build()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + RouteEntity.builder() + .host(host) + .path( + path == null + ? "" + : path) + .build()) + .build()) + .build())); + } + + private static void requestSharedDomains(CloudFoundryClient cloudFoundryClient, String domain) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().name(domain).page(1).build())) + .thenReturn( + Mono.just( + fill(ListSharedDomainsResponse.builder()) + .resource( + fill( + SharedDomainResource.builder(), + "shared-domain-") + .metadata( + fill( + Metadata.builder(), + "shared-domain-metadata-") + .build()) + .build()) + .build())); + } + + private static void requestSharedDomainsAll(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListSharedDomainsResponse.builder()) + .resource( + fill( + SharedDomainResource.builder(), + "shared-domain-") + .metadata( + fill( + Metadata.builder(), + "shared-domain-metadata-") + .id("test-domain-id") + .build()) + .build()) + .build())); + } + + private static void requestSharedDomainsEmpty( + CloudFoundryClient cloudFoundryClient, String domain) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().name(domain).page(1).build())) + .thenReturn(Mono.just(fill(ListSharedDomainsResponse.builder()).build())); + } + + private static void requestSpaceRoutes(CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listRoutes( + ListSpaceRoutesRequest.builder().page(1).spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(ListSpaceRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + fill( + RouteEntity + .builder(), + "route-entity-") + .domainId("test-domain-id") + .serviceInstanceId(null) + .build()) + .build()) + .build())); + } + + private static void requestSpaceRoutesEmpty( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listRoutes( + ListSpaceRoutesRequest.builder().page(1).spaceId(spaceId).build())) + .thenReturn(Mono.just(fill(ListSpaceRoutesResponse.builder()).build())); + } + + private static void requestSpaceRoutesNoPath( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listRoutes( + ListSpaceRoutesRequest.builder().page(1).spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(ListSpaceRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + fill( + RouteEntity + .builder(), + "route-entity-") + .domainId("test-domain-id") + .path(null) + .serviceInstanceId(null) + .build()) + .build()) + .build())); + } + + private static void requestSpaceRoutesService( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listRoutes( + ListSpaceRoutesRequest.builder().page(1).spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(ListSpaceRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + fill( + RouteEntity + .builder(), + "route-entity-") + .domainId("test-domain-id") + .serviceInstanceId( + "test-service-instance-id") + .build()) + .build()) + .build())); + } + + private static void requestSpaceServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String spaceId) { + when(cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .page(1) + .returnUserProvidedServiceInstances(true) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServiceInstancesResponse.builder()) + .resource( + fill( + UnionServiceInstanceResource + .builder(), + "service-instance-") + .metadata( + fill( + Metadata.builder(), + "service-instance-metadata-") + .id(serviceInstanceId) + .build()) + .entity( + fill( + UnionServiceInstanceEntity + .builder(), + "service-instance-entity") + .spaceId(spaceId) + .build()) + .build()) + .build())); + } + + private static void requestSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource(fill(SpaceResource.builder(), "space-").build()) + .build())); + } + + private static void requestSpacesAll( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource( + SpaceResource.builder() + .metadata( + fill( + Metadata.builder(), + "space-resource-") + .id( + "test-route-entity-spaceId") + .build()) + .entity( + fill( + SpaceEntity + .builder(), + "space-entity-") + .name( + "test-space-entity-name") + .organizationId( + organizationId) + .build()) + .build()) + .build())); + } + + private static void requestSpacesEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationSpacesResponse.builder()).build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DeleteOrphanedRoutesRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DeleteOrphanedRoutesRequestTest.java new file mode 100644 index 00000000000..eb4e0d6c197 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DeleteOrphanedRoutesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.junit.jupiter.api.Test; + +final class DeleteOrphanedRoutesRequestTest { + + @Test + void valid() { + DeleteOrphanedRoutesRequest.builder().build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DeleteRouteRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DeleteRouteRequestTest.java new file mode 100644 index 00000000000..56b916dd241 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/DeleteRouteRequestTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteRouteRequestTest { + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteRouteRequest.builder().build(); + }); + } + + @Test + void setupConflict() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteRouteRequest.builder() + .domain("test-domain") + .host("test-hostname") + .port(123) + .build(); + }); + } + + @Test + void valid() { + DeleteRouteRequest.builder().domain("test-domain").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/ListRoutesRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/ListRoutesRequestTest.java new file mode 100644 index 00000000000..9f6c2bbdb89 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/ListRoutesRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import org.junit.jupiter.api.Test; + +final class ListRoutesRequestTest { + + @Test + void valid() { + ListRoutesRequest.builder().build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/MapRouteRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/MapRouteRequestTest.java new file mode 100644 index 00000000000..412693e81eb --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/MapRouteRequestTest.java @@ -0,0 +1,94 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class MapRouteRequestTest { + + @Test + void noApplicationName() { + assertThrows( + IllegalStateException.class, + () -> { + MapRouteRequest.builder() + .domain("test-domain") + .host("test-host") + .path("test-path") + .build(); + }); + } + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + MapRouteRequest.builder() + .applicationName("test-applicationName") + .host("test-host") + .path("test-path") + .build(); + }); + } + + @Test + void portConflict() { + assertThrows( + IllegalStateException.class, + () -> { + MapRouteRequest.builder() + .domain("test-domain") + .port(123) + .randomPort(true) + .build(); + }); + } + + @Test + void setupConflict() { + assertThrows( + IllegalStateException.class, + () -> { + MapRouteRequest.builder() + .domain("test-domain") + .host("test-hostname") + .port(123) + .build(); + }); + } + + @Test + void validMax() { + MapRouteRequest.builder() + .applicationName("test-applicationName") + .domain("test-domain") + .host("test-host") + .path("test-path") + .build(); + } + + @Test + void validMin() { + MapRouteRequest.builder() + .applicationName("test-applicationName") + .domain("test-domain") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/UnmapRouteRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/UnmapRouteRequestTest.java new file mode 100644 index 00000000000..adc56cec79c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/routes/UnmapRouteRequestTest.java @@ -0,0 +1,63 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.routes; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnmapRouteRequestTest { + + @Test + void noApplicationName() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapRouteRequest.builder().domain("test-domain").build(); + }); + } + + @Test + void noDomain() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapRouteRequest.builder().applicationName("test-applicationName").build(); + }); + } + + @Test + void setupConflict() { + assertThrows( + IllegalStateException.class, + () -> { + UnmapRouteRequest.builder() + .domain("test-domain") + .host("test-hostname") + .port(123) + .build(); + }); + } + + @Test + void valid() { + UnmapRouteRequest.builder() + .applicationName("test-applicationName") + .domain("test-domain") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/CreateServiceBrokerRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/CreateServiceBrokerRequestTest.java new file mode 100644 index 00000000000..ad872938034 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/CreateServiceBrokerRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceBrokerRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .url("test-broker-url") + .username("test-username") + .password("test-password") + .build(); + }); + } + + @Test + void noPassword() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("test-broker") + .url("test-broker-url") + .username("test-username") + .build(); + }); + } + + @Test + void noUrl() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("test-broker") + .username("test-username") + .password("test-password") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceBrokerRequest.builder() + .name("test-broker") + .url("test-broker-url") + .password("test-password") + .build(); + }); + } + + @Test + void valid() { + CreateServiceBrokerRequest.builder() + .name("test-broker") + .url("test-broker-url") + .username("test-username") + .password("test-password") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DefaultServiceAdminTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DefaultServiceAdminTest.java new file mode 100644 index 00000000000..55f11a7626e --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DefaultServiceAdminTest.java @@ -0,0 +1,1073 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerResponse; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersResponse; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokerEntity; +import org.cloudfoundry.client.v2.servicebrokers.ServiceBrokerResource; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansResponse; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanEntity; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityEntity; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ListServicesResponse; +import org.cloudfoundry.client.v2.services.ServiceEntity; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultServiceAdminTest extends AbstractOperationsTest { + + private final DefaultServiceAdmin serviceAdmin = + new DefaultServiceAdmin(Mono.just(this.cloudFoundryClient), Mono.just(TEST_SPACE_ID)); + + @Test + void createServiceBroker() { + requestCreateServiceBroker( + this.cloudFoundryClient, + "test-service-broker-name", + "test-service-broker-url", + "test-service-broker-username", + "test-service-broker-password", + null); + + this.serviceAdmin + .create( + CreateServiceBrokerRequest.builder() + .name("test-service-broker-name") + .url("test-service-broker-url") + .username("test-service-broker-username") + .password("test-service-broker-password") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createServiceBrokerWithSpaceScope() { + requestCreateServiceBroker( + this.cloudFoundryClient, + "test-service-broker-name", + "test-service-broker-url", + "test-service-broker-username", + "test-service-broker-password", + TEST_SPACE_ID); + + this.serviceAdmin + .create( + CreateServiceBrokerRequest.builder() + .name("test-service-broker-name") + .url("test-service-broker-url") + .username("test-service-broker-username") + .password("test-service-broker-password") + .spaceScoped(true) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceBroker() { + requestListServiceBrokers(this.cloudFoundryClient, "test-service-broker-name"); + requestDeleteServiceBroker(this.cloudFoundryClient, "test-service-broker-id"); + + this.serviceAdmin + .delete( + DeleteServiceBrokerRequest.builder() + .name("test-service-broker-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceBrokerNoServiceBroker() { + requestListServiceBrokersEmpty(this.cloudFoundryClient, "test-service-broker-name"); + requestDeleteServiceBroker(this.cloudFoundryClient, "test-service-broker-id"); + + this.serviceAdmin + .delete( + DeleteServiceBrokerRequest.builder() + .name("test-service-broker-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service Broker test-service-broker-name not" + + " found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableServiceAccess() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities(this.cloudFoundryClient, "test-service-plan-id"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + requestUpdateServicePlan(this.cloudFoundryClient, false, "test-service-plan-id"); + + this.serviceAdmin + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .serviceName("test-service-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableServiceAccessSpecifyAll() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities( + this.cloudFoundryClient, "test-organization-id", "test-service-plan-id"); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + requestUpdateServicePlan(this.cloudFoundryClient, false, "test-service-plan-id"); + + this.serviceAdmin + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .organizationName("test-organization-name") + .serviceName("test-service-name") + .servicePlanName("test-service-plan-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableServiceAccessSpecifyOrganization() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities( + this.cloudFoundryClient, "test-organization-id", "test-service-plan-id"); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + requestUpdateServicePlan(this.cloudFoundryClient, false, "test-service-plan-id"); + + this.serviceAdmin + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .organizationName("test-organization-name") + .serviceName("test-service-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disableServiceAccessSpecifyServicePlan() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities(this.cloudFoundryClient, "test-service-plan-id"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + requestUpdateServicePlan(this.cloudFoundryClient, false, "test-service-plan-id"); + + this.serviceAdmin + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .serviceName("test-service-name") + .servicePlanName("test-service-plan-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccess() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities(this.cloudFoundryClient, "test-service-plan-id"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .serviceName("test-service-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccessOrganizationNotFound() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListOrganizationsEmpty(this.cloudFoundryClient, "bogus-organization-name"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .organizationName("bogus-organization-name") + .serviceName("test-service-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Organization bogus-organization-name not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccessServiceNotFound() { + requestListServicesWithNameAndServiceBrokerIdEmpty( + this.cloudFoundryClient, "bogus-service-name"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .serviceName("bogus-service-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service offering bogus-service-name not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccessSpecifyAll() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestCreateServicePlanVisibility( + this.cloudFoundryClient, "test-organization-id", "test-service-plan-id"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .organizationName("test-organization-name") + .serviceName("test-service-name") + .servicePlanName("test-service-plan-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccessSpecifyOrganization() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities(this.cloudFoundryClient, "test-service-plan-id"); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestCreateServicePlanVisibility( + this.cloudFoundryClient, "test-organization-id", "test-service-plan-id"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .organizationName("test-organization-name") + .serviceName("test-service-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccessSpecifyServicePlan() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestListServicePlanVisibilities(this.cloudFoundryClient, "test-service-plan-id"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .serviceName("test-service-name") + .servicePlanName("test-service-plan-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void enableServiceAccessSpecifyServicePlanWithoutPublicVisibility() { + ServicePlanResource servicePlan1 = + buildServicePlan("test-service-plan-id-1", "test-service-plan-name-1"); + ServicePlanResource servicePlan2 = + buildServicePlan("test-service-plan-id-2", "test-service-plan-name-2"); + + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServicePlans( + this.cloudFoundryClient, "test-service-id", servicePlan1, servicePlan2); + requestListServicePlanVisibilities(this.cloudFoundryClient, "test-service-plan-id-1"); + requestDeleteServicePlanVisibility( + this.cloudFoundryClient, "test-service-plan-visibility-id"); + requestUpdateServicePlan(this.cloudFoundryClient, "test-service-plan-id-1"); + + this.serviceAdmin + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .serviceName("test-service-name") + .servicePlanName("test-service-plan-name-1") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettings() { + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilitiesEmpty(this.cloudFoundryClient); + requestListServicesWithBroker(this.cloudFoundryClient, "test-service-broker-id"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + + this.serviceAdmin + .listServiceAccessSettings(ListServiceAccessSettingsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName("test-service-broker-resource-name") + .organizationNames() + .planName("test-service-plan-name") + .serviceName("test-service-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsNoBrokers() { + requestListServiceBrokersEmpty(this.cloudFoundryClient); + requestListServicePlanVisibilitiesEmpty(this.cloudFoundryClient); + + this.serviceAdmin + .listServiceAccessSettings(ListServiceAccessSettingsRequest.builder().build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("No Service Brokers found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsSpecifyBroker() { + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilitiesEmpty(this.cloudFoundryClient); + requestListServicesWithBroker(this.cloudFoundryClient, "test-service-broker-id"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + + this.serviceAdmin + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .brokerName("test-service-broker-resource-name") + .build()) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName("test-service-broker-resource-name") + .organizationNames() + .planName("test-service-plan-name") + .serviceName("test-service-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsSpecifyBrokerNotFound() { + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilitiesEmpty(this.cloudFoundryClient); + + this.serviceAdmin + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .brokerName("bogus-service-broker-resource-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service Broker bogus-service-broker-resource-name" + + " not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsSpecifyOrganization() { + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilities(this.cloudFoundryClient); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestListServicesWithBroker(this.cloudFoundryClient, "test-service-broker-id"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + requestGetOrganization(this.cloudFoundryClient, "test-organization-id"); + + this.serviceAdmin + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .organizationName("test-organization-name") + .build()) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName("test-service-broker-resource-name") + .organizationName("test-organization-name") + .planName("test-service-plan-name") + .serviceName("test-service-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsSpecifyOrganizationNotFound() { + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilities(this.cloudFoundryClient); + requestListOrganizationsEmpty(this.cloudFoundryClient, "bogus-organization-name"); + requestListServicesWithNameEmptyAndServiceBrokerIdAndLabelSet( + this.cloudFoundryClient, "bogus-service-name"); + requestListServicesWithNameEmptyAndServiceBrokerIdSet(this.cloudFoundryClient); + + this.serviceAdmin + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .organizationName("bogus-organization-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Organization bogus-organization-name not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsSpecifyService() { + requestListServicesWithName(this.cloudFoundryClient, "test-service-name"); + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilitiesEmpty(this.cloudFoundryClient); + requestListServicesWithBroker(this.cloudFoundryClient, "test-service-broker-id"); + requestListServicePlans(this.cloudFoundryClient, "test-service-id"); + + this.serviceAdmin + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .serviceName("test-service-name") + .build()) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName("test-service-broker-resource-name") + .organizationNames() + .planName("test-service-plan-name") + .serviceName("test-service-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceAccessSettingsSpecifyServiceNotFound() { + requestListServiceBrokers(this.cloudFoundryClient); + requestListServicePlanVisibilitiesEmpty(this.cloudFoundryClient); + requestListServicesWithNameEmptyAndServiceBrokerIdAndLabelSet( + this.cloudFoundryClient, "bogus-service-name"); + requestListServicesWithNameEmptyAndServiceBrokerIdSet(this.cloudFoundryClient); + requestListServicesWithNameAndServiceBrokerIdEmpty( + this.cloudFoundryClient, "bogus-service-name"); + + this.serviceAdmin + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .serviceName("bogus-service-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Service bogus-service-name not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceBrokers() { + requestListServiceBrokers(this.cloudFoundryClient); + + this.serviceAdmin + .list() + .as(StepVerifier::create) + .expectNext( + ServiceBroker.builder() + .id("test-service-broker-id") + .name("test-service-broker-resource-name") + .url("test-service-broker-resource-brokerUrl") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceBrokersNoBrokers() { + requestListServiceBrokersEmpty(this.cloudFoundryClient); + + this.serviceAdmin + .list() + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceBroker() { + requestListServiceBrokers(this.cloudFoundryClient, "test-service-broker-name"); + requestUpdateServiceBroker( + this.cloudFoundryClient, + "test-service-broker-name", + "test-service-broker-url", + "test-service-broker-username", + "test-service-broker-password", + "test-service-broker-id"); + + this.serviceAdmin + .update( + UpdateServiceBrokerRequest.builder() + .name("test-service-broker-name") + .url("test-service-broker-url") + .username("test-service-broker-username") + .password("test-service-broker-password") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceBrokerNoServiceBroker() { + requestListServiceBrokersEmpty(this.cloudFoundryClient, "test-service-broker-name"); + requestUpdateServiceBroker( + this.cloudFoundryClient, + "test-service-broker-name", + "test-service-broker-url", + "test-service-broker-username", + "test-service-broker-password", + "test-service-broker-id"); + + this.serviceAdmin + .update( + UpdateServiceBrokerRequest.builder() + .name("test-service-broker-name") + .url("test-service-broker-url") + .username("test-service-broker-username") + .password("test-service-broker-password") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service Broker test-service-broker-name not" + + " found")) + .verify(Duration.ofSeconds(5)); + } + + private static ServicePlanResource buildServicePlan(String id, String name) { + return fill(ServicePlanResource.builder(), "service-plan-") + .metadata(fill(Metadata.builder(), "service-plan-").id(id).build()) + .entity( + fill(ServicePlanEntity.builder(), "service-plan-") + .name(name) + .serviceId("test-service-id") + .publiclyVisible(false) + .build()) + .build(); + } + + private static void requestCreateServiceBroker( + CloudFoundryClient cloudFoundryClient, + String name, + String url, + String username, + String password, + String spaceId) { + when(cloudFoundryClient + .serviceBrokers() + .create( + org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerRequest + .builder() + .name(name) + .brokerUrl(url) + .authenticationUsername(username) + .authenticationPassword(password) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.just(fill(CreateServiceBrokerResponse.builder()).build())); + } + + private static void requestCreateServicePlanVisibility( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + when(cloudFoundryClient + .servicePlanVisibilities() + .create( + CreateServicePlanVisibilityRequest.builder() + .organizationId(organizationId) + .servicePlanId(servicePlanId) + .build())) + .thenReturn(Mono.just(fill(CreateServicePlanVisibilityResponse.builder()).build())); + } + + private static void requestDeleteServiceBroker( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + when(cloudFoundryClient + .serviceBrokers() + .delete( + org.cloudfoundry.client.v2.servicebrokers.DeleteServiceBrokerRequest + .builder() + .serviceBrokerId(serviceBrokerId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestDeleteServicePlanVisibility( + CloudFoundryClient cloudFoundryClient, String servicePlanVisibilityId) { + when(cloudFoundryClient + .servicePlanVisibilities() + .delete( + DeleteServicePlanVisibilityRequest.builder() + .async(true) + .servicePlanVisibilityId(servicePlanVisibilityId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestGetOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .get( + GetOrganizationRequest.builder() + .organizationId(organizationId) + .build())) + .thenReturn( + Mono.just( + fill(GetOrganizationResponse.builder(), "organization-").build())); + } + + private static void requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .build()) + .build())); + } + + private static void requestListOrganizationsEmpty( + CloudFoundryClient cloudFoundryClient, String organizationName) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationsResponse.builder()).build())); + } + + private static void requestListServiceBrokers(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .serviceBrokers() + .list(ListServiceBrokersRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListServiceBrokersResponse.builder()) + .resource( + fill( + ServiceBrokerResource.builder(), + "service-broker-") + .metadata( + fill( + Metadata.builder(), + "service-broker-") + .id( + "test-service-broker-id") + .build()) + .entity( + fill( + ServiceBrokerEntity + .builder(), + "service-broker-resource-") + .build()) + .build()) + .build())); + } + + private static void requestListServiceBrokers( + CloudFoundryClient cloudFoundryClient, String serviceBrokerName) { + when(cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListServiceBrokersResponse.builder()) + .resource( + fill( + ServiceBrokerResource.builder(), + "service-broker-") + .entity( + fill( + ServiceBrokerEntity + .builder(), + "service-broker-resource-") + .build()) + .build()) + .build())); + } + + private static void requestListServiceBrokersEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .serviceBrokers() + .list(ListServiceBrokersRequest.builder().page(1).build())) + .thenReturn(Mono.just(fill(ListServiceBrokersResponse.builder()).build())); + } + + private static void requestListServiceBrokersEmpty( + CloudFoundryClient cloudFoundryClient, String serviceBrokerName) { + when(cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListServiceBrokersResponse.builder()).build())); + } + + private static void requestListServicePlanVisibilities(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .servicePlanVisibilities() + .list(ListServicePlanVisibilitiesRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListServicePlanVisibilitiesResponse.builder()) + .resource( + fill(ServicePlanVisibilityResource.builder()) + .entity( + fill(ServicePlanVisibilityEntity + .builder()) + .organizationId( + "test-organization-id") + .servicePlanId( + "test-service-plan-id") + .build()) + .build()) + .build())); + } + + private static void requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + when(cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .page(1) + .servicePlanId(servicePlanId) + .build())) + .thenReturn( + Mono.just( + fill( + ListServicePlanVisibilitiesResponse.builder(), + "service-plan-visibility-") + .resource( + fill( + ServicePlanVisibilityResource + .builder(), + "service-plan-visibility-") + .entity( + fill(ServicePlanVisibilityEntity + .builder()) + .organizationId( + "test-organization-id") + .servicePlanId( + servicePlanId) + .build()) + .build()) + .build())); + } + + private static void requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + when(cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .organizationId(organizationId) + .page(1) + .servicePlanId(servicePlanId) + .build())) + .thenReturn( + Mono.just( + fill( + ListServicePlanVisibilitiesResponse.builder(), + "service-plan-visibility-") + .resource( + fill( + ServicePlanVisibilityResource + .builder(), + "service-plan-visibility-") + .entity( + fill(ServicePlanVisibilityEntity + .builder()) + .organizationId( + organizationId) + .servicePlanId( + servicePlanId) + .build()) + .build()) + .build())); + } + + private static void requestListServicePlanVisibilitiesEmpty( + CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .servicePlanVisibilities() + .list(ListServicePlanVisibilitiesRequest.builder().page(1).build())) + .thenReturn(Mono.just(fill(ListServicePlanVisibilitiesResponse.builder()).build())); + } + + private static void requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + ServicePlanResource resource = + fill(ServicePlanResource.builder(), "service-plan-") + .entity( + fill(ServicePlanEntity.builder(), "service-plan-") + .serviceId("test-service-id") + .build()) + .build(); + requestListServicePlans(cloudFoundryClient, serviceId, resource); + } + + private static void requestListServicePlans( + CloudFoundryClient cloudFoundryClient, + String serviceId, + ServicePlanResource... resources) { + when(cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(1) + .serviceId(serviceId) + .build())) + .thenReturn( + Mono.just( + fill(ListServicePlansResponse.builder()) + .resources(resources) + .build())); + } + + private static void requestListServicesWithBroker( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + when(cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .serviceBrokerId(serviceBrokerId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListServicesResponse.builder()) + .resource( + fill(ServiceResource.builder(), "service-") + .entity( + fill(ServiceEntity.builder()) + .label("test-service-name") + .serviceBrokerId( + "test-service-broker-id") + .build()) + .build()) + .build())); + } + + private static void requestListServicesWithName( + CloudFoundryClient cloudFoundryClient, String label) { + when(cloudFoundryClient + .services() + .list(ListServicesRequest.builder().label(label).page(1).build())) + .thenReturn( + Mono.just( + fill(ListServicesResponse.builder()) + .resource( + fill(ServiceResource.builder(), "service-") + .entity( + fill(ServiceEntity.builder()) + .label("test-service-name") + .serviceBrokerId( + "test-service-broker-id") + .build()) + .build()) + .build())); + } + + private static void requestListServicesWithNameAndServiceBrokerIdEmpty( + CloudFoundryClient cloudFoundryClient, String label) { + when(cloudFoundryClient + .services() + .list(ListServicesRequest.builder().label(label).page(1).build())) + .thenReturn(Mono.just(fill(ListServicesResponse.builder()).build())); + } + + private static void requestListServicesWithNameEmptyAndServiceBrokerIdAndLabelSet( + CloudFoundryClient cloudFoundryClient, String label) { + when(cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .label(label) + .page(1) + .serviceBrokerId("test-service-broker-id") + .build())) + .thenReturn(Mono.just(fill(ListServicesResponse.builder()).build())); + } + + private static void requestListServicesWithNameEmptyAndServiceBrokerIdSet( + CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .page(1) + .serviceBrokerId("test-service-broker-id") + .build())) + .thenReturn(Mono.just(fill(ListServicesResponse.builder()).build())); + } + + private static void requestUpdateServiceBroker( + CloudFoundryClient cloudFoundryClient, + String name, + String url, + String username, + String password, + String serviceBrokerId) { + when(cloudFoundryClient + .serviceBrokers() + .update( + org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerRequest + .builder() + .serviceBrokerId(serviceBrokerId) + .name(name) + .brokerUrl(url) + .authenticationUsername(username) + .authenticationPassword(password) + .build())) + .thenReturn(Mono.just(fill(UpdateServiceBrokerResponse.builder()).build())); + } + + private static void requestUpdateServicePlan( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + when(cloudFoundryClient + .servicePlans() + .update( + UpdateServicePlanRequest.builder() + .publiclyVisible(true) + .servicePlanId(servicePlanId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestUpdateServicePlan( + CloudFoundryClient cloudFoundryClient, boolean publiclyVisible, String servicePlanId) { + when(cloudFoundryClient + .servicePlans() + .update( + UpdateServicePlanRequest.builder() + .publiclyVisible(publiclyVisible) + .servicePlanId(servicePlanId) + .build())) + .thenReturn(Mono.just(fill(UpdateServicePlanResponse.builder()).build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DeleteServiceBrokerRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DeleteServiceBrokerRequestTest.java new file mode 100644 index 00000000000..a358757453e --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DeleteServiceBrokerRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class DeleteServiceBrokerRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceBrokerRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceBrokerRequest.builder().name("test-service-broker").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DisableServiceAccessRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DisableServiceAccessRequestTest.java new file mode 100644 index 00000000000..c3b40d2b435 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/DisableServiceAccessRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DisableServiceAccessRequestTest { + + @Test + void noServiceName() { + assertThrows( + IllegalStateException.class, + () -> { + DisableServiceAccessRequest.builder().build(); + }); + } + + @Test + void valid() { + DisableServiceAccessRequest.builder().serviceName("test-service-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/EnableServiceAccessRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/EnableServiceAccessRequestTest.java new file mode 100644 index 00000000000..2cef62e1ed7 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/EnableServiceAccessRequestTest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import org.junit.jupiter.api.Test; + +final class EnableServiceAccessRequestTest { + + @Test + void valid() { + ListServiceAccessSettingsRequest.builder() + .brokerName("test-broker-name") + .organizationName("test-organization-name") + .serviceName("test-service-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/ListServiceAccessSettingsRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/ListServiceAccessSettingsRequestTest.java new file mode 100644 index 00000000000..c065457f76d --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/ListServiceAccessSettingsRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListServiceAccessSettingsRequestTest { + + @Test + void noServiceName() { + assertThrows( + IllegalStateException.class, + () -> { + DisableServiceAccessRequest.builder().build(); + }); + } + + @Test + void valid() { + DisableServiceAccessRequest.builder().serviceName("test-service-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/UpdateServiceBrokerRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/UpdateServiceBrokerRequestTest.java new file mode 100644 index 00000000000..b2fee7278c4 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/serviceadmin/UpdateServiceBrokerRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.serviceadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class UpdateServiceBrokerRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceBrokerRequest.builder() + .url("test-broker-url") + .username("test-username") + .password("test-password") + .build(); + }); + } + + @Test + void noPassword() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceBrokerRequest.builder() + .name("test-broker") + .url("test-broker-url") + .username("test-username") + .build(); + }); + } + + @Test + void noUrl() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceBrokerRequest.builder() + .name("test-broker") + .username("test-username") + .password("test-password") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + UpdateServiceBrokerRequest.builder() + .name("test-broker") + .url("test-broker-url") + .password("test-password") + .build(); + }); + } + + @Test + void valid() { + UpdateServiceBrokerRequest.builder() + .name("test-broker") + .url("test-broker-url") + .username("test-username") + .password("test-password") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/BindRouteServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/BindRouteServiceInstanceRequestTest.java new file mode 100644 index 00000000000..8081cf7a43b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/BindRouteServiceInstanceRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BindRouteServiceInstanceRequestTest { + + @Test + void noDomainName() { + assertThrows( + IllegalStateException.class, + () -> { + BindRouteServiceInstanceRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .build(); + }); + } + + @Test + void valid() { + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/BindServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/BindServiceInstanceRequestTest.java new file mode 100644 index 00000000000..511761fa675 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/BindServiceInstanceRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class BindServiceInstanceRequestTest { + + @Test + void noApplicationName() { + assertThrows( + IllegalStateException.class, + () -> { + BindServiceInstanceRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + BindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .build(); + }); + } + + @Test + void valid() { + BindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateServiceInstanceRequestTest.java new file mode 100644 index 00000000000..b9d27f1b00d --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateServiceInstanceRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceInstanceRequestTest { + + @Test + void noPlan() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder() + .serviceName("test-service-name") + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder() + .planName("test-plan-name") + .serviceName("test-service-name") + .build(); + }); + } + + @Test + void noServiceName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder() + .planName("test-plan-name") + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void valid() { + CreateServiceInstanceRequest.builder() + .planName("test-plan-name") + .serviceName("test-service-name") + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateServiceKeyRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateServiceKeyRequestTest.java new file mode 100644 index 00000000000..37d1feedbb6 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateServiceKeyRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateServiceKeyRequestTest { + + @Test + void noSerivceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceKeyRequest.builder() + .serviceKeyName("test-service-key-name") + .build(); + }); + } + + @Test + void noServiceKeyName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void valid() { + CreateServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .serviceKeyName("test-service-key-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateUserProvidedServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateUserProvidedServiceInstanceRequestTest.java new file mode 100644 index 00000000000..e2abc8fcf30 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/CreateUserProvidedServiceInstanceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateUserProvidedServiceInstanceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserProvidedServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateUserProvidedServiceInstanceRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DefaultServicesTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DefaultServicesTest.java new file mode 100644 index 00000000000..bb23eefd87a --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DefaultServicesTest.java @@ -0,0 +1,2748 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Queue; +import java.util.function.Supplier; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.MaintenanceInfo; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applications.ApplicationEntity; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.GetApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationResponse; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsResponse; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.ListRoutesResponse; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.LastOperation; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysResponse; +import org.cloudfoundry.client.v2.serviceinstances.Plan; +import org.cloudfoundry.client.v2.serviceinstances.Service; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceEntity; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyEntity; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyResource; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansResponse; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanEntity; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityEntity; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityResource; +import org.cloudfoundry.client.v2.services.GetServiceRequest; +import org.cloudfoundry.client.v2.services.GetServiceResponse; +import org.cloudfoundry.client.v2.services.ServiceEntity; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesResponse; +import org.cloudfoundry.client.v2.spaces.SpaceApplicationSummary; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.DeleteUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.RemoveUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstanceEntity; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DefaultServicesTest extends AbstractOperationsTest { + + private final DefaultServices services = + new DefaultServices( + Mono.just(this.cloudFoundryClient), + Mono.just(TEST_ORGANIZATION_ID), + Mono.just(TEST_SPACE_ID)); + + @Test + void bindRouteServiceInstanceAlreadyBound() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListRoutes(this.cloudFoundryClient, "test-private-domain-id"); + requestAssociateUserProvidedServiceInstanceRouteError( + this.cloudFoundryClient, + "test-route-id", + "test-service-instance-id", + Collections.singletonMap("test-parameter-key", "test-parameter-value"), + 130008); + + this.services + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindRouteServiceInstanceDomainNotFound() { + requestListOrganizationPrivateDomainsEmpty( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomainsEmpty(this.cloudFoundryClient, "test-domain-name"); + + this.services + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain test-domain-name not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindRouteServiceInstancePrivateDomain() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListRoutes(this.cloudFoundryClient, "test-private-domain-id"); + requestAssociateUserProvidedServiceInstanceRoute( + this.cloudFoundryClient, + "test-route-id", + "test-service-instance-id", + Collections.singletonMap("test-parameter-key", "test-parameter-value")); + + this.services + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindRouteServiceInstancePrivateDomainWithHostAndPath() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListRoutes( + this.cloudFoundryClient, "test-private-domain-id", "test-host", "test-path"); + requestAssociateUserProvidedServiceInstanceRoute( + this.cloudFoundryClient, + "test-route-id", + "test-service-instance-id", + Collections.singletonMap("test-parameter-key", "test-parameter-value")); + + this.services + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .hostname("test-host") + .parameter("test-parameter-key", "test-parameter-value") + .path("test-path") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindRouteServiceInstanceServiceInstanceNotFound() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListRoutes(this.cloudFoundryClient, "test-private-domain-id"); + + this.services + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-service-instance-name does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindRouteServiceInstanceSharedDomain() { + requestListOrganizationPrivateDomainsEmpty( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(this.cloudFoundryClient, "test-domain-name"); + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListRoutes(this.cloudFoundryClient, "test-shared-domain-id"); + requestAssociateUserProvidedServiceInstanceRoute( + this.cloudFoundryClient, + "test-route-id", + "test-service-instance-id", + Collections.singletonMap("test-parameter-key", "test-parameter-value")); + + this.services + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindServiceInstance() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestCreateServiceBinding( + this.cloudFoundryClient, + "test-application-id", + "test-service-instance-id", + Collections.singletonMap("test-parameter-key", "test-parameter-value")); + + this.services + .bind( + BindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindServiceInstanceAlreadyBound() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestCreateServiceBindingError( + this.cloudFoundryClient, + "test-application-id", + "test-service-instance-id", + Collections.singletonMap("test-parameter-key", "test-parameter-value"), + 90003); + + this.services + .bind( + BindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindServiceInstanceNoApplication() { + requestApplicationsEmpty(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + + this.services + .bind( + BindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Application test-application-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void bindServiceInstanceNoServiceInstance() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + + this.services + .bind( + BindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-service-instance-name does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createServiceInstance() { + requestListSpaceServices(this.cloudFoundryClient, TEST_SPACE_ID, "test-service"); + requestListSpaceServicePlans( + this.cloudFoundryClient, "test-service-id", "test-plan", "test-plan-id"); + requestCreateServiceInstance( + this.cloudFoundryClient, + TEST_SPACE_ID, + "test-plan-id", + "test-service-instance", + null, + null, + "test-service-instance-id", + "in progress"); + requestGetServiceInstance( + this.cloudFoundryClient, "test-service-instance-id", "successful"); + + this.services + .createInstance( + CreateServiceInstanceRequest.builder() + .planName("test-plan") + .serviceInstanceName("test-service-instance") + .serviceName("test-service") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createServiceKey() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance", TEST_SPACE_ID); + requestCreateServiceKey( + this.cloudFoundryClient, + "test-service-instance-id", + "test-service-key", + Collections.singletonMap("test-parameter-key", "test-parameter-value")); + + this.services + .createServiceKey( + CreateServiceKeyRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance") + .serviceKeyName("test-service-key") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createServiceKeyNoServiceInstance() { + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-service-instance-does-not-exist", TEST_SPACE_ID); + + this.services + .createServiceKey( + CreateServiceKeyRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service-instance-does-not-exist") + .serviceKeyName("test-service-key") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance" + + " test-service-instance-does-not-exist does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createUserProvidedServiceInstance() { + requestCreateUserProvidedServiceInstance( + this.cloudFoundryClient, + TEST_SPACE_ID, + "test-user-provided-service-instance", + Collections.singletonMap("test-credential-key", "test-credential-value"), + "test-route-url", + "test-syslog-url", + "test-tag", + "test-user-provided-service-instance-id"); + + this.services + .createUserProvidedInstance( + CreateUserProvidedServiceInstanceRequest.builder() + .credential("test-credential-key", "test-credential-value") + .name("test-user-provided-service-instance") + .routeServiceUrl("test-route-url") + .syslogDrainUrl("test-syslog-url") + .tags("test-tag") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceInstance() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestDeleteServiceInstance(this.cloudFoundryClient, "test-service-instance-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.services.deleteInstance( + DeleteServiceInstanceRequest.builder() + .name("test-service-instance-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceInstanceAcceptsIncomplete() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestDeleteServiceInstanceAcceptsIncomplete( + this.cloudFoundryClient, "test-service-instance-id"); + requestGetServiceInstanceNotExist(this.cloudFoundryClient, "test-service-instance-id"); + + this.services + .deleteInstance( + DeleteServiceInstanceRequest.builder() + .name("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceInstanceNotFound() { + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-invalid-name", TEST_SPACE_ID); + + this.services + .deleteInstance( + DeleteServiceInstanceRequest.builder().name("test-invalid-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-invalid-name does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceKey() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceInstanceServiceKeys( + this.cloudFoundryClient, + "test-service-instance-id", + "test-service-key-name", + "key", + "val"); + requestDeleteServiceKey(this.cloudFoundryClient, "test-service-key-id"); + + this.services + .deleteServiceKey( + DeleteServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .serviceKeyName("test-service-key-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceKeyNoServiceInstance() { + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-service-instance", TEST_SPACE_ID); + + this.services + .deleteServiceKey( + DeleteServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance") + .serviceKeyName("test-service-key") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-service-instance does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteServiceKeyNoServiceKey() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceInstanceServiceKeysEmpty( + this.cloudFoundryClient, "test-service-instance-id", "test-service-key-not-found"); + + this.services + .deleteServiceKey( + DeleteServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .serviceKeyName("test-service-key-not-found") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service key test-service-key-not-found does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteUserProvidedServiceInstance() { + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestDeleteUserProvidedServiceInstance( + this.cloudFoundryClient, "test-service-instance-id"); + + this.services + .deleteInstance( + DeleteServiceInstanceRequest.builder() + .name("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getServiceInstanceManaged() { + requestListSpaceServiceInstancesManaged( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestGetServicePlan( + this.cloudFoundryClient, + "test-service-plan-id", + "test-service-plan", + "test-service-id"); + requestListSpaceServiceBindings( + this.cloudFoundryClient, "test-service-instance-id", "test-application-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestGetApplication(this.cloudFoundryClient, "test-application-id", "test-application"); + + this.services + .getInstance( + GetServiceInstanceRequest.builder() + .name("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectNext( + fill(ServiceInstance.builder()) + .application("test-application") + .documentationUrl("test-documentation-url") + .id("test-service-instance-id") + .lastOperation("test-type") + .maintenanceInfo( + MaintenanceInfo.builder() + .description("test-description") + .version("test-version") + .build()) + .name("test-service-instance-name") + .plan("test-service-plan") + .tag("test-tag") + .type(ServiceInstanceType.MANAGED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getServiceInstanceNoInstances() { + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-invalid-name", TEST_SPACE_ID); + + this.services + .getInstance(GetServiceInstanceRequest.builder().name("test-invalid-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-invalid-name does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void getServiceInstanceUserProvided() { + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceBindings( + this.cloudFoundryClient, "test-service-instance-id", "test-application-id"); + requestGetApplication(this.cloudFoundryClient, "test-application-id", "test-application"); + + this.services + .getInstance( + GetServiceInstanceRequest.builder() + .name("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectNext( + ServiceInstance.builder() + .application("test-application") + .id("test-service-instance-id") + .name("test-service-instance-name") + .type(ServiceInstanceType.USER_PROVIDED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getServiceKey() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceInstanceServiceKeys( + this.cloudFoundryClient, + "test-service-instance-id", + "test-service-key-name", + "key", + "val"); + + this.services + .getServiceKey( + GetServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .serviceKeyName("test-service-key-name") + .build()) + .as(StepVerifier::create) + .expectNext( + ServiceKey.builder() + .credential("key", "val") + .id("test-service-key-id") + .name("test-service-key-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getServiceKeyNoKeys() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceInstanceServiceKeysEmpty( + this.cloudFoundryClient, "test-service-instance-id", "test-service-key-not-found"); + + this.services + .getServiceKey( + GetServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .serviceKeyName("test-service-key-not-found") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service key test-service-key-not-found does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listInstancesManagedServices() { + requestGetSpaceSummaryManagedServices(this.cloudFoundryClient, TEST_SPACE_ID); + + this.services + .listInstances() + .as(StepVerifier::create) + .expectNext( + ServiceInstanceSummary.builder() + .applications("test-application-name-1", "test-application-name-2") + .id("test-service-id-2") + .lastOperation("test-last-operation-description-2") + .name("test-service-name-2") + .plan("test-service-plan-name-2") + .service("test-provided-service-label") + .type(ServiceInstanceType.MANAGED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listInstancesNoApplications() { + requestGetSpaceSummaryManagedServicesNoApplications(this.cloudFoundryClient, TEST_SPACE_ID); + + this.services + .listInstances() + .as(StepVerifier::create) + .expectNext( + ServiceInstanceSummary.builder() + .id("test-service-id") + .lastOperation("test-last-operation-description") + .name("test-service-name") + .plan("test-service-plan-name") + .service("test-provided-service-label") + .type(ServiceInstanceType.MANAGED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listInstancesNoInstances() { + requestGetSpaceSummaryEmpty(this.cloudFoundryClient, TEST_SPACE_ID); + + this.services + .listInstances() + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listInstancesOneApplication() { + requestGetSpaceSummaryManagedServicesOneApplication(this.cloudFoundryClient, TEST_SPACE_ID); + + this.services + .listInstances() + .as(StepVerifier::create) + .expectNext( + ServiceInstanceSummary.builder() + .application("test-application-name") + .id("test-service-id-1") + .lastOperation("test-last-operation-description-1") + .name("test-service-name-1") + .plan("test-service-plan-name-1") + .service("test-provided-service-label") + .type(ServiceInstanceType.MANAGED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listInstancesUserProvidedServices() { + requestGetSpaceSummaryUserProvidedServices(this.cloudFoundryClient, TEST_SPACE_ID); + + this.services + .listInstances() + .as(StepVerifier::create) + .expectNext( + ServiceInstanceSummary.builder() + .applications("test-application-name-1", "test-application-name-2") + .id("test-service-id-2") + .name("test-service-name-2") + .type(ServiceInstanceType.USER_PROVIDED) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceKeys() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceInstanceServiceKeys( + this.cloudFoundryClient, "test-service-instance-id", "key", "val"); + + this.services + .listServiceKeys( + ListServiceKeysRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectNext( + ServiceKey.builder() + .credential("key", "val") + .id("test-service-key-id") + .name("test-service-key-entity-name") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceKeysEmpty() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestListSpaceServiceInstanceServiceKeysEmpty( + this.cloudFoundryClient, "test-service-instance-id"); + + this.services + .listServiceKeys( + ListServiceKeysRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceKeysNoServiceInstance() { + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + + this.services + .listServiceKeys( + ListServiceKeysRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-service-instance-name does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceOfferings() { + requestListSpaceServicesTwo( + this.cloudFoundryClient, TEST_SPACE_ID, "test-service1", "test-service2"); + requestListSpaceServicePlans( + this.cloudFoundryClient, + "test-service1-id", + "test-service1-plan", + "test-service1-plan-id"); + requestListSpaceServicePlans( + this.cloudFoundryClient, + "test-service2-id", + "test-service2-plan", + "test-service2-plan-id"); + + this.services + .listServiceOfferings(ListServiceOfferingsRequest.builder().build()) + .as(StepVerifier::create) + .expectNext( + ServiceOffering.builder() + .description("test-service1-description") + .id("test-service1-id") + .label("test-service1") + .servicePlan( + ServicePlan.builder() + .description("test-description") + .free(true) + .id("test-service1-plan-id") + .name("test-service1-plan") + .build()) + .build(), + ServiceOffering.builder() + .description("test-service2-description") + .id("test-service2-id") + .label("test-service2") + .servicePlan( + ServicePlan.builder() + .description("test-description") + .free(true) + .id("test-service2-plan-id") + .name("test-service2-plan") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listServiceOfferingsSingle() { + requestListSpaceServices(this.cloudFoundryClient, TEST_SPACE_ID, "test-service"); + requestListSpaceServicesTwo(this.cloudFoundryClient, TEST_SPACE_ID, "label1", "label2"); + requestListSpaceServicePlans( + this.cloudFoundryClient, + "test-service-id", + "test-service-plan", + "test-service-plan-id"); + + this.services + .listServiceOfferings( + ListServiceOfferingsRequest.builder().serviceName("test-service").build()) + .as(StepVerifier::create) + .expectNext( + ServiceOffering.builder() + .description("test-service-description") + .id("test-service-id") + .label("test-service") + .servicePlan( + ServicePlan.builder() + .description("test-description") + .free(true) + .id("test-service-plan-id") + .name("test-service-plan") + .build()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void renameServiceInstance() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestRenameServiceInstance( + this.cloudFoundryClient, + "test-service-instance-id", + "test-service-instance-new-name"); + + this.services + .renameInstance( + RenameServiceInstanceRequest.builder() + .name("test-service-instance-name") + .newName("test-service-instance-new-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unbindRoute() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListRoutes(this.cloudFoundryClient, "test-private-domain-id"); + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestRemoveUserProvidedServiceInstanceRoute( + this.cloudFoundryClient, "test-route-id", "test-service-instance-id"); + + this.services + .unbindRoute( + UnbindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unbindRouteServiceInstanceRouteNotFound() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListRoutesEmpty(this.cloudFoundryClient, "test-private-domain-id"); + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + + this.services + .unbindRoute( + UnbindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Route test-domain-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unbindRouteServiceInstanceServiceInstanceNotFound() { + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, "test-domain-name", TEST_ORGANIZATION_ID); + requestListSharedDomains(cloudFoundryClient, "test-domain-name"); + requestListRoutes(this.cloudFoundryClient, "test-private-domain-id"); + requestListSpaceServiceInstancesEmpty( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + + this.services + .unbindRoute( + UnbindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .serviceInstanceName("test-service-instance-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service instance test-service-instance-name does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void unbindServiceInstance() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestApplicationsListServiceBindings( + this.cloudFoundryClient, "test-application-id", "test-service-instance-id"); + requestDeleteServiceBinding(this.cloudFoundryClient, "test-service-binding-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.services.unbind( + UnbindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .serviceInstanceName("test-service-instance-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unbindServiceInstanceFailure() { + requestApplications(this.cloudFoundryClient, "test-application-name", TEST_SPACE_ID); + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service-instance-name", TEST_SPACE_ID); + requestApplicationsListServiceBindings( + this.cloudFoundryClient, "test-application-id", "test-service-instance-id"); + requestDeleteServiceBinding(this.cloudFoundryClient, "test-service-binding-id"); + requestJobFailure(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.services.unbind( + UnbindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .serviceInstanceName("test-service-instance-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-error-details-errorCode(1):" + + " test-error-details-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateService() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-service-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, + "test-service-plan-id", + "test-service-plan", + "test-service-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestListSpaceServicePlans( + this.cloudFoundryClient, "test-service-id", "test-plan", "test-plan-id"); + requestUpdateServiceInstance( + this.cloudFoundryClient, + Collections.singletonMap("test-parameter-key", "test-parameter-value"), + "test-service-instance-id", + "test-plan-id", + Collections.singletonList("test-tag")); + requestGetServiceInstance(this.cloudFoundryClient, "test-id", "successful"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNewPlanDoesNotExist() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-service-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, + "test-service-plan-id", + "test-service-plan", + "test-service-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestListSpaceServicePlans( + this.cloudFoundryClient, + "test-service-id", + "test-other-plan-not-this-one", + "test-plan-id"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("New service plan test-plan not found")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNoParameters() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-service-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, + "test-service-plan-id", + "test-service-plan", + "test-service-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestListSpaceServicePlans( + this.cloudFoundryClient, "test-service-id", "test-plan", "test-service-plan-id"); + requestUpdateServiceInstance( + this.cloudFoundryClient, + null, + "test-service-instance-id", + "test-service-plan-id", + Collections.singletonList("test-tag")); + requestGetServiceInstance(this.cloudFoundryClient, "test-id", "successful"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNoPlan() { + requestListSpaceServiceInstances(this.cloudFoundryClient, "test-service", TEST_SPACE_ID); + requestUpdateServiceInstance( + this.cloudFoundryClient, + Collections.singletonMap("test-parameter-key", "test-parameter-value"), + "test-service-instance-id", + null, + Collections.singletonList("test-tag")); + requestGetServiceInstance(this.cloudFoundryClient, "test-id", "successful"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNoPlanExists() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, null); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Plan does not exist for the test-name service")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNoTags() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-service-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, + "test-service-plan-id", + "test-service-plan", + "test-service-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestListSpaceServicePlans( + this.cloudFoundryClient, "test-service-id", "test-plan", "test-plan-id"); + requestUpdateServiceInstance( + this.cloudFoundryClient, + Collections.singletonMap("test-parameter-key", "test-parameter-value"), + "test-service-instance-id", + "test-plan-id", + null); + requestGetServiceInstance(this.cloudFoundryClient, "test-id", "successful"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNotPublic() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, "test-plan-id", "test-service-plan", "test-service-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestListSpaceServicePlansNotPublic( + this.cloudFoundryClient, "test-service-id", "test-plan", "test-plan-id"); + requestListSpaceServicePlanVisibilities( + this.cloudFoundryClient, "test-organization-id", "test-plan-id"); + requestUpdateServiceInstance( + this.cloudFoundryClient, + Collections.singletonMap("test-parameter-key", "test-parameter-value"), + "test-service-instance-id", + "test-plan-id", + Collections.singletonList("test-tag")); + requestGetServiceInstance(this.cloudFoundryClient, "test-id", "successful"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServiceNotVisible() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, "test-plan-id", "test-service-plan", "test-service-id"); + requestGetService(this.cloudFoundryClient, "test-service-id", "test-service"); + requestListSpaceServicePlansNotPublic( + this.cloudFoundryClient, "test-service-id", "test-plan", "test-plan-id"); + requestListSpaceServicePlanVisibilitiesEmpty( + this.cloudFoundryClient, "test-organization-id", "test-plan-id"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service Plan test-plan is not visible to your" + + " organization")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateServicePlanNotUpdateable() { + requestListSpaceServiceInstances( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID, "test-service-plan-id"); + requestGetServicePlan( + this.cloudFoundryClient, + "test-service-plan-id", + "test-service-plan", + "test-service-id"); + requestGetServiceNotPlanUpdateable( + this.cloudFoundryClient, "test-service-id", "test-service"); + + this.services + .updateInstance( + UpdateServiceInstanceRequest.builder() + .parameter("test-parameter-key", "test-parameter-value") + .planName("test-plan") + .serviceInstanceName("test-service") + .tag("test-tag") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Plan for the test-name service cannot be updated")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateUserProvidedService() { + requestListSpaceServiceInstancesUserProvided( + this.cloudFoundryClient, "test-service", TEST_SPACE_ID); + requestUpdateUserProvidedServiceInstance( + this.cloudFoundryClient, + Collections.singletonMap("test-credential-key", "test-credential-value"), + "syslog-url", + Collections.singletonList("tag1"), + "test-service-instance-id"); + + this.services + .updateUserProvidedInstance( + UpdateUserProvidedServiceInstanceRequest.builder() + .credential("test-credential-key", "test-credential-value") + .syslogDrainUrl("syslog-url") + .tags("tag1") + .userProvidedServiceInstanceName("test-service") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void updateUserProvidedServiceNotUserProvided() { + requestListSpaceServiceInstances(this.cloudFoundryClient, "test-service", TEST_SPACE_ID); + + this.services + .updateUserProvidedInstance( + UpdateUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceName("test-service") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "User provided service instance test-service does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + private static void requestApplications( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(applicationName) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceApplicationsResponse.builder()) + .resource( + fill(ApplicationResource.builder(), "application-") + .build()) + .build())); + } + + private static void requestApplicationsEmpty( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .name(applicationName) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.just(fill(ListSpaceApplicationsResponse.builder()).build())); + } + + private static void requestApplicationsListServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + when(cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .page(1) + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(ListApplicationServiceBindingsResponse.builder()) + .resource( + fill( + ServiceBindingResource.builder(), + "service-binding-") + .entity( + ServiceBindingEntity.builder() + .applicationId( + applicationId) + .build()) + .build()) + .build())); + } + + private static void requestAssociateUserProvidedServiceInstanceRoute( + CloudFoundryClient cloudFoundryClient, + String routeId, + String userProvidedServiceInstanceId, + Map parameters) { + when(cloudFoundryClient + .userProvidedServiceInstances() + .associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .parameters(parameters) + .routeId(routeId) + .userProvidedServiceInstanceId( + userProvidedServiceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(AssociateUserProvidedServiceInstanceRouteResponse.builder()) + .build())); + } + + private static void requestAssociateUserProvidedServiceInstanceRouteError( + CloudFoundryClient cloudFoundryClient, + String routeId, + String userProvidedServiceInstanceId, + Map parameters, + Integer code) { + when(cloudFoundryClient + .userProvidedServiceInstances() + .associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .parameters(parameters) + .routeId(routeId) + .userProvidedServiceInstanceId( + userProvidedServiceInstanceId) + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + null, + code, + "test-exception-description", + "test-exception-errorCode"))); + } + + private static void requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String serviceInstanceId, + Map parameters) { + when(cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .parameters(parameters) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(CreateServiceBindingResponse.builder(), "service-binding-") + .build())); + } + + private static void requestCreateServiceBindingError( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String serviceInstanceId, + Map parameters, + int code) { + when(cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .parameters(parameters) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + null, + code, + "test-exception-description", + "test-exception-errorCode"))); + } + + private static void requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String planId, + String serviceInstance, + Map parameters, + List tags, + String serviceInstanceId, + String state) { + when(cloudFoundryClient + .serviceInstances() + .create( + org.cloudfoundry.client.v2.serviceinstances + .CreateServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .name(serviceInstance) + .parameters(parameters) + .servicePlanId(planId) + .spaceId(spaceId) + .tags(tags) + .build())) + .thenReturn( + Mono.just( + fill(CreateServiceInstanceResponse.builder()) + .metadata( + fill(Metadata.builder()) + .id(serviceInstanceId) + .build()) + .entity( + fill(ServiceInstanceEntity.builder()) + .lastOperation( + LastOperation.builder() + .state(state) + .type("create") + .build()) + .build()) + .build())); + } + + private static void requestCreateServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKey, + Map parameters) { + when(cloudFoundryClient + .serviceKeys() + .create( + org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest + .builder() + .name(serviceKey) + .parameters(parameters) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just(fill(CreateServiceKeyResponse.builder(), "service-key").build())); + } + + private static void requestCreateUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String name, + Map credentials, + String routeServiceUrl, + String syslogDrainUrl, + String tag, + String userProvidedServiceInstanceId) { + when(cloudFoundryClient + .userProvidedServiceInstances() + .create( + org.cloudfoundry.client.v2.userprovidedserviceinstances + .CreateUserProvidedServiceInstanceRequest.builder() + .credentials(credentials) + .name(name) + .routeServiceUrl(routeServiceUrl) + .spaceId(spaceId) + .syslogDrainUrl(syslogDrainUrl) + .tag(tag) + .build())) + .thenReturn( + Mono.just( + fill(CreateUserProvidedServiceInstanceResponse.builder()) + .metadata( + fill(Metadata.builder()) + .id(userProvidedServiceInstanceId) + .build()) + .entity( + fill(UserProvidedServiceInstanceEntity.builder()) + .build()) + .build())); + } + + private static void requestDeleteServiceBinding( + CloudFoundryClient cloudFoundryClient, String serviceBindingId) { + when(cloudFoundryClient + .serviceBindingsV2() + .delete( + DeleteServiceBindingRequest.builder() + .async(true) + .serviceBindingId(serviceBindingId) + .build())) + .thenReturn( + Mono.just( + fill(DeleteServiceBindingResponse.builder()) + .entity(fill(JobEntity.builder(), "job-entity-").build()) + .build())); + } + + private static void requestDeleteServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + when(cloudFoundryClient + .serviceInstances() + .delete( + org.cloudfoundry.client.v2.serviceinstances + .DeleteServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .async(true) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + DeleteServiceInstanceResponse.builder() + .entity(fill(JobEntity.builder(), "job-entity-").build()) + .build())); + } + + private static void requestDeleteServiceInstanceAcceptsIncomplete( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + when(cloudFoundryClient + .serviceInstances() + .delete( + org.cloudfoundry.client.v2.serviceinstances + .DeleteServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .async(true) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + DeleteServiceInstanceResponse.builder() + .entity( + fill( + ServiceInstanceEntity.builder(), + "service-instance-entity-") + .lastOperation( + LastOperation.builder() + .state("in progress") + .build()) + .build()) + .build())); + } + + private static void requestDeleteServiceKey( + CloudFoundryClient cloudFoundryClient, String serviceKeyId) { + when(cloudFoundryClient + .serviceKeys() + .delete( + org.cloudfoundry.client.v2.servicekeys.DeleteServiceKeyRequest + .builder() + .serviceKeyId(serviceKeyId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestDeleteUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + when(cloudFoundryClient + .userProvidedServiceInstances() + .delete( + DeleteUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId(serviceInstanceId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId, String application) { + when(cloudFoundryClient + .applicationsV2() + .get(GetApplicationRequest.builder().applicationId(applicationId).build())) + .thenReturn( + Mono.just( + fill(GetApplicationResponse.builder()) + .metadata( + fill(Metadata.builder()).id(applicationId).build()) + .entity( + fill(ApplicationEntity.builder()) + .name(application) + .build()) + .build())); + } + + private static void requestGetService( + CloudFoundryClient cloudFoundryClient, String serviceId, String service) { + when(cloudFoundryClient + .services() + .get(GetServiceRequest.builder().serviceId(serviceId).build())) + .thenReturn( + Mono.just( + fill(GetServiceResponse.builder()) + .metadata(fill(Metadata.builder()).id(serviceId).build()) + .entity( + fill(ServiceEntity.builder()) + .extra( + "{\"displayName\":\"test-value\",\"longDescription\":\"test-value\",\"documentationUrl\":\"test-documentation-url\",\"supportUrl\":\"test-value\"}") + .label(service) + .build()) + .build())); + } + + private static void requestGetServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String state) { + when(cloudFoundryClient + .serviceInstances() + .get( + org.cloudfoundry.client.v2.serviceinstances + .GetServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(GetServiceInstanceResponse.builder()) + .metadata( + fill(Metadata.builder()) + .id(serviceInstanceId) + .build()) + .entity( + fill(ServiceInstanceEntity.builder()) + .lastOperation( + LastOperation.builder() + .state(state) + .type("create") + .build()) + .build()) + .build())); + } + + private static void requestGetServiceInstanceNotExist( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + when(cloudFoundryClient + .serviceInstances() + .get( + org.cloudfoundry.client.v2.serviceinstances + .GetServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + 404, 404, "test-description", "test-error-code"))); + } + + private static void requestGetServiceNotPlanUpdateable( + CloudFoundryClient cloudFoundryClient, String serviceId, String service) { + when(cloudFoundryClient + .services() + .get(GetServiceRequest.builder().serviceId(serviceId).build())) + .thenReturn( + Mono.just( + fill(GetServiceResponse.builder()) + .metadata(fill(Metadata.builder()).id(serviceId).build()) + .entity( + fill(ServiceEntity.builder()) + .extra( + "{\"displayName\":\"test-value\",\"longDescription\":\"test-value\",\"documentationUrl\":\"test-documentation-url\",\"supportUrl\":\"test-value\"}") + .label(service) + .planUpdateable(false) + .build()) + .build())); + } + + private static void requestGetServicePlan( + CloudFoundryClient cloudFoundryClient, + String servicePlanId, + String servicePlan, + String serviceId) { + when(cloudFoundryClient + .servicePlans() + .get(GetServicePlanRequest.builder().servicePlanId(servicePlanId).build())) + .thenReturn( + Mono.just( + fill(GetServicePlanResponse.builder()) + .entity( + ServicePlanEntity.builder() + .name(servicePlan) + .serviceId(serviceId) + .build()) + .build())); + } + + private static void requestGetSpaceSummaryEmpty( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build())) + .thenReturn(Mono.just(fill(GetSpaceSummaryResponse.builder()).build())); + } + + private static void requestGetSpaceSummaryManagedServices( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(GetSpaceSummaryResponse.builder()) + .id(spaceId) + .application( + SpaceApplicationSummary.builder() + .id("test-application-id-1") + .name("test-application-name-1") + .serviceNames( + "test-service-name-1", + "test-service-name-2") + .spaceId(spaceId) + .build()) + .application( + SpaceApplicationSummary.builder() + .id("test-application-id-2") + .name("test-application-name-2") + .serviceNames( + "test-service-name-2", + "test-service-name-3") + .spaceId(spaceId) + .build()) + .service( + org.cloudfoundry.client.v2.serviceinstances + .ServiceInstance.builder() + .id("test-service-id-2") + .lastOperation( + LastOperation.builder() + .description( + "test-last-operation-description-2") + .build()) + .name("test-service-name-2") + .servicePlan( + Plan.builder() + .id( + "test-service-plan-id-2") + .name( + "test-service-plan-name-2") + .service( + Service.builder() + .id( + "test-provided-service-id") + .label( + "test-provided-service-label") + .build()) + .build()) + .build()) + .build())); + } + + private static void requestGetSpaceSummaryManagedServicesNoApplications( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(GetSpaceSummaryResponse.builder()) + .id(spaceId) + .service( + org.cloudfoundry.client.v2.serviceinstances + .ServiceInstance.builder() + .id("test-service-id") + .lastOperation( + LastOperation.builder() + .description( + "test-last-operation-description") + .build()) + .name("test-service-name") + .servicePlan( + Plan.builder() + .id("test-service-plan-id") + .name( + "test-service-plan-name") + .service( + Service.builder() + .id( + "test-provided-service-id") + .label( + "test-provided-service-label") + .build()) + .build()) + .build()) + .build())); + } + + private static void requestGetSpaceSummaryManagedServicesOneApplication( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(GetSpaceSummaryResponse.builder()) + .id(spaceId) + .application( + SpaceApplicationSummary.builder() + .id("test-application-id") + .name("test-application-name") + .serviceNames( + "test-service-name-1", + "test-service-name-2") + .spaceId(spaceId) + .build()) + .service( + org.cloudfoundry.client.v2.serviceinstances + .ServiceInstance.builder() + .id("test-service-id-1") + .lastOperation( + LastOperation.builder() + .description( + "test-last-operation-description-1") + .build()) + .name("test-service-name-1") + .servicePlan( + Plan.builder() + .id( + "test-service-plan-id-1") + .name( + "test-service-plan-name-1") + .service( + Service.builder() + .id( + "test-provided-service-id") + .label( + "test-provided-service-label") + .build()) + .build()) + .build()) + .build())); + } + + private static void requestGetSpaceSummaryUserProvidedServices( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .getSummary(GetSpaceSummaryRequest.builder().spaceId(spaceId).build())) + .thenReturn( + Mono.just( + fill(GetSpaceSummaryResponse.builder()) + .id(spaceId) + .application( + SpaceApplicationSummary.builder() + .id("test-application-id-1") + .name("test-application-name-1") + .serviceNames( + "test-service-name-1", + "test-service-name-2") + .spaceId(spaceId) + .build()) + .application( + SpaceApplicationSummary.builder() + .id("test-application-id-2") + .name("test-application-name-2") + .serviceNames( + "test-service-name-2", + "test-service-name-3") + .spaceId(spaceId) + .build()) + .service( + org.cloudfoundry.client.v2.serviceinstances + .ServiceInstance.builder() + .id("test-service-id-2") + .name("test-service-name-2") + .boundApplicationCount(1) + .build()) + .build())); + } + + private static void requestJobFailure(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .errorDetails( + fill( + ErrorDetails + .builder(), + "error-details-") + .build()) + .status( + "failed") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestJobSuccess(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "finished") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestListOrganizationPrivateDomains( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .name(name) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationPrivateDomainsResponse.builder()) + .resource( + fill( + PrivateDomainResource.builder(), + "private-domain-") + .build()) + .build())); + } + + private static void requestListOrganizationPrivateDomainsEmpty( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .name(name) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just(fill(ListOrganizationPrivateDomainsResponse.builder()).build())); + } + + private static void requestListRoutes( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String path) { + when(cloudFoundryClient + .routes() + .list( + ListRoutesRequest.builder() + .domainId(domainId) + .host(host) + .page(1) + .path(path) + .build())) + .thenReturn( + Mono.just( + fill(ListRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + RouteEntity.builder() + .domainId(domainId) + .host(host) + .path(path) + .serviceInstanceId( + "test-service-instance-id") + .build()) + .build()) + .build())); + } + + private static void requestListRoutes(CloudFoundryClient cloudFoundryClient, String domainId) { + when(cloudFoundryClient + .routes() + .list(ListRoutesRequest.builder().domainId(domainId).page(1).build())) + .thenReturn( + Mono.just( + fill(ListRoutesResponse.builder()) + .resource( + fill(RouteResource.builder(), "route-") + .entity( + RouteEntity.builder() + .domainId(domainId) + .path("") + .serviceInstanceId( + "test-service-instance-id") + .build()) + .build()) + .build())); + } + + private static void requestListRoutesEmpty( + CloudFoundryClient cloudFoundryClient, String domainId) { + when(cloudFoundryClient + .routes() + .list(ListRoutesRequest.builder().domainId(domainId).page(1).build())) + .thenReturn(Mono.just(fill(ListRoutesResponse.builder()).build())); + } + + private static void requestListSpaceServiceBindings( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String applicationId) { + when(cloudFoundryClient + .serviceBindingsV2() + .list( + ListServiceBindingsRequest.builder() + .page(1) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(ListServiceBindingsResponse.builder()) + .resource( + fill( + ServiceBindingResource.builder(), + "service-binding") + .entity( + ServiceBindingEntity.builder() + .applicationId( + applicationId) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServiceInstanceServiceKeys( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKey, + String credentialKey, + String credentialValue) { + when(cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .name(serviceKey) + .page(1) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(ListServiceInstanceServiceKeysResponse.builder()) + .resource( + fill(ServiceKeyResource.builder(), "service-key-") + .entity( + ServiceKeyEntity.builder() + .credential( + credentialKey, + credentialValue) + .name(serviceKey) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServiceInstanceServiceKeys( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String credentialKey, + String credentialValue) { + when(cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .page(1) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(ListServiceInstanceServiceKeysResponse.builder()) + .resource( + fill(ServiceKeyResource.builder(), "service-key-") + .entity( + fill( + ServiceKeyEntity + .builder(), + "service-key-entity-") + .credential( + credentialKey, + credentialValue) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServiceInstanceServiceKeysEmpty( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String serviceKey) { + when(cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .name(serviceKey) + .page(1) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just(fill(ListServiceInstanceServiceKeysResponse.builder()).build())); + } + + private static void requestListSpaceServiceInstanceServiceKeysEmpty( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + when(cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .page(1) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn( + Mono.just(fill(ListServiceInstanceServiceKeysResponse.builder()).build())); + } + + private static void requestListSpaceServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceName, String spaceId) { + when(cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .name(serviceName) + .page(1) + .returnUserProvidedServiceInstances(true) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServiceInstancesResponse.builder()) + .resource( + fill( + UnionServiceInstanceResource + .builder(), + "service-instance-") + .entity( + fill( + UnionServiceInstanceEntity + .builder(), + "service-instance-") + .type( + ServiceInstanceType + .MANAGED + .toString()) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServiceInstances( + CloudFoundryClient cloudFoundryClient, + String serviceName, + String spaceId, + String servicePlanId) { + when(cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .name(serviceName) + .page(1) + .returnUserProvidedServiceInstances(true) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServiceInstancesResponse.builder()) + .resource( + fill( + UnionServiceInstanceResource + .builder(), + "service-instance-") + .entity( + fill(UnionServiceInstanceEntity + .builder()) + .servicePlanId( + servicePlanId) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServiceInstancesEmpty( + CloudFoundryClient cloudFoundryClient, String serviceName, String spaceId) { + when(cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .name(serviceName) + .page(1) + .returnUserProvidedServiceInstances(true) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.just(fill(ListSpaceServiceInstancesResponse.builder()).build())); + } + + private static void requestListSpaceServiceInstancesManaged( + CloudFoundryClient cloudFoundryClient, String serviceName, String spaceId) { + when(cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .name(serviceName) + .page(1) + .returnUserProvidedServiceInstances(true) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServiceInstancesResponse.builder()) + .resource( + UnionServiceInstanceResource.builder() + .metadata( + fill(Metadata.builder()) + .id( + "test-service-instance-id") + .build()) + .entity( + fill(UnionServiceInstanceEntity + .builder()) + .lastOperation( + LastOperation + .builder() + .createdAt( + "test-startedAt") + .description( + "test-message") + .state( + "test-status") + .type( + "test-type") + .updatedAt( + "test-updatedAt") + .build()) + .name(serviceName) + .servicePlanId( + "test-service-plan-id") + .tags( + Collections + .singletonList( + "test-tag")) + .type( + ServiceInstanceType + .MANAGED + .toString()) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServiceInstancesUserProvided( + CloudFoundryClient cloudFoundryClient, String serviceName, String spaceId) { + when(cloudFoundryClient + .spaces() + .listServiceInstances( + ListSpaceServiceInstancesRequest.builder() + .page(1) + .spaceId(spaceId) + .returnUserProvidedServiceInstances(true) + .name(serviceName) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServiceInstancesResponse.builder()) + .resource( + UnionServiceInstanceResource.builder() + .metadata( + fill(Metadata.builder()) + .id( + "test-service-instance-id") + .build()) + .entity( + UnionServiceInstanceEntity.builder() + .name(serviceName) + .type( + ServiceInstanceType + .USER_PROVIDED + .toString()) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + when(cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .organizationId(organizationId) + .page(1) + .servicePlanId(servicePlanId) + .build())) + .thenReturn( + Mono.just( + fill(ListServicePlanVisibilitiesResponse.builder()) + .resource( + fill(ServicePlanVisibilityResource.builder()) + .entity( + ServicePlanVisibilityEntity + .builder() + .organizationId( + organizationId) + .servicePlanId( + servicePlanId) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServicePlanVisibilitiesEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + when(cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .organizationId(organizationId) + .page(1) + .servicePlanId(servicePlanId) + .build())) + .thenReturn(Mono.just(fill(ListServicePlanVisibilitiesResponse.builder()).build())); + } + + private static void requestListSpaceServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId, String plan, String planId) { + when(cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(1) + .serviceId(serviceId) + .build())) + .thenReturn( + Mono.just( + fill(ListServicePlansResponse.builder()) + .resource( + ServicePlanResource.builder() + .metadata( + fill(Metadata.builder()) + .id(planId) + .build()) + .entity( + fill(ServicePlanEntity.builder()) + .name(plan) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServicePlansNotPublic( + CloudFoundryClient cloudFoundryClient, String serviceId, String plan, String planId) { + when(cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .serviceId(serviceId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListServicePlansResponse.builder()) + .resource( + ServicePlanResource.builder() + .metadata( + fill(Metadata.builder()) + .id(planId) + .build()) + .entity( + fill(ServicePlanEntity.builder()) + .name(plan) + .publiclyVisible(false) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServices( + CloudFoundryClient cloudFoundryClient, String spaceId, String serviceLabel) { + when(cloudFoundryClient + .spaces() + .listServices( + ListSpaceServicesRequest.builder() + .label(serviceLabel) + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServicesResponse.builder()) + .resource( + ServiceResource.builder() + .metadata( + fill(Metadata.builder()) + .id(serviceLabel + "-id") + .build()) + .entity( + fill(ServiceEntity.builder()) + .description( + serviceLabel + + "-description") + .label(serviceLabel) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceServicesTwo( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String serviceLabel1, + String serviceLabel2) { + when(cloudFoundryClient + .spaces() + .listServices( + ListSpaceServicesRequest.builder() + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServicesResponse.builder()) + .resource( + ServiceResource.builder() + .metadata( + fill(Metadata.builder()) + .id(serviceLabel1 + "-id") + .build()) + .entity( + fill(ServiceEntity.builder()) + .description( + serviceLabel1 + + "-description") + .label(serviceLabel1) + .build()) + .build()) + .resource( + ServiceResource.builder() + .metadata( + fill(Metadata.builder()) + .id(serviceLabel2 + "-id") + .build()) + .entity( + fill(ServiceEntity.builder()) + .description( + serviceLabel2 + + "-description") + .label(serviceLabel2) + .build()) + .build()) + .build())); + } + + private static void requestRemoveUserProvidedServiceInstanceRoute( + CloudFoundryClient cloudFoundryClient, String routeId, String serviceInstanceId) { + when(cloudFoundryClient + .userProvidedServiceInstances() + .removeRoute( + RemoveUserProvidedServiceInstanceRouteRequest.builder() + .routeId(routeId) + .userProvidedServiceInstanceId(serviceInstanceId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestRenameServiceInstance( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId, String newName) { + when(cloudFoundryClient + .serviceInstances() + .update( + org.cloudfoundry.client.v2.serviceinstances + .UpdateServiceInstanceRequest.builder() + .name(newName) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenReturn(Mono.just(fill(UpdateServiceInstanceResponse.builder()).build())); + } + + private static void requestUpdateServiceInstance( + CloudFoundryClient cloudFoundryClient, + Map parameter, + String serviceInstanceId, + String servicePlanId, + List tags) { + when(cloudFoundryClient + .serviceInstances() + .update( + org.cloudfoundry.client.v2.serviceinstances + .UpdateServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .parameters(parameter) + .serviceInstanceId(serviceInstanceId) + .servicePlanId(servicePlanId) + .tags(tags) + .build())) + .thenReturn(Mono.just(fill(UpdateServiceInstanceResponse.builder()).build())); + } + + private static void requestUpdateUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, + Map credentials, + String syslogDrainUrl, + List tags, + String userProvidedServiceInstanceId) { + when(cloudFoundryClient + .userProvidedServiceInstances() + .update( + org.cloudfoundry.client.v2.userprovidedserviceinstances + .UpdateUserProvidedServiceInstanceRequest.builder() + .credentials(credentials) + .syslogDrainUrl(syslogDrainUrl) + .tags(tags) + .userProvidedServiceInstanceId( + userProvidedServiceInstanceId) + .build())) + .thenReturn( + Mono.just( + fill(UpdateUserProvidedServiceInstanceResponse.builder()).build())); + } + + private void requestListSharedDomains(CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().name(name).page(1).build())) + .thenReturn( + Mono.just( + fill(ListSharedDomainsResponse.builder()) + .resource( + fill( + SharedDomainResource.builder(), + "shared-domain-") + .build()) + .build())); + } + + private void requestListSharedDomainsEmpty(CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().name(name).page(1).build())) + .thenReturn(Mono.just(fill(ListSharedDomainsResponse.builder()).build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DeleteServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DeleteServiceInstanceRequestTest.java new file mode 100644 index 00000000000..f5b1b5222fc --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DeleteServiceInstanceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceInstanceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteServiceInstanceRequest.builder().name("test-service-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DeleteServiceKeyRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DeleteServiceKeyRequestTest.java new file mode 100644 index 00000000000..9302c4568d7 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/DeleteServiceKeyRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteServiceKeyRequestTest { + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceKeyRequest.builder() + .serviceKeyName("test-service-key-name") + .build(); + }); + } + + @Test + void noServiceKeyName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void valid() { + DeleteServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .serviceKeyName("test-service-key-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/GetServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/GetServiceInstanceRequestTest.java new file mode 100644 index 00000000000..21ccc6ce667 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/GetServiceInstanceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceInstanceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + GetServiceInstanceRequest.builder().name("test-service-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/GetServiceKeyRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/GetServiceKeyRequestTest.java new file mode 100644 index 00000000000..9c08e084dac --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/GetServiceKeyRequestTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetServiceKeyRequestTest { + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceKeyRequest.builder().serviceKeyName("test-service-key-name").build(); + }); + } + + @Test + void noServiceKeyName() { + assertThrows( + IllegalStateException.class, + () -> { + GetServiceKeyRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void valid() { + GetServiceKeyRequest.builder() + .serviceKeyName("test-service-key-name") + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/ListServiceKeysRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/ListServiceKeysRequestTest.java new file mode 100644 index 00000000000..dd20f491648 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/ListServiceKeysRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +class ListServiceKeysRequestTest { + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + ListServiceKeysRequest.builder().build(); + }); + } + + @Test + void valid() { + ListServiceKeysRequest.builder().serviceInstanceName("service-instance").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/ListServiceOfferingsRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/ListServiceOfferingsRequestTest.java new file mode 100644 index 00000000000..f099acf4624 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/ListServiceOfferingsRequestTest.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import org.junit.jupiter.api.Test; + +final class ListServiceOfferingsRequestTest { + + @Test + void valid() { + ListServiceOfferingsRequest.builder().build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/RenameServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/RenameServiceInstanceRequestTest.java new file mode 100644 index 00000000000..6f1ffd5a8f9 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/RenameServiceInstanceRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RenameServiceInstanceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameServiceInstanceRequest.builder().newName("test-service-new-name").build(); + }); + } + + @Test + void noNewName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameServiceInstanceRequest.builder().name("test-service-name").build(); + }); + } + + @Test + void valid() { + RenameServiceInstanceRequest.builder() + .name("test-service-name") + .newName("test-service-new-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UnbindRouteServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UnbindRouteServiceInstanceRequestTest.java new file mode 100644 index 00000000000..b97828a457f --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UnbindRouteServiceInstanceRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnbindRouteServiceInstanceRequestTest { + + @Test + void noDomainName() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindRouteServiceInstanceRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .build(); + }); + } + + @Test + void valid() { + UnbindRouteServiceInstanceRequest.builder() + .domainName("test-domain-name") + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UnbindServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UnbindServiceInstanceRequestTest.java new file mode 100644 index 00000000000..5a264abeb4c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UnbindServiceInstanceRequestTest.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnbindServiceInstanceRequestTest { + + @Test + void noApplicationName() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindServiceInstanceRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + }); + } + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + UnbindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .build(); + }); + } + + @Test + void valid() { + UnbindServiceInstanceRequest.builder() + .applicationName("test-application-name") + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UpdateServiceInstanceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UpdateServiceInstanceRequestTest.java new file mode 100644 index 00000000000..2071b58f573 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/services/UpdateServiceInstanceRequestTest.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.services; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UpdateServiceInstanceRequestTest { + + @Test + void noServiceInstanceName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateServiceInstanceRequest.builder().build(); + }); + } + + @Test + void valid() { + UpdateServiceInstanceRequest.builder() + .serviceInstanceName("test-service-instance-name") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaceadmin/DefaultSpaceAdminTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaceadmin/DefaultSpaceAdminTest.java new file mode 100644 index 00000000000..41501276bf3 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaceadmin/DefaultSpaceAdminTest.java @@ -0,0 +1,121 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaceadmin; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultSpaceAdminTest extends AbstractOperationsTest { + + private final DefaultSpaceAdmin spaceAdmin = + new DefaultSpaceAdmin( + Mono.just(this.cloudFoundryClient), Mono.just(TEST_ORGANIZATION_ID)); + + @Test + void get() { + requestSpaceQuotaDefinitions(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + + this.spaceAdmin + .get( + GetSpaceQuotaRequest.builder() + .name("test-space-quota-definition-name") + .build()) + .as(StepVerifier::create) + .expectNext(fill(SpaceQuota.builder(), "space-quota-definition-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getNotFound() { + requestSpaceQuotaDefinitionsEmpty(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + + this.spaceAdmin + .get( + GetSpaceQuotaRequest.builder() + .name("test-space-quota-definition-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Space Quota test-space-quota-definition-name does" + + " not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + requestSpaceQuotaDefinitions(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + + this.spaceAdmin + .listQuotas() + .as(StepVerifier::create) + .expectNext(fill(SpaceQuota.builder(), "space-quota-definition-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestSpaceQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpaceQuotaDefinitionsResponse.builder()) + .resource( + fill( + SpaceQuotaDefinitionResource + .builder(), + "space-quota-definition-") + .build()) + .build())); + } + + private static void requestSpaceQuotaDefinitionsEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpaceQuotaDefinitionsResponse.builder()) + .build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaceadmin/GetSpaceQuotaRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaceadmin/GetSpaceQuotaRequestTest.java new file mode 100644 index 00000000000..20666ff1cfa --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaceadmin/GetSpaceQuotaRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaceadmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceQuotaRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetSpaceQuotaRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSpaceQuotaRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/AllowSpaceSshRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/AllowSpaceSshRequestTest.java new file mode 100644 index 00000000000..3e6d809cabf --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/AllowSpaceSshRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class AllowSpaceSshRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + AllowSpaceSshRequest.builder().build(); + }); + } + + @Test + void valid() { + AllowSpaceSshRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/CreateSpaceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/CreateSpaceRequestTest.java new file mode 100644 index 00000000000..e0a70bf048c --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/CreateSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateSpaceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + CreateSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + CreateSpaceRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DefaultSpacesTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DefaultSpacesTest.java new file mode 100644 index 00000000000..7a77417f0aa --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DefaultSpacesTest.java @@ -0,0 +1,1051 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.Optional; +import java.util.Queue; +import java.util.function.Supplier; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainEntity; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.securitygroups.RuleEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsResponse; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainEntity; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesResponse; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceResponse; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.cloudfoundry.operations.spaceadmin.SpaceQuota; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DefaultSpacesTest extends AbstractOperationsTest { + + private final DefaultSpaces spaces = + new DefaultSpaces( + Mono.just(this.cloudFoundryClient), + Mono.just(TEST_ORGANIZATION_ID), + Mono.just(TEST_USERNAME)); + + @Test + void allowSsh() { + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-spaceQuotaDefinitionId"); + requestUpdateSpaceSsh(this.cloudFoundryClient, "test-space-id", true); + + this.spaces + .allowSsh(AllowSpaceSshRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void allowSshAlreadyAllowed() { + requestOrganizationSpacesWithSsh( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name", true); + + this.spaces + .allowSsh(AllowSpaceSshRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void allowSshNoSpace() { + requestOrganizationSpacesEmpty( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name"); + + this.spaces + .allowSsh(AllowSpaceSshRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-space-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createNoOrgNoQuota() { + requestCreateSpace( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + null, + "test-space-id"); + requestAssociateOrganizationUserByUsername( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_USERNAME); + requestAssociateSpaceManagerByUsername( + this.cloudFoundryClient, "test-space-id", TEST_USERNAME); + requestAssociateSpaceDeveloperByUsername( + this.cloudFoundryClient, "test-space-id", TEST_USERNAME); + + this.spaces + .create(CreateSpaceRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createNoOrgQuota() { + requestOrganizationSpaceQuotas( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-quota", + "test-space-quota-id"); + requestCreateSpace( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-quota-id", + "test-space-id"); + requestAssociateOrganizationUserByUsername( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_USERNAME); + requestAssociateSpaceManagerByUsername( + this.cloudFoundryClient, "test-space-id", TEST_USERNAME); + requestAssociateSpaceDeveloperByUsername( + this.cloudFoundryClient, "test-space-id", TEST_USERNAME); + + this.spaces + .create( + CreateSpaceRequest.builder() + .name("test-space-name") + .spaceQuota("test-space-quota") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void createNoOrgQuotaNotFound() { + requestOrganizationSpaceQuotas( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-quota", null); + + this.spaces + .create( + CreateSpaceRequest.builder() + .name("test-space-name") + .spaceQuota("test-space-quota") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Space quota definition test-space-quota does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createOrgNotFound() { + requestOrganizations(this.cloudFoundryClient, "test-other-organization", null); + + this.spaces + .create( + CreateSpaceRequest.builder() + .name("test-space-name") + .spaceQuota("test-space-quota") + .organization("test-other-organization") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Organization test-other-organization does not" + + " exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void createOrgQuota() { + requestOrganizations( + this.cloudFoundryClient, "test-other-organization", "test-other-organization-id"); + requestOrganizationSpaceQuotas( + this.cloudFoundryClient, + "test-other-organization-id", + "test-space-quota", + "test-space-quota-id"); + requestCreateSpace( + this.cloudFoundryClient, + "test-other-organization-id", + "test-space-name", + "test-space-quota-id", + "test-space-id"); + requestAssociateOrganizationUserByUsername( + this.cloudFoundryClient, "test-other-organization-id", TEST_USERNAME); + requestAssociateSpaceManagerByUsername( + this.cloudFoundryClient, "test-space-id", TEST_USERNAME); + requestAssociateSpaceDeveloperByUsername( + this.cloudFoundryClient, "test-space-id", TEST_USERNAME); + + this.spaces + .create( + CreateSpaceRequest.builder() + .name("test-space-name") + .organization("test-other-organization") + .spaceQuota("test-space-quota") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-spaceQuotaDefinitionId"); + requestDeleteSpace(this.cloudFoundryClient, "test-space-id"); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.spaces.delete( + DeleteSpaceRequest.builder() + .name("test-space-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteFailure() { + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-spaceQuotaDefinitionId"); + requestDeleteSpace(this.cloudFoundryClient, "test-space-id"); + requestJobFailure(this.cloudFoundryClient, "test-job-entity-id"); + + StepVerifier.withVirtualTime( + () -> + this.spaces.delete( + DeleteSpaceRequest.builder() + .name("test-space-name") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-error-details-errorCode(1):" + + " test-error-details-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteInvalidSpace() { + requestOrganizationSpacesEmpty( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name"); + + this.spaces + .delete(DeleteSpaceRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-space-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void disallowSsh() { + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-spaceQuotaDefinitionId"); + requestUpdateSpaceSsh(this.cloudFoundryClient, "test-space-id", false); + + this.spaces + .disallowSsh(DisallowSpaceSshRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disallowSshAlreadyDisallowed() { + requestOrganizationSpacesWithSsh( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name", false); + + this.spaces + .disallowSsh(DisallowSpaceSshRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void disallowSshNoSpace() { + requestOrganizationSpacesEmpty( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name"); + + this.spaces + .disallowSsh(DisallowSpaceSshRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-space-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void get() { + requestOrganization(this.cloudFoundryClient, "test-space-organizationId"); + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + TEST_SPACE_NAME, + "test-space-spaceQuotaDefinitionId"); + requestSpaceApplications(this.cloudFoundryClient, TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, "test-space-organizationId"); + requestSharedDomains(this.cloudFoundryClient); + requestSpaceSecurityGroups(this.cloudFoundryClient, TEST_SPACE_ID); + requestSpaceServices(this.cloudFoundryClient, TEST_SPACE_ID); + requestSpaceQuotaDefinition(this.cloudFoundryClient, "test-space-spaceQuotaDefinitionId"); + + this.spaces + .get( + GetSpaceRequest.builder() + .name("test-space-name") + .securityGroupRules(true) + .build()) + .as(StepVerifier::create) + .expectNext( + SpaceDetail.builder() + .application("test-application-name") + .domains("test-private-domain-name", "test-shared-domain-name") + .id(TEST_SPACE_ID) + .name(TEST_SPACE_NAME) + .organization("test-organization-name") + .securityGroup( + SecurityGroup.builder() + .name("test-security-group-name") + .rule( + fill(Rule.builder(), "security-group-") + .build()) + .build()) + .service("test-service-label") + .spaceQuota( + Optional.of( + fill( + SpaceQuota.builder(), + "space-quota-definition-") + .build())) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getNoSecurityGroupRules() { + requestOrganization(this.cloudFoundryClient, "test-space-organizationId"); + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + TEST_SPACE_NAME, + "test-space-spaceQuotaDefinitionId"); + requestSpaceApplications(this.cloudFoundryClient, TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, "test-space-organizationId"); + requestSharedDomains(this.cloudFoundryClient); + requestSpaceSecurityGroups(this.cloudFoundryClient, TEST_SPACE_ID); + requestSpaceServices(this.cloudFoundryClient, TEST_SPACE_ID); + requestSpaceQuotaDefinition(this.cloudFoundryClient, "test-space-spaceQuotaDefinitionId"); + + this.spaces + .get(GetSpaceRequest.builder().name(TEST_SPACE_NAME).build()) + .as(StepVerifier::create) + .expectNext( + SpaceDetail.builder() + .application("test-application-name") + .domains("test-private-domain-name", "test-shared-domain-name") + .id(TEST_SPACE_ID) + .name(TEST_SPACE_NAME) + .organization("test-organization-name") + .securityGroup( + SecurityGroup.builder() + .name("test-security-group-name") + .build()) + .service("test-service-label") + .spaceQuota( + Optional.of( + fill( + SpaceQuota.builder(), + "space-quota-definition-") + .build())) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void getSpaceQuotaNull() { + requestOrganization(this.cloudFoundryClient, "test-space-organizationId"); + requestOrganizationSpaces( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, TEST_SPACE_NAME, null); + requestSpaceApplications(this.cloudFoundryClient, TEST_SPACE_ID); + requestPrivateDomains(this.cloudFoundryClient, "test-space-organizationId"); + requestSharedDomains(this.cloudFoundryClient); + requestSpaceSecurityGroups(this.cloudFoundryClient, TEST_SPACE_ID); + requestSpaceServices(this.cloudFoundryClient, TEST_SPACE_ID); + + this.spaces + .get( + GetSpaceRequest.builder() + .name(TEST_SPACE_NAME) + .securityGroupRules(false) + .build()) + .as(StepVerifier::create) + .expectNext( + SpaceDetail.builder() + .application("test-application-name") + .domains("test-private-domain-name", "test-shared-domain-name") + .id(TEST_SPACE_ID) + .name(TEST_SPACE_NAME) + .organization("test-organization-name") + .securityGroup( + SecurityGroup.builder() + .name("test-security-group-name") + .build()) + .service("test-service-label") + .spaceQuota(Optional.empty()) + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void list() { + requestSpaces(this.cloudFoundryClient, TEST_ORGANIZATION_ID); + + this.spaces + .list() + .as(StepVerifier::create) + .expectNext(fill(SpaceSummary.builder(), "space-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void rename() { + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-spaceQuotaDefinitionId"); + requestUpdateSpace(this.cloudFoundryClient, "test-space-id", "test-new-space-name"); + + this.spaces + .rename( + RenameSpaceRequest.builder() + .name("test-space-name") + .newName("test-new-space-name") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void renameNoSpace() { + requestOrganizationSpacesEmpty( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name"); + + this.spaces + .rename( + RenameSpaceRequest.builder() + .name("test-space-name") + .newName("test-new-space-name") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-space-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void sshAllowed() { + requestOrganizationSpaces( + this.cloudFoundryClient, + TEST_ORGANIZATION_ID, + "test-space-name", + "test-space-spaceQuotaDefinitionId"); + + this.spaces + .sshAllowed(SpaceSshAllowedRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void sshAllowedNoSpace() { + requestOrganizationSpacesEmpty( + this.cloudFoundryClient, TEST_ORGANIZATION_ID, "test-space-name"); + + this.spaces + .sshAllowed(SpaceSshAllowedRequest.builder().name("test-space-name").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Space test-space-name does not exist")) + .verify(Duration.ofSeconds(5)); + } + + private static void requestAssociateOrganizationUserByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + when(cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + AssociateOrganizationUserByUsernameResponse + .builder(), + "associate-user-") + .build())); + } + + private static void requestAssociateSpaceDeveloperByUsername( + CloudFoundryClient cloudFoundryClient, String spaceId, String username) { + when(cloudFoundryClient + .spaces() + .associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest.builder() + .spaceId(spaceId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + AssociateSpaceDeveloperByUsernameResponse.builder(), + "associate-developer-") + .build())); + } + + private static void requestAssociateSpaceManagerByUsername( + CloudFoundryClient cloudFoundryClient, String spaceId, String username) { + when(cloudFoundryClient + .spaces() + .associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId(spaceId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + AssociateSpaceManagerByUsernameResponse.builder(), + "associate-manager-") + .build())); + } + + private static void requestCreateSpace( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String space, + String spaceQuotaId, + String spaceId) { + when(cloudFoundryClient + .spaces() + .create( + org.cloudfoundry.client.v2.spaces.CreateSpaceRequest.builder() + .name(space) + .organizationId(organizationId) + .spaceQuotaDefinitionId(spaceQuotaId) + .build())) + .thenReturn( + Mono.just( + fill(CreateSpaceResponse.builder()) + .metadata(fill(Metadata.builder()).id(spaceId).build()) + .build())); + } + + private static void requestDeleteSpace(CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .delete( + org.cloudfoundry.client.v2.spaces.DeleteSpaceRequest.builder() + .async(true) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(DeleteSpaceResponse.builder()) + .entity(fill(JobEntity.builder(), "job-entity-").build()) + .build())); + } + + private static void requestJobFailure(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .errorDetails( + fill( + ErrorDetails + .builder(), + "error-details-") + .build()) + .status( + "failed") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestJobSuccess(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "finished") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .get( + GetOrganizationRequest.builder() + .organizationId(organizationId) + .build())) + .thenReturn( + Mono.just( + fill(GetOrganizationResponse.builder(), "organization-").build())); + } + + private static void requestOrganizationSpaceQuotas( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String spaceQuota, + String spaceQuotaId) { + ListOrganizationSpaceQuotaDefinitionsResponse.Builder responseBuilder = + fill(ListOrganizationSpaceQuotaDefinitionsResponse.builder()); + + if (spaceQuotaId != null) { + responseBuilder.resource( + SpaceQuotaDefinitionResource.builder() + .metadata(fill(Metadata.builder()).id(spaceQuotaId).build()) + .entity(SpaceQuotaDefinitionEntity.builder().name(spaceQuota).build()) + .build()); + } + + when(cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn(Mono.just(responseBuilder.build())); + } + + private static void requestOrganizationSpaces( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String space, + String spaceQuotaDefinitionId) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource( + fill(SpaceResource.builder(), "space-") + .entity( + fill( + SpaceEntity + .builder(), + "space-") + .spaceQuotaDefinitionId( + spaceQuotaDefinitionId) + .build()) + .build()) + .build())); + } + + private static void requestOrganizationSpacesEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId, String space) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationSpacesResponse.builder()).build())); + } + + private static void requestOrganizationSpacesWithSsh( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String space, + Boolean allowSsh) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(space) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource( + fill(SpaceResource.builder(), "space-") + .entity( + fill( + SpaceEntity + .builder(), + "space-entity-") + .allowSsh(allowSsh) + .build()) + .build()) + .build())); + } + + private static void requestOrganizations( + CloudFoundryClient cloudFoundryClient, String organization, String organizationId) { + ListOrganizationsResponse.Builder responseBuilder = + fill(ListOrganizationsResponse.builder(), "organization-"); + + if (organizationId != null) { + responseBuilder.resource( + fill(OrganizationResource.builder()) + .metadata(fill(Metadata.builder()).id(organizationId).build()) + .build()); + } + + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organization) + .page(1) + .build())) + .thenReturn(Mono.just(responseBuilder.build())); + } + + private static void requestPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .organizations() + .listPrivateDomains( + ListOrganizationPrivateDomainsRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationPrivateDomainsResponse.builder()) + .resource( + fill(PrivateDomainResource.builder()) + .entity( + fill(PrivateDomainEntity.builder()) + .name( + "test-private-domain-name") + .build()) + .build()) + .build())); + } + + private static void requestSharedDomains(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + ListSharedDomainsResponse.builder() + .resource( + fill(SharedDomainResource.builder()) + .entity( + fill(SharedDomainEntity.builder()) + .name( + "test-shared-domain-name") + .build()) + .build()) + .build())); + } + + private static void requestSpaceApplications( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listApplications( + ListSpaceApplicationsRequest.builder() + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceApplicationsResponse.builder()) + .resource( + fill(ApplicationResource.builder(), "application-") + .build()) + .build())); + } + + private static void requestSpaceQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String spaceQuotaDefinitionId) { + when(cloudFoundryClient + .spaceQuotaDefinitions() + .get( + GetSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId(spaceQuotaDefinitionId) + .build())) + .thenReturn( + Mono.just( + fill( + GetSpaceQuotaDefinitionResponse.builder(), + "space-quota-definition-") + .build())); + } + + private static void requestSpaceSecurityGroups( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listSecurityGroups( + ListSpaceSecurityGroupsRequest.builder() + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceSecurityGroupsResponse.builder()) + .resource( + fill( + SecurityGroupResource.builder(), + "security-group-") + .entity( + fill( + SecurityGroupEntity + .builder(), + "security-group-") + .rule( + fill( + RuleEntity + .builder(), + "security-group-") + .build()) + .build()) + .build()) + .build())); + } + + private static void requestSpaceServices( + CloudFoundryClient cloudFoundryClient, String spaceId) { + when(cloudFoundryClient + .spaces() + .listServices( + ListSpaceServicesRequest.builder() + .page(1) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceServicesResponse.builder()) + .resource( + fill(ServiceResource.builder(), "service-").build()) + .build())); + } + + private static void requestSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + when(cloudFoundryClient + .spaces() + .list( + ListSpacesRequest.builder() + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpacesResponse.builder()) + .resource(fill(SpaceResource.builder(), "space-").build()) + .build())); + } + + private static void requestUpdateSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String newName) { + when(cloudFoundryClient + .spaces() + .update( + UpdateSpaceRequest.builder() + .name(newName) + .spaceId(spaceId) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestUpdateSpaceSsh( + CloudFoundryClient cloudFoundryClient, String spaceId, Boolean allowed) { + when(cloudFoundryClient + .spaces() + .update( + UpdateSpaceRequest.builder() + .allowSsh(allowed) + .spaceId(spaceId) + .build())) + .thenReturn( + Mono.just( + fill(UpdateSpaceResponse.builder()) + .entity( + fill(SpaceEntity.builder(), "space-entity-") + .build()) + .build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DeleteSpaceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DeleteSpaceRequestTest.java new file mode 100644 index 00000000000..9df963b2e2d --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DeleteSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteSpaceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteSpaceRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DisallowSpaceSshRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DisallowSpaceSshRequestTest.java new file mode 100644 index 00000000000..aeb1c06d86f --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/DisallowSpaceSshRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DisallowSpaceSshRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + DisallowSpaceSshRequest.builder().build(); + }); + } + + @Test + void valid() { + DisallowSpaceSshRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/GetSpaceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/GetSpaceRequestTest.java new file mode 100644 index 00000000000..7adfb43dc94 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/GetSpaceRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetSpaceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetSpaceRequest.builder().build(); + }); + } + + @Test + void valid() { + GetSpaceRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/RenameSpaceRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/RenameSpaceRequestTest.java new file mode 100644 index 00000000000..b76a64d8859 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/RenameSpaceRequestTest.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class RenameSpaceRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameSpaceRequest.builder().newName("new-name").build(); + }); + } + + @Test + void noNewName() { + assertThrows( + IllegalStateException.class, + () -> { + RenameSpaceRequest.builder().name("name").build(); + }); + } + + @Test + void valid() { + RenameSpaceRequest.builder().name("test-name").newName("test-new-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/SpaceSshAllowedRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/SpaceSshAllowedRequestTest.java new file mode 100644 index 00000000000..ec960f63478 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/spaces/SpaceSshAllowedRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.spaces; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SpaceSshAllowedRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + SpaceSshAllowedRequest.builder().build(); + }); + } + + @Test + void valid() { + SpaceSshAllowedRequest.builder().name("test-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/stacks/DefaultStacksTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/stacks/DefaultStacksTest.java new file mode 100644 index 00000000000..1fb16350420 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/stacks/DefaultStacksTest.java @@ -0,0 +1,79 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.stacks; + +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.stacks.ListStacksRequest; +import org.cloudfoundry.client.v3.stacks.ListStacksResponse; +import org.cloudfoundry.client.v3.stacks.StackResource; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class DefaultStacksTest extends AbstractOperationsTest { + + private final DefaultStacks stacks = new DefaultStacks(Mono.just(this.cloudFoundryClient)); + + @Test + void getStack() { + requestStacks(this.cloudFoundryClient, "test-stack-name"); + + this.stacks + .get(GetStackRequest.builder().name("test-stack-name").build()) + .as(StepVerifier::create) + .expectNext(fill(Stack.builder(), "stack-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listStacks() { + requestStacks(this.cloudFoundryClient); + + this.stacks + .list() + .as(StepVerifier::create) + .expectNext(fill(Stack.builder(), "stack-").build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + private static void requestStacks(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient.stacksV3().list(ListStacksRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + fill(ListStacksResponse.builder()) + .resource(fill(StackResource.builder(), "stack-").build()) + .build())); + } + + private static void requestStacks(CloudFoundryClient cloudFoundryClient, String name) { + when(cloudFoundryClient + .stacksV3() + .list(ListStacksRequest.builder().name(name).page(1).build())) + .thenReturn( + Mono.just( + fill(ListStacksResponse.builder()) + .resource(fill(StackResource.builder(), "stack-").build()) + .build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/stacks/GetStackRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/stacks/GetStackRequestTest.java new file mode 100644 index 00000000000..2d5ae0748fb --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/stacks/GetStackRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.stacks; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class GetStackRequestTest { + + @Test + void noName() { + assertThrows( + IllegalStateException.class, + () -> { + GetStackRequest.builder().build(); + }); + } + + @Test + void valid() { + GetStackRequest.builder().name("test-stack-name").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/CreateUserRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/CreateUserRequestTest.java new file mode 100644 index 00000000000..71afca339c0 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/CreateUserRequestTest.java @@ -0,0 +1,60 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class CreateUserRequestTest { + + @Test + void bothOriginAndPassword() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder() + .origin("test-origin") + .password("test-password") + .username("test-username") + .build(); + }); + } + + @Test + void noOriginOrPassword() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder().username("test-username").build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + CreateUserRequest.builder().password("test-password").build(); + }); + } + + @Test + void valid() { + CreateUserRequest.builder().password("test-password").username("test-username").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/DefaultUserAdminTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/DefaultUserAdminTest.java new file mode 100644 index 00000000000..2548163ca2e --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/DefaultUserAdminTest.java @@ -0,0 +1,1343 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.TestObjects.fill; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.Queue; +import java.util.function.Supplier; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.Metadata; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagResponse; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesResponse; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsResponse; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersResponse; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.users.DeleteUserResponse; +import org.cloudfoundry.client.v2.users.UserEntity; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.operations.AbstractOperationsTest; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.UaaException; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.Meta; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.uaa.users.User; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DefaultUserAdminTest extends AbstractOperationsTest { + + private final DefaultUserAdmin userAdmin = + new DefaultUserAdmin(Mono.just(this.cloudFoundryClient), Mono.just(this.uaaClient)); + + @Test + void createUaaUserExists() { + requestCreateUaaUserAlreadyExists(this.uaaClient); + requestCreateUser(this.cloudFoundryClient); + + this.userAdmin + .create( + CreateUserRequest.builder() + .username("test-username") + .password("test-password") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("User test-username already exists") + .verify(Duration.ofSeconds(5)); + } + + @Test + void createWithPassword() { + requestCreateUaaUser(this.uaaClient); + requestCreateUser(this.cloudFoundryClient); + + this.userAdmin + .create( + CreateUserRequest.builder() + .username("test-username") + .password("test-password") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void delete() { + requestListUser(this.uaaClient); + requestDeleteUser(this.cloudFoundryClient); + requestJobSuccess(this.cloudFoundryClient, "test-job-entity-id"); + requestDeleteUaaUser(this.uaaClient); + + StepVerifier.withVirtualTime( + () -> + this.userAdmin.delete( + DeleteUserRequest.builder() + .username("test-username") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteFailure() { + requestListUser(this.uaaClient); + requestDeleteUser(this.cloudFoundryClient); + requestJobFailure(this.cloudFoundryClient, "test-job-entity-id"); + requestDeleteUaaUser(this.uaaClient); + + StepVerifier.withVirtualTime( + () -> + this.userAdmin.delete( + DeleteUserRequest.builder() + .username("test-username") + .build())) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(3))) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessage( + "test-error-details-errorCode(1):" + + " test-error-details-description")) + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteNoCfUser() { + requestListUser(this.uaaClient); + requestDeleteUserEmpty(this.cloudFoundryClient); + requestDeleteUaaUser(this.uaaClient); + + this.userAdmin + .delete(DeleteUserRequest.builder().username("test-username").build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void deleteNoUaaUser() { + requestListUserEmpty(this.uaaClient); + + this.userAdmin + .delete(DeleteUserRequest.builder().username("test-username").build()) + .as(StepVerifier::create) + .expectErrorMessage("User test-username does not exist") + .verify(Duration.ofSeconds(5)); + } + + @Test + void listOrganizationUsersAllFound() { + requestOrganization(this.cloudFoundryClient); + requestListOrganizationAuditors(this.cloudFoundryClient); + requestListOrganizationBillingManagers(this.cloudFoundryClient); + requestListOrganizationManagers(this.cloudFoundryClient); + + this.userAdmin + .listOrganizationUsers( + ListOrganizationUsersRequest.builder() + .organizationName("test-organization-name") + .build()) + .as(StepVerifier::create) + .expectNext( + OrganizationUsers.builder() + .auditor("test-auditor-username") + .billingManager("test-billing-manager-username") + .manager("test-manager-username") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listOrganizationUsersNoneFound() { + requestOrganization(this.cloudFoundryClient); + requestListOrganizationAuditorsEmpty(this.cloudFoundryClient); + requestListOrganizationBillingManagersEmpty(this.cloudFoundryClient); + requestListOrganizationManagersEmpty(this.cloudFoundryClient); + + this.userAdmin + .listOrganizationUsers( + ListOrganizationUsersRequest.builder() + .organizationName("test-organization-name") + .build()) + .as(StepVerifier::create) + .expectNext(OrganizationUsers.builder().build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listOrganizationUsersOrganizationNotFound() { + requestOrganizationEmpty(this.cloudFoundryClient); + + this.userAdmin + .listOrganizationUsers( + ListOrganizationUsersRequest.builder() + .organizationName("unknown-organization-name") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Organization unknown-organization-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaceUsersAllFound() { + requestOrganization(this.cloudFoundryClient); + requestSpace(this.cloudFoundryClient); + requestListSpaceAuditors(this.cloudFoundryClient); + requestListSpaceDevelopers(this.cloudFoundryClient); + requestListSpaceManagers(this.cloudFoundryClient); + + this.userAdmin + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .build()) + .as(StepVerifier::create) + .expectNext( + SpaceUsers.builder() + .auditor("test-auditor-username") + .developer("test-developer-username") + .manager("test-manager-username") + .build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaceUsersNoneFound() { + requestOrganization(this.cloudFoundryClient); + requestSpace(this.cloudFoundryClient); + requestListSpaceAuditorsEmpty(this.cloudFoundryClient); + requestListSpaceDevelopersEmpty(this.cloudFoundryClient); + requestListSpaceManagersEmpty(this.cloudFoundryClient); + + this.userAdmin + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .build()) + .as(StepVerifier::create) + .expectNext(SpaceUsers.builder().build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaceUsersNullsFound() { + requestOrganization(this.cloudFoundryClient); + requestSpace(this.cloudFoundryClient); + requestListSpaceAuditorsNulls(this.cloudFoundryClient); + requestListSpaceDevelopersNulls(this.cloudFoundryClient); + requestListSpaceManagersNulls(this.cloudFoundryClient); + + this.userAdmin + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .build()) + .as(StepVerifier::create) + .expectNext(SpaceUsers.builder().build()) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaceUsersOrganizationNotFound() { + requestOrganizationEmpty(this.cloudFoundryClient); + + this.userAdmin + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName("unknown-organization-name") + .spaceName("test-space-name") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Organization unknown-organization-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void listSpaceUsersSpaceNotFound() { + requestOrganization(this.cloudFoundryClient); + requestSpaceEmpty(this.cloudFoundryClient); + + this.userAdmin + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName("test-organization-name") + .spaceName("unknown-space-name") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Space unknown-space-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void setOrganizationRole() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", true); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestAssociateOrganizationUserByUsername( + this.cloudFoundryClient, "test-organization-id", "test-username"); + requestAssociateOrganizationAuditorByUsername( + this.cloudFoundryClient, "test-organization-id", "test-username"); + + this.userAdmin + .setOrganizationRole( + SetOrganizationRoleRequest.builder() + .organizationName("test-organization-name") + .organizationRole(OrganizationRole.AUDITOR) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setOrganizationRoleFeatureDisabled() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", false); + + this.userAdmin + .setOrganizationRole( + SetOrganizationRoleRequest.builder() + .organizationName("test-organization-name") + .organizationRole(OrganizationRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Setting roles by username is not enabled") + .verify(Duration.ofSeconds(5)); + } + + @Test + void setOrganizationRoleInvalidOrganization() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", true); + requestListOrganizationsEmpty(this.cloudFoundryClient, "test-organization-name"); + + this.userAdmin + .setOrganizationRole( + SetOrganizationRoleRequest.builder() + .organizationName("test-organization-name") + .organizationRole(OrganizationRole.BILLING_MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Organization test-organization-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void setSpaceRole() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", true); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestListOrganizationSpaces( + this.cloudFoundryClient, "test-organization-id", "test-space-name"); + requestAssociateOrganizationUserByUsername( + this.cloudFoundryClient, "test-organization-id", "test-username"); + requestAssociateSpaceManagerByUsername( + this.cloudFoundryClient, "test-space-id", "test-username"); + + this.userAdmin + .setSpaceRole( + SetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void setSpaceRoleFeatureDisabled() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", false); + + this.userAdmin + .setSpaceRole( + SetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Setting roles by username is not enabled") + .verify(Duration.ofSeconds(5)); + } + + @Test + void setSpaceRoleInvalidOrganization() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", true); + requestListOrganizationsEmpty(this.cloudFoundryClient, "test-organization-name"); + + this.userAdmin + .setSpaceRole( + SetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Organization test-organization-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void setSpaceRoleInvalidSpace() { + requestGetFeatureFlag(this.cloudFoundryClient, "set_roles_by_username", true); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestListOrganizationSpacesEmpty( + this.cloudFoundryClient, "test-organization-id", "test-space-name"); + + this.userAdmin + .setSpaceRole( + SetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Space test-space-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetOrganizationRole() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", true); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestRemoveOrganizationManagerByUsername( + this.cloudFoundryClient, "test-organization-id", "test-username"); + + this.userAdmin + .unsetOrganizationRole( + UnsetOrganizationRoleRequest.builder() + .organizationName("test-organization-name") + .organizationRole(OrganizationRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetOrganizationRoleFeatureDisabled() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", false); + + this.userAdmin + .unsetOrganizationRole( + UnsetOrganizationRoleRequest.builder() + .organizationName("test-organization-name") + .organizationRole(OrganizationRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Unsetting roles by username is not enabled") + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetOrganizationRoleInvalidOrganization() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", true); + requestListOrganizationsEmpty(this.cloudFoundryClient, "test-organization-name"); + + this.userAdmin + .unsetOrganizationRole( + UnsetOrganizationRoleRequest.builder() + .organizationName("test-organization-name") + .organizationRole(OrganizationRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Organization test-organization-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetSpaceRole() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", true); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestListOrganizationSpaces( + this.cloudFoundryClient, "test-organization-id", "test-space-name"); + requestRemoveSpaceManagerByUsername( + this.cloudFoundryClient, "test-space-id", "test-username"); + + this.userAdmin + .unsetSpaceRole( + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetSpaceRoleFeatureDisabled() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", false); + + this.userAdmin + .unsetSpaceRole( + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Unsetting roles by username is not enabled") + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetSpaceRoleInvalidOrganization() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", true); + requestListOrganizationsEmpty(this.cloudFoundryClient, "test-organization-name"); + + this.userAdmin + .unsetSpaceRole( + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Organization test-organization-name not found") + .verify(Duration.ofSeconds(5)); + } + + @Test + void unsetSpaceRoleInvalidSpace() { + requestGetFeatureFlag(this.cloudFoundryClient, "unset_roles_by_username", true); + requestListOrganizations(this.cloudFoundryClient, "test-organization-name"); + requestListOrganizationSpacesEmpty( + this.cloudFoundryClient, "test-organization-id", "test-space-name"); + + this.userAdmin + .unsetSpaceRole( + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization-name") + .spaceName("test-space-name") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build()) + .as(StepVerifier::create) + .expectErrorMessage("Space test-space-name not found") + .verify(Duration.ofSeconds(5)); + } + + private static void requestAssociateOrganizationAuditorByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + when(cloudFoundryClient + .organizations() + .associateAuditorByUsername( + AssociateOrganizationAuditorByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + AssociateOrganizationAuditorByUsernameResponse + .builder(), + "associate-auditor-") + .build())); + } + + private static void requestAssociateOrganizationUserByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + when(cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + AssociateOrganizationUserByUsernameResponse + .builder(), + "associate-user-") + .build())); + } + + private static void requestAssociateSpaceManagerByUsername( + CloudFoundryClient cloudFoundryClient, String spaceId, String username) { + when(cloudFoundryClient + .spaces() + .associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest.builder() + .spaceId(spaceId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + AssociateSpaceManagerByUsernameResponse.builder(), + "associate-manager-") + .build())); + } + + private static void requestCreateUaaUser(UaaClient uaaClient) { + when(uaaClient + .users() + .create( + org.cloudfoundry.uaa.users.CreateUserRequest.builder() + .email( + Email.builder() + .primary(true) + .value("test-username") + .build()) + .name( + Name.builder() + .familyName("test-username") + .givenName("test-username") + .build()) + .password("test-password") + .userName("test-username") + .build())) + .thenReturn( + Mono.just( + org.cloudfoundry.uaa.users.CreateUserResponse.builder() + .id("test-user-id") + .active(true) + .meta( + Meta.builder() + .created("test-created") + .lastModified("test-last-modified") + .version(1) + .build()) + .name(Name.builder().build()) + .origin("test-origin") + .passwordLastModified("test-password-last-modified") + .userName("test-username") + .verified(false) + .zoneId("test-zone-id") + .build())); + } + + private static void requestCreateUaaUserAlreadyExists(UaaClient uaaClient) { + when(uaaClient + .users() + .create( + org.cloudfoundry.uaa.users.CreateUserRequest.builder() + .email( + Email.builder() + .primary(true) + .value("test-username") + .build()) + .name( + Name.builder() + .familyName("test-username") + .givenName("test-username") + .build()) + .password("test-password") + .userName("test-username") + .build())) + .thenReturn( + Mono.error( + new UaaException( + 409, + "test-error", + "test-error-description", + "some error payload"))); + } + + private static void requestCreateUser(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .users() + .create( + org.cloudfoundry.client.v2.users.CreateUserRequest.builder() + .uaaId("test-user-id") + .build())) + .thenReturn( + Mono.just( + org.cloudfoundry.client.v2.users.CreateUserResponse.builder() + .build())); + } + + private static void requestDeleteUaaUser(UaaClient uaaClient) { + when(uaaClient + .users() + .delete( + org.cloudfoundry.uaa.users.DeleteUserRequest.builder() + .userId("test-user-id") + .build())) + .thenReturn( + Mono.just( + org.cloudfoundry.uaa.users.DeleteUserResponse.builder() + .id("test-user-id") + .active(true) + .meta( + Meta.builder() + .created("test-created") + .lastModified("test-last-modified") + .version(1) + .build()) + .name(Name.builder().build()) + .origin("test-origin") + .passwordLastModified("test-password-last-modified") + .userName("test-username") + .verified(false) + .zoneId("test-zone-id") + .build())); + } + + private static void requestDeleteUser(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .users() + .delete( + org.cloudfoundry.client.v2.users.DeleteUserRequest.builder() + .async(true) + .userId("test-user-id") + .build())) + .thenReturn( + Mono.just( + fill(DeleteUserResponse.builder()) + .entity(fill(JobEntity.builder(), "job-entity-").build()) + .build())); + } + + private static void requestDeleteUserEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .users() + .delete( + org.cloudfoundry.client.v2.users.DeleteUserRequest.builder() + .async(true) + .userId("test-user-id") + .build())) + .thenReturn( + Mono.error( + new ClientV2Exception( + 404, 404, "test-description", "test-error-code"))); + } + + private static void requestGetFeatureFlag( + CloudFoundryClient cloudFoundryClient, String featureFlag, Boolean enabled) { + when(cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(featureFlag).build())) + .thenReturn(Mono.just(GetFeatureFlagResponse.builder().enabled(enabled).build())); + } + + private static void requestJobFailure(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .errorDetails( + fill( + ErrorDetails + .builder(), + "error-details-") + .build()) + .status( + "failed") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestJobSuccess(CloudFoundryClient cloudFoundryClient, String jobId) { + when(cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build())) + .thenReturn( + Mono.defer( + new Supplier>() { + + private final Queue responses = + new LinkedList<>( + Arrays.asList( + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "running") + .build()) + .build(), + fill(GetJobResponse.builder(), "job-") + .entity( + fill(JobEntity + .builder()) + .status( + "finished") + .build()) + .build())); + + @Override + public Mono get() { + return Mono.just(this.responses.poll()); + } + })); + } + + private static void requestListOrganizationAuditors(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listAuditors( + ListOrganizationAuditorsRequest.builder() + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationAuditorsResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username( + "test-auditor-username") + .build()) + .build()) + .build())); + } + + private static void requestListOrganizationAuditorsEmpty( + CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listAuditors( + ListOrganizationAuditorsRequest.builder() + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationAuditorsResponse.builder()).build())); + } + + private static void requestListOrganizationBillingManagers( + CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listBillingManagers( + ListOrganizationBillingManagersRequest.builder() + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationBillingManagersResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username( + "test-billing-manager-username") + .build()) + .build()) + .build())); + } + + private static void requestListOrganizationBillingManagersEmpty( + CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listBillingManagers( + ListOrganizationBillingManagersRequest.builder() + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn( + Mono.just(fill(ListOrganizationBillingManagersResponse.builder()).build())); + } + + private static void requestListOrganizationManagers(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listManagers( + ListOrganizationManagersRequest.builder() + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationManagersResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username( + "test-manager-username") + .build()) + .build()) + .build())); + } + + private static void requestListOrganizationManagersEmpty( + CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listManagers( + ListOrganizationManagersRequest.builder() + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationManagersResponse.builder()).build())); + } + + private static void requestListOrganizationSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource( + fill(SpaceResource.builder(), "space-") + .entity( + fill( + SpaceEntity + .builder(), + "space-entity-") + .build()) + .build()) + .build())); + } + + private static void requestListOrganizationSpacesEmpty( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationSpacesResponse.builder()).build())); + } + + private static void requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .entity( + fill( + OrganizationEntity + .builder(), + "organization-entity-") + .build()) + .build()) + .build())); + } + + private static void requestListOrganizationsEmpty( + CloudFoundryClient cloudFoundryClient, String organizationName) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationsResponse.builder()).build())); + } + + private static void requestListSpaceAuditors(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listAuditors( + ListSpaceAuditorsRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceAuditorsResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username( + "test-auditor-username") + .build()) + .build()) + .build())); + } + + private static void requestListSpaceAuditorsEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listAuditors( + ListSpaceAuditorsRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListSpaceAuditorsResponse.builder()).build())); + } + + private static void requestListSpaceAuditorsNulls(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listAuditors( + ListSpaceAuditorsRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceAuditorsResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username(null) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceDevelopers(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listDevelopers( + ListSpaceDevelopersRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceDevelopersResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username( + "test-developer-username") + .build()) + .build()) + .build())); + } + + private static void requestListSpaceDevelopersEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listDevelopers( + ListSpaceDevelopersRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListSpaceDevelopersResponse.builder()).build())); + } + + private static void requestListSpaceDevelopersNulls(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listDevelopers( + ListSpaceDevelopersRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceDevelopersResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username(null) + .build()) + .build()) + .build())); + } + + private static void requestListSpaceManagers(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listManagers( + ListSpaceManagersRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceManagersResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username( + "test-manager-username") + .build()) + .build()) + .build())); + } + + private static void requestListSpaceManagersEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listManagers( + ListSpaceManagersRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListSpaceManagersResponse.builder()).build())); + } + + private static void requestListSpaceManagersNulls(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .spaces() + .listManagers( + ListSpaceManagersRequest.builder() + .spaceId("test-space-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListSpaceManagersResponse.builder()) + .resource( + fill(UserResource.builder()) + .entity( + fill(UserEntity.builder()) + .username(null) + .build()) + .build()) + .build())); + } + + private static void requestListUser(UaaClient uaaClient) { + when(uaaClient + .users() + .list( + org.cloudfoundry.uaa.users.ListUsersRequest.builder() + .filter("userName eq \"test-username\"") + .startIndex(1) + .build())) + .thenReturn( + Mono.just( + fill(org.cloudfoundry.uaa.users.ListUsersResponse.builder()) + .resource( + User.builder() + .id("test-user-id") + .active(true) + .meta( + Meta.builder() + .created("test-created") + .lastModified( + "test-last-modified") + .version(1) + .build()) + .name(Name.builder().build()) + .origin("test-origin") + .passwordLastModified( + "test-password-last-modified") + .userName("test-username") + .verified(false) + .zoneId("test-zone-id") + .build()) + .build())); + } + + private static void requestListUserEmpty(UaaClient uaaClient) { + when(uaaClient + .users() + .list( + org.cloudfoundry.uaa.users.ListUsersRequest.builder() + .filter("userName eq \"test-username\"") + .startIndex(1) + .build())) + .thenReturn( + Mono.just( + fill(org.cloudfoundry.uaa.users.ListUsersResponse.builder()) + .build())); + } + + private static void requestOrganization(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name("test-organization-name") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationsResponse.builder()) + .resource( + fill( + OrganizationResource.builder(), + "organization-") + .metadata( + fill(Metadata.builder()) + .id("test-organization-id") + .build()) + .build()) + .build())); + } + + private static void requestOrganizationEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .name("unknown-organization-name") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationsResponse.builder()).build())); + } + + private static void requestRemoveOrganizationManagerByUsername( + CloudFoundryClient cloudFoundryClient, String organizationId, String username) { + when(cloudFoundryClient + .organizations() + .removeManagerByUsername( + RemoveOrganizationManagerByUsernameRequest.builder() + .organizationId(organizationId) + .username(username) + .build())) + .thenReturn(Mono.empty()); + } + + private static void requestRemoveSpaceManagerByUsername( + CloudFoundryClient cloudFoundryClient, String spaceId, String username) { + when(cloudFoundryClient + .spaces() + .removeManagerByUsername( + RemoveSpaceManagerByUsernameRequest.builder() + .spaceId(spaceId) + .username(username) + .build())) + .thenReturn( + Mono.just( + fill( + RemoveSpaceManagerByUsernameResponse.builder(), + "associate-manager-") + .build())); + } + + private static void requestSpace(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name("test-space-name") + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn( + Mono.just( + fill(ListOrganizationSpacesResponse.builder()) + .resource(fill(SpaceResource.builder(), "space-").build()) + .build())); + } + + private static void requestSpaceEmpty(CloudFoundryClient cloudFoundryClient) { + when(cloudFoundryClient + .organizations() + .listSpaces( + ListOrganizationSpacesRequest.builder() + .name("unknown-space-name") + .organizationId("test-organization-id") + .page(1) + .build())) + .thenReturn(Mono.just(fill(ListOrganizationSpacesResponse.builder()).build())); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/DeleteUserRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/DeleteUserRequestTest.java new file mode 100644 index 00000000000..f613bbb5d1d --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/DeleteUserRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class DeleteUserRequestTest { + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + DeleteUserRequest.builder().build(); + }); + } + + @Test + void valid() { + DeleteUserRequest.builder().username("test-username").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/ListOrganizationUsersRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/ListOrganizationUsersRequestTest.java new file mode 100644 index 00000000000..fc69c06f88e --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/ListOrganizationUsersRequestTest.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListOrganizationUsersRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + ListOrganizationUsersRequest.builder().build(); + }); + } + + @Test + void valid() { + ListOrganizationUsersRequest.builder().organizationName("test-organization").build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/ListSpaceUsersRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/ListSpaceUsersRequestTest.java new file mode 100644 index 00000000000..45fc7a360ca --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/ListSpaceUsersRequestTest.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class ListSpaceUsersRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceUsersRequest.builder().spaceName("test-space").build(); + }); + } + + @Test + void noSpaceName() { + assertThrows( + IllegalStateException.class, + () -> { + ListSpaceUsersRequest.builder().organizationName("test-organization").build(); + }); + } + + @Test + void valid() { + ListSpaceUsersRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/SetOrganizationRoleRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/SetOrganizationRoleRequestTest.java new file mode 100644 index 00000000000..c878a1f152a --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/SetOrganizationRoleRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetOrganizationRoleRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + SetOrganizationRoleRequest.builder() + .organizationRole(OrganizationRole.AUDITOR) + .username("test-username") + .build(); + }); + } + + @Test + void noOrganizationRole() { + assertThrows( + IllegalStateException.class, + () -> { + SetOrganizationRoleRequest.builder() + .organizationName("test-organization") + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + SetOrganizationRoleRequest.builder() + .organizationName("test-organization") + .organizationRole(OrganizationRole.BILLING_MANAGER) + .build(); + }); + } + + @Test + void valid() { + SetOrganizationRoleRequest.builder() + .organizationName("test-organization") + .organizationRole(OrganizationRole.MANAGER) + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/SetSpaceRoleRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/SetSpaceRoleRequestTest.java new file mode 100644 index 00000000000..4adda4416f6 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/SetSpaceRoleRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class SetSpaceRoleRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + SetSpaceRoleRequest.builder() + .spaceName("test-space") + .spaceRole(SpaceRole.AUDITOR) + .username("test-username") + .build(); + }); + } + + @Test + void noSpaceName() { + assertThrows( + IllegalStateException.class, + () -> { + SetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build(); + }); + } + + @Test + void noSpaceRole() { + assertThrows( + IllegalStateException.class, + () -> { + SetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + SetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .spaceRole(SpaceRole.DEVELOPER) + .build(); + }); + } + + @Test + void valid() { + SetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .spaceRole(SpaceRole.AUDITOR) + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/UnsetOrganizationRoleRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/UnsetOrganizationRoleRequestTest.java new file mode 100644 index 00000000000..63852ae9a3b --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/UnsetOrganizationRoleRequestTest.java @@ -0,0 +1,69 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnsetOrganizationRoleRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetOrganizationRoleRequest.builder() + .organizationRole(OrganizationRole.AUDITOR) + .username("test-username") + .build(); + }); + } + + @Test + void noOrganizationRole() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetOrganizationRoleRequest.builder() + .organizationName("test-organization") + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetOrganizationRoleRequest.builder() + .organizationName("test-organization") + .organizationRole(OrganizationRole.BILLING_MANAGER) + .build(); + }); + } + + @Test + void valid() { + UnsetOrganizationRoleRequest.builder() + .organizationName("test-organization") + .organizationRole(OrganizationRole.MANAGER) + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/UnsetSpaceRoleRequestTest.java b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/UnsetSpaceRoleRequestTest.java new file mode 100644 index 00000000000..1faeec71b09 --- /dev/null +++ b/cloudfoundry-operations/src/test/java/org/cloudfoundry/operations/useradmin/UnsetSpaceRoleRequestTest.java @@ -0,0 +1,86 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations.useradmin; + +import static org.junit.jupiter.api.Assertions.assertThrows; + +import org.junit.jupiter.api.Test; + +final class UnsetSpaceRoleRequestTest { + + @Test + void noOrganizationName() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetSpaceRoleRequest.builder() + .spaceName("test-space") + .spaceRole(SpaceRole.AUDITOR) + .username("test-username") + .build(); + }); + } + + @Test + void noSpaceName() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceRole(SpaceRole.MANAGER) + .username("test-username") + .build(); + }); + } + + @Test + void noSpaceRole() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .username("test-username") + .build(); + }); + } + + @Test + void noUsername() { + assertThrows( + IllegalStateException.class, + () -> { + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .spaceRole(SpaceRole.DEVELOPER) + .build(); + }); + } + + @Test + void valid() { + UnsetSpaceRoleRequest.builder() + .organizationName("test-organization") + .spaceName("test-space") + .spaceRole(SpaceRole.AUDITOR) + .username("test-username") + .build(); + } +} diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-alpha-unix.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-alpha-unix.yml new file mode 100644 index 00000000000..ba5fcace5f8 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-alpha-unix.yml @@ -0,0 +1,25 @@ +--- +applications: +- name: alpha-application-1 + buildpacks: + - alpha-buildpack + command: alpha-command + disk_quota: -1 + health-check-http-endpoint: alpha-health-check-http-endpoint + health-check-type: none + instances: -1 + memory: 1M + path: /alpha-path + no-route: true + random-route: true + routes: + - route: alpha-route-1 + - route: alpha-route-2 + stack: alpha-stack + timeout: -1 + env: + ALPHA_KEY_1: alpha-value-1 + ALPHA_KEY_2: alpha-value-2 + services: + - alpha-instance-1 + - alpha-instance-2 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-alpha-windows.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-alpha-windows.yml new file mode 100644 index 00000000000..a5e54d67676 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-alpha-windows.yml @@ -0,0 +1,25 @@ +--- +applications: +- name: alpha-application-1 + buildpacks: + - alpha-buildpack + command: alpha-command + disk_quota: -1 + health-check-http-endpoint: alpha-health-check-http-endpoint + health-check-type: none + instances: -1 + memory: 1M + no-route: true + path: c:\alpha-path + random-route: true + routes: + - route: alpha-route-1 + - route: alpha-route-2 + stack: alpha-stack + timeout: -1 + env: + ALPHA_KEY_1: alpha-value-1 + ALPHA_KEY_2: alpha-value-2 + services: + - alpha-instance-1 + - alpha-instance-2 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-beta.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-beta.yml new file mode 100644 index 00000000000..0a9662e6e22 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-beta.yml @@ -0,0 +1,81 @@ +--- +inherit: manifest-alpha-unix.yml + +applications: +- name: alpha-application-1 + buildpacks: + - beta-buildpack + command: beta-command + disk_quota: -2 + health-check-http-endpoint: beta-health-check-http-endpoint + health-check-type: none + instances: -2 + memory: 2M + no-route: false + path: /beta-path + random-route: false + routes: + - route: beta-route-1 + - route: beta-route-2 + stack: beta-stack + timeout: -2 + env: + BETA_KEY_1: beta-value-1 + BETA_KEY_2: beta-value-2 + services: + - beta-instance-1 + - beta-instance-2 + +- name: beta-application-1 + buildpacks: + - beta-buildpack + command: beta-command + disk_quota: -1 + health-check-http-endpoint: beta-health-check-http-endpoint + health-check-type: none + instances: -1 + memory: 2G + no-route: true + path: /beta-path + random-route: true + routes: + - route: beta-route-1 + - route: beta-route-2 + stack: beta-stack + timeout: -1 + env: + BETA_KEY_1: beta-value-1 + BETA_KEY_2: beta-value-2 + services: + - beta-instance-1 + - beta-instance-2 + +- name: beta-application-2 + buildpacks: + - beta-buildpack + command: beta-command + disk_quota: -1 + domain: beta-domain + domains: + - beta-domains-1 + - beta-domains-2 + health-check-http-endpoint: beta-health-check-http-endpoint + health-check-type: none + host: beta-host + hosts: + - beta-hosts-1 + - beta-hosts-2 + instances: -1 + memory: 2 + no-hostname: true + no-route: true + path: /beta-path + random-route: true + stack: beta-stack + timeout: -1 + env: + BETA_KEY_1: beta-value-1 + BETA_KEY_2: beta-value-2 + services: + - beta-instance-1 + - beta-instance-2 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-charlie.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-charlie.yml new file mode 100644 index 00000000000..135feb7b485 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-charlie.yml @@ -0,0 +1,51 @@ +--- +buildpacks: +- charlie-buildpack +command: charlie-command +disk_quota: -1 +health-check-http-endpoint: charlie-health-check-http-endpoint +health-check-type: none +instances: -1 +memory: -1 +no-route: true +path: /charlie-path +random-route: true +routes: +- route: charlie-route-1 +- route: charlie-route-2 +stack: charlie-stack +timeout: -1 +env: + CHARLIE_KEY_1: charlie-value-1 + CHARLIE_KEY_2: charlie-value-2 +services: +- charlie-instance-1 +- charlie-instance-2 + +applications: +- name: charlie-application-1 + +- name: charlie-application-2 + buildpacks: + - alternate-buildpack + command: alternate-command + disk_quota: -2 + health-check-http-endpoint: alternate-health-check-http-endpoint + health-check-type: port + instances: -2 + memory: -2 + no-route: false + path: /alternate-path + random-route: false + routes: + - route: alternate-route-1 + - route: alternate-route-2 + stack: alternate-stack + timeout: -2 + env: + ALTERNATE_KEY_1: alternate-value-1 + ALTERNATE_KEY_2: alternate-value-2 + services: + - alternate-instance-1 + - alternate-instance-2 + diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-delta.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-delta.yml new file mode 100644 index 00000000000..356263f9051 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-delta.yml @@ -0,0 +1,25 @@ +--- +inherit: manifest-charlie.yml + +buildpacks: +- delta-buildpack +command: delta-command +disk_quota: -3 +health-check-http-endpoint: delta-health-check-http-endpoint +health-check-type: none +instances: -3 +memory: -3 +no-route: true +path: /delta-path +random-route: true +routes: +- route: delta-route-1 +- route: delta-route-2 +stack: delta-stack +timeout: -3 +env: + DELTA_KEY_1: delta-value-1 + DELTA_KEY_2: delta-value-2 +services: +- delta-instance-1 +- delta-instance-2 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo-unix.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo-unix.yml new file mode 100644 index 00000000000..bbb3ed25826 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo-unix.yml @@ -0,0 +1,51 @@ +--- +applications: +- buildpacks: + - alpha-buildpack + command: alpha-command + disk_quota: 512M + env: + ALPHA_KEY_1: alpha-value-1 + ALPHA_KEY_2: alpha-value-2 + health-check-http-endpoint: alpha-health-check-http-endpoint + instances: -1 + memory: 512M + name: alpha-application-1 + no-route: true + path: /alpha-path + random-route: true + routes: + - route: alpha-route-1 + - route: alpha-route-2 + services: + - alpha-instance-1 + - alpha-instance-2 + stack: alpha-stack + timeout: -1 +- buildpacks: + - alpha-buildpack + command: alpha-command + domains: + - alpha-domain + - alpha-domains-1 + - alpha-domains-2 + env: + ALPHA_KEY_1: alpha-value-1 + ALPHA_KEY_2: alpha-value-2 + health-check-http-endpoint: alpha-health-check-http-endpoint + health-check-type: port + hosts: + - alpha-host + - alpha-hosts-1 + - alpha-hosts-2 + instances: -1 + name: alpha-application-2 + no-hostname: true + no-route: true + path: /alpha-path + random-route: true + services: + - alpha-instance-1 + - alpha-instance-2 + stack: alpha-stack + timeout: -1 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo-windows.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo-windows.yml new file mode 100644 index 00000000000..fe2600024fb --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-echo-windows.yml @@ -0,0 +1,51 @@ +--- +applications: +- buildpacks: + - alpha-buildpack + command: alpha-command + disk_quota: 512M + env: + ALPHA_KEY_1: alpha-value-1 + ALPHA_KEY_2: alpha-value-2 + health-check-http-endpoint: alpha-health-check-http-endpoint + instances: -1 + memory: 512M + name: alpha-application-1 + no-route: true + path: c:\alpha-path + random-route: true + routes: + - route: alpha-route-1 + - route: alpha-route-2 + services: + - alpha-instance-1 + - alpha-instance-2 + stack: alpha-stack + timeout: -1 +- buildpacks: + - alpha-buildpack + command: alpha-command + domains: + - alpha-domain + - alpha-domains-1 + - alpha-domains-2 + env: + ALPHA_KEY_1: alpha-value-1 + ALPHA_KEY_2: alpha-value-2 + health-check-http-endpoint: alpha-health-check-http-endpoint + health-check-type: port + hosts: + - alpha-host + - alpha-hosts-1 + - alpha-hosts-2 + instances: -1 + name: alpha-application-2 + no-hostname: true + no-route: true + path: c:\alpha-path + random-route: true + services: + - alpha-instance-1 + - alpha-instance-2 + stack: alpha-stack + timeout: -1 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-foxtrot.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-foxtrot.yml new file mode 100644 index 00000000000..1881d3e3aa2 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-foxtrot.yml @@ -0,0 +1,4 @@ +--- +applications: +- buildpacks: + - foxtrot-buildpack diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-golf.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-golf.yml new file mode 100644 index 00000000000..d4c152e545d --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-golf.yml @@ -0,0 +1,5 @@ +--- +applications: +- name: golf-application + routes: + - {} \ No newline at end of file diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-hotel.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-hotel.yml new file mode 100644 index 00000000000..6b6a70c6e51 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-hotel.yml @@ -0,0 +1,2 @@ +--- +name: hotel-application \ No newline at end of file diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-indigo.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-indigo.yml new file mode 100644 index 00000000000..02365a2dcfc --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-indigo.yml @@ -0,0 +1,23 @@ +--- +buildpacks: +- indigo-buildpack +command: indigo-command +disk_quota: -1 +health-check-http-endpoint: indigo-health-check-http-endpoint +health-check-type: none +instances: -1 +memory: -1 +no-route: true +path: /indigo-path +random-route: true +routes: +- route: indigo-route-1 +- route: indigo-route-2 +stack: indigo-stack +timeout: -1 +env: + INDIGO_KEY_1: indigo-value-1 + INDIGO_KEY_2: indigo-value-2 +services: +- indigo-instance-1 +- indigo-instance-2 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-juliet.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-juliet.yml new file mode 100644 index 00000000000..3e598aa62dd --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-juliet.yml @@ -0,0 +1,5 @@ +--- +inherit: manifest-indigo.yml + +applications: +- name: juliet-application diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-kilo.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-kilo.yml new file mode 100644 index 00000000000..0257c0c3847 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-kilo.yml @@ -0,0 +1,8 @@ +--- +holder: +- &foo test-service-name + +applications: +- name: test-application + services: + - *foo diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-lima.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-lima.yml new file mode 100644 index 00000000000..8d759e38e24 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-lima.yml @@ -0,0 +1,10 @@ +--- +applications: +- name: lima-application-1 + docker: + image: lima-docker-image + password: lima-docker-password + username: lima-docker-username + health-check-http-endpoint: lima-health-check-http-endpoint + health-check-type: none + no-route: false \ No newline at end of file diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-mike.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-mike.yml new file mode 100644 index 00000000000..aa2d82f40fd --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-mike.yml @@ -0,0 +1,30 @@ +--- +applications: + - name: quota-test-1 + memory: 1m + disk_quota: 2m + - name: quota-test-2 + memory: 3mb + disk_quota: 4mb + - name: quota-test-3 + memory: 5M + disk_quota: 6M + - name: quota-test-4 + memory: 7MB + disk_quota: 8MB + - name: quota-test-5 + memory: 1g + disk_quota: 2g + - name: quota-test-6 + memory: 3gb + disk_quota: 4gb + - name: quota-test-7 + memory: 5G + disk_quota: 6G + - name: quota-test-8 + memory: 7GB + disk_quota: 8GB + - name: quota-test-9 + memory: 1234 + disk_quota: 5678 + diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-november.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-november.yml new file mode 100644 index 00000000000..e28fa367087 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-november.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: alpha-application-1 + path: alpha-path diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-oscar.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-oscar.yml new file mode 100644 index 00000000000..0f395f8251d --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-oscar.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: oscar-application + buildpack: oscar-buildpack diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-1.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-1.yml new file mode 100644 index 00000000000..b49efa04853 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-1.yml @@ -0,0 +1,6 @@ +--- +applications: +- name: papa-1-application + buildpack: papa-buildpack + instances: ((instances)) + memory: ((memory)) \ No newline at end of file diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-2.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-2.yml new file mode 100644 index 00000000000..5daa75e2d4f --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-2.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: papa-2-application + buildpack: ((abcdef)) diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-3.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-3.yml new file mode 100644 index 00000000000..4cfc1a703c6 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-3.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: papa-3-application + buildpack: ((endless_1)) diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-4.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-4.yml new file mode 100644 index 00000000000..04a660142b8 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-4.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: papa-4-application + buildpack: ((((sub)) diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-5.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-5.yml new file mode 100644 index 00000000000..f979de59823 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-5.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: papa-5-application + buildpack: ((replace_1)) and ((replace_2)) is a very nice buildpack name for ((replace_3)) diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-6.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-6.yml new file mode 100644 index 00000000000..2cf62b2e96f --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-6.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: papa-6-application + buildpack: buildpack_papa_6 diff --git a/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-7.yml b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-7.yml new file mode 100644 index 00000000000..4b34f3e0729 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/manifest-papa-7.yml @@ -0,0 +1,4 @@ +--- +applications: +- name: papa-7-application + buildpack: ((regex*)) diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-1.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-1.yml new file mode 100644 index 00000000000..69eb22a8fc3 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-1.yml @@ -0,0 +1,2 @@ +instances: 2 +memory: 1G diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-2.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-2.yml new file mode 100644 index 00000000000..e0346481030 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-2.yml @@ -0,0 +1,2 @@ +abc.+: test + diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-3.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-3.yml new file mode 100644 index 00000000000..0bc4e504626 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-3.yml @@ -0,0 +1,2 @@ +endless_1: ((endless_2)) +endless_2: ((endless_1)) diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-4.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-4.yml new file mode 100644 index 00000000000..9bdb5b86e42 --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-4.yml @@ -0,0 +1,2 @@ +sub: test)) +test: injected diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-5.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-5.yml new file mode 100644 index 00000000000..75397d176dd --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-5.yml @@ -0,0 +1,3 @@ +replace_1: one +replace_2: two +replace_3: three diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-6.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-6.yml new file mode 100644 index 00000000000..75397d176dd --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-6.yml @@ -0,0 +1,3 @@ +replace_1: one +replace_2: two +replace_3: three diff --git a/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-7.yml b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-7.yml new file mode 100644 index 00000000000..75397d176dd --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/fixtures/vars-papa-7.yml @@ -0,0 +1,3 @@ +replace_1: one +replace_2: two +replace_3: three diff --git a/cloudfoundry-operations/src/test/resources/logback-test.xml b/cloudfoundry-operations/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..b5d7d6b109c --- /dev/null +++ b/cloudfoundry-operations/src/test/resources/logback-test.xml @@ -0,0 +1,33 @@ + + + + + + + + %-27thread %-37logger %msg%n + + + + + + + + + + + diff --git a/cloudfoundry-operations/src/test/resources/test-application.zip b/cloudfoundry-operations/src/test/resources/test-application.zip new file mode 100644 index 00000000000..73938807357 Binary files /dev/null and b/cloudfoundry-operations/src/test/resources/test-application.zip differ diff --git a/cloudfoundry-util/pom.xml b/cloudfoundry-util/pom.xml new file mode 100644 index 00000000000..0e5f8ae76d7 --- /dev/null +++ b/cloudfoundry-util/pom.xml @@ -0,0 +1,132 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + cloudfoundry-util + Cloud Foundry Java Utilities + jar + + + + com.fasterxml.jackson.core + jackson-databind + true + + + io.projectreactor + reactor-core + true + + + io.projectreactor + reactor-test + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.apache.commons + commons-compress + + + org.assertj + assertj-core + test + + + org.atteo + evo-inflector + + + org.cloudfoundry + cloudfoundry-client + ${project.version} + true + + + org.immutables + value + provided + + + org.mockito + mockito-core + test + + + org.springframework + spring-core + + + org.springframework.boot + spring-boot-starter-logging + true + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-jar-plugin + + + + org.cloudfoundry.util + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + + org.apache.maven.plugins + maven-javadoc-plugin + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + + + diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ByteArrayPool.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ByteArrayPool.java new file mode 100644 index 00000000000..70283d3baf2 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ByteArrayPool.java @@ -0,0 +1,119 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Optional; +import java.util.Queue; +import java.util.concurrent.ConcurrentLinkedQueue; +import java.util.concurrent.Executors; +import java.util.concurrent.ThreadFactory; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.atomic.AtomicLong; +import java.util.function.Consumer; + +/** + * Dynamically creates {@link byte} arrays and caches them, reusing them once they have been released. + *

          + * The maximum number of byte arrays is unbounded + *

          + * The default time-to-live for unused byte arrays is one minute + */ +public final class ByteArrayPool { + + private static final AtomicLong EVICTOR_COUNTER = new AtomicLong(); + + private static final ThreadFactory EVICTOR_FACTORY = + r -> { + Thread t = + new Thread(r, "byte-buffer-evictor-" + EVICTOR_COUNTER.incrementAndGet()); + t.setDaemon(true); + return t; + }; + + private static final int MIBIBYTE = 1_024 * 1_024; + + private static ByteArrayPool INSTANCE = new ByteArrayPool(MIBIBYTE, Duration.ofMinutes(1)); + + private final Queue cache = new ConcurrentLinkedQueue<>(); + + private final int capacity; + + private final Duration ttl; + + private ByteArrayPool(int capacity, Duration ttl) { + this.capacity = capacity; + this.ttl = ttl; + + Executors.newScheduledThreadPool(1, EVICTOR_FACTORY) + .scheduleAtFixedRate( + this::evict, ttl.toMillis(), ttl.toMillis(), TimeUnit.MILLISECONDS); + } + + /** + * Executes a {@link Consumer} providing a pooled {@code byte} array + * + * @param consumer the {@link Consumer} of the {@link byte} array + */ + public static void withByteArray(Consumer consumer) { + INSTANCE.doWithByteArray(consumer); + } + + private void doWithByteArray(Consumer consumer) { + byte[] byteArray = + Optional.ofNullable(this.cache.poll()) + .map(ByteArrayExpiry::getByteArray) + .orElseGet(() -> new byte[this.capacity]); + + try { + consumer.accept(byteArray); + } finally { + this.cache.offer(new ByteArrayExpiry(byteArray, Instant.now().plus(this.ttl))); + } + } + + private void evict() { + Instant now = Instant.now(); + + new ArrayList<>(this.cache) + .stream() + .filter(expiry -> expiry.getExpiration().isBefore(now)) + .forEach(this.cache::remove); + } + + private static class ByteArrayExpiry { + + private final byte[] byteArray; + + private final Instant expiration; + + private ByteArrayExpiry(byte[] byteArray, Instant expiration) { + this.byteArray = byteArray; + this.expiration = expiration; + } + + private byte[] getByteArray() { + return this.byteArray; + } + + private Instant getExpiration() { + return this.expiration; + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DateUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DateUtils.java new file mode 100644 index 00000000000..81c34e3876a --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DateUtils.java @@ -0,0 +1,76 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import static java.util.concurrent.TimeUnit.SECONDS; + +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.Date; + +/** + * Utilities for dealing with {@link Date}s + */ +public final class DateUtils { + + private static final SimpleDateFormat ISO8601 = + new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ssXXX"); + + private static final Object MONITOR = new Object(); + + private DateUtils() {} + + /** + * Formats a {@link Date} into a String in {@code ISO8601} format + * + * @param d the date to formatToIso8601 + * @return the formatted date + */ + public static String formatToIso8601(Date d) { + synchronized (MONITOR) { + return ISO8601.format(d); + } + } + + /** + * Parses a string in {@code ISO8601} format to a {@link Date} object + * + * @param s the string to parse + * @return the parsed {@link Date} + */ + public static Date parseFromIso8601(String s) { + synchronized (MONITOR) { + try { + return ISO8601.parse(s); + } catch (ParseException e) { + throw new IllegalArgumentException("Unable to parse date", e); + } + } + } + + /** + * Parses a double representing seconds from the epoch to a {@link Date} object + * + * @param d the double to parse + * @return the parsed {@link Date} + */ + public static Date parseSecondsFromEpoch(Double d) { + synchronized (MONITOR) { + return new Date(SECONDS.toMillis(d.longValue())); + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DelayTimeoutException.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DelayTimeoutException.java new file mode 100644 index 00000000000..cd2020692d3 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DelayTimeoutException.java @@ -0,0 +1,25 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +/** + * An exception indicating that a delay timeout has been passed + */ +public final class DelayTimeoutException extends RuntimeException { + + private static final long serialVersionUID = 5151226191223608759L; +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DelayUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DelayUtils.java new file mode 100644 index 00000000000..9738fe2419f --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/DelayUtils.java @@ -0,0 +1,113 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.time.Duration; +import java.time.Instant; +import java.util.function.Consumer; +import java.util.function.Function; +import org.atteo.evo.inflector.English; +import org.reactivestreams.Publisher; +import org.reactivestreams.Subscription; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Utilities for delaying progress + */ +public final class DelayUtils { + + private static final Logger LOGGER = LoggerFactory.getLogger("cloudfoundry-client.delay"); + + private DelayUtils() {} + + /** + * Implements an exponential backoff delay for use with {@link Mono#repeatWhenEmpty(Function)} + * + * @param minimum the minimum duration + * @param maximum the maximum duration + * @param timeout the maximum amount of time to delay for + * @return a delayed {@link Publisher} + */ + public static Function, Publisher> exponentialBackOff( + Duration minimum, Duration maximum, Duration timeout) { + Instant finish = Instant.now().plus(timeout); + return iterations -> getDelay(minimum, maximum, finish, iterations); + } + + /** + * Implements a fixed delay for use with {@link Mono#repeatWhenEmpty(Function)} + * + * @param duration the duration of the delay + * @return a delayed {@link Publisher} + */ + public static Function, Publisher> fixed(Duration duration) { + return iterations -> + iterations.flatMap( + iteration -> Mono.delay(duration).doOnSubscribe(logDelay(duration)), 1); + } + + /** + * Implements an instant (no delay) for use with {@link Mono#repeatWhenEmpty(Function)} + * + * @return an instant (no delay) {@link Publisher} + */ + public static Function, Publisher> instant() { + return iterations -> + iterations.flatMap( + iteration -> Mono.just(0L).doOnSubscribe(logDelay(Duration.ZERO)), 1); + } + + private static Duration calculateDuration(Duration minimum, Duration maximum, Long iteration) { + Duration candidate = minimum.multipliedBy((long) Math.pow(2, iteration)); + return min(candidate, maximum); + } + + private static Flux getDelay( + Duration minimum, Duration maximum, Instant finish, Flux iterations) { + return iterations + .map(iteration -> calculateDuration(minimum, maximum, iteration)) + .concatMap( + delay -> { + if (Instant.now().isAfter(finish)) { + return Mono.error(new DelayTimeoutException()); + } + + return Mono.delay(delay).doOnSubscribe(logDelay(delay)); + }); + } + + private static Consumer logDelay(Duration delay) { + return subscription -> { + int seconds = (int) delay.getSeconds(); + if (seconds > 0) { + LOGGER.debug("Delaying {} {}", seconds, English.plural("second", seconds)); + return; + } + + int milliseconds = (int) delay.toMillis(); + LOGGER.debug( + "Delaying {} {}", milliseconds, English.plural("millisecond", milliseconds)); + }; + } + + private static Duration min(Duration a, Duration b) { + return (a.compareTo(b) <= 0) ? a : b; + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ExceptionUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ExceptionUtils.java new file mode 100644 index 00000000000..0d128ea5c6a --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ExceptionUtils.java @@ -0,0 +1,77 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.util.Arrays; +import java.util.function.Predicate; +import org.cloudfoundry.client.v2.ClientV2Exception; +import reactor.core.publisher.Mono; + +/** + * Utilities for dealing with {@link Exception}s + */ +public final class ExceptionUtils { + + private ExceptionUtils() {} + + /** + * Returns a {@link Mono} containing an {@link IllegalArgumentException} with the configured message + * + * @param format A format string + * @param args Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments + * is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java™ Virtual Machine + * Specification. The behaviour on a {@code null} argument depends on the conversion. + * @param the type of the {@link Mono} being converted + * @return a {@link Mono} containing the error + */ + public static Mono illegalArgument(String format, Object... args) { + String message = String.format(format, args); + return Mono.error(new IllegalArgumentException(message)); + } + + /** + * Returns a {@link Mono} containing an {@link IllegalStateException} with the configured message + * + * @param format A format string + * @param args Arguments referenced by the format specifiers in the format string. If there are more arguments than format specifiers, the extra arguments are ignored. The number of arguments + * is variable and may be zero. The maximum number of arguments is limited by the maximum dimension of a Java array as defined by The Java™ Virtual Machine + * Specification. The behaviour on a {@code null} argument depends on the conversion. + * @param the type of the {@link Mono} being converted + * @return a {@link Mono} containing the error + */ + public static Mono illegalState(String format, Object... args) { + String message = String.format(format, args); + return Mono.error(new IllegalStateException(message)); + } + + /** + * A predicate that returns {@code true} if the exception is a {@link ClientV2Exception} and its code matches expectation + * + * @param codes the codes to match + * @return {@code true} if the exception is a {@link ClientV2Exception} and its code matches + */ + public static Predicate statusCode(int... codes) { + return t -> + t instanceof ClientV2Exception + && Arrays.stream(codes) + .anyMatch( + candidate -> + ((ClientV2Exception) t) + .getCode() + .equals(candidate)); + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FileUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FileUtils.java new file mode 100644 index 00000000000..5bf9a5c0f7d --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FileUtils.java @@ -0,0 +1,304 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.io.IOException; +import java.io.InputStream; +import java.math.BigInteger; +import java.nio.file.Files; +import java.nio.file.Path; +import java.nio.file.attribute.FileTime; +import java.nio.file.attribute.PosixFilePermission; +import java.security.MessageDigest; +import java.security.NoSuchAlgorithmException; +import java.util.Enumeration; +import java.util.Map; +import java.util.function.Predicate; +import java.util.stream.Stream; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; +import org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream; +import org.apache.commons.compress.archivers.zip.ZipFile; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +/** + * Utilities for files + */ +public final class FileUtils { + + private static final Integer DEFAULT_PERMISSIONS = 0744; + + private static final Map PERMISSION_MODES = + FluentMap.builder() + .entry(PosixFilePermission.OWNER_READ, 0400) + .entry(PosixFilePermission.OWNER_WRITE, 0200) + .entry(PosixFilePermission.OWNER_EXECUTE, 0100) + .entry(PosixFilePermission.GROUP_READ, 0040) + .entry(PosixFilePermission.GROUP_WRITE, 0020) + .entry(PosixFilePermission.GROUP_EXECUTE, 0010) + .entry(PosixFilePermission.OTHERS_READ, 0004) + .entry(PosixFilePermission.OTHERS_WRITE, 0002) + .entry(PosixFilePermission.OTHERS_EXECUTE, 0001) + .build(); + + private FileUtils() {} + + /** + * Compresses a candidate {@link Path} if it is a directory. Otherwise returns the original {@link Path}. + * + * @param candidate the candidate {@link Path} to compress + * @return the {@link Path} for a compressed artifact + */ + public static Mono compress(Path candidate) { + return compress(candidate, path -> true); + } + + /** + * Compresses a candidate {@link Path} filtering out entries + * + * @param candidate the candidate {@link Path} to compress + * @param filter a filter applied to each path + * @return the {@link Path} for a compressed artifact + */ + public static Mono compress(Path candidate, Predicate filter) { + return Mono.defer( + () -> { + try { + Path staging = + Files.createTempFile( + String.format( + "compressed-%s-", candidate.getFileName()), + ".zip"); + + try (ZipArchiveOutputStream out = + new ZipArchiveOutputStream(staging.toFile())) { + if (Files.isDirectory(candidate)) { + compressFromDirectory(candidate, filter, out); + } else { + compressFromZip(candidate, filter, out); + } + } + + return Mono.just(staging); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }) + .subscribeOn(Schedulers.boundedElastic()); + } + + /** + * Get the relative path of an application + * + * @param root the root to relativize against + * @param path the path to relativize + * @return the relative path + */ + public static String getRelativePathName(Path root, Path path) { + Path relative = root.relativize(path); + return Files.isDirectory(path) && !relative.toString().endsWith("/") + ? String.format("%s/", relative.toString()) + : relative.toString(); + } + + /** + * Calculates the SHA-1 hash for a {@link Path} + * + * @param path the {@link Path} to calculate the hash for + * @return a {@link String} representation of the hash + */ + public static String hash(Path path) { + try (InputStream in = Files.newInputStream(path)) { + return hash(in); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + /** + * Calculates the SHA-1 hash for an {@link InputStream} + * + * @param in the {@link InputStream} to calculate the hash for + * @return {@link String} representation of the hash + */ + public static String hash(InputStream in) { + try { + MessageDigest digest = MessageDigest.getInstance("sha1"); + + ByteArrayPool.withByteArray( + buffer -> { + try { + int length; + while ((length = in.read(buffer)) != -1) { + digest.update(buffer, 0, length); + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }); + + return String.format("%040x", new BigInteger(1, digest.digest())); + } catch (NoSuchAlgorithmException e) { + throw Exceptions.propagate(e); + } + } + + /** + * Calculates permissions for a {@link Path} + * + * @param path the {@link Path} to calculate the permissions for + * @return a {@link String} representation of the permissions + */ + public static String permissions(Path path) { + try { + return permissions(getUnixMode(path)); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + /** + * Calculates permissions for a UNIX mode + * + * @param mode the UNIX mode to calculate the permissions for + * @return a {@link String} representation of the permissions + */ + public static String permissions(int mode) { + return Integer.toOctalString( + mode == 0 + ? DEFAULT_PERMISSIONS + : mode & 07777 // only use permission bits, not the file type + ); + } + + /** + * Calculates the size of a {@link Path} + * + * @param path the {@link Path} to calculate the size for + * @return the size + */ + public static int size(Path path) { + try { + return (int) Files.size(path); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + private static void compressFromDirectory( + Path candidate, Predicate filter, ZipArchiveOutputStream out) { + try (Stream contents = Files.walk(candidate)) { + contents.filter( + path -> { + try { + return !Files.isSameFile(candidate, path); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }) + .filter(path -> filter.test(getRelativePathName(candidate, path))) + .forEach( + path -> { + try (InputStream in = + Files.isDirectory(path) + ? null + : Files.newInputStream(path)) { + write( + in, + Files.getLastModifiedTime(path), + getUnixMode(path), + out, + getRelativePathName(candidate, path)); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + private static void compressFromZip( + Path candidate, Predicate filter, ZipArchiveOutputStream out) { + try (ZipFile zipFile = new ZipFile(candidate.toFile())) { + Enumeration entries = zipFile.getEntries(); + + while (entries.hasMoreElements()) { + ZipArchiveEntry entry = entries.nextElement(); + + if (filter.test(entry.getName())) { + try (InputStream in = zipFile.getInputStream(entry)) { + int mode = entry.getUnixMode(); + write( + in, + entry.getLastModifiedTime(), + mode == 0 ? DEFAULT_PERMISSIONS : mode, + out, + entry.getName()); + } + } + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } + + private static int getUnixMode(Path path) throws IOException { + if (!isPosixFile(path)) { + return DEFAULT_PERMISSIONS; + } + + return Files.getPosixFilePermissions(path).stream().mapToInt(PERMISSION_MODES::get).sum(); + } + + private static boolean isPosixFile(Path path) { + return path.getFileSystem().supportedFileAttributeViews().contains("posix"); + } + + private static void write( + InputStream in, + FileTime lastModifiedTime, + int mode, + ZipArchiveOutputStream out, + String path) { + try { + ZipArchiveEntry entry = new ZipArchiveEntry(path); + entry.setUnixMode(mode); + entry.setLastModifiedTime(lastModifiedTime); + out.putArchiveEntry(entry); + + if (in != null) { + ByteArrayPool.withByteArray( + buffer -> { + try { + int length; + while ((length = in.read(buffer)) != -1) { + out.write(buffer, 0, length); + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }); + } + + out.closeArchiveEntry(); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FluentMap.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FluentMap.java new file mode 100644 index 00000000000..61a02b376ee --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/FluentMap.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.util.HashMap; +import java.util.Map; + +/** + * Utility for building maps for Json responses + */ +public final class FluentMap { + + public static Builder builder() { + return new Builder<>(); + } + + public static final class Builder { + + private final Map entries = new HashMap<>(); + + public Map build() { + return this.entries; + } + + public Builder entries(Map entries) { + this.entries.putAll(entries); + return this; + } + + public Builder entry(K key, V value) { + this.entries.put(key, value); + return this; + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/JobUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/JobUtils.java new file mode 100644 index 00000000000..be7d0837b1c --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/JobUtils.java @@ -0,0 +1,147 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; + +import java.time.Duration; +import java.util.EnumSet; +import java.util.List; +import java.util.Set; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.Resource; +import org.cloudfoundry.client.v2.jobs.ErrorDetails; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.jobs.GetJobResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v3.ClientV3Exception; +import org.cloudfoundry.client.v3.Error; +import org.cloudfoundry.client.v3.jobs.Job; +import org.cloudfoundry.client.v3.jobs.JobState; +import reactor.core.publisher.Mono; + +/** + * Utilities for Jobs + */ +public final class JobUtils { + + private static final Set FINAL_STATES = + EnumSet.of(JobState.COMPLETE, JobState.FAILED); + + private static final Integer STATUS_OK = 200; + + private JobUtils() {} + + /** + * Waits for a job to complete + * + * @param cloudFoundryClient the client to use to request job status + * @param completionTimeout the amount of time to wait for the job to complete. + * @param resource the resource representing the job + * @param the Job resource type + * @return {@code onComplete} once job has completed + */ + public static > Mono waitForCompletion( + CloudFoundryClient cloudFoundryClient, Duration completionTimeout, R resource) { + return waitForCompletion( + cloudFoundryClient, completionTimeout, ResourceUtils.getEntity(resource)); + } + + /** + * Waits for a job to complete + * + * @param cloudFoundryClient the client to use to request job status + * @param completionTimeout the amount of time to wait for the job to complete. + * @param jobEntity the entity representing the job + * @return {@code onComplete} once job has completed + */ + public static Mono waitForCompletion( + CloudFoundryClient cloudFoundryClient, + Duration completionTimeout, + JobEntity jobEntity) { + Mono job; + + if (JobUtils.isComplete(jobEntity)) { + job = Mono.just(jobEntity); + } else { + job = + requestJobV2(cloudFoundryClient, jobEntity.getId()) + .map(GetJobResponse::getEntity) + .filter(JobUtils::isComplete) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + completionTimeout)); + } + + return job.filter(entity -> "failed".equals(entity.getStatus())) + .flatMap(JobUtils::getError); + } + + /** + * Waits for a job V3 to complete + * + * @param cloudFoundryClient the client to use to request job status + * @param completionTimeout the amount of time to wait for the job to complete. + * @param jobId the id of the job + * @return {@code onComplete} once job has completed + */ + public static Mono waitForCompletion( + CloudFoundryClient cloudFoundryClient, Duration completionTimeout, String jobId) { + return requestJobV3(cloudFoundryClient, jobId) + .filter(job -> FINAL_STATES.contains(job.getState())) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), Duration.ofSeconds(15), completionTimeout)) + .filter(job -> JobState.FAILED == job.getState()) + .flatMap(JobUtils::getError); + } + + private static Mono getError(JobEntity entity) { + ErrorDetails errorDetails = entity.getErrorDetails(); + return Mono.error( + new ClientV2Exception( + null, + errorDetails.getCode(), + errorDetails.getDescription(), + errorDetails.getErrorCode())); + } + + private static Mono getError(Job job) { + List errors = job.getErrors(); + return Mono.error(new ClientV3Exception(STATUS_OK, errors)); + } + + private static boolean isComplete(JobEntity entity) { + String status = entity.getStatus(); + return "finished".equals(status) || "failed".equals(status); + } + + private static Mono requestJobV2( + CloudFoundryClient cloudFoundryClient, String jobId) { + return cloudFoundryClient.jobs().get(GetJobRequest.builder().jobId(jobId).build()); + } + + private static Mono requestJobV3( + CloudFoundryClient cloudFoundryClient, String jobId) { + return cloudFoundryClient + .jobsV3() + .get(org.cloudfoundry.client.v3.jobs.GetJobRequest.builder().jobId(jobId).build()); + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/LastOperationUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/LastOperationUtils.java new file mode 100644 index 00000000000..8440c06b3e3 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/LastOperationUtils.java @@ -0,0 +1,50 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.time.Duration; +import java.util.function.Supplier; +import org.cloudfoundry.client.v2.ClientV2Exception; +import org.cloudfoundry.client.v2.serviceinstances.LastOperation; +import reactor.core.publisher.Mono; + +/** + * Utilities for {@link LastOperation}s + */ +public final class LastOperationUtils { + + private static final String IN_PROGRESS = "in progress"; + + private LastOperationUtils() {} + + public static Mono waitForCompletion( + Duration completionTimeout, Supplier> lastOperationSupplier) { + return lastOperationSupplier + .get() + .map(LastOperation::getState) + .filter(state -> !IN_PROGRESS.equals(state)) + .repeatWhenEmpty( + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), Duration.ofSeconds(15), completionTimeout)) + .onErrorResume( + t -> + t instanceof ClientV2Exception + && ((ClientV2Exception) t).getStatusCode() == 404, + t -> Mono.empty()) + .then(); + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/OperationUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/OperationUtils.java new file mode 100644 index 00000000000..5afa439eabc --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/OperationUtils.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * Utilities with operations that do not (yet) exist + */ +public final class OperationUtils { + + private OperationUtils() {} + + /** + * Operation to collect a {@code Flux} into a contiguous single byte array, delivered as a single element of a {@code Mono}. + * + * @param bytes a Flux of 0 or more byte arrays + * @return a Mono of a byte array + */ + public static Mono collectByteArray(Flux bytes) { + return bytes.reduceWith( + ByteArrayOutputStream::new, + (prev, next) -> { + try { + prev.write(next); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + return prev; + }) + .map(ByteArrayOutputStream::toByteArray); + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/PaginationUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/PaginationUtils.java new file mode 100644 index 00000000000..75ef75f415e --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/PaginationUtils.java @@ -0,0 +1,124 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.util.Optional; +import java.util.function.Function; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +/** + * A utility class to provide functions for handling PaginatedResponse and those containing lists of Resources. + */ +public final class PaginationUtils { + + private PaginationUtils() {} + + /** + * Generate the stream of resources accumulated from a series of responses obtained from the page supplier. + * + * @param pageSupplier a function from integers to {@link Mono}s of {@link org.cloudfoundry.client.v2.PaginatedResponse}s. + * @param the type of resource in the list on each {@link org.cloudfoundry.client.v2.PaginatedResponse}. + * @param the type of {@link org.cloudfoundry.client.v2.PaginatedResponse}. + * @return a stream of T objects. + */ + public static < + T extends org.cloudfoundry.client.v2.Resource, + U extends org.cloudfoundry.client.v2.PaginatedResponse> + Flux requestClientV2Resources(Function> pageSupplier) { + + return pageSupplier + .apply(1) + .flatMapMany(requestClientV2AdditionalPages(pageSupplier)) + .flatMap(ResourceUtils::getResources); + } + + /** + * Generate the stream of resources accumulated from a series of responses obtained from the page supplier. + * + * @param pageSupplier a function from integers to {@link Mono}s of {@link org.cloudfoundry.client.v3.PaginatedResponse}s. + * @param the type of resource in the list on each {@link org.cloudfoundry.client.v3.PaginatedResponse}. + * @param the type of {@link org.cloudfoundry.client.v3.PaginatedResponse}. + * @return a stream of T objects. + */ + @SuppressWarnings("rawtypes") + public static > + Flux requestClientV3Resources(Function> pageSupplier) { + return pageSupplier + .apply(1) + .flatMapMany(requestClientV3AdditionalPages(pageSupplier)) + .flatMapIterable(org.cloudfoundry.client.v3.PaginatedResponse::getResources); + } + + /** + * Generate the stream of resources accumulated from a series of responses obtained from the page supplier. + * + * @param pageSupplier a function from integers to {@link Mono}s of {@link org.cloudfoundry.uaa.PaginatedResponse}s. + * @param the type of resource in the list on each {@link org.cloudfoundry.uaa.PaginatedResponse}. + * @param the type of {@link org.cloudfoundry.uaa.PaginatedResponse}. + * @return a stream of T objects. + */ + @SuppressWarnings("rawtypes") + public static > + Flux requestUaaResources(Function> pageSupplier) { + return pageSupplier + .apply(1) + .flatMapMany(requestUaaAdditionalPages(pageSupplier)) + .flatMapIterable(org.cloudfoundry.uaa.PaginatedResponse::getResources); + } + + private static Function> requestAdditionalPages( + Function> pageSupplier, Function totalPagesSupplier) { + return response -> { + Integer totalPages = Optional.ofNullable(totalPagesSupplier.apply(response)).orElse(1); + + return Flux.range(2, totalPages - 1) + .flatMap(pageSupplier) + .startWith(response) + .buffer() + .flatMapIterable(d -> d); + }; + } + + private static > + Function> requestClientV2AdditionalPages( + Function> pageSupplier) { + return requestAdditionalPages(pageSupplier, response -> response.getTotalPages()); + } + + private static > + Function> requestClientV3AdditionalPages( + Function> pageSupplier) { + return requestAdditionalPages( + pageSupplier, response -> response.getPagination().getTotalPages()); + } + + private static > + Function> requestUaaAdditionalPages( + Function> pageSupplier) { + return response -> { + Integer totalPages = (response.getTotalResults() - 1) / response.getItemsPerPage() + 1; + + return Flux.range(1, totalPages - 1) + .map(page -> 1 + (page * response.getItemsPerPage())) + .flatMap(pageSupplier) + .startWith(response) + .buffer() + .flatMapIterable(d -> d); + }; + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceMatchingUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceMatchingUtils.java new file mode 100644 index 00000000000..d863256fd24 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceMatchingUtils.java @@ -0,0 +1,205 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Enumeration; +import java.util.List; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; +import org.apache.commons.compress.archivers.zip.ZipFile; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesRequest; +import org.cloudfoundry.client.v2.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v2.resourcematch.Resource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +/** + * Utilities for matching resources + */ +public final class ResourceMatchingUtils { + + private static final Logger LOGGER = + LoggerFactory.getLogger("cloudfoundry-client.resource-matching"); + + private ResourceMatchingUtils() {} + + public static Mono> getMatchedResources( + CloudFoundryClient cloudFoundryClient, Path application) { + return (Files.isDirectory(application) + ? getArtifactMetadataFromDirectory(application) + : getArtifactMetadataFromZip(application)) + .collectMap(ArtifactMetadata::getHash) + .flatMapMany( + artifactMetadatas -> + requestListMatchingResources( + cloudFoundryClient, artifactMetadatas.values()) + .flatMapIterable( + ListMatchingResourcesResponse::getResources) + .map(resource -> artifactMetadatas.get(resource.getHash()))) + .collectList() + .doOnNext( + matched -> + LOGGER.debug( + "{} resources matched totaling {}", + matched.size(), + SizeUtils.asIbi( + matched.stream() + .mapToInt(ArtifactMetadata::getSize) + .sum()))) + .subscribeOn(Schedulers.boundedElastic()); + } + + private static Flux getArtifactMetadataFromDirectory(Path application) { + return Flux.defer( + () -> { + try { + return Flux.fromStream(Files.walk(application)); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }) + .filter(path -> !Files.isDirectory(path)) + .map( + path -> + new ArtifactMetadata( + FileUtils.hash(path), + FileUtils.getRelativePathName(application, path), + FileUtils.permissions(path), + FileUtils.size(path))); + } + + private static Flux getArtifactMetadataFromZip(Path application) { + List artifactMetadatas = new ArrayList<>(); + + try (ZipFile zipFile = new ZipFile(application.toFile())) { + Enumeration entries = zipFile.getEntries(); + + while (entries.hasMoreElements()) { + ZipArchiveEntry entry = entries.nextElement(); + + if (!entry.isDirectory()) { + try (InputStream in = zipFile.getInputStream(entry)) { + String hash = FileUtils.hash(in); + String path = entry.getName(); + String permissions = FileUtils.permissions(entry.getUnixMode()); + int size = (int) entry.getSize(); + + artifactMetadatas.add(new ArtifactMetadata(hash, path, permissions, size)); + } + } + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + return Flux.fromIterable(artifactMetadatas); + } + + private static Mono requestListMatchingResources( + CloudFoundryClient cloudFoundryClient, Collection artifactMetadatas) { + ListMatchingResourcesRequest request = + artifactMetadatas.stream() + .reduce( + ListMatchingResourcesRequest.builder(), + (builder, artifactMetadata) -> + builder.resource( + Resource.builder() + .hash(artifactMetadata.getHash()) + .mode(artifactMetadata.getPermissions()) + .size(artifactMetadata.getSize()) + .build()), + (a, b) -> a.addAllResources(b.build().getResources())) + .build(); + + return cloudFoundryClient.resourceMatch().list(request); + } + + /** + * Metadata information about a given artifact + */ + public static final class ArtifactMetadata { + + private final String hash; + + private final String path; + + private final String permissions; + + private final int size; + + /** + * Creates a new instance + * + * @param hash the SHA-1 hash of the artifact + * @param path the relative path of the artifact + * @param permissions the UNIX permissions of the artifact + * @param size the size of the artifact + */ + public ArtifactMetadata(String hash, String path, String permissions, int size) { + this.hash = hash; + this.path = path; + this.permissions = permissions; + this.size = size; + } + + /** + * Returns the SHA-1 hash of the artifact + * + * @return the SHA-1 hash of the artifact + */ + public String getHash() { + return this.hash; + } + + /** + * Returns the path of the artifact + * + * @return the path of the artifact + */ + public String getPath() { + return this.path; + } + + /** + * Returns the permissions of the artifact + * + * @return the permissions of the artifact + */ + public String getPermissions() { + return this.permissions; + } + + /** + * Returns the size of the artifact + * + * @return the size of the artifact + */ + public int getSize() { + return this.size; + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceMatchingUtilsV3.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceMatchingUtilsV3.java new file mode 100644 index 00000000000..b4327ec2216 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceMatchingUtilsV3.java @@ -0,0 +1,216 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.io.IOException; +import java.io.InputStream; +import java.nio.file.Files; +import java.nio.file.Path; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Enumeration; +import java.util.List; +import java.util.stream.Collectors; +import org.apache.commons.compress.archivers.zip.ZipArchiveEntry; +import org.apache.commons.compress.archivers.zip.ZipFile; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.Checksum; +import org.cloudfoundry.client.v3.ChecksumType; +import org.cloudfoundry.client.v3.resourcematch.ListMatchingResourcesRequest; +import org.cloudfoundry.client.v3.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v3.resourcematch.MatchedResource; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.core.scheduler.Schedulers; + +/** + * Utilities for matching resources with objects for v3 API + */ +public final class ResourceMatchingUtilsV3 { + + private static final Logger LOGGER = + LoggerFactory.getLogger("cloudfoundry-client.resource-matching-v3"); + public static final int MAX_RESOURCES_SIZE = 5000; + + private ResourceMatchingUtilsV3() {} + + public static Mono> getMatchedResources( + CloudFoundryClient cloudFoundryClient, Path application) { + return (Files.isDirectory(application) + ? getArtifactMetadataFromDirectory(application) + : getArtifactMetadataFromZip(application)) + .collectList() + .flatMapMany(Flux::fromIterable) + .buffer(MAX_RESOURCES_SIZE) + .flatMap(chunk -> requestListMatchingResources(cloudFoundryClient, chunk)) + .map(ListMatchingResourcesResponse::getResources) + .doOnNext( + matched -> + LOGGER.debug( + "{} resources matched totaling {}", + matched.size(), + SizeUtils.asIbi( + matched.stream() + .mapToInt(MatchedResource::getSize) + .sum()))) + .collectList() + .map(lists -> lists.stream().flatMap(List::stream).collect(Collectors.toList())) + .subscribeOn(Schedulers.boundedElastic()); + } + + private static Flux getArtifactMetadataFromDirectory(Path application) { + return Flux.defer( + () -> { + try { + return Flux.fromStream(Files.walk(application)); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }) + .filter(path -> !Files.isDirectory(path)) + .map( + path -> + new ArtifactMetadata( + Checksum.builder() + .type(ChecksumType.SHA1) + .value(FileUtils.hash(path)) + .build(), + FileUtils.getRelativePathName(application, path), + FileUtils.permissions(path), + FileUtils.size(path))); + } + + private static Flux getArtifactMetadataFromZip(Path application) { + List artifactMetadatas = new ArrayList<>(); + + try (ZipFile zipFile = new ZipFile(application.toFile())) { + Enumeration entries = zipFile.getEntries(); + + while (entries.hasMoreElements()) { + ZipArchiveEntry entry = entries.nextElement(); + + if (!entry.isDirectory()) { + try (InputStream in = zipFile.getInputStream(entry)) { + Checksum checksum = + Checksum.builder() + .type(ChecksumType.SHA1) + .value(FileUtils.hash(in)) + .build(); + String path = entry.getName(); + String permissions = FileUtils.permissions(entry.getUnixMode()); + int size = (int) entry.getSize(); + + artifactMetadatas.add( + new ArtifactMetadata(checksum, path, permissions, size)); + } + } + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + return Flux.fromIterable(artifactMetadatas); + } + + private static Mono requestListMatchingResources( + CloudFoundryClient cloudFoundryClient, Collection artifactMetadatas) { + ListMatchingResourcesRequest request = + artifactMetadatas.stream() + .reduce( + ListMatchingResourcesRequest.builder(), + (builder, artifactMetadata) -> + builder.resource( + MatchedResource.builder() + .checksum(artifactMetadata.getChecksum()) + .mode(artifactMetadata.getPermissions()) + .size(artifactMetadata.getSize()) + .path(artifactMetadata.getPath()) + .build()), + (a, b) -> a.addAllResources(b.build().getResources())) + .build(); + + return cloudFoundryClient.resourceMatchV3().list(request); + } + + /** + * Metadata information about a given artifact + */ + public static final class ArtifactMetadata { + + private final Checksum checksum; + + private final String path; + + private final String permissions; + + private final int size; + + /** + * Creates a new instance + * + * @param checksum the Checksum Object of the artifact + * @param path the relative path of the artifact + * @param permissions the UNIX permissions of the artifact + * @param size the size of the artifact in bytes + */ + public ArtifactMetadata(Checksum checksum, String path, String permissions, int size) { + this.checksum = checksum; + this.path = path; + this.permissions = permissions; + this.size = size; + } + + /** + * Returns the Checksum Object of the artifact + * + * @return the Checksum Object of the artifact + */ + public Checksum getChecksum() { + return this.checksum; + } + + /** + * Returns the path of the artifact + * + * @return the path of the artifact + */ + public String getPath() { + return this.path; + } + + /** + * Returns the permissions of the artifact + * + * @return the permissions of the artifact + */ + public String getPermissions() { + return this.permissions; + } + + /** + * Returns the size of the artifact in bytes + * + * @return the size of the artifact in bytes + */ + public int getSize() { + return this.size; + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceUtils.java new file mode 100644 index 00000000000..1f51f8321f9 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/ResourceUtils.java @@ -0,0 +1,64 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import org.cloudfoundry.client.v2.PaginatedResponse; +import org.cloudfoundry.client.v2.Resource; +import reactor.core.publisher.Flux; + +/** + * Utilities for dealing with {@link Resource}s + */ +public final class ResourceUtils { + + private ResourceUtils() {} + + /** + * Return the entity of a resource + * + * @param resource the resource + * @param the type of the resource's entity + * @param the resource type + * @return the resource's entity + */ + public static > T getEntity(R resource) { + return resource.getEntity(); + } + + /** + * Returns the id of a resource + * + * @param resource the resource + * @return the id of the resource + */ + public static String getId(Resource resource) { + return resource.getMetadata().getId(); + } + + /** + * Return a stream of resources from a response + * + * @param response the response + * @param the resource type + * @param the response type + * @return a stream of resources from the response + */ + public static , U extends PaginatedResponse> Flux getResources( + U response) { + return Flux.fromIterable(response.getResources()); + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/SizeUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/SizeUtils.java new file mode 100644 index 00000000000..f96be19bfc6 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/SizeUtils.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +/** + * Utilities for mapping size + */ +public final class SizeUtils { + + private static final double BYTE = 1; + + private static final double KIBI = 1024 * BYTE; + + private static final double MIBI = 1024 * KIBI; + + private static final double GIBI = 1024 * MIBI; + + /** + * Converts a size to a {@link String} with -ibi suffixes + * + * @param size the size to convert + * @return a {@link String} representing the size + */ + public static String asIbi(long size) { + if (size > GIBI) { + return String.format("%.1f GiB", (size / GIBI)); + } else if (size > MIBI) { + return String.format("%.1f MiB", (size / MIBI)); + } else if (size > KIBI) { + return String.format("%.1f KiB", (size / KIBI)); + } else { + return String.format("%d B", size); + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/SortingUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/SortingUtils.java new file mode 100644 index 00000000000..7e631136868 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/SortingUtils.java @@ -0,0 +1,100 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import static reactor.core.publisher.Sinks.EmitFailureHandler.FAIL_FAST; + +import java.time.Duration; +import java.time.Instant; +import java.util.ArrayList; +import java.util.Comparator; +import java.util.List; +import java.util.PriorityQueue; +import java.util.Queue; +import java.util.function.Function; +import reactor.core.Disposable; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Sinks; +import reactor.util.function.Tuple2; + +/** + * Utilities for sorting + */ +public final class SortingUtils { + + private SortingUtils() {} + + /** + * Sorts the elements of a {@link Flux} within a sliding time window. This sorter should be used when element order may be scrambled, but that scrambling has a certain 'temporal locality' to it. + * This assumption means that sorting can be limited to elements that arrive temporally close to one another without risking a latecomer being sorted incorrectly. + * + * @param comparator a {@link Comparator} to use when sorting the elements within the window + * @param timespan the duration of the 'temporal locality' + * @param The type of the elements to be sorted + * @return a {@link Flux} providing the sorted elements + */ + public static Function, Flux> timespan( + Comparator comparator, Duration timespan) { + return source -> { + Queue> accumulator = + new PriorityQueue<>((o1, o2) -> comparator.compare(o1.getT2(), o2.getT2())); + + Object monitor = new Object(); + + Sinks.Many d = Sinks.many().multicast().directBestEffort(); + + Disposable disposable = + source.timestamp() + .subscribe( + item -> { + synchronized (monitor) { + accumulator.add(item); + } + }, + throwable -> d.emitError(throwable, FAIL_FAST), + () -> d.emitComplete(FAIL_FAST)); + + return Flux.interval(timespan) + .takeUntilOther(d.asFlux()) + .flatMap( + n -> getItems(accumulator, monitor, timespan), + null, + () -> getItems(accumulator, monitor, Duration.ZERO)) + .doOnCancel(disposable::dispose); + }; + } + + private static Flux getItems( + Queue> accumulator, Object monitor, Duration timespan) { + List items = new ArrayList<>(); + + synchronized (monitor) { + while (isBefore(accumulator.peek(), timespan)) { + items.add(accumulator.remove().getT2()); + } + } + + return Flux.fromIterable(items); + } + + private static boolean isBefore(Tuple2 candidate, Duration timespan) { + return candidate != null + && (Duration.ZERO == timespan + || Instant.ofEpochMilli(candidate.getT1()) + .isBefore(Instant.now().minus(timespan))); + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/TimeUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/TimeUtils.java new file mode 100644 index 00000000000..27899a77906 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/TimeUtils.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +/** + * Utilities for dealing with time + */ +public final class TimeUtils { + + private static final double MILLISECOND = 1; + + private static final double SECOND = 1000 * MILLISECOND; + + private static final double MINUTE = 60 * SECOND; + + private static final double HOUR = 60 * MINUTE; + + private TimeUtils() {} + + /** + * Renders a time period in human readable form + * + * @param time the time in milliseconds + * @return the time in human readable form + */ + public static String asTime(long time) { + if (time > HOUR) { + return String.format("%.1f h", (time / HOUR)); + } else if (time > MINUTE) { + return String.format("%.1f m", (time / MINUTE)); + } else if (time > SECOND) { + return String.format("%.1f s", (time / SECOND)); + } else { + return String.format("%d ms", time); + } + } +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/package-info.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/package-info.java new file mode 100644 index 00000000000..87fea9698c6 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/package-info.java @@ -0,0 +1,20 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Utilities for working with Cloud Foundry Client APIs + */ +package org.cloudfoundry.util; diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer2.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer2.java new file mode 100644 index 00000000000..6ef0a3c890c --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer2.java @@ -0,0 +1,35 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts two input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + */ +@FunctionalInterface +public interface Consumer2 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + */ + void accept(T1 t1, T2 t2); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer3.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer3.java new file mode 100644 index 00000000000..affb0a2c6d2 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer3.java @@ -0,0 +1,37 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts three input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + * @param The type of the third input to the operation + */ +@FunctionalInterface +public interface Consumer3 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + */ + void accept(T1 t1, T2 t2, T3 t3); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer4.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer4.java new file mode 100644 index 00000000000..7d7c5ac33da --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer4.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts four input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + * @param The type of the third input to the operation + * @param The type of the fourth input to the operation + */ +@FunctionalInterface +public interface Consumer4 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + */ + void accept(T1 t1, T2 t2, T3 t3, T4 t4); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer5.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer5.java new file mode 100644 index 00000000000..9031c9f04e2 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer5.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts five input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + * @param The type of the third input to the operation + * @param The type of the fourth input to the operation + * @param The type of the fifth input to the operation + */ +@FunctionalInterface +public interface Consumer5 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + */ + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer6.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer6.java new file mode 100644 index 00000000000..a776f190352 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer6.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts six input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + * @param The type of the third input to the operation + * @param The type of the fourth input to the operation + * @param The type of the fifth input to the operation + * @param The type of the sixth input to the operation + */ +@FunctionalInterface +public interface Consumer6 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + */ + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer7.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer7.java new file mode 100644 index 00000000000..ab4b2eed1ec --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer7.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts seven input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + * @param The type of the third input to the operation + * @param The type of the fourth input to the operation + * @param The type of the fifth input to the operation + * @param The type of the sixth input to the operation + * @param The type of the seventh input to the operation + */ +@FunctionalInterface +public interface Consumer7 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @param t7 the seventh input argument + */ + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer8.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer8.java new file mode 100644 index 00000000000..81e763de16f --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Consumer8.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * An operation that accepts eight input arguments and returns no result + * + * @param The type of the first input to the operation + * @param The type of the second input to the operation + * @param The type of the third input to the operation + * @param The type of the fourth input to the operation + * @param The type of the fifth input to the operation + * @param The type of the sixth input to the operation + * @param The type of the seventh input to the operation + * @param The type of the eighth input to the operation + */ +@FunctionalInterface +public interface Consumer8 { + + /** + * Performs this operation on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @param t7 the seventh input argument + * @param t8 the eighth input argument + */ + void accept(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function2.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function2.java new file mode 100644 index 00000000000..fc1f6ef1a6d --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function2.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +import java.util.function.BiFunction; + +/** + * Represents a function that accepts two arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function2 extends BiFunction { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @return the function result + */ + R apply(T1 t1, T2 t2); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function3.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function3.java new file mode 100644 index 00000000000..10f9623502f --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function3.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a function that accepts three arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param The type of the third input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function3 { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @return the function result + */ + R apply(T1 t1, T2 t2, T3 t3); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function4.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function4.java new file mode 100644 index 00000000000..d319907cf9b --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function4.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a function that accepts four arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param The type of the third input to the function + * @param The type of the fourth input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function4 { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @return the function result + */ + R apply(T1 t1, T2 t2, T3 t3, T4 t4); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function5.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function5.java new file mode 100644 index 00000000000..2c1efd8d34e --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function5.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a function that accepts five arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param The type of the third input to the function + * @param The type of the fourth input to the function + * @param The type of the fifth input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function5 { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @return the function result + */ + R apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function6.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function6.java new file mode 100644 index 00000000000..e071728d2fd --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function6.java @@ -0,0 +1,45 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a function that accepts six arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param The type of the third input to the function + * @param The type of the fourth input to the function + * @param The type of the fifth input to the function + * @param The type of the sixth input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function6 { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @return the function result + */ + R apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function7.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function7.java new file mode 100644 index 00000000000..9e29434b9c4 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function7.java @@ -0,0 +1,47 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a function that accepts seven arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param The type of the third input to the function + * @param The type of the fourth input to the function + * @param The type of the fifth input to the function + * @param The type of the sixth input to the function + * @param The type of the seventh input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function7 { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @param t7 the seventh input argument + * @return the function result + */ + R apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function8.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function8.java new file mode 100644 index 00000000000..811ddea47f4 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Function8.java @@ -0,0 +1,49 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a function that accepts eight arguments and produces a result + * + * @param The type of the first input to the function + * @param The type of the second input to the function + * @param The type of the third input to the function + * @param The type of the fourth input to the function + * @param The type of the fifth input to the function + * @param The type of the sixth input to the function + * @param The type of the seventh input to the function + * @param The type of the eighth input to the function + * @param the type of the result of the function + */ +@FunctionalInterface +public interface Function8 { + + /** + * Applies this function to the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @param t7 the seventh input argument + * @param t8 the eighth input argument + * @return the function result + */ + R apply(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate2.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate2.java new file mode 100644 index 00000000000..13c24ca52e8 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate2.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of two arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + */ +@FunctionalInterface +public interface Predicate2 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate3.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate3.java new file mode 100644 index 00000000000..fb70db8f27f --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate3.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of three arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + * @param The type of the third input to the predicate + */ +@FunctionalInterface +public interface Predicate3 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2, T3 t3); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate4.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate4.java new file mode 100644 index 00000000000..6b7977af65c --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate4.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of four arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + * @param The type of the third input to the predicate + * @param The type of the fourth input to the predicate + */ +@FunctionalInterface +public interface Predicate4 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2, T3 t3, T4 t4); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate5.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate5.java new file mode 100644 index 00000000000..2475970b1f5 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate5.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of five arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + * @param The type of the third input to the predicate + * @param The type of the fourth input to the predicate + * @param The type of the fifth input to the predicate + */ +@FunctionalInterface +public interface Predicate5 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate6.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate6.java new file mode 100644 index 00000000000..84875036ff7 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate6.java @@ -0,0 +1,44 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of six arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + * @param The type of the third input to the predicate + * @param The type of the fourth input to the predicate + * @param The type of the fifth input to the predicate + * @param The type of the sixth input to the predicate + */ +@FunctionalInterface +public interface Predicate6 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate7.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate7.java new file mode 100644 index 00000000000..24e59b64dc0 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate7.java @@ -0,0 +1,46 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of seven arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + * @param The type of the third input to the predicate + * @param The type of the fourth input to the predicate + * @param The type of the fifth input to the predicate + * @param The type of the sixth input to the predicate + * @param The type of the seventh input to the predicate + */ +@FunctionalInterface +public interface Predicate7 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @param t7 the seventh input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate8.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate8.java new file mode 100644 index 00000000000..94f328958b1 --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/Predicate8.java @@ -0,0 +1,48 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +/** + * Represents a predicate (boolean-valued function) of eight arguments + * + * @param The type of the first input to the predicate + * @param The type of the second input to the predicate + * @param The type of the third input to the predicate + * @param The type of the fourth input to the predicate + * @param The type of the fifth input to the predicate + * @param The type of the sixth input to the predicate + * @param The type of the seventh input to the predicate + * @param The type of the eighth input to the predicate + */ +@FunctionalInterface +public interface Predicate8 { + + /** + * Evaluates this predicate on the given arguments + * + * @param t1 the first input argument + * @param t2 the second input argument + * @param t3 the third input argument + * @param t4 the fourth input argument + * @param t5 the fifth input argument + * @param t6 the sixth input argument + * @param t7 the seventh input argument + * @param t8 the eighth input argument + * @return {@code true} if the input arguments match the predicate, otherwise {@code false} + */ + boolean test(T1 t1, T2 t2, T3 t3, T4 t4, T5 t5, T6 t6, T7 t7, T8 t8); +} diff --git a/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/TupleUtils.java b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/TupleUtils.java new file mode 100644 index 00000000000..b2fad7028fe --- /dev/null +++ b/cloudfoundry-util/src/main/java/org/cloudfoundry/util/tuple/TupleUtils.java @@ -0,0 +1,457 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +import java.util.function.Consumer; +import java.util.function.Function; +import java.util.function.Predicate; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuple3; +import reactor.util.function.Tuple4; +import reactor.util.function.Tuple5; +import reactor.util.function.Tuple6; +import reactor.util.function.Tuple7; +import reactor.util.function.Tuple8; + +public final class TupleUtils { + + private TupleUtils() {} + + /** + * Returns a {@link Consumer} of {@link Tuple2} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @return the wrapper consumer + */ + public static Consumer> consumer(Consumer2 consumer) { + return tuple -> consumer.accept(tuple.getT1(), tuple.getT2()); + } + + /** + * Returns a {@link Consumer} of {@link Tuple3} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @return the wrapper consumer + */ + public static Consumer> consumer( + Consumer3 consumer) { + return tuple -> consumer.accept(tuple.getT1(), tuple.getT2(), tuple.getT3()); + } + + /** + * Returns a {@link Consumer} of {@link Tuple4} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @return the wrapper consumer + */ + public static Consumer> consumer( + Consumer4 consumer) { + return tuple -> consumer.accept(tuple.getT1(), tuple.getT2(), tuple.getT3(), tuple.getT4()); + } + + /** + * Returns a {@link Consumer} of {@link Tuple5} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @return the wrapper consumer + */ + public static Consumer> consumer( + Consumer5 consumer) { + return tuple -> + consumer.accept( + tuple.getT1(), tuple.getT2(), tuple.getT3(), tuple.getT4(), tuple.getT5()); + } + + /** + * Returns a {@link Consumer} of {@link Tuple6} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @return the wrapper consumer + */ + public static Consumer> consumer( + Consumer6 consumer) { + return tuple -> + consumer.accept( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6()); + } + + /** + * Returns a {@link Consumer} of {@link Tuple7} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the seventh value + * @return the wrapper consumer + */ + public static + Consumer> consumer( + Consumer7 consumer) { + return tuple -> + consumer.accept( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6(), + tuple.getT7()); + } + + /** + * Returns a {@link Consumer} of {@link Tuple8} that wraps a consumer of the component values of the tuple + * + * @param consumer the component value consumer + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the seventh value + * @param the type of the eighth value + * @return the wrapper consumer + */ + public static + Consumer> consumer( + Consumer8 consumer) { + return tuple -> + consumer.accept( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6(), + tuple.getT7(), + tuple.getT8()); + } + + /** + * Returns a {@link Function} of {@link Tuple2} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the result of the function + * @return the wrapper function + */ + public static Function, R> function(Function2 function) { + return tuple -> function.apply(tuple.getT1(), tuple.getT2()); + } + + /** + * Returns a {@link Function} of {@link Tuple3} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the result of the function + * @return the wrapper function + */ + public static Function, R> function( + Function3 function) { + return tuple -> function.apply(tuple.getT1(), tuple.getT2(), tuple.getT3()); + } + + /** + * Returns a {@link Function} of {@link Tuple4} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the result of the function + * @return the wrapper function + */ + public static Function, R> function( + Function4 function) { + return tuple -> function.apply(tuple.getT1(), tuple.getT2(), tuple.getT3(), tuple.getT4()); + } + + /** + * Returns a {@link Function} of {@link Tuple5} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the result of the function + * @return the wrapper function + */ + public static Function, R> function( + Function5 function) { + return tuple -> + function.apply( + tuple.getT1(), tuple.getT2(), tuple.getT3(), tuple.getT4(), tuple.getT5()); + } + + /** + * Returns a {@link Function} of {@link Tuple6} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the result of the function + * @return the wrapper function + */ + public static Function, R> function( + Function6 function) { + return tuple -> + function.apply( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6()); + } + + /** + * Returns a {@link Function} of {@link Tuple7} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the seventh value + * @param the type of the result of the function + * @return the wrapper function + */ + public static + Function, R> function( + Function7 function) { + return tuple -> + function.apply( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6(), + tuple.getT7()); + } + + /** + * Returns a {@link Function} of {@link Tuple8} that wraps a function of the component values of the tuple + * + * @param function the component value function + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the seventh value + * @param the type of the eighth value + * @param the type of the result of the function + * @return the wrapper function + */ + public static + Function, R> function( + Function8 function) { + return tuple -> + function.apply( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6(), + tuple.getT7(), + tuple.getT8()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple2} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @return the wrapper predicate + */ + public static Predicate> predicate(Predicate2 predicate) { + return tuple -> predicate.test(tuple.getT1(), tuple.getT2()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple3} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @return the wrapper predicate + */ + public static Predicate> predicate( + Predicate3 predicate) { + return tuple -> predicate.test(tuple.getT1(), tuple.getT2(), tuple.getT3()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple4} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @return the wrapper predicate + */ + public static Predicate> predicate( + Predicate4 predicate) { + return tuple -> predicate.test(tuple.getT1(), tuple.getT2(), tuple.getT3(), tuple.getT4()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple5} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @return the wrapper predicate + */ + public static Predicate> predicate( + Predicate5 predicate) { + return tuple -> + predicate.test( + tuple.getT1(), tuple.getT2(), tuple.getT3(), tuple.getT4(), tuple.getT5()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple6} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @return the wrapper predicate + */ + public static Predicate> predicate( + Predicate6 predicate) { + return tuple -> + predicate.test( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple7} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the seventh value + * @return the wrapper predicate + */ + public static + Predicate> predicate( + Predicate7 predicate) { + return tuple -> + predicate.test( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6(), + tuple.getT7()); + } + + /** + * Returns a {@link Predicate} of {@link Tuple8} that wraps a predicate of the component values of the tuple + * + * @param predicate the component value predicate + * @param the type of the first value + * @param the type of the second value + * @param the type of the third value + * @param the type of the fourth value + * @param the type of the fifth value + * @param the type of the sixth value + * @param the type of the seventh value + * @param the type of the eighth value + * @return the wrapper predicate + */ + public static + Predicate> predicate( + Predicate8 predicate) { + return tuple -> + predicate.test( + tuple.getT1(), + tuple.getT2(), + tuple.getT3(), + tuple.getT4(), + tuple.getT5(), + tuple.getT6(), + tuple.getT7(), + tuple.getT8()); + } +} diff --git a/cloudfoundry-util/src/test/java/org/cloudfoundry/util/DelayUtilsTest.java b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/DelayUtilsTest.java new file mode 100644 index 00000000000..ec4ac01bb0d --- /dev/null +++ b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/DelayUtilsTest.java @@ -0,0 +1,112 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import java.time.Duration; +import org.junit.jupiter.api.Test; +import org.reactivestreams.Publisher; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.test.scheduler.VirtualTimeScheduler; + +final class DelayUtilsTest { + + @SuppressWarnings("unchecked") + @Test + void exponentialBackOff() { + StepVerifier.withVirtualTime( + () -> + (Publisher) + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(5), + Duration.ofSeconds(5)) + .apply(Flux.just(1L, 2L, 3L))) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(2))) + .expectNext(0L) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(4))) + .expectNext(0L) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(8))) + .expectNext(0L) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("unchecked") + @Test + void exponentialBackOffMaximum() { + StepVerifier.withVirtualTime( + () -> + (Publisher) + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(1), + Duration.ofSeconds(5)) + .apply(Flux.just(1L, 2L, 3L))) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(1))) + .expectNext(0L) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(1))) + .expectNext(0L) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(1))) + .expectNext(0L) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @Test + void exponentialBackOffTimeout() { + StepVerifier.create( + DelayUtils.exponentialBackOff( + Duration.ofMillis(500), + Duration.ofMillis(500), + Duration.ofMillis(100)) + .apply(Mono.delay(Duration.ofMillis(200)).thenMany(Flux.just(1L)))) + .expectError(DelayTimeoutException.class) + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("unchecked") + @Test + void fixed() { + StepVerifier.withVirtualTime( + () -> + (Publisher) + DelayUtils.fixed(Duration.ofSeconds(1)) + .apply(Flux.just(1L, 2L, 3L))) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(1))) + .expectNext(0L) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(1))) + .expectNext(0L) + .then(() -> VirtualTimeScheduler.get().advanceTimeBy(Duration.ofSeconds(1))) + .expectNext(0L) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } + + @SuppressWarnings("unchecked") + @Test + void instant() { + StepVerifier.withVirtualTime( + () -> (Publisher) DelayUtils.instant().apply(Flux.just(1L, 2L, 3L))) + .expectNext(0L) + .expectNext(0L) + .expectNext(0L) + .expectComplete() + .verify(Duration.ofSeconds(5)); + } +} diff --git a/cloudfoundry-util/src/test/java/org/cloudfoundry/util/PaginationUtilsTest.java b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/PaginationUtilsTest.java new file mode 100644 index 00000000000..e3dfb3a5694 --- /dev/null +++ b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/PaginationUtilsTest.java @@ -0,0 +1,239 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util; + +import static org.mockito.Mockito.RETURNS_SMART_NULLS; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.spaces.Spaces; +import org.cloudfoundry.client.v3.Pagination; +import org.cloudfoundry.client.v3.packages.BitsData; +import org.cloudfoundry.client.v3.packages.ListPackagesRequest; +import org.cloudfoundry.client.v3.packages.ListPackagesResponse; +import org.cloudfoundry.client.v3.packages.PackageResource; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.packages.Packages; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.uaa.users.ListUsersResponse; +import org.cloudfoundry.uaa.users.Meta; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.uaa.users.User; +import org.cloudfoundry.uaa.users.Users; +import org.junit.jupiter.api.Test; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +final class PaginationUtilsTest { + + @Test + void requestClientV2Resources() { + Spaces spaces = mock(Spaces.class, RETURNS_SMART_NULLS); + + requestListSpaces(spaces, 1, 3); + requestListSpaces(spaces, 2, 3); + requestListSpaces(spaces, 3, 3); + + PaginationUtils.requestClientV2Resources( + page -> spaces.list(ListSpacesRequest.builder().page(page).build())) + .as(StepVerifier::create) + .expectNextCount(3) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void requestClientV2ResourcesEmpty() { + Spaces spaces = mock(Spaces.class, RETURNS_SMART_NULLS); + + requestListSpacesEmpty(spaces); + + PaginationUtils.requestClientV2Resources( + page -> spaces.list(ListSpacesRequest.builder().page(page).build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void requestClientV3Empty() { + Packages packages = mock(Packages.class, RETURNS_SMART_NULLS); + + requestListPackagesEmpty(packages); + + PaginationUtils.requestClientV3Resources( + page -> packages.list(ListPackagesRequest.builder().page(page).build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void requestClientV3Resources() { + Packages packages = mock(Packages.class, RETURNS_SMART_NULLS); + + requestListPackages(packages, 1, 3); + requestListPackages(packages, 2, 3); + requestListPackages(packages, 3, 3); + + PaginationUtils.requestClientV3Resources( + page -> packages.list(ListPackagesRequest.builder().page(page).build())) + .as(StepVerifier::create) + .expectNextCount(3) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void requestUaaResources() { + Users users = mock(Users.class, RETURNS_SMART_NULLS); + + requestListUsers(users, 1, 100, 250); + requestListUsers(users, 101, 100, 250); + requestListUsers(users, 201, 100, 250); + + PaginationUtils.requestUaaResources( + startIndex -> + users.list( + ListUsersRequest.builder().startIndex(startIndex).build())) + .as(StepVerifier::create) + .expectNextCount(3) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + @Test + void requestUaaResourcesEmpty() { + Users users = mock(Users.class, RETURNS_SMART_NULLS); + + requestListUsersEmpty(users, 1, 100); + + PaginationUtils.requestUaaResources( + startIndex -> + users.list( + ListUsersRequest.builder().startIndex(startIndex).build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofSeconds(1)); + } + + private static void requestListPackages(Packages packages, Integer page, Integer totalPages) { + when(packages.list(ListPackagesRequest.builder().page(page).build())) + .thenReturn( + Mono.just( + ListPackagesResponse.builder() + .resource( + PackageResource.builder() + .id(page.toString()) + .createdAt("test-created-at") + .updatedAt("test-updated-at") + .type(PackageType.BITS) + .data(BitsData.builder().build()) + .state(PackageState.READY) + .build()) + .pagination( + Pagination.builder().totalPages(totalPages).build()) + .build())); + } + + private static void requestListPackagesEmpty(Packages packages) { + when(packages.list(ListPackagesRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + ListPackagesResponse.builder() + .resources(Collections.emptyList()) + .pagination(Pagination.builder().totalPages(1).build()) + .build())); + } + + private static void requestListSpaces(Spaces spaces, Integer page, Integer totalPages) { + when(spaces.list(ListSpacesRequest.builder().page(page).build())) + .thenReturn( + Mono.just( + ListSpacesResponse.builder() + .resource( + SpaceResource.builder() + .entity( + SpaceEntity.builder() + .name(page.toString()) + .build()) + .build()) + .totalPages(totalPages) + .build())); + } + + private static void requestListSpacesEmpty(Spaces spaces) { + when(spaces.list(ListSpacesRequest.builder().page(1).build())) + .thenReturn( + Mono.just( + ListSpacesResponse.builder() + .resources(Collections.emptyList()) + .totalPages(1) + .build())); + } + + private static void requestListUsers( + Users users, Integer startIndex, Integer itemsPerPage, Integer totalResults) { + when(users.list(ListUsersRequest.builder().startIndex(startIndex).build())) + .thenReturn( + Mono.just( + ListUsersResponse.builder() + .resource( + User.builder() + .active(true) + .meta( + Meta.builder() + .created("test-created") + .lastModified( + "test-last-modified") + .version(0) + .build()) + .id(startIndex.toString()) + .name(Name.builder().build()) + .origin("test-origin") + .passwordLastModified( + "test-password-last-modified") + .verified(true) + .userName("test-user-name") + .zoneId("test-zone-id") + .build()) + .itemsPerPage(itemsPerPage) + .startIndex(startIndex) + .totalResults(totalResults) + .build())); + } + + private static void requestListUsersEmpty( + Users users, Integer startIndex, Integer itemsPerPage) { + when(users.list(ListUsersRequest.builder().startIndex(startIndex).build())) + .thenReturn( + Mono.just( + ListUsersResponse.builder() + .resources(Collections.emptyList()) + .itemsPerPage(itemsPerPage) + .startIndex(startIndex) + .totalResults(0) + .build())); + } +} diff --git a/cloudfoundry-util/src/test/java/org/cloudfoundry/util/ResourceMatchingUtilsV3Test.java b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/ResourceMatchingUtilsV3Test.java new file mode 100644 index 00000000000..542f72a5cd4 --- /dev/null +++ b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/ResourceMatchingUtilsV3Test.java @@ -0,0 +1,57 @@ +package org.cloudfoundry.util; + +import static org.cloudfoundry.util.ResourceMatchingUtilsV3.getMatchedResources; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.List; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.resourcematch.ListMatchingResourcesResponse; +import org.cloudfoundry.client.v3.resourcematch.MatchedResource; +import org.junit.jupiter.api.Test; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Mono; + +class ResourceMatchingUtilsV3Test { + + @Test + void requestListMatchingResources2() throws IOException { + CloudFoundryClient cloudFoundryClient = mock(CloudFoundryClient.class); + when(cloudFoundryClient.resourceMatchV3()) + .thenReturn( + request -> + Mono.just( + ListMatchingResourcesResponse.builder() + .addAllResources(request.getResources()) + .build())); + + Path testApplication = new ClassPathResource("test-application.zip").getFile().toPath(); + + List result = + getMatchedResources(cloudFoundryClient, testApplication).block(); + assertNotNull(result); + assertEquals(2, result.size()); + } + + @Test + void requestListMatchingResources15001() throws IOException { + CloudFoundryClient cloudFoundryClient = mock(CloudFoundryClient.class); + when(cloudFoundryClient.resourceMatchV3()) + .thenReturn( + request -> + Mono.just( + ListMatchingResourcesResponse.builder() + .addAllResources(request.getResources()) + .build())); + Path testApplication = new ClassPathResource("15001_files.zip").getFile().toPath(); + + List result = + getMatchedResources(cloudFoundryClient, testApplication).block(); + assertNotNull(result); + assertEquals(15001, result.size()); + } +} diff --git a/cloudfoundry-util/src/test/java/org/cloudfoundry/util/tuple/TupleUtilsTest.java b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/tuple/TupleUtilsTest.java new file mode 100644 index 00000000000..8b4dc074263 --- /dev/null +++ b/cloudfoundry-util/src/test/java/org/cloudfoundry/util/tuple/TupleUtilsTest.java @@ -0,0 +1,368 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.util.tuple; + +import static org.assertj.core.api.Assertions.assertThat; + +import org.junit.jupiter.api.Test; +import reactor.util.function.Tuples; + +final class TupleUtilsTest { + + @Test + void consumer2() { + TupleUtils.consumer( + (first, second) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + }) + .accept(Tuples.of(1, 2)); + } + + @Test + void consumer3() { + TupleUtils.consumer( + (first, second, third) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + }) + .accept(Tuples.of(1, 2, 3)); + } + + @Test + void consumer4() { + TupleUtils.consumer( + (first, second, third, fourth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + }) + .accept(Tuples.of(1, 2, 3, 4)); + } + + @Test + void consumer5() { + TupleUtils.consumer( + (first, second, third, fourth, fifth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + }) + .accept(Tuples.of(1, 2, 3, 4, 5)); + } + + @Test + void consumer6() { + TupleUtils.consumer( + (first, second, third, fourth, fifth, sixth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + }) + .accept(Tuples.of(1, 2, 3, 4, 5, 6)); + } + + @Test + void consumer7() { + TupleUtils.consumer( + (first, second, third, fourth, fifth, sixth, seventh) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + assertThat(seventh).isEqualTo(7); + }) + .accept(Tuples.of(1, 2, 3, 4, 5, 6, 7)); + } + + @Test + void consumer8() { + TupleUtils.consumer( + (first, second, third, fourth, fifth, sixth, seventh, eighth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + assertThat(seventh).isEqualTo(7); + assertThat(eighth).isEqualTo(8); + }) + .accept(Tuples.of(1, 2, 3, 4, 5, 6, 7, 8)); + } + + @Test + void function2() { + int result = + TupleUtils.function( + (first, second) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + + return -1; + }) + .apply(Tuples.of(1, 2)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void function3() { + int result = + TupleUtils.function( + (first, second, third) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + + return -1; + }) + .apply(Tuples.of(1, 2, 3)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void function4() { + int result = + TupleUtils.function( + (first, second, third, fourth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + + return -1; + }) + .apply(Tuples.of(1, 2, 3, 4)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void function5() { + int result = + TupleUtils.function( + (first, second, third, fourth, fifth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + + return -1; + }) + .apply(Tuples.of(1, 2, 3, 4, 5)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void function6() { + int result = + TupleUtils.function( + (first, second, third, fourth, fifth, sixth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + + return -1; + }) + .apply(Tuples.of(1, 2, 3, 4, 5, 6)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void function7() { + int result = + TupleUtils.function( + (first, second, third, fourth, fifth, sixth, seventh) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + assertThat(seventh).isEqualTo(7); + + return -1; + }) + .apply(Tuples.of(1, 2, 3, 4, 5, 6, 7)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void function8() { + int result = + TupleUtils.function( + (first, second, third, fourth, fifth, sixth, seventh, eighth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + assertThat(seventh).isEqualTo(7); + assertThat(eighth).isEqualTo(8); + + return -1; + }) + .apply(Tuples.of(1, 2, 3, 4, 5, 6, 7, 8)); + + assertThat(result).isEqualTo(-1); + } + + @Test + void predicate2() { + boolean result = + TupleUtils.predicate( + (first, second) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + + return true; + }) + .test(Tuples.of(1, 2)); + + assertThat(result).isTrue(); + } + + @Test + void predicate3() { + boolean result = + TupleUtils.predicate( + (first, second, third) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + + return true; + }) + .test(Tuples.of(1, 2, 3)); + + assertThat(result).isTrue(); + } + + @Test + void predicate4() { + boolean result = + TupleUtils.predicate( + (first, second, third, fourth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + + return true; + }) + .test(Tuples.of(1, 2, 3, 4)); + + assertThat(result).isTrue(); + } + + @Test + void predicate5() { + boolean result = + TupleUtils.predicate( + (first, second, third, fourth, fifth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + + return true; + }) + .test(Tuples.of(1, 2, 3, 4, 5)); + + assertThat(result).isTrue(); + } + + @Test + void predicate6() { + boolean result = + TupleUtils.predicate( + (first, second, third, fourth, fifth, sixth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + + return true; + }) + .test(Tuples.of(1, 2, 3, 4, 5, 6)); + + assertThat(result).isTrue(); + } + + @Test + void predicate7() { + boolean result = + TupleUtils.predicate( + (first, second, third, fourth, fifth, sixth, seventh) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + assertThat(seventh).isEqualTo(7); + + return true; + }) + .test(Tuples.of(1, 2, 3, 4, 5, 6, 7)); + + assertThat(result).isTrue(); + } + + @Test + void predicate8() { + boolean result = + TupleUtils.predicate( + (first, second, third, fourth, fifth, sixth, seventh, eighth) -> { + assertThat(first).isEqualTo(1); + assertThat(second).isEqualTo(2); + assertThat(third).isEqualTo(3); + assertThat(fourth).isEqualTo(4); + assertThat(fifth).isEqualTo(5); + assertThat(sixth).isEqualTo(6); + assertThat(seventh).isEqualTo(7); + assertThat(eighth).isEqualTo(8); + + return true; + }) + .test(Tuples.of(1, 2, 3, 4, 5, 6, 7, 8)); + + assertThat(result).isTrue(); + } +} diff --git a/cloudfoundry-util/src/test/resources/15001_files.zip b/cloudfoundry-util/src/test/resources/15001_files.zip new file mode 100644 index 00000000000..d5c7c2d0b39 Binary files /dev/null and b/cloudfoundry-util/src/test/resources/15001_files.zip differ diff --git a/cloudfoundry-util/src/test/resources/logback-test.xml b/cloudfoundry-util/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..e520872aaa9 --- /dev/null +++ b/cloudfoundry-util/src/test/resources/logback-test.xml @@ -0,0 +1,33 @@ + + + + + + + + %-27thread %-37logger %msg%n + + + + + + + + + + + diff --git a/cloudfoundry-util/src/test/resources/test-application.zip b/cloudfoundry-util/src/test/resources/test-application.zip new file mode 100644 index 00000000000..73938807357 Binary files /dev/null and b/cloudfoundry-util/src/test/resources/test-application.zip differ diff --git a/git/hooks-wrapper b/git/hooks-wrapper deleted file mode 100755 index 48340e1289d..00000000000 --- a/git/hooks-wrapper +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -if [ -x $0.local ]; then - $0.local "$@" || exit $? -fi - -REPO_DIR=$(dirname $GIT_DIR) -if [ -x $REPO_DIR/git/tracked_hooks/$(basename $0) ]; then - $REPO_DIR/git/tracked_hooks/$(basename $0) "$@" || exit $? -fi \ No newline at end of file diff --git a/git/install-hook-symlinks b/git/install-hook-symlinks deleted file mode 100755 index 7a0f708cc7c..00000000000 --- a/git/install-hook-symlinks +++ /dev/null @@ -1,28 +0,0 @@ -#!/bin/bash -HOOK_NAMES=" -applypatch-msg -pre-applypatch -post-applypatch -pre-commit -prepare-commit-msg -commit-msg -post-commit -pre-rebase -post-checkout -post-merge -pre-receive -update -post-receive -post-update -pre-auto-gc -" - -HOOK_SRC=$(dirname $0) -HOOK_DIR=$(git rev-parse --git-dir)/hooks || exit $? - -for hook in $HOOK_NAMES; do - if [ ! -h $HOOK_DIR/$hook -a -x $HOOK_DIR/$hook ]; then - mv $HOOK_DIR/$hook $HOOK_DIR/$hook.local - fi - ln -s -f ../../git/hooks-wrapper $HOOK_DIR/$hook -done diff --git a/git/tracked_hooks/pre-commit b/git/tracked_hooks/pre-commit deleted file mode 100755 index d01dd0fc830..00000000000 --- a/git/tracked_hooks/pre-commit +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if git rev-parse --verify HEAD >/dev/null 2>&1 -then - against=HEAD -else - # Initial commit: diff against an empty tree object - against=4b825dc642cb6eb9a060e54bf8d69288fbee4904 -fi - -exec git diff-index --check --cached $against -- diff --git a/integration-test/pom.xml b/integration-test/pom.xml new file mode 100644 index 00000000000..fbad53c625a --- /dev/null +++ b/integration-test/pom.xml @@ -0,0 +1,145 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + integration-test + Integration Test + jar + + + + com.github.zafarkhaja + java-semver + test + + + io.projectreactor + reactor-test + test + + + org.springframework.boot + spring-boot-starter-test + test + + + org.apache.commons + commons-compress + test + + + org.assertj + assertj-core + test + + + org.cloudfoundry + cloudfoundry-client-reactor + ${project.version} + test + + + org.cloudfoundry + cloudfoundry-operations + ${project.version} + test + + + io.github.resilience4j + resilience4j-ratelimiter + ${resilience4j.version} + + + io.github.resilience4j + resilience4j-reactor + ${resilience4j.version} + + + org.cloudfoundry + cloudfoundry-util + ${project.version} + test + + + org.hamcrest + hamcrest-junit + 2.0.0.0 + test + + + junit + junit + + + + + org.immutables + value + provided + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + true + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + 3 + false + + + + + diff --git a/integration-test/src/test/java/org/cloudfoundry/AbstractIntegrationTest.java b/integration-test/src/test/java/org/cloudfoundry/AbstractIntegrationTest.java new file mode 100644 index 00000000000..c677804e71e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/AbstractIntegrationTest.java @@ -0,0 +1,90 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.reflect.Method; +import java.util.Optional; +import java.util.function.Consumer; +import org.junit.jupiter.api.AfterEach; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.TestInfo; +import org.junit.jupiter.api.extension.RegisterExtension; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuple2; + +@SpringJUnitConfig(classes = IntegrationTestConfiguration.class) +public abstract class AbstractIntegrationTest { + + private final Logger logger = LoggerFactory.getLogger("cloudfoundry-client.test"); + + public String testName; + + @Autowired protected NameFactory nameFactory; + + @Autowired @RegisterExtension + public CloudFoundryVersionConditionalRule cloudFoundryVersionConditionalRule; + + @BeforeEach + public void testEntry(TestInfo testInfo) { + Optional testMethod = testInfo.getTestMethod(); + if (testMethod.isPresent()) { + this.testName = testMethod.get().getName(); + } + this.logger.debug(">> {} <<", getTestName()); + } + + @AfterEach + public final void testExit() { + this.logger.debug("<< {} >>", getTestName()); + } + + protected static Mono getBytes(String path) { + try (InputStream in = new FileInputStream(new File("src/test/resources", path)); + ByteArrayOutputStream out = new ByteArrayOutputStream()) { + byte[] buffer = new byte[8192]; + int len; + + while ((len = in.read(buffer)) != -1) { + out.write(buffer, 0, len); + } + + return Mono.just(out.toByteArray()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + protected static Consumer> tupleEquality() { + return consumer((expected, actual) -> assertThat(actual).isEqualTo(expected)); + } + + private String getTestName() { + return String.format("%s.%s", this.getClass().getSimpleName(), this.testName); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/ApplicationUtils.java b/integration-test/src/test/java/org/cloudfoundry/ApplicationUtils.java new file mode 100644 index 00000000000..0efd69a03ff --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/ApplicationUtils.java @@ -0,0 +1,309 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.nio.file.Path; +import java.time.Duration; +import java.util.Collection; +import java.util.Map; +import java.util.Optional; +import java.util.stream.Collectors; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.ApplicationInstanceInfo; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesResponse; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.applications.GetApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationResponse; +import org.cloudfoundry.client.v2.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public class ApplicationUtils { + + static Mono pushApplication( + CloudFoundryClient cloudFoundryClient, + Path applicationBits, + String applicationName, + Collection boundServices, + Map env, + String hostName, + String spaceId) { + return getSharedDomain(cloudFoundryClient) + .flatMap( + domain -> + Mono.zip( + createApplicationId( + cloudFoundryClient, + spaceId, + applicationName), + createRouteId( + cloudFoundryClient, + ResourceUtils.getId(domain), + spaceId, + hostName)) + .flatMap( + function( + (applicationId, routeId) -> + Mono.zip( + requestAssociateApplicationRoute( + cloudFoundryClient, + applicationId, + routeId), + bindServices( + cloudFoundryClient, + applicationId, + boundServices)) + .thenReturn(applicationId))) + .flatMap( + applicationId -> + createRunningApplication( + cloudFoundryClient, + applicationBits, + applicationId, + env) + .map( + ignore -> + new ApplicationUtils + .ApplicationMetadata( + applicationId, + spaceId, + String + .format( + "https://%s.%s", + hostName, + ResourceUtils + .getEntity( + domain) + .getName()))))); + } + + private static Mono bindServices( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Collection boundServices) { + return Mono.zip( + boundServices.stream() + .map( + serviceInstanceId -> + cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest + .builder() + .applicationId( + applicationId) + .serviceInstanceId( + serviceInstanceId) + .build())) + .collect(Collectors.toList()), + a -> Mono.just(applicationId)) + .thenReturn(applicationId); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, + String domainId, + String spaceId, + String hostName) { + return requestCreateRoute(cloudFoundryClient, domainId, spaceId, hostName) + .map(ResourceUtils::getId); + } + + private static Mono createRunningApplication( + CloudFoundryClient cloudFoundryClient, + Path applicationBits, + String applicationId, + Map env) { + return ApplicationUtils.requestUploadApplication( + cloudFoundryClient, applicationId, applicationBits) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), job)) + .then(requestUpdateApplication(cloudFoundryClient, applicationId, env, "STARTED")) + .then( + getApplicationPackageState(cloudFoundryClient, applicationId) + .filter(state -> "STAGED".equals(state) || "FAILED".equals(state)) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5)))) + .then( + getApplicationInstanceState(cloudFoundryClient, applicationId) + .filter("RUNNING"::equals) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5)))); + } + + private static Mono getApplicationPackageState( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestGetApplication(cloudFoundryClient, applicationId) + .map(response -> ResourceUtils.getEntity(response).getPackageState()); + } + + private static Mono getApplicationInstanceState( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestApplicationInstances(cloudFoundryClient, applicationId) + .flatMapMany(response -> Flux.fromIterable(response.getInstances().values())) + .single() + .map(ApplicationInstanceInfo::getState); + } + + private static Mono getSharedDomain( + CloudFoundryClient cloudFoundryClient) { + return requestListSharedDomains(cloudFoundryClient) + .filter( + resource -> + !Optional.ofNullable( + ResourceUtils.getEntity(resource).getInternal()) + .orElse(false)) + .next(); + } + + private static Mono requestApplicationInstances( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder().applicationId(applicationId).build()); + } + + private static Mono requestAssociateApplicationRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .applicationsV2() + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack("https://github.com/cloudfoundry/java-buildpack.git") + .memory(768) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String spaceId, + String hostName) { + return cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(hostName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .get(GetApplicationRequest.builder().applicationId(applicationId).build()); + } + + private static Flux requestListSharedDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list(ListSharedDomainsRequest.builder().page(page).build())); + } + + private static Mono requestUpdateApplication( + CloudFoundryClient cloudFoundryClient, + String applicationId, + Map env, + String state) { + return cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .environmentJsons(env) + .state(state) + .build()); + } + + private static Mono requestUploadApplication( + CloudFoundryClient cloudFoundryClient, String applicationId, Path application) { + return cloudFoundryClient + .applicationsV2() + .upload( + UploadApplicationRequest.builder() + .application(application) + .applicationId(applicationId) + .async(true) + .build()); + } + + public static final class ApplicationMetadata { + + public final String applicationId; + + public final String spaceId; + + public final String uri; + + private ApplicationMetadata(String applicationId, String spaceId, String uri) { + this.applicationId = applicationId; + this.spaceId = spaceId; + this.uri = uri; + } + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/CleanupCloudFoundryAfterClass.java b/integration-test/src/test/java/org/cloudfoundry/CleanupCloudFoundryAfterClass.java new file mode 100644 index 00000000000..88d8fd6303a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/CleanupCloudFoundryAfterClass.java @@ -0,0 +1,27 @@ +package org.cloudfoundry; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; +import org.springframework.context.annotation.Bean; +import org.springframework.test.annotation.DirtiesContext; + +/** + * Meta-annotation to show that a test class will add too much to the CF instance, and that a full universe + * cleanup should occur. This is important because otherwise the integration tests create too many apps and + * blow up the memory quota. We do not want to recreate the full environment for EVERY test class because + * the process takes 30~60s, so in total it could add more than an hour to the integration tests. + *

          + * Technically, this is achieved by recreating a Spring ApplicationContext with {@link DirtiesContext}. The + * {@link CloudFoundryCleaner} bean will be destroyed, which triggers {@link CloudFoundryCleaner#clean()}. + * After that, every {@link Bean} in {@link IntegrationTestConfiguration} is recreated, including users, + * clients, organizations, etc: everything required to run a test. + *

          + * We use a meta-annotation instead of a raw {@link DirtiesContext} to make it clear what it does, rather + * than having to understand complicated lifecycle issues. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +@DirtiesContext +public @interface CleanupCloudFoundryAfterClass {} diff --git a/integration-test/src/test/java/org/cloudfoundry/CloudFoundryCleaner.java b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryCleaner.java new file mode 100644 index 00000000000..582e7cfbe54 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryCleaner.java @@ -0,0 +1,1464 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import static org.cloudfoundry.CloudFoundryVersion.PCF_1_12; +import static org.cloudfoundry.CloudFoundryVersion.PCF_2_1; +import static org.cloudfoundry.util.tuple.TupleUtils.function; +import static org.cloudfoundry.util.tuple.TupleUtils.predicate; + +import com.github.zafarkhaja.semver.Version; +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; +import java.util.function.Supplier; +import javax.net.ssl.SSLException; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationServiceBindingRequest; +import org.cloudfoundry.client.v2.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsRequest; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsResponse; +import org.cloudfoundry.client.v2.featureflags.SetFeatureFlagRequest; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsRequest; +import org.cloudfoundry.client.v2.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v2.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceKeysRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceinstances.UnbindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.servicekeys.DeleteServiceKeyRequest; +import org.cloudfoundry.client.v2.shareddomains.DeleteSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.DeleteSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.DeleteUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.RemoveUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstanceResource; +import org.cloudfoundry.client.v3.Metadata; +import org.cloudfoundry.client.v3.Relationship; +import org.cloudfoundry.client.v3.applications.Application; +import org.cloudfoundry.client.v3.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipResponse; +import org.cloudfoundry.client.v3.serviceinstances.UnshareServiceInstanceRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceResponse; +import org.cloudfoundry.client.v3.users.UserResource; +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.networking.v1.policies.DeletePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.Destination; +import org.cloudfoundry.networking.v1.policies.ListPoliciesRequest; +import org.cloudfoundry.networking.v1.policies.ListPoliciesResponse; +import org.cloudfoundry.networking.v1.policies.Policy; +import org.cloudfoundry.networking.v1.policies.Ports; +import org.cloudfoundry.networking.v1.policies.Source; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.clients.DeleteClientRequest; +import org.cloudfoundry.uaa.clients.ListClientsRequest; +import org.cloudfoundry.uaa.groups.DeleteGroupRequest; +import org.cloudfoundry.uaa.groups.Group; +import org.cloudfoundry.uaa.groups.ListGroupsRequest; +import org.cloudfoundry.uaa.groups.MemberSummary; +import org.cloudfoundry.uaa.identityproviders.DeleteIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersRequest; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersResponse; +import org.cloudfoundry.uaa.identityzones.DeleteIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesRequest; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesResponse; +import org.cloudfoundry.uaa.users.DeleteUserRequest; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.util.FluentMap; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.LastOperationUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.DisposableBean; +import org.springframework.beans.factory.InitializingBean; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuples; +import reactor.util.retry.Retry; + +final class CloudFoundryCleaner implements InitializingBean, DisposableBean { + + private static boolean cleanSlateEnvironment = false; + + private static final Logger LOGGER = LoggerFactory.getLogger("cloudfoundry-client.test"); + + private static final Map STANDARD_FEATURE_FLAGS = + FluentMap.builder() + .entry("app_bits_upload", true) + .entry("app_scaling", true) + .entry("diego_docker", true) + .entry("private_domain_creation", true) + .entry("route_creation", true) + .entry("service_instance_creation", true) + .entry("service_instance_sharing", true) + .entry("set_roles_by_username", true) + .entry("unset_roles_by_username", true) + .entry("user_org_creation", false) + .build(); + + private final CloudFoundryClient cloudFoundryClient; + + private final NameFactory nameFactory; + + private final NetworkingClient networkingClient; + + private final Version serverVersion; + + private final UaaClient uaaClient; + + CloudFoundryCleaner( + CloudFoundryClient cloudFoundryClient, + NameFactory nameFactory, + NetworkingClient networkingClient, + Version serverVersion, + UaaClient uaaClient) { + this.cloudFoundryClient = cloudFoundryClient; + this.nameFactory = nameFactory; + this.networkingClient = networkingClient; + this.serverVersion = serverVersion; + this.uaaClient = uaaClient; + } + + /** + * Once at the beginning of the whole test suite, clean up the environment. It should only ever happen + * once, hence the static init variable. + */ + @Override + public void afterPropertiesSet() { + if (!cleanSlateEnvironment) { + LOGGER.info( + "Performing clean slate cleanup. Should happen once per integration test run."); + this.clean(); + cleanSlateEnvironment = true; + } + } + + @Override + public void destroy() { + this.clean(); + } + + void clean() { + Flux.empty() + .thenMany( + Mono.when( // Before Routes + cleanServiceInstances( + this.cloudFoundryClient, + this.nameFactory, + this.serverVersion), + cleanUserProvidedServiceInstances( + this.cloudFoundryClient, this.nameFactory))) + .thenMany( + Mono.when( // No prerequisites + cleanBuildpacks(this.cloudFoundryClient, this.nameFactory), + cleanClients(this.uaaClient, this.nameFactory), + cleanFeatureFlags(this.cloudFoundryClient), + cleanGroups(this.uaaClient, this.nameFactory), + cleanIdentityProviders(this.uaaClient, this.nameFactory), + cleanIdentityZones(this.uaaClient, this.nameFactory), + cleanNetworkingPolicies( + this.networkingClient, + this.nameFactory, + this.serverVersion), + cleanRoutes(this.cloudFoundryClient, this.nameFactory), + cleanSecurityGroups(this.cloudFoundryClient, this.nameFactory), + cleanServiceBrokers(this.cloudFoundryClient, this.nameFactory), + cleanSpaceQuotaDefinitions( + this.cloudFoundryClient, this.nameFactory), + cleanStacks(this.cloudFoundryClient, this.nameFactory), + cleanUsersV3(this.cloudFoundryClient, this.nameFactory))) + .thenMany( + Mono.when( + cleanApplicationsV3( + this.cloudFoundryClient, + this.nameFactory), // After Routes, cannot run with + // other cleanApps + cleanUsers(this.uaaClient, this.nameFactory) // After CF Users + )) + .thenMany( + Mono.when( // After Routes/Applications + cleanPrivateDomains(this.cloudFoundryClient, this.nameFactory), + cleanSharedDomains(this.cloudFoundryClient, this.nameFactory), + cleanSpaces(this.cloudFoundryClient, this.nameFactory))) + .thenMany( + cleanOrganizations( + this.cloudFoundryClient, this.nameFactory)) // After Spaces + .thenMany( + cleanOrganizationQuotaDefinitions( + this.cloudFoundryClient, this.nameFactory)) // After Organizations + .retryWhen(Retry.max(5).filter(SSLException.class::isInstance)) + .doOnSubscribe(s -> LOGGER.debug(">> CLEANUP <<")) + .doOnComplete(() -> LOGGER.debug("<< CLEANUP >>")) + .then() + .block(Duration.ofMinutes(30)); + } + + private static Flux cleanApplicationsV3( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .list(ListApplicationsRequest.builder().page(page).build())) + .filter(application -> nameFactory.isApplicationName(application.getName())) + .delayUntil( + application -> + removeApplicationServiceBindings(cloudFoundryClient, application)) + .flatMap( + application -> + cloudFoundryClient + .applicationsV3() + .delete( + DeleteApplicationRequest.builder() + .applicationId(application.getId()) + .build()) + .then() + .doOnError( + t -> + LOGGER.error( + "Unable to delete V3 application" + + " {}", + application.getName(), + t))); + } + + private static Flux cleanBuildpacks( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .buildpacks() + .list(ListBuildpacksRequest.builder().page(page).build())) + .filter( + buildpack -> + nameFactory.isBuildpackName( + ResourceUtils.getEntity(buildpack).getName())) + .flatMap( + buildpack -> + cloudFoundryClient + .buildpacks() + .delete( + DeleteBuildpackRequest.builder() + .async(true) + .buildpackId(ResourceUtils.getId(buildpack)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete buildpack {}", + ResourceUtils.getEntity(buildpack) + .getName(), + t))) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), job)); + } + + private static Flux cleanClients(UaaClient uaaClient, NameFactory nameFactory) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .clients() + .list( + ListClientsRequest.builder() + .startIndex(startIndex) + .build())) + .filter(client -> nameFactory.isClientId(client.getClientId())) + .flatMap( + client -> + uaaClient + .clients() + .delete( + DeleteClientRequest.builder() + .clientId(client.getClientId()) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete client {}", + client.getName(), + t)) + .then()); + } + + private static Flux cleanFeatureFlags(CloudFoundryClient cloudFoundryClient) { + return cloudFoundryClient + .featureFlags() + .list(ListFeatureFlagsRequest.builder().build()) + .flatMapIterable(ListFeatureFlagsResponse::getFeatureFlags) + .filter(featureFlag -> STANDARD_FEATURE_FLAGS.containsKey(featureFlag.getName())) + .filter( + featureFlag -> + STANDARD_FEATURE_FLAGS.get(featureFlag.getName()) + != featureFlag.getEnabled()) + .flatMap( + featureFlag -> + cloudFoundryClient + .featureFlags() + .set( + SetFeatureFlagRequest.builder() + .name(featureFlag.getName()) + .enabled( + STANDARD_FEATURE_FLAGS.get( + featureFlag.getName())) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to set feature flag {} to" + + " {}", + featureFlag.getName(), + STANDARD_FEATURE_FLAGS.get( + featureFlag.getName()), + t)) + .then()); + } + + private static Flux cleanGroups(UaaClient uaaClient, NameFactory nameFactory) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .groups() + .list( + ListGroupsRequest.builder() + .startIndex(startIndex) + .build())) + .filter(group -> nameFactory.isGroupName(group.getDisplayName())) + .sort( + (group1, group2) -> { + if (containsMember(group1, group2)) { + return -1; + } else if (containsMember(group2, group1)) { + return 1; + } else { + return 0; + } + }) + .concatMap( + group -> + uaaClient + .groups() + .delete( + DeleteGroupRequest.builder() + .groupId(group.getId()) + .version("*") + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete group {}", + group.getDisplayName(), + t)) + .then()); + } + + private static Flux cleanIdentityProviders(UaaClient uaaClient, NameFactory nameFactory) { + return uaaClient + .identityProviders() + .list(ListIdentityProvidersRequest.builder().build()) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> nameFactory.isIdentityProviderName(provider.getName())) + .flatMap( + provider -> + uaaClient + .identityProviders() + .delete( + DeleteIdentityProviderRequest.builder() + .identityProviderId(provider.getId()) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete identity provider" + + " {}", + provider.getName(), + t)) + .then()); + } + + private static Flux cleanIdentityZones(UaaClient uaaClient, NameFactory nameFactory) { + return uaaClient + .identityZones() + .list(ListIdentityZonesRequest.builder().build()) + .flatMapIterable(ListIdentityZonesResponse::getIdentityZones) + .filter(zone -> nameFactory.isIdentityZoneName(zone.getName())) + .flatMap( + zone -> + uaaClient + .identityZones() + .delete( + DeleteIdentityZoneRequest.builder() + .identityZoneId(zone.getId()) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete identity zone {}", + zone.getName(), + t)) + .then()); + } + + private static Flux cleanNetworkingPolicies( + NetworkingClient networkingClient, NameFactory nameFactory, Version serverVersion) { + return ifCfVersion( + PCF_1_12, + serverVersion, + () -> + networkingClient + .policies() + .list(ListPoliciesRequest.builder().build()) + .flatMapIterable(ListPoliciesResponse::getPolicies) + .filter( + policy -> + nameFactory.isPort( + policy.getDestination() + .getPorts() + .getStart())) + .filter( + policy -> + nameFactory.isPort( + policy.getDestination() + .getPorts() + .getEnd())) + .flatMap( + policy -> + networkingClient + .policies() + .delete( + DeletePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination + .builder() + .id( + policy.getDestination() + .getId()) + .ports( + Ports + .builder() + .end( + policy.getDestination() + .getPorts() + .getEnd()) + .start( + policy.getDestination() + .getPorts() + .getStart()) + .build()) + .protocol( + policy.getDestination() + .getProtocol()) + .build()) + .source( + Source + .builder() + .id( + policy.getSource() + .getId()) + .build()) + .build()) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete" + + " networking" + + " policy" + + " between {}" + + " and {}", + policy.getSource() + .getId(), + policy.getDestination() + .getId(), + t)) + .then())); + } + + private static Flux cleanOrganizationQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest.builder() + .page(page) + .build())) + .filter( + domain -> + nameFactory.isQuotaDefinitionName( + ResourceUtils.getEntity(domain).getName())) + .flatMap( + organizationQuotaDefinition -> + cloudFoundryClient + .organizationQuotaDefinitions() + .delete( + DeleteOrganizationQuotaDefinitionRequest.builder() + .async(true) + .organizationQuotaDefinitionId( + ResourceUtils.getId( + organizationQuotaDefinition)) + .build()) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete organization" + + " quota definition {}", + ResourceUtils.getEntity( + organizationQuotaDefinition) + .getName(), + t))); + } + + private static Flux cleanOrganizations( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .page(page) + .build())) + .filter( + organization -> + nameFactory.isOrganizationName( + ResourceUtils.getEntity(organization).getName())) + .flatMap( + organization -> + cloudFoundryClient + .organizations() + .delete( + DeleteOrganizationRequest.builder() + .async(true) + .organizationId( + ResourceUtils.getId(organization)) + .build()) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete organization {}", + ResourceUtils.getEntity( + organization) + .getName(), + t))); + } + + private static Flux cleanPrivateDomains( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .privateDomains() + .list( + ListPrivateDomainsRequest.builder() + .page(page) + .build())) + .filter( + domain -> + nameFactory.isDomainName(ResourceUtils.getEntity(domain).getName())) + .flatMap( + privateDomain -> + cloudFoundryClient + .privateDomains() + .delete( + DeletePrivateDomainRequest.builder() + .async(true) + .privateDomainId( + ResourceUtils.getId(privateDomain)) + .build()) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete private domain" + + " {}", + ResourceUtils.getEntity( + privateDomain) + .getName(), + t))); + } + + private static Flux cleanRoutes( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return getAllDomains(cloudFoundryClient) + .flatMapMany( + domains -> + PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .routes() + .list( + ListRoutesRequest.builder() + .page(page) + .build())) + .map(resource -> Tuples.of(domains, resource))) + .filter( + predicate( + (domains, route) -> + nameFactory.isDomainName( + domains.get( + ResourceUtils.getEntity(route) + .getDomainId())) + || nameFactory.isApplicationName( + ResourceUtils.getEntity(route).getHost()) + || nameFactory.isHostName( + ResourceUtils.getEntity(route).getHost()))) + .flatMap( + function( + (domains, route) -> + cloudFoundryClient + .routes() + .delete( + DeleteRouteRequest.builder() + .async(true) + .routeId(ResourceUtils.getId(route)) + .build()) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> { + RouteEntity entity = + ResourceUtils.getEntity(route); + LOGGER.error( + "Unable to delete route" + + " {}.{}:{}{}", + entity.getHost(), + domains.get( + entity.getDomainId()), + entity.getPort(), + entity.getPath(), + t); + }))); + } + + private static Flux cleanSecurityGroups( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .securityGroups() + .list( + ListSecurityGroupsRequest.builder() + .page(page) + .build())) + .filter( + securityGroup -> + nameFactory.isSecurityGroupName( + ResourceUtils.getEntity(securityGroup).getName())) + .flatMap( + securityGroup -> + cloudFoundryClient + .securityGroups() + .delete( + DeleteSecurityGroupRequest.builder() + .securityGroupId( + ResourceUtils.getId(securityGroup)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete security group" + + " {}", + ResourceUtils.getEntity( + securityGroup) + .getName(), + t)) + .then()); + } + + private static Flux cleanServiceBrokers( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .page(page) + .build())) + .filter( + serviceBroker -> + nameFactory.isServiceBrokerName( + ResourceUtils.getEntity(serviceBroker).getName())) + .flatMap( + serviceBroker -> + cloudFoundryClient + .serviceBrokers() + .delete( + DeleteServiceBrokerRequest.builder() + .serviceBrokerId( + ResourceUtils.getId(serviceBroker)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete service broker" + + " {}", + ResourceUtils.getEntity( + serviceBroker) + .getName(), + t))); + } + + private static Flux cleanServiceInstances( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory, Version serverVersion) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest.builder() + .page(page) + .build())) + .filter( + serviceInstance -> + nameFactory.isServiceInstanceName( + ResourceUtils.getEntity(serviceInstance).getName())) + .delayUntil( + serviceInstance -> + removeRouteAssociations(cloudFoundryClient, serviceInstance)) + .delayUntil( + serviceInstance -> + removeServiceInstanceServiceBindings( + cloudFoundryClient, serviceInstance)) + .delayUntil( + serviceInstance -> removeServiceKeys(cloudFoundryClient, serviceInstance)) + .delayUntil( + serviceInstance -> + removeServiceShares( + cloudFoundryClient, serviceInstance, serverVersion)) + .flatMap( + serviceInstance -> + cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .async(true) + .serviceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build()) + .flatMap( + response -> { + Object entity = response.getEntity(); + if (entity instanceof JobEntity) { + return JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + (JobEntity) response.getEntity()); + } else { + return LastOperationUtils.waitForCompletion( + Duration.ofMinutes(5), + () -> + cloudFoundryClient + .serviceInstances() + .get( + GetServiceInstanceRequest + .builder() + .serviceInstanceId( + ResourceUtils + .getId( + serviceInstance)) + .build()) + .map( + r -> + ResourceUtils + .getEntity( + r) + .getLastOperation())); + } + }) + .doOnError( + t -> + LOGGER.error( + "Unable to delete service instance" + + " {}", + ResourceUtils.getEntity( + serviceInstance) + .getName(), + t))); + } + + private static Flux cleanSharedDomains( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list( + ListSharedDomainsRequest.builder() + .page(page) + .build())) + .filter( + domain -> + nameFactory.isDomainName(ResourceUtils.getEntity(domain).getName())) + .flatMap( + domain -> + cloudFoundryClient + .sharedDomains() + .delete( + DeleteSharedDomainRequest.builder() + .async(true) + .sharedDomainId(ResourceUtils.getId(domain)) + .build()) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete domain {}", + ResourceUtils.getEntity(domain) + .getName(), + t))); + } + + private static Flux cleanSpaceQuotaDefinitions( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaceQuotaDefinitions() + .list( + ListSpaceQuotaDefinitionsRequest.builder() + .page(page) + .build())) + .filter( + quota -> + nameFactory.isQuotaDefinitionName( + ResourceUtils.getEntity(quota).getName())) + .flatMap( + quota -> + cloudFoundryClient + .spaceQuotaDefinitions() + .delete( + (DeleteSpaceQuotaDefinitionRequest.builder() + .async(true) + .spaceQuotaDefinitionId( + ResourceUtils.getId(quota)) + .build())) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete space quota" + + " definition {}", + ResourceUtils.getEntity(quota) + .getName(), + t))); + } + + private static Flux cleanSpaces( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .list(ListSpacesRequest.builder().page(page).build())) + .filter(space -> nameFactory.isSpaceName(ResourceUtils.getEntity(space).getName())) + .delayUntil( + space -> + removeSpaceMetadata( + cloudFoundryClient, + space)) // TODO: Remove once the delete spaces endpoint + // handles spaces with metadata + .flatMap( + space -> + cloudFoundryClient + .spaces() + .delete( + DeleteSpaceRequest.builder() + .async(true) + .recursive(true) + .spaceId(ResourceUtils.getId(space)) + .build()) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete space {}", + ResourceUtils.getEntity(space) + .getName(), + t))); + } + + private static Flux cleanStacks( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .stacks() + .list(ListStacksRequest.builder().page(page).build())) + .filter(stack -> nameFactory.isStackName(ResourceUtils.getEntity(stack).getName())) + .flatMap( + stack -> + cloudFoundryClient + .stacks() + .delete( + (DeleteStackRequest.builder() + .async(true) + .stackId(ResourceUtils.getId(stack)) + .build())) + .flatMapMany( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .doOnError( + t -> + LOGGER.error( + "Unable to delete stack {}", + ResourceUtils.getEntity(stack) + .getName(), + t))); + } + + private static Flux cleanUserProvidedServiceInstances( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .userProvidedServiceInstances() + .list( + ListUserProvidedServiceInstancesRequest.builder() + .page(page) + .build())) + .filter( + userProvidedServiceInstance -> + nameFactory.isServiceInstanceName( + ResourceUtils.getEntity(userProvidedServiceInstance) + .getName())) + .delayUntil( + userProvidedServiceInstance -> + removeRouteAssociations( + cloudFoundryClient, userProvidedServiceInstance)) + .delayUntil( + userProvidedServiceInstance -> + removeUserProvidedServiceInstanceServiceBindings( + cloudFoundryClient, userProvidedServiceInstance)) + .flatMap( + userProvidedServiceInstance -> + cloudFoundryClient + .userProvidedServiceInstances() + .delete( + DeleteUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId( + ResourceUtils.getId( + userProvidedServiceInstance)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete user provided" + + " service instance {}", + ResourceUtils.getEntity( + userProvidedServiceInstance) + .getName(), + t))); + } + + private static Flux cleanUsersV3( + CloudFoundryClient cloudFoundryClient, NameFactory nameFactory) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .usersV3() + .list( + org.cloudfoundry.client.v3.users.ListUsersRequest + .builder() + .page(page) + .build())) + .filter(resource -> isCleanable(nameFactory, resource)) + .map(UserResource::getId) + .flatMap( + userId -> + cloudFoundryClient + .usersV3() + .delete( + org.cloudfoundry.client.v3.users.DeleteUserRequest + .builder() + .userId(userId) + .build()) + .then() + .doOnError( + t -> + LOGGER.error( + "Unable to delete user {}", + userId, + t))); + } + + private static Flux cleanUsers(UaaClient uaaClient, NameFactory nameFactory) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .users() + .list( + ListUsersRequest.builder() + .startIndex(startIndex) + .build())) + .filter(user -> nameFactory.isUserName(user.getUserName())) + .flatMap( + user -> + uaaClient + .users() + .delete( + DeleteUserRequest.builder() + .userId(user.getId()) + .version("*") + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to delete user {}", + user.getName(), + t)) + .then()); + } + + private static boolean containsMember(Group group, Group candidate) { + return group.getMembers().stream() + .map(MemberSummary::getMemberId) + .anyMatch(id -> candidate.getId().equals(id)); + } + + private static Mono> getAllDomains(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .privateDomains() + .list( + ListPrivateDomainsRequest.builder() + .page(page) + .build())) + .map( + response -> + Tuples.of( + ResourceUtils.getId(response), + ResourceUtils.getEntity(response).getName())) + .mergeWith( + PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list( + ListSharedDomainsRequest.builder() + .page(page) + .build())) + .map( + response -> + Tuples.of( + ResourceUtils.getId(response), + ResourceUtils.getEntity(response) + .getName()))) + .collectMap(function((id, name) -> id), function((id, name) -> name)); + } + + private static Flux ifCfVersion( + CloudFoundryVersion expectedVersion, + Version serverVersion, + Supplier> supplier) { + return serverVersion.isLowerThan(expectedVersion.getVersion()) + ? Flux.empty() + : supplier.get(); + } + + private static boolean isCleanable(NameFactory nameFactory, UserResource resource) { + return nameFactory.isUserId(resource.getId()) + || nameFactory.isUserName(resource.getUsername()); + } + + private static Flux removeApplicationServiceBindings( + CloudFoundryClient cloudFoundryClient, Application application) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .page(page) + .applicationId(application.getId()) + .build())) + .flatMap( + serviceBinding -> + requestRemoveServiceBinding( + cloudFoundryClient, + application.getId(), + ResourceUtils.getId(serviceBinding)) + .doOnError( + t -> + LOGGER.error( + "Unable to remove service binding" + + " from {}", + application.getName(), + t))); + } + + private static Flux removeRouteAssociations( + CloudFoundryClient cloudFoundryClient, ServiceInstanceResource serviceInstance) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .listRoutes( + ListServiceInstanceRoutesRequest.builder() + .page(page) + .serviceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build())) + .flatMap( + route -> + cloudFoundryClient + .serviceInstances() + .unbindRoute( + UnbindServiceInstanceRouteRequest.builder() + .routeId(ResourceUtils.getId(route)) + .serviceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to remove route binding" + + " from {}", + ResourceUtils.getEntity( + serviceInstance) + .getName(), + t))); + } + + private static Flux removeRouteAssociations( + CloudFoundryClient cloudFoundryClient, + UserProvidedServiceInstanceResource serviceInstance) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .userProvidedServiceInstances() + .listRoutes( + ListUserProvidedServiceInstanceRoutesRequest + .builder() + .page(page) + .userProvidedServiceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build())) + .flatMap( + route -> + cloudFoundryClient + .userProvidedServiceInstances() + .removeRoute( + RemoveUserProvidedServiceInstanceRouteRequest + .builder() + .routeId(ResourceUtils.getId(route)) + .userProvidedServiceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to remove route binding" + + " from {}", + ResourceUtils.getEntity( + serviceInstance) + .getName(), + t))); + } + + private static Flux removeServiceInstanceServiceBindings( + CloudFoundryClient cloudFoundryClient, ServiceInstanceResource serviceInstance) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .listServiceBindings( + ListServiceInstanceServiceBindingsRequest.builder() + .page(page) + .serviceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build())) + .flatMap( + serviceBinding -> + requestRemoveServiceBinding( + cloudFoundryClient, + ResourceUtils.getEntity(serviceBinding) + .getApplicationId(), + ResourceUtils.getId(serviceBinding)) + .doOnError( + t -> + LOGGER.error( + "Unable to remove service binding" + + " from {}", + ResourceUtils.getEntity( + serviceInstance) + .getName(), + t))); + } + + private static Flux removeServiceKeys( + CloudFoundryClient cloudFoundryClient, ServiceInstanceResource serviceInstance) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .listServiceKeys( + ListServiceInstanceServiceKeysRequest.builder() + .page(page) + .serviceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build())) + .flatMap( + serviceKey -> + cloudFoundryClient + .serviceKeys() + .delete( + DeleteServiceKeyRequest.builder() + .serviceKeyId( + ResourceUtils.getId(serviceKey)) + .build()) + .doOnError( + t -> + LOGGER.error( + "Unable to remove service binding" + + " from {}", + ResourceUtils.getEntity(serviceKey) + .getName(), + t))); + } + + private static Flux removeServiceShares( + CloudFoundryClient cloudFoundryClient, + ServiceInstanceResource serviceInstance, + Version serverVersion) { + return ifCfVersion( + PCF_2_1, + serverVersion, + () -> + cloudFoundryClient + .serviceInstancesV3() + .listSharedSpacesRelationship( + ListSharedSpacesRelationshipRequest.builder() + .serviceInstanceId( + ResourceUtils.getId(serviceInstance)) + .build()) + .flatMapIterable(ListSharedSpacesRelationshipResponse::getData) + .map(Relationship::getId) + .flatMap( + spaceId -> + requestUnshareServiceInstance( + cloudFoundryClient, + serviceInstance, + spaceId) + .doOnError( + t -> + LOGGER.error( + "Unable to remove" + + " service" + + " share from" + + " {}", + ResourceUtils + .getEntity( + serviceInstance) + .getName(), + t)))); + } + + private static Mono removeSpaceMetadata( + CloudFoundryClient cloudFoundryClient, SpaceResource space) { + return cloudFoundryClient + .spacesV3() + .get(GetSpaceRequest.builder().spaceId(ResourceUtils.getId(space)).build()) + .map(GetSpaceResponse::getMetadata) + .flatMap( + metadata -> { + if (metadata.getAnnotations().isEmpty() + && metadata.getLabels().isEmpty()) { + return Mono.empty(); + } + + Map annotations = + new HashMap<>(metadata.getAnnotations()); + Map labels = new HashMap<>(metadata.getLabels()); + + annotations.replaceAll((k, v) -> null); + labels.replaceAll((k, v) -> null); + + return requestUpdateSpace( + cloudFoundryClient, + annotations, + labels, + ResourceUtils.getId(space)) + .doOnError( + t -> + LOGGER.error( + "Unable to remove metadata from {}", + ResourceUtils.getEntity(space) + .getName())); + }); + } + + private static Flux removeUserProvidedServiceInstanceServiceBindings( + CloudFoundryClient cloudFoundryClient, + UserProvidedServiceInstanceResource serviceInstance) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .userProvidedServiceInstances() + .listServiceBindings( + ListUserProvidedServiceInstanceServiceBindingsRequest + .builder() + .page(page) + .userProvidedServiceInstanceId( + ResourceUtils.getId( + serviceInstance)) + .build())) + .flatMap( + serviceBinding -> + requestRemoveServiceBinding( + cloudFoundryClient, + ResourceUtils.getEntity(serviceBinding) + .getApplicationId(), + ResourceUtils.getId(serviceBinding)) + .doOnError( + t -> + LOGGER.error( + "Unable to remove service binding" + + " from {}", + ResourceUtils.getEntity( + serviceInstance) + .getName(), + t))); + } + + private static Mono requestRemoveServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceBindingId) { + return cloudFoundryClient + .applicationsV2() + .removeServiceBinding( + RemoveApplicationServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceBindingId(serviceBindingId) + .build()); + } + + private static Mono requestUnshareServiceInstance( + CloudFoundryClient cloudFoundryClient, + ServiceInstanceResource serviceInstance, + String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .unshare( + UnshareServiceInstanceRequest.builder() + .serviceInstanceId(ResourceUtils.getId(serviceInstance)) + .spaceId(spaceId) + .build()); + } + + private static Mono requestUpdateSpace( + CloudFoundryClient cloudFoundryClient, + Map annotations, + Map labels, + String spaceId) { + return cloudFoundryClient + .spacesV3() + .update( + UpdateSpaceRequest.builder() + .metadata( + Metadata.builder() + .annotations(annotations) + .labels(labels) + .build()) + .spaceId(spaceId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java new file mode 100644 index 00000000000..65d7a8e38ce --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersion.java @@ -0,0 +1,73 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import com.github.zafarkhaja.semver.Version; + +public enum CloudFoundryVersion { + PCF_1_9(Version.forIntegers(2, 65, 0)), + + PCF_1_10(Version.forIntegers(2, 75, 0)), + + PCF_1_11(Version.forIntegers(2, 82, 0)), + + PCF_1_12(Version.forIntegers(2, 94, 0)), + + PCF_2_0(Version.forIntegers(2, 98, 0)), + + PCF_2_1(Version.forIntegers(2, 102, 0)), + + PCF_2_2(Version.forIntegers(2, 112, 0)), + + PCF_2_3(Version.forIntegers(2, 120, 0)), + + PCF_2_4(Version.forIntegers(2, 125, 0)), + + PCF_2_5(Version.forIntegers(2, 131, 0)), + + PCF_2_6(Version.forIntegers(2, 135, 0)), + + PCF_2_7(Version.forIntegers(2, 139, 0)), + + PCF_2_8(Version.forIntegers(2, 142, 0)), + + PCF_2_9(Version.forIntegers(2, 145, 0)), + + PCF_2_10(Version.forIntegers(2, 150, 0)), + + PCF_2_11(Version.forIntegers(2, 164, 0)), + + PCF_2_12(Version.forIntegers(2, 171, 0)), + + PCF_2_13(Version.forIntegers(2, 186, 0)), + + PCF_4_v2(Version.forIntegers(2, 209, 0)), + + PCF_4_v3(Version.forIntegers(3, 138, 0)), + + UNSPECIFIED(Version.forIntegers(0)); + + private final Version version; + + CloudFoundryVersion(Version version) { + this.version = version; + } + + Version getVersion() { + return this.version; + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersionConditionalRule.java b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersionConditionalRule.java new file mode 100644 index 00000000000..7fb0089dfd9 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/CloudFoundryVersionConditionalRule.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import static org.cloudfoundry.CloudFoundryVersion.UNSPECIFIED; + +import com.github.zafarkhaja.semver.Version; +import java.lang.reflect.AnnotatedElement; +import java.util.Optional; +import org.junit.jupiter.api.extension.ConditionEvaluationResult; +import org.junit.jupiter.api.extension.ExecutionCondition; +import org.junit.jupiter.api.extension.ExtensionContext; +import org.springframework.core.annotation.AnnotationUtils; + +final class CloudFoundryVersionConditionalRule implements ExecutionCondition { + + private final Version server; + + CloudFoundryVersionConditionalRule(Version server) { + this.server = server; + } + + @Override + public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) { + AnnotatedElement element = context.getElement().orElse(null); + + IfCloudFoundryVersion annotation = + AnnotationUtils.findAnnotation(element, IfCloudFoundryVersion.class); + + boolean enabled = + Optional.ofNullable(annotation) + .map(c -> isTestEnabled(c, CloudFoundryVersionConditionalRule.this.server)) + .orElse(true); + + return enabled + ? ConditionEvaluationResult.enabled("Test enabled") + : ConditionEvaluationResult.disabled( + String.format( + "Cloud Foundry version required by @IfCloudFoundryVersion is not" + + " valid for test method [%s].", + element)); + } + + private static boolean isTestEnabled(IfCloudFoundryVersion condition, Version server) { + boolean enabled = true; + + if (condition.lessThan() != UNSPECIFIED) { + enabled = enabled && server.lessThan(condition.lessThan().getVersion()); + } + + if (condition.lessThanOrEqualTo() != UNSPECIFIED) { + enabled = + enabled && server.lessThanOrEqualTo(condition.lessThanOrEqualTo().getVersion()); + } + + if (condition.equalTo() != UNSPECIFIED) { + enabled = enabled && server.equals(condition.equalTo().getVersion()); + } + + if (condition.greaterThanOrEqualTo() != UNSPECIFIED) { + enabled = + enabled + && server.greaterThanOrEqualTo( + condition.greaterThanOrEqualTo().getVersion()); + } + + if (condition.greaterThan() != UNSPECIFIED) { + enabled = enabled && server.greaterThan(condition.greaterThan().getVersion()); + } + + return enabled; + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/ExampleConfiguration.java b/integration-test/src/test/java/org/cloudfoundry/ExampleConfiguration.java new file mode 100644 index 00000000000..fef0e018e1c --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/ExampleConfiguration.java @@ -0,0 +1,139 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.operations.DefaultCloudFoundryOperations; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.DefaultConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.ReactorCloudFoundryClient; +import org.cloudfoundry.reactor.doppler.ReactorDopplerClient; +import org.cloudfoundry.reactor.routing.ReactorRoutingClient; +import org.cloudfoundry.reactor.tokenprovider.PasswordGrantTokenProvider; +import org.cloudfoundry.reactor.uaa.ReactorUaaClient; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.uaa.UaaClient; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.Lazy; + +/** + * The ExampleConfiguration should typically be used like this: + * + *

          
          + * {@literal}@Component
          + * final class Example implements ApplicationRunner {
          + *
          + *     private final Logger logger = LoggerFactory.getLogger("example");
          + *
          + *     public static void main(String[] args) {
          + *         new SpringApplicationBuilder(Example.class, ExampleConfiguration.class)
          + *        .run(args);
          + *     }
          + *
          + *     {@literal}@Override
          + *     public void run(ApplicationArguments args) throws Exception {
          + *     }
          + *
          + * }
          + * 
          + */ +@Configuration +@EnableAutoConfiguration +public class ExampleConfiguration { + + @Bean + @Lazy + ReactorCloudFoundryClient cloudFoundryClient( + ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorCloudFoundryClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + @Lazy + DefaultCloudFoundryOperations cloudFoundryOperations( + CloudFoundryClient cloudFoundryClient, + DopplerClient dopplerClient, + RoutingClient routingClient, + UaaClient uaaClient, + @Value("${example.organization}") String organization, + @Value("${example.space}") String space) { + return DefaultCloudFoundryOperations.builder() + .cloudFoundryClient(cloudFoundryClient) + .dopplerClient(dopplerClient) + .routingClient(routingClient) + .uaaClient(uaaClient) + .organization(organization) + .space(space) + .build(); + } + + @Bean + @Lazy + DefaultConnectionContext connectionContext( + @Value("${example.apiHost}") String apiHost, + @Value("${example.skipSslValidation:false}") Boolean skipSslValidation) { + + return DefaultConnectionContext.builder() + .apiHost(apiHost) + .skipSslValidation(skipSslValidation) + .build(); + } + + @Bean + @Lazy + DopplerClient dopplerClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorDopplerClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + @Lazy + RoutingClient routingClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorRoutingClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + @Lazy + PasswordGrantTokenProvider tokenProvider( + @Value("${example.password}") String password, + @Value("${example.username}") String username) { + + return PasswordGrantTokenProvider.builder().password(password).username(username).build(); + } + + @Bean + @Lazy + ReactorUaaClient uaaClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorUaaClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/IfCloudFoundryVersion.java b/integration-test/src/test/java/org/cloudfoundry/IfCloudFoundryVersion.java new file mode 100644 index 00000000000..cbe64e5eb9d --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/IfCloudFoundryVersion.java @@ -0,0 +1,43 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import static org.cloudfoundry.CloudFoundryVersion.UNSPECIFIED; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Inherited; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target({ElementType.METHOD, ElementType.TYPE}) +@Retention(RetentionPolicy.RUNTIME) +@Documented +@Inherited +public @interface IfCloudFoundryVersion { + + CloudFoundryVersion equalTo() default UNSPECIFIED; + + CloudFoundryVersion greaterThan() default UNSPECIFIED; + + CloudFoundryVersion greaterThanOrEqualTo() default UNSPECIFIED; + + CloudFoundryVersion lessThan() default UNSPECIFIED; + + CloudFoundryVersion lessThanOrEqualTo() default UNSPECIFIED; +} diff --git a/integration-test/src/test/java/org/cloudfoundry/IntegrationTestConfiguration.java b/integration-test/src/test/java/org/cloudfoundry/IntegrationTestConfiguration.java new file mode 100644 index 00000000000..36c30c3578e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/IntegrationTestConfiguration.java @@ -0,0 +1,766 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import static org.assertj.core.api.Assertions.fail; +import static org.cloudfoundry.uaa.tokens.GrantType.AUTHORIZATION_CODE; +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.cloudfoundry.uaa.tokens.GrantType.PASSWORD; +import static org.cloudfoundry.uaa.tokens.GrantType.REFRESH_TOKEN; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import com.fasterxml.jackson.core.JsonParser; +import com.fasterxml.jackson.databind.DeserializationContext; +import com.fasterxml.jackson.databind.JsonDeserializer; +import com.fasterxml.jackson.databind.deser.DeserializationProblemHandler; +import com.github.zafarkhaja.semver.Version; +import java.io.IOException; +import java.nio.file.Path; +import java.security.SecureRandom; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashMap; +import java.util.List; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.info.GetInfoRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.stacks.StackEntity; +import org.cloudfoundry.client.v2.stacks.StackResource; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.doppler.DopplerClient; +import org.cloudfoundry.logcache.v1.TestLogCacheEndpoints; +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.operations.DefaultCloudFoundryOperations; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.DefaultConnectionContext; +import org.cloudfoundry.reactor.ProxyConfiguration; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.ReactorCloudFoundryClient; +import org.cloudfoundry.reactor.doppler.ReactorDopplerClient; +import org.cloudfoundry.reactor.logcache.v1.ReactorLogCacheClient; +import org.cloudfoundry.reactor.networking.ReactorNetworkingClient; +import org.cloudfoundry.reactor.routing.ReactorRoutingClient; +import org.cloudfoundry.reactor.tokenprovider.ClientCredentialsGrantTokenProvider; +import org.cloudfoundry.reactor.tokenprovider.PasswordGrantTokenProvider; +import org.cloudfoundry.reactor.uaa.ReactorUaaClient; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.clients.CreateClientRequest; +import org.cloudfoundry.uaa.groups.AddMemberRequest; +import org.cloudfoundry.uaa.groups.CreateGroupRequest; +import org.cloudfoundry.uaa.groups.CreateGroupResponse; +import org.cloudfoundry.uaa.groups.Group; +import org.cloudfoundry.uaa.groups.ListGroupsRequest; +import org.cloudfoundry.uaa.groups.ListGroupsResponse; +import org.cloudfoundry.uaa.groups.MemberType; +import org.cloudfoundry.uaa.users.CreateUserRequest; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.DependsOn; +import org.springframework.context.annotation.Lazy; +import org.springframework.core.io.ClassPathResource; +import org.springframework.util.StringUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuples; + +/** + * Default configuration class for ALL integration tests. + *

          + * Some beans are annotated as {@link Lazy}, meaning that they will only be initialized + * if a test class actually uses them through {@link Autowired} injection. This allows us + * to declare some CF applications as beans, but only push them when they are actually + * used by the class under tests. This makes our tests faster, as pushing an app can take + * several minutes. + */ +@Configuration +@EnableAutoConfiguration +public class IntegrationTestConfiguration { + + private static final List GROUPS = + Arrays.asList( + "clients.admin", + "clients.secret", + "cloud_controller.admin", + "idps.write", + "network.admin", + "routing.router_groups.read", + "routing.router_groups.write", + "routing.routes.read", + "routing.routes.write", + "scim.create", + "scim.invite", + "scim.read", + "scim.userids", + "scim.write", + "scim.zones", + "uaa.admin", + "zones.read", + "zones.write"); + + private static final List SCOPES = + Arrays.asList( + "clients.admin", + "clients.secret", + "cloud_controller.admin", + "cloud_controller.read", + "cloud_controller.write", + "idps.write", + "network.admin", + "openid", + "password.write", + "routing.router_groups.read", + "routing.router_groups.write", + "routing.routes.read", + "routing.routes.write", + "scim.create", + "scim.invite", + "scim.read", + "scim.userids", + "scim.write", + "scim.zones", + "uaa.admin", + "uaa.user", + "zones.read", + "zones.write"); + + private final Logger logger = LoggerFactory.getLogger("cloudfoundry-client.test"); + + @Bean + @Qualifier("admin") + ReactorCloudFoundryClient adminCloudFoundryClient( + ConnectionContext connectionContext, + @Value("${test.admin.password}") String password, + @Value("${test.admin.username}") String username) { + return ReactorCloudFoundryClient.builder() + .connectionContext(connectionContext) + .tokenProvider( + PasswordGrantTokenProvider.builder() + .password(password) + .username(username) + .build()) + .build(); + } + + @Bean + @Qualifier("admin") + NetworkingClient adminNetworkingClient( + ConnectionContext connectionContext, + @Value("${test.admin.password}") String password, + @Value("${test.admin.username}") String username) { + return ReactorNetworkingClient.builder() + .connectionContext(connectionContext) + .tokenProvider( + PasswordGrantTokenProvider.builder() + .password(password) + .username(username) + .build()) + .build(); + } + + @Bean + @Qualifier("admin") + UaaClient adminUaaClient( + ConnectionContext connectionContext, + @Value("${test.admin.clientId}") String clientId, + @Value("${test.admin.clientSecret}") String clientSecret, + @Value("${uaa.api.request.limit:#{null}}") Integer environmentRequestLimit) { + ReactorUaaClient unthrottledClient = + ReactorUaaClient.builder() + .connectionContext(connectionContext) + .tokenProvider( + ClientCredentialsGrantTokenProvider.builder() + .clientId(clientId) + .clientSecret(clientSecret) + .build()) + .build(); + if (environmentRequestLimit == null) { + return unthrottledClient; + } else { + return new ThrottlingUaaClient(unthrottledClient, environmentRequestLimit); + } + } + + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono> client( + @Qualifier("admin") UaaClient uaaClient, String clientId, String clientSecret) { + return uaaClient + .clients() + .create( + CreateClientRequest.builder() + .authorizedGrantTypes( + AUTHORIZATION_CODE, + CLIENT_CREDENTIALS, + PASSWORD, + REFRESH_TOKEN) + .autoApprove(String.valueOf(true)) + .clientId(clientId) + .clientSecret(clientSecret) + .redirectUriPattern("https://test.com/login") + .scopes(SCOPES) + .build()) + .thenReturn(Tuples.of(clientId, clientSecret)) + .doOnSubscribe( + s -> this.logger.debug(">> CLIENT ({}/{}) <<", clientId, clientSecret)) + .doOnError(Throwable::printStackTrace) + .doOnSuccess(r -> this.logger.debug("<< CLIENT ({})>>", clientId)); + } + + @Bean + String clientId(NameFactory nameFactory) { + return nameFactory.getClientId(); + } + + @Bean + String clientSecret(NameFactory nameFactory) { + return nameFactory.getClientSecret(); + } + + @Bean + CloudFoundryCleaner cloudFoundryCleaner( + @Qualifier("admin") CloudFoundryClient cloudFoundryClient, + NameFactory nameFactory, + @Qualifier("admin") NetworkingClient networkingClient, + Version serverVersion, + @Qualifier("admin") UaaClient uaaClient) { + return new CloudFoundryCleaner( + cloudFoundryClient, nameFactory, networkingClient, serverVersion, uaaClient); + } + + @Bean + ReactorCloudFoundryClient cloudFoundryClient( + ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorCloudFoundryClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + DefaultCloudFoundryOperations cloudFoundryOperations( + CloudFoundryClient cloudFoundryClient, + DopplerClient dopplerClient, + NetworkingClient networkingClient, + RoutingClient routingClient, + UaaClient uaaClient, + String organizationName, + String spaceName) { + return DefaultCloudFoundryOperations.builder() + .cloudFoundryClient(cloudFoundryClient) + .dopplerClient(dopplerClient) + .networkingClient(networkingClient) + .routingClient(routingClient) + .uaaClient(uaaClient) + .organization(organizationName) + .space(spaceName) + .build(); + } + + @Bean + CloudFoundryVersionConditionalRule cloudFoundryVersionConditionalRule(Version serverVersion) { + return new CloudFoundryVersionConditionalRule(serverVersion); + } + + @Bean + DefaultConnectionContext connectionContext( + @Value("${test.apiHost}") String apiHost, + @Value("${test.proxy.host:}") String proxyHost, + @Value("${test.proxy.password:}") String proxyPassword, + @Value("${test.proxy.port:8080}") Integer proxyPort, + @Value("${test.proxy.username:}") String proxyUsername, + @Value("${test.skipSslValidation:false}") Boolean skipSslValidation) { + + DefaultConnectionContext.Builder connectionContext = + DefaultConnectionContext.builder() + .apiHost(apiHost) + .problemHandler( + new FailingDeserializationProblemHandler()) // Test-only problem + // handler + .skipSslValidation(skipSslValidation) + .sslHandshakeTimeout(Duration.ofSeconds(30)); + + if (StringUtils.hasText(proxyHost)) { + ProxyConfiguration.Builder proxyConfiguration = + ProxyConfiguration.builder().host(proxyHost).port(proxyPort); + + if (StringUtils.hasText(proxyUsername)) { + proxyConfiguration.password(proxyPassword).username(proxyUsername); + } + + connectionContext.proxyConfiguration(proxyConfiguration.build()); + } + + return connectionContext.build(); + } + + @Bean + DopplerClient dopplerClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorDopplerClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + ReactorLogCacheClient logCacheClient( + ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorLogCacheClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + RandomNameFactory nameFactory() { + return new RandomNameFactory(new SecureRandom()); + } + + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono metricRegistrarServiceInstance( + CloudFoundryClient cloudFoundryClient, Mono spaceId, NameFactory nameFactory) { + return spaceId.flatMap( + spaceIdValue -> + cloudFoundryClient + .userProvidedServiceInstances() + .create( + CreateUserProvidedServiceInstanceRequest.builder() + .name(nameFactory.getServiceInstanceName()) + .spaceId(spaceIdValue) + .syslogDrainUrl("structured-format://json") + .build())) + .map(ResourceUtils::getId) + .cache(); + } + + @Bean + NetworkingClient networkingClient( + ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorNetworkingClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono organizationId( + CloudFoundryClient cloudFoundryClient, + String organizationName, + String organizationQuotaName, + Mono userId) { + return userId.flatMap( + userId1 -> + cloudFoundryClient + .organizationQuotaDefinitions() + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .instanceMemoryLimit(-1) + .memoryLimit(16384) + .name(organizationQuotaName) + .nonBasicServicesAllowed(true) + .totalPrivateDomains(-1) + .totalReservedRoutePorts(-1) + .totalRoutes(-1) + .totalServiceKeys(-1) + .totalServices(-1) + .build()) + .map(ResourceUtils::getId) + .zipWith(Mono.just(userId1))) + .flatMap( + function( + (quotaId, userId1) -> + cloudFoundryClient + .organizations() + .create( + CreateOrganizationRequest.builder() + .name(organizationName) + .quotaDefinitionId(quotaId) + .build()) + .map(ResourceUtils::getId) + .zipWith(Mono.just(userId1)))) + .flatMap( + function( + (organizationId, userId1) -> + cloudFoundryClient + .organizations() + .associateManager( + AssociateOrganizationManagerRequest + .builder() + .organizationId(organizationId) + .managerId(userId1) + .build()) + .thenReturn(organizationId))) + .doOnSubscribe(s -> this.logger.debug(">> ORGANIZATION ({}) <<", organizationName)) + .doOnError(Throwable::printStackTrace) + .doOnSuccess(id -> this.logger.debug("<< ORGANIZATION ({}) >>", id)) + .cache(); + } + + @Bean + String organizationName(NameFactory nameFactory) { + return nameFactory.getOrganizationName(); + } + + @Bean + String organizationQuotaName(NameFactory nameFactory) { + return nameFactory.getQuotaDefinitionName(); + } + + @Bean + String password(NameFactory nameFactory) { + return nameFactory.getPassword(); + } + + @Bean + String planName(NameFactory nameFactory) { + return nameFactory.getPlanName(); + } + + @Bean + RoutingClient routingClient(ConnectionContext connectionContext, TokenProvider tokenProvider) { + return ReactorRoutingClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + } + + @Bean + Version serverVersion(@Qualifier("admin") CloudFoundryClient cloudFoundryClient) { + return cloudFoundryClient + .info() + .get(GetInfoRequest.builder().build()) + .map(response -> Version.valueOf(response.getApiVersion())) + .doOnSubscribe(s -> this.logger.debug(">> CLOUD FOUNDRY VERSION <<")) + .doOnSuccess(r -> this.logger.debug("<< CLOUD FOUNDRY VERSION >>")) + .block(); + } + + @Lazy + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono serviceBrokerId( + CloudFoundryClient cloudFoundryClient, + NameFactory nameFactory, + String planName, + String serviceBrokerName, + String serviceName, + Mono spaceId) { + return spaceId.flatMap( + spaceId1 -> + ServiceBrokerUtils.createServiceBroker( + cloudFoundryClient, + nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId1, + false) + .map(response -> response.serviceBrokerId)) + .doOnSubscribe( + s -> + this.logger.debug( + ">> SERVICE BROKER ({} {}/{}) <<", + serviceBrokerName, + serviceName, + planName)) + .doOnError(Throwable::printStackTrace) + .doOnSuccess(id -> this.logger.debug("<< SERVICE_BROKER ({})>>", id)) + .cache(); + } + + @Bean + String serviceBrokerName(NameFactory nameFactory) { + return nameFactory.getServiceBrokerName(); + } + + @Bean + String serviceName(NameFactory nameFactory) { + return nameFactory.getServiceName(); + } + + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono spaceId( + CloudFoundryClient cloudFoundryClient, Mono organizationId, String spaceName) { + return organizationId + .flatMap( + orgId -> + cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(orgId) + .build())) + .map(ResourceUtils::getId) + .doOnSubscribe(s -> this.logger.debug(">> SPACE ({}) <<", spaceName)) + .doOnError(Throwable::printStackTrace) + .doOnSuccess(id -> this.logger.debug("<< SPACE ({}) >>", id)) + .cache(); + } + + @Bean + String spaceName(NameFactory nameFactory) { + return nameFactory.getSpaceName(); + } + + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono stackId(CloudFoundryClient cloudFoundryClient, Mono stackName) { + return stackName + .flux() + .flatMap( + name -> + PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .stacks() + .list( + ListStacksRequest.builder() + .name(name) + .page(page) + .build()))) + .single() + .map(ResourceUtils::getId) + .doOnSubscribe(s -> this.logger.debug(">> STACK ({}) <<", stackName)) + .doOnError(Throwable::printStackTrace) + .doOnSuccess(id -> this.logger.debug("<< STACK ({})>>", id)) + .cache(); + } + + /** + * Select the most recent stack available, matching {@code cflinuxfs*}, based + * on the stack number. + */ + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono stackName(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .stacks() + .list(ListStacksRequest.builder().page(page).build())) + .map(StackResource::getEntity) + .map(StackEntity::getName) + .filter(s -> s.matches("^cflinuxfs\\d$")) + .sort(Comparator.reverseOrder()) + .next() + .cache(); + } + + @Lazy + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono testLogCacheApp( + CloudFoundryClient cloudFoundryClient, + Mono spaceId, + Mono metricRegistrarServiceInstance, + String testLogCacheAppName, + String testLogCacheHostName, + Path testLogCacheAppbits) { + return metricRegistrarServiceInstance + .zipWith(spaceId) + .flatMap( + function( + (metricsRegistrarServiceInstanceId, spaceIdValue) -> + ApplicationUtils.pushApplication( + cloudFoundryClient, + testLogCacheAppbits, + testLogCacheAppName, + Collections.singleton( + metricsRegistrarServiceInstanceId), + new HashMap<>(), + testLogCacheHostName, + spaceIdValue))) + .cache(); + } + + @Bean + Path testLogCacheAppBits() throws IOException { + return new ClassPathResource("test-log-cache.jar").getFile().toPath(); + } + + @Bean + String testLogCacheAppName(NameFactory nameFactory) { + return nameFactory.getApplicationName(); + } + + @Lazy + @Bean + TestLogCacheEndpoints testLogCacheEndpoints( + ConnectionContext connectionContext, + TokenProvider tokenProvider, + Mono testLogCacheApp) { + + return new TestLogCacheEndpoints( + connectionContext, testLogCacheApp.map(app -> app.uri), tokenProvider); + } + + @Bean + String testLogCacheHostName(NameFactory nameFactory) { + return nameFactory.getHostName(); + } + + @Bean + @DependsOn({"client", "userId"}) + PasswordGrantTokenProvider tokenProvider( + String clientId, String clientSecret, String password, String username) { + return PasswordGrantTokenProvider.builder() + .clientId(clientId) + .clientSecret(clientSecret) + .password(password) + .username(username) + .build(); + } + + @Bean + UaaClient uaaClient( + ConnectionContext connectionContext, + TokenProvider tokenProvider, + @Value("${uaa.api.request.limit:#{null}}") Integer environmentRequestLimit) { + ReactorUaaClient unthrottledClient = + ReactorUaaClient.builder() + .connectionContext(connectionContext) + .tokenProvider(tokenProvider) + .build(); + if (environmentRequestLimit == null) { + return unthrottledClient; + } else { + return new ThrottlingUaaClient(unthrottledClient, environmentRequestLimit); + } + } + + @Bean(initMethod = "block") + @DependsOn("cloudFoundryCleaner") + Mono userId(@Qualifier("admin") UaaClient uaaClient, String password, String username) { + return uaaClient + .users() + .create( + CreateUserRequest.builder() + .email( + Email.builder() + .primary(true) + .value( + String.format( + "%s@%s.com", username, username)) + .build()) + .name(Name.builder().givenName("Test").familyName("User").build()) + .password(password) + .userName(username) + .build()) + .map(CreateUserResponse::getId) + .delayUntil( + userId -> + Flux.fromIterable(GROUPS) + .flatMap( + group -> + uaaClient + .groups() + .list( + ListGroupsRequest.builder() + .filter( + String + .format( + "displayName" + + " eq \"%s\"", + group)) + .build()) + .flatMapIterable( + ListGroupsResponse + ::getResources) + .singleOrEmpty() + .map(Group::getId) + .switchIfEmpty( + uaaClient + .groups() + .create( + CreateGroupRequest + .builder() + .displayName( + group) + .build()) + .map( + CreateGroupResponse + ::getId)) + .flatMap( + groupId -> + uaaClient + .groups() + .addMember( + AddMemberRequest + .builder() + .groupId( + groupId) + .memberId( + userId) + .origin( + "uaa") + .type( + MemberType + .USER) + .build())))) + .doOnSubscribe(s -> this.logger.debug(">> USER ({}/{}) <<", username, password)) + .doOnError(Throwable::printStackTrace) + .doOnSuccess(id -> this.logger.debug("<< USER ({})>>", id)) + .cache(); + } + + @Bean + String username(NameFactory nameFactory) { + return nameFactory.getUserName(); + } + + public static final class FailingDeserializationProblemHandler + extends DeserializationProblemHandler { + + @Override + public boolean handleUnknownProperty( + DeserializationContext ctxt, + JsonParser jp, + JsonDeserializer deserializer, + Object beanOrClass, + String propertyName) { + fail( + String.format( + "Found unexpected property %s in payload for %s", + propertyName, beanOrClass.getClass().getName())); + return false; + } + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/NameFactory.java b/integration-test/src/test/java/org/cloudfoundry/NameFactory.java new file mode 100644 index 00000000000..7432672263f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/NameFactory.java @@ -0,0 +1,637 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +/** + * A factory for creating names + */ +public interface NameFactory { + + String APPLICATION_PREFIX = "test-application-"; + + String BUILDPACK_PREFIX = "test-buildpack-"; + + String CLIENT_ID_PREFIX = "test-client-id-"; + + String CLIENT_SECRET_PREFIX = "test-client-secret-"; + + String DOMAIN_PREFIX = "test.domain."; + + String GROUP_PREFIX = "test-group-"; + + String HOST_PREFIX = "test-host-"; + + String IDENTITY_PROVIDER_PREFIX = "test-identity-provider-"; + + String IDENTITY_ZONE_PREFIX = "test-identity-zone-"; + + String ISOLATION_SEGMENT_PREFIX = "test-isolation-segment-"; + + String ORGANIZATION_PREFIX = "test-organization-"; + + String PASSWORD_PREFIX = "test-password-"; + + String PATH_PREFIX = "/test-path-"; + + String PLAN_PREFIX = "test-plan-"; + + String QUOTA_DEFINITION_PREFIX = "test-quota-definition-"; + + String SECURITY_GROUP_PREFIX = "test-security-group-"; + + String SERVICE_BROKER_PREFIX = "test-service-broker-"; + + String SERVICE_INSTANCE_PREFIX = "test-service-instance-"; + + String SERVICE_KEY_PREFIX = "test-service-key-"; + + String SERVICE_PREFIX = "test-service-"; + + String SPACE_PREFIX = "test-space-"; + + String STACK_PREFIX = "test-stack-"; + + String TASK_PREFIX = "test-task-"; + + String USER_ID_PREFIX = "test-user-id-"; + + String USER_PREFIX = "test-user-"; + + String VARIABLE_NAME_PREFIX = "test-variable-name-"; + + String VARIABLE_VALUE_PREFIX = "test-variable-value-"; + + /** + * Creates an application name + * + * @return the application name + */ + default String getApplicationName() { + return getName(APPLICATION_PREFIX); + } + + /** + * Creates a buildpack name + * + * @return the buildpack name + */ + default String getBuildpackName() { + return getName(BUILDPACK_PREFIX); + } + + /** + * Creates a client id + * + * @return the client id + */ + default String getClientId() { + return getName(CLIENT_ID_PREFIX); + } + + /** + * Creates a client secret + * + * @return the client secret + */ + default String getClientSecret() { + return getName(CLIENT_SECRET_PREFIX); + } + + /** + * Creates a domain name + * + * @return the domain name + */ + default String getDomainName() { + return getName(DOMAIN_PREFIX); + } + + /** + * Creates a group name + * + * @return the group name + */ + default String getGroupName() { + return getName(GROUP_PREFIX); + } + + /** + * Creates a host name + * + * @return the host name + */ + default String getHostName() { + return getName(HOST_PREFIX); + } + + /** + * Creates an identity provider name + * + * @return the identity provider name + */ + default String getIdentityProviderName() { + return getName(IDENTITY_PROVIDER_PREFIX); + } + + /** + * Creates an identity zone name + * + * @return the identity zone name + */ + default String getIdentityZoneName() { + return getName(IDENTITY_ZONE_PREFIX); + } + + /** + * Creates an IP address + * + * @return the IP address + */ + String getIpAddress(); + + /** + * Creates an isolation segment name + * + * @return the isolation segment name + */ + default String getIsolationSegmentName() { + return getName(ISOLATION_SEGMENT_PREFIX); + } + + /** + * Creates a name + * + * @param prefix the prefix to the name + * @return the name + */ + String getName(String prefix); + + /** + * Creates an organization name + * + * @return the organization name + */ + default String getOrganizationName() { + return getName(ORGANIZATION_PREFIX); + } + + /** + * Creates a password + * + * @return the password + */ + default String getPassword() { + return getName(PASSWORD_PREFIX); + } + + /** + * Creates a path + * + * @return the path + */ + default String getPath() { + return getName(PATH_PREFIX); + } + + /** + * Creates a plan name + * + * @return the plan name + */ + default String getPlanName() { + return getName(PLAN_PREFIX); + } + + /** + * Creates a port + * + * @return a port + */ + int getPort(); + + /** + * Creates a quota definition name + * + * @return the quota definition name + */ + default String getQuotaDefinitionName() { + return getName(QUOTA_DEFINITION_PREFIX); + } + + /** + * Creates a security group name + * + * @return the security group name + */ + default String getSecurityGroupName() { + return getName(SECURITY_GROUP_PREFIX); + } + + /** + * Creates a service broker name + * + * @return the service broker name + */ + default String getServiceBrokerName() { + return getName(SERVICE_BROKER_PREFIX); + } + + /** + * Creates a service instance name + * + * @return the service instance name + */ + default String getServiceInstanceName() { + return getName(SERVICE_INSTANCE_PREFIX); + } + + /** + * Creates a service key name + * + * @return the service key name + */ + default String getServiceKeyName() { + return getName(SERVICE_KEY_PREFIX); + } + + /** + * Creates a service name + * + * @return the service name + */ + default String getServiceName() { + return getName(SERVICE_PREFIX); + } + + /** + * Creates a space name + * + * @return the space name + */ + default String getSpaceName() { + return getName(SPACE_PREFIX); + } + + /** + * Creates a stack name + * + * @return the stack name + */ + default String getStackName() { + return getName(STACK_PREFIX); + } + + /** + * Creates a task name + * + * @return the task name + */ + default String getTaskName() { + return getName(TASK_PREFIX); + } + + /** + * Creates a user id + * + * @return the user id + */ + default String getUserId() { + return getName(USER_ID_PREFIX); + } + + /** + * Creates a user name + * + * @return the user name + */ + default String getUserName() { + return getName(USER_PREFIX); + } + + /** + * Creates a variable name + * + * @return the variable name + */ + default String getVariableName() { + return getName(VARIABLE_NAME_PREFIX); + } + + /** + * Creates a variable value + * + * @return the variable value + */ + default String getVariableValue() { + return getName(VARIABLE_VALUE_PREFIX); + } + + /** + * Tests a name to determine if it is an application name + * + * @param candidate the candidate name + * @return {@code true} if the name is an application name, {@code false} otherwise + */ + default boolean isApplicationName(String candidate) { + return isName(APPLICATION_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a buildpack name + * + * @param candidate the candidate name + * @return {@code true} if the name is a buildpack name, {@code false} otherwise + */ + default boolean isBuildpackName(String candidate) { + return isName(BUILDPACK_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a client id + * + * @param candidate the candidate name + * @return {@code true} if the name is a client id, {@code false} otherwise + */ + default boolean isClientId(String candidate) { + return isName(CLIENT_ID_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a client secret + * + * @param candidate the candidate name + * @return {@code true} if the name is a client secret, {@code false} otherwise + */ + default boolean isClientSecret(String candidate) { + return isName(CLIENT_SECRET_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a domain name + * + * @param candidate the candidate name + * @return {@code true} if the name is a domain name, {@code false} otherwise + */ + default boolean isDomainName(String candidate) { + return isName(DOMAIN_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a group name + * + * @param candidate the candidate name + * @return {@code true} if the name is a group name, {@code false} otherwise + */ + default boolean isGroupName(String candidate) { + return isName(GROUP_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a host name + * + * @param candidate the candidate name + * @return {@code true} if the name is a host name, {@code false} otherwise + */ + default boolean isHostName(String candidate) { + return isName(HOST_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is an identity provider name + * + * @param candidate the candidate name + * @return {@code true} if the name is an identity provider name, {@code false} otherwise + */ + default boolean isIdentityProviderName(String candidate) { + return isName(IDENTITY_PROVIDER_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is an identity zone name + * + * @param candidate the candidate name + * @return {@code true} if the name is an identity zone name, {@code false} otherwise + */ + default boolean isIdentityZoneName(String candidate) { + return isName(IDENTITY_ZONE_PREFIX, candidate); + } + + /** + * Tests a string to determine if it is an IP address + * + * @param candidate the candidate string + * @return {@code true} if the string is an IP address, {@code false} otherwise + */ + boolean isIpAddress(String candidate); + + /** + * Tests a name to determine if it is an isolation segment name + * + * @param candidate the candidate name + * @return {@code true} if the name is an isolation segment name, {@code false} otherwise + */ + default boolean isIsolationSegmentName(String candidate) { + return isName(ISOLATION_SEGMENT_PREFIX, candidate); + } + + /** + * Tests a name to determine if it starts with a prefix + * + * @param prefix the prefix to the name + * @param candidate the candidate name + * @return {@code true} if the name starts with the prefix, {@code false} otherwise + */ + boolean isName(String prefix, String candidate); + + /** + * Tests a name to determine if it is an organization name + * + * @param candidate the candidate name + * @return {@code true} if the name is an organization name, {@code false} otherwise + */ + default boolean isOrganizationName(String candidate) { + return isName(ORGANIZATION_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a password + * + * @param candidate the candidate name + * @return {@code true} if the name is a password, {@code false} otherwise + */ + default boolean isPassword(String candidate) { + return isName(PASSWORD_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a path + * + * @param candidate the candidate name + * @return {@code true} if the name is a path, {@code false} otherwise + */ + default boolean isPath(String candidate) { + return isName(PATH_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a plan name + * + * @param candidate the candidate name + * @return {@code true} if the name is a plan name, {@code false} otherwise + */ + default boolean isPlanName(String candidate) { + return isName(PLAN_PREFIX, candidate); + } + + /** + * Tests if an integer is a port + * + * @param candidate the candidate integer + * @return {@code true} if the integer is a port, {@code false} otherwise + */ + boolean isPort(int candidate); + + /** + * Tests a name to determine if it is a quota definition name + * + * @param candidate the candidate name + * @return {@code true} if the name is a quota definition name, {@code false} otherwise + */ + default boolean isQuotaDefinitionName(String candidate) { + return isName(QUOTA_DEFINITION_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a security group name + * + * @param candidate the candidate name + * @return {@code true} if the name is a security group name, {@code false} otherwise + */ + default boolean isSecurityGroupName(String candidate) { + return isName(SECURITY_GROUP_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a service broker name + * + * @param candidate the candidate name + * @return {@code true} if the name is a service broker name, {@code false} otherwise + */ + default boolean isServiceBrokerName(String candidate) { + return isName(SERVICE_BROKER_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a service instance name + * + * @param candidate the candidate name + * @return {@code true} if the name is a service instance name, {@code false} otherwise + */ + default boolean isServiceInstanceName(String candidate) { + return isName(SERVICE_INSTANCE_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a service key name + * + * @param candidate the candidate name + * @return {@code true} if the name is a service key name, {@code false} otherwise + */ + default boolean isServiceKeyName(String candidate) { + return isName(SERVICE_KEY_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a service name + * + * @param candidate the candidate name + * @return {@code true} if the name is a service name, {@code false} otherwise + */ + default boolean isServiceName(String candidate) { + return isName(SERVICE_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a space name + * + * @param candidate the candidate name + * @return {@code true} if the name is a space name, {@code false} otherwise + */ + default boolean isSpaceName(String candidate) { + return isName(SPACE_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a stack name + * + * @param candidate the candidate name + * @return {@code true} if the name is a stack name, {@code false} otherwise + */ + default boolean isStackName(String candidate) { + return isName(STACK_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a task name + * + * @param candidate the candidate name + * @return {@code true} if the name is a task name, {@code false} otherwise + */ + default boolean isTaskName(String candidate) { + return isName(TASK_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a user id + * + * @param candidate the candidate name + * @return {@code true} if the name is a user id, {@code false} otherwise + */ + default boolean isUserId(String candidate) { + return isName(USER_ID_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a user name + * + * @param candidate the candidate name + * @return {@code true} if the name is a user name, {@code false} otherwise + */ + default boolean isUserName(String candidate) { + return isName(USER_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a variable name + * + * @param candidate the candidate name + * @return {@code true} if the name is a variable name, {@code false} otherwise + */ + default boolean isVariableName(String candidate) { + return isName(VARIABLE_NAME_PREFIX, candidate); + } + + /** + * Tests a name to determine if it is a variable value + * + * @param candidate the candidate name + * @return {@code true} if the name is a variable value, {@code false} otherwise + */ + default boolean isVariableValue(String candidate) { + return isName(VARIABLE_VALUE_PREFIX, candidate); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/RandomNameFactory.java b/integration-test/src/test/java/org/cloudfoundry/RandomNameFactory.java new file mode 100644 index 00000000000..5443f15780e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/RandomNameFactory.java @@ -0,0 +1,87 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import java.math.BigInteger; +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.Random; +import java.util.concurrent.atomic.AtomicInteger; +import reactor.core.Exceptions; + +final class RandomNameFactory implements NameFactory { + + private static final int PORT_MAXIMUM = 1122; + + private static final int PORT_MINIMUM = 1025; + + private final Random random; + + private AtomicInteger port = new AtomicInteger(PORT_MINIMUM); + + RandomNameFactory(Random random) { + this.random = random; + } + + @Override + public String getIpAddress() { + try { + return InetAddress.getByName( + String.format( + "169.254.%d.%d", + 1 + this.random.nextInt(254), this.random.nextInt(256))) + .getHostAddress(); + } catch (UnknownHostException e) { + throw Exceptions.propagate(e); + } + } + + @Override + public String getName(String prefix) { + return String.format("%s%s", prefix, new BigInteger(25, this.random).toString(32)); + } + + @Override + public int getPort() { + int candidate = this.port.getAndIncrement(); + + if (candidate <= PORT_MAXIMUM) { + return candidate; + } else { + throw new IllegalStateException("All suitable ports have been allocated"); + } + } + + @Override + public boolean isIpAddress(String candidate) { + try { + return InetAddress.getByName(candidate).isLinkLocalAddress(); + } catch (UnknownHostException e) { + return false; + } + } + + @Override + public boolean isName(String prefix, String candidate) { + return candidate != null && candidate.startsWith(prefix); + } + + @Override + public boolean isPort(int candidate) { + return candidate >= PORT_MINIMUM && candidate <= PORT_MAXIMUM; + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/ServiceBrokerUtils.java b/integration-test/src/test/java/org/cloudfoundry/ServiceBrokerUtils.java new file mode 100644 index 00000000000..e3677bd7ba7 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/ServiceBrokerUtils.java @@ -0,0 +1,246 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry; + +import java.io.IOException; +import java.nio.file.Path; +import java.util.Collections; +import java.util.HashMap; +import java.util.Map; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanResponse; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.springframework.core.io.ClassPathResource; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; + +public final class ServiceBrokerUtils { + + @SuppressWarnings("BlockingMethodInNonBlockingContext") + public static Mono createServiceBroker( + CloudFoundryClient cloudFoundryClient, + NameFactory nameFactory, + String planName, + String serviceBrokerName, + String serviceName, + String spaceId, + Boolean spaceScoped) { + Path application; + try { + application = new ClassPathResource("test-service-broker.jar").getFile().toPath(); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + return pushServiceBrokerApplication( + cloudFoundryClient, + application, + nameFactory, + planName, + serviceName, + spaceId) + .flatMap( + applicationMetadata -> + requestCreateServiceBroker( + cloudFoundryClient, + applicationMetadata, + serviceBrokerName, + spaceScoped) + .delayUntil( + response -> + Mono.zip( + makeServicePlanPubliclyVisible( + cloudFoundryClient, + serviceName, + spaceScoped), + makeServicePlanPubliclyVisible( + cloudFoundryClient, + serviceName + "-shareable", + spaceScoped))) + .map( + response -> + new ServiceBrokerMetadata( + applicationMetadata, + ResourceUtils.getId(response)))); + } + + @SuppressWarnings("BlockingMethodInNonBlockingContext") + public static Mono createServiceBrokerNonPublic( + CloudFoundryClient cloudFoundryClient, + NameFactory nameFactory, + String planName, + String serviceBrokerName, + String serviceName, + String spaceId, + Boolean spaceScoped) { + Path application; + try { + application = new ClassPathResource("test-service-broker.jar").getFile().toPath(); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + return pushServiceBrokerApplication( + cloudFoundryClient, + application, + nameFactory, + planName, + serviceName, + spaceId) + .flatMap( + applicationMetadata -> + requestCreateServiceBroker( + cloudFoundryClient, + applicationMetadata, + serviceBrokerName, + spaceScoped) + .map( + response -> + new ServiceBrokerMetadata( + applicationMetadata, + ResourceUtils.getId(response)))); + } + + public static Mono deleteServiceBroker( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .delete(DeleteApplicationRequest.builder().applicationId(applicationId).build()); + } + + public static Mono pushServiceBrokerApplication( + CloudFoundryClient cloudFoundryClient, + Path application, + NameFactory nameFactory, + String planName, + String serviceName, + String spaceId) { + String applicationName = nameFactory.getApplicationName(); + String hostName = nameFactory.getHostName(); + + Map env = new HashMap<>(); + env.put("SERVICE_NAME", serviceName); + env.put("PLAN_NAME", planName); + + return ApplicationUtils.pushApplication( + cloudFoundryClient, + application, + applicationName, + Collections.emptyList(), + env, + hostName, + spaceId); + } + + private static Mono getServiceId( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return requestListServices(cloudFoundryClient, serviceName) + .single() + .map(ResourceUtils::getId); + } + + private static Mono getServicePlanId( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return requestListServicePlans(cloudFoundryClient, serviceId) + .single() + .map(ResourceUtils::getId); + } + + private static Mono makeServicePlanPubliclyVisible( + CloudFoundryClient cloudFoundryClient, String serviceName, Boolean spaceScoped) { + if (spaceScoped) { + return Mono.empty(); + } + + return getServiceId(cloudFoundryClient, serviceName) + .flatMap(serviceId -> getServicePlanId(cloudFoundryClient, serviceId)) + .flatMap(planId -> requestUpdateServicePlan(cloudFoundryClient, planId, true)); + } + + private static Mono requestCreateServiceBroker( + CloudFoundryClient cloudFoundryClient, + ApplicationUtils.ApplicationMetadata applicationMetadata, + String serviceBrokerName, + Boolean spaceScoped) { + return cloudFoundryClient + .serviceBrokers() + .create( + CreateServiceBrokerRequest.builder() + .authenticationPassword("test-authentication-password") + .authenticationUsername("test-authentication-username") + .brokerUrl(applicationMetadata.uri) + .name(serviceBrokerName) + .spaceId(spaceScoped ? applicationMetadata.spaceId : null) + .build()); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .serviceId(serviceId) + .page(page) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list(ListServicesRequest.builder().label(serviceName).build())); + } + + private static Mono requestUpdateServicePlan( + CloudFoundryClient cloudFoundryClient, String planId, Boolean visibility) { + return cloudFoundryClient + .servicePlans() + .update( + UpdateServicePlanRequest.builder() + .servicePlanId(planId) + .publiclyVisible(visibility) + .build()); + } + + public static final class ServiceBrokerMetadata { + + public final ApplicationUtils.ApplicationMetadata applicationMetadata; + + public final String serviceBrokerId; + + private ServiceBrokerMetadata( + ApplicationUtils.ApplicationMetadata applicationMetadata, String serviceBrokerId) { + this.applicationMetadata = applicationMetadata; + this.serviceBrokerId = serviceBrokerId; + } + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/ThrottlingUaaClient.java b/integration-test/src/test/java/org/cloudfoundry/ThrottlingUaaClient.java new file mode 100644 index 00000000000..a4a9d27a61a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/ThrottlingUaaClient.java @@ -0,0 +1,348 @@ +package org.cloudfoundry; + +import io.github.resilience4j.ratelimiter.RateLimiter; +import io.github.resilience4j.ratelimiter.RateLimiterConfig; +import io.github.resilience4j.reactor.ratelimiter.operator.RateLimiterOperator; +import java.time.Duration; +import org.cloudfoundry.reactor.uaa.ReactorUaaClient; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.authorizations.Authorizations; +import org.cloudfoundry.uaa.clients.Clients; +import org.cloudfoundry.uaa.groups.AddMemberRequest; +import org.cloudfoundry.uaa.groups.AddMemberResponse; +import org.cloudfoundry.uaa.groups.CheckMembershipRequest; +import org.cloudfoundry.uaa.groups.CheckMembershipResponse; +import org.cloudfoundry.uaa.groups.CreateGroupRequest; +import org.cloudfoundry.uaa.groups.CreateGroupResponse; +import org.cloudfoundry.uaa.groups.DeleteGroupRequest; +import org.cloudfoundry.uaa.groups.DeleteGroupResponse; +import org.cloudfoundry.uaa.groups.GetGroupRequest; +import org.cloudfoundry.uaa.groups.GetGroupResponse; +import org.cloudfoundry.uaa.groups.Groups; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsRequest; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsResponse; +import org.cloudfoundry.uaa.groups.ListGroupsRequest; +import org.cloudfoundry.uaa.groups.ListGroupsResponse; +import org.cloudfoundry.uaa.groups.ListMembersRequest; +import org.cloudfoundry.uaa.groups.ListMembersResponse; +import org.cloudfoundry.uaa.groups.MapExternalGroupRequest; +import org.cloudfoundry.uaa.groups.MapExternalGroupResponse; +import org.cloudfoundry.uaa.groups.RemoveMemberRequest; +import org.cloudfoundry.uaa.groups.RemoveMemberResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdResponse; +import org.cloudfoundry.uaa.groups.UpdateGroupRequest; +import org.cloudfoundry.uaa.groups.UpdateGroupResponse; +import org.cloudfoundry.uaa.identityproviders.IdentityProviders; +import org.cloudfoundry.uaa.identityzones.IdentityZones; +import org.cloudfoundry.uaa.ratelimit.Ratelimit; +import org.cloudfoundry.uaa.serverinformation.ServerInformation; +import org.cloudfoundry.uaa.tokens.Tokens; +import org.cloudfoundry.uaa.users.ChangeUserPasswordRequest; +import org.cloudfoundry.uaa.users.ChangeUserPasswordResponse; +import org.cloudfoundry.uaa.users.CreateUserRequest; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.DeleteUserRequest; +import org.cloudfoundry.uaa.users.DeleteUserResponse; +import org.cloudfoundry.uaa.users.ExpirePasswordRequest; +import org.cloudfoundry.uaa.users.ExpirePasswordResponse; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkRequest; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkResponse; +import org.cloudfoundry.uaa.users.InviteUsersRequest; +import org.cloudfoundry.uaa.users.InviteUsersResponse; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.uaa.users.ListUsersResponse; +import org.cloudfoundry.uaa.users.LookupUserIdsRequest; +import org.cloudfoundry.uaa.users.LookupUserIdsResponse; +import org.cloudfoundry.uaa.users.UpdateUserRequest; +import org.cloudfoundry.uaa.users.UpdateUserResponse; +import org.cloudfoundry.uaa.users.UserInfoRequest; +import org.cloudfoundry.uaa.users.UserInfoResponse; +import org.cloudfoundry.uaa.users.Users; +import org.cloudfoundry.uaa.users.VerifyUserRequest; +import org.cloudfoundry.uaa.users.VerifyUserResponse; +import org.immutables.value.Value; +import reactor.core.publisher.Mono; + +public class ThrottlingUaaClient implements UaaClient { + + private final UaaClient delegate; + private final int maxRequestsPerSecond; + private final RateLimiter rateLimiter; + private final ThrottledUsers users; + private Groups groups; + + /** + * An {@link UaaClient} implementation that throttles calls to the UAA + * {@code /Groups} and {@code /Users} endpoints. It uses a single "bucket" + * for throttling requests to both endpoints. + * + * @see resilience4j docs + */ + public ThrottlingUaaClient(ReactorUaaClient delegate, int maxRequestsPerSecond) { + // uaaLimit is calls per second. We need the milliseconds for one call because + // resilience4j uses sliced timeslots, while the uaa server uses a sliding window. + int clockSkewMillis = 20; // 20ms clock skew is a save value for ~5 requests per second. + int rateLimitRefreshPeriodMillis = (1000 / maxRequestsPerSecond) + clockSkewMillis; + this.delegate = delegate; + this.maxRequestsPerSecond = maxRequestsPerSecond; + RateLimiterConfig config = + RateLimiterConfig.custom() + .limitForPeriod(1) + .limitRefreshPeriod(Duration.ofMillis(rateLimitRefreshPeriodMillis)) + .timeoutDuration(Duration.ofSeconds(10)) + .build(); + this.rateLimiter = RateLimiter.of("uaa", config); + + this.users = new ThrottledUsers(); + this.groups = new ThrottledGroups(); + } + + @Override + public Authorizations authorizations() { + return this.delegate.authorizations(); + } + + @Override + public Clients clients() { + return this.delegate.clients(); + } + + @Override + public Mono getUsername() { + return this.delegate.getUsername(); + } + + @Override + public IdentityProviders identityProviders() { + return this.delegate.identityProviders(); + } + + @Override + public IdentityZones identityZones() { + return this.delegate.identityZones(); + } + + @Override + public ServerInformation serverInformation() { + return this.delegate.serverInformation(); + } + + @Override + public Tokens tokens() { + return this.delegate.tokens(); + } + + @Override + public Users users() { + return users; + } + + @Override + public Groups groups() { + return groups; + } + + @Override + @Value.Derived + public Ratelimit rateLimit() { + return this.delegate.rateLimit(); + } + + public int getMaxRequestsPerSecond() { + return maxRequestsPerSecond; + } + + public class ThrottledUsers implements Users { + + private final Users usersDelegate; + + public ThrottledUsers() { + this.usersDelegate = delegate.users(); + } + + @Override + public Mono changePassword(ChangeUserPasswordRequest request) { + return this.usersDelegate + .changePassword(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono create(CreateUserRequest request) { + return this.usersDelegate + .create(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono delete(DeleteUserRequest request) { + return this.usersDelegate + .delete(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono expirePassword(ExpirePasswordRequest request) { + return this.usersDelegate + .expirePassword(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono getVerificationLink( + GetUserVerificationLinkRequest request) { + return this.usersDelegate + .getVerificationLink(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono invite(InviteUsersRequest request) { + return this.usersDelegate + .invite(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono list(ListUsersRequest request) { + return this.usersDelegate + .list(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono lookup(LookupUserIdsRequest request) { + return this.usersDelegate + .lookup(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono update(UpdateUserRequest request) { + return this.usersDelegate + .update(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono userInfo(UserInfoRequest request) { + return this.usersDelegate + .userInfo(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono verify(VerifyUserRequest request) { + return this.usersDelegate + .verify(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + } + + public class ThrottledGroups implements Groups { + + public final Groups groupsDelegate; + + public ThrottledGroups() { + this.groupsDelegate = delegate.groups(); + } + + @Override + public Mono addMember(AddMemberRequest request) { + return this.groupsDelegate + .addMember(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono checkMembership(CheckMembershipRequest request) { + return this.groupsDelegate + .checkMembership(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono create(CreateGroupRequest request) { + return this.groupsDelegate + .create(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono delete(DeleteGroupRequest request) { + return this.groupsDelegate + .delete(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono get(GetGroupRequest request) { + return this.groupsDelegate + .get(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono list(ListGroupsRequest request) { + return this.groupsDelegate + .list(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono listExternalGroupMappings( + ListExternalGroupMappingsRequest request) { + return this.groupsDelegate + .listExternalGroupMappings(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono listMembers(ListMembersRequest request) { + return this.groupsDelegate + .listMembers(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono mapExternalGroup(MapExternalGroupRequest request) { + return this.groupsDelegate + .mapExternalGroup(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono removeMember(RemoveMemberRequest request) { + return this.groupsDelegate + .removeMember(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono + unmapExternalGroupByGroupDisplayName( + UnmapExternalGroupByGroupDisplayNameRequest request) { + return this.groupsDelegate + .unmapExternalGroupByGroupDisplayName(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono unmapExternalGroupByGroupId( + UnmapExternalGroupByGroupIdRequest request) { + return this.groupsDelegate + .unmapExternalGroupByGroupId(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + + @Override + public Mono update(UpdateGroupRequest request) { + return this.groupsDelegate + .update(request) + .transformDeferred(RateLimiterOperator.of(rateLimiter)); + } + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/ZipExpectations.java b/integration-test/src/test/java/org/cloudfoundry/client/ZipExpectations.java new file mode 100644 index 00000000000..09d9c0f4aca --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/ZipExpectations.java @@ -0,0 +1,123 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.ArrayList; +import java.util.Collections; +import java.util.Iterator; +import java.util.List; +import java.util.function.Consumer; +import java.util.zip.ZipEntry; +import java.util.zip.ZipInputStream; +import reactor.core.Exceptions; +import reactor.util.function.Tuple2; + +public final class ZipExpectations { + + public static Consumer> zipEquality() { + return consumer( + (expected, actual) -> { + List expectedEntries = entries(expected); + List actualEntries = entries(expected); + + assertThat(expectedEntries).hasSameSizeAs(actualEntries); + + Iterator expectedIterator = expectedEntries.iterator(); + + for (Entry actualEntry : actualEntries) { + assertThat(actualEntry) + .usingRecursiveComparison() + .isEqualTo(expectedIterator.next()); + } + }); + } + + private static byte[] content(InputStream in, int length) throws IOException { + byte[] content = new byte[length]; + int read = in.read(content, 0, length); + if (read != length) { + throw new IllegalStateException( + String.format("expected read: %d; actual read: %d", length, read)); + } + return content; + } + + private static List entries(byte[] bytes) { + List entries = new ArrayList<>(); + + try (ZipInputStream in = new ZipInputStream(new ByteArrayInputStream(bytes))) { + ZipEntry entry; + while ((entry = in.getNextEntry()) != null) { + entries.add( + new Entry( + entry.getCompressedSize(), + content(in, (int) entry.getSize()), + entry.getCrc(), + entry.isDirectory(), + entry.getName(), + entry.getSize())); + in.closeEntry(); + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + Collections.sort(entries); + return entries; + } + + private static final class Entry implements Comparable { + + private final long compressedSize; + + private final byte[] contents; + + private final long crc; + + private final boolean directory; + + private final String name; + + private final long size; + + private Entry( + long compressedSize, + byte[] contents, + long crc, + boolean directory, + String name, + long size) { + this.compressedSize = compressedSize; + this.contents = contents; + this.crc = crc; + this.directory = directory; + this.name = name; + this.size = size; + } + + @Override + public int compareTo(Entry o) { + return this.name.compareTo(o.name); + } + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ApplicationsTest.java new file mode 100644 index 00000000000..9774568bd02 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ApplicationsTest.java @@ -0,0 +1,1754 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.ZipExpectations.zipEquality; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.io.ByteArrayInputStream; +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashSet; +import java.util.Map; +import java.util.Optional; +import java.util.Set; +import java.util.function.Consumer; +import java.util.zip.GZIPInputStream; +import org.apache.commons.compress.archivers.tar.TarArchiveEntry; +import org.apache.commons.compress.archivers.tar.TarArchiveInputStream; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.AbstractApplicationResource; +import org.cloudfoundry.client.v2.applications.ApplicationEnvironmentRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstanceInfo; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesRequest; +import org.cloudfoundry.client.v2.applications.ApplicationInstancesResponse; +import org.cloudfoundry.client.v2.applications.ApplicationStatisticsRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.AssociateApplicationRouteResponse; +import org.cloudfoundry.client.v2.applications.CopyApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v2.applications.DownloadApplicationDropletRequest; +import org.cloudfoundry.client.v2.applications.DownloadApplicationRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationPermissionsRequest; +import org.cloudfoundry.client.v2.applications.GetApplicationPermissionsResponse; +import org.cloudfoundry.client.v2.applications.GetApplicationRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationServiceBindingsRequest; +import org.cloudfoundry.client.v2.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationRouteRequest; +import org.cloudfoundry.client.v2.applications.RemoveApplicationServiceBindingRequest; +import org.cloudfoundry.client.v2.applications.RestageApplicationRequest; +import org.cloudfoundry.client.v2.applications.SummaryApplicationRequest; +import org.cloudfoundry.client.v2.applications.SummaryApplicationResponse; +import org.cloudfoundry.client.v2.applications.TerminateApplicationInstanceRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v2.applications.UpdateApplicationResponse; +import org.cloudfoundry.client.v2.applications.UploadApplicationDropletRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationRequest; +import org.cloudfoundry.client.v2.applications.UploadApplicationResponse; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingEntity; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.util.DelayUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.OperationUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import org.springframework.util.Assert; +import reactor.core.Exceptions; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple2; + +@CleanupCloudFoundryAfterClass +public final class ApplicationsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono spaceId; + + @Autowired private Mono stackId; + + @Test + public void associateRoute() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName), + createRouteWithDomain( + this.cloudFoundryClient, + organizationId, + spaceId, + domainName, + "test-host", + "/test/path") + .map(ResourceUtils::getId)))) + .delayUntil( + function( + (applicationId, routeId) -> + requestAssociateRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMap( + function( + (applicationId, routeId) -> + Mono.zip( + getSingleRouteId( + this.cloudFoundryClient, applicationId), + Mono.just(routeId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void copy() { + String applicationName = this.nameFactory.getApplicationName(); + String copyApplicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName) + .delayUntil( + applicationId -> + uploadApplication( + this.cloudFoundryClient, + applicationId)), + requestCreateApplication( + this.cloudFoundryClient, + spaceId, + copyApplicationName) + .map(ResourceUtils::getId))) + .delayUntil( + function( + (sourceId, targetId) -> + this.cloudFoundryClient + .applicationsV2() + .copy( + CopyApplicationRequest.builder() + .applicationId(targetId) + .sourceApplicationId(sourceId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job)))) + .flatMap( + function( + (sourceId, targetId) -> + Mono.zip( + downloadApplication( + this.cloudFoundryClient, sourceId), + downloadApplication( + this.cloudFoundryClient, targetId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + requestCreateApplication( + this.cloudFoundryClient, + spaceId, + applicationName) + .map(ResourceUtils::getEntity))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (spaceId, entity) -> { + assertThat(entity.getSpaceId()).isEqualTo(spaceId); + assertThat(entity.getName()).isEqualTo(applicationName); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createDocker() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + this.cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .dockerImage( + "cloudfoundry/test-app") + .name(applicationName) + .spaceId(spaceId) + .build()) + .map(ResourceUtils::getEntity))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (spaceId, entity) -> { + assertThat(entity.getSpaceId()).isEqualTo(spaceId); + assertThat(entity.getName()).isEqualTo(applicationName); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .delete( + DeleteApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .flatMap( + applicationId -> + requestGetApplication(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-AppNotFound\\([0-9]+\\): The app could not be" + + " found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void downloadDroplet() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + uploadAndStartApplication(this.cloudFoundryClient, applicationId)) + .flatMapMany( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .downloadDroplet( + DownloadApplicationDropletRequest.builder() + .applicationId(applicationId) + .build()) + .as(OperationUtils::collectByteArray)) + .as(StepVerifier::create) + .consumeNextWith(isTestApplicationDroplet()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void environment() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + this.cloudFoundryClient + .applicationsV2() + .environment( + ApplicationEnvironmentRequest.builder() + .applicationId(applicationId) + .build()) + .map( + response -> + getStringApplicationEnvValue( + response + .getApplicationEnvironmentJsons(), + "VCAP_APPLICATION", + "application_id")))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + requestGetApplication( + this.cloudFoundryClient, applicationId))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_9) + @Test + public void getPermissions() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .getPermissions( + GetApplicationPermissionsRequest.builder() + .applicationId(applicationId) + .build())) + .as(StepVerifier::create) + .expectNext( + GetApplicationPermissionsResponse.builder() + .readBasicData(true) + .readSensitiveData(true) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void instances() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + uploadAndStartApplication(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder() + .applicationId(applicationId) + .build())) + .map(ApplicationInstancesResponse::getInstances) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .list( + ListApplicationsRequest + .builder() + .page(page) + .build())) + .filter( + resource -> + ResourceUtils.getId(resource) + .equals(applicationId)) + .single() + .cast(AbstractApplicationResource.class))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByDiego() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .list( + ListApplicationsRequest + .builder() + .diego(true) + .page(page) + .build())) + .filter( + resource -> + ResourceUtils.getId(resource) + .equals(applicationId)) + .single() + .cast(AbstractApplicationResource.class))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .list( + ListApplicationsRequest + .builder() + .name( + applicationName) + .page(page) + .build())) + .filter( + resource -> + ResourceUtils.getId(resource) + .equals(applicationId)) + .single() + .cast(AbstractApplicationResource.class))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String applicationName = this.nameFactory.getApplicationName(); + + Mono.zip( + this.organizationId, + this.spaceId.flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName))) + .flatMap( + function( + (organizationId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .list( + ListApplicationsRequest + .builder() + .organizationId( + organizationId) + .page( + page) + .build())) + .filter( + resource -> + ResourceUtils.getId( + resource) + .equals( + applicationId)) + .single() + .cast(AbstractApplicationResource.class)))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpaceId() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName))) + .flatMap( + function( + (spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .list( + ListApplicationsRequest + .builder() + .spaceId( + spaceId) + .page( + page) + .build())) + .filter( + resource -> + ResourceUtils.getId( + resource) + .equals( + applicationId)) + .single() + .cast(AbstractApplicationResource.class)))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByStackId() { + String applicationName = this.nameFactory.getApplicationName(); + + Mono.zip(this.spaceId, this.stackId) + .flatMap( + function( + (spaceId, stackId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + stackId), + Mono.just(stackId)))) + .flatMap( + function( + (applicationId, stackId) -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .list( + ListApplicationsRequest + .builder() + .stackId( + stackId) + .page( + page) + .build())) + .filter( + resource -> + ResourceUtils.getId( + resource) + .equals( + applicationId)) + .single() + .cast(AbstractApplicationResource.class)))) + .as(StepVerifier::create) + .consumeNextWith(applicationIdAndNameEquality(applicationName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutes() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMap( + function( + (organizationId, spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + createApplicationRoute( + this.cloudFoundryClient, + organizationId, + spaceId, + domainName, + applicationId)))) + .flatMap( + function( + (applicationId, routeResponse) -> + Mono.zip( + Mono.just(ResourceUtils.getId(routeResponse)), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .page( + page) + .build())) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByDomainId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMap( + function( + (organizationId, spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + createApplicationRoute( + this.cloudFoundryClient, + organizationId, + spaceId, + domainName, + applicationId)))) + .flatMap( + function( + (applicationId, routeResponse) -> + Mono.zip( + Mono.just(ResourceUtils.getId(routeResponse)), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .domainId( + ResourceUtils + .getEntity( + routeResponse) + .getDomainId()) + .page( + page) + .build())) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByHost() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMap( + function( + (organizationId, spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + createApplicationRoute( + this.cloudFoundryClient, + organizationId, + spaceId, + domainName, + applicationId)))) + .flatMap( + function( + (applicationId, routeResponse) -> + Mono.zip( + Mono.just(ResourceUtils.getId(routeResponse)), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .host( + ResourceUtils + .getEntity( + routeResponse) + .getHost()) + .page( + page) + .build())) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByPath() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMap( + function( + (organizationId, spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + createApplicationRoute( + this.cloudFoundryClient, + organizationId, + spaceId, + domainName, + applicationId)))) + .flatMap( + function( + (applicationId, routeResponse) -> + Mono.zip( + Mono.just(ResourceUtils.getId(routeResponse)), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .path( + ResourceUtils + .getEntity( + routeResponse) + .getPath()) + .page( + page) + .build())) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceBindings() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName), + createUserServiceInstanceId( + this.cloudFoundryClient, + spaceId, + serviceInstanceName))) + .delayUntil( + function( + (applicationId, serviceInstanceId) -> + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId))) + .flatMap( + function( + (applicationId, serviceInstanceId) -> + Mono.zip( + Mono.just(serviceInstanceId), + getSingleServiceBindingInstanceId( + this.cloudFoundryClient, applicationId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceBindingsFilterByServiceInstanceId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName), + createUserServiceInstanceId( + this.cloudFoundryClient, + spaceId, + serviceInstanceName))) + .flatMap( + function( + (applicationId, serviceInstanceId) -> + Mono.zip( + Mono.just(applicationId), + Mono.just(serviceInstanceId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .flatMap( + function( + (applicationId, serviceInstanceId, serviceBindingId) -> + Mono.zip( + Mono.just(serviceBindingId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest + .builder() + .applicationId( + applicationId) + .serviceInstanceId( + serviceInstanceId) + .page( + page) + .build())) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeRoute() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMap( + function( + (organizationId, spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + createApplicationRoute( + this.cloudFoundryClient, + organizationId, + spaceId, + domainName, + applicationId)))) + .delayUntil( + function( + (applicationId, routeResponse) -> + this.cloudFoundryClient + .applicationsV2() + .removeRoute( + RemoveApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId( + ResourceUtils.getId( + routeResponse)) + .build()))) + .flatMapMany( + function( + (applicationId, routeResponse) -> + requestRoutes(this.cloudFoundryClient, applicationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeServiceBinding() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName), + createUserServiceInstanceId( + this.cloudFoundryClient, + spaceId, + serviceInstanceName))) + .flatMap( + function( + (applicationId, serviceInstanceId) -> + Mono.zip( + Mono.just(applicationId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .delayUntil( + function( + (applicationId, serviceBindingId) -> + this.cloudFoundryClient + .applicationsV2() + .removeServiceBinding( + RemoveApplicationServiceBindingRequest + .builder() + .applicationId(applicationId) + .serviceBindingId(serviceBindingId) + .build()))) + .flatMapMany( + function( + (applicationId, serviceBindingId) -> + requestServiceBindings( + this.cloudFoundryClient, applicationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void restage() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + uploadAndStartApplication(this.cloudFoundryClient, applicationId)) + .delayUntil( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .restage( + RestageApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .flatMap( + applicationId -> + waitForStagingApplication(this.cloudFoundryClient, applicationId)) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void statistics() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + uploadAndStartApplication(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .statistics( + ApplicationStatisticsRequest.builder() + .applicationId(applicationId) + .build()) + .map( + instanceStatistics -> + instanceStatistics + .getInstances() + .get("0") + .getStatistics() + .getName())) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void summary() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .summary( + SummaryApplicationRequest.builder() + .applicationId(applicationId) + .build()) + .map(SummaryApplicationResponse::getId) + .zipWith(Mono.just(applicationId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void terminateInstance() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + uploadAndStartApplication(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getInstanceInfo(this.cloudFoundryClient, applicationId, "0") + .map(info -> Optional.ofNullable(info.getSince())))) + .delayUntil( + function( + (applicationId, optionalSince) -> + this.cloudFoundryClient + .applicationsV2() + .terminateInstance( + TerminateApplicationInstanceRequest + .builder() + .applicationId(applicationId) + .index("0") + .build()))) + .flatMap( + function( + (applicationId, optionalSince) -> + waitForInstanceRestart( + this.cloudFoundryClient, + applicationId, + "0", + optionalSince))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String applicationName = this.nameFactory.getApplicationName(); + String applicationName2 = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .environmentJson("test-var", "test-value") + .name(applicationName2) + .ports(60606, 60607) + .build()) + .map(ResourceUtils::getId)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + requestGetApplication( + this.cloudFoundryClient, applicationId) + .map(ResourceUtils::getEntity))) + .flatMap( + function( + (applicationId, entity1) -> + Mono.zip( + Mono.just(entity1), + this.cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId( + applicationId) + .environmentJsons( + Collections + .emptyMap()) + .build()) + .then( + requestGetApplication( + this + .cloudFoundryClient, + applicationId) + .map( + ResourceUtils + ::getEntity))))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (entity1, entity2) -> { + assertThat(entity1.getName()).isEqualTo(applicationName2); + assertThat( + entity1.getPorts() + .containsAll(Arrays.asList(60606, 60607))); + assertThat(entity1.getEnvironmentJsons()) + .containsEntry("test-var", "test-value"); + assertThat(entity2.getEnvironmentJsons()).isEmpty(); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void uploadAndDownload() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> uploadApplication(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + Mono.zip( + downloadApplication(this.cloudFoundryClient, applicationId), + getBytes("test-application.zip"))) + .as(StepVerifier::create) + .consumeNextWith(zipEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void uploadAndDownloadAsyncFalse() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .delayUntil( + applicationId -> + uploadApplicationAsyncFalse(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + Mono.zip( + downloadApplication(this.cloudFoundryClient, applicationId), + getBytes("test-application.zip"))) + .as(StepVerifier::create) + .consumeNextWith(zipEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void uploadDirectory() throws IOException { + Path application = new ClassPathResource("test-application").getFile().toPath(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .upload( + UploadApplicationRequest.builder() + .application(application) + .async(true) + .applicationId(applicationId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_9) + @Test + public void uploadDroplet() throws IOException { + Path droplet = new ClassPathResource("test-droplet.tgz").getFile().toPath(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV2() + .uploadDroplet( + UploadApplicationDropletRequest.builder() + .applicationId(applicationId) + .droplet(droplet) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Consumer> + applicationIdAndNameEquality(String name) { + Assert.notNull(name, "name must not be null"); + + return consumer( + (applicationId, resource) -> { + assertThat(ResourceUtils.getId(resource)).isEqualTo(applicationId); + assertThat(ResourceUtils.getEntity(resource).getName()).isEqualTo(name); + }); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication( + cloudFoundryClient, + spaceId, + applicationName, + "staticfile_buildpack", + true, + 512, + 64, + null) + .map(ResourceUtils::getId); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String stackId) { + return requestCreateApplication( + cloudFoundryClient, + spaceId, + applicationName, + "staticfile_buildpack", + true, + 512, + 64, + stackId) + .map(ResourceUtils::getId); + } + + private static Mono createApplicationRoute( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String spaceId, + String domainName, + String applicationId) { + return createRouteWithDomain( + cloudFoundryClient, + organizationId, + spaceId, + domainName, + "test-host", + "/test-path") + .flatMap( + createRouteResponse -> + requestAssociateRoute( + cloudFoundryClient, + applicationId, + createRouteResponse.getMetadata().getId()) + .map(response -> createRouteResponse)); + } + + private static Mono createPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return requestCreatePrivateDomain(cloudFoundryClient, name, organizationId) + .map(ResourceUtils::getId); + } + + private static Mono createRouteWithDomain( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String spaceId, + String domainName, + String host, + String path) { + return createPrivateDomainId(cloudFoundryClient, domainName, organizationId) + .flatMap( + domainId -> + cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(host) + .path(path) + .spaceId(spaceId) + .build())); + } + + private static Mono createServiceBindingId( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return requestCreateServiceBinding(cloudFoundryClient, applicationId, serviceInstanceId) + .map(ResourceUtils::getId); + } + + private static Mono createUserServiceInstanceId( + CloudFoundryClient cloudFoundryClient, String spaceId, String serviceInstanceName) { + return requestCreateUserServiceInstance(cloudFoundryClient, spaceId, serviceInstanceName) + .map(ResourceUtils::getId); + } + + private static Mono getInstanceInfo( + CloudFoundryClient cloudFoundryClient, String applicationId, String instanceName) { + return requestInstances(cloudFoundryClient, applicationId) + .filter(response -> response.getInstances().containsKey(instanceName)) + .map(response -> response.getInstances().get(instanceName)); + } + + private static Mono getSingleRouteId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestRoutes(cloudFoundryClient, applicationId).single().map(ResourceUtils::getId); + } + + private static Mono getSingleServiceBindingInstanceId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestServiceBindings(cloudFoundryClient, applicationId) + .single() + .map(ResourceUtils::getEntity) + .map(ServiceBindingEntity::getServiceInstanceId); + } + + @SuppressWarnings("unchecked") + private static String getStringApplicationEnvValue( + Map environment, String... keys) { + for (int i = 0; i < keys.length - 1; ++i) { + environment = (Map) environment.get(keys[i]); + } + return (String) environment.get(keys[keys.length - 1]); + } + + private static boolean isIdentical(Double expected, Double actual) { + return expected == null ? actual == null : expected.equals(actual); + } + + private static Consumer isTestApplicationDroplet() { + return bytes -> { + Set names = new HashSet<>(); + + try (TarArchiveInputStream in = + new TarArchiveInputStream( + new GZIPInputStream(new ByteArrayInputStream(bytes)))) { + TarArchiveEntry entry; + while ((entry = in.getNextTarEntry()) != null) { + names.add(entry.getName()); + } + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + assertThat(names).contains("./app/Staticfile", "./app/public/index.html"); + }; + } + + private static Mono requestAssociateRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .applicationsV2() + .associateRoute( + AssociateApplicationRouteRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication( + cloudFoundryClient, spaceId, applicationName, null, null, null, null, null); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String buildpack, + Boolean diego, + Integer diskQuota, + Integer memory, + String stackId) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack(buildpack) + .diego(diego) + .diskQuota(diskQuota) + .memory(memory) + .name(applicationName) + .spaceId(spaceId) + .stackId(stackId) + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return cloudFoundryClient + .privateDomains() + .create( + CreatePrivateDomainRequest.builder() + .name(name) + .owningOrganizationId(organizationId) + .build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateUserServiceInstance( + CloudFoundryClient cloudFoundryClient, String spaceId, String name) { + return cloudFoundryClient + .userProvidedServiceInstances() + .create( + CreateUserProvidedServiceInstanceRequest.builder() + .name(name) + .spaceId(spaceId) + .build()); + } + + private static Mono requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .get(GetApplicationRequest.builder().applicationId(applicationId).build()) + .cast(AbstractApplicationResource.class); + } + + private static Mono requestInstances( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder().applicationId(applicationId).build()); + } + + private static Flux requestRoutes( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .applicationsV2() + .listRoutes( + ListApplicationRoutesRequest.builder() + .page(page) + .applicationId(applicationId) + .build())); + } + + private static Flux requestServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .applicationsV2() + .listServiceBindings( + ListApplicationServiceBindingsRequest.builder() + .applicationId(applicationId) + .page(page) + .build())); + } + + private static Mono requestUpdateApplicationState( + CloudFoundryClient cloudFoundryClient, String applicationId, String state) { + return cloudFoundryClient + .applicationsV2() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .state(state) + .build()); + } + + private static Mono startApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestUpdateApplicationState(cloudFoundryClient, applicationId, "STARTED") + .then(waitForStagingApplication(cloudFoundryClient, applicationId)) + .then(waitForStartingInstanceInfo(cloudFoundryClient, applicationId)); + } + + private static Mono uploadAndStartApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return uploadApplication(cloudFoundryClient, applicationId) + .then(startApplication(cloudFoundryClient, applicationId)); + } + + private static Mono uploadApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + try { + return cloudFoundryClient + .applicationsV2() + .upload( + UploadApplicationRequest.builder() + .application( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .async(true) + .applicationId(applicationId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), job)); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static Mono uploadApplicationAsyncFalse( + CloudFoundryClient cloudFoundryClient, String applicationId) { + try { + return cloudFoundryClient + .applicationsV2() + .upload( + UploadApplicationRequest.builder() + .application( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .async(false) + .applicationId(applicationId) + .build()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static Mono waitForInstanceRestart( + CloudFoundryClient cloudFoundryClient, + String applicationId, + String instanceName, + Optional optionalSince) { + return getInstanceInfo(cloudFoundryClient, applicationId, instanceName) + .filter(info -> !isIdentical(info.getSince(), optionalSince.orElse(null))) + .repeatWhenEmpty( + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5))); + } + + private static Mono waitForStagingApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestGetApplication(cloudFoundryClient, applicationId) + .filter(response -> "STAGED".equals(response.getEntity().getPackageState())) + .repeatWhenEmpty( + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5))); + } + + private static Mono waitForStartingInstanceInfo( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .instances( + ApplicationInstancesRequest.builder().applicationId(applicationId).build()) + .flatMapMany(response -> Flux.fromIterable(response.getInstances().values())) + .filter( + applicationInstanceInfo -> + "RUNNING".equals(applicationInstanceInfo.getState())) + .next() + .repeatWhenEmpty( + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5))); + } + + private Mono downloadApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV2() + .download(DownloadApplicationRequest.builder().applicationId(applicationId).build()) + .as(OperationUtils::collectByteArray); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java new file mode 100644 index 00000000000..f9368a07307 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/BlobstoresTest.java @@ -0,0 +1,52 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ApplicationUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.blobstores.DeleteBlobstoreBuildpackCachesRequest; +import org.cloudfoundry.util.JobUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class BlobstoresTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + // The buildpacks cache needs to be non-empty for the DELETE call to succeed. + // We pull the "testLogCacheApp" bean, which ensures the bean will be initialized, + // the app will be pushed, and it will add some data to the cache. + @Autowired private Mono testLogCacheApp; + + @Test + public void delete() { + this.cloudFoundryClient + .blobstores() + .deleteBuildpackCaches(DeleteBlobstoreBuildpackCachesRequest.builder().build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/BuildpacksTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/BuildpacksTest.java new file mode 100644 index 00000000000..03b7d3f0e95 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/BuildpacksTest.java @@ -0,0 +1,288 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.buildpacks.BuildpackEntity; +import org.cloudfoundry.client.v2.buildpacks.BuildpackResource; +import org.cloudfoundry.client.v2.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v2.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v2.buildpacks.UpdateBuildpackRequest; +import org.cloudfoundry.client.v2.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class BuildpacksTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void create() { + String buildpackName = this.nameFactory.getBuildpackName(); + + this.cloudFoundryClient + .buildpacks() + .create( + CreateBuildpackRequest.builder() + .enabled(false) + .locked(true) + .name(buildpackName) + .position(2) + .build()) + .thenMany(requestListBuildpacks(this.cloudFoundryClient, buildpackName)) + .map(BuildpackResource::getEntity) + .map(BuildpackEntity::getName) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacks() + .delete( + DeleteBuildpackRequest.builder() + .async(false) + .buildpackId(buildpackId) + .build())) + .then(getBuildpackEntity(this.cloudFoundryClient, buildpackName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsync() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacks() + .delete( + DeleteBuildpackRequest.builder() + .async(true) + .buildpackId(buildpackId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .then(getBuildpackEntity(this.cloudFoundryClient, buildpackName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacks() + .get( + GetBuildpackRequest.builder() + .buildpackId(buildpackId) + .build())) + .map(ResourceUtils::getEntity) + .map(BuildpackEntity::getName) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMapMany( + buildpackId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .buildpacks() + .list( + ListBuildpacksRequest + .builder() + .build())) + .map(ResourceUtils::getEntity) + .filter(entity -> buildpackName.equals(entity.getName()))) + .map(BuildpackEntity::getName) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMapMany( + buildpackId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .buildpacks() + .list( + ListBuildpacksRequest.builder() + .name(buildpackName) + .build()))) + .map(ResourceUtils::getEntity) + .map(BuildpackEntity::getName) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacks() + .update( + UpdateBuildpackRequest.builder() + .buildpackId(buildpackId) + .enabled(true) + .locked(true) + .position(2) + .build())) + .map(ResourceUtils::getEntity) + .as(StepVerifier::create) + .expectNextMatches( + b -> b.getEnabled() && b.getLocked() && b.getPosition().equals(2)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void upload() throws IOException { + Path buildpack = new ClassPathResource("test-buildpack.zip").getFile().toPath(); + String buildpackName = this.nameFactory.getBuildpackName(); + String filename = buildpack.getFileName().toString(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacks() + .upload( + UploadBuildpackRequest.builder() + .buildpack(buildpack) + .buildpackId(buildpackId) + .filename(filename) + .build())) + .map(ResourceUtils::getEntity) + .map(BuildpackEntity::getFilename) + .as(StepVerifier::create) + .expectNext(filename) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void uploadDirectory() throws IOException { + Path buildpack = new ClassPathResource("test-buildpack").getFile().toPath(); + String buildpackName = this.nameFactory.getBuildpackName(); + String filename = buildpack.getFileName().toString(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacks() + .upload( + UploadBuildpackRequest.builder() + .buildpack(buildpack) + .buildpackId(buildpackId) + .filename(filename) + .build())) + .map(ResourceUtils::getEntity) + .map(BuildpackEntity::getFilename) + .as(StepVerifier::create) + .expectNext(filename + ".zip") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createBuildpackId( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return requestCreateBuildpack(cloudFoundryClient, buildpackName).map(ResourceUtils::getId); + } + + private static Mono getBuildpackEntity( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return requestListBuildpacks(cloudFoundryClient, buildpackName) + .map(ResourceUtils::getEntity) + .singleOrEmpty(); + } + + private static Mono requestCreateBuildpack( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return cloudFoundryClient + .buildpacks() + .create( + CreateBuildpackRequest.builder() + .enabled(false) + .locked(false) + .name(buildpackName) + .position(3) + .build()); + } + + private static Flux requestListBuildpacks( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .buildpacks() + .list(ListBuildpacksRequest.builder().name(buildpackName).build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/DomainsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/DomainsTest.java new file mode 100644 index 00000000000..676d130484f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/DomainsTest.java @@ -0,0 +1,704 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.domains.CreateDomainRequest; +import org.cloudfoundry.client.v2.domains.CreateDomainResponse; +import org.cloudfoundry.client.v2.domains.DeleteDomainRequest; +import org.cloudfoundry.client.v2.domains.DeleteDomainResponse; +import org.cloudfoundry.client.v2.domains.DomainEntity; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.cloudfoundry.client.v2.domains.GetDomainRequest; +import org.cloudfoundry.client.v2.domains.GetDomainResponse; +import org.cloudfoundry.client.v2.domains.ListDomainSpacesRequest; +import org.cloudfoundry.client.v2.domains.ListDomainsRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserResponse; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperResponse; +import org.cloudfoundry.client.v2.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceResponse; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple2; + +@SuppressWarnings("deprecation") +public final class DomainsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono spaceId; + + @Autowired private Mono userId; + + @Test + public void create() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainEntity( + this.cloudFoundryClient, + organizationId, + domainName), + Mono.just(organizationId))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + createDomainId(this.cloudFoundryClient, domainName, organizationId)) + .delayUntil( + domainId -> + requestDeleteDomain(this.cloudFoundryClient, domainId) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap(domainId -> requestGetDomain(this.cloudFoundryClient, domainId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-DomainNotFound\\([0-9]+\\): The domain could" + + " not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteNotAsync() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + createDomainId(this.cloudFoundryClient, domainName, organizationId)) + .delayUntil( + domainId -> + requestDeleteDomainAsyncFalse(this.cloudFoundryClient, domainId)) + .flatMap(domainId -> requestGetDomain(this.cloudFoundryClient, domainId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-DomainNotFound\\([0-9]+\\): The domain could" + + " not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId))) + .flatMap( + function( + (organizationId, domainId) -> + Mono.zip( + getDomainEntity(this.cloudFoundryClient, domainId), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId))) + .flatMap( + function( + (organizationId, domainId) -> + Mono.zip( + requestListDomains(this.cloudFoundryClient) + .filter( + resource -> + domainId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getEntity), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listDomainSpaces() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + requestListDomainSpaces( + this.cloudFoundryClient, domainId) + .filter( + resource -> + spaceId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getId), + Mono.just(spaceId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listDomainSpacesFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + createDomainId(this.cloudFoundryClient, domainName, organizationId)) + .zipWith(this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + Mono.just(domainId), + Mono.just(spaceId), + getApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + getRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (domainId, spaceId, applicationId, routeId) -> + requestAssociateRouteApplication( + this.cloudFoundryClient, applicationId, routeId))) + .flatMap( + function( + (domainId, spaceId, applicationId, routeId) -> + Mono.zip( + requestListDomainSpacesByApplicationId( + this.cloudFoundryClient, + applicationId, + domainId) + .filter( + resource -> + spaceId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getId), + Mono.just(spaceId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listDomainSpacesFilterByDeveloperId() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.spaceId, this.organizationId, this.userId) + .flatMap( + function( + (spaceId, organizationId, userId) -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + requestAssociateOrganizationUser( + this.cloudFoundryClient, + organizationId, + userId), + Mono.just(spaceId), + Mono.just(userId)))) + .delayUntil( + function( + (domainId, response, spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (domainId, response, spaceId, userId) -> + requestListSpaceDevelopers( + this.cloudFoundryClient, domainId, userId) + .filter( + resource -> + spaceId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getId) + .zipWith(Mono.just(spaceId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listDomainSpacesFilterByName() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(spaceId), + getSpaceName(this.cloudFoundryClient, spaceId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId)))) + .flatMap( + function( + (spaceId, spaceName, domainId) -> + Mono.zip( + requestListDomainSpacesBySpaceName( + this.cloudFoundryClient, + domainId, + spaceName) + .filter( + resource -> + spaceId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getId), + Mono.just(spaceId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listDomainSpacesFilterByOrganizationId() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + Mono.just(organizationId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, organizationId, spaceId) -> + Mono.zip( + requestListDomainSpacesByOrganizationId( + this.cloudFoundryClient, + domainId, + organizationId) + .filter( + resource -> + spaceId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getId), + Mono.just(spaceId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId))) + .flatMap( + function( + (organizationId, domainId) -> + Mono.zip( + requestListDomains( + this.cloudFoundryClient, domainName) + .filter( + resource -> + domainId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getEntity), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOwningOrganizationId() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId))) + .flatMap( + function( + (organizationId, domainId) -> + Mono.zip( + requestListDomainsByOwningOrganization( + this.cloudFoundryClient, + organizationId) + .filter( + resource -> + domainId.equals( + ResourceUtils.getId( + resource))) + .single() + .map(ResourceUtils::getEntity), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createDomainEntity( + CloudFoundryClient cloudFoundryClient, String organizationId, String domainName) { + return requestCreateDomain(cloudFoundryClient, organizationId, domainName) + .map(ResourceUtils::getEntity); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreateDomain(cloudFoundryClient, organizationId, domainName) + .map(ResourceUtils::getId); + } + + private static Consumer> domainNameAndOrganizationIdEquality( + String domainName) { + return consumer( + (entity, organizationId) -> { + assertThat(entity.getName()).isEqualTo(domainName); + assertThat(entity.getOwningOrganizationId()).isEqualTo(organizationId); + }); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono getDomainEntity( + CloudFoundryClient cloudFoundryClient, String domainId) { + return requestGetDomain(cloudFoundryClient, domainId).map(ResourceUtils::getEntity); + } + + private static Mono getRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, spaceId).map(ResourceUtils::getId); + } + + private static Mono getSpaceName( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestSpace(cloudFoundryClient, spaceId) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName); + } + + private static Mono requestAssociateOrganizationUser( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateUser( + AssociateOrganizationUserRequest.builder() + .organizationId(organizationId) + .userId(userId) + .build()); + } + + private static Mono requestAssociateRouteApplication( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .routes() + .associateApplication( + AssociateRouteApplicationRequest.builder() + .routeId(routeId) + .applicationId(applicationId) + .build()); + } + + private static Mono requestAssociateSpaceDeveloper( + CloudFoundryClient cloudFoundryClient, String spaceId, String developerId) { + return cloudFoundryClient + .spaces() + .associateDeveloper( + AssociateSpaceDeveloperRequest.builder() + .spaceId(spaceId) + .developerId(developerId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String organizationId, String domainName) { + return cloudFoundryClient + .domains() + .create( + CreateDomainRequest.builder() + .name(domainName) + .owningOrganizationId(organizationId) + .wildcard(true) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String spaceId) { + return cloudFoundryClient + .routes() + .create(CreateRouteRequest.builder().domainId(domainId).spaceId(spaceId).build()); + } + + private static Mono requestDeleteDomain( + CloudFoundryClient cloudFoundryClient, String domainId) { + return cloudFoundryClient + .domains() + .delete(DeleteDomainRequest.builder().async(true).domainId(domainId).build()); + } + + private static Mono requestDeleteDomainAsyncFalse( + CloudFoundryClient cloudFoundryClient, String domainId) { + return cloudFoundryClient + .domains() + .delete(DeleteDomainRequest.builder().async(false).domainId(domainId).build()); + } + + private static Mono requestGetDomain( + CloudFoundryClient cloudFoundryClient, String domainId) { + return cloudFoundryClient + .domains() + .get(GetDomainRequest.builder().domainId(domainId).build()); + } + + private static Flux requestListDomainSpaces( + CloudFoundryClient cloudFoundryClient, String domainId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .listSpaces( + ListDomainSpacesRequest.builder() + .domainId(domainId) + .page(page) + .build())); + } + + private static Flux requestListDomainSpacesByApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationId, String domainId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .listSpaces( + ListDomainSpacesRequest.builder() + .page(page) + .applicationId(applicationId) + .domainId(domainId) + .build())); + } + + private static Flux requestListDomainSpacesByOrganizationId( + CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .listSpaces( + ListDomainSpacesRequest.builder() + .domainId(domainId) + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListDomainSpacesBySpaceName( + CloudFoundryClient cloudFoundryClient, String domainId, String spaceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .listSpaces( + ListDomainSpacesRequest.builder() + .domainId(domainId) + .name(spaceName) + .page(page) + .build())); + } + + private static Flux requestListDomains( + CloudFoundryClient cloudFoundryClient, String domainName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .list( + ListDomainsRequest.builder() + .name(domainName) + .page(page) + .build())); + } + + private static Flux requestListDomains(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .list(ListDomainsRequest.builder().page(page).build())); + } + + private static Flux requestListDomainsByOwningOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .list( + ListDomainsRequest.builder() + .owningOrganizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListSpaceDevelopers( + CloudFoundryClient cloudFoundryClient, String domainId, String userId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .domains() + .listSpaces( + ListDomainSpacesRequest.builder() + .page(page) + .developerId(userId) + .domainId(domainId) + .build())); + } + + private static Mono requestSpace( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return cloudFoundryClient.spaces().get(GetSpaceRequest.builder().spaceId(spaceId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/EventsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/EventsTest.java new file mode 100644 index 00000000000..76dcea594d2 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/EventsTest.java @@ -0,0 +1,206 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.events.EventResource; +import org.cloudfoundry.client.v2.events.GetEventRequest; +import org.cloudfoundry.client.v2.events.ListEventsRequest; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class EventsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void get() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource).map(ResourceUtils::getId), + this.cloudFoundryClient + .events() + .get( + GetEventRequest.builder() + .eventId( + ResourceUtils.getId( + resource)) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .events() + .list(ListEventsRequest.builder().build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByActee() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .actee( + ResourceUtils.getEntity( + resource) + .getActee()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .organizationId( + ResourceUtils.getEntity( + resource) + .getOrganizationId()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpaceId() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .spaceId( + ResourceUtils.getEntity( + resource) + .getSpaceId()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByTimestamp() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .timestamp( + ResourceUtils.getEntity( + resource) + .getTimestamp()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByType() { + getFirstEvent(this.cloudFoundryClient) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .events() + .list( + ListEventsRequest.builder() + .type( + ResourceUtils.getEntity( + resource) + .getType()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getFirstEvent(CloudFoundryClient cloudFoundryClient) { + return listEvents(cloudFoundryClient).next(); + } + + private static Flux listEvents(CloudFoundryClient cloudFoundryClient) { + return cloudFoundryClient + .events() + .list(ListEventsRequest.builder().build()) + .flatMapMany(ResourceUtils::getResources); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/FeatureFlagsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/FeatureFlagsTest.java new file mode 100644 index 00000000000..d47962b5aa9 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/FeatureFlagsTest.java @@ -0,0 +1,156 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Arrays; +import java.util.List; +import java.util.Set; +import java.util.stream.Collectors; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.featureflags.FeatureFlagEntity; +import org.cloudfoundry.client.v2.featureflags.GetFeatureFlagRequest; +import org.cloudfoundry.client.v2.featureflags.ListFeatureFlagsRequest; +import org.cloudfoundry.client.v2.featureflags.SetFeatureFlagRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuples; + +public final class FeatureFlagsTest extends AbstractIntegrationTest { + + private static final List coreFeatureFlagNameList = + Arrays.asList( + "app_bits_upload", + "app_scaling", + "diego_docker", + "private_domain_creation", + "route_creation", + "service_instance_creation", + "set_roles_by_username", + "unset_roles_by_username", + "user_org_creation"); + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void getEach() { + Flux.fromIterable(coreFeatureFlagNameList) + .flatMap( + flagName -> + this.cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(flagName).build()) + .map(response -> Tuples.of(flagName, response))) + .collectList() + .as(StepVerifier::create) + .consumeNextWith( + list -> + list.forEach( + consumer( + (name, entity) -> + assertThat(entity.getName()) + .isEqualTo(name)))) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + this.cloudFoundryClient + .featureFlags() + .list(ListFeatureFlagsRequest.builder().build()) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + Set returnedFlagSet = + flagNameSetFrom(response.getFeatureFlags()); + assertThat(returnedFlagSet).containsAll(coreFeatureFlagNameList); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setAndResetEach() { + Flux.fromIterable(coreFeatureFlagNameList) + .flatMap( + flagName -> + this.cloudFoundryClient + .featureFlags() + .get(GetFeatureFlagRequest.builder().name(flagName).build()) + .flatMap( + getResponse -> + Mono.zip( + Mono.just(getResponse), + this.cloudFoundryClient + .featureFlags() + .set( + SetFeatureFlagRequest + .builder() + .name( + getResponse + .getName()) + .enabled( + !getResponse + .getEnabled()) + .build()))) + .flatMap( + function( + (getResponse, setResponse) -> + Mono.zip( + Mono.just(getResponse), + Mono.just(setResponse), + this.cloudFoundryClient + .featureFlags() + .set( + SetFeatureFlagRequest + .builder() + .name( + getResponse + .getName()) + .enabled( + getResponse + .getEnabled()) + .build()))))) + .collectList() + .as(StepVerifier::create) + .consumeNextWith( + list -> + list.forEach( + consumer( + (getResponse, setResponse, resetResponse) -> { + assertThat(setResponse.getEnabled()) + .isNotEqualTo(getResponse.getEnabled()); + assertThat(resetResponse.getEnabled()) + .isEqualTo(getResponse.getEnabled()); + }))) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Set flagNameSetFrom(List listFlags) { + return listFlags.stream().map(FeatureFlagEntity::getName).collect(Collectors.toSet()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java new file mode 100644 index 00000000000..471cb284e8a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/InfoTest.java @@ -0,0 +1,51 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.CloudFoundryClient.SUPPORTED_API_VERSION; + +import com.github.zafarkhaja.semver.Version; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.info.GetInfoRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.test.StepVerifier; + +public final class InfoTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void info() { + this.cloudFoundryClient + .info() + .get(GetInfoRequest.builder().build()) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + Version expected = Version.valueOf(SUPPORTED_API_VERSION); + Version actual = Version.valueOf(response.getApiVersion()); + + assertThat(actual).isLessThanOrEqualTo(expected); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/JobsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/JobsTest.java new file mode 100644 index 00000000000..0727b062d2e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/JobsTest.java @@ -0,0 +1,70 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.util.tuple.TupleUtils.predicate; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.jobs.GetJobRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.util.DelayUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class JobsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void getJob() { + String organizationName = this.nameFactory.getOrganizationName(); + + this.cloudFoundryClient + .organizations() + .create(CreateOrganizationRequest.builder().name(organizationName).build()) + .map(ResourceUtils::getId) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizations() + .delete( + DeleteOrganizationRequest.builder() + .organizationId(organizationId) + .async(true) + .build()) + .map(ResourceUtils::getId)) + .flatMap( + jobId -> + this.cloudFoundryClient + .jobs() + .get(GetJobRequest.builder().jobId(jobId).build()) + .map(ResourceUtils::getId) + .zipWith(Mono.just(jobId))) + .filter(predicate((getId, deleteId) -> !"0".equals(getId))) + .repeatWhenEmpty(5, DelayUtils.instant()) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/OrganizationQuotaDefinitionsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/OrganizationQuotaDefinitionsTest.java new file mode 100644 index 00000000000..8a435cfa81b --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/OrganizationQuotaDefinitionsTest.java @@ -0,0 +1,265 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.CreateOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.DeleteOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.GetOrganizationQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.organizationquotadefinitions.ListOrganizationQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizationquotadefinitions.OrganizationQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.organizationquotadefinitions.UpdateOrganizationQuotaDefinitionRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class OrganizationQuotaDefinitionsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @SuppressWarnings("deprecation") + @Test + public void create() { + String quotaDefinitionName = this.nameFactory.getQuotaDefinitionName(); + + this.cloudFoundryClient + .organizationQuotaDefinitions() + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .name(quotaDefinitionName) + .nonBasicServicesAllowed(false) + .totalRoutes(10) + .totalServices(-1) + .logRateLimit(-1) + .build()) + .map(ResourceUtils::getEntity) + .as(StepVerifier::create) + .expectNext( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .instanceMemoryLimit(1024) + .memoryLimit(1024) + .name(quotaDefinitionName) + .nonBasicServicesAllowed(false) + .totalPrivateDomains(-1) + .totalRoutes(10) + .totalReservedRoutePorts(0) + .totalServiceKeys(-1) + .totalServices(-1) + .trialDatabaseAllowed(false) + .logRateLimit(-1) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String quotaDefinitionName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateOrganizationQuotaDefinition(this.cloudFoundryClient, quotaDefinitionName) + .map(ResourceUtils::getId) + .delayUntil( + organizationQuotaDefinitionId -> + this.cloudFoundryClient + .organizationQuotaDefinitions() + .delete( + DeleteOrganizationQuotaDefinitionRequest.builder() + .async(true) + .organizationQuotaDefinitionId( + organizationQuotaDefinitionId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap( + organizationQuotaDefinitionId -> + requestGetOrganizationQuotaDefinition( + this.cloudFoundryClient, organizationQuotaDefinitionId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-QuotaDefinitionNotFound\\([0-9]+\\): Quota" + + " Definition could not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + public void get() { + String quotaDefinitionName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateOrganizationQuotaDefinition(this.cloudFoundryClient, quotaDefinitionName) + .map(ResourceUtils::getId) + .flatMap( + organizationQuotaDefinitionId -> + this.cloudFoundryClient + .organizationQuotaDefinitions() + .get( + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId( + organizationQuotaDefinitionId) + .build())) + .map(ResourceUtils::getEntity) + .as(StepVerifier::create) + .expectNext( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .instanceMemoryLimit(50) + .memoryLimit(500) + .name(quotaDefinitionName) + .nonBasicServicesAllowed(false) + .totalPrivateDomains(-1) + .totalRoutes(10) + .totalReservedRoutePorts(0) + .totalServiceKeys(-1) + .totalServices(5) + .trialDatabaseAllowed(false) + .logRateLimit(-1) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String quotaDefinitionName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateOrganizationQuotaDefinition(this.cloudFoundryClient, quotaDefinitionName) + .map(ResourceUtils::getId) + .flatMap( + organizationQuotaDefinitionId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .organizationQuotaDefinitions() + .list( + ListOrganizationQuotaDefinitionsRequest + .builder() + .page(page) + .build())) + .filter( + quotaDefinition -> + ResourceUtils.getId(quotaDefinition) + .equals( + organizationQuotaDefinitionId)) + .single()) + .map(ResourceUtils::getEntity) + .map(OrganizationQuotaDefinitionEntity::getName) + .as(StepVerifier::create) + .expectNext(quotaDefinitionName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + public void update() { + String quotaDefinitionName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateOrganizationQuotaDefinition(this.cloudFoundryClient, quotaDefinitionName) + .map(ResourceUtils::getId) + .delayUntil( + organizationQuotaDefinitionId -> + this.cloudFoundryClient + .organizationQuotaDefinitions() + .update( + UpdateOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId( + organizationQuotaDefinitionId) + .totalServices(10) + .memoryLimit(1000) + .build())) + .flatMap( + organizationQuotaDefinitionId -> + this.cloudFoundryClient + .organizationQuotaDefinitions() + .get( + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId( + organizationQuotaDefinitionId) + .build())) + .map(ResourceUtils::getEntity) + .as(StepVerifier::create) + .expectNext( + OrganizationQuotaDefinitionEntity.builder() + .applicationInstanceLimit(-1) + .applicationTaskLimit(-1) + .instanceMemoryLimit(50) + .memoryLimit(1000) + .name(quotaDefinitionName) + .nonBasicServicesAllowed(false) + .totalPrivateDomains(-1) + .totalRoutes(10) + .totalReservedRoutePorts(0) + .totalServiceKeys(-1) + .totalServices(10) + .trialDatabaseAllowed(false) + .logRateLimit(-1) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono + requestCreateOrganizationQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String quotaDefinitionName) { + return cloudFoundryClient + .organizationQuotaDefinitions() + .create( + CreateOrganizationQuotaDefinitionRequest.builder() + .instanceMemoryLimit(50) + .memoryLimit(500) + .name(quotaDefinitionName) + .nonBasicServicesAllowed(false) + .totalRoutes(10) + .totalServices(5) + .logRateLimit(-1) + .build()); + } + + private static Mono + requestGetOrganizationQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String organizationQuotaDefinitionId) { + return cloudFoundryClient + .organizationQuotaDefinitions() + .get( + GetOrganizationQuotaDefinitionRequest.builder() + .organizationQuotaDefinitionId(organizationQuotaDefinitionId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/OrganizationsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/OrganizationsTest.java new file mode 100644 index 00000000000..e1d1762e649 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/OrganizationsTest.java @@ -0,0 +1,3071 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.function.UnaryOperator; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationInstanceUsageRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationInstanceUsageResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationMemoryUsageRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationMemoryUsageResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.GetOrganizationUserRolesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationBillingManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationManagersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationPrivateDomainsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationServicesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationSpacesRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationUsersRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.organizations.OrganizationEntity; +import org.cloudfoundry.client.v2.organizations.OrganizationResource; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationUserByUsernameRequest; +import org.cloudfoundry.client.v2.organizations.RemoveOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.SummaryOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.SummaryOrganizationResponse; +import org.cloudfoundry.client.v2.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.users.ListUsersRequest; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class OrganizationsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono userId; + + @Autowired private String username; + + @Test + public void associateAuditor() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateAuditor( + AssociateOrganizationAuditorRequest + .builder() + .auditorId(userId) + .organizationId( + organizationId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateAuditorByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateAuditorByUsername( + AssociateOrganizationAuditorByUsernameRequest + .builder() + .origin("uaa") + .organizationId(organizationId) + .username(this.username) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateBillingManager() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateBillingManager( + AssociateOrganizationBillingManagerRequest + .builder() + .billingManagerId(userId) + .organizationId( + organizationId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateBillingManagerByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateBillingManagerByUsername( + AssociateOrganizationBillingManagerByUsernameRequest + .builder() + .organizationId(organizationId) + .username(this.username) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateManager() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateManager( + AssociateOrganizationManagerRequest + .builder() + .managerId(userId) + .organizationId( + organizationId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateManagerByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateManagerByUsername( + AssociateOrganizationManagerByUsernameRequest + .builder() + .organizationId(organizationId) + .username(this.username) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associatePrivateDomain() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + organizationId, + domainName), + Mono.just(organizationId))) + .flatMap( + function( + (privateDomainId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associatePrivateDomain( + AssociateOrganizationPrivateDomainRequest + .builder() + .organizationId( + organizationId) + .privateDomainId( + privateDomainId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateUser() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateUser( + AssociateOrganizationUserRequest + .builder() + .userId(userId) + .organizationId( + organizationId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateUserByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .organizations() + .associateUserByUsername( + AssociateOrganizationUserByUsernameRequest + .builder() + .organizationId(organizationId) + .username(this.username) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String organizationName = this.nameFactory.getOrganizationName(); + + this.cloudFoundryClient + .organizations() + .create(CreateOrganizationRequest.builder().name(organizationName).build()) + .map(ResourceUtils::getEntity) + .map(OrganizationEntity::getName) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + this.cloudFoundryClient + .organizations() + .delete( + DeleteOrganizationRequest.builder() + .organizationId(organizationId) + .async(true) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap( + organizationId -> + requestGetOrganization(this.cloudFoundryClient, organizationId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-OrganizationNotFound\\([0-9]+\\): The" + + " organization could not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + this.cloudFoundryClient + .organizations() + .delete( + DeleteOrganizationRequest.builder() + .organizationId(organizationId) + .async(false) + .build())) + .flatMap( + organizationId -> + requestGetOrganization(this.cloudFoundryClient, organizationId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-OrganizationNotFound\\([0-9]+\\): The" + + " organization could not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizations() + .get( + GetOrganizationRequest.builder() + .organizationId(organizationId) + .build())) + .map(ResourceUtils::getEntity) + .map(OrganizationEntity::getName) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getInstanceUsage() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizations() + .getInstanceUsage( + GetOrganizationInstanceUsageRequest.builder() + .organizationId(organizationId) + .build())) + .map(GetOrganizationInstanceUsageResponse::getInstanceUsage) + .as(StepVerifier::create) + .expectNext(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getMemoryUsage() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizations() + .getMemoryUsage( + GetOrganizationMemoryUsageRequest.builder() + .organizationId(organizationId) + .build())) + .map(GetOrganizationMemoryUsageResponse::getMemoryUsageInMb) + .as(StepVerifier::create) + .expectNext(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getUserRoles() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .flatMap( + function( + (organizationId, userId) -> + requestAssociateUser( + this.cloudFoundryClient, + organizationId, + userId) + .thenReturn(organizationId))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .organizations() + .getUserRoles( + GetOrganizationUserRolesRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build())) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername())) + .as(StepVerifier::create) + .expectNext(this.username) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMapMany( + organizationId -> + requestListOrganizations(this.cloudFoundryClient) + .map(ResourceUtils::getId) + .filter(organizationId::equals)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditors() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateAuditor( + this.cloudFoundryClient, organizationId, userId))) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditorsFilterByAuditedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .auditedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditorsFilterByAuditedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId, + builder -> + builder.auditedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditorsFilterByBillingManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .billingManagedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditorsFilterByManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .managedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditorsFilterByManagedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId, + builder -> + builder.managedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditorsFilterBySpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationAuditors( + this.cloudFoundryClient, + organizationId, + builder -> builder.spaceId(spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagers() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateBillingManager( + this.cloudFoundryClient, organizationId, userId))) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagersFilterByAuditedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .auditedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagersFilterByAuditedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId, + builder -> + builder.auditedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagersFilterByBillingManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .billingManagedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagersFilterByManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .managedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagersFilterByManagedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId, + builder -> + builder.managedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagersFilterBySpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationBillingManagers( + this.cloudFoundryClient, + organizationId, + builder -> builder.spaceId(spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + public void listDomains() { + String organizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, organizationId, privateDomainName)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .organizations() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build())) + .map( + response -> + ResourceUtils.getEntity(response) + .getName())) + .filter(privateDomainName::equals) + .as(StepVerifier::create) + .expectNext(privateDomainName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + public void listDomainsFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, organizationId, privateDomainName)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .organizations() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .name( + privateDomainName) + .organizationId( + organizationId) + .page(page) + .build())) + .map( + response -> + ResourceUtils.getEntity(response) + .getName())) + .as(StepVerifier::create) + .expectNext(privateDomainName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByAuditorId() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateAuditor( + this.cloudFoundryClient, organizationId, userId))) + .flatMapMany( + function( + (organizationId, auditorId) -> + requestListOrganizations( + this.cloudFoundryClient, + builder -> builder.auditorId(auditorId)) + .map(ResourceUtils::getId) + .filter(organizationId::equals))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByBillingManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateBillingManager( + this.cloudFoundryClient, organizationId, userId))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizations( + this.cloudFoundryClient, + builder -> builder.billingManagerId(userId)) + .map(ResourceUtils::getId) + .filter(organizationId::equals))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateManager( + this.cloudFoundryClient, organizationId, userId))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizations( + this.cloudFoundryClient, + builder -> builder.managerId(userId)) + .map(ResourceUtils::getId) + .filter(organizationId::equals))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + + requestCreateOrganization(this.cloudFoundryClient, organizationName) + .thenMany( + requestListOrganizations( + this.cloudFoundryClient, builder -> builder.name(organizationName))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + requestListOrganizations( + this.cloudFoundryClient, + builder -> builder.spaceId(spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByStatus() { + String organizationName = this.nameFactory.getOrganizationName(); + String organizationStatus = "suspended"; + + requestCreateOrganization( + this.cloudFoundryClient, + organizationName, + builder -> builder.status(organizationStatus)) + .map(ResourceUtils::getId) + .flatMapMany( + organizationId -> + requestListOrganizations( + this.cloudFoundryClient, + builder -> builder.status(organizationStatus)) + .filter( + resource -> + organizationId.equals( + ResourceUtils.getId(resource))) + .map(ResourceUtils::getEntity) + .map(OrganizationEntity::getName)) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByUserId() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateUser( + this.cloudFoundryClient, organizationId, userId))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizations( + this.cloudFoundryClient, + builder -> builder.userId(userId)) + .map(ResourceUtils::getId) + .filter(organizationId::equals))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagers() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateManager( + this.cloudFoundryClient, organizationId, userId))) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByAuditedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .auditedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByAuditedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId, + builder -> + builder.auditedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByBillingManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .billingManagedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .managedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByManagedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId, + builder -> + builder.managedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterBySpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateManager( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationManagers( + this.cloudFoundryClient, + organizationId, + builder -> builder.spaceId(spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listPrivateDomains() { + String domainName = this.nameFactory.getDomainName(); + String defaultOrganizationName = this.nameFactory.getOrganizationName(); + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, defaultOrganizationName), + createOrganizationId(this.cloudFoundryClient, organizationName)) + .flatMap( + function( + (defaultOrganizationId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + createPrivateDomainId( + this.cloudFoundryClient, + defaultOrganizationId, + domainName)))) + .delayUntil( + function( + (organizationId, privateDomainId) -> + requestAssociatePrivateDomain( + this.cloudFoundryClient, + organizationId, + privateDomainId))) + .flatMap( + function( + (organizationId, privateDomainId) -> + Mono.zip( + Mono.just(privateDomainId), + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, + organizationId) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listPrivateDomainsFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createPrivateDomainId( + this.cloudFoundryClient, + organizationId, + privateDomainName))) + .flatMap( + function( + (organizationId, privateDomainId) -> + Mono.zip( + Mono.just(privateDomainId), + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, + organizationId, + builder -> + builder.name( + privateDomainName)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServices() { + Mono.zip(this.organizationId, this.serviceBrokerId) + .flatMapMany( + function( + (organizationId, serviceBrokerId) -> + requestListOrganizationServices( + this.cloudFoundryClient, organizationId) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity( + resource) + .getServiceBrokerId())))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectNext(this.serviceName + "-shareable") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicesFilterByActive() { + Mono.zip(this.organizationId, this.serviceBrokerId) + .flatMapMany( + function( + (organizationId, serviceBrokerId) -> + requestListOrganizationServices( + this.cloudFoundryClient, + organizationId, + builder -> builder.active(true)) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity( + resource) + .getServiceBrokerId())))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectNext(this.serviceName + "-shareable") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicesFilterByLabel() { + Mono.zip(this.organizationId, this.serviceBrokerId) + .flatMapMany( + function( + (organizationId, serviceBrokerId) -> + requestListOrganizationServices( + this.cloudFoundryClient, + organizationId, + builder -> builder.label(this.serviceName)) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity( + resource) + .getServiceBrokerId())))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicesFilterByServiceBrokerId() { + Mono.zip(this.organizationId, this.serviceBrokerId) + .flatMapMany( + function( + (organizationId, serviceBrokerId) -> + requestListOrganizationServices( + this.cloudFoundryClient, + organizationId, + builder -> + builder.serviceBrokerId(serviceBrokerId)))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectNext(this.serviceName + "-shareable") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpaceQuotaDefinitions() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .organizations() + .listSpaceQuotaDefinitions( + ListOrganizationSpaceQuotaDefinitionsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpaces() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + requestCreateSpace( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMapMany( + organizationId -> + requestListOrganizationSpaces( + this.cloudFoundryClient, organizationId)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByApplicationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String applicationName = this.nameFactory.getApplicationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMapMany( + (function( + (organizationId, spaceId, applicationId) -> + Mono.zip( + Mono.just(spaceId), + requestListOrganizationSpaces( + this.cloudFoundryClient, + organizationId, + builder -> + builder.applicationId( + applicationId)) + .single() + .map(ResourceUtils::getId))))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByDeveloperId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateUser( + this.cloudFoundryClient, organizationId, userId))) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, spaceId, userId))) + .flatMapMany( + (function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(spaceId), + requestListOrganizationSpaces( + this.cloudFoundryClient, + organizationId, + builder -> + builder.developerId(userId)) + .single() + .map(ResourceUtils::getId))))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMapMany( + (function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(spaceId), + requestListOrganizationSpaces( + this.cloudFoundryClient, + organizationId, + builder -> builder.name(spaceName)) + .single() + .map(ResourceUtils::getId))))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsers() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateUser( + this.cloudFoundryClient, organizationId, userId))) + .flatMap( + function( + (organizationId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsersFilterByAuditedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateUser( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateAuditor( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .auditedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsersFilterByAuditedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateUser( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId, + builder -> + builder.auditedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsersFilterByBillingManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateUser( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateBillingManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .billingManagedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsersFilterByManagedOrganizationId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateUser( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateManager( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId1, + builder -> + builder + .managedOrganizationId( + organizationId2)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsersFilterByManagedSpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateUser( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId, + builder -> + builder.managedSpaceId( + spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsersFilterBySpaceId() { + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2), + this.userId) + .delayUntil( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + requestAssociateUser( + this.cloudFoundryClient, + organizationId1, + userId), + requestAssociateUser( + this.cloudFoundryClient, + organizationId2, + userId)))) + .flatMap( + function( + (organizationId1, organizationId2, userId) -> + Mono.zip( + Mono.just(organizationId1), + createSpaceId( + this.cloudFoundryClient, + organizationId2, + spaceName), + Mono.just(userId)))) + .delayUntil( + function( + (organizationId, spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (organizationId, spaceId, userId) -> + Mono.zip( + Mono.just(userId), + requestListOrganizationUsers( + this.cloudFoundryClient, + organizationId, + builder -> builder.spaceId(spaceId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeAuditor() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateAuditor( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeAuditor( + RemoveOrganizationAuditorRequest.builder() + .auditorId(userId) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationAuditors( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeAuditorByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateAuditor( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeAuditorByUsername( + RemoveOrganizationAuditorByUsernameRequest + .builder() + .username(this.username) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationAuditors( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeBillingManager() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateBillingManager( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeBillingManager( + RemoveOrganizationBillingManagerRequest + .builder() + .billingManagerId(userId) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationBillingManagers( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeBillingManagerByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateBillingManager( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeBillingManagerByUsername( + RemoveOrganizationBillingManagerByUsernameRequest + .builder() + .origin("uaa") + .username(this.username) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationBillingManagers( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeManager() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateManager( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeManager( + RemoveOrganizationManagerRequest.builder() + .managerId(userId) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationManagers( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeManagerByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateManager( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeManagerByUsername( + RemoveOrganizationManagerByUsernameRequest + .builder() + .username(this.username) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationManagers( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removePrivateDomain() { + String domainName = this.nameFactory.getDomainName(); + String defaultOrganizationName = this.nameFactory.getOrganizationName(); + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, defaultOrganizationName), + createOrganizationId(this.cloudFoundryClient, organizationName)) + .flatMap( + function( + (defaultOrganizationId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + createPrivateDomainId( + this.cloudFoundryClient, + defaultOrganizationId, + domainName)))) + .delayUntil( + function( + (organizationId, privateDomainId) -> + requestAssociatePrivateDomain( + this.cloudFoundryClient, + organizationId, + privateDomainId))) + .delayUntil( + function( + (organizationId, privateDomainId) -> + this.cloudFoundryClient + .organizations() + .removePrivateDomain( + RemoveOrganizationPrivateDomainRequest + .builder() + .privateDomainId(privateDomainId) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, privateDomainId) -> + requestListOrganizationPrivateDomains( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeUser() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateUser( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeUser( + RemoveOrganizationUserRequest.builder() + .userId(userId) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationUsers( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeUserByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip(createOrganizationId(this.cloudFoundryClient, organizationName), this.userId) + .delayUntil( + function( + (organizationId, userId) -> + requestAssociateUser( + this.cloudFoundryClient, organizationId, userId))) + .delayUntil( + function( + (organizationId, userId) -> + this.cloudFoundryClient + .organizations() + .removeUserByUsername( + RemoveOrganizationUserByUsernameRequest + .builder() + .username(this.username) + .organizationId(organizationId) + .build()))) + .flatMapMany( + function( + (organizationId, userId) -> + requestListOrganizationUsers( + this.cloudFoundryClient, organizationId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void summary() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizations() + .summary( + SummaryOrganizationRequest.builder() + .organizationId(organizationId) + .build()) + .map(SummaryOrganizationResponse::getName)) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String organizationName = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + this.cloudFoundryClient + .organizations() + .update( + UpdateOrganizationRequest.builder() + .organizationId(organizationId) + .name(organizationName2) + .build())) + .flatMap( + organizationId -> + requestGetOrganization(this.cloudFoundryClient, organizationId)) + .map(ResourceUtils::getEntity) + .map(OrganizationEntity::getName) + .as(StepVerifier::create) + .expectNext(organizationName2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(ResourceUtils::getId); + } + + private static Mono createPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String organizationId, String domainName) { + return requestCreatePrivateDomain(cloudFoundryClient, domainName, organizationId) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono getUserDefaultSpaceId( + CloudFoundryClient cloudFoundryClient, String userId) { + return requestListUsers(cloudFoundryClient) + .filter(resource -> userId.equals(ResourceUtils.getId(resource))) + .single() + .map(resource -> ResourceUtils.getEntity(resource).getDefaultSpaceId()); + } + + private static Mono requestAssociateAuditor( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateAuditor( + AssociateOrganizationAuditorRequest.builder() + .auditorId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestAssociateBillingManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateBillingManager( + AssociateOrganizationBillingManagerRequest.builder() + .billingManagerId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestAssociateManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateManager( + AssociateOrganizationManagerRequest.builder() + .managerId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestAssociatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String organizationId, String privateDomainId) { + return cloudFoundryClient + .organizations() + .associatePrivateDomain( + AssociateOrganizationPrivateDomainRequest.builder() + .organizationId(organizationId) + .privateDomainId(privateDomainId) + .build()); + } + + private static Mono requestAssociateSpaceAuditor( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .spaces() + .associateAuditor( + AssociateSpaceAuditorRequest.builder() + .spaceId(spaceId) + .auditorId(userId) + .build()); + } + + private static Mono requestAssociateSpaceDeveloper( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .spaces() + .associateDeveloper( + AssociateSpaceDeveloperRequest.builder() + .spaceId(spaceId) + .developerId(userId) + .build()); + } + + private static Mono requestAssociateSpaceManager( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .spaces() + .associateManager( + AssociateSpaceManagerRequest.builder() + .spaceId(spaceId) + .managerId(userId) + .build()); + } + + private static Mono requestAssociateUser( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateUser( + AssociateOrganizationUserRequest.builder() + .userId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization( + cloudFoundryClient, organizationName, UnaryOperator.identity()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, + String organizationName, + UnaryOperator transformer) { + return cloudFoundryClient + .organizations() + .create( + transformer + .apply(CreateOrganizationRequest.builder()) + .name(organizationName) + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .privateDomains() + .create( + CreatePrivateDomainRequest.builder() + .name(domainName) + .owningOrganizationId(organizationId) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } + + private static Mono requestGetOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return cloudFoundryClient + .organizations() + .get(GetOrganizationRequest.builder().organizationId(organizationId).build()); + } + + private static Flux requestListOrganizationAuditors( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationAuditors( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationAuditors( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listAuditors( + transformer + .apply(ListOrganizationAuditorsRequest.builder()) + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Flux requestListOrganizationBillingManagers( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationBillingManagers( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationBillingManagers( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listBillingManagers( + transformer + .apply( + ListOrganizationBillingManagersRequest + .builder()) + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Flux requestListOrganizationManagers( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationManagers( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationManagers( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listManagers( + transformer + .apply(ListOrganizationManagersRequest.builder()) + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Flux requestListOrganizationPrivateDomains( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationPrivateDomains( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationPrivateDomains( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listPrivateDomains( + transformer + .apply( + ListOrganizationPrivateDomainsRequest + .builder()) + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Flux requestListOrganizationServices( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationServices( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationServices( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listServices( + transformer + .apply(ListOrganizationServicesRequest.builder()) + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListOrganizationSpaces( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationSpaces( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationSpaces( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listSpaces( + transformer + .apply(ListOrganizationSpacesRequest.builder()) + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListOrganizationUsers( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListOrganizationUsers( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListOrganizationUsers( + CloudFoundryClient cloudFoundryClient, + String organizationId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listUsers( + transformer + .apply(ListOrganizationUsersRequest.builder()) + .page(page) + .organizationId(organizationId) + .build())); + } + + private static Flux requestListOrganizations( + CloudFoundryClient cloudFoundryClient) { + return requestListOrganizations(cloudFoundryClient, UnaryOperator.identity()); + } + + private static Flux requestListOrganizations( + CloudFoundryClient cloudFoundryClient, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + transformer + .apply(ListOrganizationsRequest.builder()) + .page(page) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> cloudFoundryClient.services().list(ListServicesRequest.builder().build())); + } + + private static Flux requestListUsers(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .users() + .list(ListUsersRequest.builder().page(page).build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/PrivateDomainsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/PrivateDomainsTest.java new file mode 100644 index 00000000000..587cfa35aea --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/PrivateDomainsTest.java @@ -0,0 +1,761 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationPrivateDomainResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.privatedomains.AbstractPrivateDomainResource; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.DeletePrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.GetPrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.GetPrivateDomainResponse; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainSharedOrganizationsRequest; +import org.cloudfoundry.client.v2.privatedomains.ListPrivateDomainsRequest; +import org.cloudfoundry.client.v2.privatedomains.PrivateDomainResource; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple2; + +public final class PrivateDomainsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono userId; + + @Test + public void create() { + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + requestCreatePrivateDomain( + this.cloudFoundryClient, + privateDomainName, + organizationId), + Mono.just(organizationId))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(privateDomainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + requestCreatePrivateDomain( + this.cloudFoundryClient, privateDomainName, organizationId)) + .delayUntil( + privateDomainResource -> + requestDeletePrivateDomain( + this.cloudFoundryClient, + ResourceUtils.getId(privateDomainResource)) + .flatMap( + jobResource -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + jobResource))) + .flatMap( + privateDomainResource -> + requestGetPrivateDomain( + this.cloudFoundryClient, + ResourceUtils.getId(privateDomainResource))) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-DomainNotFound\\([0-9]+\\): The domain could" + + " not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + requestCreatePrivateDomain( + this.cloudFoundryClient, + privateDomainName, + organizationId))) + .flatMap( + function( + (organizationId, privateDomainResource) -> + Mono.zip( + requestGetPrivateDomain( + this.cloudFoundryClient, + ResourceUtils.getId(privateDomainResource)), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(privateDomainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + requestCreatePrivateDomain( + this.cloudFoundryClient, + privateDomainName, + organizationId))) + .flatMap( + function( + (organizationId, privateDomainResource) -> + Mono.zip( + listPrivateDomains(this.cloudFoundryClient) + .filter( + resource -> + ResourceUtils.getId( + privateDomainResource) + .equals( + ResourceUtils + .getId( + resource))) + .single(), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(privateDomainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + requestCreatePrivateDomain( + this.cloudFoundryClient, + privateDomainName, + organizationId))) + .flatMap( + function( + (organizationId, privateDomainResource) -> + Mono.zip( + listPrivateDomains( + this.cloudFoundryClient, + privateDomainName) + .filter( + resource -> + ResourceUtils.getId( + privateDomainResource) + .equals( + ResourceUtils + .getId( + resource))) + .single(), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith(domainNameAndOrganizationIdEquality(privateDomainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizations() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName))) + .flatMap( + function( + (domainId, organizationId) -> + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId))) + .flatMapMany( + domainId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .page(page) + .privateDomainId(domainId) + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .filter(sharedOrganizationName::equals) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterByAuditorId() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName), + this.userId)) + .flatMap( + function( + (domainId, organizationId, userId) -> + Mono.zip( + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId), + requestAssociateOrganizationAuditor( + this.cloudFoundryClient, + organizationId, + userId) + .thenReturn(userId)))) + .flatMapMany( + function( + (domainId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .auditorId(userId) + .page(page) + .privateDomainId( + domainId) + .build())))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterByBillingManagerId() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName), + this.userId)) + .flatMap( + function( + (domainId, organizationId, userId) -> + Mono.zip( + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId), + requestAssociateOrganizationBillingManager( + this.cloudFoundryClient, + organizationId, + userId) + .thenReturn(userId)))) + .flatMapMany( + function( + (domainId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .billingManagerId( + userId) + .page(page) + .privateDomainId( + domainId) + .build())))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterByManagerId() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName), + this.userId)) + .flatMap( + function( + (domainId, organizationId, userId) -> + Mono.zip( + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId), + requestAssociateOrganizationManager( + this.cloudFoundryClient, + organizationId, + userId) + .thenReturn(userId)))) + .flatMapMany( + function( + (domainId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .managerId(userId) + .page(page) + .privateDomainId( + domainId) + .build())))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterByName() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName))) + .flatMap( + function( + (domainId, organizationId) -> + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId))) + .flatMapMany( + domainId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .name( + sharedOrganizationName) + .page(page) + .privateDomainId(domainId) + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterBySpaceId() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName))) + .flatMap( + function( + (domainId, organizationId) -> + Mono.zip( + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName)))) + .flatMapMany( + function( + (domainId, spaceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .page(page) + .privateDomainId( + domainId) + .spaceId(spaceId) + .build())))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterByStatus() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName))) + .flatMap( + function( + (domainId, organizationId) -> + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId))) + .flatMapMany( + domainId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .page(page) + .privateDomainId(domainId) + .status("active") + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedOrganizationsFilterByUserId() { + String sharedOrganizationName = this.nameFactory.getOrganizationName(); + String privateDomainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + privateDomainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, sharedOrganizationName), + this.userId)) + .flatMap( + function( + (domainId, organizationId, userId) -> + Mono.zip( + requestAssociateOrganizationPrivateDomain( + this.cloudFoundryClient, + domainId, + organizationId) + .thenReturn(domainId), + requestAssociateOrganizationUser( + this.cloudFoundryClient, + organizationId, + userId) + .thenReturn(userId)))) + .flatMapMany( + function( + (domainId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .privateDomains() + .listSharedOrganizations( + ListPrivateDomainSharedOrganizationsRequest + .builder() + .page(page) + .privateDomainId( + domainId) + .userId(userId) + .build())))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(sharedOrganizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(ResourceUtils::getId); + } + + private static Mono createPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreatePrivateDomain(cloudFoundryClient, domainName, organizationId) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .build()) + .map(ResourceUtils::getId); + } + + private static + Consumer> domainNameAndOrganizationIdEquality(String domainName) { + return consumer( + (resource, organizationId) -> { + assertThat(ResourceUtils.getEntity(resource).getName()).isEqualTo(domainName); + assertThat(ResourceUtils.getEntity(resource).getOwningOrganizationId()) + .isEqualTo(organizationId); + }); + } + + private static Flux listPrivateDomains( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .privateDomains() + .list(ListPrivateDomainsRequest.builder().page(page).build())); + } + + private static Flux listPrivateDomains( + CloudFoundryClient cloudFoundryClient, String privateDomainName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .privateDomains() + .list( + ListPrivateDomainsRequest.builder() + .page(page) + .name(privateDomainName) + .build())); + } + + private static Mono requestAssociateOrganizationAuditor( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateAuditor( + AssociateOrganizationAuditorRequest.builder() + .auditorId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono + requestAssociateOrganizationBillingManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateBillingManager( + AssociateOrganizationBillingManagerRequest.builder() + .billingManagerId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestAssociateOrganizationManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateManager( + AssociateOrganizationManagerRequest.builder() + .managerId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono + requestAssociateOrganizationPrivateDomain( + CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { + return cloudFoundryClient + .organizations() + .associatePrivateDomain( + AssociateOrganizationPrivateDomainRequest.builder() + .organizationId(organizationId) + .privateDomainId(domainId) + .build()); + } + + private static Mono requestAssociateOrganizationUser( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateUser( + AssociateOrganizationUserRequest.builder() + .organizationId(organizationId) + .userId(userId) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizations() + .create( + CreateOrganizationRequest.builder() + .name(organizationName) + .status("active") + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .privateDomains() + .create( + CreatePrivateDomainRequest.builder() + .name(domainName) + .owningOrganizationId(organizationId) + .build()); + } + + private static Mono requestDeletePrivateDomain( + CloudFoundryClient cloudFoundryClient, String privateDomainId) { + return cloudFoundryClient + .privateDomains() + .delete( + DeletePrivateDomainRequest.builder() + .privateDomainId(privateDomainId) + .build()); + } + + private static Mono requestGetPrivateDomain( + CloudFoundryClient cloudFoundryClient, String privateDomainId) { + return cloudFoundryClient + .privateDomains() + .get(GetPrivateDomainRequest.builder().privateDomainId(privateDomainId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/RouteMappingsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/RouteMappingsTest.java new file mode 100644 index 00000000000..1056e983040 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/RouteMappingsTest.java @@ -0,0 +1,421 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.DeleteRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.GetRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.GetRouteMappingResponse; +import org.cloudfoundry.client.v2.routemappings.ListRouteMappingsRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainResponse; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class RouteMappingsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono spaceId; + + @Test + public void createSharedDomain() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + Mono.zip(getSharedDomainId(this.cloudFoundryClient, domainName), this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + getApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + getRouteId( + this.cloudFoundryClient, + domainId, + hostName, + spaceId)))) + .flatMap( + function( + (applicationId, routeId) -> + Mono.zip( + Mono.just(applicationId), + Mono.just(routeId), + this.cloudFoundryClient + .routeMappings() + .create( + CreateRouteMappingRequest.builder() + .applicationId( + applicationId) + .routeId(routeId) + .build()) + .map(ResourceUtils::getEntity)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (applicationId, routeId, entity) -> { + assertThat(entity.getApplicationId()).isEqualTo(applicationId); + assertThat(entity.getRouteId()).isEqualTo(routeId); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.spaceId + .flatMap( + spaceId -> + getRouteMappingId( + this.cloudFoundryClient, + applicationName, + domainName, + hostName, + spaceId)) + .delayUntil( + routeMappingId -> + this.cloudFoundryClient + .routeMappings() + .delete( + DeleteRouteMappingRequest.builder() + .async(false) + .routeMappingId(routeMappingId) + .build())) + .flatMap( + routeMappingId -> + requestGetRouteMapping(this.cloudFoundryClient, routeMappingId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching(".*\\([0-9]+\\): .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncTrue() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.spaceId + .flatMap( + spaceId -> + getRouteMappingId( + this.cloudFoundryClient, + applicationName, + domainName, + hostName, + spaceId)) + .delayUntil( + routeMappingId -> + this.cloudFoundryClient + .routeMappings() + .delete( + DeleteRouteMappingRequest.builder() + .async(true) + .routeMappingId(routeMappingId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap( + routeMappingId -> + requestGetRouteMapping(this.cloudFoundryClient, routeMappingId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching(".*\\([0-9]+\\): .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.spaceId + .flatMap( + spaceId -> + getRouteMappingId( + this.cloudFoundryClient, + applicationName, + domainName, + hostName, + spaceId)) + .flatMap( + routeMappingId -> + Mono.zip( + Mono.just(routeMappingId), + this.cloudFoundryClient + .routeMappings() + .get( + GetRouteMappingRequest.builder() + .routeMappingId(routeMappingId) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + getSharedDomainId(this.cloudFoundryClient, domainName), + Mono.just(spaceId))) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + getApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + getRouteId( + this.cloudFoundryClient, + domainId, + hostName, + spaceId)))) + .flatMap( + function( + (applicationId, routeId) -> + requestCreateRouteMapping( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMapMany( + applicationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routeMappings() + .list( + ListRouteMappingsRequest + .builder() + .page(page) + .applicationId( + applicationId) + .build())) + .filter( + resource -> + ResourceUtils.getEntity(resource) + .getApplicationId() + .equals(applicationId)) + .single()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByRouteId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + getSharedDomainId(this.cloudFoundryClient, domainName), + Mono.just(spaceId))) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + getApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + getRouteId( + this.cloudFoundryClient, + domainId, + hostName, + spaceId)))) + .flatMap( + function( + (applicationId, routeId) -> + requestCreateRouteMapping( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(routeId))) + .flatMapMany( + routeId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routeMappings() + .list( + ListRouteMappingsRequest + .builder() + .page(page) + .routeId(routeId) + .build())) + .filter( + resource -> + ResourceUtils.getEntity(resource) + .getRouteId() + .equals(routeId)) + .single()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createRouteMappingId( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return requestCreateRouteMapping(cloudFoundryClient, applicationId, routeId) + .map(ResourceUtils::getId); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono getRouteId( + CloudFoundryClient cloudFoundryClient, + String domainId, + String hostName, + String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, hostName, spaceId) + .map(ResourceUtils::getId); + } + + private static Mono getRouteMappingId( + CloudFoundryClient cloudFoundryClient, + String applicationName, + String domainName, + String hostName, + String spaceId) { + return getSharedDomainId(cloudFoundryClient, domainName) + .flatMap( + domainId -> + Mono.zip( + getApplicationId( + cloudFoundryClient, applicationName, spaceId), + getRouteId( + cloudFoundryClient, domainId, hostName, spaceId))) + .flatMap( + function( + (applicationId, routeId) -> + createRouteMappingId( + cloudFoundryClient, applicationId, routeId))); + } + + private static Mono getSharedDomainId( + CloudFoundryClient cloudFoundryClient, String domainName) { + return requestCreateSharedDomain(cloudFoundryClient, domainName).map(ResourceUtils::getId); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .diego(true) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String hostName, + String spaceId) { + return cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .host(hostName) + .domainId(domainId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateRouteMapping( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .routeMappings() + .create( + CreateRouteMappingRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestCreateSharedDomain( + CloudFoundryClient cloudFoundryClient, String domainName) { + return cloudFoundryClient + .sharedDomains() + .create(CreateSharedDomainRequest.builder().name(domainName).build()); + } + + private static Mono requestGetRouteMapping( + CloudFoundryClient cloudFoundryClient, String routeMappingId) { + return cloudFoundryClient + .routeMappings() + .get(GetRouteMappingRequest.builder().routeMappingId(routeMappingId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/RoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/RoutesTest.java new file mode 100644 index 00000000000..3ee56508931 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/RoutesTest.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingRequest; +import org.cloudfoundry.client.v2.routemappings.CreateRouteMappingResponse; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.AssociateRouteApplicationResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.DeleteRouteRequest; +import org.cloudfoundry.client.v2.routes.GetRouteRequest; +import org.cloudfoundry.client.v2.routes.GetRouteResponse; +import org.cloudfoundry.client.v2.routes.ListRouteApplicationsRequest; +import org.cloudfoundry.client.v2.routes.ListRouteMappingsRequest; +import org.cloudfoundry.client.v2.routes.ListRoutesRequest; +import org.cloudfoundry.client.v2.routes.RemoveRouteApplicationRequest; +import org.cloudfoundry.client.v2.routes.RouteEntity; +import org.cloudfoundry.client.v2.routes.RouteExistsRequest; +import org.cloudfoundry.client.v2.routes.UpdateRouteRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple3; + +public final class RoutesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono spaceId; + + @Autowired private Mono stackId; + + @Test + public void associateApplication() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .page(page) + .routeId(routeId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + Mono.just(domainId), + Mono.just(spaceId), + this.cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .spaceId(spaceId) + .build()) + .map(ResourceUtils::getEntity)))) + .as(StepVerifier::create) + .consumeNextWith(domainIdSpaceIdEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + createRouteId(this.cloudFoundryClient, domainId, spaceId))) + .delayUntil( + routeId -> + this.cloudFoundryClient + .routes() + .delete( + DeleteRouteRequest.builder() + .async(true) + .routeId(routeId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap(routeId -> requestGetRoute(this.cloudFoundryClient, routeId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-RouteNotFound\\([0-9]+\\): The route could not" + + " be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + createRouteId(this.cloudFoundryClient, domainId, spaceId))) + .delayUntil( + routeId -> + this.cloudFoundryClient + .routes() + .delete( + DeleteRouteRequest.builder() + .async(false) + .routeId(routeId) + .build())) + .flatMap(routeId -> requestGetRoute(this.cloudFoundryClient, routeId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-RouteNotFound\\([0-9]+\\): The route could not" + + " be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void exists() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .delayUntil( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + hostName, + spaceId))) + .flatMap( + function( + (domainId, spaceId) -> + this.cloudFoundryClient + .routes() + .exists( + RouteExistsRequest.builder() + .domainId(domainId) + .host(hostName) + .build()))) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void existsDoesNotExist() { + String domainName = this.nameFactory.getDomainName(); + String hostName1 = this.nameFactory.getHostName(); + String hostName2 = this.nameFactory.getHostName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .delayUntil( + function( + (domainId, spaceId) -> + this.cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(hostName1) + .spaceId(spaceId) + .build()))) + .flatMap( + function( + (domainId, spaceId) -> + this.cloudFoundryClient + .routes() + .exists( + RouteExistsRequest.builder() + .domainId(domainId) + .host(hostName2) + .build()))) + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + Mono.just(domainId), + Mono.just(spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .flatMap( + function( + (domainId, spaceId, routeId) -> + Mono.zip( + Mono.just(domainId), + Mono.just(spaceId), + this.cloudFoundryClient + .routes() + .get( + GetRouteRequest.builder() + .routeId(routeId) + .build()) + .map(ResourceUtils::getEntity)))) + .as(StepVerifier::create) + .consumeNextWith(domainIdSpaceIdEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplications() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .page(page) + .routeId(routeId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByDiego() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .diego(true) + .page(page) + .routeId(routeId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByName() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .name( + applicationName) + .page(page) + .routeId(routeId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByOrganizationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId, + Mono.just(organizationId))) + .flatMap( + function( + (domainId, spaceId, organizationId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, domainId, spaceId), + Mono.just(organizationId)))) + .delayUntil( + function( + (applicationId, routeId, organizationId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId, organizationId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .routeId(routeId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterBySpaceId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, domainId, spaceId), + Mono.just(spaceId)))) + .delayUntil( + function( + (applicationId, routeId, spaceId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId, spaceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .page(page) + .routeId(routeId) + .spaceId(spaceId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByStackId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId, + this.stackId) + .flatMap( + function( + (domainId, spaceId, stackId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + stackId), + createRouteId( + this.cloudFoundryClient, domainId, spaceId), + Mono.just(stackId)))) + .delayUntil( + function( + (applicationId, routeId, stackId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId, stackId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .page(page) + .routeId(routeId) + .stackId(stackId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByDomainId() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .delayUntil( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, domainId, spaceId))) + .flatMapMany( + function( + (domainId, spaceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .list( + ListRoutesRequest.builder() + .domainId(domainId) + .page(page) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByHost() { + String domainName = this.nameFactory.getDomainName(); + String host = this.nameFactory.getHostName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, domainId, host, spaceId))) + .flatMapMany( + response -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .list( + ListRoutesRequest.builder() + .host(host) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId, + Mono.just(organizationId))) + .delayUntil( + function( + (domainId, spaceId, organizationId) -> + requestCreateRoute( + this.cloudFoundryClient, domainId, spaceId))) + .flatMapMany( + function( + (domainId, spaceId, organizationId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .list( + ListRoutesRequest.builder() + .organizationId( + organizationId) + .page(page) + .build())))) + .count() + .as(StepVerifier::create) + .consumeNextWith(count -> assertThat(count).isGreaterThan(0)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByPath() { + String domainName = this.nameFactory.getDomainName(); + String path = this.nameFactory.getPath(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + this.cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .path(path) + .spaceId(spaceId) + .build()))) + .flatMapMany( + response -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .list( + ListRoutesRequest.builder() + .page(page) + .path(path) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listMappings() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + requestCreateRouteMapping( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId) -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listMappings( + ListRouteMappingsRequest + .builder() + .page( + page) + .routeId( + routeId) + .build())) + .single() + .map( + response -> + ResourceUtils.getEntity( + response) + .getApplicationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listMappingsFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + requestCreateRouteMapping( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, routeId) -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listMappings( + ListRouteMappingsRequest + .builder() + .applicationId( + applicationId) + .page( + page) + .routeId( + routeId) + .build())) + .single() + .map( + response -> + ResourceUtils.getEntity( + response) + .getApplicationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeApplication() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + null), + createRouteId( + this.cloudFoundryClient, + domainId, + spaceId)))) + .delayUntil( + function( + (applicationId, routeId) -> + associateApplicationWithRoute( + this.cloudFoundryClient, applicationId, routeId))) + .delayUntil( + function( + (applicationId, routeId) -> + this.cloudFoundryClient + .routes() + .removeApplication( + RemoveRouteApplicationRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()))) + .flatMapMany( + function( + (applicationId, routeId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .routes() + .listApplications( + ListRouteApplicationsRequest + .builder() + .page(page) + .routeId(routeId) + .build())))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String domainName = this.nameFactory.getDomainName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + createRouteId(this.cloudFoundryClient, domainId, spaceId))) + .flatMap( + routeId -> + this.cloudFoundryClient + .routes() + .update( + UpdateRouteRequest.builder() + .host("test-host") + .routeId(routeId) + .build()) + .map(ResourceUtils::getEntity) + .map(RouteEntity::getHost)) + .as(StepVerifier::create) + .expectNext("test-host") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono associateApplicationWithRoute( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .routes() + .associateApplication( + AssociateRouteApplicationRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String stackId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName, stackId) + .map(ResourceUtils::getId); + } + + private static Mono createPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return requestCreatePrivateDomain(cloudFoundryClient, name, organizationId) + .map(ResourceUtils::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, spaceId).map(ResourceUtils::getId); + } + + private static Consumer> domainIdSpaceIdEquality() { + return consumer( + (domainId, spaceId, entity) -> { + assertThat(entity.getDomainId()).isEqualTo(domainId); + assertThat(entity.getSpaceId()).isEqualTo(spaceId); + }); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String stackId) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .diego(true) + .name(applicationName) + .spaceId(spaceId) + .stackId(stackId) + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return cloudFoundryClient + .privateDomains() + .create( + CreatePrivateDomainRequest.builder() + .name(name) + .owningOrganizationId(organizationId) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String spaceId) { + return cloudFoundryClient + .routes() + .create(CreateRouteRequest.builder().domainId(domainId).spaceId(spaceId).build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String host, String spaceId) { + return cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(host) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateRouteMapping( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .routeMappings() + .create( + CreateRouteMappingRequest.builder() + .applicationId(applicationId) + .routeId(routeId) + .build()); + } + + private static Mono requestGetRoute( + CloudFoundryClient cloudFoundryClient, String routeId) { + return cloudFoundryClient.routes().get(GetRouteRequest.builder().routeId(routeId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/SecurityGroupsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/SecurityGroupsTest.java new file mode 100644 index 00000000000..64ee5df01a8 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/SecurityGroupsTest.java @@ -0,0 +1,546 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.client.v2.securitygroups.Protocol.TCP; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.securitygroups.AssociateSecurityGroupSpaceRequest; +import org.cloudfoundry.client.v2.securitygroups.AssociateSecurityGroupSpaceResponse; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.GetSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupRunningDefaultsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupSpacesRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupStagingDefaultsRequest; +import org.cloudfoundry.client.v2.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupRunningDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupSpaceRequest; +import org.cloudfoundry.client.v2.securitygroups.RemoveSecurityGroupStagingDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.RuleEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupEntity; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupRunningDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupRunningDefaultResponse; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupStagingDefaultRequest; +import org.cloudfoundry.client.v2.securitygroups.SetSecurityGroupStagingDefaultResponse; +import org.cloudfoundry.client.v2.securitygroups.UpdateSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class SecurityGroupsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void associateSpace() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (securityGroupId, spaceId) -> + this.cloudFoundryClient + .securityGroups() + .associateSpace( + AssociateSecurityGroupSpaceRequest.builder() + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build()))) + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName) + .as(StepVerifier::create) + .expectNext(securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + this.cloudFoundryClient + .securityGroups() + .create( + CreateSecurityGroupRequest.builder() + .name(securityGroupName) + .rule( + RuleEntity.builder() + .destination("0.0.0.0/0") + .log(false) + .ports("2048-3000") + .protocol(TCP) + .build()) + .build()) + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName) + .as(StepVerifier::create) + .expectNext(securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName) + .flatMap( + securityGroupId -> + this.cloudFoundryClient + .securityGroups() + .delete( + DeleteSecurityGroupRequest.builder() + .securityGroupId(securityGroupId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany(requestListSecurityGroups(this.cloudFoundryClient, securityGroupName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteSpace() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .delayUntil( + function( + (securityGroupId, spaceId) -> + associateSpace( + this.cloudFoundryClient, spaceId, securityGroupId))) + .delayUntil( + function( + (securityGroupId, spaceId) -> + this.cloudFoundryClient + .securityGroups() + .removeSpace( + RemoveSecurityGroupSpaceRequest.builder() + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build()))) + .flatMapMany( + function( + (securityGroupId, spaceId) -> + requestListSecurityGroupSpaces( + this.cloudFoundryClient, spaceId, securityGroupId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName) + .flatMap( + securityGroupId -> + this.cloudFoundryClient + .securityGroups() + .get( + GetSecurityGroupRequest.builder() + .securityGroupId(securityGroupId) + .build()) + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName)) + .as(StepVerifier::create) + .expectNext(securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + requestCreateSecurityGroup(this.cloudFoundryClient, securityGroupName) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .securityGroups() + .list( + ListSecurityGroupsRequest.builder() + .name(securityGroupName) + .page(page) + .build())) + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName)) + .as(StepVerifier::create) + .expectNext(securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRunningDefaults() { + String securityGroupName1 = this.nameFactory.getSecurityGroupName(); + String securityGroupName2 = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName1) + .flatMap( + securityGroupId -> + requestSetRunningDefault(this.cloudFoundryClient, securityGroupId)) + .then( + createSecurityGroupId(this.cloudFoundryClient, securityGroupName2) + .flatMap( + securityGroupId -> + requestSetRunningDefault( + this.cloudFoundryClient, securityGroupId))) + .thenMany(requestListRunningDefaults(this.cloudFoundryClient)) + .filter( + response -> + securityGroupName1.equals(response.getEntity().getName()) + || securityGroupName2.equals( + response.getEntity().getName())) + .as(StepVerifier::create) + .expectNextCount(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpaces() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .delayUntil( + function( + (securityGroupId, spaceId) -> + associateSpace( + this.cloudFoundryClient, spaceId, securityGroupId))) + .flatMapMany( + function( + (securityGroupId, spaceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .securityGroups() + .listSpaces( + ListSecurityGroupSpacesRequest + .builder() + .page(page) + .securityGroupId( + securityGroupId) + .spaceId(spaceId) + .build())))) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listStagingDefaults() { + String securityGroupName1 = this.nameFactory.getSecurityGroupName(); + String securityGroupName2 = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName1) + .flatMap( + securityGroupId -> + requestSetStagingDefault(this.cloudFoundryClient, securityGroupId)) + .then( + createSecurityGroupId(this.cloudFoundryClient, securityGroupName2) + .flatMap( + securityGroupId -> + requestSetStagingDefault( + this.cloudFoundryClient, securityGroupId))) + .thenMany(requestListStagingDefaults(this.cloudFoundryClient)) + .filter( + response -> + securityGroupName1.equals(response.getEntity().getName()) + || securityGroupName2.equals( + response.getEntity().getName())) + .as(StepVerifier::create) + .expectNextCount(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setRunningDefault() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName) + .flatMap( + securityGroupId -> + this.cloudFoundryClient + .securityGroups() + .setRunningDefault( + SetSecurityGroupRunningDefaultRequest.builder() + .securityGroupId(securityGroupId) + .build())) + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName) + .as(StepVerifier::create) + .expectNext(securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setStagingDefault() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName) + .flatMap( + securityGroupId -> + this.cloudFoundryClient + .securityGroups() + .setStagingDefault( + SetSecurityGroupStagingDefaultRequest.builder() + .securityGroupId(securityGroupId) + .build())) + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName) + .as(StepVerifier::create) + .expectNext(securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unsetRunningDefault() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName) + .flatMap( + securityGroupId -> + requestSetRunningDefault(this.cloudFoundryClient, securityGroupId) + .then( + this.cloudFoundryClient + .securityGroups() + .removeRunningDefault( + RemoveSecurityGroupRunningDefaultRequest + .builder() + .securityGroupId( + securityGroupId) + .build()))) + .thenMany(requestListRunningDefaults(this.cloudFoundryClient)) + .filter(response -> securityGroupName.equals(response.getEntity().getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unsetStagingDefault() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, securityGroupName) + .flatMap( + securityGroupId -> + requestSetStagingDefault(this.cloudFoundryClient, securityGroupId) + .then( + this.cloudFoundryClient + .securityGroups() + .removeStagingDefault( + RemoveSecurityGroupStagingDefaultRequest + .builder() + .securityGroupId( + securityGroupId) + .build()))) + .thenMany(requestListRunningDefaults(this.cloudFoundryClient)) + .filter(response -> securityGroupName.equals(response.getEntity().getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String oldSecurityGroupName = this.nameFactory.getSecurityGroupName(); + String newSecurityGroupName = this.nameFactory.getSecurityGroupName(); + + createSecurityGroupId(this.cloudFoundryClient, oldSecurityGroupName) + .flatMap( + securityGroupId -> + this.cloudFoundryClient + .securityGroups() + .update( + UpdateSecurityGroupRequest.builder() + .securityGroupId(securityGroupId) + .name(newSecurityGroupName) + .build())) + .then( + requestListSecurityGroups(this.cloudFoundryClient, newSecurityGroupName) + .single() + .map(ResourceUtils::getEntity) + .map(SecurityGroupEntity::getName)) + .as(StepVerifier::create) + .expectNext(newSecurityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono associateSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String securityGroupId) { + return cloudFoundryClient + .securityGroups() + .associateSpace( + AssociateSecurityGroupSpaceRequest.builder() + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build()); + } + + private static Mono createSecurityGroupId( + CloudFoundryClient cloudFoundryClient, String securityGroupName) { + return requestCreateSecurityGroup(cloudFoundryClient, securityGroupName) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .build()) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateSecurityGroup( + CloudFoundryClient cloudFoundryClient, String securityGroupName) { + return cloudFoundryClient + .securityGroups() + .create(CreateSecurityGroupRequest.builder().name(securityGroupName).build()); + } + + private static Flux requestListRunningDefaults( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .securityGroups() + .listRunningDefaults( + ListSecurityGroupRunningDefaultsRequest.builder().build())); + } + + private static Flux requestListSecurityGroupSpaces( + CloudFoundryClient cloudFoundryClient, String spaceId, String securityGroupId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .securityGroups() + .listSpaces( + ListSecurityGroupSpacesRequest.builder() + .page(page) + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSecurityGroups( + CloudFoundryClient cloudFoundryClient, String securityGroupName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .securityGroups() + .list( + ListSecurityGroupsRequest.builder() + .name(securityGroupName) + .page(page) + .build())); + } + + private static Flux requestListStagingDefaults( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .securityGroups() + .listStagingDefaults( + ListSecurityGroupStagingDefaultsRequest.builder().build())); + } + + private static Mono requestSetRunningDefault( + CloudFoundryClient cloudFoundryClient, String securityGroupId) { + return cloudFoundryClient + .securityGroups() + .setRunningDefault( + SetSecurityGroupRunningDefaultRequest.builder() + .securityGroupId(securityGroupId) + .build()); + } + + private static Mono requestSetStagingDefault( + CloudFoundryClient cloudFoundryClient, String securityGroupId) { + return cloudFoundryClient + .securityGroups() + .setStagingDefault( + SetSecurityGroupStagingDefaultRequest.builder() + .securityGroupId(securityGroupId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceBindingsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceBindingsTest.java new file mode 100644 index 00000000000..668976376d4 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceBindingsTest.java @@ -0,0 +1,388 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Optional; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.servicebindings.AbstractServiceBindingResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.DeleteServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.GetServiceBindingResponse; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple2; +import reactor.util.function.Tuple3; + +public final class ServiceBindingsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono spaceId; + + @Test + public void create() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstanceAndApplicationIds( + this.spaceId, this.cloudFoundryClient, serviceInstanceName, applicationName) + .flatMap( + function( + (serviceInstanceId, applicationId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + requestCreateServiceBinding( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .as(StepVerifier::create) + .consumeNextWith(serviceBindingEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstanceAndApplicationIds( + this.spaceId, this.cloudFoundryClient, serviceInstanceName, applicationName) + .flatMap( + function( + (serviceInstanceId, applicationId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .delayUntil( + function( + (serviceInstanceId, applicationId, serviceBindingId) -> + deleteServiceBinding( + this.cloudFoundryClient, serviceBindingId))) + .flatMap( + function( + (serviceInstanceId, applicationId, serviceBindingId) -> + requestGetServiceBinding( + this.cloudFoundryClient, serviceBindingId))) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-ServiceBindingNotFound\\([0-9]+\\): The service" + + " binding could not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstanceAndApplicationIds( + this.spaceId, this.cloudFoundryClient, serviceInstanceName, applicationName) + .flatMap( + function( + (serviceInstanceId, applicationId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .flatMap( + function( + (serviceInstanceId, applicationId, serviceBindingId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + requestGetServiceBinding( + this.cloudFoundryClient, + serviceBindingId)))) + .as(StepVerifier::create) + .consumeNextWith(serviceBindingEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstanceAndApplicationIds( + this.spaceId, this.cloudFoundryClient, serviceInstanceName, applicationName) + .flatMap( + function( + (serviceInstanceId, applicationId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .flatMap( + function( + (serviceInstanceId, applicationId, serviceBindingId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + requestListServiceBindings( + this.cloudFoundryClient, null, null) + .filter( + resource -> + serviceBindingId.equals( + ResourceUtils.getId( + resource))) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(serviceBindingEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstanceAndApplicationIds( + this.spaceId, this.cloudFoundryClient, serviceInstanceName, applicationName) + .flatMap( + function( + (serviceInstanceId, applicationId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .flatMap( + function( + (serviceInstanceId, applicationId, serviceBindingId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + requestListServiceBindings( + this.cloudFoundryClient, + applicationId, + null) + .filter( + resource -> + serviceBindingId.equals( + ResourceUtils.getId( + resource))) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(serviceBindingEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceInstanceId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstanceAndApplicationIds( + this.spaceId, this.cloudFoundryClient, serviceInstanceName, applicationName) + .flatMap( + function( + (serviceInstanceId, applicationId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId)))) + .flatMap( + function( + (serviceInstanceId, applicationId, serviceBindingId) -> + Mono.zip( + Mono.just(serviceInstanceId), + Mono.just(applicationId), + requestListServiceBindings( + this.cloudFoundryClient, + null, + serviceInstanceId) + .filter( + resource -> + serviceBindingId.equals( + ResourceUtils.getId( + resource))) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(serviceBindingEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication( + cloudFoundryClient, spaceId, applicationName, null, null, null, null) + .map(ResourceUtils::getId); + } + + private static Mono createServiceBindingId( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return requestCreateServiceBinding(cloudFoundryClient, applicationId, serviceInstanceId) + .map(ResourceUtils::getId); + } + + private static Mono> createServiceInstanceAndApplicationIds( + Mono spaceId, + CloudFoundryClient cloudFoundryClient, + String serviceInstance, + String application) { + return spaceId.flatMap( + spaceId1 -> + Mono.zip( + createUserServiceInstanceId( + cloudFoundryClient, spaceId1, serviceInstance), + createApplicationId(cloudFoundryClient, spaceId1, application))); + } + + private static Mono createUserServiceInstanceId( + CloudFoundryClient cloudFoundryClient, String spaceId, String serviceInstanceName) { + return requestCreateUserServiceInstance(cloudFoundryClient, spaceId, serviceInstanceName) + .map(ResourceUtils::getId); + } + + private static Mono deleteServiceBinding( + CloudFoundryClient cloudFoundryClient, String serviceBindingId) { + return requestDeleteServiceBinding(cloudFoundryClient, serviceBindingId) + .flatMap( + job -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), job)); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String buildpack, + Boolean diego, + Integer diskQuota, + Integer memory) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack(buildpack) + .diego(diego) + .diskQuota(diskQuota) + .memory(memory) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateUserServiceInstance( + CloudFoundryClient cloudFoundryClient, String spaceId, String name) { + return cloudFoundryClient + .userProvidedServiceInstances() + .create( + CreateUserProvidedServiceInstanceRequest.builder() + .name(name) + .spaceId(spaceId) + .build()); + } + + private static Mono requestDeleteServiceBinding( + CloudFoundryClient cloudFoundryClient, String serviceBindingId) { + return cloudFoundryClient + .serviceBindingsV2() + .delete( + DeleteServiceBindingRequest.builder() + .serviceBindingId(serviceBindingId) + .build()); + } + + private static Mono requestGetServiceBinding( + CloudFoundryClient cloudFoundryClient, String serviceBindingId) { + return cloudFoundryClient + .serviceBindingsV2() + .get(GetServiceBindingRequest.builder().serviceBindingId(serviceBindingId).build()); + } + + private static Flux requestListServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + ListServiceBindingsRequest.Builder builder = ListServiceBindingsRequest.builder(); + + Optional.ofNullable(applicationId).map(builder::applicationId); + Optional.ofNullable(serviceInstanceId).map(builder::serviceInstanceId); + + return PaginationUtils.requestClientV2Resources( + page -> cloudFoundryClient.serviceBindingsV2().list(builder.page(page).build())); + } + + private static + Consumer> serviceBindingEquality() { + return consumer( + (serviceInstanceId, applicationId, resource) -> { + assertThat(ResourceUtils.getEntity(resource).getServiceInstanceId()) + .isEqualTo(serviceInstanceId); + assertThat(ResourceUtils.getEntity(resource).getApplicationId()) + .isEqualTo(applicationId); + }); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceBrokersTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceBrokersTest.java new file mode 100644 index 00000000000..214577e4a90 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceBrokersTest.java @@ -0,0 +1,279 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ApplicationUtils; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.GetServiceBrokerRequest; +import org.cloudfoundry.client.v2.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v2.servicebrokers.UpdateServiceBrokerRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@CleanupCloudFoundryAfterClass +public final class ServiceBrokersTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceBrokerName; + + @Test + public void create() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + Path application; + try { + application = new ClassPathResource("test-service-broker.jar").getFile().toPath(); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + ApplicationUtils.ApplicationMetadata applicationMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + ServiceBrokerUtils.pushServiceBrokerApplication( + this.cloudFoundryClient, + application, + this.nameFactory, + planName, + serviceName, + spaceId)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokers() + .create( + CreateServiceBrokerRequest.builder() + .authenticationPassword("test-authentication-password") + .authenticationUsername("test-authentication-username") + .brokerUrl(applicationMetadata.uri) + .name(serviceBrokerName) + .spaceId(applicationMetadata.spaceId) + .build()) + .flatMapMany( + response -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker(this.cloudFoundryClient, applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokers() + .delete( + DeleteServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerMetadata.serviceBrokerId) + .build()) + .flatMapMany( + response -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + this.cloudFoundryClient + .serviceBrokers() + .get( + GetServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerId) + .build())) + .as(StepVerifier::create) + .assertNext( + serviceBroker -> + assertThat(ResourceUtils.getEntity(serviceBroker).getName()) + .isEqualTo(this.serviceBrokerName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(this.serviceBrokerName) + .page(page) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName1 = this.nameFactory.getServiceBrokerName(); + String serviceBrokerName2 = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName1, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokers() + .update( + UpdateServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerMetadata.serviceBrokerId) + .name(serviceBrokerName2) + .build()) + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceBrokers() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName2) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceInstancesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceInstancesTest.java new file mode 100644 index 00000000000..ed152f87a39 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceInstancesTest.java @@ -0,0 +1,1557 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.jobs.JobEntity; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.serviceinstances.BindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.serviceinstances.BindServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v2.serviceinstances.UnbindServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.serviceinstances.UpdateServiceInstanceRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.LastOperationUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuples; + +public final class ServiceInstancesTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private RoutingClient routingClient; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Test + public void bindRoute() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, serviceInstanceId, spaceId) -> + Mono.zip( + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + null, + spaceId), + Mono.just(serviceInstanceId)))) + .flatMap( + function( + (routeId, serviceInstanceId) -> + this.cloudFoundryClient + .serviceInstances() + .bindRoute( + BindServiceInstanceRouteRequest.builder() + .routeId(routeId) + .serviceInstanceId( + serviceInstanceId) + .build()) + .thenReturn(serviceInstanceId))) + .flatMapMany( + serviceInstanceId -> + requestListRoutes(this.cloudFoundryClient, serviceInstanceId) + .filter( + route -> + serviceInstanceId.equals( + route.getEntity() + .getServiceInstanceId()))) + .map(route -> ResourceUtils.getEntity(route).getHost()) + .as(StepVerifier::create) + .expectNext(hostName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + Mono.zip( + getPlanId( + this.cloudFoundryClient, + serviceBrokerId, + this.serviceName), + Mono.just(spaceId)))) + .flatMap( + function( + (planId, spaceId) -> + this.cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .servicePlanId(planId) + .spaceId(spaceId) + .build()))) + .thenMany(requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createAcceptsIncomplete() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + Mono.zip( + getPlanId( + this.cloudFoundryClient, + serviceBrokerId, + this.serviceName), + Mono.just(spaceId)))) + .flatMap( + function( + (planId, spaceId) -> + this.cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .name(serviceInstanceName) + .servicePlanId(planId) + .spaceId(spaceId) + .build()))) + .as(StepVerifier::create) + .assertNext( + response -> + assertThat( + ResourceUtils.getEntity(response) + .getLastOperation() + .getType()) + .isEqualTo("create")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .async(true) + .serviceInstanceId(serviceInstanceId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + (JobEntity) ResourceUtils.getEntity(job))) + .thenMany(requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAcceptsIncomplete() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .async(true) + .serviceInstanceId(serviceInstanceId) + .build())) + .flatMap( + response -> + LastOperationUtils.waitForCompletion( + Duration.ofMinutes(5), + () -> + this.cloudFoundryClient + .serviceInstances() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId( + ResourceUtils.getId( + response)) + .build()) + .map( + r2 -> + ResourceUtils.getEntity(r2) + .getLastOperation()))) + .thenMany(requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAcceptsIncompleteAsyncFalse() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .acceptsIncomplete(true) + .async(false) + .serviceInstanceId(serviceInstanceId) + .build())) + .flatMap( + response -> + LastOperationUtils.waitForCompletion( + Duration.ofMinutes(5), + () -> + this.cloudFoundryClient + .serviceInstances() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId( + ResourceUtils.getId( + response)) + .build()) + .map( + r2 -> + ResourceUtils.getEntity(r2) + .getLastOperation()))) + .thenMany(requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .async(false) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenMany(requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deletePurge() { + String domainName = this.nameFactory.getDomainName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (organizationId, serviceInstanceId, spaceId) -> + createAndBindRoute( + this.cloudFoundryClient, + domainName, + organizationId, + spaceId, + serviceInstanceId) + .thenReturn(serviceInstanceId))) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .async(true) + .purge(true) + .recursive(false) + .serviceInstanceId(serviceInstanceId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + (JobEntity) ResourceUtils.getEntity(job))) + .thenMany( + requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName) + .filter( + resource -> + serviceInstanceName.equals( + resource.getEntity().getName()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteRecursive() { + String domainName = this.nameFactory.getDomainName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (organizationId, serviceInstanceId, spaceId) -> + createAndBindRoute( + this.cloudFoundryClient, + domainName, + organizationId, + spaceId, + serviceInstanceId) + .thenReturn(serviceInstanceId))) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .delete( + DeleteServiceInstanceRequest.builder() + .async(true) + .purge(false) + .recursive(true) + .serviceInstanceId(serviceInstanceId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + (JobEntity) ResourceUtils.getEntity(job))) + .thenMany( + requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName) + .filter( + resource -> + serviceInstanceName.equals( + resource.getEntity().getName()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .map(response -> response.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getNotFound() { + this.cloudFoundryClient + .serviceInstances() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId("test-service-instance-id") + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-ServiceInstanceNotFound\\([0-9]+\\): The" + + " service instance could not be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest.builder() + .page(page) + .build()))) + .filter( + resource -> + serviceInstanceName.equals( + ResourceUtils.getEntity(resource).getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest.builder() + .name(serviceInstanceName) + .page(page) + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId) + .thenReturn(organizationId))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter( + resource -> + serviceInstanceName.equals( + ResourceUtils.getEntity(resource).getName())) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceBindingId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .flatMap( + function( + (applicationId, serviceInstanceId) -> + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId))) + .flatMapMany( + serviceBindingId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest + .builder() + .serviceBindingId( + serviceBindingId) + .page(page) + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceKeyId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + createServiceKeyId( + this.cloudFoundryClient, serviceInstanceId, serviceKeyName)) + .flatMapMany( + serviceKeyId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest + .builder() + .serviceKeyId(serviceKeyId) + .page(page) + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServicePlanId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + Mono.zip( + getPlanId( + this.cloudFoundryClient, + serviceBrokerId, + this.serviceName), + Mono.just(spaceId)))) + .flatMap( + function( + (planId, spaceId) -> + requestCreateServiceInstance( + this.cloudFoundryClient, + planId, + serviceInstanceName, + spaceId) + .thenReturn(planId))) + .flatMapMany( + planId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest + .builder() + .page(page) + .servicePlanId(planId) + .build()))) + .filter( + resource -> + serviceInstanceName.equals( + ResourceUtils.getEntity(resource).getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpaceId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .delayUntil( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest + .builder() + .page(page) + .spaceId(spaceId) + .build()))) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .filter(serviceInstanceName::equals) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutes() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, serviceInstanceId, spaceId) -> + Mono.zip( + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + null, + spaceId), + Mono.just(serviceInstanceId)))) + .flatMap( + function( + (routeId, serviceInstanceId) -> + requestBindServiceInstanceRoute( + this.cloudFoundryClient, + routeId, + serviceInstanceId) + .thenReturn(serviceInstanceId))) + .flatMapMany( + serviceInstanceId -> + Mono.zip( + Mono.just(serviceInstanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .listRoutes( + ListServiceInstanceRoutesRequest + .builder() + .page(page) + .serviceInstanceId( + serviceInstanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity(resource) + .getServiceInstanceId()) + .single())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByDomainId() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, serviceInstanceId, spaceId) -> + Mono.zip( + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + null, + spaceId), + Mono.just(serviceInstanceId)))) + .flatMap( + function( + (domainId, routeId, serviceInstanceId) -> + requestBindServiceInstanceRoute( + this.cloudFoundryClient, + routeId, + serviceInstanceId) + .thenReturn( + Tuples.of(domainId, serviceInstanceId)))) + .flatMapMany( + function( + (domainId, serviceInstanceId) -> + Mono.zip( + Mono.just(serviceInstanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .listRoutes( + ListServiceInstanceRoutesRequest + .builder() + .domainId( + domainId) + .page( + page) + .serviceInstanceId( + serviceInstanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity( + resource) + .getServiceInstanceId()) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByHost() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, serviceInstanceId, spaceId) -> + Mono.zip( + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + null, + spaceId), + Mono.just(serviceInstanceId)))) + .flatMap( + function( + (routeId, serviceInstanceId) -> + requestBindServiceInstanceRoute( + this.cloudFoundryClient, + routeId, + serviceInstanceId) + .thenReturn(serviceInstanceId))) + .flatMapMany( + serviceInstanceId -> + Mono.zip( + Mono.just(serviceInstanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .listRoutes( + ListServiceInstanceRoutesRequest + .builder() + .host( + hostName) + .page(page) + .serviceInstanceId( + serviceInstanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity(resource) + .getServiceInstanceId()) + .single())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByPath() { + String domainName = this.nameFactory.getDomainName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String path = this.nameFactory.getPath(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, serviceInstanceId, spaceId) -> + Mono.zip( + createRouteId( + this.cloudFoundryClient, + domainId, + null, + path, + spaceId), + Mono.just(serviceInstanceId)))) + .flatMap( + function( + (routeId, serviceInstanceId) -> + requestBindServiceInstanceRoute( + this.cloudFoundryClient, + routeId, + serviceInstanceId) + .thenReturn(serviceInstanceId))) + .flatMapMany( + serviceInstanceId -> + Mono.zip( + Mono.just(serviceInstanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .listRoutes( + ListServiceInstanceRoutesRequest + .builder() + .page(page) + .path(path) + .serviceInstanceId( + serviceInstanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity(resource) + .getServiceInstanceId()) + .single())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceBindings() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .delayUntil( + function( + (applicationId, serviceInstanceId) -> + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId))) + .flatMapMany( + function( + (applicationId, serviceInstanceId) -> + Mono.zip( + Mono.just(applicationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .listServiceBindings( + ListServiceInstanceServiceBindingsRequest + .builder() + .serviceInstanceId( + serviceInstanceId) + .page( + page) + .build())) + .single() + .map( + resource -> + resource.getEntity() + .getApplicationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceBindingsFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .delayUntil( + function( + (applicationId, serviceInstanceId) -> + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId))) + .flatMapMany( + function( + (applicationId, serviceInstanceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceInstances() + .listServiceBindings( + ListServiceInstanceServiceBindingsRequest + .builder() + .applicationId( + applicationId) + .serviceInstanceId( + serviceInstanceId) + .page(page) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unbindRoute() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (domainId, serviceInstanceId, spaceId) -> + Mono.zip( + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + null, + spaceId), + Mono.just(serviceInstanceId)))) + .flatMap( + function( + (routeId, serviceInstanceId) -> + requestBindServiceInstanceRoute( + this.cloudFoundryClient, + routeId, + serviceInstanceId) + .then( + this.cloudFoundryClient + .serviceInstances() + .unbindRoute( + UnbindServiceInstanceRouteRequest + .builder() + .routeId(routeId) + .serviceInstanceId( + serviceInstanceId) + .build())) + .thenReturn(serviceInstanceId))) + .flatMapMany( + serviceInstanceId -> + requestListRoutes(this.cloudFoundryClient, serviceInstanceId) + .filter( + route -> + serviceInstanceId.equals( + route.getEntity() + .getServiceInstanceId()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String oldServiceInstanceName = this.nameFactory.getServiceInstanceName(); + String newServiceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + oldServiceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .update( + UpdateServiceInstanceRequest.builder() + .name(newServiceInstanceName) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenMany( + requestListServiceInstances( + this.cloudFoundryClient, newServiceInstanceName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateEmptyCollections() { + String oldServiceInstanceName = this.nameFactory.getServiceInstanceName(); + String newServiceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + oldServiceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .update( + UpdateServiceInstanceRequest.builder() + .name(newServiceInstanceName) + .parameters(Collections.emptyMap()) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenMany( + requestListServiceInstances( + this.cloudFoundryClient, newServiceInstanceName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void upgrade() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstances() + .update( + UpdateServiceInstanceRequest.builder() + .maintenanceInfo( + MaintenanceInfo.builder() + .description("test-update") + .version("9.9") + .build()) + .serviceInstanceId(serviceInstanceId) + .build())) + .thenMany(requestListServiceInstances(this.cloudFoundryClient, serviceInstanceName)) + .map( + resource -> + ResourceUtils.getEntity(resource).getMaintenanceInfo().getVersion()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-MaintenanceInfoNotSupported\\([0-9]+\\): The" + + " service broker does not support upgrades" + + " for service instances created from this" + + " plan.")) + .verify(Duration.ofMinutes(5)); + } + + private static Mono createAndBindRoute( + CloudFoundryClient cloudFoundryClient, + String domainName, + String organizationId, + String spaceId, + String serviceInstanceId) { + return createPrivateDomainId(cloudFoundryClient, domainName, organizationId) + .flatMap( + domainId -> + createRouteId(cloudFoundryClient, domainId, null, null, spaceId)) + .flatMap( + routeId -> + requestBindServiceInstanceRoute( + cloudFoundryClient, routeId, serviceInstanceId)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return requestCreatePrivateDomain(cloudFoundryClient, name, organizationId) + .map(ResourceUtils::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, + String domainId, + String hostName, + String path, + String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, hostName, path, spaceId) + .map(ResourceUtils::getId); + } + + private static Mono createServiceBindingId( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return requestCreateServiceBinding(cloudFoundryClient, applicationId, serviceInstanceId) + .map(ResourceUtils::getId); + } + + private static Mono createServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + Mono serviceBrokerId, + String serviceInstanceName, + String serviceName, + String spaceId) { + return serviceBrokerId + .flatMap(s -> getPlanId(cloudFoundryClient, s, serviceName)) + .flatMap( + planId -> + requestCreateServiceInstance( + cloudFoundryClient, planId, serviceInstanceName, spaceId)) + .map(ResourceUtils::getId); + } + + private static Mono createServiceKeyId( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return requestCreateServiceKey(cloudFoundryClient, serviceInstanceId, serviceKeyName) + .map(ResourceUtils::getId); + } + + private static Mono getPlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return requestListServices(cloudFoundryClient, serviceBrokerId, serviceName) + .filter( + resource -> + serviceName.equals(ResourceUtils.getEntity(resource).getLabel())) + .single() + .map(ResourceUtils::getId) + .flatMapMany(serviceId -> requestListServicePlans(cloudFoundryClient, serviceId)) + .single() + .map(ResourceUtils::getId); + } + + private static Mono requestBindServiceInstanceRoute( + CloudFoundryClient cloudFoundryClient, String routeId, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstances() + .bindRoute( + BindServiceInstanceRouteRequest.builder() + .routeId(routeId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return cloudFoundryClient + .privateDomains() + .create( + CreatePrivateDomainRequest.builder() + .name(name) + .owningOrganizationId(organizationId) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String hostName, + String path, + String spaceId) { + return cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(hostName) + .path(path) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String planId, + String serviceInstanceName, + String spaceId) { + return cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .parameter("test-key", "test-value") + .servicePlanId(planId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return cloudFoundryClient + .serviceKeys() + .create( + CreateServiceKeyRequest.builder() + .name(serviceKeyName) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Flux requestListRoutes( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .listRoutes( + ListServiceInstanceRoutesRequest.builder() + .page(page) + .serviceInstanceId(serviceInstanceId) + .build())); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest.builder() + .name(serviceInstanceName) + .page(page) + .build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceKeysTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceKeysTest.java new file mode 100644 index 00000000000..58067e0d31f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceKeysTest.java @@ -0,0 +1,377 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.DeleteServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.GetServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.GetServiceKeyResponse; +import org.cloudfoundry.client.v2.servicekeys.ListServiceKeysRequest; +import org.cloudfoundry.client.v2.servicekeys.ServiceKeyResource; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class ServiceKeysTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @SuppressWarnings("unchecked") + @Test + public void create() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceKeys() + .create( + CreateServiceKeyRequest.builder() + .parameter("test-key", "test-value") + .name(serviceKeyName) + .serviceInstanceId(serviceInstanceId) + .build()) + .map(ResourceUtils::getId)) + .flatMap( + serviceKeyId -> requestGetServiceKey(this.cloudFoundryClient, serviceKeyId)) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .flatMap( + serviceInstanceId -> + createServiceKeyId( + this.cloudFoundryClient, serviceInstanceId, serviceKeyName)) + .flatMap( + serviceKeyId -> + this.cloudFoundryClient + .serviceKeys() + .delete( + DeleteServiceKeyRequest.builder() + .serviceKeyId(serviceKeyId) + .build())) + .thenMany(requestListServiceKeys(this.cloudFoundryClient)) + .filter( + response -> + serviceKeyName.equals(ResourceUtils.getEntity(response).getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .flatMap( + serviceInstanceId -> + createServiceKeyId( + this.cloudFoundryClient, serviceInstanceId, serviceKeyName)) + .flatMap( + serviceKeyId -> + this.cloudFoundryClient + .serviceKeys() + .get( + GetServiceKeyRequest.builder() + .serviceKeyId(serviceKeyId) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .flatMap( + serviceInstanceId -> + createServiceKeyId( + this.cloudFoundryClient, serviceInstanceId, serviceKeyName)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceKeys() + .list( + ListServiceKeysRequest.builder() + .page(page) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName())) + .filter(serviceKeyName::equals) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .flatMap( + serviceInstanceId -> + createServiceKeyId( + this.cloudFoundryClient, serviceInstanceId, serviceKeyName)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceKeys() + .list( + ListServiceKeysRequest.builder() + .name(serviceKeyName) + .page(page) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName())) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceInstanceId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId))) + .delayUntil( + serviceInstanceId -> + createServiceKeyId( + this.cloudFoundryClient, serviceInstanceId, serviceKeyName)) + .flatMapMany( + serviceInstanceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .serviceKeys() + .list( + ListServiceKeysRequest + .builder() + .page(page) + .serviceInstanceId( + serviceInstanceId) + .build())) + .map( + response -> + ResourceUtils.getEntity(response) + .getName())) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + String serviceBrokerId, + String serviceInstanceName, + String serviceName, + String spaceId) { + return getPlanId(cloudFoundryClient, serviceBrokerId, serviceName) + .flatMap( + planId -> + requestCreateServiceInstance( + cloudFoundryClient, planId, serviceInstanceName, spaceId)) + .map(ResourceUtils::getId); + } + + private static Mono createServiceKeyId( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return requestCreateServiceKey(cloudFoundryClient, serviceInstanceId, serviceKeyName) + .map(ResourceUtils::getId); + } + + private static Mono getPlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return requestListServices(cloudFoundryClient, serviceBrokerId, serviceName) + .single() + .map(ResourceUtils::getId) + .flatMapMany(serviceId -> requestListServicePlans(cloudFoundryClient, serviceId)) + .single() + .map(ResourceUtils::getId); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String planId, + String serviceInstanceName, + String spaceId) { + return cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .servicePlanId(planId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return cloudFoundryClient + .serviceKeys() + .create( + CreateServiceKeyRequest.builder() + .name(serviceKeyName) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestGetServiceKey( + CloudFoundryClient cloudFoundryClient, String serviceKeyId) { + return cloudFoundryClient + .serviceKeys() + .get(GetServiceKeyRequest.builder().serviceKeyId(serviceKeyId).build()); + } + + private static Flux requestListServiceKeys( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceKeys() + .list(ListServiceKeysRequest.builder().page(page).build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .page(page) + .label(serviceName) + .serviceBrokerId(serviceBrokerId) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java new file mode 100644 index 00000000000..910294d42ac --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlanVisibilitiesTest.java @@ -0,0 +1,713 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBrokerNonPublic; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.CreateServicePlanVisibilityResponse; +import org.cloudfoundry.client.v2.serviceplanvisibilities.DeleteServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.GetServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ListServicePlanVisibilitiesRequest; +import org.cloudfoundry.client.v2.serviceplanvisibilities.ServicePlanVisibilityResource; +import org.cloudfoundry.client.v2.serviceplanvisibilities.UpdateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuples; + +public final class ServicePlanVisibilitiesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void create() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .delayUntil( + function( + (organizationId, servicePlanId) -> + this.cloudFoundryClient + .servicePlanVisibilities() + .create( + CreateServicePlanVisibilityRequest.builder() + .organizationId(organizationId) + .servicePlanId(servicePlanId) + .build()))) + .flatMapMany( + function( + (organizationId, servicePlanId) -> + requestListServicePlanVisibilities( + this.cloudFoundryClient, servicePlanId) + .single() + .flatMap( + response -> + Mono.just( + Tuples.of( + ResourceUtils + .getEntity( + response) + .getOrganizationId(), + organizationId))))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + Mono.just(servicePlanId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMap( + function( + (servicePlanId, servicePlanIdVisibilityId) -> + this.cloudFoundryClient + .servicePlanVisibilities() + .delete( + DeleteServicePlanVisibilityRequest.builder() + .async(true) + .servicePlanVisibilityId( + servicePlanIdVisibilityId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .thenReturn(servicePlanId))) + .flatMapMany( + servicePlanId -> + requestListServicePlanVisibilities( + this.cloudFoundryClient, servicePlanId)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + Mono.just(servicePlanId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMap( + function( + (servicePlanId, servicePlanIdVisibilityId) -> + this.cloudFoundryClient + .servicePlanVisibilities() + .delete( + DeleteServicePlanVisibilityRequest.builder() + .async(false) + .servicePlanVisibilityId( + servicePlanIdVisibilityId) + .build()) + .thenReturn(servicePlanId))) + .flatMapMany( + servicePlanId -> + requestListServicePlanVisibilities( + this.cloudFoundryClient, servicePlanId)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + Mono.just(organizationId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMap( + function( + (organizationId, servicePlanVisibilityId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .servicePlanVisibilities() + .get( + GetServicePlanVisibilityRequest + .builder() + .servicePlanVisibilityId( + servicePlanVisibilityId) + .build()) + .map( + response -> + ResourceUtils.getEntity( + response) + .getOrganizationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + Mono.just(organizationId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMapMany( + function( + (organizationId, servicePlanVisibilityId) -> + Mono.zip( + Mono.just(organizationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest + .builder() + .page( + page) + .build())) + .filter( + response -> + servicePlanVisibilityId + .equals( + ResourceUtils + .getId( + response))) + .single() + .map( + response -> + ResourceUtils.getEntity( + response) + .getOrganizationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + Mono.just(organizationId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMapMany( + function( + (organizationId, servicePlanVisibilityId) -> + Mono.zip( + Mono.just(organizationId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest + .builder() + .organizationId( + organizationId) + .page( + page) + .build())) + .filter( + response -> + servicePlanVisibilityId + .equals( + ResourceUtils + .getId( + response))) + .single() + .map( + response -> + ResourceUtils.getEntity( + response) + .getOrganizationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServicePlanId() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + Mono.just(servicePlanId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMapMany( + function( + (servicePlanId, servicePlanVisibilityId) -> + Mono.zip( + Mono.just(servicePlanId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest + .builder() + .servicePlanId( + servicePlanId) + .page( + page) + .build())) + .single() + .map( + response -> + ResourceUtils.getEntity( + response) + .getServicePlanId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String organizationName = this.nameFactory.getOrganizationName(); + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBrokerNonPublic( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + Mono.zip( + this.organizationId, + getServicePlanId( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .flatMap( + function( + (organizationId, servicePlanId) -> + Mono.zip( + createOrganizationId( + this.cloudFoundryClient, organizationName), + Mono.just(servicePlanId), + createServicePlanVisibilityId( + this.cloudFoundryClient, + organizationId, + servicePlanId)))) + .flatMap( + function( + (newOrganizationId, servicePlanId, servicePlanIdVisibilityId) -> + this.cloudFoundryClient + .servicePlanVisibilities() + .update( + UpdateServicePlanVisibilityRequest.builder() + .organizationId(newOrganizationId) + .servicePlanId(servicePlanId) + .servicePlanVisibilityId( + servicePlanIdVisibilityId) + .build()) + .thenReturn( + Tuples.of( + newOrganizationId, servicePlanId)))) + .flatMapMany( + function( + (newOrganizationId, servicePlanId) -> + Mono.zip( + Mono.just(newOrganizationId), + requestListServicePlanVisibilities( + this.cloudFoundryClient, + servicePlanId) + .single() + .map( + response -> + ResourceUtils.getEntity( + response) + .getOrganizationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(ResourceUtils::getId); + } + + private static Mono createServicePlanVisibilityId( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + return requestCreateServicePlanVisibility(cloudFoundryClient, organizationId, servicePlanId) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono getServicePlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return requestListServicePlans(cloudFoundryClient, serviceBrokerId) + .filter( + resource -> + "test-plan-description" + .equals(ResourceUtils.getEntity(resource).getDescription())) + .map(ResourceUtils::getId) + .single(); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizations() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Mono requestCreateServicePlanVisibility( + CloudFoundryClient cloudFoundryClient, String organizationId, String servicePlanId) { + return cloudFoundryClient + .servicePlanVisibilities() + .create( + CreateServicePlanVisibilityRequest.builder() + .organizationId(organizationId) + .servicePlanId(servicePlanId) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } + + private static Flux requestListServicePlanVisibilities( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlanVisibilities() + .list( + ListServicePlanVisibilitiesRequest.builder() + .servicePlanId(servicePlanId) + .build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlansTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlansTest.java new file mode 100644 index 00000000000..c8f4db7e148 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicePlansTest.java @@ -0,0 +1,750 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceinstances.ServiceInstanceResource; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlanServiceInstancesRequest; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class ServicePlansTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private String planName; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlans() + .delete( + DeleteServicePlanRequest.builder() + .async(true) + .servicePlanId(servicePlanId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + ResourceUtils.getEntity(job))) + .thenMany( + requestListServicePlans( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(response -> serviceName.equals(ResourceUtils.getEntity(response).getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlans() + .delete( + DeleteServicePlanRequest.builder() + .async(false) + .servicePlanId(servicePlanId) + .build())) + .thenMany( + requestListServicePlans( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(response -> serviceName.equals(ResourceUtils.getEntity(response).getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + getServicePlanId(this.cloudFoundryClient, serviceBrokerId)) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlans() + .get( + GetServicePlanRequest.builder() + .servicePlanId(servicePlanId) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .list(ListServicePlansRequest.builder().page(page).build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .filter(name -> this.planName.equals(name)) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByActive() { + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .active(true) + .page(page) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .filter(name -> this.planName.equals(name)) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceBrokerId() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceBrokerId( + serviceBrokerId) + .build()))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .filter(planName -> this.planName.equals(planName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceId() { + this.serviceBrokerId + .flatMap(serviceBrokerId -> getServiceId(this.cloudFoundryClient, this.serviceName)) + .flatMapMany( + serviceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build()))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceInstanceId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServicePlanId(this.cloudFoundryClient, serviceBrokerId), + this.spaceId)) + .flatMap( + function( + (servicePlanId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + servicePlanId, + spaceId))) + .flatMapMany( + serviceInstanceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceInstanceId( + serviceInstanceId) + .build()))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstances() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServicePlanId(this.cloudFoundryClient, serviceBrokerId), + this.spaceId)) + .flatMap( + function( + (servicePlanId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + servicePlanId, + spaceId) + .thenReturn(servicePlanId))) + .flatMapMany( + servicePlanId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .listServiceInstances( + ListServicePlanServiceInstancesRequest + .builder() + .page(page) + .servicePlanId( + servicePlanId) + .build()))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .filter(serviceInstanceName::equals) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByName() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServicePlanId(this.cloudFoundryClient, serviceBrokerId), + this.spaceId)) + .flatMap( + function( + (servicePlanId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + servicePlanId, + spaceId) + .thenReturn(servicePlanId))) + .flatMapMany( + servicePlanId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .listServiceInstances( + ListServicePlanServiceInstancesRequest + .builder() + .page(page) + .name(serviceInstanceName) + .servicePlanId( + servicePlanId) + .build()))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByServiceBindingId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServicePlanId(this.cloudFoundryClient, serviceBrokerId), + this.spaceId)) + .flatMap( + function( + (servicePlanId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName), + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + servicePlanId, + spaceId), + Mono.just(servicePlanId)))) + .flatMap( + function( + (applicationId, serviceInstanceId, servicePlanId) -> + Mono.zip( + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId), + Mono.just(servicePlanId)))) + .flatMapMany( + function( + (serviceBindingId, servicePlanId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .listServiceInstances( + ListServicePlanServiceInstancesRequest + .builder() + .page(page) + .serviceBindingId( + serviceBindingId) + .servicePlanId( + servicePlanId) + .build())))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByServiceKeyId() { + String serviceKeyName = this.nameFactory.getServiceKeyName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServicePlanId(this.cloudFoundryClient, serviceBrokerId), + this.spaceId)) + .flatMap( + function( + (servicePlanId, spaceId) -> + Mono.zip( + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + servicePlanId, + spaceId), + Mono.just(servicePlanId)))) + .flatMap( + function( + (serviceInstanceId, servicePlanId) -> + Mono.zip( + createServiceKeyId( + this.cloudFoundryClient, + serviceInstanceId, + serviceKeyName), + Mono.just(servicePlanId)))) + .flatMapMany( + function( + (serviceKeyId, servicePlanId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .listServiceInstances( + ListServicePlanServiceInstancesRequest + .builder() + .page(page) + .serviceKeyId( + serviceKeyId) + .servicePlanId( + servicePlanId) + .build())))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterBySpaceId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServicePlanId(this.cloudFoundryClient, serviceBrokerId), + this.spaceId)) + .delayUntil( + function( + (servicePlanId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + servicePlanId, + spaceId))) + .flatMapMany( + function( + (servicePlanId, spaceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .servicePlans() + .listServiceInstances( + ListServicePlanServiceInstancesRequest + .builder() + .page(page) + .spaceId(spaceId) + .servicePlanId( + servicePlanId) + .build())))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .filter(serviceInstanceName::equals) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlans() + .update( + UpdateServicePlanRequest.builder() + .publiclyVisible(false) + .servicePlanId(servicePlanId) + .build())) + .thenMany( + requestListServicePlans( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(response -> planName.equals(ResourceUtils.getEntity(response).getName())) + .map(response -> ResourceUtils.getEntity(response).getPubliclyVisible()) + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createServiceBindingId( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return requestCreateServiceBinding(cloudFoundryClient, applicationId, serviceInstanceId) + .map(ResourceUtils::getId); + } + + private static Mono createServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceName, + String servicePlanId, + String spaceId) { + return requestCreateServiceInstance( + cloudFoundryClient, serviceInstanceName, servicePlanId, spaceId) + .then( + requestListServiceInstances(cloudFoundryClient, serviceInstanceName) + .single() + .map(ResourceUtils::getId)); + } + + private static Mono createServiceKeyId( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return requestCreateServiceKey(cloudFoundryClient, serviceInstanceId, serviceKeyName) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono getServiceId( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return requestListServices(cloudFoundryClient, serviceName) + .single() + .map(ResourceUtils::getId); + } + + private static Mono getServicePlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return requestListServicePlans(cloudFoundryClient, serviceBrokerId) + .filter( + resource -> + "test-plan-description" + .equals(ResourceUtils.getEntity(resource).getDescription())) + .map(ResourceUtils::getId) + .single(); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack("https://github.com/cloudfoundry/java-buildpack.git") + .memory(64) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceName, + String servicePlanId, + String spaceId) { + return cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .servicePlanId(servicePlanId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return cloudFoundryClient + .serviceKeys() + .create( + CreateServiceKeyRequest.builder() + .name(serviceKeyName) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceInstances() + .list( + ListServiceInstancesRequest.builder() + .name(serviceInstanceName) + .build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .page(page) + .label(serviceName) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceUsageEventsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceUsageEventsTest.java new file mode 100644 index 00000000000..987de74b28b --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServiceUsageEventsTest.java @@ -0,0 +1,340 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.NameFactory; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.serviceusageevents.GetServiceUsageEventRequest; +import org.cloudfoundry.client.v2.serviceusageevents.ListServiceUsageEventsRequest; +import org.cloudfoundry.client.v2.serviceusageevents.PurgeAndReseedServiceUsageEventsRequest; +import org.cloudfoundry.client.v2.serviceusageevents.ServiceUsageEventResource; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class ServiceUsageEventsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Test + public void get() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + seedEvents( + this.cloudFoundryClient, + this.nameFactory, + serviceBrokerId, + this.serviceName, + spaceId))) + .then(getFirstEvent(this.cloudFoundryClient)) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource).map(ResourceUtils::getId), + this.cloudFoundryClient + .serviceUsageEvents() + .get( + GetServiceUsageEventRequest.builder() + .serviceUsageEventId( + ResourceUtils.getId( + resource)) + .build()) + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + seedEvents( + this.cloudFoundryClient, + this.nameFactory, + serviceBrokerId, + this.serviceName, + spaceId))) + .then(getFirstEvent(this.cloudFoundryClient)) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .serviceUsageEvents() + .list( + ListServiceUsageEventsRequest.builder() + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAfterServiceUsageEventId() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + seedEvents( + this.cloudFoundryClient, + this.nameFactory, + serviceBrokerId, + this.serviceName, + spaceId))) + .then(getFirstEvent(this.cloudFoundryClient)) + .flatMap( + resource -> + Mono.zip( + getSecondEvent(this.cloudFoundryClient), + this.cloudFoundryClient + .serviceUsageEvents() + .list( + ListServiceUsageEventsRequest.builder() + .afterServiceUsageEventId( + ResourceUtils.getId( + resource)) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceId() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + seedEvents( + this.cloudFoundryClient, + this.nameFactory, + serviceBrokerId, + this.serviceName, + spaceId))) + .then(getFirstEventWithServiceId(this.cloudFoundryClient)) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .serviceUsageEvents() + .list( + ListServiceUsageEventsRequest.builder() + .serviceId( + ResourceUtils.getEntity( + resource) + .getServiceId()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceInstanceType() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + seedEvents( + this.cloudFoundryClient, + this.nameFactory, + serviceBrokerId, + this.serviceName, + spaceId))) + .then(getFirstEvent(this.cloudFoundryClient)) + .flatMap( + resource -> + Mono.zip( + Mono.just(resource), + this.cloudFoundryClient + .serviceUsageEvents() + .list( + ListServiceUsageEventsRequest.builder() + .serviceInstanceType( + ResourceUtils.getEntity( + resource) + .getServiceInstanceType()) + .build()) + .flatMapMany(ResourceUtils::getResources) + .next())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listNoneFound() { + this.cloudFoundryClient + .serviceUsageEvents() + .list(ListServiceUsageEventsRequest.builder().serviceId("test-service-id").build()) + .flatMapMany(ResourceUtils::getResources) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void purgeAndReseed() { + this.cloudFoundryClient + .serviceUsageEvents() + .purgeAndReseed(PurgeAndReseedServiceUsageEventsRequest.builder().build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getFirstEvent( + CloudFoundryClient cloudFoundryClient) { + return listServiceUsageEvents(cloudFoundryClient).next(); + } + + private static Mono getFirstEventWithServiceId( + CloudFoundryClient cloudFoundryClient) { + return listServiceUsageEvents(cloudFoundryClient) + .filter(resource -> ResourceUtils.getEntity(resource).getServiceId() != null) + .next(); + } + + private static Mono getPlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return requestListServices(cloudFoundryClient, serviceBrokerId, serviceName) + .single() + .map(ResourceUtils::getId) + .flatMapMany(serviceId -> requestListServicePlans(cloudFoundryClient, serviceId)) + .single() + .map(ResourceUtils::getId); + } + + private static Mono getSecondEvent( + CloudFoundryClient cloudFoundryClient) { + return listServiceUsageEvents(cloudFoundryClient).skip(1).next(); + } + + private static Flux listServiceUsageEvents( + CloudFoundryClient cloudFoundryClient) { + return cloudFoundryClient + .serviceUsageEvents() + .list(ListServiceUsageEventsRequest.builder().build()) + .flatMapMany(ResourceUtils::getResources); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String planId, + String serviceInstanceName, + String spaceId) { + return cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .parameter("test-key", "test-value") + .servicePlanId(planId) + .spaceId(spaceId) + .build()); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .label(serviceName) + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } + + private static Mono seedEvents( + CloudFoundryClient cloudFoundryClient, + NameFactory nameFactory, + String serviceBrokerId, + String serviceName, + String spaceId) { + String serviceInstanceName1 = nameFactory.getServiceInstanceName(); + String serviceInstanceName2 = nameFactory.getServiceInstanceName(); + + return getPlanId(cloudFoundryClient, serviceBrokerId, serviceName) + .flatMap( + planId -> + requestCreateServiceInstance( + cloudFoundryClient, + planId, + serviceInstanceName1, + spaceId) + .then( + requestCreateServiceInstance( + cloudFoundryClient, + planId, + serviceInstanceName2, + spaceId))) + .then(); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicesTest.java new file mode 100644 index 00000000000..9af396d3159 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/ServicesTest.java @@ -0,0 +1,610 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v2.serviceplans.DeleteServicePlanResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.services.DeleteServiceRequest; +import org.cloudfoundry.client.v2.services.GetServiceRequest; +import org.cloudfoundry.client.v2.services.ListServiceServicePlansRequest; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class ServicesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private String planName; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServiceId(this.cloudFoundryClient, serviceName) + .flatMapMany( + serviceId -> + deleteServicePlans( + this.cloudFoundryClient, + serviceBrokerMetadata.serviceBrokerId, + serviceId) + .thenMany(Mono.just(serviceId))) + .flatMap( + serviceId -> + this.cloudFoundryClient + .services() + .delete( + DeleteServiceRequest.builder() + .async(true) + .serviceId(serviceId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .thenMany( + requestListServices( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter( + resource -> + serviceName.equals(ResourceUtils.getEntity(resource).getLabel())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServiceId(this.cloudFoundryClient, serviceName) + .flatMapMany( + serviceId -> + deleteServicePlans( + this.cloudFoundryClient, + serviceBrokerMetadata.serviceBrokerId, + serviceId) + .thenMany(Mono.just(serviceId))) + .flatMap( + serviceId -> + this.cloudFoundryClient + .services() + .delete( + DeleteServiceRequest.builder() + .async(false) + .serviceId(serviceId) + .build()) + .thenReturn(serviceBrokerMetadata.serviceBrokerId)) + .thenMany( + requestListServices( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter( + resource -> + serviceName.equals(ResourceUtils.getEntity(resource).getLabel())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(1)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void deletePurge() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServiceId(this.cloudFoundryClient, serviceName) + .flatMap( + serviceId -> + this.cloudFoundryClient + .services() + .delete( + DeleteServiceRequest.builder() + .async(true) + .purge(true) + .serviceId(serviceId) + .build())) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .thenMany( + requestListServices( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter( + resource -> + serviceName.equals(ResourceUtils.getEntity(resource).getLabel())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(1)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.serviceBrokerId + .flatMap(serviceBrokerId -> getServiceId(this.cloudFoundryClient, this.serviceName)) + .flatMap( + serviceId -> + this.cloudFoundryClient + .services() + .get( + GetServiceRequest.builder() + .serviceId(serviceId) + .build())) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .list( + ListServicesRequest + .builder() + .page(page) + .build())) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity(resource) + .getServiceBrokerId()))) + .map(response -> response.getEntity().getLabel()) + .filter(label -> this.serviceName.equals(label)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByActive() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .list( + ListServicesRequest + .builder() + .active(true) + .page(page) + .build())) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity(resource) + .getServiceBrokerId()))) + .map(response -> response.getEntity().getLabel()) + .filter(label -> this.serviceName.equals(label)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByLabels() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .list( + ListServicesRequest + .builder() + .label( + this + .serviceName) + .page(page) + .build())) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity(resource) + .getServiceBrokerId()))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceBrokerIds() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .serviceBrokerId( + serviceBrokerId) + .page(page) + .build()))) + .map(response -> response.getEntity().getLabel()) + .filter(label -> this.serviceName.equals(label)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listNoneFound() { + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .label("unmatched-filter") + .page(page) + .build())) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicePlans() { + this.serviceBrokerId + .flatMap(serviceBrokerId -> getServiceId(this.cloudFoundryClient, this.serviceName)) + .flatMapMany( + serviceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .listServicePlans( + ListServiceServicePlansRequest + .builder() + .serviceId(serviceId) + .page(page) + .build()))) + .map(response -> response.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicePlansFilterByActive() { + this.serviceBrokerId + .flatMap(serviceBrokerId -> getServiceId(this.cloudFoundryClient, this.serviceName)) + .flatMapMany( + serviceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .listServicePlans( + ListServiceServicePlansRequest + .builder() + .active(true) + .serviceId(serviceId) + .page(page) + .build()))) + .map(response -> response.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicePlansFilterByServiceInstanceIds() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + Mono.zip( + getServiceId(this.cloudFoundryClient, this.serviceName), + this.spaceId)) + .flatMap( + function( + (serviceId, spaceId) -> + Mono.zip( + Mono.just(serviceId), + createServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + serviceId, + spaceId)))) + .flatMapMany( + function( + (serviceId, serviceInstanceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .listServicePlans( + ListServiceServicePlansRequest + .builder() + .serviceId( + serviceId) + .serviceInstanceId( + serviceInstanceId) + .page(page) + .build())))) + .map(response -> response.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicePlansNoneFound() { + this.serviceBrokerId + .flatMap(serviceBrokerId -> getServiceId(this.cloudFoundryClient, this.serviceName)) + .flatMapMany( + serviceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .services() + .listServicePlans( + ListServiceServicePlansRequest + .builder() + .serviceId(serviceId) + .serviceInstanceId( + "unmatched-filter") + .page(page) + .build()))) + .map(response -> response.getEntity().getName()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Flux deleteServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceId) { + return listServicePlanIds(cloudFoundryClient, serviceBrokerId, serviceId) + .flatMap( + servicePlanId -> + requestDeleteServicePlan(cloudFoundryClient, servicePlanId)); + } + + private static Mono getServiceId( + CloudFoundryClient cloudFoundryClient, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list(ListServicesRequest.builder().page(page).build())) + .filter( + resource -> + serviceName.equals(ResourceUtils.getEntity(resource).getLabel())) + .single() + .map(ResourceUtils::getId); + } + + private static Flux listServicePlanIds( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .serviceId(serviceId) + .build())) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String name, + String servicePlanId, + String spaceId) { + return cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(name) + .servicePlanId(servicePlanId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } + + private static Mono requestDeleteServicePlan( + CloudFoundryClient cloudFoundryClient, String servicePlanId) { + return cloudFoundryClient + .servicePlans() + .delete(DeleteServicePlanRequest.builder().servicePlanId(servicePlanId).build()); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .listServicePlans( + ListServiceServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .serviceBrokerId(serviceBrokerId) + .page(page) + .build())); + } + + private Mono createServiceInstanceId( + CloudFoundryClient cloudFoundryClient, String name, String serviceId, String spaceId) { + return requestListServicePlans(cloudFoundryClient, serviceId) + .single() + .map(ResourceUtils::getId) + .flatMap( + servicePlanId -> + requestCreateServiceInstance( + cloudFoundryClient, name, servicePlanId, spaceId) + .map(ResourceUtils::getId)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/SharedDomainsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/SharedDomainsTest.java new file mode 100644 index 00000000000..063992a6574 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/SharedDomainsTest.java @@ -0,0 +1,195 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import java.time.Duration; +import java.util.Optional; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.DeleteSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.GetSharedDomainResponse; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainEntity; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class SharedDomainsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void create() { + String domainName = this.nameFactory.getDomainName(); + + this.cloudFoundryClient + .sharedDomains() + .create(CreateSharedDomainRequest.builder().name(domainName).build()) + .map(ResourceUtils::getId) + .flatMap( + sharedDomainId -> + getSharedDomainResource(this.cloudFoundryClient, sharedDomainId)) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(domainName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String domainName = this.nameFactory.getDomainName(); + + getSharedDomainId(this.cloudFoundryClient, domainName) + .flatMap( + sharedDomainId -> + this.cloudFoundryClient + .sharedDomains() + .delete( + DeleteSharedDomainRequest.builder() + .async(false) + .sharedDomainId(sharedDomainId) + .build())) + .then(requestListSharedDomains(this.cloudFoundryClient, domainName).singleOrEmpty()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncTrue() { + String domainName = this.nameFactory.getDomainName(); + + getSharedDomainId(this.cloudFoundryClient, domainName) + .flatMap( + sharedDomainId -> + this.cloudFoundryClient + .sharedDomains() + .delete( + DeleteSharedDomainRequest.builder() + .async(true) + .sharedDomainId(sharedDomainId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .then(requestListSharedDomains(this.cloudFoundryClient, domainName).singleOrEmpty()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String domainName = this.nameFactory.getDomainName(); + + getSharedDomainId(this.cloudFoundryClient, domainName) + .flatMap( + sharedDomainId -> + this.cloudFoundryClient + .sharedDomains() + .get( + GetSharedDomainRequest.builder() + .sharedDomainId(sharedDomainId) + .build())) + .map(ResourceUtils::getEntity) + .map(SharedDomainEntity::getName) + .as(StepVerifier::create) + .expectNext(domainName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String domainName = this.nameFactory.getDomainName(); + + getSharedDomainId(this.cloudFoundryClient, domainName) + .flatMap( + sharedDomainId -> + requestListSharedDomains(this.cloudFoundryClient, null) + .filter( + resource -> + sharedDomainId.equals( + ResourceUtils.getId(resource))) + .single()) + .map(resource -> ResourceUtils.getEntity(resource).getName()) + .as(StepVerifier::create) + .expectNext(domainName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String domainName = this.nameFactory.getDomainName(); + + getSharedDomainId(this.cloudFoundryClient, domainName) + .flatMap( + sharedDomainId -> + Mono.zip( + Mono.just(sharedDomainId), + requestListSharedDomains( + this.cloudFoundryClient, domainName) + .single() + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getSharedDomainId( + CloudFoundryClient cloudFoundryClient, String domainName) { + return requestCreateSharedDomain(cloudFoundryClient, domainName).map(ResourceUtils::getId); + } + + private static Mono getSharedDomainResource( + CloudFoundryClient cloudFoundryClient, String sharedDomainId) { + return cloudFoundryClient + .sharedDomains() + .get(GetSharedDomainRequest.builder().sharedDomainId(sharedDomainId).build()); + } + + private static Mono requestCreateSharedDomain( + CloudFoundryClient cloudFoundryClient, String sharedDomainName) { + return cloudFoundryClient + .sharedDomains() + .create(CreateSharedDomainRequest.builder().name(sharedDomainName).build()); + } + + private static Flux requestListSharedDomains( + CloudFoundryClient cloudFoundryClient, String sharedDomainName) { + ListSharedDomainsRequest.Builder requestBuilder = ListSharedDomainsRequest.builder(); + Optional.ofNullable(sharedDomainName).ifPresent(requestBuilder::name); + + return PaginationUtils.requestClientV2Resources( + page -> cloudFoundryClient.sharedDomains().list(requestBuilder.page(page).build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/SpaceQuotaDefinitionsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/SpaceQuotaDefinitionsTest.java new file mode 100644 index 00000000000..47c9ae0f5f3 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/SpaceQuotaDefinitionsTest.java @@ -0,0 +1,594 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.AssociateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.AssociateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.CreateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.CreateSpaceQuotaDefinitionResponse; +import org.cloudfoundry.client.v2.spacequotadefinitions.DeleteSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.GetSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionSpacesRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.ListSpaceQuotaDefinitionsRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.RemoveSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionEntity; +import org.cloudfoundry.client.v2.spacequotadefinitions.SpaceQuotaDefinitionResource; +import org.cloudfoundry.client.v2.spacequotadefinitions.UpdateSpaceQuotaDefinitionRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.SpaceEntity; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuples; + +public final class SpaceQuotaDefinitionsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void associateSpace() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, + organizationId, + quotaName))) + .flatMap( + function( + (spaceId, quotaId) -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .associateSpace( + AssociateSpaceQuotaDefinitionRequest + .builder() + .spaceId(spaceId) + .spaceQuotaDefinitionId(quotaId) + .build()))) + .map(ResourceUtils::getEntity) + .map(SpaceQuotaDefinitionEntity::getName) + .as(StepVerifier::create) + .expectNext(quotaName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + this.organizationId + .flatMap( + organizationId -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .create( + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(512) + .name(quotaName) + .nonBasicServicesAllowed(false) + .organizationId(organizationId) + .totalRoutes(1) + .totalServices(1) + .build())) + .map(ResourceUtils::getEntity) + .map(SpaceQuotaDefinitionEntity::getName) + .as(StepVerifier::create) + .expectNext(quotaName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, organizationId, quotaName)) + .flatMap( + quotaId -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .delete( + DeleteSpaceQuotaDefinitionRequest.builder() + .async(true) + .spaceQuotaDefinitionId(quotaId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, organizationId, quotaName)) + .flatMap( + quotaId -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .get( + GetSpaceQuotaDefinitionRequest.builder() + .spaceQuotaDefinitionId(quotaId) + .build())) + .map(ResourceUtils::getEntity) + .map(SpaceQuotaDefinitionEntity::getName) + .as(StepVerifier::create) + .expectNext(quotaName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, organizationId, quotaName)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .list( + ListSpaceQuotaDefinitionsRequest + .builder() + .page(page) + .build())) + .map(ResourceUtils::getEntity)) + .filter(quota -> quotaName.equals(quota.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpaces() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, + organizationId, + quotaName))) + .flatMap( + function( + (spaceId, quotaId) -> + requestAssociateSpace( + this.cloudFoundryClient, quotaId, spaceId) + .thenReturn(quotaId))) + .flatMapMany( + quotaId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest + .builder() + .page(page) + .spaceQuotaDefinitionId( + quotaId) + .build()))) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, organizationId, quotaName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (quotaId, spaceId) -> + Mono.zip( + requestAssociateSpace( + this.cloudFoundryClient, + quotaId, + spaceId) + .thenReturn(quotaId), + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName)))) + .flatMapMany( + function( + (quotaId, applicationId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .spaceQuotaDefinitionId( + quotaId) + .build())))) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // TODO: Await https://github.com/cloudfoundry/cf-java-client/issues/643 + @Disabled("Await https://github.com/cloudfoundry/cf-java-client/issues/643") + @Test + public void listSpacesFilterByDeveloperId() {} + + @Test + public void listSpacesFilterByName() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, + organizationId, + quotaName))) + .flatMap( + function( + (spaceId, quotaId) -> + requestAssociateSpace( + this.cloudFoundryClient, quotaId, spaceId) + .thenReturn(quotaId))) + .flatMapMany( + quotaId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest + .builder() + .name(spaceName) + .page(page) + .spaceQuotaDefinitionId( + quotaId) + .build()))) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByOrganizationId() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, + organizationId, + quotaName))) + .flatMap( + function( + (organizationId, spaceId, quotaId) -> + requestAssociateSpace( + this.cloudFoundryClient, quotaId, spaceId) + .thenReturn(Tuples.of(organizationId, quotaId)))) + .flatMapMany( + function( + (organizationId, quotaId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest + .builder() + .organizationId( + organizationId) + .page(page) + .spaceQuotaDefinitionId( + quotaId) + .build())))) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesNotFound() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, organizationId, quotaName)) + .flatMapMany( + quotaId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest + .builder() + .spaceQuotaDefinitionId( + quotaId) + .build()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesQueryBySpaceId() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, + organizationId, + quotaName))) + .flatMap( + function( + (spaceId, quotaId) -> + requestAssociateSpace( + this.cloudFoundryClient, quotaId, spaceId) + .thenReturn(quotaId))) + .flatMapMany( + quotaId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .listSpaces( + ListSpaceQuotaDefinitionSpacesRequest + .builder() + .page(page) + .spaceQuotaDefinitionId( + quotaId) + .build()))) + .map(ResourceUtils::getEntity) + .map(SpaceEntity::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeSpace() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, + organizationId, + quotaName))) + .flatMap( + function( + (spaceId, quotaId) -> + requestAssociateSpace( + this.cloudFoundryClient, quotaId, spaceId) + .then( + this.cloudFoundryClient + .spaceQuotaDefinitions() + .removeSpace( + RemoveSpaceQuotaDefinitionRequest + .builder() + .spaceId(spaceId) + .spaceQuotaDefinitionId( + quotaId) + .build())) + .then())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String quotaName1 = this.nameFactory.getQuotaDefinitionName(); + String quotaName2 = this.nameFactory.getQuotaDefinitionName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceQuotaDefinitionId( + this.cloudFoundryClient, organizationId, quotaName1)) + .flatMap( + quotaId -> + this.cloudFoundryClient + .spaceQuotaDefinitions() + .update( + UpdateSpaceQuotaDefinitionRequest.builder() + .name(quotaName2) + .spaceQuotaDefinitionId(quotaId) + .build())) + .thenMany(requestList(this.cloudFoundryClient).map(ResourceUtils::getEntity)) + .filter(quota -> quotaName2.equals(quota.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .build()) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceQuotaDefinitionId( + CloudFoundryClient cloudFoundryClient, String organizationId, String quotaName) { + return requestCreateSpaceQuotaDefinition(cloudFoundryClient, organizationId, quotaName) + .map(ResourceUtils::getId); + } + + private static Mono requestAssociateSpace( + CloudFoundryClient cloudFoundryClient, String quotaId, String spaceId) { + return cloudFoundryClient + .spaceQuotaDefinitions() + .associateSpace( + AssociateSpaceQuotaDefinitionRequest.builder() + .spaceId(spaceId) + .spaceQuotaDefinitionId(quotaId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack("staticfile_buildpack") + .diego(true) + .diskQuota(512) + .memory(64) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateSpaceQuotaDefinition( + CloudFoundryClient cloudFoundryClient, String organizationId, String quotaName) { + return cloudFoundryClient + .spaceQuotaDefinitions() + .create( + CreateSpaceQuotaDefinitionRequest.builder() + .memoryLimit(512) + .name(quotaName) + .nonBasicServicesAllowed(false) + .organizationId(organizationId) + .totalRoutes(1) + .totalServices(1) + .build()); + } + + private static Flux requestList( + CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaceQuotaDefinitions() + .list( + ListSpaceQuotaDefinitionsRequest.builder() + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java new file mode 100644 index 00000000000..4193ec53d6e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/SpacesTest.java @@ -0,0 +1,2866 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static java.time.temporal.ChronoUnit.MINUTES; +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.time.Instant; +import java.util.Collections; +import java.util.Date; +import java.util.function.Function; +import java.util.function.UnaryOperator; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.ApplicationResource; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.domains.DomainResource; +import org.cloudfoundry.client.v2.events.EventResource; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationUserRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.routes.RouteResource; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v2.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v2.securitygroups.SecurityGroupResource; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingResponse; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v2.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v2.serviceinstances.UnionServiceInstanceResource; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyRequest; +import org.cloudfoundry.client.v2.servicekeys.CreateServiceKeyResponse; +import org.cloudfoundry.client.v2.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v2.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v2.services.ListServicesRequest; +import org.cloudfoundry.client.v2.services.ServiceResource; +import org.cloudfoundry.client.v2.shareddomains.CreateSharedDomainRequest; +import org.cloudfoundry.client.v2.shareddomains.ListSharedDomainsRequest; +import org.cloudfoundry.client.v2.shareddomains.SharedDomainResource; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceAuditorResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceDeveloperResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceManagerResponse; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.AssociateSpaceSecurityGroupResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryRequest; +import org.cloudfoundry.client.v2.spaces.GetSpaceSummaryResponse; +import org.cloudfoundry.client.v2.spaces.ListSpaceApplicationsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceAuditorsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDevelopersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceDomainsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceEventsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceManagersRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceRoutesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceSecurityGroupsRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServiceInstancesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceServicesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpaceUserRolesRequest; +import org.cloudfoundry.client.v2.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceAuditorRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceDeveloperRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerByUsernameRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceManagerRequest; +import org.cloudfoundry.client.v2.spaces.RemoveSpaceSecurityGroupRequest; +import org.cloudfoundry.client.v2.spaces.SpaceResource; +import org.cloudfoundry.client.v2.spaces.UpdateSpaceRequest; +import org.cloudfoundry.client.v2.users.CreateUserRequest; +import org.cloudfoundry.client.v2.users.UserEntity; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.uaa.UaaClient; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.util.DateUtils; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple2; + +public final class SpacesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Autowired private Mono stackId; + + @Autowired private UaaClient uaaClient; + + @Test + public void associateAuditor() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .flatMap( + function( + (spaceId, userId) -> + Mono.zip( + Mono.just(spaceId), + this.cloudFoundryClient + .spaces() + .associateAuditor( + AssociateSpaceAuditorRequest + .builder() + .spaceId(spaceId) + .auditorId(userId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateAuditorByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .associateAuditorByUsername( + AssociateSpaceAuditorByUsernameRequest + .builder() + .spaceId(spaceId) + .username(userName) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceAuditors(this.cloudFoundryClient, spaceId) + .map(ResourceUtils::getEntity) + .map(UserEntity::getUsername))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateDeveloper() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .flatMap( + function( + (spaceId, userId) -> + Mono.zip( + Mono.just(spaceId), + this.cloudFoundryClient + .spaces() + .associateDeveloper( + AssociateSpaceDeveloperRequest + .builder() + .spaceId(spaceId) + .developerId(userId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateDeveloperByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .associateDeveloperByUsername( + AssociateSpaceDeveloperByUsernameRequest + .builder() + .spaceId(spaceId) + .username(userName) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceDevelopers(this.cloudFoundryClient, spaceId) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateManager() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .flatMap( + function( + (spaceId, userId) -> + Mono.zip( + Mono.just(spaceId), + this.cloudFoundryClient + .spaces() + .associateManager( + AssociateSpaceManagerRequest + .builder() + .spaceId(spaceId) + .managerId(userId) + .build()) + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateManagerByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .associateManagerByUsername( + AssociateSpaceManagerByUsernameRequest + .builder() + .spaceId(spaceId) + .username(userName) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers(this.cloudFoundryClient, spaceId) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateSecurityGroup() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (securityGroupId, spaceId) -> + this.cloudFoundryClient + .spaces() + .associateSecurityGroup( + AssociateSpaceSecurityGroupRequest.builder() + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build()) + .thenReturn(spaceId))) + .flatMapMany(spaceId -> requestListSecurityGroups(this.cloudFoundryClient, spaceId)) + .filter(response -> securityGroupName.equals(response.getEntity().getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + this.cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil( + spaceId -> + this.cloudFoundryClient + .spaces() + .delete( + DeleteSpaceRequest.builder() + .spaceId(spaceId) + .async(true) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMapMany( + spaceId -> + requestListSpaces(this.cloudFoundryClient) + .map(ResourceUtils::getId) + .filter(spaceId::equals)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsyncFalse() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil( + spaceId -> + this.cloudFoundryClient + .spaces() + .delete( + DeleteSpaceRequest.builder() + .spaceId(spaceId) + .async(false) + .build())) + .flatMapMany( + spaceId -> + requestListSpaces(this.cloudFoundryClient) + .map(ResourceUtils::getId) + .filter(spaceId::equals)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + this.cloudFoundryClient + .spaces() + .get(GetSpaceRequest.builder().spaceId(spaceId).build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getSummary() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + this.cloudFoundryClient + .spaces() + .getSummary( + GetSpaceSummaryRequest.builder() + .spaceId(spaceId) + .build())) + .map(GetSpaceSummaryResponse::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationIdAndSpaceId(this.cloudFoundryClient, organizationName, spaceName) + .flatMap( + function( + (organizationId, spaceId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaces() + .list( + ListSpacesRequest + .builder() + .page(page) + .build())) + .filter( + response -> + organizationId.equals( + ResourceUtils.getEntity( + response) + .getOrganizationId())) + .single() + .map( + response -> + ResourceUtils.getEntity(response) + .getName()))) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplications() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + spaceId -> + requestListSpaceApplications(this.cloudFoundryClient, spaceId) + .single()) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByDiego() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil( + spaceId -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName)) + .flatMap( + spaceId -> + requestListSpaceApplications( + this.cloudFoundryClient, + spaceId, + builder -> builder.diego(true)) + .single()) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByName() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName))) + .flatMapMany( + function( + (spaceId, applicationId) -> + Mono.zip( + Mono.just(applicationId), + requestListSpaceApplications( + this.cloudFoundryClient, + spaceId, + builder -> + builder.name( + applicationName)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByOrganizationId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .delayUntil( + function( + (organizationId, spaceId) -> + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName))) + .flatMapMany( + function( + (organizationId, spaceId) -> + requestListSpaceApplications( + this.cloudFoundryClient, + spaceId, + builder -> builder.organizationId(organizationId)))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listApplicationsFilterByStackId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip(this.organizationId, this.stackId) + .flatMap( + function( + (organizationId, stackId) -> + Mono.zip( + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName), + Mono.just(stackId)))) + .delayUntil( + function( + (spaceId, stackId) -> + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName, + stackId))) + .flatMapMany( + function( + (spaceId, stackId) -> + requestListSpaceApplications( + this.cloudFoundryClient, + spaceId, + builder -> builder.stackId(stackId)))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditors() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .associateAuditor( + AssociateSpaceAuditorRequest.builder() + .spaceId(spaceId) + .auditorId(userId) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaces() + .listAuditors( + ListSpaceAuditorsRequest + .builder() + .page(page) + .spaceId(spaceId) + .build())))) + .map(response -> ResourceUtils.getEntity(response).getUsername()) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listDevelopers() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .associateDeveloper( + AssociateSpaceDeveloperRequest.builder() + .spaceId(spaceId) + .developerId(userId) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaces() + .listDevelopers( + ListSpaceDevelopersRequest + .builder() + .page(page) + .spaceId(spaceId) + .build())))) + .map(response -> ResourceUtils.getEntity(response).getUsername()) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + public void listDomains() { + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceIdWithDomain( + this.cloudFoundryClient, + organizationId, + spaceName, + domainName)) + .flatMapMany(spaceId -> requestListSpaceDomains(this.cloudFoundryClient, spaceId)) + .filter( + domainResource -> + domainName.equals( + ResourceUtils.getEntity(domainResource).getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + public void listDomainsFilterByName() { + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceIdWithDomain( + this.cloudFoundryClient, + organizationId, + spaceName, + domainName)) + .flatMapMany( + spaceId -> + requestListSpaceDomains( + this.cloudFoundryClient, + spaceId, + builder -> builder.name(domainName))) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(domainName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listEvents() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMapMany(spaceId -> requestListSpaceEvents(this.cloudFoundryClient, spaceId)) + .map(response -> ResourceUtils.getEntity(response).getType()) + .as(StepVerifier::create) + .expectNext("audit.space.create") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listEventsFilterByActee() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMapMany( + spaceId -> + requestListSpaceEvents( + this.cloudFoundryClient, + spaceId, + builder -> builder.actee(spaceId))) + .map(response -> ResourceUtils.getEntity(response).getType()) + .as(StepVerifier::create) + .expectNext("audit.space.create") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listEventsFilterByTimestamp() { + String spaceName = this.nameFactory.getSpaceName(); + String timestamp = getPastTimestamp(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMapMany( + spaceId -> + requestListSpaceEvents( + this.cloudFoundryClient, + spaceId, + builder -> builder.timestamp(timestamp))) + .map(response -> ResourceUtils.getEntity(response).getType()) + .as(StepVerifier::create) + .expectNext("audit.space.create") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listEventsFilterByType() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + requestListSpaceEvents( + this.cloudFoundryClient, + spaceId, + builder -> + builder.type("audit.space.create")) + .single() + .map( + response -> + ResourceUtils.getEntity(response) + .getSpaceId()))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, spaceId, applicationName))) + .flatMap( + function( + (spaceId, applicationId) -> + Mono.zip( + Mono.just(spaceId), + requestListSpaces( + this.cloudFoundryClient, + builder -> + builder.applicationId( + applicationId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByDeveloperId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, userId, spaceId))) + .flatMap( + function( + (spaceId, userId) -> + Mono.zip( + Mono.just(spaceId), + requestListSpaces( + this.cloudFoundryClient, + builder -> + builder.developerId(userId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + requestListSpaces( + this.cloudFoundryClient, + builder -> builder.name(spaceName)) + .single() + .map(ResourceUtils::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationIdAndSpaceId(this.cloudFoundryClient, organizationName, spaceName) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + Mono.just(spaceId), + requestListSpaces( + this.cloudFoundryClient, + builder -> + builder.organizationId( + organizationId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagers() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers(this.cloudFoundryClient, spaceId) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByAuditedOrganizationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationId, + userName), + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + Mono.just(organizationId))) + .delayUntil( + function( + (userId, spaceId, organizationId) -> + Mono.zip( + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId), + this.cloudFoundryClient + .organizations() + .associateAuditor( + AssociateOrganizationAuditorRequest + .builder() + .organizationId( + organizationId) + .auditorId(userId) + .build())))) + .flatMapMany( + function( + (userId, spaceId, organizationId) -> + requestListSpaceManagers( + this.cloudFoundryClient, + spaceId, + builder -> + builder.auditedOrganizationId( + organizationId)) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByAuditedSpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + Mono.zip( + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId), + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId)))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers( + this.cloudFoundryClient, + spaceId, + builder -> builder.auditedSpaceId(spaceId)) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByBillingManagedOrganizationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationId, + userName), + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + Mono.just(organizationId))) + .delayUntil( + function( + (userId, spaceId, organizationId) -> + Mono.zip( + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId), + this.cloudFoundryClient + .organizations() + .associateBillingManager( + AssociateOrganizationBillingManagerRequest + .builder() + .organizationId( + organizationId) + .billingManagerId(userId) + .build())))) + .flatMap( + function( + (userId, spaceId, organizationId) -> + Mono.zip( + Mono.just(userId), + requestListSpaceManagers( + this.cloudFoundryClient, + spaceId, + builder -> + builder + .billingManagedOrganizationId( + organizationId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByManagedOrganizationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationId, + userName), + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + Mono.just(organizationId))) + .delayUntil( + function( + (userId, spaceId, organizationId) -> + Mono.zip( + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId), + this.cloudFoundryClient + .organizations() + .associateManager( + AssociateOrganizationManagerRequest + .builder() + .organizationId( + organizationId) + .managerId(userId) + .build())))) + .flatMap( + function( + (userId, spaceId, organizationId) -> + Mono.zip( + Mono.just(userId), + requestListSpaceManagers( + this.cloudFoundryClient, + spaceId, + builder -> + builder + .managedOrganizationId( + organizationId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByManagedSpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers( + this.cloudFoundryClient, + spaceId, + builder -> builder.managedSpaceId(spaceId)) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagersFilterByOrganizationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationId, + userName), + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName), + Mono.just(organizationId))) + .delayUntil( + function( + (userId, spaceId, organizationId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMap( + function( + (userId, spaceId, organizationId) -> + Mono.zip( + Mono.just(userId), + requestListSpaceManagers( + this.cloudFoundryClient, + spaceId, + builder -> + builder.organizationId( + organizationId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutes() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceIdWithDomain( + this.cloudFoundryClient, + organizationId, + spaceName, + domainName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createRouteId( + this.cloudFoundryClient, + spaceId, + domainName, + hostName, + "/test-path"))) + .flatMapMany( + function( + (spaceId, routeId) -> + Mono.zip( + Mono.just(routeId), + requestListSpaceRoutes( + this.cloudFoundryClient, spaceId) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByDomainId() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceIdWithDomain( + this.cloudFoundryClient, + organizationId, + spaceName, + domainName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + getSharedDomainId(this.cloudFoundryClient, domainName), + createRouteId( + this.cloudFoundryClient, + spaceId, + domainName, + hostName, + "/test-path"))) + .flatMapMany( + function( + (spaceId, domainId, routeId) -> + Mono.zip( + Mono.just(routeId), + requestListSpaceRoutes( + this.cloudFoundryClient, + spaceId, + builder -> + builder.domainId(domainId)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByHost() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceIdWithDomain( + this.cloudFoundryClient, + organizationId, + spaceName, + domainName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createRouteId( + this.cloudFoundryClient, + spaceId, + domainName, + hostName, + "/test-path"))) + .flatMapMany( + function( + (spaceId, routeId) -> + Mono.zip( + Mono.just(routeId), + requestListSpaceRoutes( + this.cloudFoundryClient, + spaceId, + builder -> builder.host(hostName)) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByPath() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceIdWithDomain( + this.cloudFoundryClient, + organizationId, + spaceName, + domainName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createRouteId( + this.cloudFoundryClient, + spaceId, + domainName, + hostName, + "/test-path"))) + .flatMapMany( + function( + (spaceId, routeId) -> + Mono.zip( + Mono.just(routeId), + requestListSpaceRoutes( + this.cloudFoundryClient, + spaceId, + builder -> + builder.path("/test-path")) + .single() + .map(ResourceUtils::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSecurityGroups() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (securityGroupId, spaceId) -> + requestAssociateSpaceSecurityGroup( + this.cloudFoundryClient, + spaceId, + securityGroupId) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaces() + .listSecurityGroups( + ListSpaceSecurityGroupsRequest + .builder() + .page(page) + .spaceId(spaceId) + .build()))) + .filter(response -> securityGroupName.equals(response.getEntity().getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSecurityGroupsFilterByName() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (securityGroupId, spaceId) -> + requestAssociateSpaceSecurityGroup( + this.cloudFoundryClient, + spaceId, + securityGroupId) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaces() + .listSecurityGroups( + ListSpaceSecurityGroupsRequest + .builder() + .page(page) + .spaceId(spaceId) + .name(securityGroupName) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstances() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.serviceBrokerId, + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> requestListServiceInstances(this.cloudFoundryClient, spaceId)) + .filter( + resource -> + serviceInstanceName.equals( + ResourceUtils.getEntity(resource).getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByGatewayName() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.serviceBrokerId, + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + requestListServiceInstances( + this.cloudFoundryClient, + spaceId, + builder -> builder.gatewayName("test-gateway-name"))) + .as(StepVerifier::create) + .expectNextCount(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByName() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.serviceBrokerId, + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + requestListServiceInstances( + this.cloudFoundryClient, + spaceId, + builder -> builder.name(serviceInstanceName))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByServiceBindingId() { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.serviceBrokerId, + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + spaceId, + applicationName), + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (applicationId, serviceInstanceId, spaceId) -> + Mono.zip( + createServiceBindingId( + this.cloudFoundryClient, + applicationId, + serviceInstanceId), + Mono.just(spaceId)))) + .flatMapMany( + function( + (serviceBindingId, spaceId) -> + requestListServiceInstances( + this.cloudFoundryClient, + spaceId, + builder -> + builder.serviceBindingId( + serviceBindingId)))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByServiceKeyId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.serviceBrokerId, + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + Mono.zip( + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + Mono.just(spaceId)))) + .flatMap( + function( + (serviceInstanceId, spaceId) -> + Mono.zip( + createServiceKeyId( + this.cloudFoundryClient, + serviceInstanceId, + serviceKeyName), + Mono.just(spaceId)))) + .flatMapMany( + function( + (serviceKeyId, spaceId) -> + requestListServiceInstances( + this.cloudFoundryClient, + spaceId, + builder -> builder.serviceKeyId(serviceKeyId)))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceInstancesFilterByServicePlanId() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.serviceBrokerId, + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (serviceBrokerId, spaceId) -> + Mono.zip( + createServiceInstanceId( + this.cloudFoundryClient, + serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId), + getServicePlanId( + this.cloudFoundryClient, + serviceBrokerId, + this.serviceName), + Mono.just(spaceId)))) + .flatMapMany( + function( + (ignore, servicePlanId, spaceId) -> + requestListServiceInstances( + this.cloudFoundryClient, + spaceId, + builder -> builder.servicePlanId(servicePlanId)))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServices() { + this.spaceId + .flatMapMany( + spaceId -> + requestListSpaceServices(this.cloudFoundryClient, spaceId) + .filter( + resource -> + this.serviceName.equals( + ResourceUtils.getEntity(resource) + .getLabel()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicesFilterByActive() { + this.spaceId + .flatMapMany( + spaceId -> + requestListSpaceServices(this.cloudFoundryClient, spaceId) + .filter( + resource -> + this.serviceName.equals( + ResourceUtils.getEntity(resource) + .getLabel()))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServicesFilterByLabel() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMapMany( + function( + (serviceBrokerId, spaceId) -> + requestListSpaceServices( + this.cloudFoundryClient, + spaceId, + builder -> builder.label(this.serviceName)) + .filter( + resource -> + serviceBrokerId.equals( + ResourceUtils.getEntity( + resource) + .getServiceBrokerId())))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // TODO: Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to + // work + @Disabled( + "Await https://github.com/cloudfoundry/cloud_controller_ng/issues/856 for this test to" + + " work") + @Test + public void listServicesFilterByServiceBrokerId() { + Mono.zip(this.serviceBrokerId, this.spaceId) + .flatMapMany( + function( + (serviceBrokerId, spaceId) -> + requestListSpaceServices( + this.cloudFoundryClient, + spaceId, + builder -> + builder.serviceBrokerId(serviceBrokerId)))) + .map(response -> response.getEntity().getLabel()) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUserRoles() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .flatMapMany( + function( + (spaceId, userId) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .spaces() + .listUserRoles( + ListSpaceUserRolesRequest + .builder() + .page(page) + .spaceId( + spaceId) + .build())) + .map(ResourceUtils::getEntity))) + .as(StepVerifier::create) + .consumeNextWith( + entity -> { + assertThat(entity.getUsername()).isEqualTo(userName); + assertThat(entity.getSpaceRoles()).containsExactly("space_manager"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeAuditor() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .removeAuditor( + RemoveSpaceAuditorRequest.builder() + .spaceId(spaceId) + .auditorId(userId) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceAuditors(this.cloudFoundryClient, spaceId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeAuditorByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceAuditor( + this.cloudFoundryClient, spaceId, userId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .removeAuditorByUsername( + RemoveSpaceAuditorByUsernameRequest + .builder() + .spaceId(spaceId) + .username(userName) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceAuditors(this.cloudFoundryClient, spaceId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeDeveloper() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, userId, spaceId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .removeDeveloper( + RemoveSpaceDeveloperRequest.builder() + .spaceId(spaceId) + .developerId(userId) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceDevelopers( + this.cloudFoundryClient, spaceId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeDeveloperByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceDeveloper( + this.cloudFoundryClient, userId, spaceId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .removeDeveloperByUsername( + RemoveSpaceDeveloperByUsernameRequest + .builder() + .spaceId(spaceId) + .username(userName) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceDevelopers( + this.cloudFoundryClient, spaceId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeManager() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .removeManager( + RemoveSpaceManagerRequest.builder() + .spaceId(spaceId) + .managerId(userId) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers(this.cloudFoundryClient, spaceId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeManagerByUsername() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .removeManagerByUsername( + RemoveSpaceManagerByUsernameRequest + .builder() + .spaceId(spaceId) + .username(userName) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers(this.cloudFoundryClient, spaceId))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeSecurityGroup() { + String securityGroupName = this.nameFactory.getSecurityGroupName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createSecurityGroupId( + this.cloudFoundryClient, securityGroupName), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .delayUntil( + function( + (securityGroupId, spaceId) -> + requestAssociateSpaceSecurityGroup( + this.cloudFoundryClient, spaceId, securityGroupId))) + .flatMap( + function( + (securityGroupId, spaceId) -> + this.cloudFoundryClient + .spaces() + .removeSecurityGroup( + RemoveSpaceSecurityGroupRequest.builder() + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build()) + .thenReturn(spaceId))) + .flatMapMany(spaceId -> requestListSecurityGroups(this.cloudFoundryClient, spaceId)) + .filter(response -> securityGroupName.equals(response.getEntity().getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String spaceName = this.nameFactory.getSpaceName(); + String spaceName2 = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil( + spaceId -> + this.cloudFoundryClient + .spaces() + .update( + UpdateSpaceRequest.builder() + .spaceId(spaceId) + .name(spaceName2) + .build())) + .flatMap( + spaceId -> + this.cloudFoundryClient + .spaces() + .getSummary( + GetSpaceSummaryRequest.builder() + .spaceId(spaceId) + .build())) + .map(GetSpaceSummaryResponse::getName) + .as(StepVerifier::create) + .expectNext(spaceName2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateEmptyManagers() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userName = this.nameFactory.getUserName(); + + createSpaceIdAndUserId( + this.cloudFoundryClient, + this.uaaClient, + organizationName, + spaceName, + userName) + .delayUntil( + function( + (spaceId, userId) -> + requestAssociateSpaceManager( + this.cloudFoundryClient, spaceId, userId))) + .delayUntil( + function( + (spaceId, userId) -> + this.cloudFoundryClient + .spaces() + .update( + UpdateSpaceRequest.builder() + .spaceId(spaceId) + .managerIds(Collections.emptyList()) + .build()))) + .flatMapMany( + function( + (spaceId, userId) -> + requestListSpaceManagers(this.cloudFoundryClient, spaceId) + .map( + response -> + ResourceUtils.getEntity(response) + .getUsername()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String stackId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName, stackId) + .map(ResourceUtils::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organization) { + return requestCreateOrganization(cloudFoundryClient, organization) + .map(ResourceUtils::getId); + } + + private static Mono> createOrganizationIdAndSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationName, String spaceName) { + return createOrganizationId(cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + cloudFoundryClient, organizationId, spaceName))); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String domainName, + String host, + String path) { + return getSharedDomainId(cloudFoundryClient, domainName) + .flatMap( + domainId -> + requestCreateRoute( + cloudFoundryClient, spaceId, domainId, path, host)) + .map(ResourceUtils::getId); + } + + private static Mono createSecurityGroupId( + CloudFoundryClient cloudFoundryClient, String securityGroupName) { + return requestCreateSecurityGroup(cloudFoundryClient, securityGroupName) + .map(ResourceUtils::getId); + } + + private static Mono createServiceBindingId( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return requestCreateServiceBinding(cloudFoundryClient, applicationId, serviceInstanceId) + .map(ResourceUtils::getId); + } + + private static Mono createServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + String serviceBrokerId, + String serviceInstanceName, + String serviceName, + String spaceId) { + return getServicePlanId(cloudFoundryClient, serviceBrokerId, serviceName) + .flatMap( + planId -> + requestCreateServiceInstance( + cloudFoundryClient, planId, serviceInstanceName, spaceId)) + .map(ResourceUtils::getId); + } + + private static Mono createServiceKeyId( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return requestCreateServiceKey(cloudFoundryClient, serviceInstanceId, serviceKeyName) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .build()) + .map(ResourceUtils::getId); + } + + private static Mono> createSpaceIdAndUserId( + CloudFoundryClient cloudFoundryClient, + UaaClient uaaClient, + String organizationName, + String spaceName, + String userName) { + return createOrganizationId(cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createSpaceId( + cloudFoundryClient, organizationId, spaceName), + createUserId( + cloudFoundryClient, + uaaClient, + organizationId, + userName))); + } + + private static Mono createSpaceIdWithDomain( + CloudFoundryClient cloudFoundryClient, + String organizationId, + String spaceName, + String domainName) { + return cloudFoundryClient + .sharedDomains() + .create(CreateSharedDomainRequest.builder().name(domainName).build()) + .map(ResourceUtils::getId) + .flatMap( + domainId -> + cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .domainId(domainId) + .organizationId(organizationId) + .name(spaceName) + .build())) + .map(ResourceUtils::getId); + } + + private static Mono createUserId( + CloudFoundryClient cloudFoundryClient, + UaaClient uaaClient, + String organizationId, + String username) { + return uaaClient + .users() + .create( + org.cloudfoundry.uaa.users.CreateUserRequest.builder() + .email( + Email.builder() + .primary(true) + .value( + String.format( + "%s@%s.com", username, username)) + .build()) + .name(Name.builder().givenName("Test").familyName("User").build()) + .password("test-password") + .userName(username) + .build()) + .map(CreateUserResponse::getId) + .flatMap( + uaaId -> + cloudFoundryClient + .users() + .create(CreateUserRequest.builder().uaaId(uaaId).build()) + .map(ResourceUtils::getId)) + .flatMap( + userId -> + cloudFoundryClient + .organizations() + .associateUser( + AssociateOrganizationUserRequest.builder() + .organizationId(organizationId) + .userId(userId) + .build()) + .thenReturn(userId)); + } + + private static String getPastTimestamp() { + Date past = Date.from(Instant.now().minus(61, MINUTES)); + return DateUtils.formatToIso8601(past); + } + + private static Mono getServicePlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return requestListServices(cloudFoundryClient, serviceBrokerId, serviceName) + .single() + .map(ResourceUtils::getId) + .flatMapMany(serviceId -> requestListServicePlans(cloudFoundryClient, serviceId)) + .single() + .map(ResourceUtils::getId); + } + + private static Mono getSharedDomainId( + CloudFoundryClient cloudFoundryClient, String domain) { + return requestSharedDomain(cloudFoundryClient, domain) + .map(ResourceUtils::getId) + .single() + .switchIfEmpty(ExceptionUtils.illegalArgument("Domain %s not found", domain)); + } + + private static Mono requestAssociateSpaceAuditor( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .spaces() + .associateAuditor( + AssociateSpaceAuditorRequest.builder() + .spaceId(spaceId) + .auditorId(userId) + .build()); + } + + private static Mono requestAssociateSpaceDeveloper( + CloudFoundryClient cloudFoundryClient, String developerId, String spaceId) { + return cloudFoundryClient + .spaces() + .associateDeveloper( + AssociateSpaceDeveloperRequest.builder() + .developerId(developerId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestAssociateSpaceManager( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .spaces() + .associateManager( + AssociateSpaceManagerRequest.builder() + .spaceId(spaceId) + .managerId(userId) + .build()); + } + + private static Mono requestAssociateSpaceSecurityGroup( + CloudFoundryClient cloudFoundryClient, String spaceId, String securityGroupId) { + return cloudFoundryClient + .spaces() + .associateSecurityGroup( + AssociateSpaceSecurityGroupRequest.builder() + .securityGroupId(securityGroupId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .diego(true) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String applicationName, + String stackId) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .diego(true) + .name(applicationName) + .spaceId(spaceId) + .stackId(stackId) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organization) { + return cloudFoundryClient + .organizations() + .create(CreateOrganizationRequest.builder().name(organization).build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String spaceId, + String domainId, + String path, + String host) { + return cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .spaceId(spaceId) + .domainId(domainId) + .host(host) + .path(path) + .build()); + } + + private static Mono requestCreateSecurityGroup( + CloudFoundryClient cloudFoundryClient, String securityGroupName) { + return cloudFoundryClient + .securityGroups() + .create(CreateSecurityGroupRequest.builder().name(securityGroupName).build()); + } + + private static Mono requestCreateServiceBinding( + CloudFoundryClient cloudFoundryClient, String applicationId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String planId, + String serviceInstanceName, + String spaceId) { + return cloudFoundryClient + .serviceInstances() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .parameter("test-key", "test-value") + .servicePlanId(planId) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceId, + String serviceKeyName) { + return cloudFoundryClient + .serviceKeys() + .create( + CreateServiceKeyRequest.builder() + .name(serviceKeyName) + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Flux requestListSecurityGroups( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listSecurityGroups( + ListSpaceSecurityGroupsRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListServiceInstances(cloudFoundryClient, spaceId, UnaryOperator.identity()); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, + String spaceId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServiceInstances( + transformer + .apply(ListSpaceServiceInstancesRequest.builder()) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .servicePlans() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceId(serviceId) + .build())); + } + + private static Flux requestListServices( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .services() + .list( + ListServicesRequest.builder() + .label(serviceName) + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } + + private static Flux requestListSpaceApplications( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceApplications(cloudFoundryClient, spaceId, UnaryOperator.identity()); + } + + private static Flux requestListSpaceApplications( + CloudFoundryClient cloudFoundryClient, + String spaceId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listApplications( + transformer + .apply(ListSpaceApplicationsRequest.builder()) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceAuditors( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listAuditors( + ListSpaceAuditorsRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceDevelopers( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listDevelopers( + ListSpaceDevelopersRequest.builder() + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceDomains( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceDomains(cloudFoundryClient, spaceId, UnaryOperator.identity()); + } + + @SuppressWarnings("deprecation") + private static Flux requestListSpaceDomains( + CloudFoundryClient cloudFoundryClient, + String spaceId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listDomains( + transformer + .apply(ListSpaceDomainsRequest.builder()) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceEvents( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceEvents(cloudFoundryClient, spaceId, UnaryOperator.identity()); + } + + private static Flux requestListSpaceEvents( + CloudFoundryClient cloudFoundryClient, + String spaceId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listEvents( + transformer + .apply(ListSpaceEventsRequest.builder()) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceManagers( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceManagers(cloudFoundryClient, spaceId, Function.identity()); + } + + private static Flux requestListSpaceManagers( + CloudFoundryClient cloudFoundryClient, + String spaceId, + Function + transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listManagers( + transformer + .apply(ListSpaceManagersRequest.builder()) + .page(page) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceRoutes( + CloudFoundryClient cloudFoundryClient, String spaceId) { + return requestListSpaceRoutes(cloudFoundryClient, spaceId, UnaryOperator.identity()); + } + + private static Flux requestListSpaceRoutes( + CloudFoundryClient cloudFoundryClient, + String spaceId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listRoutes( + transformer + .apply(ListSpaceRoutesRequest.builder()) + .spaceId(spaceId) + .build())); + } + + private static Flux requestListSpaceServices( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListSpaceServices( + cloudFoundryClient, organizationId, UnaryOperator.identity()); + } + + private static Flux requestListSpaceServices( + CloudFoundryClient cloudFoundryClient, + String spaceId, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .listServices( + transformer + .apply(ListSpaceServicesRequest.builder()) + .spaceId(spaceId) + .page(page) + .build())); + } + + private static Flux requestListSpaces(CloudFoundryClient cloudFoundryClient) { + return requestListSpaces(cloudFoundryClient, UnaryOperator.identity()); + } + + private static Flux requestListSpaces( + CloudFoundryClient cloudFoundryClient, + UnaryOperator transformer) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .spaces() + .list( + transformer + .apply(ListSpacesRequest.builder()) + .page(page) + .build())); + } + + private static Flux requestSharedDomain( + CloudFoundryClient cloudFoundryClient, String domain) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .sharedDomains() + .list( + ListSharedDomainsRequest.builder() + .name(domain) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/StacksTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/StacksTest.java new file mode 100644 index 00000000000..cbd3ac2d296 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/StacksTest.java @@ -0,0 +1,214 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.stacks.CreateStackRequest; +import org.cloudfoundry.client.v2.stacks.CreateStackResponse; +import org.cloudfoundry.client.v2.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v2.stacks.GetStackRequest; +import org.cloudfoundry.client.v2.stacks.GetStackResponse; +import org.cloudfoundry.client.v2.stacks.ListStacksRequest; +import org.cloudfoundry.client.v2.stacks.StackResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class StacksTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + private String stackName; + + @BeforeEach + void setUp(@Autowired Mono stackName) { + this.stackName = stackName.block(); + } + + @Test + public void create() { + String stackName = this.nameFactory.getStackName(); + + this.cloudFoundryClient + .stacks() + .create( + CreateStackRequest.builder() + .description("Test stack description") + .name(stackName) + .build()) + .thenMany(requestListStacks(stackName)) + .map(response -> ResourceUtils.getEntity(response).getDescription()) + .as(StepVerifier::create) + .expectNext("Test stack description") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String stackName = this.nameFactory.getStackName(); + + createStackId(this.cloudFoundryClient, stackName) + .delayUntil( + stackId -> + this.cloudFoundryClient + .stacks() + .delete( + DeleteStackRequest.builder() + .async(false) + .stackId(stackId) + .build())) + .flatMap(stackId -> requestGetStack(this.cloudFoundryClient, stackId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-StackNotFound\\([0-9]+\\): The stack could not" + + " be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsync() { + String stackName = this.nameFactory.getStackName(); + + createStackId(this.cloudFoundryClient, stackName) + .delayUntil( + stackId -> + this.cloudFoundryClient + .stacks() + .delete( + DeleteStackRequest.builder() + .async(true) + .stackId(stackId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap(stackId -> requestGetStack(this.cloudFoundryClient, stackId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV2Exception.class) + .hasMessageMatching( + "CF-StackNotFound\\([0-9]+\\): The stack could not" + + " be found: .*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + getStackId() + .flatMap( + stackId -> + this.cloudFoundryClient + .stacks() + .get(GetStackRequest.builder().stackId(stackId).build())) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(this.stackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + getStackId() + .flatMapMany( + stackId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .stacks() + .list( + ListStacksRequest.builder() + .page(page) + .build())) + .filter( + resource -> + ResourceUtils.getId(resource) + .equals(stackId))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(this.stackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + this.requestListStacks(this.stackName) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(this.stackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createStackId( + CloudFoundryClient cloudFoundryClient, String stackName) { + return requestCreateStack(cloudFoundryClient, stackName).map(ResourceUtils::getId); + } + + private Mono getStackId() { + return this.requestListStacks(this.stackName).single().map(ResourceUtils::getId); + } + + private static Mono requestCreateStack( + CloudFoundryClient cloudFoundryClient, String stackName) { + return cloudFoundryClient + .stacks() + .create( + CreateStackRequest.builder() + .description("Test stack description") + .name(stackName) + .build()); + } + + private static Mono requestGetStack( + CloudFoundryClient cloudFoundryClient, String stackId) { + return cloudFoundryClient.stacks().get(GetStackRequest.builder().stackId(stackId).build()); + } + + private Flux requestListStacks(String stackName) { + return PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .stacks() + .list( + ListStacksRequest.builder() + .name(stackName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/UserProvidedServicesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/UserProvidedServicesTest.java new file mode 100644 index 00000000000..555741d6340 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/UserProvidedServicesTest.java @@ -0,0 +1,647 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Collections; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainRequest; +import org.cloudfoundry.client.v2.privatedomains.CreatePrivateDomainResponse; +import org.cloudfoundry.client.v2.routes.CreateRouteRequest; +import org.cloudfoundry.client.v2.routes.CreateRouteResponse; +import org.cloudfoundry.client.v2.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.AssociateUserProvidedServiceInstanceRouteResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.CreateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.DeleteUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.GetUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceRoutesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstanceServiceBindingsRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UpdateUserProvidedServiceInstanceResponse; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstanceResource; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuple3; +import reactor.util.function.Tuples; + +public final class UserProvidedServicesTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private RoutingClient routingClient; + + @Autowired private Mono spaceId; + + @Test + public void create() { + String instanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .create( + CreateUserProvidedServiceInstanceRequest.builder() + .name(instanceName) + .spaceId(spaceId) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(instanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String instanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, instanceName, spaceId)) + .flatMap( + instanceId -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .delete( + DeleteUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId(instanceId) + .build())) + .thenMany( + requestListUserProvidedServiceInstances( + this.cloudFoundryClient, instanceName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String instanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, instanceName, spaceId)) + .flatMap( + instanceId -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .get( + GetUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceId(instanceId) + .build())) + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(instanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String instanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + requestCreateUserProvidedServiceInstance( + this.cloudFoundryClient, instanceName, spaceId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .list( + ListUserProvidedServiceInstancesRequest + .builder() + .name(instanceName) + .page(page) + .build()))) + .single() + .map(response -> ResourceUtils.getEntity(response).getName()) + .as(StepVerifier::create) + .expectNext(instanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutes() { + String domainName = this.nameFactory.getDomainName(); + String instanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + instanceName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + null, + null, + spaceId)))) + .flatMap( + function( + (instanceId, routeId) -> + requestAssociateRoute( + this.cloudFoundryClient, + instanceId, + routeId) + .thenReturn(instanceId))) + .flatMapMany( + instanceId -> + Mono.zip( + Mono.just(instanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .listRoutes( + ListUserProvidedServiceInstanceRoutesRequest + .builder() + .page(page) + .userProvidedServiceInstanceId( + instanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity(resource) + .getServiceInstanceId()) + .single())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByDomainId() { + String domainName = this.nameFactory.getDomainName(); + String instanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + Mono.just(domainId), + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + instanceName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + null, + null, + spaceId)))) + .flatMap( + function( + (domainId, instanceId, routeId) -> + requestAssociateRoute( + this.cloudFoundryClient, + instanceId, + routeId) + .thenReturn(Tuples.of(domainId, instanceId)))) + .flatMapMany( + function( + (domainId, instanceId) -> + Mono.zip( + Mono.just(instanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .listRoutes( + ListUserProvidedServiceInstanceRoutesRequest + .builder() + .domainId( + domainId) + .page( + page) + .userProvidedServiceInstanceId( + instanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity( + resource) + .getServiceInstanceId()) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByHost() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String instanceName = this.nameFactory.getServiceInstanceName(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + instanceName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + null, + spaceId)))) + .flatMap( + function( + (instanceId, routeId) -> + requestAssociateRoute( + this.cloudFoundryClient, + instanceId, + routeId) + .thenReturn(instanceId))) + .flatMapMany( + instanceId -> + Mono.zip( + Mono.just(instanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .listRoutes( + ListUserProvidedServiceInstanceRoutesRequest + .builder() + .host( + hostName) + .page(page) + .userProvidedServiceInstanceId( + instanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity(resource) + .getServiceInstanceId()) + .single())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRoutesFilterByPath() { + String domainName = this.nameFactory.getDomainName(); + String instanceName = this.nameFactory.getServiceInstanceName(); + String path = this.nameFactory.getPath(); + + Mono.zip( + this.organizationId.flatMap( + organizationId -> + createPrivateDomainId( + this.cloudFoundryClient, + domainName, + organizationId)), + this.spaceId) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + instanceName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + null, + path, + spaceId)))) + .flatMap( + function( + (instanceId, routeId) -> + requestAssociateRoute( + this.cloudFoundryClient, + instanceId, + routeId) + .thenReturn(instanceId))) + .flatMapMany( + instanceId -> + Mono.zip( + Mono.just(instanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .listRoutes( + ListUserProvidedServiceInstanceRoutesRequest + .builder() + .page(page) + .path(path) + .userProvidedServiceInstanceId( + instanceId) + .build())) + .map( + resource -> + ResourceUtils.getEntity(resource) + .getServiceInstanceId()) + .single())) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceBindings() { + String applicationName = this.nameFactory.getApplicationName(); + String instanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId), + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, instanceName, spaceId))) + .delayUntil( + function( + (applicationId, instanceId) -> + this.cloudFoundryClient + .serviceBindingsV2() + .create( + CreateServiceBindingRequest.builder() + .applicationId(applicationId) + .serviceInstanceId(instanceId) + .build()))) + .flatMap( + function( + (applicationId, instanceId) -> + Mono.zip( + Mono.just(applicationId), + Mono.just(instanceId), + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .userProvidedServiceInstances() + .listServiceBindings( + ListUserProvidedServiceInstanceServiceBindingsRequest + .builder() + .applicationId( + applicationId) + .page( + page) + .userProvidedServiceInstanceId( + instanceId) + .build())) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(serviceBindingEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String instanceName = this.nameFactory.getServiceInstanceName(); + String newInstanceName = this.nameFactory.getServiceInstanceName(); + + this.spaceId + .flatMap( + spaceId -> + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, instanceName, spaceId)) + .flatMap( + instanceId -> + Mono.zip( + Mono.just(instanceId), + this.cloudFoundryClient + .userProvidedServiceInstances() + .update( + UpdateUserProvidedServiceInstanceRequest + .builder() + .userProvidedServiceInstanceId( + instanceId) + .name(newInstanceName) + .credential( + "test-cred", "some value") + .build()) + .map( + UpdateUserProvidedServiceInstanceResponse + ::getEntity))) + .flatMap( + function( + (instanceId, entity1) -> + Mono.zip( + Mono.just(entity1), + this.cloudFoundryClient + .userProvidedServiceInstances() + .update( + UpdateUserProvidedServiceInstanceRequest + .builder() + .userProvidedServiceInstanceId( + instanceId) + .credentials( + Collections + .emptyMap()) + .build()) + .map( + UpdateUserProvidedServiceInstanceResponse + ::getEntity)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (entity1, entity2) -> { + assertThat(entity1.getName()).isEqualTo(newInstanceName); + assertThat(entity1.getCredentials()) + .containsEntry("test-cred", "some value"); + assertThat(entity2.getCredentials()).isEmpty(); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono createPrivateDomainId( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return requestCreatePrivateDomain(cloudFoundryClient, name, organizationId) + .map(ResourceUtils::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, + String domainId, + String hostName, + String path, + String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, hostName, path, spaceId) + .map(ResourceUtils::getId); + } + + private static Mono createUserProvidedServiceInstanceId( + CloudFoundryClient cloudFoundryClient, String instanceName, String spaceId) { + return requestCreateUserProvidedServiceInstance(cloudFoundryClient, instanceName, spaceId) + .map(ResourceUtils::getId); + } + + private static Mono requestAssociateRoute( + CloudFoundryClient cloudFoundryClient, String instanceId, String routeId) { + return cloudFoundryClient + .userProvidedServiceInstances() + .associateRoute( + AssociateUserProvidedServiceInstanceRouteRequest.builder() + .routeId(routeId) + .userProvidedServiceInstanceId(instanceId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryClient cloudFoundryClient, String name, String organizationId) { + return cloudFoundryClient + .privateDomains() + .create( + CreatePrivateDomainRequest.builder() + .name(name) + .owningOrganizationId(organizationId) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String hostName, + String path, + String spaceId) { + return cloudFoundryClient + .routes() + .create( + CreateRouteRequest.builder() + .domainId(domainId) + .host(hostName) + .path(path) + .spaceId(spaceId) + .build()); + } + + private static Mono + requestCreateUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, String instanceName, String spaceId) { + return cloudFoundryClient + .userProvidedServiceInstances() + .create( + CreateUserProvidedServiceInstanceRequest.builder() + .name(instanceName) + .routeServiceUrl("https://test.url") + .spaceId(spaceId) + .build()); + } + + private static Flux + requestListUserProvidedServiceInstances( + CloudFoundryClient cloudFoundryClient, String instanceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .userProvidedServiceInstances() + .list( + ListUserProvidedServiceInstancesRequest.builder() + .name(instanceName) + .page(page) + .build())); + } + + private static Consumer> + serviceBindingEquality() { + return consumer( + (applicationId, instanceId, resource) -> { + assertThat(resource.getEntity().getApplicationId()).isEqualTo(applicationId); + assertThat(resource.getEntity().getServiceInstanceId()).isEqualTo(instanceId); + }); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v2/UsersTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v2/UsersTest.java new file mode 100644 index 00000000000..27f1232c3d0 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v2/UsersTest.java @@ -0,0 +1,2520 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v2; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationAuditorResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationBillingManagerResponse; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerRequest; +import org.cloudfoundry.client.v2.organizations.AssociateOrganizationManagerResponse; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserAuditedSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserBillingManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserBillingManagedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserManagedOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserManagedSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserManagedSpaceResponse; +import org.cloudfoundry.client.v2.users.AssociateUserOrganizationRequest; +import org.cloudfoundry.client.v2.users.AssociateUserOrganizationResponse; +import org.cloudfoundry.client.v2.users.AssociateUserSpaceRequest; +import org.cloudfoundry.client.v2.users.AssociateUserSpaceResponse; +import org.cloudfoundry.client.v2.users.CreateUserRequest; +import org.cloudfoundry.client.v2.users.CreateUserResponse; +import org.cloudfoundry.client.v2.users.DeleteUserRequest; +import org.cloudfoundry.client.v2.users.GetUserRequest; +import org.cloudfoundry.client.v2.users.ListUserAuditedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserAuditedSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserBillingManagedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserManagedOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserManagedSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUserOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUserSpacesRequest; +import org.cloudfoundry.client.v2.users.ListUsersRequest; +import org.cloudfoundry.client.v2.users.RemoveUserAuditedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserAuditedSpaceRequest; +import org.cloudfoundry.client.v2.users.RemoveUserBillingManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserManagedOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserManagedSpaceRequest; +import org.cloudfoundry.client.v2.users.RemoveUserOrganizationRequest; +import org.cloudfoundry.client.v2.users.RemoveUserSpaceRequest; +import org.cloudfoundry.client.v2.users.SummaryUserRequest; +import org.cloudfoundry.client.v2.users.SummaryUserResponse; +import org.cloudfoundry.client.v2.users.UpdateUserRequest; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuples; + +public final class UsersTest extends AbstractIntegrationTest { + + private static final String STATUS_FILTER = "active"; + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void associateAuditedOrganization() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganizationAuditor( + this.cloudFoundryClient, + organizationId, + userId)) + .then( + this.cloudFoundryClient + .users() + .associateAuditedOrganization( + AssociateUserAuditedOrganizationRequest + .builder() + .auditedOrganizationId( + organizationId) + .userId(userId) + .build()))) + .then( + requestSummaryUser(this.cloudFoundryClient, userId) + .flatMapIterable( + response -> response.getEntity().getAuditedOrganizations()) + .map(resource -> resource.getEntity().getName()) + .single()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateAuditedSpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + this.cloudFoundryClient + .users() + .associateAuditedSpace( + AssociateUserAuditedSpaceRequest + .builder() + .auditedSpaceId(spaceId) + .userId(userId) + .build()))) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getAuditedSpaces()) + .map(space -> space.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateBillingManagedOrganization() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganizationBillingManager( + this.cloudFoundryClient, + organizationId, + userId)) + .then( + this.cloudFoundryClient + .users() + .associateBillingManagedOrganization( + AssociateUserBillingManagedOrganizationRequest + .builder() + .billingManagedOrganizationId( + organizationId) + .userId(userId) + .build()))) + .then( + requestSummaryUser(this.cloudFoundryClient, userId) + .flatMapIterable( + response -> + response.getEntity() + .getBillingManagedOrganizations()) + .map(resource -> resource.getEntity().getName()) + .single()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateManagedOrganization() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganizationManager( + this.cloudFoundryClient, + organizationId, + userId)) + .then( + this.cloudFoundryClient + .users() + .associateManagedOrganization( + AssociateUserManagedOrganizationRequest + .builder() + .managedOrganizationId( + organizationId) + .userId(userId) + .build()))) + .then( + requestSummaryUser(this.cloudFoundryClient, userId) + .flatMapIterable( + response -> response.getEntity().getManagedOrganizations()) + .map(resource -> resource.getEntity().getName()) + .single()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateManagedSpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + this.cloudFoundryClient + .users() + .associateManagedSpace( + AssociateUserManagedSpaceRequest + .builder() + .managedSpaceId(spaceId) + .userId(userId) + .build()))) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getManagedSpaces()) + .map(space -> space.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateOrganization() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + this.cloudFoundryClient + .users() + .associateOrganization( + AssociateUserOrganizationRequest + .builder() + .organizationId( + organizationId) + .userId(userId) + .build()))) + .then( + requestSummaryUser(this.cloudFoundryClient, userId) + .flatMapIterable( + response -> response.getEntity().getOrganizations()) + .map(resource -> resource.getEntity().getName()) + .single()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void associateSpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + this.cloudFoundryClient + .users() + .associateSpace( + AssociateUserSpaceRequest.builder() + .spaceId(spaceId) + .userId(userId) + .build()))) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getSpaces()) + .map(space -> space.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + this.cloudFoundryClient + .users() + .create( + CreateUserRequest.builder() + .defaultSpaceId(spaceId) + .uaaId(userId) + .build())) + .thenMany(requestListUsers(this.cloudFoundryClient)) + .filter(resource -> userId.equals(resource.getMetadata().getId())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteAsync() { + String userId = this.nameFactory.getUserId(); + + requestCreateUser(this.cloudFoundryClient, userId) + .then( + this.cloudFoundryClient + .users() + .delete( + DeleteUserRequest.builder() + .async(true) + .userId(userId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany(requestListUsers(this.cloudFoundryClient)) + .filter(resource -> userId.equals(resource.getMetadata().getId())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteNoAsync() { + String userId = this.nameFactory.getUserId(); + + requestCreateUser(this.cloudFoundryClient, userId) + .then( + this.cloudFoundryClient + .users() + .delete( + DeleteUserRequest.builder() + .async(false) + .userId(userId) + .build())) + .thenMany(requestListUsers(this.cloudFoundryClient)) + .filter(resource -> userId.equals(resource.getMetadata().getId())) + .map(ResourceUtils::getId) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + this.cloudFoundryClient + .users() + .get( + GetUserRequest.builder() + .userId(userId) + .build()) + .map( + response -> + Tuples.of( + spaceId, + response.getEntity() + .getDefaultSpaceId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String userId = this.nameFactory.getUserId(); + + requestCreateUser(this.cloudFoundryClient, userId) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .list( + ListUsersRequest.builder() + .page(page) + .build()))) + .filter(resource -> userId.equals(resource.getMetadata().getId())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizations() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + associateAuditorOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizationsFilterByAuditorId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + associateAuditorOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .auditorId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizationsFilterByBillingManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + Mono.zip( + associateBillingManagerOrganization( + this.cloudFoundryClient, organizationId, userId), + associateAuditorOrganization( + this.cloudFoundryClient, organizationId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .billingManagerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizationsFilterByManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + Mono.zip( + associateAuditorOrganization( + this.cloudFoundryClient, organizationId, userId), + associateManagerOrganization( + this.cloudFoundryClient, organizationId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .managerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizationsFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + associateAuditorOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .name(organizationName) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizationsFilterBySpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + associateAuditorOrganization( + this.cloudFoundryClient, + organizationId, + userId)) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .page(page) + .spaceId(spaceId) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedOrganizationsFilterByStatus() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + associateAuditorOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedOrganizations( + ListUserAuditedOrganizationsRequest + .builder() + .page(page) + .status(STATUS_FILTER) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedSpaces() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateAuditedSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedSpaces( + ListUserAuditedSpacesRequest.builder() + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedSpacesFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + getApplicationId( + this.cloudFoundryClient, applicationName, spaceId), + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateAuditedSpace( + this.cloudFoundryClient, + spaceId, + userId)))) + .flatMapMany( + function( + (applicationId, ignore) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedSpaces( + ListUserAuditedSpacesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .userId(userId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedSpacesFilterByDeveloperId() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + Mono.zip( + requestAssociateSpace( + this.cloudFoundryClient, + spaceId, + userId), + requestAssociateAuditedSpace( + this.cloudFoundryClient, + spaceId, + userId)))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedSpaces( + ListUserAuditedSpacesRequest.builder() + .developerId(userId) + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedSpacesFilterByName() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateAuditedSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedSpaces( + ListUserAuditedSpacesRequest.builder() + .name(spaceName) + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listAuditedSpacesFilterByOrganizationId() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateAuditedSpace( + this.cloudFoundryClient, + spaceId, + userId)) + .thenReturn(organizationId))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listAuditedSpaces( + ListUserAuditedSpacesRequest + .builder() + .organizationId( + organizationId) + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizations() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + associateBillingManagerOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizationsFilterByAuditorId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + Mono.zip( + associateBillingManagerOrganization( + this.cloudFoundryClient, organizationId, userId), + associateAuditorOrganization( + this.cloudFoundryClient, organizationId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .auditorId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizationsFilterByBillingManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + associateBillingManagerOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .billingManagerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizationsFilterByManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + Mono.zip( + associateBillingManagerOrganization( + this.cloudFoundryClient, organizationId, userId), + associateManagerOrganization( + this.cloudFoundryClient, organizationId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .managerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizationsFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + associateBillingManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .name(organizationName) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizationsFilterBySpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + associateBillingManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId)) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .page(page) + .spaceId(spaceId) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listBillingManagedOrganizationsFilterByStatus() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + associateBillingManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listBillingManagedOrganizations( + ListUserBillingManagedOrganizationsRequest + .builder() + .page(page) + .status(STATUS_FILTER) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganization() { + String userId = this.nameFactory.getUserId(); + + this.organizationId + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .delayUntil( + organizationId -> + requestAssociateOrganization( + this.cloudFoundryClient, organizationId, userId)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .list( + ListUsersRequest.builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter(resource -> userId.equals(resource.getMetadata().getId())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil(spaceId -> requestCreateUser(this.cloudFoundryClient, spaceId, userId)) + .delayUntil( + spaceId -> requestAssociateSpace(this.cloudFoundryClient, spaceId, userId)) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .list( + ListUsersRequest.builder() + .page(page) + .spaceId(spaceId) + .build()))) + .filter(resource -> userId.equals(resource.getMetadata().getId())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizations() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + associateManagerOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizationsFilterByAuditorId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + Mono.zip( + associateAuditorOrganization( + this.cloudFoundryClient, organizationId, userId), + associateManagerOrganization( + this.cloudFoundryClient, organizationId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .auditorId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizationsFilterByBillingManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + Mono.zip( + associateBillingManagerOrganization( + this.cloudFoundryClient, organizationId, userId), + associateManagerOrganization( + this.cloudFoundryClient, organizationId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .billingManagerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizationsFilterByManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + associateManagerOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .managerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizationsFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + associateManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .name(organizationName) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizationsFilterBySpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + associateManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId)) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .page(page) + .spaceId(spaceId) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedOrganizationsFilterByStatus() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + associateManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedOrganizations( + ListUserManagedOrganizationsRequest + .builder() + .page(page) + .status(STATUS_FILTER) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedSpaces() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateManagedSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedSpaces( + ListUserManagedSpacesRequest.builder() + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedSpacesFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + getApplicationId( + this.cloudFoundryClient, applicationName, spaceId), + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateManagedSpace( + this.cloudFoundryClient, + spaceId, + userId)))) + .flatMapMany( + function( + (applicationId, ignore) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedSpaces( + ListUserManagedSpacesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .userId(userId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedSpacesFilterByDeveloperId() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + Mono.zip( + requestAssociateSpace( + this.cloudFoundryClient, + spaceId, + userId), + requestAssociateManagedSpace( + this.cloudFoundryClient, + spaceId, + userId)))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedSpaces( + ListUserManagedSpacesRequest.builder() + .developerId(userId) + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedSpacesFilterByName() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateManagedSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedSpaces( + ListUserManagedSpacesRequest.builder() + .name(spaceName) + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listManagedSpacesFilterByOrganizationId() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateManagedSpace( + this.cloudFoundryClient, + spaceId, + userId)) + .thenReturn(organizationId))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listManagedSpaces( + ListUserManagedSpacesRequest + .builder() + .organizationId( + organizationId) + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizations() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil(organizationId -> requestCreateUser(this.cloudFoundryClient, userId)) + .flatMap( + organizationId -> + requestAssociateOrganization( + this.cloudFoundryClient, organizationId, userId)) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest.builder() + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsFilterByAuditorId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + Mono.zip( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId), + associateAuditorOrganization( + this.cloudFoundryClient, + organizationId, + userId)))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest.builder() + .auditorId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsFilterByBillingManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + Mono.zip( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId), + associateBillingManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId)))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest.builder() + .billingManagerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsFilterByManagerId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + Mono.zip( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId), + associateManagerOrganization( + this.cloudFoundryClient, + organizationId, + userId)))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest.builder() + .managerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsFilterBySpaceId() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId)) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest + .builder() + .page(page) + .spaceId(spaceId) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsFilterByStatus() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listOrganizations( + ListUserOrganizationsRequest.builder() + .page(page) + .status(STATUS_FILTER) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpaces() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listSpaces( + ListUserSpacesRequest.builder() + .page(page) + .userId(userId) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + getApplicationId( + this.cloudFoundryClient, applicationName, spaceId), + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateSpace( + this.cloudFoundryClient, + spaceId, + userId)))) + .flatMapMany( + function( + (applicationId, ignore) -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listSpaces( + ListUserSpacesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .userId(userId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByDeveloperId() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listSpaces( + ListUserSpacesRequest.builder() + .developerId(userId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByName() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateSpace( + this.cloudFoundryClient, spaceId, userId))) + .thenMany( + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listSpaces( + ListUserSpacesRequest.builder() + .name(spaceName) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesFilterByOrganizationId() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateSpace( + this.cloudFoundryClient, + spaceId, + userId)) + .thenReturn(organizationId))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV2Resources( + page -> + this.cloudFoundryClient + .users() + .listSpaces( + ListUserSpacesRequest.builder() + .organizationId( + organizationId) + .page(page) + .userId(userId) + .build()))) + .map(resource -> resource.getEntity().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeAuditedOrganization() { + String userId = this.nameFactory.getUserId(); + + this.organizationId + .delayUntil( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganizationAuditor( + this.cloudFoundryClient, + organizationId, + userId)) + .then( + requestAssociateAuditedOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .flatMap( + organizationId -> + this.cloudFoundryClient + .users() + .removeAuditedOrganization( + RemoveUserAuditedOrganizationRequest.builder() + .auditedOrganizationId(organizationId) + .userId(userId) + .build())) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getAuditedOrganizations()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeAuditedSpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateAuditedSpace( + this.cloudFoundryClient, spaceId, userId)) + .then( + this.cloudFoundryClient + .users() + .removeAuditedSpace( + RemoveUserAuditedSpaceRequest + .builder() + .auditedSpaceId(spaceId) + .userId(userId) + .build()))) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getAuditedSpaces()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeBillingManagedOrganization() { + String userId = this.nameFactory.getUserId(); + + this.organizationId + .delayUntil( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganizationBillingManager( + this.cloudFoundryClient, + organizationId, + userId)) + .then( + requestAssociateBillingManagedOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .flatMap( + organizationId -> + this.cloudFoundryClient + .users() + .removeBillingManagedOrganization( + RemoveUserBillingManagedOrganizationRequest + .builder() + .billingManagedOrganizationId( + organizationId) + .userId(userId) + .build())) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getBillingManagedOrganizations()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeManagedOrganization() { + String userId = this.nameFactory.getUserId(); + + this.organizationId + .delayUntil( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganizationManager( + this.cloudFoundryClient, + organizationId, + userId)) + .then( + requestAssociateManagedOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .flatMap( + organizationId -> + this.cloudFoundryClient + .users() + .removeManagedOrganization( + RemoveUserManagedOrganizationRequest.builder() + .managedOrganizationId(organizationId) + .userId(userId) + .build())) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getManagedOrganizations()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeManagedSpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateManagedSpace( + this.cloudFoundryClient, spaceId, userId)) + .then( + this.cloudFoundryClient + .users() + .removeManagedSpace( + RemoveUserManagedSpaceRequest + .builder() + .managedSpaceId(spaceId) + .userId(userId) + .build()))) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getManagedSpaces()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeOrganization() { + String userId = this.nameFactory.getUserId(); + + this.organizationId + .delayUntil( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .flatMap( + organizationId -> + this.cloudFoundryClient + .users() + .removeOrganization( + RemoveUserOrganizationRequest.builder() + .organizationId(organizationId) + .userId(userId) + .build())) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getOrganizations()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeSpace() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + requestCreateUser(this.cloudFoundryClient, spaceId, userId) + .then( + requestAssociateSpace( + this.cloudFoundryClient, spaceId, userId)) + .then( + this.cloudFoundryClient + .users() + .removeSpace( + RemoveUserSpaceRequest.builder() + .spaceId(spaceId) + .userId(userId) + .build()))) + .then(requestSummaryUser(this.cloudFoundryClient, userId)) + .flatMapIterable(response -> response.getEntity().getSpaces()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void summary() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateUser(this.cloudFoundryClient, userId) + .then( + requestAssociateOrganization( + this.cloudFoundryClient, + organizationId, + userId))) + .then( + this.cloudFoundryClient + .users() + .summary(SummaryUserRequest.builder().userId(userId).build())) + .map(response -> ResourceUtils.getEntity(response).getOrganizations()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String spaceName = this.nameFactory.getSpaceName(); + String userId = this.nameFactory.getUserId(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .delayUntil(spaceId -> requestCreateUser(this.cloudFoundryClient, userId)) + .delayUntil( + spaceId -> + this.cloudFoundryClient + .users() + .update( + UpdateUserRequest.builder() + .defaultSpaceId(spaceId) + .userId(userId) + .build())) + .flatMapMany( + spaceId -> + requestListUsers(this.cloudFoundryClient) + .filter( + resource -> + spaceId.equals( + resource.getEntity() + .getDefaultSpaceId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono associateAuditorOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return requestAssociateOrganizationAuditor(cloudFoundryClient, organizationId, userId) + .then( + requestAssociateAuditedOrganization( + cloudFoundryClient, organizationId, userId)); + } + + private static Mono + associateBillingManagerOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return requestAssociateOrganizationBillingManager( + cloudFoundryClient, organizationId, userId) + .then( + requestAssociateBillingManagedOrganization( + cloudFoundryClient, organizationId, userId)); + } + + private static Mono associateManagerOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return requestAssociateOrganizationManager(cloudFoundryClient, organizationId, userId) + .then( + requestAssociateManagedOrganization( + cloudFoundryClient, organizationId, userId)); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono + requestAssociateAuditedOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .users() + .associateAuditedOrganization( + AssociateUserAuditedOrganizationRequest.builder() + .auditedOrganizationId(organizationId) + .userId(userId) + .build()); + } + + private static Mono requestAssociateAuditedSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .users() + .associateAuditedSpace( + AssociateUserAuditedSpaceRequest.builder() + .auditedSpaceId(spaceId) + .userId(userId) + .build()); + } + + private static Mono + requestAssociateBillingManagedOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .users() + .associateBillingManagedOrganization( + AssociateUserBillingManagedOrganizationRequest.builder() + .billingManagedOrganizationId(organizationId) + .userId(userId) + .build()); + } + + private static Mono + requestAssociateManagedOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .users() + .associateManagedOrganization( + AssociateUserManagedOrganizationRequest.builder() + .managedOrganizationId(organizationId) + .userId(userId) + .build()); + } + + private static Mono requestAssociateManagedSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .users() + .associateManagedSpace( + AssociateUserManagedSpaceRequest.builder() + .managedSpaceId(spaceId) + .userId(userId) + .build()); + } + + private static Mono requestAssociateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .users() + .associateOrganization( + AssociateUserOrganizationRequest.builder() + .organizationId(organizationId) + .userId(userId) + .build()); + } + + private static Mono requestAssociateOrganizationAuditor( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateAuditor( + AssociateOrganizationAuditorRequest.builder() + .auditorId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono + requestAssociateOrganizationBillingManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateBillingManager( + AssociateOrganizationBillingManagerRequest.builder() + .billingManagerId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestAssociateOrganizationManager( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .organizations() + .associateManager( + AssociateOrganizationManagerRequest.builder() + .managerId(userId) + .organizationId(organizationId) + .build()); + } + + private static Mono requestAssociateSpace( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .users() + .associateSpace( + AssociateUserSpaceRequest.builder() + .spaceId(spaceId) + .userId(userId) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizations() + .create( + CreateOrganizationRequest.builder() + .name(organizationName) + .status(STATUS_FILTER) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .organizationId(organizationId) + .name(spaceName) + .build()); + } + + private static Mono requestCreateUser( + CloudFoundryClient cloudFoundryClient, String userId) { + return cloudFoundryClient.users().create(CreateUserRequest.builder().uaaId(userId).build()); + } + + private static Mono requestCreateUser( + CloudFoundryClient cloudFoundryClient, String spaceId, String userId) { + return cloudFoundryClient + .users() + .create(CreateUserRequest.builder().defaultSpaceId(spaceId).uaaId(userId).build()); + } + + private static Flux requestListUsers(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .users() + .list(ListUsersRequest.builder().page(page).build())); + } + + private static Mono requestSummaryUser( + CloudFoundryClient cloudFoundryClient, String userId) { + return cloudFoundryClient + .users() + .summary(SummaryUserRequest.builder().userId(userId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/AdminTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/AdminTest.java new file mode 100644 index 00000000000..d185f15deac --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/AdminTest.java @@ -0,0 +1,55 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ApplicationUtils; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.admin.ClearBuildpackCacheRequest; +import org.cloudfoundry.util.JobUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class AdminTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + // The buildpacks cache needs to be non-empty for the DELETE call to succeed. + // We pull the "testLogCacheApp" bean, which ensures the bean will be initialized, + // the app will be pushed, and it will add some data to the cache. + @Autowired private Mono testLogCacheApp; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_10) + @Test + public void clearBuildpackCache() { + this.cloudFoundryClient + .adminV3() + .clearBuildpackCache(ClearBuildpackCacheRequest.builder().build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ApplicationsTest.java new file mode 100644 index 00000000000..ef3ea073c80 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ApplicationsTest.java @@ -0,0 +1,1616 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.v3.applications.ApplicationState.STARTED; +import static org.cloudfoundry.client.v3.applications.ApplicationState.STOPPED; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.io.IOException; +import java.time.Duration; +import java.time.Instant; +import java.util.Collections; +import java.util.Map; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.ApplicationFeatureResource; +import org.cloudfoundry.client.v3.applications.ApplicationRelationships; +import org.cloudfoundry.client.v3.applications.ApplicationResource; +import org.cloudfoundry.client.v3.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v3.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v3.applications.DeleteApplicationRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRelationshipRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentVariablesRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationEnvironmentVariablesResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationFeatureResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationPermissionsRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationPermissionsResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationResponse; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationSshEnabledResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationFeaturesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationRoutesRequest; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.applications.RestartApplicationRequest; +import org.cloudfoundry.client.v3.applications.ScaleApplicationRequest; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.SetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.StartApplicationRequest; +import org.cloudfoundry.client.v3.applications.StartApplicationResponse; +import org.cloudfoundry.client.v3.applications.StopApplicationRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationEnvironmentVariablesRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationFeatureRequest; +import org.cloudfoundry.client.v3.applications.UpdateApplicationRequest; +import org.cloudfoundry.client.v3.builds.BuildState; +import org.cloudfoundry.client.v3.builds.CreateBuildRequest; +import org.cloudfoundry.client.v3.builds.CreateBuildResponse; +import org.cloudfoundry.client.v3.builds.GetBuildRequest; +import org.cloudfoundry.client.v3.builds.GetBuildResponse; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.packages.CreatePackageRequest; +import org.cloudfoundry.client.v3.packages.CreatePackageResponse; +import org.cloudfoundry.client.v3.packages.GetPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageResponse; +import org.cloudfoundry.client.v3.packages.PackageRelationships; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.packages.UploadPackageRequest; +import org.cloudfoundry.client.v3.packages.UploadPackageResponse; +import org.cloudfoundry.client.v3.routes.Application; +import org.cloudfoundry.client.v3.routes.CreateRouteRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteResponse; +import org.cloudfoundry.client.v3.routes.Destination; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.RouteRelationships; +import org.cloudfoundry.client.v3.routes.RouteResource; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.DelayUtils; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.function.Tuples; + +@CleanupCloudFoundryAfterClass +public final class ApplicationsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono spaceId; + + @Test + public void create() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + this.cloudFoundryClient + .applicationsV3() + .create( + CreateApplicationRequest.builder() + .environmentVariable( + "test-create-env-key", + "test-create-env-value") + .metadata( + Metadata.builder() + .label( + "test-create-label-key", + "test-create-label-value") + .build()) + .name(applicationName) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + spaceId) + .build()) + .build()) + .build()) + .build()) + .map(CreateApplicationResponse::getId)) + .flatMap( + applicationId -> + requestGetApplication(this.cloudFoundryClient, applicationId)) + .map(response -> response.getMetadata().getLabels().get(("test-create-label-key"))) + .as(StepVerifier::create) + .expectNext("test-create-label-value") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .delayUntil( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .delete( + DeleteApplicationRequest.builder() + .applicationId(applicationId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap( + applicationId -> + requestGetApplications(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV3Exception.class) + .hasMessageMatching( + "CF-ResourceNotFound\\([0-9]+\\): App not found.*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .get( + GetApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .map(GetApplicationResponse::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getDropletAssociation() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + uploadPackageAndCreateDropletId( + this.cloudFoundryClient, applicationId))) + .delayUntil( + function( + (applicationId, dropletId) -> + requestSetDroplet( + this.cloudFoundryClient, applicationId, dropletId))) + .flatMap( + function( + (applicationId, dropletId) -> + Mono.zip( + Mono.just(dropletId), + this.cloudFoundryClient + .applicationsV3() + .getCurrentDropletRelationship( + GetApplicationCurrentDropletRelationshipRequest + .builder() + .applicationId( + applicationId) + .build()) + .map( + response -> + response.getData() + .getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("unchecked") + @Test + public void getEnvironment() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .getEnvironment( + GetApplicationEnvironmentRequest.builder() + .applicationId(applicationId) + .build())) + .map( + env -> + ((Map) + env.getApplicationEnvironmentVariables() + .get("VCAP_APPLICATION")) + .get("name")) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getFeature() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .getFeature( + GetApplicationFeatureRequest.builder() + .applicationId(applicationId) + .featureName("ssh") + .build())) + .as(StepVerifier::create) + .expectNext( + GetApplicationFeatureResponse.builder() + .description("Enable SSHing into the app.") + .enabled(true) + .name("ssh") + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_10) + @Test + public void getPermissions() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .getPermissions( + GetApplicationPermissionsRequest.builder() + .applicationId(applicationId) + .build())) + .as(StepVerifier::create) + .expectNext( + GetApplicationPermissionsResponse.builder() + .readBasicData(true) + .readSensitiveData(true) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getSshEnabled() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .getSshEnabled( + GetApplicationSshEnabledRequest.builder() + .applicationId(applicationId) + .build())) + .as(StepVerifier::create) + .expectNext( + GetApplicationSshEnabledResponse.builder().enabled(true).reason("").build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMapMany( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest + .builder() + .page(page) + .build())) + .filter(resource -> applicationId.equals(resource.getId()))) + .map(ApplicationResource::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutes() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + "listApplicationRoutes", + spaceId)))) + .flatMapMany( + function( + (applicationId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMap( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .build()))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutes-key", + "test-listApplicationRoutes-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutesByDomain() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "listApplicationRoutesByDomain", + spaceId)))) + .delayUntil( + function( + (applicationId, domainId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, domainId, ignore) -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .domainId(domainId) + .page(page) + .build())))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutesByDomain-key", + "test-listApplicationRoutesByDomain-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutesByHost() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + hostName, + "listApplicationRoutesByHost", + null, + null, + spaceId)))) + .flatMap( + function( + (applicationId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMapMany( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .host(hostName) + .page(page) + .build()))) + .filter( + route -> + route.getMetadata() + .getLabels() + .containsKey("test-listApplicationRoutesByHost-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutesByHost-key", + "test-listApplicationRoutesByHost-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutesByLabelSelector() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + "listApplicationRoutesByLabelSelector", + spaceId)))) + .flatMapMany( + function( + (applicationId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMap( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .labelSelector( + "test-listApplicationRoutesByLabelSelector-key=test-listApplicationRoutesByLabelSelector-value") + .page(page) + .build()))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutesByLabelSelector-key", + "test-listApplicationRoutesByLabelSelector-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutesByOrganizationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (domainId, organizationId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(organizationId), + createRouteId( + this.cloudFoundryClient, + domainId, + "listApplicationRoutesByOrganizationId", + spaceId)))) + .delayUntil( + function( + (applicationId, organizationId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, applicationId, routeId))) + .flatMapMany( + function( + (applicationId, organizationId, ignore) -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .organizationId( + organizationId) + .page(page) + .build())))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutesByOrganizationId-key", + "test-listApplicationRoutesByOrganizationId-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutesByPath() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String path = this.nameFactory.getPath(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + null, + "listApplicationRoutesByPath", + path, + null, + spaceId)))) + .flatMapMany( + function( + (applicationId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMap( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .path(path) + .page(page) + .build()))) + .filter( + route -> + route.getMetadata() + .getLabels() + .containsKey("test-listApplicationRoutesByPath-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutesByPath-key", + "test-listApplicationRoutesByPath-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listApplicationRoutesBySpaceId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + "listApplicationRoutesBySpaceId", + spaceId), + Mono.just(spaceId)))) + .delayUntil( + function( + (applicationId, routeId, spaceId) -> + requestReplaceDestinations( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMapMany( + function( + (applicationId, ignore, spaceId) -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listRoutes( + ListApplicationRoutesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .spaceId(spaceId) + .build())))) + .filter( + route -> + route.getMetadata() + .getLabels() + .containsKey("test-listApplicationRoutesBySpaceId-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listApplicationRoutesBySpaceId-key", + "test-listApplicationRoutesBySpaceId-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFeatures() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMapMany( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .listFeatures( + ListApplicationFeaturesRequest + .builder() + .applicationId( + applicationId) + .page(page) + .build()))) + .filter(resource -> "revisions".equals(resource.getName())) + .map(ApplicationFeatureResource::getDescription) + .as(StepVerifier::create) + .consumeNextWith( + description -> + assertThat(description) + .startsWith("Enable versioning of an application")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpaceId() { + String applicationName = this.nameFactory.getApplicationName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + Mono.zip( + Mono.just(spaceId), + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId))) + .flatMapMany( + function( + (spaceId, applicationId) -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest + .builder() + .spaceId(spaceId) + .page(page) + .build())))) + .map(ApplicationResource::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void scale() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .scale( + ScaleApplicationRequest.builder() + .applicationId(applicationId) + .diskInMb(404) + .type("web") + .build()) + .thenReturn(applicationId)) + .flatMap( + applicationId -> + requestApplicationProcess(this.cloudFoundryClient, applicationId)) + .map(GetApplicationProcessResponse::getDiskInMb) + .as(StepVerifier::create) + .expectNext(404) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setAndGetDroplet() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + uploadPackageAndCreateDropletId( + this.cloudFoundryClient, applicationId))) + .delayUntil( + function( + (applicationId, dropletId) -> + this.cloudFoundryClient + .applicationsV3() + .setCurrentDroplet( + SetApplicationCurrentDropletRequest + .builder() + .applicationId(applicationId) + .data( + Relationship.builder() + .id(dropletId) + .build()) + .build()))) + .flatMap( + function( + (applicationId, dropletId) -> + Mono.zip( + Mono.just(dropletId), + this.cloudFoundryClient + .applicationsV3() + .getCurrentDroplet( + GetApplicationCurrentDropletRequest + .builder() + .applicationId( + applicationId) + .build()) + .map( + GetApplicationCurrentDropletResponse + ::getId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void start() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .delayUntil( + applicationId -> + prepareApplicationToStart(this.cloudFoundryClient, applicationId)) + .delayUntil( + (applicationId -> + this.cloudFoundryClient + .applicationsV3() + .start( + StartApplicationRequest.builder() + .applicationId(applicationId) + .build()))) + .flatMap( + applicationId -> + requestGetApplication(this.cloudFoundryClient, applicationId)) + .map(GetApplicationResponse::getState) + .as(StepVerifier::create) + .expectNext(STARTED) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void restart() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .delayUntil( + applicationId -> + prepareApplicationToStart(this.cloudFoundryClient, applicationId)) + .delayUntil( + applicationId -> + requestStartApplication(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + requestApplicationProcess(this.cloudFoundryClient, applicationId) + .map(process -> Instant.parse(process.getUpdatedAt())) + .map(updatedAt -> Tuples.of(applicationId, updatedAt))) + .delayUntil( + function( + (applicationId, oldUpdatedAt) -> + this.cloudFoundryClient + .applicationsV3() + .restart( + RestartApplicationRequest.builder() + .applicationId(applicationId) + .build()) + .delaySubscription(Duration.ofSeconds(2)))) + .flatMap( + function( + (applicationId, oldUpdatedAt) -> + requestApplicationProcess( + this.cloudFoundryClient, applicationId) + .map( + process -> + Instant.parse( + process.getUpdatedAt())) + .map( + newUpdatedAt -> + Tuples.of( + oldUpdatedAt, newUpdatedAt)) + .delaySubscription(Duration.ofSeconds(2)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (oldUpdatedAt, newUpdatedAt) -> + assertThat(newUpdatedAt).isAfter(oldUpdatedAt))) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void stop() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .delayUntil( + applicationId -> + prepareApplicationToStart(this.cloudFoundryClient, applicationId)) + .delayUntil( + (applicationId -> + requestStartApplication(this.cloudFoundryClient, applicationId))) + .delayUntil( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .stop( + StopApplicationRequest.builder() + .applicationId(applicationId) + .build())) + .flatMap( + applicationId -> + requestGetApplication(this.cloudFoundryClient, applicationId)) + .map(GetApplicationResponse::getState) + .as(StepVerifier::create) + .expectNext(STOPPED) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .delayUntil( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .update( + UpdateApplicationRequest.builder() + .applicationId(applicationId) + .metadata( + Metadata.builder() + .label( + "test-update-key", + "test-update-value") + .build()) + .build())) + .flatMap( + applicationId -> + requestGetApplication(this.cloudFoundryClient, applicationId)) + .map(response -> response.getMetadata().getLabels()) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-update-key", "test-update-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateAndGetEnvironmentVariables() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .delayUntil( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .updateEnvironmentVariables( + UpdateApplicationEnvironmentVariablesRequest + .builder() + .applicationId(applicationId) + .var( + "test-updateEnv-key", + "test-updateEnv-key") + .build())) + .flatMap( + applicationId -> + this.cloudFoundryClient + .applicationsV3() + .getEnvironmentVariables( + GetApplicationEnvironmentVariablesRequest.builder() + .applicationId(applicationId) + .build())) + .map(GetApplicationEnvironmentVariablesResponse::getVars) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-updateEnv-key", "test-updateEnv-key")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateFeature() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getFeatureEnabled( + this.cloudFoundryClient, applicationId, "ssh"))) + .delayUntil( + function( + (applicationId, enabled) -> + this.cloudFoundryClient + .applicationsV3() + .updateFeature( + UpdateApplicationFeatureRequest.builder() + .applicationId(applicationId) + .enabled(!enabled) + .featureName("ssh") + .build()))) + .flatMap( + function( + (applicationId, enabled) -> + Mono.zip( + Mono.just(!enabled), + getFeatureEnabled( + this.cloudFoundryClient, + applicationId, + "ssh")))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, applicationName, spaceId) + .map(CreateApplicationResponse::getId); + } + + private static Mono createBuildId( + CloudFoundryClient cloudFoundryClient, String packageId) { + return requestCreateBuild(cloudFoundryClient, packageId).map(CreateBuildResponse::getId); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreateDomain(cloudFoundryClient, domainName, organizationId) + .map(CreateDomainResponse::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(CreateOrganizationResponse::getId); + } + + private static Mono createPackageId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestCreatePackage(cloudFoundryClient, applicationId) + .map(CreatePackageResponse::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, String label, String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, label, spaceId) + .map(CreateRouteResponse::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String label, + String path, + Integer port, + String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, host, label, path, port, spaceId) + .map(CreateRouteResponse::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Mono getFeatureEnabled( + CloudFoundryClient cloudFoundryClient, String applicationId, String featureName) { + return requestGetFeature(cloudFoundryClient, applicationId, featureName) + .map(GetApplicationFeatureResponse::getEnabled); + } + + private static Mono requestApplicationProcess( + CloudFoundryClient cloudFoundryClient, String applicationId) { + System.out.println(Instant.now()); + return cloudFoundryClient + .applicationsV3() + .getProcess( + GetApplicationProcessRequest.builder() + .applicationId(applicationId) + .type("web") + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return cloudFoundryClient + .applicationsV3() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateBuild( + CloudFoundryClient cloudFoundryClient, String packageId) { + return cloudFoundryClient + .builds() + .create( + CreateBuildRequest.builder() + .getPackage(Relationship.builder().id(packageId).build()) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .domainsV3() + .create( + CreateDomainRequest.builder() + .internal(false) + .name(domainName) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Mono requestCreatePackage( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .packages() + .create( + CreatePackageRequest.builder() + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(applicationId) + .build()) + .build()) + .build()) + .type(PackageType.BITS) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String label, + String path, + Integer port, + String spaceId) { + String key = String.format("test-%s-key", label); + String value = String.format("test-%s-value", label); + + return cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .host(host) + .metadata(Metadata.builder().label(key, value).build()) + .path(path) + .port(port) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(domainId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String label, String spaceId) { + String key = String.format("test-%s-key", label); + String value = String.format("test-%s-value", label); + + return cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .metadata(Metadata.builder().label(key, value).build()) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(domainId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestGetApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .get(GetApplicationRequest.builder().applicationId(applicationId).build()); + } + + private static Mono requestGetApplications( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .get(GetApplicationRequest.builder().applicationId(applicationId).build()); + } + + private static Mono requestGetBuild( + CloudFoundryClient cloudFoundryClient, String buildId) { + return cloudFoundryClient.builds().get(GetBuildRequest.builder().buildId(buildId).build()); + } + + private static Mono requestGetFeature( + CloudFoundryClient cloudFoundryClient, String applicationId, String featureName) { + return cloudFoundryClient + .applicationsV3() + .getFeature( + GetApplicationFeatureRequest.builder() + .applicationId(applicationId) + .featureName(featureName) + .build()); + } + + private static Mono requestGetPackage( + CloudFoundryClient cloudFoundryClient, String packageId) { + return cloudFoundryClient + .packages() + .get(GetPackageRequest.builder().packageId(packageId).build()); + } + + private static Mono requestReplaceDestinations( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .routesV3() + .replaceDestinations( + ReplaceRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .applicationId(applicationId) + .build()) + .build()) + .routeId(routeId) + .build()); + } + + private static Mono requestSetDroplet( + CloudFoundryClient cloudFoundryClient, String applicationId, String dropletId) { + return cloudFoundryClient + .applicationsV3() + .setCurrentDroplet( + SetApplicationCurrentDropletRequest.builder() + .applicationId(applicationId) + .data(Relationship.builder().id(dropletId).build()) + .build()); + } + + private static Mono requestStartApplication( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .start(StartApplicationRequest.builder().applicationId(applicationId).build()); + } + + private static Mono requestUploadPackage( + CloudFoundryClient cloudFoundryClient, String packageId) { + try { + return cloudFoundryClient + .packages() + .upload( + UploadPackageRequest.builder() + .bits( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .packageId(packageId) + .build()); + } catch (IOException e) { + throw new RuntimeException(e); + } + } + + private static Mono uploadPackageAndCreateDropletId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return createPackageId(cloudFoundryClient, applicationId) + .delayUntil(packageId -> requestUploadPackage(cloudFoundryClient, packageId)) + .delayUntil(packageId -> waitForPackageUpload(cloudFoundryClient, packageId)) + .flatMap(packageId -> createBuildId(cloudFoundryClient, packageId)) + .delayUntil(buildId -> waitForBuild(cloudFoundryClient, buildId)) + .flatMap(buildId -> requestGetBuild(cloudFoundryClient, buildId)) + .map(build -> build.getDroplet().getId()); + } + + private static Mono waitForBuild( + CloudFoundryClient cloudFoundryClient, String buildId) { + return requestGetBuild(cloudFoundryClient, buildId) + .filter(response -> BuildState.STAGED.equals(response.getState())) + .repeatWhenEmpty( + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5))); + } + + private static Mono waitForPackageUpload( + CloudFoundryClient cloudFoundryClient, String packageId) { + return requestGetPackage(cloudFoundryClient, packageId) + .filter(response -> PackageState.READY.equals(response.getState())) + .repeatWhenEmpty( + DelayUtils.exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5))); + } + + private Mono prepareApplicationToStart( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return uploadPackageAndCreateDropletId(cloudFoundryClient, applicationId) + .flatMap( + dropletId -> + requestSetDroplet(cloudFoundryClient, applicationId, dropletId)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/AuditEventsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/AuditEventsTest.java new file mode 100644 index 00000000000..873759568de --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/AuditEventsTest.java @@ -0,0 +1,225 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.auditevents.AuditEventResource; +import org.cloudfoundry.client.v3.auditevents.GetAuditEventRequest; +import org.cloudfoundry.client.v3.auditevents.GetAuditEventResponse; +import org.cloudfoundry.client.v3.auditevents.ListAuditEventsRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) +public final class AuditEventsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void get() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMapMany(organizationId -> getEventId(this.cloudFoundryClient, organizationId)) + .flatMap( + eventId -> + this.cloudFoundryClient + .auditEventsV3() + .get( + GetAuditEventRequest.builder() + .eventId(eventId) + .build())) + .map(GetAuditEventResponse::getType) + .as(StepVerifier::create) + .expectNext("audit.organization.create") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // Note: Basic list() test is omitted as the potential volume of data means it take several + // minutes, with little benefit over the listFilterBy... tests. + + @Test + public void lisFilterByOrganization() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .auditEventsV3() + .list( + ListAuditEventsRequest.builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .map(resource -> resource.getAuditEventTarget().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void lisFilterByType() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .auditEventsV3() + .list( + ListAuditEventsRequest.builder() + .type( + "audit.organization.create") + .page(page) + .build()))) + .map(resource -> resource.getAuditEventTarget().getName()) + .filter(organizationName::equals) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBySpace() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .auditEventsV3() + .list( + ListAuditEventsRequest.builder() + .page(page) + .spaceId(spaceId) + .build()))) + .map(resource -> resource.getAuditEventTarget().getName()) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByTarget() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .auditEventsV3() + .list( + ListAuditEventsRequest.builder() + .targetId(organizationId) + .page(page) + .build()))) + .map(resource -> resource.getAuditEventTarget().getName()) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(CreateOrganizationResponse::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Flux getEventId( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return requestListEvents(cloudFoundryClient, organizationId).map(AuditEventResource::getId); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Flux requestListEvents( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .auditEventsV3() + .list( + ListAuditEventsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/BuildpacksTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/BuildpacksTest.java new file mode 100644 index 00000000000..a6f1e733b5e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/BuildpacksTest.java @@ -0,0 +1,266 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.buildpacks.BuildpackResource; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.CreateBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.GetBuildpackResponse; +import org.cloudfoundry.client.v3.buildpacks.ListBuildpacksRequest; +import org.cloudfoundry.client.v3.buildpacks.UpdateBuildpackRequest; +import org.cloudfoundry.client.v3.buildpacks.UploadBuildpackRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class BuildpacksTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void create() { + String buildpackName = this.nameFactory.getBuildpackName(); + + this.cloudFoundryClient + .buildpacksV3() + .create( + CreateBuildpackRequest.builder() + .enabled(false) + .locked(true) + .name(buildpackName) + .position(2) + .build()) + .thenMany( + requestListBuildpacks(this.cloudFoundryClient, buildpackName) + .map(BuildpackResource::getName)) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacksV3() + .delete( + DeleteBuildpackRequest.builder() + .buildpackId(buildpackId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany(requestListBuildpacks(this.cloudFoundryClient, buildpackName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacksV3() + .get( + GetBuildpackRequest.builder() + .buildpackId(buildpackId) + .build())) + .map(GetBuildpackResponse::getName) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMapMany( + buildpackId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .buildpacksV3() + .list( + ListBuildpacksRequest + .builder() + .page(page) + .build())) + .filter( + resource -> + buildpackName.equals(resource.getName())) + .map(BuildpackResource::getPosition)) + .as(StepVerifier::create) + .expectNext(3) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMapMany( + buildpackId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .buildpacksV3() + .list( + ListBuildpacksRequest.builder() + .name(buildpackName) + .page(page) + .build()))) + .map(BuildpackResource::getName) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacksV3() + .update( + UpdateBuildpackRequest.builder() + .buildpackId(buildpackId) + .enabled(true) + .locked(true) + .position(4) + .build())) + .thenMany( + requestListBuildpacks(this.cloudFoundryClient, buildpackName) + .map(BuildpackResource::getPosition)) + .as(StepVerifier::create) + .expectNext(4) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void upload() throws IOException { + Path buildpack = new ClassPathResource("test-buildpack.zip").getFile().toPath(); + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacksV3() + .upload( + UploadBuildpackRequest.builder() + .bits(buildpack) + .buildpackId(buildpackId) + .build())) + .thenMany( + requestListBuildpacks(this.cloudFoundryClient, buildpackName) + .map(BuildpackResource::getName)) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void uploadDirectory() throws IOException { + Path buildpack = new ClassPathResource("test-buildpack").getFile().toPath(); + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpackId(this.cloudFoundryClient, buildpackName) + .flatMap( + buildpackId -> + this.cloudFoundryClient + .buildpacksV3() + .upload( + UploadBuildpackRequest.builder() + .bits(buildpack) + .buildpackId(buildpackId) + .build())) + .thenMany( + requestListBuildpacks(this.cloudFoundryClient, buildpackName) + .map(BuildpackResource::getName)) + .as(StepVerifier::create) + .expectNext(buildpackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createBuildpackId( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return requestCreateBuildpack(cloudFoundryClient, buildpackName) + .map(CreateBuildpackResponse::getId); + } + + private static Mono requestCreateBuildpack( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return cloudFoundryClient + .buildpacksV3() + .create( + CreateBuildpackRequest.builder() + .enabled(false) + .locked(false) + .name(buildpackName) + .position(3) + .build()); + } + + private static Flux requestListBuildpacks( + CloudFoundryClient cloudFoundryClient, String buildpackName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .buildpacksV3() + .list( + ListBuildpacksRequest.builder() + .name(buildpackName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/DeploymentsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/DeploymentsTest.java new file mode 100644 index 00000000000..d823ad7b1c1 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/DeploymentsTest.java @@ -0,0 +1,461 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.deployments.CancelDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.CreateDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.CreateDeploymentResponse; +import org.cloudfoundry.client.v3.deployments.DeploymentRelationships; +import org.cloudfoundry.client.v3.deployments.DeploymentResource; +import org.cloudfoundry.client.v3.deployments.DeploymentState; +import org.cloudfoundry.client.v3.deployments.DeploymentStatusReason; +import org.cloudfoundry.client.v3.deployments.DeploymentStatusValue; +import org.cloudfoundry.client.v3.deployments.GetDeploymentRequest; +import org.cloudfoundry.client.v3.deployments.ListDeploymentsRequest; +import org.cloudfoundry.operations.CloudFoundryOperations; +import org.cloudfoundry.operations.applications.ApplicationDetail; +import org.cloudfoundry.operations.applications.ApplicationHealthCheck; +import org.cloudfoundry.operations.applications.GetApplicationRequest; +import org.cloudfoundry.operations.applications.PushApplicationRequest; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_4) +@CleanupCloudFoundryAfterClass +public final class DeploymentsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_11) + public void cancel_2_11() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + Mono.zip( + Mono.just(applicationId), + createDeploymentId( + this.cloudFoundryClient, + applicationId, + dropletId)))) + .flatMap( + function( + (applicationId, deploymentId) -> + this.cloudFoundryClient + .deploymentsV3() + .cancel( + CancelDeploymentRequest.builder() + .deploymentId(deploymentId) + .build()) + .then(Mono.just(applicationId)))) + .flatMapMany( + applicationId -> + requestListDeployments(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .consumeNextWith( + deploymentResource -> + assertThat(deploymentResource.getStatus().getReason()) + .isIn( + DeploymentStatusReason.CANCELED, + DeploymentStatusReason.CANCELING)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("deprecation") + @Test + @IfCloudFoundryVersion(lessThanOrEqualTo = CloudFoundryVersion.PCF_2_10) + public void cancel() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + Mono.zip( + Mono.just(applicationId), + createDeploymentId( + this.cloudFoundryClient, + applicationId, + dropletId)))) + .flatMap( + function( + (applicationId, deploymentId) -> + this.cloudFoundryClient + .deploymentsV3() + .cancel( + CancelDeploymentRequest.builder() + .deploymentId(deploymentId) + .build()) + .then(Mono.just(applicationId)))) + .flatMapMany( + applicationId -> + requestListDeployments(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .consumeNextWith( + deploymentResource -> + assertThat(deploymentResource.getState()) + .isIn(DeploymentState.CANCELING, DeploymentState.CANCELED)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + this.cloudFoundryClient + .deploymentsV3() + .create( + CreateDeploymentRequest.builder() + .droplet( + Relationship.builder() + .id(dropletId) + .build()) + .relationships( + DeploymentRelationships + .builder() + .app( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + applicationId) + .build()) + .build()) + .build()) + .build()) + .then(Mono.just(applicationId)))) + .flatMapMany( + applicationId -> + requestListDeployments(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createDeploymentId( + this.cloudFoundryClient, applicationId, dropletId))) + .flatMap( + deploymentId -> + this.cloudFoundryClient + .deploymentsV3() + .get( + GetDeploymentRequest.builder() + .deploymentId(deploymentId) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createDeploymentId( + this.cloudFoundryClient, applicationId, dropletId))) + .flatMapMany( + deploymentId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .deploymentsV3() + .list( + ListDeploymentsRequest + .builder() + .page(page) + .build())) + .filter(resource -> deploymentId.equals(resource.getId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByApplication() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + requestCreateDeployment( + this.cloudFoundryClient, + applicationId, + dropletId) + .then(Mono.just(applicationId)))) + .flatMapMany( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .deploymentsV3() + .list( + ListDeploymentsRequest.builder() + .applicationId( + applicationId) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByState() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createDeploymentId( + this.cloudFoundryClient, applicationId, dropletId))) + .flatMapMany( + deploymentId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .deploymentsV3() + .list( + ListDeploymentsRequest + .builder() + .states( + DeploymentState + .DEPLOYED, + DeploymentState + .DEPLOYING) + .page(page) + .build())) + .filter(resource -> deploymentId.equals(resource.getId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void listFilterByStatusValues() throws Exception { + String name = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplicationId(this.cloudFoundryOperations, name, path) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createDeploymentId( + this.cloudFoundryClient, applicationId, dropletId))) + .flatMapMany( + deploymentId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .deploymentsV3() + .list( + ListDeploymentsRequest + .builder() + .statusValues( + DeploymentStatusValue + .DEPLOYING, + DeploymentStatusValue + .ACTIVE) + .page(page) + .build())) + .filter(resource -> deploymentId.equals(resource.getId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryOperations cloudFoundryOperations, String name, Path path) { + return requestCreateApplication(cloudFoundryOperations, name, path) + .then(getApplicationId(cloudFoundryOperations, name)); + } + + private static Mono createDeploymentId( + CloudFoundryClient cloudFoundryClient, String applicationId, String dropletId) { + return requestCreateDeployment(cloudFoundryClient, applicationId, dropletId) + .map(CreateDeploymentResponse::getId); + } + + private static Mono getApplicationId( + CloudFoundryOperations cloudFoundryOperations, String name) { + return cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(name).build()) + .map(ApplicationDetail::getId); + } + + private static Mono getDropletId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestCurrentDroplet(cloudFoundryClient, applicationId) + .map(GetApplicationCurrentDropletResponse::getId); + } + + private static Mono requestCreateApplication( + CloudFoundryOperations cloudFoundryOperations, String name, Path path) { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path(path) + .buildpack("staticfile_buildpack") + .diskQuota(256) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(name) + .noStart(false) + .build()); + } + + private static Mono requestCreateDeployment( + CloudFoundryClient cloudFoundryClient, String applicationId, String dropletId) { + return cloudFoundryClient + .deploymentsV3() + .create( + CreateDeploymentRequest.builder() + .droplet(Relationship.builder().id(dropletId).build()) + .relationships( + DeploymentRelationships.builder() + .app( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(applicationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCurrentDroplet( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .getCurrentDroplet( + GetApplicationCurrentDropletRequest.builder() + .applicationId(applicationId) + .build()); + } + + private static Flux requestListDeployments( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .deploymentsV3() + .list( + ListDeploymentsRequest.builder() + .applicationId(applicationId) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/DomainsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/DomainsTest.java new file mode 100644 index 00000000000..45925ac902f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/DomainsTest.java @@ -0,0 +1,744 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesRequest; +import org.cloudfoundry.client.v3.domains.CheckReservedRoutesResponse; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DeleteDomainRequest; +import org.cloudfoundry.client.v3.domains.Domain; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.domains.DomainResource; +import org.cloudfoundry.client.v3.domains.GetDomainRequest; +import org.cloudfoundry.client.v3.domains.GetDomainResponse; +import org.cloudfoundry.client.v3.domains.ListDomainsRequest; +import org.cloudfoundry.client.v3.domains.ShareDomainRequest; +import org.cloudfoundry.client.v3.domains.ShareDomainResponse; +import org.cloudfoundry.client.v3.domains.UnshareDomainRequest; +import org.cloudfoundry.client.v3.domains.UpdateDomainRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteResponse; +import org.cloudfoundry.client.v3.routes.RouteRelationships; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) +public final class DomainsTest extends AbstractIntegrationTest { + + private static final Logger LOGGER = LoggerFactory.getLogger(DomainsTest.class); + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono spaceId; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void checkReservedRoutes() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + createDomainId(this.cloudFoundryClient, domainName, organizationId)) + .flatMap( + domainId -> + this.cloudFoundryClient + .domainsV3() + .checkReservedRoutes( + CheckReservedRoutesRequest.builder() + .domainId(domainId) + .build())) + .as(StepVerifier::create) + .expectNext(CheckReservedRoutesResponse.builder().matchingRoute(false).build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void checkReservedRoutesByHost() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + hostName, + null, + null, + spaceId) + .thenReturn(domainId))) + .flatMap( + domainId -> + this.cloudFoundryClient + .domainsV3() + .checkReservedRoutes( + CheckReservedRoutesRequest.builder() + .domainId(domainId) + .host(hostName) + .build())) + .as(StepVerifier::create) + .expectNext(CheckReservedRoutesResponse.builder().matchingRoute(true).build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void checkReservedRoutesByPath() { + String domainName = this.nameFactory.getDomainName(); + String path = this.nameFactory.getPath(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + null, + path, + null, + spaceId) + .thenReturn(domainId))) + .flatMap( + domainId -> + this.cloudFoundryClient + .domainsV3() + .checkReservedRoutes( + CheckReservedRoutesRequest.builder() + .domainId(domainId) + .path(path) + .build())) + .as(StepVerifier::create) + .expectNext(CheckReservedRoutesResponse.builder().matchingRoute(true).build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // TODO: Establish router group availability. This test has not been verified. + public void checkReservedRoutesByPort() { + String domainName = this.nameFactory.getDomainName(); + Integer port = this.nameFactory.getPort(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + null, + null, + port, + spaceId) + .thenReturn(domainId))) + .flatMap( + domainId -> + this.cloudFoundryClient + .domainsV3() + .checkReservedRoutes( + CheckReservedRoutesRequest.builder() + .domainId(domainId) + .port(port) + .build())) + .as(StepVerifier::create) + .expectNext(CheckReservedRoutesResponse.builder().matchingRoute(true).build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String path, + Integer port, + String spaceId) { + + return cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .host(host) + .path(path) + .port(port) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(domainId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_6) + @Test + public void create() { + String domainName = this.nameFactory.getDomainName(); + + this.cloudFoundryClient + .domainsV3() + .create(CreateDomainRequest.builder().internal(false).name(domainName).build()) + .as(StepVerifier::create) + .consumeNextWith(globalDomainNameEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_6) + @Test + public void createForAnOrganization() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + this.cloudFoundryClient + .domainsV3() + .create( + CreateDomainRequest.builder() + .name(domainName) + .relationships( + DomainRelationships + .builder() + .organization( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + organizationId) + .build()) + .build()) + .build()) + .build()), + Mono.just(organizationId))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (response, organizationId) -> { + assertThat(response.getName()).isEqualTo(domainName); + assertThat( + response.getRelationships() + .getOrganization() + .getData() + .getId()) + .isEqualTo(organizationId); + assertThat( + response.getRelationships() + .getSharedOrganizations() + .getData()) + .isEmpty(); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void delete() { + String domainName = this.nameFactory.getDomainName(); + + createDomainId(this.cloudFoundryClient, domainName) + .delayUntil( + domainId -> + this.cloudFoundryClient + .domainsV3() + .delete( + DeleteDomainRequest.builder() + .domainId(domainId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMap(domainId -> requestGetDomain(this.cloudFoundryClient, domainId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV3Exception.class) + .hasMessageMatching( + "CF-ResourceNotFound\\([0-9]+\\): Domain not" + + " found.*")) + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_6) + @Test + public void get() { + String domainName = this.nameFactory.getDomainName(); + + createDomainId(this.cloudFoundryClient, domainName) + .flatMap( + domainId -> + this.cloudFoundryClient + .domainsV3() + .get(GetDomainRequest.builder().domainId(domainId).build())) + .as(StepVerifier::create) + .consumeNextWith(globalDomainNameEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_6) + @Test + public void list() { + String domainName = this.nameFactory.getDomainName(); + + createDomainId(this.cloudFoundryClient, domainName) + .flatMap( + domainId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .domainsV3() + .list( + ListDomainsRequest.builder() + .page(page) + .build())) + .filter(resource -> domainId.equals(resource.getId())) + .single()) + .as(StepVerifier::create) + .consumeNextWith(globalDomainNameEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void listFilterById() { + String domainName = this.nameFactory.getDomainName(); + + createDomainId(this.cloudFoundryClient, domainName) + .flatMapMany( + domainId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .domainsV3() + .list( + ListDomainsRequest.builder() + .domainId(domainId) + .page(page) + .build()))) + .as(StepVerifier::create) + .consumeNextWith(globalDomainNameEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void listFilterByName() { + String domainName = this.nameFactory.getDomainName(); + + createDomainId(this.cloudFoundryClient, domainName) + .flatMap( + domainId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .domainsV3() + .list( + ListDomainsRequest.builder() + .name(domainName) + .page(page) + .build())) + .filter(resource -> domainId.equals(resource.getId())) + .single()) + .as(StepVerifier::create) + .consumeNextWith(globalDomainNameEquality(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void listFilterByOwningOrganizationId() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId))) + .flatMap( + function( + (organizationId, domainId) -> + Mono.zip( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .domainsV3() + .list( + ListDomainsRequest + .builder() + .owningOrganizationId( + organizationId) + .page( + page) + .build())) + .filter( + resource -> + domainId.equals( + resource.getId())) + .single(), + Mono.just(organizationId)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (response, organizationId) -> { + assertThat(response.getName()).isEqualTo(domainName); + assertThat( + response.getRelationships() + .getOrganization() + .getData() + .getId()) + .isEqualTo(organizationId); + assertThat( + response.getRelationships() + .getSharedOrganizations() + .getData()) + .isEmpty(); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void share() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, organizationName))) + .delayUntil( + function( + (organizationId, domainId, newOrganizationId) -> + this.cloudFoundryClient + .domainsV3() + .share( + ShareDomainRequest.builder() + .domainId(domainId) + .data( + Relationship.builder() + .id( + newOrganizationId) + .build()) + .build()))) + .flatMap( + function( + (organizationId, domainId, newOrganizationId) -> + Mono.zip( + requestGetDomain(this.cloudFoundryClient, domainId), + Mono.just(organizationId), + Mono.just(newOrganizationId)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (response, organizationId, newOrganizationId) -> { + assertThat(response.getName()).isEqualTo(domainName); + assertThat( + response.getRelationships() + .getOrganization() + .getData() + .getId()) + .isEqualTo(organizationId); + assertThat( + response.getRelationships() + .getSharedOrganizations() + .getData() + .get(0) + .getId()) + .isEqualTo(newOrganizationId); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void unshare() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createOrganizationId( + this.cloudFoundryClient, organizationName))) + .doOnSuccess( + T -> + LOGGER.info( + "OrganizationId: {}, domainId: {}, newOrganizationId: {}", + T.getT1(), + T.getT2(), + T.getT3())) + .delayUntil( + function( + (organizationId, domainId, newOrganizationId) -> + requestShareDomain( + this.cloudFoundryClient, + domainId, + newOrganizationId))) + .delayUntil( + function( + (organizationId, domainId, newOrganizationId) -> + this.cloudFoundryClient + .domainsV3() + .unshare( + UnshareDomainRequest.builder() + .domainId(domainId) + .organizationId(newOrganizationId) + .build()))) + .flatMapMany( + function( + (organizationId, domainId, newOrganizationId) -> + requestListDomainsForOrganization( + this.cloudFoundryClient, newOrganizationId) + .filter( + resource -> + domainId.equals(resource.getId())))) + .as(StepVerifier::create) + .expectNextCount(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void update() { + String domainName = this.nameFactory.getDomainName(); + + createDomainId(this.cloudFoundryClient, domainName) + .flatMap( + domainId -> + this.cloudFoundryClient + .domainsV3() + .update( + UpdateDomainRequest.builder() + .domainId(domainId) + .metadata( + Metadata.builder() + .annotation( + "annotationKey", + "annotationValue") + .label( + "labelKey", + "labelValue") + .build()) + .build())) + .thenMany(requestListDomains(this.cloudFoundryClient, domainName)) + .map(DomainResource::getMetadata) + .as(StepVerifier::create) + .consumeNextWith( + metadata -> { + assertThat(metadata.getAnnotations().get("annotationKey")) + .isEqualTo("annotationValue"); + assertThat(metadata.getLabels().get("labelKey")) + .isEqualTo("labelValue"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName) { + return requestCreateDomain(cloudFoundryClient, domainName).map(CreateDomainResponse::getId); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreateDomain(cloudFoundryClient, domainName, organizationId) + .map(CreateDomainResponse::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()) + .map(CreateOrganizationResponse::getId); + } + + private static Consumer globalDomainNameEquality(String domainName) { + return response -> { + assertThat(response.getName()).isEqualTo(domainName); + assertThat(response.getRelationships().getOrganization().getData()).isNull(); + assertThat(response.getRelationships().getSharedOrganizations().getData()).isEmpty(); + }; + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName) { + return cloudFoundryClient + .domainsV3() + .create(CreateDomainRequest.builder().internal(false).name(domainName).build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .domainsV3() + .create( + CreateDomainRequest.builder() + .name(domainName) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestGetDomain( + CloudFoundryClient cloudFoundryClient, String domainId) { + return cloudFoundryClient + .domainsV3() + .get(GetDomainRequest.builder().domainId(domainId).build()); + } + + private static Flux requestListDomains( + CloudFoundryClient cloudFoundryClient, String domainName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .domainsV3() + .list( + ListDomainsRequest.builder() + .name(domainName) + .page(page) + .build())); + } + + private static Flux requestListDomainsForOrganization( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Mono requestShareDomain( + CloudFoundryClient cloudFoundryClient, String domainId, String organizationId) { + return cloudFoundryClient + .domainsV3() + .share( + ShareDomainRequest.builder() + .domainId(domainId) + .data(Relationship.builder().id(organizationId).build()) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/IsolationSegmentsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/IsolationSegmentsTest.java new file mode 100644 index 00000000000..0f0a56fc1cd --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/IsolationSegmentsTest.java @@ -0,0 +1,623 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v2.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementResponse; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentResponse; +import org.cloudfoundry.client.v3.isolationsegments.DeleteIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.GetIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.GetIsolationSegmentResponse; +import org.cloudfoundry.client.v3.isolationsegments.IsolationSegmentResource; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentEntitledOrganizationsRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentOrganizationsRelationshipRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.isolationsegments.ListIsolationSegmentsRequest; +import org.cloudfoundry.client.v3.isolationsegments.RemoveIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.UpdateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentResponse; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_11) +public final class IsolationSegmentsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void addOrganizationEntitlement() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip( + createIsolationSegmentId(this.cloudFoundryClient, isolationSegmentName), + createOrganizationId(this.cloudFoundryClient, organizationName)) + .flatMap( + function( + (isolationSegmentId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .isolationSegments() + .addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest + .builder() + .data( + Relationship + .builder() + .id( + organizationId) + .build()) + .isolationSegmentId( + isolationSegmentId) + .build()) + .map( + response -> + response.getData() + .get(0) + .getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + + this.cloudFoundryClient + .isolationSegments() + .create(CreateIsolationSegmentRequest.builder().name(isolationSegmentName).build()) + .thenMany( + requestListIsolationSegments(this.cloudFoundryClient, isolationSegmentName)) + .map(IsolationSegmentResource::getName) + .as(StepVerifier::create) + .expectNext(isolationSegmentName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + + createIsolationSegmentId(this.cloudFoundryClient, isolationSegmentName) + .flatMap( + isolationSegmentId -> + this.cloudFoundryClient + .isolationSegments() + .delete( + DeleteIsolationSegmentRequest.builder() + .isolationSegmentId(isolationSegmentId) + .build())) + .thenMany( + requestListIsolationSegments(this.cloudFoundryClient, isolationSegmentName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + + createIsolationSegmentId(this.cloudFoundryClient, isolationSegmentName) + .flatMap( + isolationSegmentId -> + this.cloudFoundryClient + .isolationSegments() + .get( + GetIsolationSegmentRequest.builder() + .isolationSegmentId(isolationSegmentId) + .build()) + .map(GetIsolationSegmentResponse::getName)) + .as(StepVerifier::create) + .expectNext(isolationSegmentName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + + requestCreateIsolationSegment(this.cloudFoundryClient, isolationSegmentName) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .list( + ListIsolationSegmentsRequest.builder() + .page(page) + .build()))) + .filter(response -> isolationSegmentName.equals(response.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listEntitledOrganizations() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + Mono.just(organizationId))) + .flatMapMany( + function( + (isolationSegmentId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .listEntitledOrganizations( + ListIsolationSegmentEntitledOrganizationsRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .page( + page) + .build())) + .map(OrganizationResource::getId) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listEntitledOrganizationsFilterByName() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + Mono.just(organizationId))) + .flatMapMany( + function( + (isolationSegmentId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .listEntitledOrganizations( + ListIsolationSegmentEntitledOrganizationsRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .name( + organizationName) + .page( + page) + .build())) + .map(OrganizationResource::getId) + .single()))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterById() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + + createIsolationSegmentId(this.cloudFoundryClient, isolationSegmentName) + .flatMapMany( + isolationSegmentId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .list( + ListIsolationSegmentsRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .page(page) + .build())) + .map(IsolationSegmentResource::getName)) + .as(StepVerifier::create) + .expectNext(isolationSegmentName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + + requestCreateIsolationSegment(this.cloudFoundryClient, isolationSegmentName) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .list( + ListIsolationSegmentsRequest.builder() + .name(isolationSegmentName) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId) + .thenReturn(organizationId)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .list( + ListIsolationSegmentsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter(resource -> isolationSegmentName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationsRelationship() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + Mono.just(organizationId), + Mono.just(spaceId)))) + .flatMap( + function( + (isolationSegmentId, organizationId, spaceId) -> + Mono.zip( + requestAssignIsolationSegment( + this.cloudFoundryClient, + isolationSegmentId, + spaceId) + .thenReturn(isolationSegmentId), + Mono.just(organizationId)))) + .flatMapMany( + function( + (isolationSegmentId, organizationId) -> + Mono.zip( + Mono.just(organizationId), + this.cloudFoundryClient + .isolationSegments() + .listOrganizationsRelationship( + ListIsolationSegmentOrganizationsRelationshipRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .build()) + .map( + response -> + response.getData() + .get(0) + .getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpacesRelationship() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + Mono.just(spaceId)))) + .delayUntil( + function( + (isolationSegmentId, spaceId) -> + requestAssignIsolationSegment( + this.cloudFoundryClient, + isolationSegmentId, + spaceId))) + .flatMapMany( + function( + (isolationSegmentId, spaceId) -> + Mono.zip( + Mono.just(spaceId), + this.cloudFoundryClient + .isolationSegments() + .listSpacesRelationship( + ListIsolationSegmentSpacesRelationshipRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .build()) + .map( + response -> + response.getData() + .get(0) + .getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeOrganizationEntitlement() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + Mono.zip( + createIsolationSegmentId(this.cloudFoundryClient, isolationSegmentName), + createOrganizationId(this.cloudFoundryClient, organizationName)) + .delayUntil( + function( + (isolationSegmentId, organizationId) -> + requestAddOrganizationEntitlement( + this.cloudFoundryClient, + isolationSegmentId, + organizationId))) + .flatMap( + function( + (isolationSegmentId, organizationId) -> + this.cloudFoundryClient + .isolationSegments() + .removeOrganizationEntitlement( + RemoveIsolationSegmentOrganizationEntitlementRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .organizationId(organizationId) + .build()) + .thenReturn(isolationSegmentId))) + .flatMapMany( + isolationSegmentId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .isolationSegments() + .listEntitledOrganizations( + ListIsolationSegmentEntitledOrganizationsRequest + .builder() + .isolationSegmentId( + isolationSegmentId) + .build()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String isolationSegmentName1 = this.nameFactory.getIsolationSegmentName(); + String isolationSegmentName2 = this.nameFactory.getIsolationSegmentName(); + + createIsolationSegmentId(this.cloudFoundryClient, isolationSegmentName1) + .flatMap( + isolationSegmentId -> + this.cloudFoundryClient + .isolationSegments() + .update( + UpdateIsolationSegmentRequest.builder() + .isolationSegmentId(isolationSegmentId) + .name(isolationSegmentName2) + .build())) + .thenMany( + requestListIsolationSegments( + this.cloudFoundryClient, isolationSegmentName2)) + .map(IsolationSegmentResource::getName) + .as(StepVerifier::create) + .expectNext(isolationSegmentName2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createEntitledIsolationSegmentId( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentName, + String organizationId) { + return createIsolationSegmentId(cloudFoundryClient, isolationSegmentName) + .delayUntil( + isolationSegmentId -> + requestAddIsolationSegmentOrganizationEntitlement( + cloudFoundryClient, isolationSegmentId, organizationId)); + } + + private static Mono createIsolationSegmentId( + CloudFoundryClient cloudFoundryClient, String isolationSegmentName) { + return requestCreateIsolationSegment(cloudFoundryClient, isolationSegmentName) + .map(CreateIsolationSegmentResponse::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(ResourceUtils::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono + requestAddIsolationSegmentOrganizationEntitlement( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentId, + String organizationId) { + return cloudFoundryClient + .isolationSegments() + .addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId(isolationSegmentId) + .data(Relationship.builder().id(organizationId).build()) + .build()); + } + + private static Mono + requestAddOrganizationEntitlement( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentId, + String organizationId) { + return cloudFoundryClient + .isolationSegments() + .addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .data(Relationship.builder().id(organizationId).build()) + .isolationSegmentId(isolationSegmentId) + .build()); + } + + private static Mono requestAssignIsolationSegment( + CloudFoundryClient cloudFoundryClient, String isolationSegmentId, String spaceId) { + return cloudFoundryClient + .spacesV3() + .assignIsolationSegment( + AssignSpaceIsolationSegmentRequest.builder() + .data(Relationship.builder().id(isolationSegmentId).build()) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateIsolationSegment( + CloudFoundryClient cloudFoundryClient, String isolationSegmentName) { + return cloudFoundryClient + .isolationSegments() + .create(CreateIsolationSegmentRequest.builder().name(isolationSegmentName).build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizations() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } + + private static Flux requestListIsolationSegments( + CloudFoundryClient cloudFoundryClient, String isolationSegmentName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .isolationSegments() + .list( + ListIsolationSegmentsRequest.builder() + .name(isolationSegmentName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotasTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotasTest.java new file mode 100644 index 00000000000..e719fcc1b2b --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationQuotasTest.java @@ -0,0 +1,278 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import java.util.List; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.Organization; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.cloudfoundry.client.v3.quotas.organizations.*; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) +public final class OrganizationQuotasTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void create() { + String organizationQuotaName = this.nameFactory.getQuotaDefinitionName(); + Apps organizationQuotaAppLimits = + Apps.builder() + .perProcessMemoryInMb(1024) + .totalMemoryInMb(2048) + .logRateLimitInBytesPerSecond(0) + .build(); + Services organizationQuotaServiceLimits = + Services.builder().isPaidServicesAllowed(false).totalServiceInstances(10).build(); + Routes organizationQuotaRouteLimits = Routes.builder().totalRoutes(10).build(); + this.cloudFoundryClient + .organizationQuotasV3() + .create( + CreateOrganizationQuotaRequest.builder() + .name(organizationQuotaName) + .apps(organizationQuotaAppLimits) + .services(organizationQuotaServiceLimits) + .routes(organizationQuotaRouteLimits) + .build()) + .thenMany( + requestListOrganizationQuotas( + this.cloudFoundryClient, organizationQuotaName)) + .single() + .as(StepVerifier::create) + .assertNext( + organizationQuotaResource -> { + assertThat(organizationQuotaResource).isNotNull(); + assertThat(organizationQuotaResource.getId()).isNotNull(); + assertThat(organizationQuotaResource.getName()) + .isEqualTo(organizationQuotaName); + assertThat(organizationQuotaResource.getApps()) + .isEqualTo(organizationQuotaAppLimits); + assertThat(organizationQuotaResource.getServices()) + .isEqualTo(organizationQuotaServiceLimits); + assertThat(organizationQuotaResource.getRoutes()) + .isEqualTo(organizationQuotaRouteLimits); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String organizationQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createOrganizationQuotaId(this.cloudFoundryClient, organizationQuotaName) + .flatMap( + organizationQuotaId -> + this.cloudFoundryClient + .organizationQuotasV3() + .delete( + DeleteOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany( + requestListOrganizationQuotas( + this.cloudFoundryClient, organizationQuotaName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String organizationQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createOrganizationQuotaId(this.cloudFoundryClient, organizationQuotaName) + .flatMap( + organizationQuotaId -> + this.cloudFoundryClient + .organizationQuotasV3() + .get( + GetOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) + .build())) + .map(GetOrganizationQuotaResponse::getName) + .as(StepVerifier::create) + .expectNext(organizationQuotaName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String organizationQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createOrganizationQuota(this.cloudFoundryClient, organizationQuotaName) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationQuotasV3() + .list( + ListOrganizationQuotasRequest.builder() + .page(page) + .build()))) + .filter(resource -> organizationQuotaName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String organizationQuotaName = this.nameFactory.getQuotaDefinitionName(); + int totalMemoryLimit = 64 * 1024; // 64 GB + + createOrganizationQuotaId(this.cloudFoundryClient, organizationQuotaName) + .flatMap( + organizationQuotaId -> + this.cloudFoundryClient + .organizationQuotasV3() + .update( + UpdateOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) + .apps( + Apps.builder() + .totalMemoryInMb( + totalMemoryLimit) + .build()) + .routes( + Routes.builder() + .totalRoutes(100) + .build()) + .services( + Services.builder() + .isPaidServicesAllowed(true) + .totalServiceInstances(100) + .build()) + .build())) + .thenMany( + requestListOrganizationQuotas( + this.cloudFoundryClient, organizationQuotaName)) + .as(StepVerifier::create) + .consumeNextWith( + organizationQuotaResource -> { + assertThat(organizationQuotaResource.getApps().getTotalMemoryInMb()) + .isEqualTo(totalMemoryLimit); + assertThat(organizationQuotaResource.getRoutes().getTotalRoutes()) + .isEqualTo(100); + assertThat( + organizationQuotaResource + .getServices() + .getTotalServiceInstances()) + .isEqualTo(100); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void apply() { + String orgName = this.nameFactory.getOrganizationName(); + String organizationId = createOrganization(this.cloudFoundryClient, orgName).getId(); + Relationship organizationRelationship1 = Relationship.builder().id(organizationId).build(); + ToManyRelationship organizationRelationships = + ToManyRelationship.builder().data(organizationRelationship1).build(); + + String organizationQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createOrganizationQuotaId(this.cloudFoundryClient, organizationQuotaName) + .flatMap( + organizationQuotaId -> { + ApplyOrganizationQuotaRequest applyOrganizationQuotaRequest = + ApplyOrganizationQuotaRequest.builder() + .organizationQuotaId(organizationQuotaId) + .organizationRelationships(organizationRelationships) + .build(); + return this.cloudFoundryClient + .organizationQuotasV3() + .apply(applyOrganizationQuotaRequest); + }) + .as(StepVerifier::create) + .consumeNextWith( + applyOrganizationQuotaResponse -> { + List organizationRelationshipsData = + applyOrganizationQuotaResponse + .organizationRelationships() + .getData(); + assertThat(organizationRelationshipsData.size()).isEqualTo(1); + assertThat(organizationRelationshipsData.get(0).getId()) + .isEqualTo(organizationId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createOrganizationQuotaId( + CloudFoundryClient cloudFoundryClient, String organizationQuotaName) { + return createOrganizationQuota(cloudFoundryClient, organizationQuotaName) + .map(CreateOrganizationQuotaResponse::getId); + } + + private static Mono createOrganizationQuota( + CloudFoundryClient cloudFoundryClient, String organizationQuotaName) { + return cloudFoundryClient + .organizationQuotasV3() + .create( + CreateOrganizationQuotaRequest.builder() + .name(organizationQuotaName) + .build()); + } + + private static Flux requestListOrganizationQuotas( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .organizationQuotasV3() + .list( + ListOrganizationQuotasRequest.builder() + .name(organizationName) + .page(page) + .build())); + } + + private static Organization createOrganization( + CloudFoundryClient cloudFoundryClient, String orgName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(orgName).build()) + .block(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java new file mode 100644 index 00000000000..a1fbd52f3df --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/OrganizationsTest.java @@ -0,0 +1,663 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ApplicationUtils; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementResponse; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.AssignOrganizationDefaultIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.AssignOrganizationDefaultIsolationSegmentResponse; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.DeleteOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultDomainRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultDomainResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationDefaultIsolationSegmentRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationResponse; +import org.cloudfoundry.client.v3.organizations.GetOrganizationUsageSummaryRequest; +import org.cloudfoundry.client.v3.organizations.GetOrganizationUsageSummaryResponse; +import org.cloudfoundry.client.v3.organizations.ListOrganizationDomainsRequest; +import org.cloudfoundry.client.v3.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v3.organizations.OrganizationResource; +import org.cloudfoundry.client.v3.organizations.UpdateOrganizationRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) +public final class OrganizationsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void assignDefaultIsolationSegment() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + Mono.just(organizationId))) + .flatMap( + function( + (isolationSegmentId, organizationId) -> + Mono.zip( + Mono.just(isolationSegmentId), + this.cloudFoundryClient + .organizationsV3() + .assignDefaultIsolationSegment( + AssignOrganizationDefaultIsolationSegmentRequest + .builder() + .organizationId( + organizationId) + .data( + Relationship + .builder() + .id( + isolationSegmentId) + .build()) + .build()) + .map(r -> r.getData().getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String organizationName = this.nameFactory.getOrganizationName(); + + this.cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()) + .thenMany(requestListOrganizations(this.cloudFoundryClient, organizationName)) + .single() + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) + @Test + public void delete() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizationsV3() + .delete( + DeleteOrganizationRequest.builder() + .organizationId(organizationId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany(requestListOrganizations(this.cloudFoundryClient, organizationName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizationsV3() + .get( + GetOrganizationRequest.builder() + .organizationId(organizationId) + .build())) + .map(GetOrganizationResponse::getName) + .as(StepVerifier::create) + .expectNext(organizationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_7) + @Test + public void getDefaultDomain() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizationsV3() + .getDefaultDomain( + GetOrganizationDefaultDomainRequest.builder() + .organizationId(organizationId) + .build())) + .map(GetOrganizationDefaultDomainResponse::getName) + .as(StepVerifier::create) + .consumeNextWith( + name -> assertThat(name).contains("apps.", ".shepherd.tanzu.broadcom.net")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getDefaultIsolationSegment() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createEntitledIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + Mono.just(organizationId))) + .delayUntil( + function( + (isolationSegmentId, organizationId) -> + requestAssignDefaultIsolationSegment( + this.cloudFoundryClient, + isolationSegmentId, + organizationId))) + .flatMap( + function( + (isolationSegmentId, organizationId) -> + Mono.zip( + Mono.just(isolationSegmentId), + this.cloudFoundryClient + .organizationsV3() + .getDefaultIsolationSegment( + GetOrganizationDefaultIsolationSegmentRequest + .builder() + .organizationId( + organizationId) + .build()) + .map(r -> r.getData().getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) + @Test + public void getUsageSummary( + // We inject the testLogCacheApp to ensure there is _some_ usage in the org + @Autowired Mono testLogCacheApp) { + this.organizationId + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizationsV3() + .getUsageSummary( + GetOrganizationUsageSummaryRequest.builder() + .organizationId(organizationId) + .build())) + .map(GetOrganizationUsageSummaryResponse::getUsageSummary) + .as(StepVerifier::create) + .consumeNextWith( + usage -> { + assertThat(usage.getMemoryInMb()).isGreaterThan(63); + assertThat(usage.getStartedInstances()).isGreaterThan(0); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String organizationName = this.nameFactory.getOrganizationName(); + + requestCreateOrganization(this.cloudFoundryClient, organizationName) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .list( + ListOrganizationsRequest.builder() + .page(page) + .build()))) + .filter(resource -> organizationName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDomains() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + requestCreateDomain( + this.cloudFoundryClient, domainName, organizationId)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter(resource -> domainName.equals(resource.getName())) + .as(StepVerifier::create) + .consumeNextWith(resource -> assertThat(resource.getName()).isEqualTo(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDomainsFilterById() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + Mono.just(organizationId))) + .flatMapMany( + function( + (domainId, organizationId) -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .domainId(domainId) + .organizationId( + organizationId) + .page(page) + .build())))) + .as(StepVerifier::create) + .consumeNextWith(resource -> assertThat(resource.getName()).isEqualTo(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDomainsFilterByName() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + requestCreateDomain( + this.cloudFoundryClient, domainName, organizationId)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .name(domainName) + .organizationId( + organizationId) + .page(page) + .build()))) + .as(StepVerifier::create) + .consumeNextWith(resource -> assertThat(resource.getName()).isEqualTo(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDomainsFilterByOwningOrganizationIds() { + String domainName = this.nameFactory.getDomainName(); + String globalDomainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + Mono.when( + requestCreateDomain( + this.cloudFoundryClient, + domainName, + organizationId), + requestCreateDomain( + this.cloudFoundryClient, globalDomainName))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .organizationId( + organizationId) + .owningOrganizationId( + organizationId) + .page(page) + .build()))) + .filter( + resource -> + domainName.equals(resource.getName()) + || globalDomainName.equals(resource.getName())) + .as(StepVerifier::create) + .consumeNextWith(resource -> assertThat(resource.getName()).isEqualTo(domainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_6) + @Test + public void listDomainsReturningGlobalDomains() { + String globalDomainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .delayUntil( + organizationId -> + requestCreateDomain(this.cloudFoundryClient, globalDomainName)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter(resource -> globalDomainName.equals(resource.getName())) + .as(StepVerifier::create) + .consumeNextWith( + resource -> assertThat(resource.getName()).isEqualTo(globalDomainName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDomainsReturningSharedDomains() { + String domainName1 = this.nameFactory.getDomainName(); + String domainName2 = this.nameFactory.getDomainName(); + String organizationName1 = this.nameFactory.getOrganizationName(); + String organizationName2 = this.nameFactory.getOrganizationName(); + + Mono.zip( + createOrganizationId(this.cloudFoundryClient, organizationName1), + createOrganizationId(this.cloudFoundryClient, organizationName2)) + .flatMap( + function( + (organizationId1, organizationId2) -> + Mono.when( + requestCreateDomain( + this.cloudFoundryClient, + domainName1, + organizationId1), + requestCreateDomain( + this.cloudFoundryClient, + domainName2, + organizationId2)) + .thenReturn(organizationId1))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .listDomains( + ListOrganizationDomainsRequest + .builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter( + resource -> + domainName1.equals(resource.getName()) + || domainName2.equals(resource.getName())) + .as(StepVerifier::create) + .consumeNextWith(resource -> assertThat(resource.getName()).isEqualTo(domainName1)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String organizationName = this.nameFactory.getOrganizationName(); + + requestCreateOrganization(this.cloudFoundryClient, organizationName) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .organizationsV3() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) + @Test + public void update() { + String organizationName = this.nameFactory.getOrganizationName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .organizationsV3() + .update( + UpdateOrganizationRequest.builder() + .metadata( + Metadata.builder() + .annotation( + "annotationKey", + "annotationValue") + .label( + "labelKey", + "labelValue") + .build()) + .organizationId(organizationId) + .build())) + .thenMany(requestListOrganizations(this.cloudFoundryClient, organizationName)) + .map(OrganizationResource::getMetadata) + .as(StepVerifier::create) + .consumeNextWith( + metadata -> { + assertThat(metadata.getAnnotations().get("annotationKey")) + .isEqualTo("annotationValue"); + assertThat(metadata.getLabels().get("labelKey")) + .isEqualTo("labelValue"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreateDomain(cloudFoundryClient, domainName, organizationId) + .map(CreateDomainResponse::getId); + } + + private static Mono createEntitledIsolationSegmentId( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentName, + String organizationId) { + return createIsolationSegmentId(cloudFoundryClient, isolationSegmentName) + .delayUntil( + isolationSegmentId -> + requestAddIsolationSegmentOrganizationEntitlement( + cloudFoundryClient, isolationSegmentId, organizationId)); + } + + private static Mono createIsolationSegmentId( + CloudFoundryClient cloudFoundryClient, String isolationSegmentName) { + return requestCreateIsolationSegment(cloudFoundryClient, isolationSegmentName) + .map(CreateIsolationSegmentResponse::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(CreateOrganizationResponse::getId); + } + + private static Mono + requestAddIsolationSegmentOrganizationEntitlement( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentId, + String organizationId) { + return cloudFoundryClient + .isolationSegments() + .addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId(isolationSegmentId) + .data(Relationship.builder().id(organizationId).build()) + .build()); + } + + private static Mono + requestAssignDefaultIsolationSegment( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentId, + String organizationId) { + return cloudFoundryClient + .organizationsV3() + .assignDefaultIsolationSegment( + AssignOrganizationDefaultIsolationSegmentRequest.builder() + .organizationId(organizationId) + .data(Relationship.builder().id(isolationSegmentId).build()) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .domainsV3() + .create( + CreateDomainRequest.builder() + .internal(false) + .name(domainName) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName) { + return cloudFoundryClient + .domainsV3() + .create(CreateDomainRequest.builder().internal(false).name(domainName).build()); + } + + private static Mono requestCreateIsolationSegment( + CloudFoundryClient cloudFoundryClient, String isolationSegmentName) { + return cloudFoundryClient + .isolationSegments() + .create(CreateIsolationSegmentRequest.builder().name(isolationSegmentName).build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Flux requestListOrganizations( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .organizationsV3() + .list( + ListOrganizationsRequest.builder() + .name(organizationName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/PackagesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/PackagesTest.java new file mode 100644 index 00000000000..967923af843 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/PackagesTest.java @@ -0,0 +1,119 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.client.v3.packages.PackageState.PROCESSING_UPLOAD; +import static org.cloudfoundry.client.v3.packages.PackageState.READY; + +import java.io.IOException; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.Application; +import org.cloudfoundry.client.v3.applications.ApplicationRelationships; +import org.cloudfoundry.client.v3.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v3.packages.CreatePackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageRequest; +import org.cloudfoundry.client.v3.packages.Package; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.packages.UploadPackageRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@Disabled("Until Packages are no longer experimental") +public final class PackagesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono spaceId; + + @Test + public void upload() { + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + this.cloudFoundryClient + .applicationsV3() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + spaceId) + .build()) + .build()) + .build()) + .build())) + .map(Application::getId) + .flatMap( + applicationId -> + this.cloudFoundryClient + .packages() + .create( + CreatePackageRequest.builder() + .type(PackageType.BITS) + .build())) + .map(Package::getId) + .flatMap( + packageId -> { + try { + return this.cloudFoundryClient + .packages() + .upload( + UploadPackageRequest.builder() + .packageId(packageId) + .bits( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .build()); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + }) + .map(Package::getId) + .flatMap( + packageId -> + this.cloudFoundryClient + .packages() + .get( + GetPackageRequest.builder() + .packageId(packageId) + .build())) + .map(Package::getState) + .as(StepVerifier::create) + .consumeNextWith(state -> assertThat(state).isIn(PROCESSING_UPLOAD, READY)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java new file mode 100644 index 00000000000..e4a4184e85a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ProcessesTest.java @@ -0,0 +1,307 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationProcessResponse; +import org.cloudfoundry.client.v3.processes.*; +import org.cloudfoundry.client.v3.processes.Process; +import org.cloudfoundry.operations.CloudFoundryOperations; +import org.cloudfoundry.operations.applications.ApplicationDetail; +import org.cloudfoundry.operations.applications.ApplicationHealthCheck; +import org.cloudfoundry.operations.applications.GetApplicationRequest; +import org.cloudfoundry.operations.applications.PushApplicationRequest; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_0) +@CleanupCloudFoundryAfterClass +public final class ProcessesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Test + public void get() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .get( + GetProcessRequest.builder() + .processId(processId) + .build())) + .map(GetProcessResponse::getDiskInMb) + .as(StepVerifier::create) + .expectNext(258) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getStatistics() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .getStatistics( + GetProcessStatisticsRequest.builder() + .processId(processId) + .build())) + .flatMapIterable(GetProcessStatisticsResponse::getResources) + .map(ProcessStatisticsResource::getType) + .as(StepVerifier::create) + .expectNext("web") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMapMany( + processId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .processes() + .list( + ListProcessesRequest.builder() + .page(page) + .processId(processId) + .build()))) + .map(ProcessResource::getDiskInMb) + .as(StepVerifier::create) + .expectNext(258) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void scale() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .scale( + ScaleProcessRequest.builder() + .diskInMb(259) + .processId(processId) + .build()) + .then(Mono.just(processId))) + .flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId)) + .map(GetProcessResponse::getDiskInMb) + .as(StepVerifier::create) + .expectNext(259) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void terminateInstance() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .terminateInstance( + TerminateProcessInstanceRequest.builder() + .index("1") + .processId(processId) + .build()) + .then(Mono.just(processId))) + .flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV3Exception.class) + .hasMessageMatching( + "CF-ResourceNotFound\\([0-9]+\\): Instance not" + + " found")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .update( + UpdateProcessRequest.builder() + .healthCheck( + HealthCheck.builder() + .type( + HealthCheckType + .PROCESS) + .build()) + .processId(processId) + .build()) + .then(Mono.just(processId))) + .flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId)) + .map(GetProcessResponse::getHealthCheck) + .map(HealthCheck::getType) + .as(StepVerifier::create) + .expectNext(HealthCheckType.PROCESS) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplication( + CloudFoundryOperations cloudFoundryOperations, String name, Path path) + throws IOException { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .buildpack("staticfile_buildpack") + .diskQuota(258) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(name) + .path(path) + .noStart(false) + .build()); + } + + @Test + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_4_v2) + public void updateReadinessHealthCheckType() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Path path = new ClassPathResource("test-application.zip").getFile().toPath(); + + createApplication(this.cloudFoundryOperations, applicationName, path) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMap(applicationId -> getProcessId(this.cloudFoundryClient, applicationId)) + .flatMap( + processId -> + this.cloudFoundryClient + .processes() + .update( + UpdateProcessRequest.builder() + .readinessHealthCheck( + ReadinessHealthCheck.builder() + .data( + Data.builder() + .endpoint( + "/test_endpoint") + .invocationTimeout( + 1) + .interval(2) + .build()) + .type( + ReadinessHealthCheckType + .PORT) + .build()) + .processId(processId) + .build()) + .then(Mono.just(processId))) + .flatMap(processId -> requestGetProcess(this.cloudFoundryClient, processId)) + .map(GetProcessResponse::getReadinessHealthCheck) + .map(ReadinessHealthCheck::getType) + .as(StepVerifier::create) + .expectNext(ReadinessHealthCheckType.PORT) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getApplicationId( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return requestGetApplication(cloudFoundryOperations, applicationName) + .map(ApplicationDetail::getId); + } + + private static Mono getProcessId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestGetApplicationProcess(cloudFoundryClient, applicationId).map(Process::getId); + } + + private static Mono requestGetApplication( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build()); + } + + private static Mono requestGetApplicationProcess( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .getProcess( + GetApplicationProcessRequest.builder() + .applicationId(applicationId) + .type("web") + .build()); + } + + private static Mono requestGetProcess( + CloudFoundryClient cloudFoundryClient, String processId) { + return cloudFoundryClient + .processes() + .get(GetProcessRequest.builder().processId(processId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ResourceMatchTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ResourceMatchTest.java new file mode 100644 index 00000000000..4e3c2f1401a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ResourceMatchTest.java @@ -0,0 +1,171 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; + +import java.io.IOException; +import java.time.Duration; +import java.util.EnumSet; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.Application; +import org.cloudfoundry.client.v3.applications.ApplicationRelationships; +import org.cloudfoundry.client.v3.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v3.packages.CreatePackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageRequest; +import org.cloudfoundry.client.v3.packages.GetPackageResponse; +import org.cloudfoundry.client.v3.packages.Package; +import org.cloudfoundry.client.v3.packages.PackageRelationships; +import org.cloudfoundry.client.v3.packages.PackageState; +import org.cloudfoundry.client.v3.packages.PackageType; +import org.cloudfoundry.client.v3.packages.UploadPackageRequest; +import org.cloudfoundry.util.DelayTimeoutException; +import org.cloudfoundry.util.ExceptionUtils; +import org.cloudfoundry.util.ResourceMatchingUtilsV3; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public class ResourceMatchTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono spaceId; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + @Disabled( + "Cloud Controller is configured not to cache resource smaller than 4k - Find a better" + + " way to test this") + public void upload() throws IOException { + createAndUploadPackage() + .flatMap(this::waitForReady) + .then( + ResourceMatchingUtilsV3.getMatchedResources( + this.cloudFoundryClient, + new ClassPathResource("test-application.zip").getFile().toPath())) + .as(StepVerifier::create) + .consumeNextWith(matchedResources -> assertThat(matchedResources).isNotEmpty()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private Mono createAndUploadPackage() { + String applicationName = this.nameFactory.getApplicationName(); + + return this.spaceId + .flatMap( + spaceId -> + this.cloudFoundryClient + .applicationsV3() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + spaceId) + .build()) + .build()) + .build()) + .build())) + .map(Application::getId) + .flatMap( + applicationId -> + this.cloudFoundryClient + .packages() + .create( + CreatePackageRequest.builder() + .type(PackageType.BITS) + .relationships( + PackageRelationships.builder() + .application( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + applicationId) + .build()) + .build()) + .build()) + .build())) + .map(Package::getId) + .flatMap( + packageId -> { + try { + return this.cloudFoundryClient + .packages() + .upload( + UploadPackageRequest.builder() + .packageId(packageId) + .bits( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .build()); + } catch (IOException e) { + return Mono.error(Exceptions.propagate(e)); + } + }) + .map(Package::getId); + } + + private Mono waitForReady(String packageId) { + return this.cloudFoundryClient + .packages() + .get(GetPackageRequest.builder().packageId(packageId).build()) + .filter( + packageResponse -> + EnumSet.of( + PackageState.READY, + PackageState.FAILED, + PackageState.EXPIRED) + .contains(packageResponse.getState())) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(15), + Duration.ofMinutes(5))) + .filter(packageResponse -> packageResponse.getState() == PackageState.READY) + .switchIfEmpty( + ExceptionUtils.illegalState( + "Package %s failed upload processing", packageId)) + .onErrorResume( + DelayTimeoutException.class, + t -> + ExceptionUtils.illegalState( + "Package %s timed out during upload processing", + packageId)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/RolesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/RolesTest.java new file mode 100644 index 00000000000..251951b5c02 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/RolesTest.java @@ -0,0 +1,252 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.client.v3.roles.RoleType.ORGANIZATION_USER; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.roles.CreateRoleRequest; +import org.cloudfoundry.client.v3.roles.CreateRoleResponse; +import org.cloudfoundry.client.v3.roles.DeleteRoleRequest; +import org.cloudfoundry.client.v3.roles.GetRoleRequest; +import org.cloudfoundry.client.v3.roles.ListRolesRequest; +import org.cloudfoundry.client.v3.roles.RoleRelationships; +import org.cloudfoundry.client.v3.roles.RoleResource; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) +public final class RolesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void create() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + this.cloudFoundryClient + .rolesV3() + .create( + CreateRoleRequest.builder() + .relationships( + RoleRelationships.builder() + .organization( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + organizationId) + .build()) + .build()) + .user( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + userId) + .build()) + .build()) + .build()) + .type(ORGANIZATION_USER) + .build()) + .thenReturn(organizationId)) + .flatMapMany( + organizationId -> + requestListRoles(this.cloudFoundryClient) + .map(RoleResource::getRelationships) + .filter( + relationship -> { + if (relationship.getOrganization().getData() + != null) { + return organizationId.equals( + relationship + .getOrganization() + .getData() + .getId()); + } else { + return false; + } + }) + .map( + relationship -> + relationship.getUser().getData().getId())) + .as(StepVerifier::create) + .expectNext(userId) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateOrganizationRelationship( + this.cloudFoundryClient, organizationId, userId) + .map(CreateRoleResponse::getId)) + .delayUntil( + roleId -> + this.cloudFoundryClient + .rolesV3() + .delete(DeleteRoleRequest.builder().roleId(roleId).build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .flatMapMany( + roleId -> + requestListRoles(this.cloudFoundryClient) + .filter(resource -> roleId.equals(resource.getId()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateOrganizationRelationship( + this.cloudFoundryClient, organizationId, userId) + .map(CreateRoleResponse::getId)) + .flatMap( + roleId -> + this.cloudFoundryClient + .rolesV3() + .get(GetRoleRequest.builder().roleId(roleId).build()) + .map( + response -> + response.getRelationships() + .getUser() + .getData() + .getId())) + .as(StepVerifier::create) + .expectNext(userId) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganizationId() { + String organizationName = this.nameFactory.getOrganizationName(); + String userId = this.nameFactory.getUserId(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + requestCreateOrganizationRelationship( + this.cloudFoundryClient, organizationId, userId) + .map(CreateRoleResponse::getId)) + .flatMapMany( + roleId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .rolesV3() + .list( + ListRolesRequest.builder() + .roleId(roleId) + .page(page) + .build())) + .map( + resource -> + resource.getRelationships() + .getUser() + .getData() + .getId())) + .as(StepVerifier::create) + .expectNext(userId) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(CreateOrganizationResponse::getId); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Mono requestCreateOrganizationRelationship( + CloudFoundryClient cloudFoundryClient, String organizationId, String userId) { + return cloudFoundryClient + .rolesV3() + .create( + CreateRoleRequest.builder() + .relationships( + RoleRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .user( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(userId) + .build()) + .build()) + .build()) + .type(ORGANIZATION_USER) + .build()); + } + + private static Flux requestListRoles(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .rolesV3() + .list(ListRolesRequest.builder().page(page).build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/RoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/RoutesTest.java new file mode 100644 index 00000000000..d3f5bf4ff64 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/RoutesTest.java @@ -0,0 +1,1186 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Collections; +import java.util.List; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.ApplicationRelationships; +import org.cloudfoundry.client.v3.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v3.applications.CreateApplicationResponse; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationResponse; +import org.cloudfoundry.client.v3.routes.Application; +import org.cloudfoundry.client.v3.routes.CreateRouteRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteResponse; +import org.cloudfoundry.client.v3.routes.Destination; +import org.cloudfoundry.client.v3.routes.GetRouteRequest; +import org.cloudfoundry.client.v3.routes.GetRouteResponse; +import org.cloudfoundry.client.v3.routes.InsertRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ListRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ListRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.ListRoutesRequest; +import org.cloudfoundry.client.v3.routes.RemoveRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsRequest; +import org.cloudfoundry.client.v3.routes.ReplaceRouteDestinationsResponse; +import org.cloudfoundry.client.v3.routes.RouteRelationships; +import org.cloudfoundry.client.v3.routes.RouteResource; +import org.cloudfoundry.client.v3.routes.UpdateRouteRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class RoutesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono spaceId; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void create() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + this.cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .metadata( + Metadata.builder() + .label( + "test-create-key", + "test-create-value") + .build()) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + domainId) + .build()) + .build()) + .space( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + spaceId) + .build()) + .build()) + .build()) + .build()) + .thenReturn(domainId))) + .flatMapMany(domainId -> requestListRoutes(this.cloudFoundryClient, domainId)) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-create-key", "test-create-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void get() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + createRouteId( + this.cloudFoundryClient, domainId, "get", spaceId))) + .flatMapMany( + routeId -> + this.cloudFoundryClient + .routesV3() + .get(GetRouteRequest.builder().routeId(routeId).build())) + .map(GetRouteResponse::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-get-key", "test-get-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void insertDestinations() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + Integer port = this.nameFactory.getPort(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "insertDestinations", + spaceId)))) + .flatMapMany( + function( + (applicationId, domainId, routeId) -> + this.cloudFoundryClient + .routesV3() + .insertDestinations( + InsertRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application + .builder() + .applicationId( + applicationId) + .build()) + .port(port) + .build()) + .routeId(routeId) + .build()) + .thenReturn(domainId))) + .flatMap(domainId -> requestListRoutes(this.cloudFoundryClient, domainId)) + .flatMapIterable(RouteResource::getDestinations) + .map(Destination::getPort) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void list() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + createRouteId( + this.cloudFoundryClient, + domainId, + "list", + spaceId))) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .page(page) + .build()))) + .filter(route -> route.getMetadata().getLabels().containsKey("test-list-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-list-key", "test-list-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // TODO: Test has not been validated + @IfCloudFoundryVersion(greaterThan = CloudFoundryVersion.PCF_2_9) + @Test + public void listByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + createRouteId( + this.cloudFoundryClient, + domainId, + "listByApplicationId", + spaceId)))) + .flatMapMany( + function( + (applicationId, routeId) -> + requestReplaceDestinations( + this.cloudFoundryClient, + applicationId, + routeId) + .thenReturn(applicationId))) + .flatMap( + applicationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .applicationId( + applicationId) + .page(page) + .build()))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listByApplicationId-key", "test-listByApplicationId-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listByDomain() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + "listByDomain", + spaceId) + .thenReturn(domainId))) + .flatMapMany( + domainId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .domainId(domainId) + .page(page) + .build()))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listByDomain-key", "test-listByDomain-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listByHost() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + hostName, + "listByHost", + null, + null, + spaceId))) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .host(hostName) + .page(page) + .build()))) + .filter(route -> route.getMetadata().getLabels().containsKey("test-listByHost-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap("test-listByHost-key", "test-listByHost-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listByLabelSelector() { + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + "listByLabelSelector", + spaceId) + .thenReturn(domainId))) + .flatMapMany( + domainId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .labelSelector( + "test-listByLabelSelector-key=test-listByLabelSelector-value") + .page(page) + .build()))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listByLabelSelector-key", "test-listByLabelSelector-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listByOrganizationId() { + String domainName = this.nameFactory.getDomainName(); + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + createOrganizationId(this.cloudFoundryClient, organizationName) + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + Mono.just(organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (domainId, organizationId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + "listByOrganizationId", + spaceId) + .thenReturn(organizationId))) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listByOrganizationId-key", "test-listByOrganizationId-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listByPath() { + String domainName = this.nameFactory.getDomainName(); + String path = this.nameFactory.getPath(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + requestCreateRoute( + this.cloudFoundryClient, + domainId, + null, + "listByPath", + path, + null, + spaceId))) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .path(path) + .page(page) + .build()))) + .filter(route -> route.getMetadata().getLabels().containsKey("test-listByPath-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap("test-listByPath-key", "test-listByPath-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listBySpaceId() { + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (domainId, spaceId) -> + createRouteId( + this.cloudFoundryClient, + domainId, + "listBySpaceId", + spaceId) + .thenReturn(spaceId))) + .flatMapMany( + spaceId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .page(page) + .spaceId(spaceId) + .build()))) + .filter( + route -> + route.getMetadata() + .getLabels() + .containsKey("test-listBySpaceId-key")) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-listBySpaceId-key", "test-listBySpaceId-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDestinations() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "removeDestinations", + spaceId)))) + .flatMapMany( + function( + (applicationId, domainId, routeId) -> + Mono.zip( + Mono.just(applicationId), + createDestinationId( + this.cloudFoundryClient, + applicationId, + routeId), + Mono.just(routeId)))) + .flatMap( + function( + (applicationId, ignore, routeId) -> + Mono.zip( + Mono.just(applicationId), + this.cloudFoundryClient + .routesV3() + .listDestinations( + ListRouteDestinationsRequest + .builder() + .routeId(routeId) + .build()) + .map( + response -> + response.getDestinations() + .get(0) + .getApplication() + .getApplicationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDestinationsByApplicationId() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "removeDestinations", + spaceId)))) + .flatMapMany( + function( + (applicationId, domainId, routeId) -> + Mono.zip( + Mono.just(applicationId), + createDestinationId( + this.cloudFoundryClient, + applicationId, + routeId), + Mono.just(routeId)))) + .flatMap( + function( + (applicationId, destinationId, routeId) -> + Mono.zip( + Mono.just(destinationId), + this.cloudFoundryClient + .routesV3() + .listDestinations( + ListRouteDestinationsRequest + .builder() + .applicationId( + applicationId) + .routeId(routeId) + .build()) + .map( + response -> + response.getDestinations() + .get(0) + .getDestinationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void listDestinationsById() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "removeDestinations", + spaceId)))) + .flatMapMany( + function( + (applicationId, domainId, routeId) -> + Mono.zip( + Mono.just(applicationId), + createDestinationId( + this.cloudFoundryClient, + applicationId, + routeId), + Mono.just(routeId)))) + .flatMap( + function( + (applicationId, destinationId, routeId) -> + Mono.zip( + Mono.just(applicationId), + this.cloudFoundryClient + .routesV3() + .listDestinations( + ListRouteDestinationsRequest + .builder() + .destinationId( + destinationId) + .routeId(routeId) + .build()) + .map( + response -> + response.getDestinations() + .get(0) + .getApplication() + .getApplicationId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void removeDestinations() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "removeDestinations", + spaceId)))) + .flatMapMany( + function( + (applicationId, domainId, routeId) -> + Mono.zip( + createDestinationId( + this.cloudFoundryClient, + applicationId, + routeId), + Mono.just(routeId)))) + .flatMap( + function( + (destinationId, routeId) -> + this.cloudFoundryClient + .routesV3() + .removeDestinations( + RemoveRouteDestinationsRequest.builder() + .destinationId(destinationId) + .routeId(routeId) + .build()) + .thenReturn(routeId))) + .flatMap(routeId -> getDestinations(this.cloudFoundryClient, routeId)) + .map(List::size) + .as(StepVerifier::create) + .expectNext(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void replaceDestinations() { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + Integer port = this.nameFactory.getPort(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + applicationName, + spaceId), + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "insertDestinations", + spaceId)))) + .flatMapMany( + function( + (applicationId, domainId, routeId) -> + this.cloudFoundryClient + .routesV3() + .replaceDestinations( + ReplaceRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application + .builder() + .applicationId( + applicationId) + .build()) + .port(port) + .build()) + .routeId(routeId) + .build()) + .thenReturn(domainId))) + .flatMap(domainId -> requestListRoutes(this.cloudFoundryClient, domainId)) + .flatMapIterable(RouteResource::getDestinations) + .map(Destination::getPort) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) + @Test + public void update() { + String domainName = this.nameFactory.getDomainName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + this.spaceId)) + .flatMap( + function( + (domainId, spaceId) -> + Mono.zip( + Mono.just(domainId), + createRouteId( + this.cloudFoundryClient, + domainId, + "update", + spaceId)))) + .delayUntil( + function( + (domainId, routeId) -> + this.cloudFoundryClient + .routesV3() + .update( + UpdateRouteRequest.builder() + .routeId(routeId) + .metadata( + Metadata.builder() + .label( + "test-update-key", + "test-update-value") + .build()) + .build()))) + .flatMapMany( + function( + (domainId, ignore) -> + requestListRoutes(this.cloudFoundryClient, domainId))) + .map(RouteResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-update-key", "test-update-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, applicationName, spaceId) + .map(CreateApplicationResponse::getId); + } + + private static Mono createDestinationId( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return requestReplaceDestinations(cloudFoundryClient, applicationId, routeId) + .flatMapIterable(ReplaceRouteDestinationsResponse::getDestinations) + .single() + .map(Destination::getDestinationId); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreateDomain(cloudFoundryClient, domainName, organizationId) + .map(CreateDomainResponse::getId); + } + + private static Mono createOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return requestCreateOrganization(cloudFoundryClient, organizationName) + .map(CreateOrganizationResponse::getId); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, String label, String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, label, spaceId) + .map(CreateRouteResponse::getId); + } + + private static Mono> getDestinations( + CloudFoundryClient cloudFoundryClient, String routeId) { + return requestListDestinations(cloudFoundryClient, routeId) + .map(ListRouteDestinationsResponse::getDestinations); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return cloudFoundryClient + .applicationsV3() + .create( + CreateApplicationRequest.builder() + .name(applicationName) + .relationships( + ApplicationRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .domainsV3() + .create( + CreateDomainRequest.builder() + .internal(false) + .name(domainName) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(organizationName).build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, + String domainId, + String host, + String label, + String path, + Integer port, + String spaceId) { + String key = String.format("test-%s-key", label); + String value = String.format("test-%s-value", label); + + return cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .host(host) + .metadata(Metadata.builder().label(key, value).build()) + .path(path) + .port(port) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(domainId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String label, String spaceId) { + String key = String.format("test-%s-key", label); + String value = String.format("test-%s-value", label); + + return cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .metadata(Metadata.builder().label(key, value).build()) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(domainId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestListDestinations( + CloudFoundryClient cloudFoundryClient, String routeId) { + return cloudFoundryClient + .routesV3() + .listDestinations(ListRouteDestinationsRequest.builder().routeId(routeId).build()); + } + + private static Flux requestListRoutes( + CloudFoundryClient cloudFoundryClient, String domainId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .domainId(domainId) + .page(page) + .build())); + } + + private static Mono requestReplaceDestinations( + CloudFoundryClient cloudFoundryClient, String applicationId, String routeId) { + return cloudFoundryClient + .routesV3() + .replaceDestinations( + ReplaceRouteDestinationsRequest.builder() + .destination( + Destination.builder() + .application( + Application.builder() + .applicationId(applicationId) + .build()) + .build()) + .routeId(routeId) + .build()); + } + + private Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/SecurityGroupsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/SecurityGroupsTest.java new file mode 100644 index 00000000000..30d8de45aff --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/SecurityGroupsTest.java @@ -0,0 +1,330 @@ +/* + * Copyright 2013-2023 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except + * in compliance with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software distributed under the License + * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express + * or implied. See the License for the specific language governing permissions and limitations under + * the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.client.v3.securitygroups.Protocol.TCP; + +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.securitygroups.BindRunningSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.BindStagingSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.CreateSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.CreateSecurityGroupResponse; +import org.cloudfoundry.client.v3.securitygroups.DeleteSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.GetSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.GloballyEnabled; +import org.cloudfoundry.client.v3.securitygroups.ListRunningSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.ListStagingSecurityGroupsRequest; +import org.cloudfoundry.client.v3.securitygroups.Rule; +import org.cloudfoundry.client.v3.securitygroups.UnbindRunningSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UnbindStagingSecurityGroupRequest; +import org.cloudfoundry.client.v3.securitygroups.UpdateSecurityGroupRequest; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class SecurityGroupsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono spaceId; + private Mono securityGroup; + private String securityGroupName; + + @BeforeEach + public void setup() { + this.securityGroupName = this.nameFactory.getSecurityGroupName(); + + this.securityGroup = + this.cloudFoundryClient + .securityGroupsV3() + .create( + CreateSecurityGroupRequest.builder() + .name(this.securityGroupName) + .globallyEnabled( + GloballyEnabled.builder() + .staging(true) + .running(true) + .build()) + .rule( + Rule.builder() + .destination("0.0.0.0/0") + .log(false) + .ports("2048-3000") + .protocol(TCP) + .build()) + .build()); + } + + @Test + public void create() { + this.securityGroup + .map(securityGroup -> securityGroup.getName()) + .as(StepVerifier::create) + .expectNext(this.securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.securityGroup + .flatMap( + securityGroup -> + this.cloudFoundryClient + .securityGroupsV3() + .get( + GetSecurityGroupRequest.builder() + .securityGroupId(securityGroup.getId()) + .build()) + .map(sg -> sg.getName())) + .as(StepVerifier::create) + .expectNext(this.securityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String newSecurityGroupName = this.nameFactory.getSecurityGroupName(); + this.securityGroup + .flatMap( + securityGroup -> + this.cloudFoundryClient + .securityGroupsV3() + .update( + UpdateSecurityGroupRequest.builder() + .globallyEnabled( + GloballyEnabled.builder().build()) + .securityGroupId(securityGroup.getId()) + .name(newSecurityGroupName) + .build())) + .map(securityGroup -> securityGroup.getName()) + .as(StepVerifier::create) + .expectNext(newSecurityGroupName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + this.securityGroup + .flatMap( + securityGroup -> + this.cloudFoundryClient + .securityGroupsV3() + .delete( + DeleteSecurityGroupRequest.builder() + .securityGroupId(securityGroup.getId()) + .build()) + .map(id -> Arrays.asList(id))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + this.securityGroup + .map( + securityGroup -> + this.cloudFoundryClient + .securityGroupsV3() + .list( + ListSecurityGroupsRequest.builder() + .names( + Arrays.asList( + securityGroup.getName())) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRunning() { + Mono.zip(this.securityGroup, this.spaceId) + .flatMap( + v -> + this.cloudFoundryClient + .securityGroupsV3() + .listRunning( + ListRunningSecurityGroupsRequest.builder() + .spaceId(v.getT2()) + .names(Arrays.asList(v.getT1().getName())) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listStaging() { + Mono.zip(this.securityGroup, this.spaceId) + .flatMap( + v -> + this.cloudFoundryClient + .securityGroupsV3() + .listStaging( + ListStagingSecurityGroupsRequest.builder() + .spaceId(v.getT2()) + .names(Arrays.asList(v.getT1().getName())) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listWithPagination() { + this.securityGroup + .flux() + .flatMap( + securityGroup -> + PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .securityGroupsV3() + .list( + ListSecurityGroupsRequest.builder() + .page(page) + .perPage(1) + .names( + Collections + .singletonList( + securityGroup + .getName())) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void bindStagingSecurityGroup() { + Mono.zip(this.securityGroup, this.spaceId) + .flatMap( + v -> + this.cloudFoundryClient + .securityGroupsV3() + .bindStagingSecurityGroup( + BindStagingSecurityGroupRequest.builder() + .securityGroupId(v.getT1().getId()) + .boundSpaces( + Relationship.builder() + .id(v.getT2()) + .build()) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unbindStagingSecurityGroup() { + Mono.zip(this.securityGroup, this.spaceId) + .flatMap( + v -> + this.cloudFoundryClient + .securityGroupsV3() + .bindStagingSecurityGroup( + BindStagingSecurityGroupRequest.builder() + .securityGroupId(v.getT1().getId()) + .boundSpaces( + Relationship.builder() + .id(v.getT2()) + .build()) + .build()) + .then( + this.cloudFoundryClient + .securityGroupsV3() + .unbindStagingSecurityGroup( + UnbindStagingSecurityGroupRequest + .builder() + .securityGroupId( + v.getT1().getId()) + .spaceId(v.getT2()) + .build()))) + .as(StepVerifier::create) + .expectNextCount(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void bindRunningSecurityGroup() { + Mono.zip(this.securityGroup, this.spaceId) + .flatMap( + v -> + this.cloudFoundryClient + .securityGroupsV3() + .bindRunningSecurityGroup( + BindRunningSecurityGroupRequest.builder() + .securityGroupId(v.getT1().getId()) + .boundSpaces( + Relationship.builder() + .id(v.getT2()) + .build()) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unbindRunningSecurityGroup() { + Mono.zip(this.securityGroup, this.spaceId) + .flatMap( + v -> + this.cloudFoundryClient + .securityGroupsV3() + .bindRunningSecurityGroup( + BindRunningSecurityGroupRequest.builder() + .securityGroupId(v.getT1().getId()) + .boundSpaces( + Relationship.builder() + .id(v.getT2()) + .build()) + .build()) + .then( + this.cloudFoundryClient + .securityGroupsV3() + .unbindRunningSecurityGroup( + UnbindRunningSecurityGroupRequest + .builder() + .securityGroupId( + v.getT1().getId()) + .spaceId(v.getT2()) + .build()))) + .as(StepVerifier::create) + .expectNextCount(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java new file mode 100644 index 00000000000..81477aef522 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBindingsTest.java @@ -0,0 +1,572 @@ +/* + * Copyright 2013-2022 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.client.v3.ApplicationsTest.createApplicationId; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Collections; +import java.util.Map; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.servicebindings.CreateServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.DeleteServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingDetailsRequest; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingDetailsResponse; +import org.cloudfoundry.client.v3.servicebindings.GetServiceBindingRequest; +import org.cloudfoundry.client.v3.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v3.servicebindings.ListServiceBindingsResponse; +import org.cloudfoundry.client.v3.servicebindings.ServiceBinding; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingRelationships; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v3.servicebindings.ServiceBindingType; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstance; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceRelationships; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceType; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v3.serviceplans.ServicePlan; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_11) +public class ServiceBindingsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Test + public void createServiceKeyFromManagedServiceInstance() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + this.spaceId + .flatMap( + spaceId -> + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceBindingsV3() + .create( + CreateServiceBindingRequest.builder() + .type(ServiceBindingType.KEY) + .name(serviceKeyName) + .relationships( + ServiceBindingRelationships + .builder() + .serviceInstance( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + serviceInstanceId) + .build()) + .build()) + .build()) + .build()) + .map(response -> response.getJobId().get()) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + jobId))) + .thenMany(requestListServiceBindings(this.cloudFoundryClient, serviceInstanceName)) + .map(ServiceBinding::getName) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createAppBindingFromUserProvidedServiceInstance() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + Collections.emptyMap(), + spaceId), + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId))) + .flatMap( + function( + (serviceInstanceId, appId) -> + this.cloudFoundryClient + .serviceBindingsV3() + .create( + CreateServiceBindingRequest.builder() + .type( + ServiceBindingType + .APPLICATION) + .metadata( + Metadata.builder() + .label( + "test-label", + "test-label-value") + .build()) + .relationships( + ServiceBindingRelationships + .builder() + .serviceInstance( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + serviceInstanceId) + .build()) + .build()) + .application( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + appId) + .build()) + .build()) + .build()) + .build()) + .map( + response -> + response.getServiceBinding() + .get()))) + .map(ServiceBindingResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-label", "test-label-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteForManagedService() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + this.spaceId + .flatMap( + spaceId -> + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + createServiceKey( + this.cloudFoundryClient, + serviceKeyName, + serviceInstanceName, + serviceInstanceId)) + .map(ServiceBinding::getId) + .flatMap( + bindingId -> + this.cloudFoundryClient + .serviceBindingsV3() + .delete( + DeleteServiceBindingRequest.builder() + .serviceBindingId(bindingId) + .build())) + .hasElement() + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteForUserProvidedService() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + Collections.emptyMap(), + spaceId), + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId))) + .flatMap( + function( + (serviceInstanceId, appId) -> + createServiceBindingForUserProvidedService( + this.cloudFoundryClient, appId, serviceInstanceId))) + .map(ServiceBinding::getId) + .flatMap( + bindingId -> + this.cloudFoundryClient + .serviceBindingsV3() + .delete( + DeleteServiceBindingRequest.builder() + .serviceBindingId(bindingId) + .build())) + .hasElement() + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listForApplication() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + Collections.emptyMap(), + spaceId), + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId))) + .flatMap( + function( + (serviceInstanceId, appId) -> + createServiceBindingForUserProvidedService( + this.cloudFoundryClient, appId, serviceInstanceId))) + .thenMany( + this.cloudFoundryClient + .serviceBindingsV3() + .list( + ListServiceBindingsRequest.builder() + .appName(applicationName) + .build())) + .map(ListServiceBindingsResponse::getResources) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + Collections.emptyMap(), + spaceId), + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId))) + .flatMap( + function( + (serviceInstanceId, appId) -> + createServiceBindingForUserProvidedService( + this.cloudFoundryClient, appId, serviceInstanceId))) + .map(ServiceBinding::getId) + .flatMap( + bindingId -> + this.cloudFoundryClient + .serviceBindingsV3() + .get( + GetServiceBindingRequest.builder() + .serviceBindingId(bindingId) + .build())) + .map(ServiceBinding::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-label", "test-label-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getDetails() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String applicationName = this.nameFactory.getApplicationName(); + + this.spaceId + .flatMap( + spaceId -> + Mono.zip( + createUserProvidedServiceInstanceId( + this.cloudFoundryClient, + serviceInstanceName, + Collections.singletonMap("foo", "bar"), + spaceId), + createApplicationId( + this.cloudFoundryClient, applicationName, spaceId))) + .flatMap( + function( + (serviceInstanceId, appId) -> + createServiceBindingForUserProvidedService( + this.cloudFoundryClient, appId, serviceInstanceId))) + .map(ServiceBinding::getId) + .flatMap( + bindingId -> + this.cloudFoundryClient + .serviceBindingsV3() + .getDetails( + GetServiceBindingDetailsRequest.builder() + .serviceBindingId(bindingId) + .build())) + .map(GetServiceBindingDetailsResponse::getCredentials) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("foo", "bar")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createManagedServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + Mono serviceBrokerId, + String serviceInstanceName, + String serviceName, + String spaceId) { + return serviceBrokerId + .flatMap(brokerId -> getPlanId(cloudFoundryClient, brokerId, serviceName)) + .flatMap( + planId -> + requestCreateManagedServiceInstance( + cloudFoundryClient, planId, serviceInstanceName, spaceId)) + .map(response -> response.getJobId().get()) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), jobId)) + .thenMany(requestListServiceInstances(cloudFoundryClient, serviceInstanceName)) + .single() + .map(ServiceInstance::getId); + } + + private static Mono getPlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return requestListServicePlans(cloudFoundryClient, serviceName, serviceBrokerId) + .single() + .map(ServicePlan::getId); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceName, String serviceBrokerId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .servicePlansV3() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceOfferingName(serviceName) + .serviceBrokerId(serviceBrokerId) + .build())); + } + + private static Mono requestCreateManagedServiceInstance( + CloudFoundryClient cloudFoundryClient, + String planId, + String serviceInstanceName, + String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .type(ServiceInstanceType.MANAGED) + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(planId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono createUserProvidedServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceName, + Map credentials, + String spaceId) { + return requestCreateUserProvidedServiceInstance( + cloudFoundryClient, serviceInstanceName, credentials, spaceId) + .map(response -> response.getServiceInstance().get()) + .map(ServiceInstance::getId); + } + + private static Mono requestCreateUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceName, + Map credentials, + String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .create( + CreateServiceInstanceRequest.builder() + .type(ServiceInstanceType.USER_PROVIDED) + .name(serviceInstanceName) + .credentials(credentials) + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Flux requestListServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .serviceInstancesV3() + .list( + ListServiceInstancesRequest.builder() + .page(page) + .serviceInstanceName(serviceInstanceName) + .build())); + } + + private static Flux requestListServiceBindings( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .serviceBindingsV3() + .list( + ListServiceBindingsRequest.builder() + .page(page) + .serviceInstanceName(serviceInstanceName) + .build())); + } + + private static Mono createServiceKey( + CloudFoundryClient cloudFoundryClient, + String serviceKeyName, + String serviceInstanceName, + String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV3() + .create( + CreateServiceBindingRequest.builder() + .type(ServiceBindingType.KEY) + .name(serviceKeyName) + .relationships( + ServiceBindingRelationships.builder() + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + serviceInstanceId) + .build()) + .build()) + .build()) + .build()) + .map(response -> response.getJobId().get()) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), jobId)) + .thenMany(requestListServiceBindings(cloudFoundryClient, serviceInstanceName)) + .single(); + } + + private static Mono createServiceBindingForUserProvidedService( + CloudFoundryClient cloudFoundryClient, String appId, String serviceInstanceId) { + return cloudFoundryClient + .serviceBindingsV3() + .create( + CreateServiceBindingRequest.builder() + .type(ServiceBindingType.APPLICATION) + .metadata( + Metadata.builder() + .label("test-label", "test-label-value") + .build()) + .relationships( + ServiceBindingRelationships.builder() + .serviceInstance( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + serviceInstanceId) + .build()) + .build()) + .application( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(appId) + .build()) + .build()) + .build()) + .build()) + .map(response -> response.getServiceBinding().get()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBrokersTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBrokersTest.java new file mode 100644 index 00000000000..656a0b0efe6 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceBrokersTest.java @@ -0,0 +1,383 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ApplicationUtils; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.servicebrokers.BasicAuthentication; +import org.cloudfoundry.client.v3.servicebrokers.CreateServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.DeleteServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.GetServiceBrokerRequest; +import org.cloudfoundry.client.v3.servicebrokers.ListServiceBrokersRequest; +import org.cloudfoundry.client.v3.servicebrokers.ServiceBrokerRelationships; +import org.cloudfoundry.client.v3.servicebrokers.UpdateServiceBrokerRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.Exceptions; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_10) +@CleanupCloudFoundryAfterClass +public final class ServiceBrokersTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceBrokerName; + + @Test + public void create() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + Path application; + try { + application = new ClassPathResource("test-service-broker.jar").getFile().toPath(); + } catch (IOException e) { + throw Exceptions.propagate(e); + } + + ApplicationUtils.ApplicationMetadata applicationMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + ServiceBrokerUtils.pushServiceBrokerApplication( + this.cloudFoundryClient, + application, + this.nameFactory, + planName, + serviceName, + spaceId)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokersV3() + .create( + CreateServiceBrokerRequest.builder() + .authentication( + BasicAuthentication.builder() + .password("test-authentication-password") + .username("test-authentication-username") + .build()) + .url(applicationMetadata.uri) + .name(serviceBrokerName) + .relationships( + ServiceBrokerRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id( + applicationMetadata + .spaceId) + .build()) + .build()) + .build()) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .then( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceBrokersV3() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(page) + .build())) + .singleOrEmpty()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker(this.cloudFoundryClient, applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokersV3() + .delete( + DeleteServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerMetadata.serviceBrokerId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .then( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceBrokersV3() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName) + .page(page) + .build())) + .singleOrEmpty()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + this.cloudFoundryClient + .serviceBrokersV3() + .get( + GetServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerId) + .build())) + .as(StepVerifier::create) + .assertNext( + serviceBroker -> + assertThat(serviceBroker.getName()) + .isEqualTo(this.serviceBrokerName)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceBrokersV3() + .list( + ListServiceBrokersRequest.builder() + .name(this.serviceBrokerName) + .page(page) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName1 = this.nameFactory.getServiceBrokerName(); + String serviceBrokerName2 = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName1, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokersV3() + .update( + UpdateServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerMetadata.serviceBrokerId) + .name(serviceBrokerName2) + .build()) + .filter(responseUpdate -> responseUpdate.jobId().isPresent()) + .map(responseUpdate -> responseUpdate.jobId().get()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .then( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceBrokersV3() + .list( + ListServiceBrokersRequest.builder() + .name(serviceBrokerName2) + .page(page) + .build())) + .singleOrEmpty()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void updateMetadata() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + this.cloudFoundryClient + .serviceBrokersV3() + .update( + UpdateServiceBrokerRequest.builder() + .serviceBrokerId(serviceBrokerMetadata.serviceBrokerId) + .metadata(Metadata.builder().label("type", "dev").build()) + .build()) + .filter(responseUpdate -> responseUpdate.jobId().isPresent()) + .map(responseUpdate -> responseUpdate.jobId().get()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, Duration.ofMinutes(5), job)) + .then( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceBrokersV3() + .list( + ListServiceBrokersRequest.builder() + .labelSelector("type=dev") + .name(serviceBrokerName) + .page(page) + .build())) + .singleOrEmpty()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceInstancesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceInstancesTest.java new file mode 100644 index 00000000000..507b288a653 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceInstancesTest.java @@ -0,0 +1,612 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.HashMap; +import java.util.Map; +import java.util.Optional; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.CreateServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.DeleteServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.GetUserProvidedCredentialsRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListServiceInstancesRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipRequest; +import org.cloudfoundry.client.v3.serviceinstances.ListSharedSpacesRelationshipResponse; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceRelationships; +import org.cloudfoundry.client.v3.serviceinstances.ServiceInstanceType; +import org.cloudfoundry.client.v3.serviceinstances.ShareServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.ShareServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceinstances.UnshareServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.UpdateServiceInstanceRequest; +import org.cloudfoundry.client.v3.serviceinstances.UpdateServiceInstanceResponse; +import org.cloudfoundry.client.v3.serviceofferings.ListServiceOfferingsRequest; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingResource; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v3.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_1) +public final class ServiceInstancesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private Mono spaceId; + + @Test + public void createManagedServiceInstance() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + this.spaceId + .flatMap( + spaceId -> + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstancesV3() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .filter(resource -> serviceInstanceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getUserProvidedServiceCredentials() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + Map credentials = new HashMap<>(); + credentials.put("foo", "bar"); + this.spaceId + .flatMap( + spaceId -> + createUserProvidedServiceInstance( + this.cloudFoundryClient, + serviceInstanceName, + credentials, + spaceId)) + .map( + getServiceInstanceResponse -> + getServiceInstanceResponse.getServiceInstance().get().getId()) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstancesV3() + .getUserProvidedCredentials( + GetUserProvidedCredentialsRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .filter(resource -> credentials.equals(resource.getCredentials())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + this.spaceId + .flatMap( + spaceId -> + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstancesV3() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .filter(resource -> serviceInstanceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + this.spaceId + .flatMap( + spaceId -> + deleteServiceInstanceByName( + this.cloudFoundryClient, serviceInstanceName, spaceId)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + this.spaceId + .flatMap( + spaceId -> + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .flatMap( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstancesV3() + .get( + GetServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build())) + .filter(resource -> serviceInstanceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + this.spaceId + .flatMap( + spaceId -> + updateServiceInstanceByName( + this.cloudFoundryClient, serviceInstanceName, spaceId)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + this.spaceId + .flatMap( + spaceId -> + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName, + spaceId)) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceInstancesV3() + .list( + ListServiceInstancesRequest.builder() + .page(page) + .build()))) + .filter(resource -> serviceInstanceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSharedSpaces() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName + "-shareable", + spaceId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName)))) + .flatMap( + function( + (serviceInstanceId, newSpaceId) -> + requestShareServiceInstance( + this.cloudFoundryClient, + newSpaceId, + serviceInstanceId) + .then(Mono.just(serviceInstanceId)))) + .flatMapMany( + serviceInstanceId -> + this.cloudFoundryClient + .serviceInstancesV3() + .listSharedSpacesRelationship( + ListSharedSpacesRelationshipRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build()) + .flatMapIterable( + ListSharedSpacesRelationshipResponse::getData)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void share() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName + "-shareable", + spaceId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName)))) + .flatMapMany( + function( + (serviceInstanceId, newSpaceId) -> + Mono.zip( + Mono.just(newSpaceId), + this.cloudFoundryClient + .serviceInstancesV3() + .share( + ShareServiceInstanceRequest + .builder() + .data( + Relationship + .builder() + .id( + newSpaceId) + .build()) + .serviceInstanceId( + serviceInstanceId) + .build()) + .flatMapIterable( + ShareServiceInstanceResponse + ::getData) + .map(Relationship::getId) + .next()))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unshare() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String spaceName = this.nameFactory.getSpaceName(); + + Mono.zip(this.organizationId, this.spaceId) + .flatMap( + function( + (organizationId, spaceId) -> + Mono.zip( + createManagedServiceInstanceId( + this.cloudFoundryClient, + this.serviceBrokerId, + serviceInstanceName, + this.serviceName + "-shareable", + spaceId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName)))) + .delayUntil( + function( + (serviceInstanceId, newSpaceId) -> + requestShareServiceInstance( + this.cloudFoundryClient, + newSpaceId, + serviceInstanceId))) + .delayUntil( + function( + (serviceInstanceId, newSpaceId) -> + this.cloudFoundryClient + .serviceInstancesV3() + .unshare( + UnshareServiceInstanceRequest.builder() + .serviceInstanceId( + serviceInstanceId) + .spaceId(newSpaceId) + .build()))) + .flatMapMany( + function( + (serviceInstanceId, newSpaceId) -> + requestListSharedSpacesRelationship( + this.cloudFoundryClient, serviceInstanceId) + .flatMapIterable( + ListSharedSpacesRelationshipResponse + ::getData) + .filter(data -> newSpaceId.equals(data.getId())))) + .as(StepVerifier::create) + .expectNextCount(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono deleteServiceInstanceByName( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .list( + ListServiceInstancesRequest.builder() + .spaceId(spaceId) + .serviceInstanceName(serviceInstanceName) + .build()) + .map(serviceInstances -> serviceInstances.getResources().get(0)) + .flatMap( + serviceInstance -> + deleteServiceInstanceById( + cloudFoundryClient, serviceInstance.getId())); + } + + private static Mono deleteServiceInstanceById( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstancesV3() + .delete( + DeleteServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build()) + .map(Optional::get); + } + + private static Mono updateServiceInstanceByName( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName, String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .list( + ListServiceInstancesRequest.builder() + .spaceId(spaceId) + .serviceInstanceName(serviceInstanceName) + .build()) + .map(serviceInstances -> serviceInstances.getResources().get(0)) + .flatMap( + serviceInstance -> + updateServiceInstanceById( + cloudFoundryClient, serviceInstance.getId())) + .map(response -> response.getJobId().get()) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), jobId)) + .then(getServiceInstanceIdByName(cloudFoundryClient, serviceInstanceName)); + } + + private static Mono updateServiceInstanceById( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstancesV3() + .update( + UpdateServiceInstanceRequest.builder() + .serviceInstanceId(serviceInstanceId) + .parameter("foo", "bar") + .tag("baz") + .build()); + } + + private static Mono createManagedServiceInstanceId( + CloudFoundryClient cloudFoundryClient, + Mono serviceBrokerId, + String serviceInstanceName, + String serviceName, + String spaceId) { + return serviceBrokerId + .flatMap(brokerId -> getPlanId(cloudFoundryClient, brokerId, serviceName)) + .flatMap( + planId -> + requestCreateServiceInstance( + cloudFoundryClient, planId, serviceInstanceName, spaceId)) + .map(response -> response.getJobId().get()) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + cloudFoundryClient, Duration.ofMinutes(5), jobId)) + .then(getServiceInstanceIdByName(cloudFoundryClient, serviceInstanceName)); + } + + private static Mono getServiceInstanceIdByName( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName) { + return cloudFoundryClient + .serviceInstancesV3() + .list( + ListServiceInstancesRequest.builder() + .serviceInstanceName(serviceInstanceName) + .build()) + .map(serviceInstances -> serviceInstances.getResources().get(0).getId()); + } + + private static Mono createUserProvidedServiceInstance( + CloudFoundryClient cloudFoundryClient, + String serviceInstanceName, + Map credentials, + String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .type(ServiceInstanceType.USER_PROVIDED) + .relationships( + ServiceInstanceRelationships.builder() + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .credentials(credentials) + .build()); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Mono getPlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId, String serviceName) { + return requestListServiceOfferings(cloudFoundryClient, serviceBrokerId) + .filter( + serviceOfferingResource -> + serviceName.equals(serviceOfferingResource.getName())) + .single() + .map(ServiceOfferingResource::getId) + .flatMapMany(serviceId -> requestListServicePlans(cloudFoundryClient, serviceId)) + .single() + .map(ServicePlanResource::getId); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryClient cloudFoundryClient, + String planId, + String serviceInstanceName, + String spaceId) { + return cloudFoundryClient + .serviceInstancesV3() + .create( + CreateServiceInstanceRequest.builder() + .name(serviceInstanceName) + .type(ServiceInstanceType.MANAGED) + .relationships( + ServiceInstanceRelationships.builder() + .servicePlan( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(planId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .servicePlansV3() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceOfferingId(serviceId) + .build())); + } + + private static Flux requestListServiceOfferings( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .serviceOfferingsV3() + .list( + ListServiceOfferingsRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } + + private static Mono requestListSharedSpacesRelationship( + CloudFoundryClient cloudFoundryClient, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstancesV3() + .listSharedSpacesRelationship( + ListSharedSpacesRelationshipRequest.builder() + .serviceInstanceId(serviceInstanceId) + .build()); + } + + private static Mono requestShareServiceInstance( + CloudFoundryClient cloudFoundryClient, String newSpaceId, String serviceInstanceId) { + return cloudFoundryClient + .serviceInstancesV3() + .share( + ShareServiceInstanceRequest.builder() + .data(Relationship.builder().id(newSpaceId).build()) + .serviceInstanceId(serviceInstanceId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceOfferingsTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceOfferingsTest.java new file mode 100644 index 00000000000..f0b67a37b46 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServiceOfferingsTest.java @@ -0,0 +1,277 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.serviceofferings.DeleteServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.GetServiceOfferingRequest; +import org.cloudfoundry.client.v3.serviceofferings.GetServiceOfferingResponse; +import org.cloudfoundry.client.v3.serviceofferings.ListServiceOfferingsRequest; +import org.cloudfoundry.client.v3.serviceofferings.ServiceOfferingResource; +import org.cloudfoundry.client.v3.serviceofferings.UpdateServiceOfferingRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_10) +public final class ServiceOfferingsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServiceOfferingId( + this.cloudFoundryClient, serviceName, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + serviceOfferingId -> + this.cloudFoundryClient + .serviceOfferingsV3() + .delete( + DeleteServiceOfferingRequest.builder() + .purge(true) + .serviceOfferingId(serviceOfferingId) + .build())) + .thenMany( + requestListServiceOfferings( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(resource -> serviceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + getServiceOfferingId( + this.cloudFoundryClient, this.serviceName, serviceBrokerId)) + .flatMap( + serviceOfferingId -> + this.cloudFoundryClient + .serviceOfferingsV3() + .get( + GetServiceOfferingRequest.builder() + .serviceOfferingId(serviceOfferingId) + .build())) + .map(GetServiceOfferingResponse::getName) + .as(StepVerifier::create) + .expectNext(this.serviceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceOfferingsV3() + .list( + ListServiceOfferingsRequest.builder() + .page(page) + .build())) + .filter(resource -> this.serviceName.equals(resource.getName())) + .map(ServiceOfferingResource::getDescription) + .as(StepVerifier::create) + .expectNext("test-service-description") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterBy() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .serviceOfferingsV3() + .list( + ListServiceOfferingsRequest + .builder() + .page(page) + .serviceBrokerId( + serviceBrokerId) + .build()))) + .filter(resource -> this.serviceName.equals(resource.getName())) + .map(ServiceOfferingResource::getDescription) + .as(StepVerifier::create) + .expectNext("test-service-description") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServiceOfferingId( + this.cloudFoundryClient, serviceName, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + serviceOfferingId -> + this.cloudFoundryClient + .serviceOfferingsV3() + .update( + UpdateServiceOfferingRequest.builder() + .metadata( + Metadata.builder() + .label( + "test-service-offering-update-key", + "test-service-offering-update-value") + .build()) + .serviceOfferingId(serviceOfferingId) + .build())) + .thenMany( + requestListServiceOfferings( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(response -> serviceName.equals(response.getName())) + .map(ServiceOfferingResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext( + Collections.singletonMap( + "test-service-offering-update-key", + "test-service-offering-update-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Mono getServiceOfferingId( + CloudFoundryClient cloudFoundryClient, String serviceName, String serviceBrokerId) { + return requestListServiceOfferings(cloudFoundryClient, serviceBrokerId) + .filter(resource -> serviceName.equals(resource.getName())) + .map(ServiceOfferingResource::getId) + .single(); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Flux requestListServiceOfferings( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .serviceOfferingsV3() + .list( + ListServiceOfferingsRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java new file mode 100644 index 00000000000..5e37753b66b --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/ServicePlansTest.java @@ -0,0 +1,370 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; + +import java.time.Duration; +import java.util.Collections; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.serviceplans.DeleteServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.GetServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.GetServicePlanResponse; +import org.cloudfoundry.client.v3.serviceplans.ListServicePlansRequest; +import org.cloudfoundry.client.v3.serviceplans.ServicePlanResource; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanRequest; +import org.cloudfoundry.client.v3.serviceplans.UpdateServicePlanVisibilityRequest; +import org.cloudfoundry.client.v3.serviceplans.Visibility; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_10) +public final class ServicePlansTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Autowired private String planName; + + @Autowired private Mono serviceBrokerId; + + @Test + public void delete() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlansV3() + .delete( + DeleteServicePlanRequest.builder() + .servicePlanId(servicePlanId) + .build())) + .thenMany( + requestListServicePlans( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(response -> serviceName.equals(response.getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void get() { + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + getServicePlanId(this.cloudFoundryClient, serviceBrokerId)) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlansV3() + .get( + GetServicePlanRequest.builder() + .servicePlanId(servicePlanId) + .build())) + .map(GetServicePlanResponse::getName) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .servicePlansV3() + .list(ListServicePlansRequest.builder().page(page).build())) + .filter(response -> this.planName.equals(response.getName())) + .map(ServicePlanResource::getDescription) + .as(StepVerifier::create) + .expectNext("test-plan-description") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByServiceBrokerId() { + this.serviceBrokerId + .flatMapMany( + serviceBrokerId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .servicePlansV3() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceBrokerId( + serviceBrokerId) + .build()))) + .map(ServicePlanResource::getName) + .filter(planName -> this.planName.equals(planName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateServicePlanVisibilityWithSame() { + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + getServicePlanId(this.cloudFoundryClient, serviceBrokerId)) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlansV3() + .updateVisibility( + UpdateServicePlanVisibilityRequest.builder() + .servicePlanId(servicePlanId) + .type(Visibility.SPACE) + .build())) + .as(StepVerifier::create) + .expectError() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listUsingLabelSelector() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlansV3() + .update( + UpdateServicePlanRequest.builder() + .metadata( + Metadata.builder() + .label( + "test-label-selector-key1", + "test-label-selector-value1") + .label( + "test-label-selector-key2", + "test-label-selector-value2") + .build()) + .servicePlanId(servicePlanId) + .build())) + .thenMany( + Flux.merge( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .servicePlansV3() + .list( + ListServicePlansRequest.builder() + .labelSelector( + "test-label-selector-key1,test-label-selector-key1") + .page(page) + .serviceBrokerId( + serviceBrokerMetadata + .serviceBrokerId) + .build())), + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .servicePlansV3() + .list( + ListServicePlansRequest.builder() + .labelSelector( + "test-label-selector-key1,key-that-causes-no-results-because-this-is-an-AND-query") + .page(page) + .serviceBrokerId( + serviceBrokerMetadata + .serviceBrokerId) + .build())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + true)) + .block(Duration.ofMinutes(5)); + + getServicePlanId(this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId) + .flatMap( + servicePlanId -> + this.cloudFoundryClient + .servicePlansV3() + .update( + UpdateServicePlanRequest.builder() + .metadata( + Metadata.builder() + .label( + "test-update-key", + "test-update-value") + .build()) + .servicePlanId(servicePlanId) + .build())) + .thenMany( + requestListServicePlans( + this.cloudFoundryClient, serviceBrokerMetadata.serviceBrokerId)) + .filter(response -> planName.equals(response.getName())) + .map(ServicePlanResource::getMetadata) + .map(Metadata::getLabels) + .as(StepVerifier::create) + .expectNext(Collections.singletonMap("test-update-key", "test-update-value")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Mono getServicePlanId( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return requestListServicePlans(cloudFoundryClient, serviceBrokerId) + .filter(resource -> "test-plan-description".equals(resource.getDescription())) + .map(ServicePlanResource::getId) + .single(); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Flux requestListServicePlans( + CloudFoundryClient cloudFoundryClient, String serviceBrokerId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .servicePlansV3() + .list( + ListServicePlansRequest.builder() + .page(page) + .serviceBrokerId(serviceBrokerId) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java new file mode 100644 index 00000000000..a36fb49570e --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/SpaceQuotasTest.java @@ -0,0 +1,463 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import java.util.Collections; +import java.util.List; +import java.util.stream.Collectors; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.organizations.CreateOrganizationRequest; +import org.cloudfoundry.client.v3.organizations.Organization; +import org.cloudfoundry.client.v3.quotas.Apps; +import org.cloudfoundry.client.v3.quotas.Routes; +import org.cloudfoundry.client.v3.quotas.Services; +import org.cloudfoundry.client.v3.quotas.spaces.*; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.Space; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.jetbrains.annotations.NotNull; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) +public final class SpaceQuotasTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + private String organizationId; + private String spaceId; + + @BeforeEach + public void createOrganization() { + String orgName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + + organizationId = createOrganization(this.cloudFoundryClient, orgName).getId(); + spaceId = createSpace(this.cloudFoundryClient, organizationId, spaceName).getId(); + } + + @Test + public void create() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + SpaceQuotaRelationships spaceQuotaRelationships = + createSpaceQuotaRelationships(organizationId); + + Apps spaceQuotaAppLimits = + Apps.builder() + .perProcessMemoryInMb(1024) + .totalMemoryInMb(2048) + .logRateLimitInBytesPerSecond(0) + .build(); + Services spaceQuotaServiceLimits = + Services.builder().isPaidServicesAllowed(false).totalServiceInstances(10).build(); + Routes spaceQuotaRouteLimits = Routes.builder().totalRoutes(10).build(); + + this.cloudFoundryClient + .spaceQuotasV3() + .create( + CreateSpaceQuotaRequest.builder() + .name(spaceQuotaName) + .apps(spaceQuotaAppLimits) + .services(spaceQuotaServiceLimits) + .routes(spaceQuotaRouteLimits) + .relationships(spaceQuotaRelationships) + .build()) + .thenMany(requestListSpaceQuotas(this.cloudFoundryClient, spaceQuotaName)) + .single() + .as(StepVerifier::create) + .assertNext( + spaceQuotaResource -> { + assertThat(spaceQuotaResource).isNotNull(); + assertThat(spaceQuotaResource.getId()).isNotNull(); + assertThat(spaceQuotaResource.getName()).isEqualTo(spaceQuotaName); + assertThat(spaceQuotaResource.getApps()).isEqualTo(spaceQuotaAppLimits); + assertThat(spaceQuotaResource.getServices()) + .isEqualTo(spaceQuotaServiceLimits); + assertThat(spaceQuotaResource.getRoutes()) + .isEqualTo(spaceQuotaRouteLimits); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createWithSpaceRelationship() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + SpaceQuotaRelationships spaceQuotaRelationships = + createSpaceQuotaRelationships(organizationId, Collections.singletonList(spaceId)); + + Apps spaceQuotaAppLimits = + Apps.builder() + .perProcessMemoryInMb(1024) + .totalMemoryInMb(2048) + .logRateLimitInBytesPerSecond(0) + .build(); + Services spaceQuotaServiceLimits = + Services.builder().isPaidServicesAllowed(false).totalServiceInstances(10).build(); + Routes spaceQuotaRouteLimits = Routes.builder().totalRoutes(10).build(); + + this.cloudFoundryClient + .spaceQuotasV3() + .create( + CreateSpaceQuotaRequest.builder() + .name(spaceQuotaName) + .apps(spaceQuotaAppLimits) + .services(spaceQuotaServiceLimits) + .routes(spaceQuotaRouteLimits) + .relationships(spaceQuotaRelationships) + .build()) + .thenMany(requestListSpaceQuotas(this.cloudFoundryClient, spaceQuotaName)) + .single() + .as(StepVerifier::create) + .assertNext( + spaceQuotaResource -> { + assertThat(spaceQuotaResource).isNotNull(); + assertThat(spaceQuotaResource.getId()).isNotNull(); + assertThat(spaceQuotaResource.getName()).isEqualTo(spaceQuotaName); + assertThat(spaceQuotaResource.getApps()).isEqualTo(spaceQuotaAppLimits); + assertThat(spaceQuotaResource.getServices()) + .isEqualTo(spaceQuotaServiceLimits); + assertThat(spaceQuotaResource.getRoutes()) + .isEqualTo(spaceQuotaRouteLimits); + assertThat(spaceQuotaResource.getRelationships()).isNotNull(); + assertThat(spaceQuotaResource.getRelationships().getOrganization()) + .isNotNull(); + assertThat(spaceQuotaResource.getRelationships().getSpaces()) + .isNotNull(); + assertThat( + spaceQuotaResource + .getRelationships() + .getOrganization() + .getData() + .getId()) + .isEqualTo(organizationId); + assertThat( + spaceQuotaResource + .getRelationships() + .getSpaces() + .getData() + .get(0) + .getId()) + .isEqualTo(spaceId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createSpaceQuotaId(this.cloudFoundryClient, spaceQuotaName, organizationId) + .flatMap( + spaceQuotaId -> + this.cloudFoundryClient + .spaceQuotasV3() + .get( + GetSpaceQuotaRequest.builder() + .spaceQuotaId(spaceQuotaId) + .build())) + .map(GetSpaceQuotaResponse::getName) + .as(StepVerifier::create) + .expectNext(spaceQuotaName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createSpaceQuota(this.cloudFoundryClient, spaceQuotaName, organizationId) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .spaceQuotasV3() + .list( + ListSpaceQuotasRequest.builder() + .page(page) + .build()))) + .filter(resource -> spaceQuotaName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + int totalMemoryLimit = 64 * 1024; // 64 GB + + createSpaceQuotaId(this.cloudFoundryClient, spaceQuotaName, organizationId) + .flatMap( + spaceQuotaId -> + this.cloudFoundryClient + .spaceQuotasV3() + .update( + UpdateSpaceQuotaRequest.builder() + .spaceQuotaId(spaceQuotaId) + .apps( + Apps.builder() + .totalMemoryInMb( + totalMemoryLimit) + .build()) + .routes( + Routes.builder() + .totalRoutes(100) + .build()) + .services( + Services.builder() + .isPaidServicesAllowed(true) + .totalServiceInstances(100) + .build()) + .build())) + .thenMany(requestListSpaceQuotas(this.cloudFoundryClient, spaceQuotaName)) + .as(StepVerifier::create) + .consumeNextWith( + organizationQuotaResource -> { + assertThat(organizationQuotaResource.getApps().getTotalMemoryInMb()) + .isEqualTo(totalMemoryLimit); + assertThat(organizationQuotaResource.getRoutes().getTotalRoutes()) + .isEqualTo(100); + assertThat( + organizationQuotaResource + .getServices() + .getTotalServiceInstances()) + .isEqualTo(100); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + + createSpaceQuotaId(this.cloudFoundryClient, spaceQuotaName, organizationId) + .flatMap( + spaceQuotaId -> + this.cloudFoundryClient + .spaceQuotasV3() + .delete( + DeleteSpaceQuotaRequest.builder() + .spaceQuotaId(spaceQuotaId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany(requestListSpaceQuotas(this.cloudFoundryClient, spaceQuotaName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void apply() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + + Relationship spaceRelationship1 = Relationship.builder().id(spaceId).build(); + ToManyRelationship spaceRelationships = + ToManyRelationship.builder().data(spaceRelationship1).build(); + + createSpaceQuotaId(this.cloudFoundryClient, spaceQuotaName, organizationId) + .flatMap( + spaceQuotaId -> { + ApplySpaceQuotaRequest applySpaceQuotaRequest = + ApplySpaceQuotaRequest.builder() + .spaceQuotaId(spaceQuotaId) + .spaceRelationships(spaceRelationships) + .build(); + return this.cloudFoundryClient + .spaceQuotasV3() + .apply(applySpaceQuotaRequest); + }) + .as(StepVerifier::create) + .consumeNextWith( + applySpaceQuotaResponse -> { + List spaceRelationshipsData = + applySpaceQuotaResponse.spaceRelationships().getData(); + assertThat(spaceRelationshipsData.size()).isEqualTo(1); + assertThat(spaceRelationshipsData.get(0).getId()).isEqualTo(spaceId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void remove() { + String spaceQuotaName = this.nameFactory.getQuotaDefinitionName(); + + // create a space quota in org with "organizationId" that is pre-associated to the space + // with "spaceId" + createSpaceQuotaId( + this.cloudFoundryClient, + spaceQuotaName, + organizationId, + Collections.singletonList(spaceId)) + .flatMap( + spaceQuotaId -> { + RemoveSpaceQuotaRequest removeSpaceQuotaRequest = + RemoveSpaceQuotaRequest.builder() + .spaceQuotaId(spaceQuotaId) + .spaceId(spaceId) + .build(); + return this.cloudFoundryClient + .spaceQuotasV3() + .remove(removeSpaceQuotaRequest); + }) + .thenMany(requestListSpaceQuotas(this.cloudFoundryClient, spaceQuotaName)) + .as(StepVerifier::create) + .consumeNextWith( + spaceQuotaResource -> { + List spaceRelationshipsData = + spaceQuotaResource.getRelationships().getSpaces().getData(); + assertThat(spaceRelationshipsData.size()).isEqualTo(0); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Organization createOrganization( + CloudFoundryClient cloudFoundryClient, String orgName) { + return cloudFoundryClient + .organizationsV3() + .create(CreateOrganizationRequest.builder().name(orgName).build()) + .block(Duration.ofMinutes(5)); + } + + private static Space createSpace( + CloudFoundryClient cloudFoundryClient, String orgGuid, String spaceName) { + ToOneRelationship organizationRelationship = + ToOneRelationship.builder() + .data(Relationship.builder().id(orgGuid).build()) + .build(); + SpaceRelationships spaceRelationships = + SpaceRelationships.builder().organization(organizationRelationship).build(); + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships(spaceRelationships) + .build()) + .block(Duration.ofMinutes(5)); + } + + @NotNull + private static SpaceQuotaRelationships createSpaceQuotaRelationships(String orgGuid) { + ToOneRelationship organizationRelationship = + ToOneRelationship.builder() + .data(Relationship.builder().id(orgGuid).build()) + .build(); + return SpaceQuotaRelationships.builder().organization(organizationRelationship).build(); + } + + @NotNull + private static SpaceQuotaRelationships createSpaceQuotaRelationships( + String orgGuid, List spaceGuids) { + ToOneRelationship organizationRelationship = + ToOneRelationship.builder() + .data(Relationship.builder().id(orgGuid).build()) + .build(); + + // iterate over spaceGuids to create Relationship objects + List spaceRelationshipsData = + spaceGuids.stream() + .map(spaceGuid -> Relationship.builder().id(spaceGuid).build()) + .collect(Collectors.toList()); + + ToManyRelationship spaceRelationships = + ToManyRelationship.builder().data(spaceRelationshipsData).build(); + return SpaceQuotaRelationships.builder() + .organization(organizationRelationship) + .spaces(spaceRelationships) + .build(); + } + + private static Mono createSpaceQuotaId( + CloudFoundryClient cloudFoundryClient, String spaceQuotaName, String orgGuid) { + return createSpaceQuota(cloudFoundryClient, spaceQuotaName, orgGuid) + .map(CreateSpaceQuotaResponse::getId); + } + + private static Mono createSpaceQuota( + CloudFoundryClient cloudFoundryClient, String spaceQuotaName, String orgGuid) { + SpaceQuotaRelationships spaceQuotaRelationships = createSpaceQuotaRelationships(orgGuid); + return cloudFoundryClient + .spaceQuotasV3() + .create( + CreateSpaceQuotaRequest.builder() + .name(spaceQuotaName) + .relationships(spaceQuotaRelationships) + .build()); + } + + private static Mono createSpaceQuotaId( + CloudFoundryClient cloudFoundryClient, + String spaceQuotaName, + String orgGuid, + List spaceGuids) { + return createSpaceQuota(cloudFoundryClient, spaceQuotaName, orgGuid, spaceGuids) + .map(CreateSpaceQuotaResponse::getId); + } + + private static Mono createSpaceQuota( + CloudFoundryClient cloudFoundryClient, + String spaceQuotaName, + String orgGuid, + List spaceGuids) { + SpaceQuotaRelationships spaceQuotaRelationships = + createSpaceQuotaRelationships(orgGuid, spaceGuids); + return cloudFoundryClient + .spaceQuotasV3() + .create( + CreateSpaceQuotaRequest.builder() + .name(spaceQuotaName) + .relationships(spaceQuotaRelationships) + .build()); + } + + private static Flux requestListSpaceQuotas( + CloudFoundryClient cloudFoundryClient, String spaceName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .spaceQuotasV3() + .list( + ListSpaceQuotasRequest.builder() + .name(spaceName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/SpacesTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/SpacesTest.java new file mode 100644 index 00000000000..fc939770984 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/SpacesTest.java @@ -0,0 +1,614 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.io.IOException; +import java.io.InputStream; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainRequest; +import org.cloudfoundry.client.v3.domains.CreateDomainResponse; +import org.cloudfoundry.client.v3.domains.DomainRelationships; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementRequest; +import org.cloudfoundry.client.v3.isolationsegments.AddIsolationSegmentOrganizationEntitlementResponse; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentRequest; +import org.cloudfoundry.client.v3.isolationsegments.CreateIsolationSegmentResponse; +import org.cloudfoundry.client.v3.routes.CreateRouteRequest; +import org.cloudfoundry.client.v3.routes.CreateRouteResponse; +import org.cloudfoundry.client.v3.routes.ListRoutesRequest; +import org.cloudfoundry.client.v3.routes.RouteRelationships; +import org.cloudfoundry.client.v3.routes.RouteResource; +import org.cloudfoundry.client.v3.spaces.ApplyManifestRequest; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.AssignSpaceIsolationSegmentResponse; +import org.cloudfoundry.client.v3.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v3.spaces.CreateSpaceResponse; +import org.cloudfoundry.client.v3.spaces.DeleteSpaceRequest; +import org.cloudfoundry.client.v3.spaces.DeleteUnmappedRoutesRequest; +import org.cloudfoundry.client.v3.spaces.GetSpaceIsolationSegmentRequest; +import org.cloudfoundry.client.v3.spaces.ListSpacesRequest; +import org.cloudfoundry.client.v3.spaces.SpaceRelationships; +import org.cloudfoundry.client.v3.spaces.SpaceResource; +import org.cloudfoundry.client.v3.spaces.UpdateSpaceRequest; +import org.cloudfoundry.util.JobUtils; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import org.springframework.util.StreamUtils; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) +public final class SpacesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private Mono organizationId; + + @Test + public void assignIsolationSegment() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .flatMap( + function( + (isolationSegmentId, spaceId) -> + Mono.zip( + Mono.just(isolationSegmentId), + this.cloudFoundryClient + .spacesV3() + .assignIsolationSegment( + AssignSpaceIsolationSegmentRequest + .builder() + .data( + Relationship + .builder() + .id( + isolationSegmentId) + .build()) + .spaceId(spaceId) + .build()) + .map( + response -> + response.getData() + .getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + this.cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship + .builder() + .data( + Relationship + .builder() + .id( + organizationId) + .build()) + .build()) + .build()) + .build())) + .then(requestListSpaces(this.cloudFoundryClient, spaceName).single()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) + @Test + public void delete() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + this.cloudFoundryClient + .spacesV3() + .delete( + DeleteSpaceRequest.builder() + .spaceId(spaceId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job))) + .thenMany(requestListSpaces(this.cloudFoundryClient, spaceName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // TODO: Await resolution of https://github.com/cloudfoundry/cloud_controller_ng/issues/1876 + @IfCloudFoundryVersion(greaterThan = CloudFoundryVersion.PCF_2_9) + @Disabled("Await https://github.com/cloudfoundry/cf-java-client/issues/1876") + @Test + public void deleteUnmappedRoutes() { + String domainName = this.nameFactory.getDomainName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createDomainId( + this.cloudFoundryClient, + domainName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .delayUntil( + function( + (domainId, spaceId) -> + createRouteId( + this.cloudFoundryClient, + domainId, + "deleteUnmappedRoutes", + spaceId))) + .flatMap( + function( + (domainId, spaceId) -> + this.cloudFoundryClient + .spacesV3() + .deleteUnmappedRoutes( + DeleteUnmappedRoutesRequest.builder() + .spaceId(spaceId) + .build()) + .flatMap( + job -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + job)) + .thenReturn(domainId))) + .flatMapMany(domainId -> requestListRoutes(this.cloudFoundryClient, domainId)) + .as(StepVerifier::create) + .expectNextCount(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getIsolationSegment() { + String isolationSegmentName = this.nameFactory.getIsolationSegmentName(); + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + Mono.zip( + createIsolationSegmentId( + this.cloudFoundryClient, + isolationSegmentName, + organizationId), + createSpaceId( + this.cloudFoundryClient, + organizationId, + spaceName))) + .delayUntil( + function( + (isolationSegmentId, spaceId) -> + requestAssignIsolationSegment( + this.cloudFoundryClient, + isolationSegmentId, + spaceId))) + .flatMap( + function( + (isolationSegmentId, spaceId) -> + Mono.zip( + Mono.just(isolationSegmentId), + this.cloudFoundryClient + .spacesV3() + .getIsolationSegment( + GetSpaceIsolationSegmentRequest + .builder() + .spaceId(spaceId) + .build()) + .map( + response -> + response.getData() + .getId())))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + requestCreateSpace( + this.cloudFoundryClient, organizationId, spaceName)) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .spacesV3() + .list( + ListSpacesRequest.builder() + .page(page) + .build()))) + .filter(resource -> spaceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + requestCreateSpace( + this.cloudFoundryClient, organizationId, spaceName)) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .spacesV3() + .list( + ListSpacesRequest.builder() + .name(spaceName) + .build())) + .single()) + .map(SpaceResource::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByOrganization() { + String spaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .delayUntil( + organizationId -> + requestCreateSpace( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMapMany( + organizationId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .spacesV3() + .list( + ListSpacesRequest.builder() + .organizationId( + organizationId) + .page(page) + .build()))) + .filter(resource -> spaceName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) + @Test + public void update() { + String spaceName = this.nameFactory.getSpaceName(); + String newSpaceName = this.nameFactory.getSpaceName(); + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + this.cloudFoundryClient + .spacesV3() + .update( + UpdateSpaceRequest.builder() + .metadata( + Metadata.builder() + .annotation( + "annotationKey", + "annotationValue") + .label( + "labelKey", + "labelValue") + .build()) + .name(newSpaceName) + .spaceId(spaceId) + .build())) + .thenMany(requestListSpaces(this.cloudFoundryClient, newSpaceName)) + .map(SpaceResource::getMetadata) + .as(StepVerifier::create) + .consumeNextWith( + metadata -> { + assertThat(metadata.getAnnotations().get("annotationKey")) + .isEqualTo("annotationValue"); + assertThat(metadata.getLabels().get("labelKey")) + .isEqualTo("labelValue"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion( + greaterThanOrEqualTo = + CloudFoundryVersion.UNSPECIFIED) // TODO how to select this version? + @Test + public void applyManifest() throws IOException { + String spaceName = this.nameFactory.getSpaceName(); + + byte[] manifest; + try (InputStream inputStream = + new ClassPathResource("test-manifest.yml").getInputStream()) { + manifest = StreamUtils.copyToByteArray(inputStream); + } + + this.organizationId + .flatMap( + organizationId -> + createSpaceId(this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + this.cloudFoundryClient + .spacesV3() + .applyManifest( + ApplyManifestRequest.builder() + .spaceId(spaceId) + .manifest(manifest) + .build()) + .map( + response -> + response.getJobId() + .orElseThrow( + () -> + new IllegalStateException( + "No jobId" + + " returned" + + " for applying" + + " v3 manifest"))) + .flatMap( + jobId -> + JobUtils.waitForCompletion( + this.cloudFoundryClient, + Duration.ofMinutes(5), + jobId)) + .then(Mono.just(spaceId))) + .flatMap( + spaceId -> + this.cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest.builder() + .spaceId(spaceId) + .name("test-application") + .build()) + .single()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createDomainId( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return requestCreateDomain(cloudFoundryClient, domainName, organizationId) + .map(CreateDomainResponse::getId); + } + + private static Mono createIsolationSegmentId( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentName, + String organizationId) { + return requestCreateIsolationSegment(cloudFoundryClient, isolationSegmentName) + .map(CreateIsolationSegmentResponse::getId) + .delayUntil( + isolationSegmentId -> + requestAddIsolationSegmentOrganizationEntitlement( + cloudFoundryClient, isolationSegmentId, organizationId)); + } + + private static Mono createRouteId( + CloudFoundryClient cloudFoundryClient, String domainId, String label, String spaceId) { + return requestCreateRoute(cloudFoundryClient, domainId, label, spaceId) + .map(CreateRouteResponse::getId); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(CreateSpaceResponse::getId); + } + + private static Mono + requestAddIsolationSegmentOrganizationEntitlement( + CloudFoundryClient cloudFoundryClient, + String isolationSegmentId, + String organizationId) { + return cloudFoundryClient + .isolationSegments() + .addOrganizationEntitlement( + AddIsolationSegmentOrganizationEntitlementRequest.builder() + .isolationSegmentId(isolationSegmentId) + .data(Relationship.builder().id(organizationId).build()) + .build()); + } + + private static Mono requestAssignIsolationSegment( + CloudFoundryClient cloudFoundryClient, String isolationSegmentId, String spaceId) { + return cloudFoundryClient + .spacesV3() + .assignIsolationSegment( + AssignSpaceIsolationSegmentRequest.builder() + .data(Relationship.builder().id(isolationSegmentId).build()) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryClient cloudFoundryClient, String domainName, String organizationId) { + return cloudFoundryClient + .domainsV3() + .create( + CreateDomainRequest.builder() + .internal(false) + .name(domainName) + .relationships( + DomainRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateIsolationSegment( + CloudFoundryClient cloudFoundryClient, String isolationSegmentName) { + return cloudFoundryClient + .isolationSegments() + .create(CreateIsolationSegmentRequest.builder().name(isolationSegmentName).build()); + } + + private static Mono requestCreateRoute( + CloudFoundryClient cloudFoundryClient, String domainId, String label, String spaceId) { + String key = String.format("test-%s-key", label); + String value = String.format("test-%s-value", label); + + return cloudFoundryClient + .routesV3() + .create( + CreateRouteRequest.builder() + .metadata(Metadata.builder().label(key, value).build()) + .relationships( + RouteRelationships.builder() + .domain( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(domainId) + .build()) + .build()) + .space( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(spaceId) + .build()) + .build()) + .build()) + .build()); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spacesV3() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .relationships( + SpaceRelationships.builder() + .organization( + ToOneRelationship.builder() + .data( + Relationship.builder() + .id(organizationId) + .build()) + .build()) + .build()) + .build()); + } + + private static Flux requestListRoutes( + CloudFoundryClient cloudFoundryClient, String domainId) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .routesV3() + .list( + ListRoutesRequest.builder() + .domainId(domainId) + .page(page) + .build())); + } + + private static Flux requestListSpaces( + CloudFoundryClient cloudFoundryClient, String spaceName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .spacesV3() + .list( + ListSpacesRequest.builder() + .name(spaceName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/StacksTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/StacksTest.java new file mode 100644 index 00000000000..12d15643677 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/StacksTest.java @@ -0,0 +1,179 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.stacks.CreateStackRequest; +import org.cloudfoundry.client.v3.stacks.CreateStackResponse; +import org.cloudfoundry.client.v3.stacks.DeleteStackRequest; +import org.cloudfoundry.client.v3.stacks.GetStackRequest; +import org.cloudfoundry.client.v3.stacks.GetStackResponse; +import org.cloudfoundry.client.v3.stacks.ListStacksRequest; +import org.cloudfoundry.client.v3.stacks.Stack; +import org.cloudfoundry.client.v3.stacks.StackResource; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class StacksTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + private String stackName; + + @BeforeEach + void setUp(@Autowired Mono stackName) { + this.stackName = stackName.block(); + } + + @Test + public void create() { + String stackName = this.nameFactory.getStackName(); + + this.cloudFoundryClient + .stacksV3() + .create( + CreateStackRequest.builder() + .description("Test stack description") + .name(stackName) + .build()) + .thenMany(requestListStacks(stackName)) + .map(Stack::getDescription) + .as(StepVerifier::create) + .expectNext("Test stack description") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String stackName = this.nameFactory.getStackName(); + + createStackId(this.cloudFoundryClient, stackName) + .delayUntil( + stackId -> + this.cloudFoundryClient + .stacksV3() + .delete( + DeleteStackRequest.builder() + .stackId(stackId) + .build())) + .flatMap(stackId -> requestGetStack(this.cloudFoundryClient, stackId)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(ClientV3Exception.class) + .hasMessageMatching( + "CF-ResourceNotFound\\([0-9]+\\): Stack not" + + " found.*")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + getStackId() + .flatMap( + stackId -> + this.cloudFoundryClient + .stacksV3() + .get(GetStackRequest.builder().stackId(stackId).build())) + .map(Stack::getName) + .as(StepVerifier::create) + .expectNext(this.stackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + getStackId() + .flatMapMany( + stackId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .stacksV3() + .list( + ListStacksRequest.builder() + .page(page) + .build())) + .filter(stack -> stack.getId().equals(stackId))) + .map(Stack::getName) + .as(StepVerifier::create) + .expectNext(this.stackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() { + this.requestListStacks(this.stackName) + .map(Stack::getName) + .as(StepVerifier::create) + .expectNext(this.stackName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createStackId( + CloudFoundryClient cloudFoundryClient, String stackName) { + return requestCreateStack(cloudFoundryClient, stackName).map(Stack::getId); + } + + private Mono getStackId() { + return this.requestListStacks(this.stackName).single().map(Stack::getId); + } + + private static Mono requestCreateStack( + CloudFoundryClient cloudFoundryClient, String stackName) { + return cloudFoundryClient + .stacksV3() + .create( + CreateStackRequest.builder() + .description("Test stack description") + .name(stackName) + .build()); + } + + private static Mono requestGetStack( + CloudFoundryClient cloudFoundryClient, String stackId) { + return cloudFoundryClient + .stacksV3() + .get(GetStackRequest.builder().stackId(stackId).build()); + } + + private Flux requestListStacks(String stackName) { + return PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .stacksV3() + .list( + ListStacksRequest.builder() + .name(stackName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/TasksTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/TasksTest.java new file mode 100644 index 00000000000..0e3fdada8ce --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/TasksTest.java @@ -0,0 +1,358 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.cloudfoundry.client.v3.tasks.TaskState.RUNNING; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.io.IOException; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.applications.ApplicationResource; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletRequest; +import org.cloudfoundry.client.v3.applications.GetApplicationCurrentDropletResponse; +import org.cloudfoundry.client.v3.applications.ListApplicationsRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskRequest; +import org.cloudfoundry.client.v3.tasks.CancelTaskResponse; +import org.cloudfoundry.client.v3.tasks.CreateTaskRequest; +import org.cloudfoundry.client.v3.tasks.CreateTaskResponse; +import org.cloudfoundry.client.v3.tasks.GetTaskRequest; +import org.cloudfoundry.client.v3.tasks.GetTaskResponse; +import org.cloudfoundry.client.v3.tasks.ListTasksRequest; +import org.cloudfoundry.client.v3.tasks.TaskResource; +import org.cloudfoundry.client.v3.tasks.TaskState; +import org.cloudfoundry.operations.CloudFoundryOperations; +import org.cloudfoundry.operations.applications.ApplicationHealthCheck; +import org.cloudfoundry.operations.applications.PushApplicationRequest; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) +@CleanupCloudFoundryAfterClass +public final class TasksTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Test + public void cancel() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createTaskId(this.cloudFoundryClient, applicationId))) + .flatMap( + taskId -> + this.cloudFoundryClient + .tasks() + .cancel(CancelTaskRequest.builder().taskId(taskId).build()) + .map(CancelTaskResponse::getState)) + .as(StepVerifier::create) + .expectNext(TaskState.CANCELING) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .delayUntil(applicationId -> getDropletId(this.cloudFoundryClient, applicationId)) + .flatMap( + applicationId -> + this.cloudFoundryClient + .tasks() + .create( + CreateTaskRequest.builder() + .applicationId(applicationId) + .command("ls") + .diskInMb(129) + .memoryInMb(129) + .build())) + .thenMany( + requestListTasks(this.cloudFoundryClient) + .filter(task -> 129 == task.getMemoryInMb()) + .map(TaskResource::getDiskInMb)) + .as(StepVerifier::create) + .expectNext(129) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createTaskId(this.cloudFoundryClient, applicationId))) + .flatMap( + taskId -> + this.cloudFoundryClient + .tasks() + .get(GetTaskRequest.builder().taskId(taskId).build()) + .map(GetTaskResponse::getCommand)) + .as(StepVerifier::create) + .expectNext("ls") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + requestCreateTask(this.cloudFoundryClient, applicationId) + .thenReturn(dropletId))) + .flatMapMany( + dropletId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .tasks() + .list( + ListTasksRequest.builder() + .page(page) + .build())) + .filter(task -> dropletId.equals(task.getDropletId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByApplication() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .delayUntil( + function( + (applicationId, dropletId) -> + requestCreateTask(this.cloudFoundryClient, applicationId))) + .flatMapMany( + function( + (applicationId, dropletId) -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .tasks() + .list( + ListTasksRequest + .builder() + .applicationId( + applicationId) + .page(page) + .build())) + .filter( + task -> + dropletId.equals( + task.getDropletId())))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByName() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + createTaskId(this.cloudFoundryClient, applicationId))) + .flatMap(taskId -> getTaskName(this.cloudFoundryClient, taskId)) + .flatMapMany( + taskName -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .tasks() + .list( + ListTasksRequest.builder() + .name(taskName) + .page(page) + .build()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listFilterByState() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication(this.cloudFoundryOperations, applicationName) + .then(getApplicationId(this.cloudFoundryClient, applicationName)) + .flatMap( + applicationId -> + Mono.zip( + Mono.just(applicationId), + getDropletId(this.cloudFoundryClient, applicationId))) + .flatMap( + function( + (applicationId, dropletId) -> + requestCreateTask(this.cloudFoundryClient, applicationId) + .thenReturn(dropletId))) + .flatMapMany( + dropletId -> + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .tasks() + .list( + ListTasksRequest.builder() + .state(RUNNING) + .page(page) + .build())) + .filter(task -> dropletId.equals(task.getDropletId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplication( + CloudFoundryOperations cloudFoundryOperations, String name) throws IOException { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(256) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(name) + .noStart(false) + .build()); + } + + private static Mono createTaskId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return requestCreateTask(cloudFoundryClient, applicationId).map(CreateTaskResponse::getId); + } + + private static Mono getApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .applicationsV3() + .list( + ListApplicationsRequest.builder() + .name(applicationName) + .build())) + .single() + .map(ApplicationResource::getId); + } + + private static Mono getDropletId( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .applicationsV3() + .getCurrentDroplet( + GetApplicationCurrentDropletRequest.builder() + .applicationId(applicationId) + .build()) + .map(GetApplicationCurrentDropletResponse::getId); + } + + private static Mono getTaskName(CloudFoundryClient cloudFoundryClient, String taskId) { + return cloudFoundryClient + .tasks() + .get(GetTaskRequest.builder().taskId(taskId).build()) + .map(GetTaskResponse::getName); + } + + private static Mono requestCreateTask( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return cloudFoundryClient + .tasks() + .create( + CreateTaskRequest.builder() + .applicationId(applicationId) + .command("ls") + .diskInMb(64) + .memoryInMb(67) + .build()); + } + + private static Flux requestListTasks(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV3Resources( + page -> + cloudFoundryClient + .tasks() + .list(ListTasksRequest.builder().page(page).build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/client/v3/UsersTest.java b/integration-test/src/test/java/org/cloudfoundry/client/v3/UsersTest.java new file mode 100644 index 00000000000..e3dbab91cb0 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/client/v3/UsersTest.java @@ -0,0 +1,155 @@ +/* + * Copyright 2013-2025 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.client.v3; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.users.*; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_4_v3) +public final class UsersTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Test + public void create() { + String userId = this.nameFactory.getUserId(); + + this.cloudFoundryClient + .usersV3() + .create(CreateUserRequest.builder().userId(userId).build()) + .single() + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String userId = this.nameFactory.getUserId(); + + createUser(this.cloudFoundryClient, userId) + .flatMap( + createUserResponse -> + this.cloudFoundryClient + .usersV3() + .get(GetUserRequest.builder().userId(userId).build())) + .map(GetUserResponse::getId) + .as(StepVerifier::create) + .expectNext(userId) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String userId = this.nameFactory.getUserId(); + createUser(this.cloudFoundryClient, userId) + .thenMany( + PaginationUtils.requestClientV3Resources( + page -> + this.cloudFoundryClient + .usersV3() + .list( + ListUsersRequest.builder() + .page(page) + .build()))) + .filter(resource -> userId.equals(resource.getId())) + .map(UserResource::getId) + .as(StepVerifier::create) + .expectNext(userId) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String userId = this.nameFactory.getUserId(); + + createUser(this.cloudFoundryClient, userId) + .flatMap( + createUserResponse -> + this.cloudFoundryClient + .usersV3() + .update( + UpdateUserRequest.builder() + .userId(userId) + .metadata( + Metadata.builder() + .annotation( + "annotationKey", + "annotationValue") + .label( + "labelKey", + "labelValue") + .build()) + .build())) + .then(getUser(cloudFoundryClient, userId)) + .as(StepVerifier::create) + .consumeNextWith( + GetUserResponse -> { + Metadata metadata = GetUserResponse.getMetadata(); + assertThat(metadata.getAnnotations().get("annotationKey")) + .isEqualTo("annotationValue"); + assertThat(metadata.getLabels().get("labelKey")) + .isEqualTo("labelValue"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String userId = this.nameFactory.getUserId(); + + createUser(this.cloudFoundryClient, userId) + .flatMap( + createUserResponse -> + this.cloudFoundryClient + .usersV3() + .delete( + DeleteUserRequest.builder() + .userId(createUserResponse.getId()) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createUser( + CloudFoundryClient cloudFoundryClient, String userId) { + return cloudFoundryClient + .usersV3() + .create(CreateUserRequest.builder().userId(userId).build()); + } + + private static Mono getUser( + CloudFoundryClient cloudFoundryClient, String userId) { + return cloudFoundryClient.usersV3().get(GetUserRequest.builder().userId(userId).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/logcache/v1/LogCacheTest.java b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/LogCacheTest.java new file mode 100644 index 00000000000..414af210bde --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/LogCacheTest.java @@ -0,0 +1,226 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.within; +import static org.cloudfoundry.util.DelayUtils.exponentialBackOff; + +import java.math.BigInteger; +import java.security.SecureRandom; +import java.time.Duration; +import java.util.Random; +import java.util.function.Predicate; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.ApplicationUtils; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_9) +public class LogCacheTest extends AbstractIntegrationTest { + + @Autowired LogCacheClient logCacheClient; + + private ApplicationUtils.ApplicationMetadata testLogCacheAppMetadata; + + @Autowired private TestLogCacheEndpoints testLogCacheEndpoints; + + private final Random random = new SecureRandom(); + + @BeforeEach + void setUp(@Autowired Mono testLogCacheApp) { + this.testLogCacheAppMetadata = testLogCacheApp.block(); + } + + @Test + public void info() { + this.logCacheClient + .info(InfoRequest.builder().build()) + .as(StepVerifier::create) + .assertNext( + response -> { + assertThat(response).isNotNull(); + assertThat(response.getVersion()).isNotBlank(); + assertThat(response.vmUptime()).isNotNull().isGreaterThan(1); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void meta() { + this.logCacheClient + .meta(MetaRequest.builder().build()) + .as(StepVerifier::create) + .assertNext( + response -> { + assertThat(response).isNotNull(); + assertThat(response.getMeta()) + .containsKey(this.testLogCacheAppMetadata.applicationId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void readCounter() { + final String name = this.nameFactory.getName("counter-"); + final int delta = this.random.nextInt(1000); + + this.testLogCacheEndpoints + .counter(name, delta) + .then( + read( + EnvelopeType.COUNTER, + envelope -> + hasCounter(envelope) + && name.equals(envelope.getCounter().getName()))) + .as(StepVerifier::create) + .assertNext(response -> assertCounter(response, name, delta)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void readEvent() { + final String title = this.nameFactory.getName("event-"); + final String body = "This is the body. " + new BigInteger(1024, this.random).toString(32); + + this.testLogCacheEndpoints + .event(title, body) + .then(read(EnvelopeType.EVENT, this::hasEvent)) + .as(StepVerifier::create) + .assertNext(response -> assertEvent(response, title, body)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + @Disabled("fails often for no reasons") + public void readGauge() { + final String gaugeName = this.nameFactory.getName("gauge-"); + final Double value = this.random.nextDouble() % 100; + + this.testLogCacheEndpoints + .gauge(gaugeName, value) + .then( + read( + EnvelopeType.GAUGE, + envelope -> + hasGauge(envelope) + && envelope.getGauge() + .getMetrics() + .containsKey(gaugeName))) + .as(StepVerifier::create) + .assertNext(response -> assertGauge(response, gaugeName, value)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void readLogs() { + final String logMessage = this.nameFactory.getName("log-"); + + this.testLogCacheEndpoints + .log(logMessage) + .then( + read( + EnvelopeType.LOG, + envelope -> + hasLog(envelope) + && logMessage.equals( + envelope.getLog().getPayloadAsText()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private void assertCounter(Envelope envelope, String name, int delta) { + assertThat(envelope.getCounter().getName()).isEqualTo(name); + assertThat(envelope.getCounter().getDelta()).isEqualTo(delta); + assertThat(envelope.getCounter().getTotal()).isEqualTo(delta); + } + + private void assertEnvelope(Envelope envelope) { + assertThat(envelope).isNotNull(); + assertThat(envelope.getInstanceId()).isEqualTo("0"); + assertThat(envelope.getSourceId()).isEqualTo(this.testLogCacheAppMetadata.applicationId); + assertThat(envelope.getTimestamp()).isGreaterThan(0); + } + + private void assertEvent(Envelope envelope, String title, String body) { + assertThat(envelope.getEvent().getBody()).isEqualTo(body); + assertThat(envelope.getEvent().getTitle()).isEqualTo(title); + } + + private void assertGauge(Envelope envelope, String gaugeName, Double value) { + assertThat(envelope.getGauge().getMetrics().get(gaugeName).getValue()) + .isCloseTo(value, within(0.001)); + } + + private void assertResponse(ReadResponse readResponse) { + assertThat(readResponse).isNotNull(); + assertThat(readResponse.getEnvelopes()).isNotNull(); + assertThat(readResponse.getEnvelopes().getBatch()).isNotNull(); + } + + private boolean hasCounter(Envelope envelope) { + return envelope.getCounter() != null; + } + + private boolean hasEvent(Envelope envelope) { + return envelope.getEvent() != null; + } + + private boolean hasGauge(Envelope envelope) { + return envelope.getGauge() != null; + } + + private boolean hasLog(Envelope envelope) { + return envelope.getLog() != null; + } + + private Mono read(EnvelopeType envelopeType, Predicate filter) { + return this.logCacheClient + .read( + ReadRequest.builder() + .sourceId(this.testLogCacheAppMetadata.applicationId) + .envelopeType(envelopeType) + .limit(1000) + .build()) + .doOnNext(this::assertResponse) + .flatMap( + response -> + Mono.justOrEmpty( + response.getEnvelopes().getBatch().stream() + .filter(filter) + .findFirst())) + .repeatWhenEmpty( + exponentialBackOff( + Duration.ofSeconds(1), + Duration.ofSeconds(5), + Duration.ofMinutes(1))) + .doOnNext(this::assertEnvelope); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/logcache/v1/TestLogCacheEndpoints.java b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/TestLogCacheEndpoints.java new file mode 100644 index 00000000000..64fb246eb2a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/TestLogCacheEndpoints.java @@ -0,0 +1,80 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import java.util.HashMap; +import java.util.function.Function; +import java.util.stream.Stream; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.reactor.client.QueryBuilder; +import org.cloudfoundry.reactor.util.AbstractReactorOperations; +import org.cloudfoundry.reactor.util.UriQueryParameter; +import org.cloudfoundry.reactor.util.UriQueryParameters; +import org.springframework.web.util.UriComponentsBuilder; +import reactor.core.publisher.Mono; + +public class TestLogCacheEndpoints extends AbstractReactorOperations { + + public TestLogCacheEndpoints( + ConnectionContext connectionContext, Mono root, TokenProvider tokenProvider) { + super(connectionContext, root, tokenProvider, new HashMap<>()); + } + + Mono counter(String name, long delta) { + return get(CounterRequest.builder().name(name).delta(delta).build(), "counter"); + } + + Mono event(String title, String body) { + return get(EventRequest.builder().title(title).body(body).build(), "event"); + } + + Mono gauge(String name, Double value) { + return get(GaugeRequest.builder().name(name).value(value.toString()).build(), "gauge"); + } + + Mono log(String message) { + return get(LogRequest.builder().message(message).build(), "log"); + } + + private Function buildPathSegments( + String[] pathSegments) { + return builder -> builder.pathSegment(pathSegments); + } + + private Mono get(Object requestPayload, String... pathSegments) { + return createOperator() + .flatMap( + operator -> + operator.get() + .uri( + buildPathSegments(pathSegments) + .andThen(queryTransformer(requestPayload))) + .response() + .get()) + .then(); + } + + private Function queryTransformer( + Object requestPayload) { + return builder -> { + Stream parameters = new QueryBuilder().build(requestPayload); + UriQueryParameters.set(builder, parameters); + return builder; + }; + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_CounterRequest.java b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_CounterRequest.java new file mode 100644 index 00000000000..1d5f5cc2daf --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_CounterRequest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _CounterRequest { + + @QueryParameter("delta") + abstract Long getDelta(); + + @QueryParameter("name") + abstract String getName(); + +} diff --git a/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_EventRequest.java b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_EventRequest.java new file mode 100644 index 00000000000..7d0596e4028 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_EventRequest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _EventRequest { + + @QueryParameter("body") + abstract String getBody(); + + @QueryParameter("title") + abstract String getTitle(); + +} diff --git a/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_GaugeRequest.java b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_GaugeRequest.java new file mode 100644 index 00000000000..581be13b14f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_GaugeRequest.java @@ -0,0 +1,31 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _GaugeRequest { + + @QueryParameter("name") + abstract String getName(); + + @QueryParameter("value") + abstract String getValue(); + +} diff --git a/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_LogRequest.java b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_LogRequest.java new file mode 100644 index 00000000000..5e2ef3a77b2 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/logcache/v1/_LogRequest.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcache.v1; + +import org.cloudfoundry.QueryParameter; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _LogRequest { + + @QueryParameter("message") + abstract String getMessage(); + +} diff --git a/integration-test/src/test/java/org/cloudfoundry/networking/v1/PoliciesTest.java b/integration-test/src/test/java/org/cloudfoundry/networking/v1/PoliciesTest.java new file mode 100644 index 00000000000..eaa9916908a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/networking/v1/PoliciesTest.java @@ -0,0 +1,344 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.networking.v1.policies.CreatePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.DeletePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.Destination; +import org.cloudfoundry.networking.v1.policies.ListPoliciesRequest; +import org.cloudfoundry.networking.v1.policies.ListPoliciesResponse; +import org.cloudfoundry.networking.v1.policies.Policy; +import org.cloudfoundry.networking.v1.policies.Ports; +import org.cloudfoundry.networking.v1.policies.Source; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class PoliciesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private NetworkingClient networkingClient; + + @Autowired private Mono spaceId; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void create() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer startPort = this.nameFactory.getPort(); + Integer endPort = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .flatMap( + function( + (destinationApplicationId, sourceApplicationId) -> + this.networkingClient + .policies() + .create( + CreatePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination + .builder() + .id( + destinationApplicationId) + .ports( + Ports + .builder() + .end( + endPort) + .start( + startPort) + .build()) + .protocol( + "tcp") + .build()) + .source( + Source + .builder() + .id( + sourceApplicationId) + .build()) + .build()) + .build()) + .thenReturn(destinationApplicationId))) + .flatMap( + destinationApplicationId -> + requestListPolicies(this.networkingClient) + .flatMapIterable(ListPoliciesResponse::getPolicies) + .filter( + policy -> + destinationApplicationId.equals( + policy.getDestination().getId())) + .single()) + .map(policy -> policy.getDestination().getPorts().getStart()) + .as(StepVerifier::create) + .expectNext(startPort) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void delete() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .delayUntil( + function( + (destinationApplicationId, sourceApplicationId) -> + requestCreatePolicy( + this.networkingClient, + destinationApplicationId, + port, + sourceApplicationId))) + .flatMap( + function( + (destinationApplicationId, sourceApplicationId) -> + this.networkingClient + .policies() + .delete( + DeletePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination + .builder() + .id( + destinationApplicationId) + .ports( + Ports + .builder() + .end( + port) + .start( + port) + .build()) + .protocol( + "tcp") + .build()) + .source( + Source + .builder() + .id( + sourceApplicationId) + .build()) + .build()) + .build()))) + .then( + requestListPolicies(this.networkingClient) + .flatMapIterable(ListPoliciesResponse::getPolicies) + .filter( + policy -> + port.equals( + policy.getDestination() + .getPorts() + .getStart())) + .singleOrEmpty()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void list() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .flatMap( + function( + (destinationApplicationId, sourceApplicationId) -> + requestCreatePolicy( + this.networkingClient, + destinationApplicationId, + port, + sourceApplicationId))) + .then( + this.networkingClient + .policies() + .list(ListPoliciesRequest.builder().build()) + .flatMapIterable(ListPoliciesResponse::getPolicies) + .filter( + policy -> + port.equals( + policy.getDestination() + .getPorts() + .getStart())) + .single()) + .map(policy -> policy.getDestination().getPorts().getStart()) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void listFiltered() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .flatMap( + function( + (destinationApplicationId, sourceApplicationId) -> + requestCreatePolicy( + this.networkingClient, + destinationApplicationId, + port, + sourceApplicationId) + .thenReturn(destinationApplicationId))) + .flatMap( + destinationApplicationId -> + this.networkingClient + .policies() + .list( + ListPoliciesRequest.builder() + .policyGroupId(destinationApplicationId) + .build()) + .flatMapIterable(ListPoliciesResponse::getPolicies) + .map( + policy -> + policy.getDestination() + .getPorts() + .getStart())) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack("staticfile_buildpack") + .diego(true) + .diskQuota(512) + .memory(64) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreatePolicy( + NetworkingClient networkingClient, + String destinationApplicationId, + Integer port, + String sourceApplicationId) { + return networkingClient + .policies() + .create( + CreatePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination.builder() + .id(destinationApplicationId) + .ports( + Ports.builder() + .end(port) + .start(port) + .build()) + .protocol("tcp") + .build()) + .source( + Source.builder() + .id(sourceApplicationId) + .build()) + .build()) + .build()); + } + + private static Mono requestListPolicies( + NetworkingClient networkingClient) { + return networkingClient.policies().list(ListPoliciesRequest.builder().build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/networking/v1/TagsTest.java b/integration-test/src/test/java/org/cloudfoundry/networking/v1/TagsTest.java new file mode 100644 index 00000000000..6393f0c2d0c --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/networking/v1/TagsTest.java @@ -0,0 +1,143 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.networking.v1; + +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.networking.NetworkingClient; +import org.cloudfoundry.networking.v1.policies.CreatePoliciesRequest; +import org.cloudfoundry.networking.v1.policies.Destination; +import org.cloudfoundry.networking.v1.policies.Policy; +import org.cloudfoundry.networking.v1.policies.Ports; +import org.cloudfoundry.networking.v1.policies.Source; +import org.cloudfoundry.networking.v1.tags.ListTagsRequest; +import org.cloudfoundry.networking.v1.tags.ListTagsResponse; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class TagsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private NetworkingClient networkingClient; + + @Autowired private Mono spaceId; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void create() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .flatMap( + function( + (destinationApplicationId, sourceApplicationId) -> + requestCreatePolicy( + this.networkingClient, + destinationApplicationId, + port, + sourceApplicationId) + .thenReturn(destinationApplicationId))) + .flatMap( + destinationApplicationId -> + this.networkingClient + .tags() + .list(ListTagsRequest.builder().build()) + .flatMapIterable(ListTagsResponse::getTags) + .filter( + tag -> + destinationApplicationId.equals( + tag.getId()))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack("staticfile_buildpack") + .diego(true) + .diskQuota(512) + .memory(64) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Mono requestCreatePolicy( + NetworkingClient networkingClient, + String destinationApplicationId, + Integer port, + String sourceApplicationId) { + return networkingClient + .policies() + .create( + CreatePoliciesRequest.builder() + .policy( + Policy.builder() + .destination( + Destination.builder() + .id(destinationApplicationId) + .ports( + Ports.builder() + .end(port) + .start(port) + .build()) + .protocol("tcp") + .build()) + .source( + Source.builder() + .id(sourceApplicationId) + .build()) + .build()) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/AdvancedTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/AdvancedTest.java new file mode 100644 index 00000000000..733e95d6bc9 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/AdvancedTest.java @@ -0,0 +1,41 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.test.StepVerifier; + +public final class AdvancedTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Test + public void sshCode() { + this.cloudFoundryOperations + .advanced() + .sshCode() + .as(StepVerifier::create) + .consumeNextWith(actual -> assertThat(actual.length()).isGreaterThanOrEqualTo(6)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java new file mode 100644 index 00000000000..36e1bd94569 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ApplicationsTest.java @@ -0,0 +1,2159 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.logcache.v1.Envelope; +import org.cloudfoundry.logcache.v1.EnvelopeBatch; +import org.cloudfoundry.logcache.v1.EnvelopeType; +import org.cloudfoundry.logcache.v1.Log; +import org.cloudfoundry.logcache.v1.LogCacheClient; +import org.cloudfoundry.logcache.v1.LogType; +import org.cloudfoundry.logcache.v1.ReadRequest; +import org.cloudfoundry.logcache.v1.ReadResponse; +import org.cloudfoundry.operations.applications.ApplicationDetail; +import org.cloudfoundry.operations.applications.ApplicationEnvironments; +import org.cloudfoundry.operations.applications.ApplicationEvent; +import org.cloudfoundry.operations.applications.ApplicationHealthCheck; +import org.cloudfoundry.operations.applications.ApplicationLog; +import org.cloudfoundry.operations.applications.ApplicationLogType; +import org.cloudfoundry.operations.applications.ApplicationLogsRequest; +import org.cloudfoundry.operations.applications.ApplicationManifest; +import org.cloudfoundry.operations.applications.ApplicationSshEnabledRequest; +import org.cloudfoundry.operations.applications.ApplicationSummary; +import org.cloudfoundry.operations.applications.CopySourceApplicationRequest; +import org.cloudfoundry.operations.applications.DeleteApplicationRequest; +import org.cloudfoundry.operations.applications.DisableApplicationSshRequest; +import org.cloudfoundry.operations.applications.EnableApplicationSshRequest; +import org.cloudfoundry.operations.applications.GetApplicationEnvironmentsRequest; +import org.cloudfoundry.operations.applications.GetApplicationEventsRequest; +import org.cloudfoundry.operations.applications.GetApplicationHealthCheckRequest; +import org.cloudfoundry.operations.applications.GetApplicationManifestRequest; +import org.cloudfoundry.operations.applications.GetApplicationRequest; +import org.cloudfoundry.operations.applications.ListApplicationTasksRequest; +import org.cloudfoundry.operations.applications.ManifestV3; +import org.cloudfoundry.operations.applications.ManifestV3Application; +import org.cloudfoundry.operations.applications.PushApplicationManifestRequest; +import org.cloudfoundry.operations.applications.PushApplicationRequest; +import org.cloudfoundry.operations.applications.PushManifestV3Request; +import org.cloudfoundry.operations.applications.RenameApplicationRequest; +import org.cloudfoundry.operations.applications.RestageApplicationRequest; +import org.cloudfoundry.operations.applications.RestartApplicationInstanceRequest; +import org.cloudfoundry.operations.applications.RestartApplicationRequest; +import org.cloudfoundry.operations.applications.Route; +import org.cloudfoundry.operations.applications.RunApplicationTaskRequest; +import org.cloudfoundry.operations.applications.ScaleApplicationRequest; +import org.cloudfoundry.operations.applications.SetApplicationHealthCheckRequest; +import org.cloudfoundry.operations.applications.SetEnvironmentVariableApplicationRequest; +import org.cloudfoundry.operations.applications.StartApplicationRequest; +import org.cloudfoundry.operations.applications.StopApplicationRequest; +import org.cloudfoundry.operations.applications.Task; +import org.cloudfoundry.operations.applications.TaskState; +import org.cloudfoundry.operations.applications.TerminateApplicationTaskRequest; +import org.cloudfoundry.operations.applications.UnsetEnvironmentVariableApplicationRequest; +import org.cloudfoundry.operations.domains.CreateDomainRequest; +import org.cloudfoundry.operations.domains.CreateSharedDomainRequest; +import org.cloudfoundry.operations.routes.ListRoutesRequest; +import org.cloudfoundry.operations.services.BindServiceInstanceRequest; +import org.cloudfoundry.operations.services.CreateServiceInstanceRequest; +import org.cloudfoundry.operations.services.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.operations.services.GetServiceInstanceRequest; +import org.cloudfoundry.operations.services.ServiceInstance; +import org.cloudfoundry.util.FluentMap; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@CleanupCloudFoundryAfterClass +public final class ApplicationsTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private String organizationName; + + @Autowired private String planName; + + @Autowired private String serviceName; + + @Autowired private LogCacheClient logCacheClient; + @Autowired private CloudFoundryClient cloudFoundryClient; + + // To create a service in #pushBindService, the Service Broker must be installed first. + // We ensure it is by loading the serviceBrokerId @Lazy bean. + @Qualifier("serviceBrokerId") + @Autowired + private Mono serviceBrokerId; + + @Test + public void copySource() throws IOException { + String sourceName = this.nameFactory.getApplicationName(); + String targetName = this.nameFactory.getApplicationName(); + + Mono.when( + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + sourceName, + false), + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + targetName, + true)) + .then( + this.cloudFoundryOperations + .applications() + .copySource( + CopySourceApplicationRequest.builder() + .name(sourceName) + .restart(true) + .targetName(targetName) + .build())) + .then(requestGetApplication(this.cloudFoundryOperations, targetName)) + .map(ApplicationDetail::getRequestedState) + .as(StepVerifier::create) + .expectNext("STARTED") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteApplication() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .delete( + DeleteApplicationRequest.builder() + .name(applicationName) + .build())) + .thenMany(requestListApplications(this.cloudFoundryOperations)) + .filter(response -> applicationName.equals(response.getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteApplicationAndRoutes() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .delete( + DeleteApplicationRequest.builder() + .name(applicationName) + .deleteRoutes(true) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .map(org.cloudfoundry.operations.routes.Route::getApplications) + .filter(applicationName::equals) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteApplicationWithServiceBindings() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + bindServiceToApplication( + this.cloudFoundryOperations, applicationName, serviceInstanceName)) + .then( + this.cloudFoundryOperations + .applications() + .delete( + DeleteApplicationRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void disableSsh() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .disableSsh( + DisableApplicationSshRequest.builder() + .name(applicationName) + .build())) + .then(requestSshEnabled(this.cloudFoundryOperations, applicationName)) + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void enableSsh() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .enableSsh( + EnableApplicationSshRequest.builder() + .name(applicationName) + .build())) + .then(requestSshEnabled(this.cloudFoundryOperations, applicationName)) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build())) + .map(ApplicationDetail::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getEvents() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .thenMany( + this.cloudFoundryOperations + .applications() + .getEvents( + GetApplicationEventsRequest.builder() + .name(applicationName) + .build()) + .next()) + .map(ApplicationEvent::getEvent) + .as(StepVerifier::create) + .expectNext("audit.app.update") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getHealthCheck() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .getHealthCheck( + GetApplicationHealthCheckRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectNext(ApplicationHealthCheck.NONE) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getManifest() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .getApplicationManifest( + GetApplicationManifestRequest.builder() + .name(applicationName) + .build())) + .map(ApplicationManifest::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getManifestForTcpRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .getApplicationManifest( + GetApplicationManifestRequest.builder() + .name(applicationName) + .build())) + .map(ApplicationManifest::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getMultipleBuildpacks() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplicationPhp( + this.cloudFoundryOperations, + new ClassPathResource("test-php.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build())) + .map(ApplicationDetail::getBuildpacks) + .as(StepVerifier::create) + .expectNext(Arrays.asList("staticfile_buildpack", "php_buildpack")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getMultipleBuildpacksManifest() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplicationPhp( + this.cloudFoundryOperations, + new ClassPathResource("test-php.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .getApplicationManifest( + GetApplicationManifestRequest.builder() + .name(applicationName) + .build())) + .map(ApplicationManifest::getBuildpacks) + .as(StepVerifier::create) + .expectNext(Arrays.asList("staticfile_buildpack", "php_buildpack")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getStopped() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build())) + .map(ApplicationDetail::getName) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getTcp() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + requestCreateTcpDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then( + createApplicationTcp( + this.cloudFoundryOperations, applicationName, domainName)) + .thenMany( + this.cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build())) + .map(applicationDetail -> applicationDetail.getUrls().get(0)) + .as(StepVerifier::create) + .consumeNextWith(route -> assertThat(route).matches(domainName + "+?:\\d+$")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .thenMany(this.cloudFoundryOperations.applications().list()) + .filter(response -> applicationName.equals(response.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_11) + @Test + public void listTasks() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String taskName = this.nameFactory.getTaskName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then(requestCreateTask(this.cloudFoundryOperations, applicationName, taskName)) + .thenMany( + this.cloudFoundryOperations + .applications() + .listTasks( + ListApplicationTasksRequest.builder() + .name(applicationName) + .build())) + .map(Task::getName) + .as(StepVerifier::create) + .expectNext(taskName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + /** + * Doppler was dropped in PCF 4.x in favor of logcache. This test does not work + * on TAS 4.x. + */ + @Test + @IfCloudFoundryVersion(lessThan = CloudFoundryVersion.PCF_4_v2) + public void logs() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .thenMany( + this.cloudFoundryOperations + .applications() + .logs( + ApplicationLogsRequest.builder() + .name(applicationName) + .recent(true) + .build())) + .map(ApplicationLog::getLogType) + .next() + .as(StepVerifier::create) + .expectNext(ApplicationLogType.OUT) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + /** + * Exercise the LogCache client. Serves as a reference for using the logcache client, + * and will help with the transition to the new + * {@link org.cloudfoundry.operations.applications.Applications#logs(ApplicationLogsRequest)}. + */ + @Test + public void logCacheLogs() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build())) + .map(ApplicationDetail::getId) + .flatMapMany( + appGuid -> + this.logCacheClient.read( + ReadRequest.builder() + .sourceId(appGuid) + .envelopeType(EnvelopeType.LOG) + .limit(1) + .build())) + .map(ReadResponse::getEnvelopes) + .map(EnvelopeBatch::getBatch) + .flatMap(Flux::fromIterable) + .map(Envelope::getLog) + .map(Log::getType) + .next() + .as(StepVerifier::create) + .expectNext(LogType.OUT) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushBindServices() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .service(serviceInstanceName) + .build()) + .noStart(false) + .build())) + .then( + getServiceInstance(this.cloudFoundryOperations, serviceInstanceName) + .flatMapIterable(ServiceInstance::getApplications) + .filter(applicationName::equals) + .single()) + .as(StepVerifier::create) + .expectNext(applicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushDirectory() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application").getFile().toPath(), + applicationName, + false) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushDomainHostPathRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String routePath = this.nameFactory.getPath(); + + createDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .domain(domainName) + .healthCheckType(ApplicationHealthCheck.PORT) + .host("test-host") + .memory(64) + .name(applicationName) + .noStart(false) + .routePath(routePath) + .build())) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().build())) + .filter(response -> domainName.equals(response.getDomain())) + .map(org.cloudfoundry.operations.routes.Route::getPath) + .as(StepVerifier::create) + .expectNext(routePath) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushDomainNotFound() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .domain(domainName) + .diskQuota(512) + .memory(64) + .name(applicationName) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain %s not found", domainName)) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushExisting() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .memory(64) + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushManifestMultipleBuildpacks() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + List buildpacks = Arrays.asList("staticfile_buildpack", "php_buildpack"); + + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .buildpacks(buildpacks) + .disk(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .path( + new ClassPathResource("test-php.zip") + .getFile() + .toPath()) + .build()) + .noStart(true) + .build()) + .then(requestGetManifest(this.cloudFoundryOperations, applicationName)) + .map(ApplicationManifest::getBuildpacks) + .as(StepVerifier::create) + .expectNext(buildpacks) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + @IfCloudFoundryVersion( + greaterThanOrEqualTo = + CloudFoundryVersion.UNSPECIFIED) // TODO how to select this version? + public void pushManifestV3() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .build()) + .build(); + + this.cloudFoundryOperations + .applications() + .pushManifestV3(PushManifestV3Request.builder().manifest(manifest).build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_4_v2) + public void pushManifestV3WithMetadata() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + Map labels = Collections.singletonMap("test-label", "test-label-value"); + Map annotations = + Collections.singletonMap("test-annotation", "test-annotation-value"); + + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .metadata( + org.cloudfoundry.client.v3.Metadata.builder() + .labels(labels) + .annotations(annotations) + .build()) + .build()) + .build(); + + this.cloudFoundryOperations + .applications() + .pushManifestV3(PushManifestV3Request.builder().manifest(manifest).build()) + .then( + this.cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build())) + .map(ApplicationDetail::getId) + .flatMap( + id -> + this.cloudFoundryClient + .applicationsV3() + .get( + org.cloudfoundry.client.v3.applications + .GetApplicationRequest.builder() + .applicationId(id) + .build())) + .as(StepVerifier::create) + .expectNextMatches( + createdApp -> + labels.equals(createdApp.getMetadata().getLabels()) + && annotations.equals( + createdApp.getMetadata().getAnnotations())) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + @IfCloudFoundryVersion( + greaterThanOrEqualTo = + CloudFoundryVersion.UNSPECIFIED) // TODO how to select this version? + public void pushManifestV3MultipleApplications() throws IOException { + String applicationName1 = this.nameFactory.getApplicationName(); + String applicationName2 = this.nameFactory.getApplicationName(); + + ManifestV3 manifest = + ManifestV3.builder() + .application( + ManifestV3Application.builder() + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName1) + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .build()) + .application( + ManifestV3Application.builder() + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName2) + .path( + new ClassPathResource("test-application") + .getFile() + .toPath()) + .build()) + .build(); + + this.cloudFoundryOperations + .applications() + .pushManifestV3(PushManifestV3Request.builder().manifest(manifest).build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushMultipleBuildpacks() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + List buildpacks = Arrays.asList("staticfile_buildpack", "php_buildpack"); + + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .buildpacks("staticfile_buildpack", "php_buildpack") + .diskQuota(512) + .healthCheckType(ApplicationHealthCheck.NONE) + .memory(64) + .name(applicationName) + .noStart(true) + .path(new ClassPathResource("test-php.zip").getFile().toPath()) + .build()) + .then(requestGetManifest(this.cloudFoundryOperations, applicationName)) + .map(ApplicationManifest::getBuildpacks) + .as(StepVerifier::create) + .expectNext(buildpacks) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushMultipleRoutes() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + requestCreateDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .route( + Route.builder() + .route( + String + .format( + "test1.%s", + domainName)) + .build()) + .route( + Route.builder() + .route( + String + .format( + "test2.%s", + domainName)) + .build()) + .build()) + .noStart(false) + .build())) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().build())) + .filter(response -> domainName.equals(response.getDomain())) + .map(org.cloudfoundry.operations.routes.Route::getApplications) + .as(StepVerifier::create) + .expectNextCount(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushNew() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushNewDocker() { + String applicationName = this.nameFactory.getApplicationName(); + + createDockerApplication(this.cloudFoundryOperations, applicationName, false) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushNoHostName() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + requestCreateDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .domain(domainName) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .noHostname(true) + .noStart(false) + .build())) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().build())) + .filter(response -> domainName.equals(response.getDomain())) + .map(org.cloudfoundry.operations.routes.Route::getHost) + .as(StepVerifier::create) + .expectNext("") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushNoRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + createDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .domain(domainName) + .memory(64) + .name(applicationName) + .noStart(true) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .memory(64) + .name(applicationName) + .noRoute(true) + .noStart(true) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .flatMapIterable(org.cloudfoundry.operations.routes.Route::getApplications) + .filter(applicationName::equals) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushPrivateDomain() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + createDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .domain(domainName) + .memory(64) + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushRouteAndRoutePath() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String routePath1 = this.nameFactory.getPath(); + String routePath2 = this.nameFactory.getPath(); + + requestCreateDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .route( + Route.builder() + .route( + String + .format( + "test.%s%s", + domainName, + routePath1)) + .build()) + .routePath(routePath2) + .build()) + .noStart(false) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .map(org.cloudfoundry.operations.routes.Route::getPath) + .filter(routePath2::equals) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushRoutePath() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String routePath = this.nameFactory.getPath(); + + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .healthCheckHttpEndpoint("/health") + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(applicationName) + .noStart(false) + .routePath(routePath) + .build()) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(route -> routePath.equals(route.getPath())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushTcpRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + requestCreateTcpDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck + .PROCESS) + .memory(64) + .name(applicationName) + .randomRoute(true) + .route( + Route.builder() + .route(domainName) + .build()) + .build()) + .noStart(true) + .build())) + .then(requestGetManifest(this.cloudFoundryOperations, applicationName)) + .map(manifest -> manifest.getRoutes().get(0).getRoute()) + .as(StepVerifier::create) + .consumeNextWith(route -> assertThat(route).matches(domainName + "+?:\\d+$")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushUpdateRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String originalHostName = this.nameFactory.getHostName(); + String newHostName = this.nameFactory.getHostName(); + + requestCreateDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck + .PROCESS) + .memory(64) + .name(applicationName) + .route( + Route.builder() + .route( + String + .format( + "%s.%s", + originalHostName, + domainName)) + .build()) + .build()) + .noStart(true) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck + .PROCESS) + .memory(64) + .name(applicationName) + .route( + Route.builder() + .route( + String + .format( + "%s.%s", + newHostName, + domainName)) + .build()) + .build()) + .noStart(true) + .build())) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().build())) + .flatMapIterable(org.cloudfoundry.operations.routes.Route::getApplications) + .filter(applicationName::equals) + .as(StepVerifier::create) + .expectNextCount(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushUpdateTcpRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + requestCreateTcpDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck + .PROCESS) + .memory(64) + .name(applicationName) + .randomRoute(true) + .route( + Route.builder() + .route(domainName) + .build()) + .build()) + .noStart(true) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType( + ApplicationHealthCheck + .PROCESS) + .memory(64) + .name(applicationName) + .randomRoute(true) + .route( + Route.builder() + .route(domainName) + .build()) + .build()) + .noStart(true) + .build())) + .then(requestGetApplication(this.cloudFoundryOperations, applicationName)) + .map(ApplicationDetail::getUrls) + .as(StepVerifier::create) + .consumeNextWith( + routes -> { + assertThat(routes.get(0).matches(domainName + "+?:\\d+$")); + assertThat(routes.get(1).matches(domainName + "+?:\\d+$")); + assertThat(!routes.get(0).matches(routes.get(1))); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void pushWithHost() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String host = this.nameFactory.getHostName(); + + this.cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path( + new ClassPathResource("test-application.zip") + .getFile() + .toPath()) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .host(host) + .memory(64) + .name(applicationName) + .build()) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void rename() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String newName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .rename( + RenameApplicationRequest.builder() + .name(applicationName) + .newName(newName) + .build())) + .then(requestGetApplication(this.cloudFoundryOperations, newName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void restage() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .restage( + RestageApplicationRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void restartInstance() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .restartInstance( + RestartApplicationInstanceRequest.builder() + .instanceIndex(0) + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void restartNotStarted() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .restart( + RestartApplicationRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void restartStarted() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .restart( + RestartApplicationRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_11) + @Test + public void runTask() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String taskName = this.nameFactory.getTaskName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .runTask( + RunApplicationTaskRequest.builder() + .applicationName(applicationName) + .command("ls") + .disk(64) + .memory(64) + .taskName(taskName) + .build())) + .map(Task::getName) + .as(StepVerifier::create) + .expectNext(taskName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void scale() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .scale( + ScaleApplicationRequest.builder() + .instances(2) + .memoryLimit(65) + .name(applicationName) + .build())) + .then(requestGetApplication(this.cloudFoundryOperations, applicationName)) + .map(ApplicationDetail::getRunningInstances) + .as(StepVerifier::create) + .expectNext(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("unchecked") + @Test + public void setEnvironmentVariable() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String variableName1 = this.nameFactory.getVariableName(); + String variableName2 = this.nameFactory.getVariableName(); + String variableValue1 = this.nameFactory.getVariableValue(); + String variableValue2 = this.nameFactory.getVariableValue(); + + Map expected = + FluentMap.builder() + .entry(variableName1, variableValue1) + .entry(variableName2, variableValue2) + .build(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName1) + .variableValue(variableValue1) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName2) + .variableValue(variableValue2) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .getEnvironments( + GetApplicationEnvironmentsRequest.builder() + .name(applicationName) + .build())) + .map(ApplicationEnvironments::getUserProvided) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setHealthCheck() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .setHealthCheck( + SetApplicationHealthCheckRequest.builder() + .name(applicationName) + .type(ApplicationHealthCheck.PROCESS) + .build())) + .then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName)) + .as(StepVerifier::create) + .expectNext(ApplicationHealthCheck.PROCESS) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setReadinessHealthCheck() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .setHealthCheck( + SetApplicationHealthCheckRequest.builder() + .name(applicationName) + .type(ApplicationHealthCheck.PROCESS) + .build())) + .then(requestGetHealthCheck(this.cloudFoundryOperations, applicationName)) + .as(StepVerifier::create) + .expectNext(ApplicationHealthCheck.PROCESS) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void sshEnabled() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .sshEnabled( + ApplicationSshEnabledRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void startNotStarted() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + this.cloudFoundryOperations + .applications() + .start( + StartApplicationRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void startStarted() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .start( + StartApplicationRequest.builder() + .name(applicationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void stop() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .stop( + StopApplicationRequest.builder() + .name(applicationName) + .build())) + .then(requestGetApplication(this.cloudFoundryOperations, applicationName)) + .map(ApplicationDetail::getRequestedState) + .as(StepVerifier::create) + .expectNext("STOPPED") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_11) + @Test + public void terminateTask() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String taskName = this.nameFactory.getTaskName(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then(getLongLivedTaskId(this.cloudFoundryOperations, applicationName, taskName)) + .flatMap( + sequenceId -> + this.cloudFoundryOperations + .applications() + .terminateTask( + TerminateApplicationTaskRequest.builder() + .applicationName(applicationName) + .sequenceId(sequenceId) + .build()) + .thenReturn(sequenceId)) + .flatMapMany( + sequenceId -> + requestListTasks(this.cloudFoundryOperations, applicationName) + .filter(task -> sequenceId.equals(task.getSequenceId()))) + .map(Task::getState) + .as(StepVerifier::create) + .expectNext(TaskState.FAILED) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("unchecked") + @Test + public void unsetEnvironmentVariableComplete() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String variableName1 = this.nameFactory.getVariableName(); + String variableName2 = this.nameFactory.getVariableName(); + String variableValue1 = this.nameFactory.getVariableValue(); + String variableValue2 = this.nameFactory.getVariableValue(); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName1) + .variableValue(variableValue1) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName2) + .variableValue(variableValue2) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .unsetEnvironmentVariable( + UnsetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName1) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .unsetEnvironmentVariable( + UnsetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName2) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .getEnvironments( + GetApplicationEnvironmentsRequest.builder() + .name(applicationName) + .build())) + .map(ApplicationEnvironments::getUserProvided) + .as(StepVerifier::create) + .expectNext(Collections.emptyMap()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("unchecked") + @Test + public void unsetEnvironmentVariablePartial() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String variableName1 = this.nameFactory.getVariableName(); + String variableName2 = this.nameFactory.getVariableName(); + String variableValue1 = this.nameFactory.getVariableValue(); + String variableValue2 = this.nameFactory.getVariableValue(); + + Map expected = Collections.singletonMap(variableName2, variableValue2); + + createApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + false) + .then( + this.cloudFoundryOperations + .applications() + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName1) + .variableValue(variableValue1) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .setEnvironmentVariable( + SetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName2) + .variableValue(variableValue2) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .unsetEnvironmentVariable( + UnsetEnvironmentVariableApplicationRequest.builder() + .name(applicationName) + .variableName(variableName1) + .build())) + .then( + this.cloudFoundryOperations + .applications() + .getEnvironments( + GetApplicationEnvironmentsRequest.builder() + .name(applicationName) + .build())) + .map(ApplicationEnvironments::getUserProvided) + .as(StepVerifier::create) + .expectNext(expected) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono bindServiceToApplication( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String serviceInstanceName) { + return cloudFoundryOperations + .services() + .createUserProvidedInstance( + CreateUserProvidedServiceInstanceRequest.builder() + .name(serviceInstanceName) + .build()) + .then( + cloudFoundryOperations + .services() + .bind( + BindServiceInstanceRequest.builder() + .serviceInstanceName(serviceInstanceName) + .applicationName(applicationName) + .build())); + } + + private static Mono createApplication( + CloudFoundryOperations cloudFoundryOperations, + Path application, + String name, + Boolean noStart) { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .buildpack("staticfile_buildpack") + .diskQuota(512) + .healthCheckType(ApplicationHealthCheck.NONE) + .memory(64) + .name(name) + .noStart(noStart) + .path(application) + .build()); + } + + private static Mono createApplicationPhp( + CloudFoundryOperations cloudFoundryOperations, + Path application, + String name, + Boolean noStart) { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .buildpacks("staticfile_buildpack", "php_buildpack") + .diskQuota(512) + .healthCheckType(ApplicationHealthCheck.NONE) + .memory(64) + .name(name) + .noStart(noStart) + .path(application) + .build()); + } + + private static Mono createApplicationTcp( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String domainName) + throws IOException { + return cloudFoundryOperations + .applications() + .pushManifest( + PushApplicationManifestRequest.builder() + .manifest( + ApplicationManifest.builder() + .buildpack("staticfile_buildpack") + .disk(512) + .healthCheckType(ApplicationHealthCheck.PROCESS) + .memory(64) + .name(applicationName) + .path( + new ClassPathResource( + "test-application.zip") + .getFile() + .toPath()) + .randomRoute(true) + .route(Route.builder().route(domainName).build()) + .build()) + .noStart(true) + .build()); + } + + private static Mono createDockerApplication( + CloudFoundryOperations cloudFoundryOperations, String name, Boolean noStart) { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .diskQuota(512) + .dockerImage("cloudfoundry/lattice-app") + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(name) + .noStart(noStart) + .build()); + } + + private static Mono createDomain( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String organizationName) { + return cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain(domainName) + .organization(organizationName) + .build()); + } + + private static Mono createServiceInstance( + CloudFoundryOperations cloudFoundryOperations, + String planName, + String serviceInstanceName, + String serviceName) { + return cloudFoundryOperations + .services() + .createInstance( + CreateServiceInstanceRequest.builder() + .planName(planName) + .serviceInstanceName(serviceInstanceName) + .serviceName(serviceName) + .build()); + } + + private static Mono getLongLivedTaskId( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String taskName) { + return requestCreateLongLivedTask(cloudFoundryOperations, applicationName, taskName) + .map(Task::getSequenceId); + } + + private static Mono getServiceInstance( + CloudFoundryOperations cloudFoundryOperations, String serviceInstanceName) { + return cloudFoundryOperations + .services() + .getInstance(GetServiceInstanceRequest.builder().name(serviceInstanceName).build()); + } + + private static Mono requestCreateDomain( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String organizationName) { + return cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain(domainName) + .organization(organizationName) + .build()); + } + + private static Mono requestCreateLongLivedTask( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String taskName) { + return cloudFoundryOperations + .applications() + .runTask( + RunApplicationTaskRequest.builder() + .applicationName(applicationName) + .command("sleep 99") + .disk(64) + .memory(64) + .taskName(taskName) + .build()); + } + + private static Mono requestCreateTask( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String taskName) { + return cloudFoundryOperations + .applications() + .runTask( + RunApplicationTaskRequest.builder() + .applicationName(applicationName) + .command("ls") + .disk(64) + .memory(64) + .taskName(taskName) + .build()); + } + + private static Mono requestCreateTcpDomain( + CloudFoundryOperations cloudFoundryOperations, String domainName, String routerGroup) { + return cloudFoundryOperations + .domains() + .createShared( + CreateSharedDomainRequest.builder() + .domain(domainName) + .routerGroup(routerGroup) + .build()); + } + + private static Mono requestGetApplication( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build()); + } + + private static Mono requestGetHealthCheck( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .getHealthCheck( + GetApplicationHealthCheckRequest.builder().name(applicationName).build()); + } + + private static Mono requestGetManifest( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .getApplicationManifest( + GetApplicationManifestRequest.builder().name(applicationName).build()); + } + + private static Flux requestListApplications( + CloudFoundryOperations cloudFoundryOperations) { + return cloudFoundryOperations.applications().list(); + } + + private static Flux requestListRoutes( + CloudFoundryOperations cloudFoundryOperations) { + return cloudFoundryOperations.routes().list(ListRoutesRequest.builder().build()); + } + + private static Flux requestListTasks( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .listTasks(ListApplicationTasksRequest.builder().name(applicationName).build()); + } + + private static Mono requestSshEnabled( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .sshEnabled(ApplicationSshEnabledRequest.builder().name(applicationName).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/BuildpacksTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/BuildpacksTest.java new file mode 100644 index 00000000000..62991cef2e2 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/BuildpacksTest.java @@ -0,0 +1,196 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.io.IOException; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.operations.buildpacks.Buildpack; +import org.cloudfoundry.operations.buildpacks.CreateBuildpackRequest; +import org.cloudfoundry.operations.buildpacks.DeleteBuildpackRequest; +import org.cloudfoundry.operations.buildpacks.UpdateBuildpackRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class BuildpacksTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Test + public void create() throws IOException { + String buildpackName = this.nameFactory.getBuildpackName(); + + this.cloudFoundryOperations + .buildpacks() + .create( + CreateBuildpackRequest.builder() + .buildpack( + new ClassPathResource("test-buildpack.zip") + .getFile() + .toPath()) + .name(buildpackName) + .position(Integer.MAX_VALUE) + .build()) + .thenMany(this.cloudFoundryOperations.buildpacks().list()) + .filter(buildpack -> buildpackName.equals(buildpack.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createFromDirectory() throws IOException { + String buildpackName = this.nameFactory.getBuildpackName(); + + this.cloudFoundryOperations + .buildpacks() + .create( + CreateBuildpackRequest.builder() + .buildpack( + new ClassPathResource("test-buildpack").getFile().toPath()) + .name(buildpackName) + .position(Integer.MAX_VALUE) + .build()) + .thenMany(this.cloudFoundryOperations.buildpacks().list()) + .filter(buildpack -> buildpackName.equals(buildpack.getName())) + .map(Buildpack::getFilename) + .as(StepVerifier::create) + .expectNextMatches(filename -> filename.matches(".*test-buildpack.*\\.zip")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() throws IOException { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpack(this.cloudFoundryOperations, buildpackName) + .then( + this.cloudFoundryOperations + .buildpacks() + .delete( + DeleteBuildpackRequest.builder() + .name(buildpackName) + .build())) + .thenMany(this.cloudFoundryOperations.buildpacks().list()) + .filter(buildpack -> buildpackName.equals(buildpack.getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteBuildpackNotFound() { + String buildpackName = this.nameFactory.getBuildpackName(); + + this.cloudFoundryOperations + .buildpacks() + .delete(DeleteBuildpackRequest.builder().name(buildpackName).build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Buildpack %s not found", buildpackName)) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() throws IOException { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpack(this.cloudFoundryOperations, buildpackName) + .thenMany(this.cloudFoundryOperations.buildpacks().list()) + .filter(buildpack -> buildpackName.equals(buildpack.getName())) + .map(Buildpack::getFilename) + .as(StepVerifier::create) + .expectNext("test-buildpack.zip") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() throws IOException { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpack(this.cloudFoundryOperations, buildpackName) + .then( + this.cloudFoundryOperations + .buildpacks() + .update( + UpdateBuildpackRequest.builder() + .enable(true) + .name(buildpackName) + .build())) + .thenMany(this.cloudFoundryOperations.buildpacks().list()) + .filter(buildpack -> buildpackName.equals(buildpack.getName())) + .map(Buildpack::getEnabled) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateFromDirectory() throws IOException { + String buildpackName = this.nameFactory.getBuildpackName(); + + createBuildpack(this.cloudFoundryOperations, buildpackName) + .then( + this.cloudFoundryOperations + .buildpacks() + .update( + UpdateBuildpackRequest.builder() + .buildpack( + new ClassPathResource("test-buildpack") + .getFile() + .toPath()) + .enable(true) + .name(buildpackName) + .build())) + .thenMany(this.cloudFoundryOperations.buildpacks().list()) + .filter(buildpack -> buildpackName.equals(buildpack.getName())) + .map(Buildpack::getFilename) + .as(StepVerifier::create) + .expectNext("test-buildpack.zip") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createBuildpack( + CloudFoundryOperations cloudFoundryOperations, String buildpackName) + throws IOException { + return cloudFoundryOperations + .buildpacks() + .create( + CreateBuildpackRequest.builder() + .buildpack( + new ClassPathResource("test-buildpack.zip") + .getFile() + .toPath()) + .enable(false) + .name(buildpackName) + .position(Integer.MAX_VALUE) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/DomainsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/DomainsTest.java new file mode 100644 index 00000000000..b75ca3f3a4c --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/DomainsTest.java @@ -0,0 +1,304 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.InstanceOfAssertFactories.type; +import static org.cloudfoundry.operations.domains.Status.OWNED; +import static org.cloudfoundry.operations.domains.Status.SHARED; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v3.ClientV3Exception; +import org.cloudfoundry.client.v3.Error; +import org.cloudfoundry.client.v3.domains.GetDomainRequest; +import org.cloudfoundry.operations.domains.CreateDomainRequest; +import org.cloudfoundry.operations.domains.CreateSharedDomainRequest; +import org.cloudfoundry.operations.domains.Domain; +import org.cloudfoundry.operations.domains.RouterGroup; +import org.cloudfoundry.operations.domains.ShareDomainRequest; +import org.cloudfoundry.operations.domains.UnshareDomainRequest; +import org.cloudfoundry.operations.organizations.CreateOrganizationRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class DomainsTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private String organizationName; + + @Test + public void createInvalidDomain() { + this.cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain("invalid-domain") + .organization(this.organizationName) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .asInstanceOf(type(ClientV3Exception.class)) + .extracting(ClientV3Exception::getErrors) + .asList() + .hasSize(1) + .first() + .isEqualTo( + Error.builder() + .title("CF-UnprocessableEntity") + .code(10008) + .detail( + "Name does not comply with RFC 1035" + + " standards, Name must" + + " contain at least one \".\"") + .build())) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createPrivate() { + String domainName = this.nameFactory.getDomainName(); + + this.cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain(domainName) + .organization(this.organizationName) + .build()) + .thenMany(requestListDomains(this.cloudFoundryOperations)) + .filter(domain -> domainName.equals(domain.getName())) + .map(Domain::getStatus) + .as(StepVerifier::create) + .expectNext(OWNED) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createShared() { + String domainName = this.nameFactory.getDomainName(); + + this.cloudFoundryOperations + .domains() + .createShared(CreateSharedDomainRequest.builder().domain(domainName).build()) + .thenMany(requestListDomains(this.cloudFoundryOperations)) + .filter(domain -> domainName.equals(domain.getName())) + .map(Domain::getStatus) + .as(StepVerifier::create) + .expectNext(SHARED) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createSharedTcp() { + String domainName = this.nameFactory.getDomainName(); + + this.cloudFoundryOperations + .domains() + .createShared( + CreateSharedDomainRequest.builder() + .domain(domainName) + .routerGroup(DEFAULT_ROUTER_GROUP) + .build()) + .thenMany(requestListDomains(this.cloudFoundryOperations)) + .filter(domain -> domainName.equals(domain.getName())) + .as(StepVerifier::create) + .expectNextMatches(domain -> domain.getType().equals("tcp")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + this.cloudFoundryOperations + .domains() + .list() + .filter(d -> d.getName().equals(domainName)) + .single() + .flatMap( + d -> + this.cloudFoundryClient + .domainsV3() + .get( + GetDomainRequest.builder() + .domainId(d.getId()) + .build())) + .map(d -> d.getRouterGroup().getId()) + .flatMap( + id -> + this.cloudFoundryOperations + .domains() + .listRouterGroups() + .filter(rg -> rg.getId().equals(id)) + .single()) + .map(RouterGroup::getName) + .as(StepVerifier::create) + .expectNext(DEFAULT_ROUTER_GROUP) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String domainName = this.nameFactory.getDomainName(); + + requestCreateDomain(this.cloudFoundryOperations, domainName, this.organizationName) + .thenMany( + this.cloudFoundryOperations + .domains() + .list() + .filter(domain -> domainName.equals(domain.getName()))) + .map(Domain::getStatus) + .as(StepVerifier::create) + .expectNext(OWNED) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listRouterGroups() { + this.cloudFoundryOperations + .domains() + .listRouterGroups() + .filter(response -> DEFAULT_ROUTER_GROUP.equals(response.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listTcp() { + String domainName = this.nameFactory.getDomainName(); + + requestCreateTcpDomain(this.cloudFoundryOperations, domainName) + .thenMany( + this.cloudFoundryOperations + .domains() + .list() + .filter(domain -> domainName.equals(domain.getName()))) + .map(Domain::getType) + .as(StepVerifier::create) + .expectNext("tcp") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void share() { + String domainName = this.nameFactory.getDomainName(); + String targetOrganizationName = this.nameFactory.getOrganizationName(); + + requestCreateOrganization(this.cloudFoundryOperations, targetOrganizationName) + .then( + requestCreateDomain( + this.cloudFoundryOperations, domainName, this.organizationName)) + .then( + this.cloudFoundryOperations + .domains() + .share( + ShareDomainRequest.builder() + .domain(domainName) + .organization(targetOrganizationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unshare() { + String domainName = this.nameFactory.getDomainName(); + String targetOrganizationName = this.nameFactory.getOrganizationName(); + + requestCreateOrganization(this.cloudFoundryOperations, targetOrganizationName) + .then( + requestCreateDomain( + this.cloudFoundryOperations, domainName, this.organizationName)) + .then( + requestShareDomain( + this.cloudFoundryOperations, targetOrganizationName, domainName)) + .then( + this.cloudFoundryOperations + .domains() + .unshare( + UnshareDomainRequest.builder() + .domain(domainName) + .organization(targetOrganizationName) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono requestCreateDomain( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String organizationName) { + return cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain(domainName) + .organization(organizationName) + .build()); + } + + private static Mono requestCreateOrganization( + CloudFoundryOperations cloudFoundryOperations, String name) { + return cloudFoundryOperations + .organizations() + .create(CreateOrganizationRequest.builder().organizationName(name).build()); + } + + private static Mono requestCreateTcpDomain( + CloudFoundryOperations cloudFoundryOperations, String domainName) { + return cloudFoundryOperations + .domains() + .createShared( + CreateSharedDomainRequest.builder() + .domain(domainName) + .routerGroup(DEFAULT_ROUTER_GROUP) + .build()); + } + + private static Flux requestListDomains(CloudFoundryOperations cloudFoundryOperations) { + return cloudFoundryOperations.domains().list(); + } + + private static Mono requestShareDomain( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + String domainName) { + return cloudFoundryOperations + .domains() + .share( + ShareDomainRequest.builder() + .domain(domainName) + .organization(organizationName) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/NetworkPoliciesTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/NetworkPoliciesTest.java new file mode 100644 index 00000000000..1643a3ef4f8 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/NetworkPoliciesTest.java @@ -0,0 +1,208 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.applications.CreateApplicationRequest; +import org.cloudfoundry.client.v2.applications.CreateApplicationResponse; +import org.cloudfoundry.operations.networkpolicies.AddNetworkPolicyRequest; +import org.cloudfoundry.operations.networkpolicies.ListNetworkPoliciesRequest; +import org.cloudfoundry.operations.networkpolicies.Policy; +import org.cloudfoundry.operations.networkpolicies.RemoveNetworkPolicyRequest; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class NetworkPoliciesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private Mono spaceId; + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void add() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .thenMany( + this.cloudFoundryOperations + .networkPolicies() + .add( + AddNetworkPolicyRequest.builder() + .destination(destinationApplicationName) + .source(sourceApplicationName) + .startPort(port) + .build())) + .thenMany( + requestListNetworkPolicies( + this.cloudFoundryOperations, sourceApplicationName)) + .map(Policy::getDestination) + .as(StepVerifier::create) + .expectNext(destinationApplicationName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void list() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .thenMany( + requestAddNetworkPolicy( + this.cloudFoundryOperations, + destinationApplicationName, + port, + sourceApplicationName)) + .thenMany( + this.cloudFoundryOperations + .networkPolicies() + .list( + ListNetworkPoliciesRequest.builder() + .source(sourceApplicationName) + .build())) + .map(Policy::getStartPort) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_12) + @Test + public void remove() { + String destinationApplicationName = this.nameFactory.getApplicationName(); + String sourceApplicationName = this.nameFactory.getApplicationName(); + Integer port = this.nameFactory.getPort(); + + this.spaceId + .flatMapMany( + spaceId -> + Mono.zip( + createApplicationId( + this.cloudFoundryClient, + destinationApplicationName, + spaceId), + createApplicationId( + this.cloudFoundryClient, + sourceApplicationName, + spaceId))) + .thenMany( + requestAddNetworkPolicy( + this.cloudFoundryOperations, + destinationApplicationName, + port, + sourceApplicationName)) + .thenMany( + this.cloudFoundryOperations + .networkPolicies() + .remove( + RemoveNetworkPolicyRequest.builder() + .destination(destinationApplicationName) + .source(sourceApplicationName) + .startPort(port) + .protocol("tcp") + .build())) + .thenMany( + requestListNetworkPolicies( + this.cloudFoundryOperations, sourceApplicationName)) + .map(Policy::getStartPort) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createApplicationId( + CloudFoundryClient cloudFoundryClient, String applicationName, String spaceId) { + return requestCreateApplication(cloudFoundryClient, spaceId, applicationName) + .map(ResourceUtils::getId); + } + + private static Flux requestAddNetworkPolicy( + CloudFoundryOperations cloudFoundryOperations, + String destinationApplicationName, + Integer port, + String sourceApplicationName) { + return cloudFoundryOperations + .networkPolicies() + .add( + AddNetworkPolicyRequest.builder() + .destination(destinationApplicationName) + .startPort(port) + .source(sourceApplicationName) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryClient cloudFoundryClient, String spaceId, String applicationName) { + return cloudFoundryClient + .applicationsV2() + .create( + CreateApplicationRequest.builder() + .buildpack("staticfile_buildpack") + .diego(true) + .diskQuota(512) + .memory(64) + .name(applicationName) + .spaceId(spaceId) + .build()); + } + + private static Flux requestListNetworkPolicies( + CloudFoundryOperations cloudFoundryOperations, String sourceApplicationName) { + return cloudFoundryOperations + .networkPolicies() + .list(ListNetworkPoliciesRequest.builder().source(sourceApplicationName).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/OrganizationAdminTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/OrganizationAdminTest.java new file mode 100644 index 00000000000..35186836804 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/OrganizationAdminTest.java @@ -0,0 +1,197 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.operations.organizationadmin.CreateQuotaRequest; +import org.cloudfoundry.operations.organizationadmin.DeleteQuotaRequest; +import org.cloudfoundry.operations.organizationadmin.GetQuotaRequest; +import org.cloudfoundry.operations.organizationadmin.OrganizationQuota; +import org.cloudfoundry.operations.organizationadmin.SetQuotaRequest; +import org.cloudfoundry.operations.organizationadmin.UpdateQuotaRequest; +import org.cloudfoundry.operations.organizations.CreateOrganizationRequest; +import org.cloudfoundry.operations.organizations.OrganizationInfoRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class OrganizationAdminTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Test + public void createQuota() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + this.cloudFoundryOperations + .organizationAdmin() + .createQuota( + CreateQuotaRequest.builder() + .applicationInstanceLimit(9) + .allowPaidServicePlans(false) + .instanceMemoryLimit(64) + .memoryLimit(512) + .name(quotaName) + .build()) + .then( + requestGetQuota(this.cloudFoundryOperations, quotaName) + .map(OrganizationQuota::getInstanceMemoryLimit)) + .as(StepVerifier::create) + .expectNext(64) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteQuota() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateQuota(this.cloudFoundryOperations, quotaName) + .then( + this.cloudFoundryOperations + .organizationAdmin() + .deleteQuota(DeleteQuotaRequest.builder().name(quotaName).build())) + .then(requestGetQuota(this.cloudFoundryOperations, quotaName)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Quota %s does not exist", quotaName)) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getQuota() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateQuota(this.cloudFoundryOperations, quotaName) + .then( + this.cloudFoundryOperations + .organizationAdmin() + .getQuota(GetQuotaRequest.builder().name(quotaName).build()) + .map(OrganizationQuota::getApplicationInstanceLimit)) + .as(StepVerifier::create) + .expectNext(9) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listQuotas() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateQuota(this.cloudFoundryOperations, quotaName) + .thenMany(this.cloudFoundryOperations.organizationAdmin().listQuotas()) + .filter(quota -> quotaName.equals(quota.getName())) + .map(OrganizationQuota::getTotalReservedRoutePorts) + .as(StepVerifier::create) + .expectNext(4) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setQuota() { + String organizationName = this.nameFactory.getOrganizationName(); + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + Mono.when( + requestCreateOrganization(this.cloudFoundryOperations, organizationName), + requestCreateQuota(this.cloudFoundryOperations, quotaName)) + .then( + this.cloudFoundryOperations + .organizationAdmin() + .setQuota( + SetQuotaRequest.builder() + .organizationName(organizationName) + .quotaName(quotaName) + .build())) + .then( + this.cloudFoundryOperations + .organizations() + .get( + OrganizationInfoRequest.builder() + .name(organizationName) + .build()) + .map(organization -> organization.getQuota().getName())) + .as(StepVerifier::create) + .expectNext(quotaName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateQuota() { + String quotaName = this.nameFactory.getQuotaDefinitionName(); + + requestCreateQuota(this.cloudFoundryOperations, quotaName) + .then( + this.cloudFoundryOperations + .organizationAdmin() + .updateQuota( + UpdateQuotaRequest.builder() + .name(quotaName) + .memoryLimit(513) + .build())) + .then( + requestGetQuota(this.cloudFoundryOperations, quotaName) + .map(OrganizationQuota::getMemoryLimit)) + .as(StepVerifier::create) + .expectNext(513) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono requestCreateOrganization( + CloudFoundryOperations cloudFoundryOperations, String organizationName) { + return cloudFoundryOperations + .organizations() + .create( + CreateOrganizationRequest.builder() + .organizationName(organizationName) + .build()); + } + + private static Mono requestCreateQuota( + CloudFoundryOperations cloudFoundryOperations, String quotaName) { + return cloudFoundryOperations + .organizationAdmin() + .createQuota( + CreateQuotaRequest.builder() + .applicationInstanceLimit(9) + .allowPaidServicePlans(false) + .instanceMemoryLimit(64) + .memoryLimit(512) + .totalReservedRoutePorts(4) + .totalRoutes(9) + .totalServices(9) + .name(quotaName) + .build()); + } + + private static Mono requestGetQuota( + CloudFoundryOperations cloudFoundryOperations, String quotaName) { + return cloudFoundryOperations + .organizationAdmin() + .getQuota(GetQuotaRequest.builder().name(quotaName).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/OrganizationsTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/OrganizationsTest.java new file mode 100644 index 00000000000..3e4e2b57a63 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/OrganizationsTest.java @@ -0,0 +1,71 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.operations.organizations.CreateOrganizationRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class OrganizationsTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private Mono organizationId; + + @Test + public void create() { + String organizationName = this.nameFactory.getOrganizationName(); + + this.cloudFoundryOperations + .organizations() + .create( + CreateOrganizationRequest.builder() + .organizationName(organizationName) + .build()) + .thenMany(this.cloudFoundryOperations.organizations().list()) + .filter( + organizationSummary -> + organizationName.equals(organizationSummary.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + this.organizationId + .flatMapMany( + organizationId -> + this.cloudFoundryOperations + .organizations() + .list() + .filter( + organization -> + organization + .getId() + .equals(organizationId))) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java new file mode 100644 index 00000000000..19db1a53b1a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/RoutesTest.java @@ -0,0 +1,920 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.routes.Level.ORGANIZATION; +import static org.cloudfoundry.operations.routes.Level.SPACE; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import java.util.Collections; +import java.util.Optional; +import java.util.function.Predicate; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.operations.applications.ApplicationHealthCheck; +import org.cloudfoundry.operations.applications.PushApplicationRequest; +import org.cloudfoundry.operations.domains.CreateDomainRequest; +import org.cloudfoundry.operations.domains.CreateSharedDomainRequest; +import org.cloudfoundry.operations.routes.CheckRouteRequest; +import org.cloudfoundry.operations.routes.CreateRouteRequest; +import org.cloudfoundry.operations.routes.DeleteOrphanedRoutesRequest; +import org.cloudfoundry.operations.routes.DeleteRouteRequest; +import org.cloudfoundry.operations.routes.ListRoutesRequest; +import org.cloudfoundry.operations.routes.MapRouteRequest; +import org.cloudfoundry.operations.routes.Route; +import org.cloudfoundry.operations.routes.UnmapRouteRequest; +import org.cloudfoundry.operations.services.BindRouteServiceInstanceRequest; +import org.cloudfoundry.operations.services.CreateUserProvidedServiceInstanceRequest; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@CleanupCloudFoundryAfterClass +public final class RoutesTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private String organizationName; + + @Autowired private String spaceName; + + @Test + public void checkFalse() { + String domainName = this.nameFactory.getDomainName(); + String host = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + this.cloudFoundryOperations + .routes() + .check(CheckRouteRequest.builder().domain(domainName).host(host).path(path).build()) + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void checkTruePrivateDomainNoHost() { + String domainName = this.nameFactory.getDomainName(); + String hostName = null; + String path = this.nameFactory.getPath(); + + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path) + .then( + this.cloudFoundryOperations + .routes() + .check( + CheckRouteRequest.builder() + .domain(domainName) + .path(path) + .build())) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void checkTrueSharedDomain() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + createSharedDomainAndRoute( + this.cloudFoundryOperations, this.spaceName, domainName, hostName, path) + .then( + this.cloudFoundryOperations + .routes() + .check( + CheckRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path) + .then( + this.cloudFoundryOperations + .routes() + .check( + CheckRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .as(StepVerifier::create) + .expectNext(true) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createRouteTcpAssignedPort() { + String domainName = this.nameFactory.getDomainName(); + Integer port = this.nameFactory.getPort(); + + requestCreateSharedDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then( + requestCreateRoute( + this.cloudFoundryOperations, this.spaceName, domainName, port)) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createRouteTcpRandomPort() { + String domainName = this.nameFactory.getDomainName(); + + requestCreateSharedDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then( + requestCreateRoute( + this.cloudFoundryOperations, this.spaceName, domainName, true)) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createRouteWithNonExistentDomain() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + this.cloudFoundryOperations + .routes() + .create( + CreateRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .space(this.spaceName) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain %s does not exist", domainName)) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path) + .then( + this.cloudFoundryOperations + .routes() + .delete( + DeleteRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .then( + this.cloudFoundryOperations + .routes() + .check( + CheckRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteInvalidDomain() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + this.cloudFoundryOperations + .routes() + .delete( + DeleteRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("Domain %s does not exist", domainName)) + .verify(Duration.ofMinutes(5)); + } + + @Test + @Disabled("fails often for no reasons") + public void deleteOrphanedRoutes() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path) + .then( + this.cloudFoundryOperations + .routes() + .deleteOrphanedRoutes( + DeleteOrphanedRoutesRequest.builder().build())) + .then( + this.cloudFoundryOperations + .routes() + .check( + CheckRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .as(StepVerifier::create) + .expectNext(false) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteTcpRoute() { + String domainName = this.nameFactory.getDomainName(); + + requestCreateSharedDomain(this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then( + requestCreateRoute( + this.cloudFoundryOperations, this.spaceName, domainName, true)) + .flatMap( + port -> + this.cloudFoundryOperations + .routes() + .delete( + DeleteRouteRequest.builder() + .domain(domainName) + .port(port) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listWithOrganizationLevel() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().level(ORGANIZATION).build())) + .filter(filterRoutes(domainName, hostName, path, null)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listWithService() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + createSharedDomainAndRoute( + this.cloudFoundryOperations, this.spaceName, domainName, hostName, path) + .then( + requestCreateUserProvidedServiceInstance( + this.cloudFoundryOperations, serviceInstanceName)) + .then( + requestBindRouteServiceInstance( + this.cloudFoundryOperations, + domainName, + hostName, + path, + serviceInstanceName)) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().level(SPACE).build())) + .filter(filterRoutes(domainName, hostName, path, null)) + .map(Route::getService) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listWithSpaceLevel() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path) + .thenMany( + this.cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().level(SPACE).build())) + .filter(filterRoutes(domainName, hostName, path, null)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void map() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + Mono.when( + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + this.cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(filterRoutes(domainName, hostName, path, applicationName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void mapNoHost() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = null; + String path = this.nameFactory.getPath(); + + Mono.when( + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + this.cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(filterRoutes(domainName, hostName, path, applicationName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void mapNoPath() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = null; + + Mono.when( + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + this.cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(filterRoutes(domainName, hostName, path, applicationName)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void mapTcpRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.when( + createSharedDomainAndTcpRoute( + this.cloudFoundryOperations, domainName, this.spaceName), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + this.cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .single() + .map(route -> route.getApplications().size()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void mapTcpRouteTwice() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + Mono.when( + requestCreateSharedDomain( + this.cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + this.cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .randomPort(true) + .build())) + .then( + this.cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .randomPort(true) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .as(StepVerifier::create) + .expectNextCount(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unmap() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + + Mono.when( + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + requestMapRoute( + this.cloudFoundryOperations, + applicationName, + domainName, + hostName, + path)) + .then( + this.cloudFoundryOperations + .routes() + .unmap( + UnmapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(filterRoutes(domainName, hostName, path, applicationName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unmapNoPath() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = null; + + Mono.when( + createDomainAndRoute( + this.cloudFoundryOperations, + this.organizationName, + this.spaceName, + domainName, + hostName, + path), + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true)) + .then( + requestMapRoute( + this.cloudFoundryOperations, + applicationName, + domainName, + hostName, + path)) + .then( + this.cloudFoundryOperations + .routes() + .unmap( + UnmapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .host(hostName) + .path(path) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(filterRoutes(domainName, hostName, path, applicationName)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unmapTcpRoute() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String domainName = this.nameFactory.getDomainName(); + + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName, + true) + .then( + createSharedDomainAndTcpRoute( + this.cloudFoundryOperations, domainName, this.spaceName)) + .flatMap( + port -> + requestMapRoute( + this.cloudFoundryOperations, + applicationName, + domainName, + port)) + .flatMap( + port -> + this.cloudFoundryOperations + .routes() + .unmap( + UnmapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .port(port) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .map(route -> route.getApplications().size()) + .as(StepVerifier::create) + .expectNext(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createDomainAndRoute( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + String spaceName, + String domainName, + String hostName, + String path) { + return requestCreateDomain(cloudFoundryOperations, organizationName, domainName) + .then( + requestCreateRoute( + cloudFoundryOperations, spaceName, domainName, hostName, path)); + } + + private static Mono createSharedDomainAndRoute( + CloudFoundryOperations cloudFoundryOperations, + String spaceName, + String domainName, + String hostName, + String path) { + return requestCreateSharedDomain(cloudFoundryOperations, domainName, null) + .then( + requestCreateRoute( + cloudFoundryOperations, spaceName, domainName, hostName, path)); + } + + private static Mono createSharedDomainAndTcpRoute( + CloudFoundryOperations cloudFoundryOperations, String domainName, String spaceName) { + return requestCreateSharedDomain(cloudFoundryOperations, domainName, DEFAULT_ROUTER_GROUP) + .then(requestCreateRoute(cloudFoundryOperations, spaceName, domainName, true)); + } + + private static Predicate filterRoutes( + String domainName, String host, String path, String applicationName) { + return route -> + Optional.ofNullable(domainName).map(route.getDomain()::equals).orElse(true) + && Optional.ofNullable(host).map(route.getHost()::equals).orElse(true) + && Optional.ofNullable(applicationName) + .map(Collections::singletonList) + .map(route.getApplications()::equals) + .orElse(true) + && Optional.ofNullable(path).map(route.getPath()::equals).orElse(true); + } + + private static Mono requestBindRouteServiceInstance( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String hostName, + String path, + String serviceInstanceName) { + return cloudFoundryOperations + .services() + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName(domainName) + .hostname(hostName) + .path(path) + .serviceInstanceName(serviceInstanceName) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryOperations cloudFoundryOperations, + Path application, + String name, + Boolean noStart) { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path(application) + .healthCheckType(ApplicationHealthCheck.PORT) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .memory(64) + .name(name) + .noStart(noStart) + .build()); + } + + private static Mono requestCreateDomain( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + String domainName) { + return cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain(domainName) + .organization(organizationName) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryOperations cloudFoundryOperations, + String spaceName, + String domainName, + String hostName, + String path) { + return cloudFoundryOperations + .routes() + .create( + CreateRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .space(spaceName) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryOperations cloudFoundryOperations, + String spaceName, + String domainName, + Integer port) { + return cloudFoundryOperations + .routes() + .create( + CreateRouteRequest.builder() + .domain(domainName) + .port(port) + .space(spaceName) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryOperations cloudFoundryOperations, + String spaceName, + String domainName, + Boolean randomPort) { + return cloudFoundryOperations + .routes() + .create( + CreateRouteRequest.builder() + .domain(domainName) + .randomPort(randomPort) + .space(spaceName) + .build()); + } + + private static Mono requestCreateSharedDomain( + CloudFoundryOperations cloudFoundryOperations, String domainName, String routerGroup) { + return cloudFoundryOperations + .domains() + .createShared( + CreateSharedDomainRequest.builder() + .domain(domainName) + .routerGroup(routerGroup) + .build()); + } + + private static Mono requestCreateUserProvidedServiceInstance( + CloudFoundryOperations cloudFoundryOperations, String name) { + return cloudFoundryOperations + .services() + .createUserProvidedInstance( + CreateUserProvidedServiceInstanceRequest.builder() + .name(name) + .routeServiceUrl("https://test.route.service") + .build()); + } + + private static Flux requestListRoutes(CloudFoundryOperations cloudFoundryOperations) { + return cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().level(SPACE).build()); + } + + private static Mono requestMapRoute( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String domainName, + String hostName, + String path) { + return cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .host(hostName) + .path(path) + .build()); + } + + private static Mono requestMapRoute( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String domainName, + Integer port) { + return cloudFoundryOperations + .routes() + .map( + MapRouteRequest.builder() + .applicationName(applicationName) + .domain(domainName) + .port(port) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ServiceAdminTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ServiceAdminTest.java new file mode 100644 index 00000000000..7a8f1ec3787 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ServiceAdminTest.java @@ -0,0 +1,642 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.cloudfoundry.ServiceBrokerUtils.createServiceBroker; +import static org.cloudfoundry.ServiceBrokerUtils.deleteServiceBroker; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.ServiceBrokerUtils; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.spaces.CreateSpaceRequest; +import org.cloudfoundry.client.v2.spaces.CreateSpaceResponse; +import org.cloudfoundry.operations.serviceadmin.Access; +import org.cloudfoundry.operations.serviceadmin.DisableServiceAccessRequest; +import org.cloudfoundry.operations.serviceadmin.EnableServiceAccessRequest; +import org.cloudfoundry.operations.serviceadmin.ListServiceAccessSettingsRequest; +import org.cloudfoundry.operations.serviceadmin.ServiceAccess; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@CleanupCloudFoundryAfterClass +public final class ServiceAdminTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private Mono organizationId; + + @Autowired private String organizationName; + + @Autowired private String planName; + + @Autowired private String serviceBrokerName; + + @Autowired private String serviceName; + + // To create a service in #pushBindService, the Service Broker must be installed first. + // We ensure it is by loading the serviceBrokerId @Lazy bean. + @Qualifier("serviceBrokerId") + @Autowired + private Mono serviceBrokerId; + + @Test + public void disableServiceAccess() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToEnabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.NONE) + .brokerName(serviceBrokerName) + .organizationNames() + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void disableServiceAccessSpecifyAll() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToEnabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .organizationName(this.organizationName) + .servicePlanName(planName) + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(serviceBrokerName) + .organizationNames() + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void disableServiceAccessSpecifyOrganization() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToEnabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .organizationName(this.organizationName) + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(serviceBrokerName) + .organizationNames() + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void disableServiceAccessSpecifyServicePlan() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToEnabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .disableServiceAccess( + DisableServiceAccessRequest.builder() + .servicePlanName(planName) + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(serviceBrokerName) + .organizationNames() + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void enableServiceAccess() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToDisabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(serviceBrokerName) + .organizationNames() + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void enableServiceAccessSpecifyAll() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToDisabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .organizationName(this.organizationName) + .servicePlanName(planName) + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.LIMITED) + .brokerName(serviceBrokerName) + .organizationName(this.organizationName) + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void enableServiceAccessSpecifyOrganization() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToDisabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .organizationName(this.organizationName) + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.LIMITED) + .brokerName(serviceBrokerName) + .organizationName(this.organizationName) + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void enableServiceAccessSpecifyServicePlan() { + String planName = this.nameFactory.getPlanName(); + String serviceBrokerName = this.nameFactory.getServiceBrokerName(); + String serviceName = this.nameFactory.getServiceName(); + String spaceName = this.nameFactory.getSpaceName(); + + ServiceBrokerUtils.ServiceBrokerMetadata serviceBrokerMetadata = + this.organizationId + .flatMap( + organizationId -> + createSpaceId( + this.cloudFoundryClient, organizationId, spaceName)) + .flatMap( + spaceId -> + createServiceBroker( + this.cloudFoundryClient, + this.nameFactory, + planName, + serviceBrokerName, + serviceName, + spaceId, + false)) + .block(Duration.ofMinutes(5)); + + resetToDisabled(this.cloudFoundryOperations, serviceName) + .then( + this.cloudFoundryOperations + .serviceAdmin() + .enableServiceAccess( + EnableServiceAccessRequest.builder() + .servicePlanName(planName) + .serviceName(serviceName) + .build())) + .thenMany( + requestListServiceAccessSettings(this.cloudFoundryOperations, serviceName)) + .filter(response -> serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(serviceBrokerName) + .organizationNames() + .planName(planName) + .serviceName(serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + + deleteServiceBroker( + this.cloudFoundryClient, + serviceBrokerMetadata.applicationMetadata.applicationId) + .block(Duration.ofMinutes(5)); + } + + @Test + public void listServiceAccessSettings() { + resetToEnabled(this.cloudFoundryOperations, this.serviceName) + .thenMany( + this.cloudFoundryOperations + .serviceAdmin() + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder().build())) + .filter(response -> this.serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(this.serviceBrokerName) + .organizationNames() + .planName(this.planName) + .serviceName(this.serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceAccessSettingsSpecifyBroker() { + resetToEnabled(this.cloudFoundryOperations, this.serviceName) + .thenMany( + this.cloudFoundryOperations + .serviceAdmin() + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .brokerName(this.serviceBrokerName) + .build())) + .filter(serviceAccess -> this.serviceName.equals(serviceAccess.getServiceName())) + .single() + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(this.serviceBrokerName) + .organizationNames() + .planName(this.planName) + .serviceName(this.serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceAccessSettingsSpecifyOrganization() { + resetToEnabled(this.cloudFoundryOperations, this.serviceName) + .thenMany( + this.cloudFoundryOperations + .serviceAdmin() + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .organizationName(this.organizationName) + .build())) + .filter(response -> this.serviceName.equals(response.getServiceName())) + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(this.serviceBrokerName) + .organizationNames() + .planName(this.planName) + .serviceName(this.serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceAccessSettingsSpecifyService() { + resetToEnabled(this.cloudFoundryOperations, this.serviceName) + .thenMany( + this.cloudFoundryOperations + .serviceAdmin() + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .serviceName(this.serviceName) + .build())) + .single() + .as(StepVerifier::create) + .expectNext( + ServiceAccess.builder() + .access(Access.ALL) + .brokerName(this.serviceBrokerName) + .organizationNames() + .planName(this.planName) + .serviceName(this.serviceName) + .build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createSpaceId( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return requestCreateSpace(cloudFoundryClient, organizationId, spaceName) + .map(ResourceUtils::getId); + } + + private static Mono requestCreateSpace( + CloudFoundryClient cloudFoundryClient, String organizationId, String spaceName) { + return cloudFoundryClient + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organizationId(organizationId) + .build()); + } + + private static Flux requestListServiceAccessSettings( + CloudFoundryOperations cloudFoundryOperations, String serviceName) { + return cloudFoundryOperations + .serviceAdmin() + .listServiceAccessSettings( + ListServiceAccessSettingsRequest.builder() + .serviceName(serviceName) + .build()); + } + + private static Mono resetToDisabled( + CloudFoundryOperations cloudFoundryOperations, String serviceName) { + return cloudFoundryOperations + .serviceAdmin() + .disableServiceAccess( + DisableServiceAccessRequest.builder().serviceName(serviceName).build()); + } + + private static Mono resetToEnabled( + CloudFoundryOperations cloudFoundryOperations, String serviceName) { + return cloudFoundryOperations + .serviceAdmin() + .enableServiceAccess( + EnableServiceAccessRequest.builder().serviceName(serviceName).build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/ServicesTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/ServicesTest.java new file mode 100644 index 00000000000..520027128be --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/ServicesTest.java @@ -0,0 +1,751 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.operations.routes.Level.SPACE; + +import java.io.IOException; +import java.nio.file.Path; +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CleanupCloudFoundryAfterClass; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.servicebindings.ListServiceBindingsRequest; +import org.cloudfoundry.client.v2.servicebindings.ServiceBindingResource; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.ListUserProvidedServiceInstancesRequest; +import org.cloudfoundry.client.v2.userprovidedserviceinstances.UserProvidedServiceInstanceResource; +import org.cloudfoundry.operations.applications.ApplicationDetail; +import org.cloudfoundry.operations.applications.ApplicationHealthCheck; +import org.cloudfoundry.operations.applications.GetApplicationRequest; +import org.cloudfoundry.operations.applications.PushApplicationRequest; +import org.cloudfoundry.operations.domains.CreateDomainRequest; +import org.cloudfoundry.operations.routes.CreateRouteRequest; +import org.cloudfoundry.operations.routes.ListRoutesRequest; +import org.cloudfoundry.operations.routes.Route; +import org.cloudfoundry.operations.services.BindRouteServiceInstanceRequest; +import org.cloudfoundry.operations.services.BindServiceInstanceRequest; +import org.cloudfoundry.operations.services.CreateServiceInstanceRequest; +import org.cloudfoundry.operations.services.CreateServiceKeyRequest; +import org.cloudfoundry.operations.services.CreateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.operations.services.DeleteServiceInstanceRequest; +import org.cloudfoundry.operations.services.DeleteServiceKeyRequest; +import org.cloudfoundry.operations.services.GetServiceInstanceRequest; +import org.cloudfoundry.operations.services.GetServiceKeyRequest; +import org.cloudfoundry.operations.services.ListServiceKeysRequest; +import org.cloudfoundry.operations.services.ListServiceOfferingsRequest; +import org.cloudfoundry.operations.services.RenameServiceInstanceRequest; +import org.cloudfoundry.operations.services.ServiceInstance; +import org.cloudfoundry.operations.services.ServiceInstanceSummary; +import org.cloudfoundry.operations.services.ServiceKey; +import org.cloudfoundry.operations.services.ServiceOffering; +import org.cloudfoundry.operations.services.UnbindRouteServiceInstanceRequest; +import org.cloudfoundry.operations.services.UnbindServiceInstanceRequest; +import org.cloudfoundry.operations.services.UpdateServiceInstanceRequest; +import org.cloudfoundry.operations.services.UpdateUserProvidedServiceInstanceRequest; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@CleanupCloudFoundryAfterClass +public final class ServicesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private String organizationName; + + @Autowired private String planName; + + @Autowired private Mono serviceBrokerId; + + @Autowired private String serviceName; + + @Autowired private String spaceName; + + @Test + public void bindRoutePrivateDomain() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + String userProvidedServiceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.when( + requestCreatePrivateDomain( + this.cloudFoundryOperations, domainName, this.organizationName), + requestCreateUserProvidedServiceInstance( + this.cloudFoundryOperations, userProvidedServiceInstanceName)) + .then( + requestCreateRoute( + this.cloudFoundryOperations, + domainName, + hostName, + path, + this.spaceName)) + .then( + this.cloudFoundryOperations + .services() + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName(domainName) + .hostname(hostName) + .parameter( + "integration-test-key", + "integration-test-value") + .path(path) + .serviceInstanceName( + userProvidedServiceInstanceName) + .build())) + .thenMany(requestListRoutes(this.cloudFoundryOperations)) + .filter(response -> domainName.equals(response.getDomain())) + .map(Route::getHost) + .as(StepVerifier::create) + .expectNext(hostName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void bindService() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.when( + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName), + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName)) + .then( + this.cloudFoundryOperations + .services() + .bind( + BindServiceInstanceRequest.builder() + .applicationName(applicationName) + .serviceInstanceName(serviceInstanceName) + .build())) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMapMany( + applicationId -> + requestListServiceBindings(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.cloudFoundryOperations + .services() + .createInstance( + CreateServiceInstanceRequest.builder() + .planName(this.planName) + .serviceName(this.serviceName) + .serviceInstanceName(serviceInstanceName) + .build()) + .thenMany( + requestListServiceInstances(this.cloudFoundryOperations) + .map(ServiceInstanceSummary::getName)) + .filter(serviceInstanceName::equals) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @SuppressWarnings("unchecked") + @Test + public void createServiceKey() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .then( + this.cloudFoundryOperations + .services() + .createServiceKey( + CreateServiceKeyRequest.builder() + .parameter("test-key", "test-value") + .serviceInstanceName(serviceInstanceName) + .serviceKeyName(serviceKeyName) + .build())) + .thenMany( + requestGetServiceKey( + this.cloudFoundryOperations, + serviceInstanceName, + serviceKeyName) + .map(ServiceKey::getName)) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createUserProvidedServiceInstance() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.cloudFoundryOperations + .services() + .createUserProvidedInstance( + CreateUserProvidedServiceInstanceRequest.builder() + .credential("test-credential-key", "test-credential-value") + .name(serviceInstanceName) + .syslogDrainUrl("test.url") + .routeServiceUrl("https://test.url") + .build()) + .thenMany( + requestListServiceInstances(this.cloudFoundryOperations) + .map(ServiceInstanceSummary::getName)) + .filter(serviceInstanceName::equals) + .as(StepVerifier::create) + .expectNext(serviceInstanceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName)) + .then( + this.cloudFoundryOperations + .services() + .deleteInstance( + DeleteServiceInstanceRequest.builder() + .name(serviceInstanceName) + .build())) + .thenMany( + requestListServiceInstances(this.cloudFoundryOperations) + .map(ServiceInstanceSummary::getName)) + .filter(serviceInstanceName::equals) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteServiceKey() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .then( + requestCreateServiceKey( + this.cloudFoundryOperations, serviceKeyName, serviceInstanceName)) + .then( + this.cloudFoundryOperations + .services() + .deleteServiceKey( + DeleteServiceKeyRequest.builder() + .serviceInstanceName(serviceInstanceName) + .serviceKeyName(serviceKeyName) + .build())) + .thenMany( + requestGetServiceKey( + this.cloudFoundryOperations, serviceInstanceName, serviceKeyName)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage( + "Service key %s does not exist", serviceKeyName)) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getManagedService() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .then( + this.cloudFoundryOperations + .services() + .getInstance( + GetServiceInstanceRequest.builder() + .name(serviceInstanceName) + .build()) + .map(ServiceInstance::getPlan)) + .as(StepVerifier::create) + .expectNext(this.planName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getServiceKey() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .then( + requestCreateServiceKey( + this.cloudFoundryOperations, serviceKeyName, serviceInstanceName)) + .thenMany( + this.cloudFoundryOperations + .services() + .getServiceKey( + GetServiceKeyRequest.builder() + .serviceInstanceName(serviceInstanceName) + .serviceKeyName(serviceKeyName) + .build()) + .map(ServiceKey::getName)) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceKey() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + String serviceKeyName = this.nameFactory.getServiceKeyName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .then( + requestCreateServiceKey( + this.cloudFoundryOperations, serviceKeyName, serviceInstanceName)) + .thenMany( + this.cloudFoundryOperations + .services() + .listServiceKeys( + ListServiceKeysRequest.builder() + .serviceInstanceName(serviceInstanceName) + .build()) + .map(ServiceKey::getName)) + .as(StepVerifier::create) + .expectNext(serviceKeyName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listServiceOfferings() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName) + .thenMany( + this.cloudFoundryOperations + .services() + .listServiceOfferings( + ListServiceOfferingsRequest.builder() + .serviceName(this.serviceName) + .build()) + .map(ServiceOffering::getDescription)) + .as(StepVerifier::create) + .expectNext("test-service-description") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void rename() { + String serviceInstanceName1 = this.nameFactory.getServiceInstanceName(); + String serviceInstanceName2 = this.nameFactory.getServiceInstanceName(); + + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName1, + this.serviceName) + .then( + this.cloudFoundryOperations + .services() + .renameInstance( + RenameServiceInstanceRequest.builder() + .name(serviceInstanceName1) + .newName(serviceInstanceName2) + .build())) + .thenMany( + requestListServiceInstances(this.cloudFoundryOperations) + .map(ServiceInstanceSummary::getName)) + .filter(serviceInstanceName2::equals) + .as(StepVerifier::create) + .expectNext(serviceInstanceName2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unbindRoute() { + String domainName = this.nameFactory.getDomainName(); + String hostName = this.nameFactory.getHostName(); + String path = this.nameFactory.getPath(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.when( + requestCreatePrivateDomain( + this.cloudFoundryOperations, domainName, this.organizationName), + requestCreateUserProvidedServiceInstance( + this.cloudFoundryOperations, serviceInstanceName)) + .then( + requestCreateRoute( + this.cloudFoundryOperations, + domainName, + hostName, + path, + this.spaceName)) + .then( + requestBindRoute( + this.cloudFoundryOperations, + domainName, + hostName, + path, + serviceInstanceName)) + .then( + this.cloudFoundryOperations + .services() + .unbindRoute( + UnbindRouteServiceInstanceRequest.builder() + .domainName(domainName) + .hostname(hostName) + .path(path) + .serviceInstanceName(serviceInstanceName) + .build())) + .thenMany(requestGetInstance(this.cloudFoundryOperations, serviceInstanceName)) + .filter(response -> domainName.equals(response.getLastOperation())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unbindService() throws IOException { + String applicationName = this.nameFactory.getApplicationName(); + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + Mono.when( + requestCreateApplication( + this.cloudFoundryOperations, + new ClassPathResource("test-application.zip").getFile().toPath(), + applicationName), + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName)) + .then( + requestBindService( + this.cloudFoundryOperations, applicationName, serviceInstanceName)) + .then( + this.cloudFoundryOperations + .services() + .unbind( + UnbindServiceInstanceRequest.builder() + .applicationName(applicationName) + .serviceInstanceName(serviceInstanceName) + .build())) + .then(getApplicationId(this.cloudFoundryOperations, applicationName)) + .flatMapMany( + applicationId -> + requestListServiceBindings(this.cloudFoundryClient, applicationId)) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateInstance() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + requestCreateServiceInstance( + this.cloudFoundryOperations, + this.planName, + serviceInstanceName, + this.serviceName)) + .then( + this.cloudFoundryOperations + .services() + .updateInstance( + UpdateServiceInstanceRequest.builder() + .serviceInstanceName(serviceInstanceName) + .tag("test-tag") + .build())) + .then( + requestGetInstance(this.cloudFoundryOperations, serviceInstanceName) + .map(serviceInstance -> serviceInstance.getTags().get(0))) + .as(StepVerifier::create) + .expectNext("test-tag") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateUserProvidedInstance() { + String serviceInstanceName = this.nameFactory.getServiceInstanceName(); + + this.serviceBrokerId + .flatMap( + serviceBrokerId -> + requestCreateUserProvidedServiceInstance( + this.cloudFoundryOperations, serviceInstanceName)) + .then( + this.cloudFoundryOperations + .services() + .updateUserProvidedInstance( + UpdateUserProvidedServiceInstanceRequest.builder() + .userProvidedServiceInstanceName( + serviceInstanceName) + .syslogDrainUrl("test.url") + .build())) + .thenMany( + requestListUserProvidedServiceInstances( + this.cloudFoundryClient, serviceInstanceName) + .map(r -> r.getEntity().getSyslogDrainUrl())) + .as(StepVerifier::create) + .expectNext("test.url") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getApplicationId( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return requestGetApplication(cloudFoundryOperations, applicationName) + .map(ApplicationDetail::getId); + } + + private static Mono requestBindRoute( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String hostName, + String path, + String userProvidedServiceInstanceName) { + return cloudFoundryOperations + .services() + .bindRoute( + BindRouteServiceInstanceRequest.builder() + .domainName(domainName) + .hostname(hostName) + .path(path) + .serviceInstanceName(userProvidedServiceInstanceName) + .build()); + } + + private static Mono requestBindService( + CloudFoundryOperations cloudFoundryOperations, + String applicationName, + String serviceInstanceName) { + return cloudFoundryOperations + .services() + .bind( + BindServiceInstanceRequest.builder() + .applicationName(applicationName) + .serviceInstanceName(serviceInstanceName) + .build()); + } + + private static Mono requestCreateApplication( + CloudFoundryOperations cloudFoundryOperations, Path application, String name) { + return cloudFoundryOperations + .applications() + .push( + PushApplicationRequest.builder() + .path(application) + .buildpack("staticfile_buildpack") + .diskQuota(512) + .healthCheckType(ApplicationHealthCheck.PORT) + .memory(64) + .name(name) + .noStart(true) + .build()); + } + + private static Mono requestCreatePrivateDomain( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String organizationName) { + return cloudFoundryOperations + .domains() + .create( + CreateDomainRequest.builder() + .domain(domainName) + .organization(organizationName) + .build()); + } + + private static Mono requestCreateRoute( + CloudFoundryOperations cloudFoundryOperations, + String domainName, + String hostName, + String path, + String spaceName) { + return cloudFoundryOperations + .routes() + .create( + CreateRouteRequest.builder() + .domain(domainName) + .host(hostName) + .path(path) + .space(spaceName) + .build()); + } + + private static Mono requestCreateServiceInstance( + CloudFoundryOperations cloudFoundryOperations, + String planName, + String serviceInstanceName, + String serviceName) { + return cloudFoundryOperations + .services() + .createInstance( + CreateServiceInstanceRequest.builder() + .planName(planName) + .serviceName(serviceName) + .serviceInstanceName(serviceInstanceName) + .build()); + } + + private static Mono requestCreateServiceKey( + CloudFoundryOperations cloudFoundryOperations, + String serviceKeyName, + String serviceInstanceName) { + return cloudFoundryOperations + .services() + .createServiceKey( + CreateServiceKeyRequest.builder() + .serviceInstanceName(serviceInstanceName) + .serviceKeyName(serviceKeyName) + .build()); + } + + private static Mono requestCreateUserProvidedServiceInstance( + CloudFoundryOperations cloudFoundryOperations, String userProvidedServiceInstanceName) { + return cloudFoundryOperations + .services() + .createUserProvidedInstance( + CreateUserProvidedServiceInstanceRequest.builder() + .name(userProvidedServiceInstanceName) + .routeServiceUrl("https://test.route.service.url") + .build()); + } + + private static Mono requestGetApplication( + CloudFoundryOperations cloudFoundryOperations, String applicationName) { + return cloudFoundryOperations + .applications() + .get(GetApplicationRequest.builder().name(applicationName).build()); + } + + private static Mono requestGetInstance( + CloudFoundryOperations cloudFoundryOperations, String userProvidedServiceInstanceName) { + return cloudFoundryOperations + .services() + .getInstance( + GetServiceInstanceRequest.builder() + .name(userProvidedServiceInstanceName) + .build()); + } + + private static Mono requestGetServiceKey( + CloudFoundryOperations cloudFoundryOperations, + String serviceInstanceName, + String serviceKeyName) { + return cloudFoundryOperations + .services() + .getServiceKey( + GetServiceKeyRequest.builder() + .serviceInstanceName(serviceInstanceName) + .serviceKeyName(serviceKeyName) + .build()); + } + + private static Flux requestListRoutes(CloudFoundryOperations cloudFoundryOperations) { + return cloudFoundryOperations + .routes() + .list(ListRoutesRequest.builder().level(SPACE).build()); + } + + private static Flux requestListServiceBindings( + CloudFoundryClient cloudFoundryClient, String applicationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .serviceBindingsV2() + .list( + ListServiceBindingsRequest.builder() + .applicationId(applicationId) + .page(page) + .build())); + } + + private static Flux requestListServiceInstances( + CloudFoundryOperations cloudFoundryOperations) { + return cloudFoundryOperations.services().listInstances(); + } + + private static Flux + requestListUserProvidedServiceInstances( + CloudFoundryClient cloudFoundryClient, String serviceInstanceName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .userProvidedServiceInstances() + .list( + ListUserProvidedServiceInstancesRequest.builder() + .name(serviceInstanceName) + .page(page) + .build())); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/SpacesTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/SpacesTest.java new file mode 100644 index 00000000000..fbb8dc765b3 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/SpacesTest.java @@ -0,0 +1,88 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.operations.spaces.CreateSpaceRequest; +import org.cloudfoundry.operations.spaces.GetSpaceRequest; +import org.cloudfoundry.operations.spaces.SpaceDetail; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.test.StepVerifier; + +public final class SpacesTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private String organizationName; + + @Test + public void create() { + String spaceName = this.nameFactory.getSpaceName(); + + this.cloudFoundryOperations + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organization(this.organizationName) + .build()) + .thenMany(this.cloudFoundryOperations.spaces().list()) + .filter(spaceSummary -> spaceName.equals(spaceSummary.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getWithURLReservedCharacterInName() { + String spaceName = this.nameFactory.getSpaceName() + "+test"; + + this.cloudFoundryOperations + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organization(this.organizationName) + .build()) + .then( + this.cloudFoundryOperations + .spaces() + .get(GetSpaceRequest.builder().name(spaceName).build())) + .map(SpaceDetail::getName) + .as(StepVerifier::create) + .expectNext(spaceName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + this.cloudFoundryOperations + .spaces() + .list() + .count() + .as(StepVerifier::create) + .consumeNextWith(count -> assertThat(count).isGreaterThan(0)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/StacksTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/StacksTest.java new file mode 100644 index 00000000000..7db823dd955 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/StacksTest.java @@ -0,0 +1,44 @@ +package org.cloudfoundry.operations; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.operations.stacks.GetStackRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +class StacksTest extends AbstractIntegrationTest { + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Autowired private Mono stackName; + + @Test + public void create() { + this.stackName + .flatMap( + name -> + this.cloudFoundryOperations + .stacks() + .get(GetStackRequest.builder().name(name).build())) + .as(StepVerifier::create) + .expectNextMatches( + s -> s.getDescription().contains("Cloud Foundry Linux-based filesystem")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String stackName = this.stackName.block(); + this.cloudFoundryOperations + .stacks() + .list() + .filter(s -> s.getName().equals(stackName)) + .as(StepVerifier::create) + .expectNextMatches( + s -> s.getDescription().startsWith("Cloud Foundry Linux-based filesystem")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/operations/UserAdminTest.java b/integration-test/src/test/java/org/cloudfoundry/operations/UserAdminTest.java new file mode 100644 index 00000000000..b0c12b8ea3f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/operations/UserAdminTest.java @@ -0,0 +1,431 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.operations; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.client.CloudFoundryClient; +import org.cloudfoundry.client.v2.organizations.ListOrganizationAuditorsRequest; +import org.cloudfoundry.client.v2.organizations.ListOrganizationsRequest; +import org.cloudfoundry.client.v2.users.ListUsersRequest; +import org.cloudfoundry.client.v2.users.UserResource; +import org.cloudfoundry.operations.organizations.CreateOrganizationRequest; +import org.cloudfoundry.operations.spaces.CreateSpaceRequest; +import org.cloudfoundry.operations.useradmin.CreateUserRequest; +import org.cloudfoundry.operations.useradmin.DeleteUserRequest; +import org.cloudfoundry.operations.useradmin.ListOrganizationUsersRequest; +import org.cloudfoundry.operations.useradmin.ListSpaceUsersRequest; +import org.cloudfoundry.operations.useradmin.OrganizationRole; +import org.cloudfoundry.operations.useradmin.OrganizationUsers; +import org.cloudfoundry.operations.useradmin.SetOrganizationRoleRequest; +import org.cloudfoundry.operations.useradmin.SetSpaceRoleRequest; +import org.cloudfoundry.operations.useradmin.SpaceRole; +import org.cloudfoundry.operations.useradmin.SpaceUsers; +import org.cloudfoundry.operations.useradmin.UnsetOrganizationRoleRequest; +import org.cloudfoundry.operations.useradmin.UnsetSpaceRoleRequest; +import org.cloudfoundry.util.PaginationUtils; +import org.cloudfoundry.util.ResourceUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class UserAdminTest extends AbstractIntegrationTest { + + @Autowired private CloudFoundryClient cloudFoundryClient; + + @Autowired private CloudFoundryOperations cloudFoundryOperations; + + @Test + public void create() { + String username = this.nameFactory.getUserName(); + + this.cloudFoundryOperations + .userAdmin() + .create( + CreateUserRequest.builder() + .password("test-password") + .username(username) + .build()) + .thenMany(requestListUsers(this.cloudFoundryClient)) + .filter( + response -> + username.equals(ResourceUtils.getEntity(response).getUsername())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createDuplicate() { + String username = this.nameFactory.getUserName(); + + createUser(this.cloudFoundryOperations, username) + .then(createUser(this.cloudFoundryOperations, username)) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("User %s already exists", username)) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String username = this.nameFactory.getUserName(); + + createUser(this.cloudFoundryOperations, username) + .then( + this.cloudFoundryOperations + .userAdmin() + .delete(DeleteUserRequest.builder().username(username).build())) + .thenMany(requestListUsers(this.cloudFoundryClient)) + .filter( + response -> + username.equals(ResourceUtils.getEntity(response).getUsername())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void deleteNotFound() { + this.cloudFoundryOperations + .userAdmin() + .delete(DeleteUserRequest.builder().username("not-found").build()) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(IllegalArgumentException.class) + .hasMessage("User not-found does not exist")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listOrganizationUsers() { + String organizationName = this.nameFactory.getOrganizationName(); + String username = this.nameFactory.getUserName(); + + Mono.when( + createUser(this.cloudFoundryOperations, username), + createOrganization(this.cloudFoundryOperations, organizationName)) + .then( + setOrganizationRole( + this.cloudFoundryOperations, + organizationName, + OrganizationRole.BILLING_MANAGER, + username)) + .then( + this.cloudFoundryOperations + .userAdmin() + .listOrganizationUsers( + ListOrganizationUsersRequest.builder() + .organizationName(organizationName) + .build())) + .flatMapIterable(OrganizationUsers::getBillingManagers) + .as(StepVerifier::create) + .expectNext(username) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listSpaceUsers() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String username = this.nameFactory.getUserName(); + + Mono.when( + createUser(this.cloudFoundryOperations, username), + createOrganization(this.cloudFoundryOperations, organizationName)) + .then(createSpace(this.cloudFoundryOperations, organizationName, spaceName)) + .then( + setSpaceRole( + this.cloudFoundryOperations, + organizationName, + spaceName, + SpaceRole.AUDITOR, + username)) + .then( + this.cloudFoundryOperations + .userAdmin() + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName(organizationName) + .spaceName(spaceName) + .build())) + .flatMapIterable(SpaceUsers::getAuditors) + .as(StepVerifier::create) + .expectNext(username) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setOrganizationUser() { + String organizationName = this.nameFactory.getOrganizationName(); + String username = this.nameFactory.getUserName(); + + Mono.when( + createUser(this.cloudFoundryOperations, username), + createOrganization(this.cloudFoundryOperations, organizationName)) + .then( + this.cloudFoundryOperations + .userAdmin() + .setOrganizationRole( + SetOrganizationRoleRequest.builder() + .organizationName(organizationName) + .organizationRole(OrganizationRole.AUDITOR) + .username(username) + .build())) + .thenMany(getOrganizationId(this.cloudFoundryClient, organizationName)) + .flatMap( + organizationId -> + requestListOrganizationAuditors( + this.cloudFoundryClient, organizationId)) + .map(resource -> ResourceUtils.getEntity(resource).getUsername()) + .as(StepVerifier::create) + .expectNext(username) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void setSpaceUser() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String username = this.nameFactory.getUserName(); + + Mono.when( + createUser(this.cloudFoundryOperations, username), + createOrganization(this.cloudFoundryOperations, organizationName)) + .then(createSpace(this.cloudFoundryOperations, organizationName, spaceName)) + .then( + this.cloudFoundryOperations + .userAdmin() + .setSpaceRole( + SetSpaceRoleRequest.builder() + .organizationName(organizationName) + .spaceName(spaceName) + .spaceRole(SpaceRole.AUDITOR) + .username(username) + .build())) + .thenMany(listSpaceUsers(this.cloudFoundryOperations, organizationName, spaceName)) + .flatMapIterable(SpaceUsers::getAuditors) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unsetOrganizationUser() { + String organizationName = this.nameFactory.getOrganizationName(); + String username = this.nameFactory.getUserName(); + + Mono.when( + createUser(this.cloudFoundryOperations, username), + createOrganization(this.cloudFoundryOperations, organizationName)) + .then( + setOrganizationRole( + this.cloudFoundryOperations, + organizationName, + OrganizationRole.MANAGER, + username)) + .then( + this.cloudFoundryOperations + .userAdmin() + .unsetOrganizationRole( + UnsetOrganizationRoleRequest.builder() + .organizationName(organizationName) + .organizationRole(OrganizationRole.MANAGER) + .username(username) + .build())) + .thenMany(listOrganizationUsers(this.cloudFoundryOperations, organizationName)) + .flatMapIterable(OrganizationUsers::getManagers) + .filter(username::equals) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unsetSpaceUser() { + String organizationName = this.nameFactory.getOrganizationName(); + String spaceName = this.nameFactory.getSpaceName(); + String username = this.nameFactory.getUserName(); + + Mono.when( + createUser(this.cloudFoundryOperations, username), + createOrganization(this.cloudFoundryOperations, organizationName)) + .then(createSpace(this.cloudFoundryOperations, organizationName, spaceName)) + .then( + setSpaceRole( + this.cloudFoundryOperations, + organizationName, + spaceName, + SpaceRole.MANAGER, + username)) + .then( + this.cloudFoundryOperations + .userAdmin() + .unsetSpaceRole( + UnsetSpaceRoleRequest.builder() + .organizationName(organizationName) + .spaceName(spaceName) + .spaceRole(SpaceRole.MANAGER) + .username(username) + .build())) + .thenMany(listSpaceUsers(this.cloudFoundryOperations, organizationName, spaceName)) + .flatMapIterable(SpaceUsers::getManagers) + .filter(username::equals) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createOrganization( + CloudFoundryOperations cloudFoundryOperations, String organizationName) { + return cloudFoundryOperations + .organizations() + .create( + CreateOrganizationRequest.builder() + .organizationName(organizationName) + .build()); + } + + private static Mono createSpace( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + String spaceName) { + return cloudFoundryOperations + .spaces() + .create( + CreateSpaceRequest.builder() + .name(spaceName) + .organization(organizationName) + .build()); + } + + private static Mono createUser( + CloudFoundryOperations cloudFoundryOperations, String username) { + return cloudFoundryOperations + .userAdmin() + .create( + CreateUserRequest.builder() + .password("test-password") + .username(username) + .build()); + } + + private static Mono getOrganizationId( + CloudFoundryClient cloudFoundryClient, String organizationName) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .list( + ListOrganizationsRequest.builder() + .page(page) + .build())) + .filter(r -> organizationName.equals(ResourceUtils.getEntity(r).getName())) + .map(ResourceUtils::getId) + .singleOrEmpty(); + } + + private static Mono listOrganizationUsers( + CloudFoundryOperations cloudFoundryOperations, String organizationName) { + return cloudFoundryOperations + .userAdmin() + .listOrganizationUsers( + ListOrganizationUsersRequest.builder() + .organizationName(organizationName) + .build()); + } + + private static Mono listSpaceUsers( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + String spaceName) { + return cloudFoundryOperations + .userAdmin() + .listSpaceUsers( + ListSpaceUsersRequest.builder() + .organizationName(organizationName) + .spaceName(spaceName) + .build()); + } + + private static Flux requestListOrganizationAuditors( + CloudFoundryClient cloudFoundryClient, String organizationId) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .organizations() + .listAuditors( + ListOrganizationAuditorsRequest.builder() + .organizationId(organizationId) + .page(page) + .build())); + } + + private static Flux requestListUsers(CloudFoundryClient cloudFoundryClient) { + return PaginationUtils.requestClientV2Resources( + page -> + cloudFoundryClient + .users() + .list(ListUsersRequest.builder().page(page).build())); + } + + private static Mono setOrganizationRole( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + OrganizationRole organizationRole, + String username) { + return cloudFoundryOperations + .userAdmin() + .setOrganizationRole( + SetOrganizationRoleRequest.builder() + .organizationName(organizationName) + .organizationRole(organizationRole) + .username(username) + .build()); + } + + private static Mono setSpaceRole( + CloudFoundryOperations cloudFoundryOperations, + String organizationName, + String spaceName, + SpaceRole spaceRole, + String username) { + return cloudFoundryOperations + .userAdmin() + .setSpaceRole( + SetSpaceRoleRequest.builder() + .organizationName(organizationName) + .spaceName(spaceName) + .spaceRole(spaceRole) + .username(username) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/routing/v1/RouterGroupsTest.java b/integration-test/src/test/java/org/cloudfoundry/routing/v1/RouterGroupsTest.java new file mode 100644 index 00000000000..8253f29ad5a --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/routing/v1/RouterGroupsTest.java @@ -0,0 +1,84 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsRequest; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsResponse; +import org.cloudfoundry.routing.v1.routergroups.RouterGroup; +import org.cloudfoundry.routing.v1.routergroups.UpdateRouterGroupRequest; +import org.cloudfoundry.routing.v1.routergroups.UpdateRouterGroupResponse; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class RouterGroupsTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private RoutingClient routingClient; + + @Test + public void list() { + this.routingClient + .routerGroups() + .list(ListRouterGroupsRequest.builder().build()) + .flatMapIterable(ListRouterGroupsResponse::getRouterGroups) + .map(RouterGroup::getName) + .filter(DEFAULT_ROUTER_GROUP::equals) + .as(StepVerifier::create) + .expectNext(DEFAULT_ROUTER_GROUP) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + getRouterGroupId(this.routingClient, DEFAULT_ROUTER_GROUP) + .flatMap( + routerGroupId -> + this.routingClient + .routerGroups() + .update( + UpdateRouterGroupRequest.builder() + .reservablePorts("1025-1122") + .routerGroupId(routerGroupId) + .build())) + .map(UpdateRouterGroupResponse::getReservablePorts) + .as(StepVerifier::create) + .expectNext("1025-1122") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getRouterGroupId( + RoutingClient routingClient, String routerGroupName) { + return requestListRouterGroups(routingClient) + .flatMapIterable(ListRouterGroupsResponse::getRouterGroups) + .filter(group -> routerGroupName.equals(group.getName())) + .single() + .map(RouterGroup::getRouterGroupId); + } + + private static Mono requestListRouterGroups( + RoutingClient routingClient) { + return routingClient.routerGroups().list(ListRouterGroupsRequest.builder().build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java new file mode 100644 index 00000000000..a562fa42232 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/routing/v1/TcpRoutesTest.java @@ -0,0 +1,237 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.routing.v1; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.NameFactory; +import org.cloudfoundry.routing.RoutingClient; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsRequest; +import org.cloudfoundry.routing.v1.routergroups.ListRouterGroupsResponse; +import org.cloudfoundry.routing.v1.routergroups.RouterGroup; +import org.cloudfoundry.routing.v1.tcproutes.CreateTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.CreateTcpRoutesResponse; +import org.cloudfoundry.routing.v1.tcproutes.DeleteTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.EventsRequest; +import org.cloudfoundry.routing.v1.tcproutes.ListTcpRoutesRequest; +import org.cloudfoundry.routing.v1.tcproutes.ListTcpRoutesResponse; +import org.cloudfoundry.routing.v1.tcproutes.TcpRoute; +import org.cloudfoundry.routing.v1.tcproutes.TcpRouteConfiguration; +import org.cloudfoundry.routing.v1.tcproutes.TcpRouteDeletion; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; +import reactor.util.retry.Retry; + +public final class TcpRoutesTest extends AbstractIntegrationTest { + + private static final String DEFAULT_ROUTER_GROUP = "default-tcp"; + + @Autowired private NameFactory nameFactory; + + @Autowired private RoutingClient routingClient; + + @Test + public void create() { + String backendIp = this.nameFactory.getIpAddress(); + Integer backendPort = this.nameFactory.getPort(); + Integer port = this.nameFactory.getPort(); + + getRouterGroupId(this.routingClient, DEFAULT_ROUTER_GROUP) + .flatMap( + routerGroupId -> + this.routingClient + .tcpRoutes() + .create( + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp(backendIp) + .backendPort(backendPort) + .port(port) + .routerGroupId( + routerGroupId) + .ttl(59) + .build()) + .build())) + .then(requestListTcpRoutes(this.routingClient)) + .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) + .filter(route -> backendIp.equals(route.getBackendIp())) + .filter(route -> backendPort.equals(route.getBackendPort())) + .map(TcpRoute::getPort) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String backendIp = this.nameFactory.getIpAddress(); + Integer backendPort = this.nameFactory.getPort(); + Integer port = this.nameFactory.getPort(); + + getRouterGroupId(this.routingClient, DEFAULT_ROUTER_GROUP) + .delayUntil( + routerGroupId -> + createTcpRoute( + this.routingClient, + backendIp, + backendPort, + port, + routerGroupId)) + .flatMap( + routerGroupId -> + this.routingClient + .tcpRoutes() + .delete( + DeleteTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteDeletion.builder() + .backendIp(backendIp) + .backendPort(backendPort) + .port(port) + .routerGroupId( + routerGroupId) + .build()) + .build())) + .thenMany( + requestListTcpRoutes(this.routingClient) + .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) + .filter(route -> backendIp.equals(route.getBackendIp())) + .filter(route -> backendPort.equals(route.getBackendPort())) + .filter(route -> port.equals(route.getPort())) + .flatMap( + e -> + !"".equals(e.getBackendIp()) + ? Flux.error( + new RuntimeException( + "route still found")) + : Flux.just(e)) + .retryWhen( + Retry.indefinitely() + .filter( + e -> + "route still found" + .equals(e.getMessage())))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void events() { + String backendIp = this.nameFactory.getIpAddress(); + Integer backendPort = this.nameFactory.getPort(); + Integer port = this.nameFactory.getPort(); + + Flux.firstWithSignal( + getRouterGroupId(this.routingClient, DEFAULT_ROUTER_GROUP) + .flatMapMany( + routerGroupId -> + Flux.interval(Duration.ofMillis(500)) + .flatMap( + i -> + createTcpRoute( + this.routingClient, + backendIp, + backendPort, + port, + routerGroupId))) + .then(), + this.routingClient + .tcpRoutes() + .events(EventsRequest.builder().build()) + .filter( + event -> + event.getBackendIp().equals(backendIp) + && event.getBackendPort() + .equals(backendPort) + && event.getPort().equals(port)) + .take(1)) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String backendIp = this.nameFactory.getIpAddress(); + Integer backendPort = this.nameFactory.getPort(); + Integer port = this.nameFactory.getPort(); + + getRouterGroupId(this.routingClient, DEFAULT_ROUTER_GROUP) + .flatMap( + routerGroupId -> + createTcpRoute( + this.routingClient, + backendIp, + backendPort, + port, + routerGroupId)) + .then(this.routingClient.tcpRoutes().list(ListTcpRoutesRequest.builder().build())) + .flatMapIterable(ListTcpRoutesResponse::getTcpRoutes) + .filter(route -> backendIp.equals(route.getBackendIp())) + .map(TcpRoute::getPort) + .as(StepVerifier::create) + .expectNext(port) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createTcpRoute( + RoutingClient routingClient, + String backendIp, + Integer backendPort, + Integer port, + String routerGroupId) { + return routingClient + .tcpRoutes() + .create( + CreateTcpRoutesRequest.builder() + .tcpRoute( + TcpRouteConfiguration.builder() + .backendIp(backendIp) + .backendPort(backendPort) + .port(port) + .routerGroupId(routerGroupId) + .ttl(59) + .build()) + .build()); + } + + private static Mono getRouterGroupId( + RoutingClient routingClient, String routerGroupName) { + return requestListRouterGroups(routingClient) + .flatMapIterable(ListRouterGroupsResponse::getRouterGroups) + .filter(group -> routerGroupName.equals(group.getName())) + .single() + .map(RouterGroup::getRouterGroupId); + } + + private static Mono requestListRouterGroups( + RoutingClient routingClient) { + return routingClient.routerGroups().list(ListRouterGroupsRequest.builder().build()); + } + + private static Mono requestListTcpRoutes(RoutingClient routingClient) { + return routingClient.tcpRoutes().list(ListTcpRoutesRequest.builder().build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/AuthorizationsTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/AuthorizationsTest.java new file mode 100644 index 00000000000..6480aef0b9c --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/AuthorizationsTest.java @@ -0,0 +1,166 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantApiRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantBrowserRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantHybridRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByImplicitGrantBrowserRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithAuthorizationCodeGrantRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithIdTokenRequest; +import org.cloudfoundry.uaa.authorizations.AuthorizeByOpenIdWithImplicitGrantRequest; +import org.cloudfoundry.uaa.authorizations.GetOpenIdProviderConfigurationRequest; +import org.cloudfoundry.uaa.authorizations.GetOpenIdProviderConfigurationResponse; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.test.StepVerifier; + +public final class AuthorizationsTest extends AbstractIntegrationTest { + + @Autowired private String clientId; + + @Autowired private UaaClient uaaClient; + + @Test + public void authorizeByAuthorizationCodeGrantApi() { + this.uaaClient + .authorizations() + .authorizationCodeGrantApi( + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .clientId(this.clientId) + .build()) + .as(StepVerifier::create) + .consumeNextWith(actual -> assertThat(actual.length()).isGreaterThanOrEqualTo(6)) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void authorizeByAuthorizationCodeGrantBrowser() { + this.uaaClient + .authorizations() + .authorizationCodeGrantBrowser( + AuthorizeByAuthorizationCodeGrantBrowserRequest.builder() + .clientId(this.clientId) + .redirectUri("http://redirect.to/app") + .build()) + .as(StepVerifier::create) + .consumeNextWith(startsWithExpectation("https://uaa.")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void authorizeByAuthorizationCodeGrantHybrid() { + this.uaaClient + .authorizations() + .authorizationCodeGrantHybrid( + AuthorizeByAuthorizationCodeGrantHybridRequest.builder() + .clientId(this.clientId) + .redirectUri("http://redirect.to/app") + .build()) + .as(StepVerifier::create) + .consumeNextWith(startsWithExpectation("https://uaa.")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void authorizeByImplicitGrantBrowser() { + this.uaaClient + .authorizations() + .implicitGrantBrowser( + AuthorizeByImplicitGrantBrowserRequest.builder() + .clientId(this.clientId) + .redirectUri("http://redirect.to/app") + .build()) + .as(StepVerifier::create) + .consumeNextWith(startsWithExpectation("https://uaa.")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void authorizeByOpenIdWithAuthorizationCodeGrant() { + this.uaaClient + .authorizations() + .openIdWithAuthorizationCodeAndIdToken( + AuthorizeByOpenIdWithAuthorizationCodeGrantRequest.builder() + .clientId("app") + .redirectUri("http://redirect.to/app") + .scope("openid") + .build()) + .as(StepVerifier::create) + .consumeNextWith(startsWithExpectation("https://uaa.")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void authorizeByOpenIdWithIdToken() { + this.uaaClient + .authorizations() + .openIdWithIdToken( + AuthorizeByOpenIdWithIdTokenRequest.builder() + .clientId("app") + .redirectUri("http://redirect.to/app") + .scope("open-id") + .build()) + .as(StepVerifier::create) + .consumeNextWith(startsWithExpectation("https://uaa.")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void authorizeByOpenIdWithImplicitGrant() { + this.uaaClient + .authorizations() + .openIdWithTokenAndIdToken( + AuthorizeByOpenIdWithImplicitGrantRequest.builder() + .clientId("app") + .redirectUri("http://redirect.to/app") + .scope("openid") + .build()) + .as(StepVerifier::create) + .consumeNextWith(startsWithExpectation("https://uaa.")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void openIdProviderConfiguration() { + this.uaaClient + .authorizations() + .getOpenIdProviderConfiguration( + GetOpenIdProviderConfigurationRequest.builder().build()) + .map(GetOpenIdProviderConfigurationResponse::getServiceDocumentation) + .as(StepVerifier::create) + .expectNext("http://docs.cloudfoundry.org/api/uaa/") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Consumer startsWithExpectation(String prefix) { + return actual -> assertThat(actual).startsWith(prefix); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/ClientsTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/ClientsTest.java new file mode 100644 index 00000000000..4b52e9e1a6b --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/ClientsTest.java @@ -0,0 +1,595 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.uaa.tokens.GrantType.CLIENT_CREDENTIALS; +import static org.cloudfoundry.uaa.tokens.GrantType.IMPLICIT; +import static org.cloudfoundry.uaa.tokens.GrantType.PASSWORD; +import static org.cloudfoundry.uaa.tokens.GrantType.REFRESH_TOKEN; + +import io.netty.util.AsciiString; +import java.time.Duration; +import java.util.Base64; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.uaa.clients.BatchChangeSecretRequest; +import org.cloudfoundry.uaa.clients.BatchChangeSecretResponse; +import org.cloudfoundry.uaa.clients.BatchCreateClientsRequest; +import org.cloudfoundry.uaa.clients.BatchCreateClientsResponse; +import org.cloudfoundry.uaa.clients.BatchDeleteClientsRequest; +import org.cloudfoundry.uaa.clients.BatchUpdateClientsRequest; +import org.cloudfoundry.uaa.clients.BatchUpdateClientsResponse; +import org.cloudfoundry.uaa.clients.ChangeSecret; +import org.cloudfoundry.uaa.clients.ChangeSecretRequest; +import org.cloudfoundry.uaa.clients.Client; +import org.cloudfoundry.uaa.clients.CreateClient; +import org.cloudfoundry.uaa.clients.CreateClientAction; +import org.cloudfoundry.uaa.clients.CreateClientRequest; +import org.cloudfoundry.uaa.clients.CreateClientResponse; +import org.cloudfoundry.uaa.clients.DeleteClientAction; +import org.cloudfoundry.uaa.clients.DeleteClientRequest; +import org.cloudfoundry.uaa.clients.GetClientRequest; +import org.cloudfoundry.uaa.clients.GetMetadataRequest; +import org.cloudfoundry.uaa.clients.GetMetadataResponse; +import org.cloudfoundry.uaa.clients.ListClientsRequest; +import org.cloudfoundry.uaa.clients.ListMetadatasRequest; +import org.cloudfoundry.uaa.clients.ListMetadatasResponse; +import org.cloudfoundry.uaa.clients.MixedActionsRequest; +import org.cloudfoundry.uaa.clients.UpdateClient; +import org.cloudfoundry.uaa.clients.UpdateClientAction; +import org.cloudfoundry.uaa.clients.UpdateClientRequest; +import org.cloudfoundry.uaa.clients.UpdateMetadataRequest; +import org.cloudfoundry.uaa.clients.UpdateMetadataResponse; +import org.cloudfoundry.uaa.clients.UpdateSecretAction; +import org.cloudfoundry.uaa.clients.UpdateSecretClientAction; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class ClientsTest extends AbstractIntegrationTest { + + @Autowired private String clientId; + + @Autowired private UaaClient uaaClient; + + @Test + public void batchChangeSecret() { + String clientId1 = this.nameFactory.getClientId(); + String clientId2 = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + String newClientSecret1 = this.nameFactory.getClientSecret(); + String newClientSecret2 = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId1, clientSecret) + .then(requestCreateClient(this.uaaClient, clientId2, clientSecret)) + .then( + this.uaaClient + .clients() + .batchChangeSecret( + BatchChangeSecretRequest.builder() + .changeSecrets( + ChangeSecret.builder() + .clientId(clientId1) + .oldSecret(clientSecret) + .secret(newClientSecret1) + .build(), + ChangeSecret.builder() + .clientId(clientId2) + .oldSecret(clientSecret) + .secret(newClientSecret2) + .build()) + .build())) + .flatMapIterable(BatchChangeSecretResponse::getClients) + .as(StepVerifier::create) + .expectNextCount(2) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void batchCreate() { + String clientId1 = this.nameFactory.getClientId(); + String clientId2 = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + this.uaaClient + .clients() + .batchCreate( + BatchCreateClientsRequest.builder() + .client( + CreateClient.builder() + .approvalsDeleted(true) + .authorizedGrantType(PASSWORD) + .clientId(clientId1) + .clientSecret(clientSecret) + .scopes("client.read", "client.write") + .tokenSalt("test-token-salt") + .build()) + .client( + CreateClient.builder() + .approvalsDeleted(true) + .authorizedGrantTypes(PASSWORD, REFRESH_TOKEN) + .clientId(clientId2) + .clientSecret(clientSecret) + .scope("client.write") + .tokenSalt("filtered-test-token-salt") + .build()) + .build()) + .flatMapIterable(BatchCreateClientsResponse::getClients) + .filter(client -> clientId1.equals(client.getClientId())) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getAuthorizedGrantTypes()) + .containsExactly(PASSWORD, REFRESH_TOKEN); + assertThat(response.getClientId()).isEqualTo(clientId1); + assertThat(response.getScopes()) + .containsExactly("client.read", "client.write"); + assertThat(response.getTokenSalt()).isEqualTo("test-token-salt"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void batchDelete() { + String clientId1 = this.nameFactory.getClientId(); + String clientId2 = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + batchCreateClients(this.uaaClient, clientId1, clientId2, clientSecret) + .flatMapIterable(BatchCreateClientsResponse::getClients) + .map(Client::getClientId) + .collectList() + .flatMap( + clientIds -> + this.uaaClient + .clients() + .batchDelete( + BatchDeleteClientsRequest.builder() + .clientIds(clientIds) + .build())) + .thenMany(requestListClients(this.uaaClient)) + .filter( + client -> + clientId1.equals(client.getClientId()) + || clientId2.equals(client.getClientId())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void batchUpdate() { + String clientId1 = this.nameFactory.getClientId(); + String clientId2 = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId1, clientSecret) + .then(requestCreateClient(this.uaaClient, clientId2, clientSecret)) + .then( + this.uaaClient + .clients() + .batchUpdate( + BatchUpdateClientsRequest.builder() + .clients( + UpdateClient.builder() + .authorizedGrantTypes( + CLIENT_CREDENTIALS, + IMPLICIT) + .clientId(clientId1) + .name("test-name") + .scopes( + "client.read", + "client.write") + .redirectUriPattern( + "https://test.com/*") + .tokenSalt("test-token-salt") + .build(), + UpdateClient.builder() + .authorizedGrantType(PASSWORD) + .clientId(clientId2) + .name("filtered-test-name") + .scope("client.write") + .tokenSalt( + "filtered-test-token-salt") + .build()) + .build())) + .flatMapIterable(BatchUpdateClientsResponse::getClients) + .filter(client -> clientId1.equals(client.getClientId())) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getAuthorizedGrantTypes()) + .containsExactly(IMPLICIT, CLIENT_CREDENTIALS); + assertThat(response.getClientId()).isEqualTo(clientId1); + assertThat(response.getName()).isEqualTo("test-name"); + assertThat(response.getScopes()) + .containsExactly("client.read", "client.write"); + assertThat(response.getTokenSalt()).isEqualTo("test-token-salt"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(lessThan = CloudFoundryVersion.PCF_2_8) + @Test + public void changeSecret27() { + String clientId = this.nameFactory.getClientId(); + String newClientSecret = this.nameFactory.getClientSecret(); + String oldClientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId, oldClientSecret) + .then( + this.uaaClient + .clients() + .changeSecret( + ChangeSecretRequest.builder() + .clientId(clientId) + .oldSecret(oldClientSecret) + .secret(newClientSecret) + .build())) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UaaException.class) + .hasMessage( + "invalid_client: Only a client can change client" + + " secret")) + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_2_8) + @Test + public void changeSecret28() { + String clientId = this.nameFactory.getClientId(); + String newClientSecret = this.nameFactory.getClientSecret(); + String oldClientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId, oldClientSecret) + .then( + this.uaaClient + .clients() + .changeSecret( + ChangeSecretRequest.builder() + .clientId(clientId) + .oldSecret(oldClientSecret) + .secret(newClientSecret) + .build())) + .as(StepVerifier::create) + .assertNext( + response -> { + assertThat(response.getMessage()).isEqualTo("secret updated"); + assertThat(response.getStatus()).isEqualTo("ok"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String clientId = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + this.uaaClient + .clients() + .create( + CreateClientRequest.builder() + .approvalsDeleted(true) + .authorizedGrantType(PASSWORD) + .clientId(clientId) + .clientSecret(clientSecret) + .scopes("client.read", "client.write") + .tokenSalt("test-token-salt") + .build()) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getAuthorizedGrantTypes()) + .containsExactly(PASSWORD, REFRESH_TOKEN); + assertThat(response.getClientId()).isEqualTo(clientId); + assertThat(response.getScopes()) + .containsExactly("client.read", "client.write"); + assertThat(response.getTokenSalt()).isEqualTo("test-token-salt"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String clientId = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId, clientSecret) + .then( + this.uaaClient + .clients() + .delete(DeleteClientRequest.builder().clientId(clientId).build())) + .thenMany(requestListClients(this.uaaClient)) + .filter(client -> clientId.equals(client.getClientId())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String clientId = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId, clientSecret) + .then( + this.uaaClient + .clients() + .get(GetClientRequest.builder().clientId(clientId).build())) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getAuthorizedGrantTypes()) + .containsExactly(PASSWORD, REFRESH_TOKEN); + assertThat(response.getClientId()).isEqualTo(clientId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getMetadata() { + requestUpdateMetadata(this.uaaClient, this.clientId, "http://test.get.url") + .then( + this.uaaClient + .clients() + .getMetadata( + GetMetadataRequest.builder() + .clientId(this.clientId) + .build())) + .as(StepVerifier::create) + .consumeNextWith( + metadata -> { + assertThat(metadata.getAppLaunchUrl()).isEqualTo("http://test.get.url"); + assertThat(metadata.getClientId()).isEqualTo(this.clientId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String clientId = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId, clientSecret) + .thenMany( + PaginationUtils.requestUaaResources( + startIndex -> + this.uaaClient + .clients() + .list( + ListClientsRequest.builder() + .startIndex(startIndex) + .build()))) + .filter(client -> clientId.equals(client.getClientId())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listMetadatas() { + requestUpdateMetadata(this.uaaClient, this.clientId, "http://test.list.url") + .then( + this.uaaClient + .clients() + .listMetadatas(ListMetadatasRequest.builder().build())) + .flatMapIterable(ListMetadatasResponse::getMetadatas) + .filter(metadata -> this.clientId.equals(metadata.getClientId())) + .single() + .as(StepVerifier::create) + .consumeNextWith( + metadata -> { + assertThat(metadata.getAppLaunchUrl()) + .isEqualTo("http://test.list.url"); + assertThat(metadata.getClientId()).isEqualTo(this.clientId); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void mixedActions() { + String clientId1 = this.nameFactory.getClientId(); + String clientId2 = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + String newClientSecret = this.nameFactory.getClientSecret(); + + this.uaaClient + .clients() + .mixedActions( + MixedActionsRequest.builder() + .action( + CreateClientAction.builder() + .authorizedGrantType(PASSWORD) + .clientId(clientId1) + .clientSecret(clientSecret) + .name("test-name-old") + .build()) + .action( + CreateClientAction.builder() + .authorizedGrantType(PASSWORD) + .clientId(clientId2) + .clientSecret(clientSecret) + .build()) + .action( + UpdateClientAction.builder() + .authorizedGrantType(PASSWORD) + .clientId(clientId1) + .name("test-name-temporary") + .build()) + .action( + UpdateSecretAction.builder() + .clientId(clientId2) + .secret(newClientSecret) + .build()) + .action(DeleteClientAction.builder().clientId(clientId2).build()) + .action( + UpdateSecretClientAction.builder() + .authorizedGrantType(PASSWORD) + .name("test-name-new") + .clientId(clientId1) + .secret(newClientSecret) + .build()) + .build()) + .thenMany(requestListClients(this.uaaClient)) + .filter(client -> clientId1.equals(client.getClientId())) + .as(StepVerifier::create) + .consumeNextWith(client -> assertThat(client.getName()).isEqualTo("test-name-new")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String clientId = this.nameFactory.getClientId(); + String clientSecret = this.nameFactory.getClientSecret(); + + requestCreateClient(this.uaaClient, clientId, clientSecret) + .then( + this.uaaClient + .clients() + .update( + UpdateClientRequest.builder() + .authorizedGrantType(CLIENT_CREDENTIALS) + .clientId(clientId) + .name("test-name") + .build())) + .thenMany(requestListClients(this.uaaClient)) + .filter(client -> clientId.equals(client.getClientId())) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getAuthorizedGrantTypes()) + .containsExactly(CLIENT_CREDENTIALS); + assertThat(response.getClientId()).isEqualTo(clientId); + assertThat(response.getName()).isEqualTo("test-name"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void updateMetadata() { + String appIcon = + Base64.getEncoder().encodeToString(new AsciiString("test-image").toByteArray()); + + this.uaaClient + .clients() + .updateMetadata( + UpdateMetadataRequest.builder() + .appIcon(appIcon) + .appLaunchUrl("http://test.app.launch.url") + .clientId(this.clientId) + .showOnHomePage(true) + .clientName("test-name") + .build()) + .then(requestGetMetadata(this.uaaClient, this.clientId)) + .as(StepVerifier::create) + .consumeNextWith( + metadata -> { + assertThat(metadata.getAppIcon()).isEqualTo(appIcon); + assertThat(metadata.getAppLaunchUrl()) + .isEqualTo("http://test.app.launch.url"); + assertThat(metadata.getClientId()).isEqualTo(this.clientId); + assertThat(metadata.getClientName()).isEqualTo("test-name"); + assertThat(metadata.getShowOnHomePage()).isTrue(); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono batchCreateClients( + UaaClient uaaClient, String clientId1, String clientId2, String clientSecret) { + return uaaClient + .clients() + .batchCreate( + BatchCreateClientsRequest.builder() + .client( + CreateClient.builder() + .approvalsDeleted(true) + .authorizedGrantType(PASSWORD) + .clientId(clientId1) + .clientSecret(clientSecret) + .scopes("client.read", "client.write") + .tokenSalt("test-token-salt") + .build()) + .client( + CreateClient.builder() + .approvalsDeleted(true) + .authorizedGrantTypes(PASSWORD, REFRESH_TOKEN) + .clientId(clientId2) + .clientSecret(clientSecret) + .scope("client.write") + .tokenSalt("alternate-test-token-salt") + .build()) + .build()); + } + + private static Mono requestCreateClient( + UaaClient uaaClient, String clientId, String clientSecret) { + return uaaClient + .clients() + .create( + CreateClientRequest.builder() + .authorizedGrantType(PASSWORD) + .clientId(clientId) + .clientSecret(clientSecret) + .build()); + } + + private static Mono requestGetMetadata( + UaaClient uaaClient, String clientId) { + return uaaClient + .clients() + .getMetadata(GetMetadataRequest.builder().clientId(clientId).build()); + } + + private static Flux requestListClients(UaaClient uaaClient) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .clients() + .list(ListClientsRequest.builder().startIndex(startIndex).build())); + } + + private static Mono requestUpdateMetadata( + UaaClient uaaClient, String clientId, String appLaunchUrl) { + return uaaClient + .clients() + .updateMetadata( + UpdateMetadataRequest.builder() + .appLaunchUrl(appLaunchUrl) + .clientId(clientId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/GroupsTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/GroupsTest.java new file mode 100644 index 00000000000..99cf6d503f6 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/GroupsTest.java @@ -0,0 +1,608 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; +import static org.cloudfoundry.util.tuple.TupleUtils.consumer; +import static org.cloudfoundry.util.tuple.TupleUtils.function; + +import java.time.Duration; +import java.util.Optional; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.uaa.groups.AddMemberRequest; +import org.cloudfoundry.uaa.groups.CheckMembershipRequest; +import org.cloudfoundry.uaa.groups.CreateGroupRequest; +import org.cloudfoundry.uaa.groups.CreateGroupResponse; +import org.cloudfoundry.uaa.groups.DeleteGroupRequest; +import org.cloudfoundry.uaa.groups.DeleteGroupResponse; +import org.cloudfoundry.uaa.groups.ExternalGroupResource; +import org.cloudfoundry.uaa.groups.GetGroupRequest; +import org.cloudfoundry.uaa.groups.GetGroupResponse; +import org.cloudfoundry.uaa.groups.Group; +import org.cloudfoundry.uaa.groups.ListExternalGroupMappingsRequest; +import org.cloudfoundry.uaa.groups.ListGroupsRequest; +import org.cloudfoundry.uaa.groups.ListMembersRequest; +import org.cloudfoundry.uaa.groups.ListMembersResponse; +import org.cloudfoundry.uaa.groups.MapExternalGroupRequest; +import org.cloudfoundry.uaa.groups.MapExternalGroupResponse; +import org.cloudfoundry.uaa.groups.Member; +import org.cloudfoundry.uaa.groups.MemberSummary; +import org.cloudfoundry.uaa.groups.MemberType; +import org.cloudfoundry.uaa.groups.RemoveMemberRequest; +import org.cloudfoundry.uaa.groups.RemoveMemberResponse; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupDisplayNameRequest; +import org.cloudfoundry.uaa.groups.UnmapExternalGroupByGroupIdRequest; +import org.cloudfoundry.uaa.groups.UpdateGroupRequest; +import org.cloudfoundry.uaa.groups.UserEntity; +import org.cloudfoundry.uaa.users.CreateUserRequest; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.util.PaginationUtils; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class GroupsTest extends AbstractIntegrationTest { + + @Autowired private UaaClient uaaClient; + + @Test + public void addMemberGroup() { + String baseDisplayName = this.nameFactory.getGroupName(); + String memberDisplayName = this.nameFactory.getGroupName(); + + Mono.zip( + createGroupId(this.uaaClient, baseDisplayName), + createGroupId(this.uaaClient, memberDisplayName)) + .flatMap( + function( + (baseGroupId, memberGroupId) -> + Mono.zip( + this.uaaClient + .groups() + .addMember( + AddMemberRequest.builder() + .groupId(baseGroupId) + .origin( + memberDisplayName + + "-origin") + .type(MemberType.GROUP) + .memberId(memberGroupId) + .build()), + Mono.just(memberGroupId)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (response, memberGroupId) -> { + assertThat(response.getMemberId()).isEqualTo(memberGroupId); + assertThat(response.getOrigin()) + .isEqualTo( + Optional.of( + String.format( + "%s-origin", + memberDisplayName))); + assertThat(response.getType()) + .isEqualTo(Optional.of(MemberType.GROUP)); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void addMemberUser() { + String displayName = this.nameFactory.getGroupName(); + String userName = this.nameFactory.getUserName(); + + Mono.zip(createGroupId(this.uaaClient, displayName), createUserId(this.uaaClient, userName)) + .flatMap( + function( + (groupId, userId) -> + Mono.zip( + this.uaaClient + .groups() + .addMember( + AddMemberRequest.builder() + .groupId(groupId) + .origin( + userName + + "-origin") + .type(MemberType.USER) + .memberId(userId) + .build()), + Mono.just(userId)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (response, userId) -> { + assertThat(response.getMemberId()).isEqualTo(userId); + assertThat(response.getOrigin()) + .isEqualTo( + Optional.of( + String.format("%s-origin", userName))); + assertThat(response.getType()) + .isEqualTo(Optional.of(MemberType.USER)); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void checkMembership() { + String displayName = this.nameFactory.getGroupName(); + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + Mono.zip( + createGroupIdWithMember( + this.uaaClient, displayName, userId), + Mono.just(userId))) + .flatMap( + function( + (groupId, userId) -> + Mono.zip( + this.uaaClient + .groups() + .checkMembership( + CheckMembershipRequest.builder() + .groupId(groupId) + .memberId(userId) + .build()), + Mono.just(userId)))) + .as(StepVerifier::create) + .consumeNextWith( + consumer( + (response, userId) -> { + assertThat(response.getMemberId()).isEqualTo(userId); + assertThat(response.getOrigin()) + .isEqualTo(Optional.of("test-origin")); + assertThat(response.getType()) + .isEqualTo(Optional.of(MemberType.USER)); + })) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String displayName = this.nameFactory.getGroupName(); + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .groups() + .create( + CreateGroupRequest.builder() + .displayName(displayName) + .member( + MemberSummary.builder() + .memberId(userId) + .build()) + .build())) + .then( + requestList(this.uaaClient) + .filter(resource -> displayName.equals(resource.getDisplayName())) + .single()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .flatMap( + groupId -> + this.uaaClient + .groups() + .delete( + DeleteGroupRequest.builder() + .groupId(groupId) + .build())) + .map(DeleteGroupResponse::getDisplayName) + .as(StepVerifier::create) + .expectNext(displayName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .flatMap( + groupId -> + this.uaaClient + .groups() + .get(GetGroupRequest.builder().groupId(groupId).build()) + .map(GetGroupResponse::getDisplayName)) + .as(StepVerifier::create) + .expectNext(displayName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .flatMap( + groupId -> + PaginationUtils.requestUaaResources( + startIndex -> + this.uaaClient + .groups() + .list( + ListGroupsRequest.builder() + .filter( + String + .format( + "id eq" + + " \"%s\"", + groupId)) + .startIndex( + startIndex) + .build())) + .single()) + .map(Group::getDisplayName) + .as(StepVerifier::create) + .expectNext(displayName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listExternalGroupMappings() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .flatMap( + groupId -> + requestMapExternalGroupResponse( + this.uaaClient, displayName, groupId)) + .thenMany( + PaginationUtils.requestUaaResources( + startIndex -> + this.uaaClient + .groups() + .listExternalGroupMappings( + ListExternalGroupMappingsRequest + .builder() + .startIndex(startIndex) + .build())) + .filter(group -> displayName.equals(group.getDisplayName()))) + .map(ExternalGroupResource::getExternalGroup) + .as(StepVerifier::create) + .expectNext(displayName + "-external-group") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listMembers() { + String displayName = this.nameFactory.getGroupName(); + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + Mono.zip( + createGroupIdWithMember( + this.uaaClient, displayName, userId), + Mono.just(userId))) + .flatMap( + function( + (groupId, userId) -> + Mono.zip( + this.uaaClient + .groups() + .listMembers( + ListMembersRequest.builder() + .groupId(groupId) + .returnEntities(false) + .build()) + .flatMapIterable( + ListMembersResponse::getMembers) + .map(Member::getMemberId) + .single(), + Mono.just(userId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listMembersWithEntity() { + String displayName = this.nameFactory.getGroupName(); + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap(userId -> createGroupIdWithMember(this.uaaClient, displayName, userId)) + .flatMapMany( + groupId -> + this.uaaClient + .groups() + .listMembers( + ListMembersRequest.builder() + .groupId(groupId) + .returnEntities(true) + .build())) + .flatMapIterable(ListMembersResponse::getMembers) + .map(Member::getEntity) + .map(Optional::get) + .cast(UserEntity.class) + .single() + .map(UserEntity::getUserName) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void mapExternalGroupMappings() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .flatMap( + groupId -> + this.uaaClient + .groups() + .mapExternalGroup( + MapExternalGroupRequest.builder() + .externalGroup( + displayName + "-external-group") + .groupId(groupId) + .origin(displayName + "-origin") + .build())) + .thenMany( + requestListExternalGroupResource(this.uaaClient) + .filter(group -> displayName.equals(group.getDisplayName()))) + .as(StepVerifier::create) + .consumeNextWith( + resource -> { + assertThat(resource.getExternalGroup()) + .isEqualTo(String.format("%s-external-group", displayName)); + assertThat(resource.getOrigin()) + .isEqualTo(String.format("%s-origin", displayName)); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void removeMember() { + String displayName = this.nameFactory.getGroupName(); + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + Mono.zip( + createGroupIdWithMember( + this.uaaClient, displayName, userId), + Mono.just(userId))) + .flatMap( + function( + (groupId, userId) -> + Mono.zip( + this.uaaClient + .groups() + .removeMember( + RemoveMemberRequest.builder() + .groupId(groupId) + .memberId(userId) + .build()) + .map(RemoveMemberResponse::getMemberId), + Mono.just(userId)))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unmapExternalGroupMappingsByGroupDisplayName() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .flatMap( + groupId -> + requestMapExternalGroupResponse( + this.uaaClient, displayName, groupId)) + .then( + this.uaaClient + .groups() + .unmapExternalGroupByGroupDisplayName( + UnmapExternalGroupByGroupDisplayNameRequest.builder() + .groupDisplayName(displayName) + .externalGroup(displayName + "-external-group") + .origin(displayName + "-origin") + .build())) + .thenMany(requestListExternalGroupResources(this.uaaClient)) + .filter(resource -> displayName.equals(resource.getDisplayName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void unmapExternalGroupMappingsByGroupId() { + String displayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, displayName) + .delayUntil( + groupId -> + requestMapExternalGroupResponse( + this.uaaClient, displayName, groupId)) + .flatMap( + groupId -> + this.uaaClient + .groups() + .unmapExternalGroupByGroupId( + UnmapExternalGroupByGroupIdRequest.builder() + .groupId(groupId) + .externalGroup( + displayName + "-external-group") + .origin(displayName + "-origin") + .build())) + .thenMany( + requestListExternalGroupResources(this.uaaClient) + .filter(resource -> displayName.equals(resource.getDisplayName()))) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String baseDisplayName = this.nameFactory.getGroupName(); + String newDisplayName = this.nameFactory.getGroupName(); + + createGroupId(this.uaaClient, baseDisplayName) + .flatMap( + groupId -> + this.uaaClient + .groups() + .update( + UpdateGroupRequest.builder() + .displayName(newDisplayName) + .groupId(groupId) + .version("*") + .build())) + .then( + requestList(this.uaaClient) + .filter( + resource -> + newDisplayName.equals(resource.getDisplayName())) + .single()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createGroupId(UaaClient uaaClient, String displayName) { + return requestCreateGroup(uaaClient, displayName).map(CreateGroupResponse::getId); + } + + private static Mono createGroupIdWithMember( + UaaClient uaaClient, String displayName, String userId) { + return requestCreateGroupWithMember(uaaClient, displayName, userId) + .map(CreateGroupResponse::getId); + } + + private static Mono createUserId(UaaClient uaaClient, String userName) { + return requestCreateUser(uaaClient, userName).map(CreateUserResponse::getId); + } + + private static Mono requestCreateGroup( + UaaClient uaaClient, String displayName) { + return uaaClient + .groups() + .create(CreateGroupRequest.builder().displayName(displayName).build()); + } + + private static Mono requestCreateGroupWithMember( + UaaClient uaaClient, String displayName, String userId) { + return uaaClient + .groups() + .create( + CreateGroupRequest.builder() + .displayName(displayName) + .member( + MemberSummary.builder() + .memberId(userId) + .origin("test-origin") + .type(MemberType.USER) + .build()) + .build()); + } + + private static Mono requestCreateUser( + UaaClient uaaClient, String userName) { + return uaaClient + .users() + .create( + CreateUserRequest.builder() + .email(Email.builder().value("test-email").primary(true).build()) + .name( + Name.builder() + .familyName("test-family-name") + .givenName("test-given-name") + .build()) + .password("test-password") + .userName(userName) + .build()); + } + + private static Flux requestList(UaaClient uaaClient) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .groups() + .list(ListGroupsRequest.builder().startIndex(startIndex).build())); + } + + private static Flux requestListExternalGroupResource( + UaaClient uaaClient) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .groups() + .listExternalGroupMappings( + ListExternalGroupMappingsRequest.builder() + .startIndex(startIndex) + .build())); + } + + private static Flux requestListExternalGroupResources( + UaaClient uaaClient) { + return PaginationUtils.requestUaaResources( + startIndex -> + uaaClient + .groups() + .listExternalGroupMappings( + ListExternalGroupMappingsRequest.builder() + .startIndex(startIndex) + .build())); + } + + private static Mono requestMapExternalGroupResponse( + UaaClient uaaClient, String displayName, String groupId) { + return uaaClient + .groups() + .mapExternalGroup( + MapExternalGroupRequest.builder() + .externalGroup(displayName + "-external-group") + .groupId(groupId) + .origin(displayName + "-origin") + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/IdentityProvidersTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/IdentityProvidersTest.java new file mode 100644 index 00000000000..8b9afd5fc11 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/IdentityProvidersTest.java @@ -0,0 +1,400 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.cloudfoundry.uaa.identityproviders.Type.LDAP; +import static org.cloudfoundry.uaa.identityproviders.Type.OAUTH2; +import static org.cloudfoundry.uaa.identityproviders.Type.SAML; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.uaa.identityproviders.CreateIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.CreateIdentityProviderResponse; +import org.cloudfoundry.uaa.identityproviders.DeleteIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.ExternalGroupMappingMode; +import org.cloudfoundry.uaa.identityproviders.GetIdentityProviderRequest; +import org.cloudfoundry.uaa.identityproviders.LdapConfiguration; +import org.cloudfoundry.uaa.identityproviders.LdapGroupFile; +import org.cloudfoundry.uaa.identityproviders.LdapProfileFile; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersRequest; +import org.cloudfoundry.uaa.identityproviders.ListIdentityProvidersResponse; +import org.cloudfoundry.uaa.identityproviders.OAuth2Configuration; +import org.cloudfoundry.uaa.identityproviders.SamlConfiguration; +import org.cloudfoundry.uaa.identityproviders.TlsConfiguration; +import org.cloudfoundry.uaa.identityproviders.UpdateIdentityProviderRequest; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneResponse; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class IdentityProvidersTest extends AbstractIntegrationTest { + + @Autowired private UaaClient uaaClient; + + @Autowired private Mono userId; + + @Test + public void createLdapSimpleBind() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String name = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then( + this.uaaClient + .identityProviders() + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + LdapConfiguration.builder() + .addShadowUserOnLogin(true) + .autoAddGroups(true) + .baseUrl( + String.format( + "ldap://%s.url", + name)) + .groupSearchDepthLimit(10) + .groupSearchSubTree(true) + .ldapGroupFile( + LdapGroupFile.NO_GROUP) + .ldapProfileFile( + LdapProfileFile.SIMPLE_BIND) + .mailAttributeName("mail") + .mailSubstituteOverridesLdap(false) + .skipSSLVerification(false) + .tlsConfiguration( + TlsConfiguration.NONE) + .userDistinguishedNamePattern( + "cn={0},ou=Users,dc=test,dc=com") + .userDistinguishedNamePatternDelimiter( + ";") + .build()) + .identityZoneId(identityZoneName) + .name(name) + .originKey("ldap") + .type(LDAP) + .build())) + .then(requestListIdentityProviders(this.uaaClient, identityZoneName)) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> LDAP.equals(provider.getType())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createOAuth() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String name = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then( + this.uaaClient + .identityProviders() + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + OAuth2Configuration.builder() + .addShadowUserOnLogin(true) + .authUrl("http://auth.url") + .relyingPartyId("uaa") + .relyingPartySecret("secret") + .showLinkText(false) + .skipSslVerification(false) + .tokenKey("token-key") + .tokenUrl("http://token.url") + .build()) + .identityZoneId(identityZoneName) + .name(name) + .originKey("oauth2.0") + .type(OAUTH2) + .build())) + .then(requestListIdentityProviders(this.uaaClient, identityZoneName)) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> OAUTH2.equals(provider.getType())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void createSaml() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String name = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then( + this.uaaClient + .identityProviders() + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + SamlConfiguration.builder() + .addShadowUserOnLogin(true) + .metaDataLocation( + "MIICmTCCAgKgAwIBAgIGAUPATqmEMA0GCSqGSIb3DQEBBQUAMIGPMQswCQYDVQQGEwJVUzETMBEG\n" + + "A1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwNU2FuIEZyYW5jaXNjbzENMAsGA1UECgwET2t0YTEU\n" + + "MBIGA1UECwwLU1NPUHJvdmlkZXIxEDAOBgNVBAMMB1Bpdm90YWwxHDAaBgkqhkiG9w0BCQEWDWlu\n" + + "Zm9Ab2t0YS5jb20wHhcNMTQwMTIzMTgxMjM3WhcNNDQwMTIzMTgxMzM3WjCBjzELMAkGA1UEBhMC\n" + + "VVMxEzARBgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xDTALBgNVBAoM\n" + + "BE9rdGExFDASBgNVBAsMC1NTT1Byb3ZpZGVyMRAwDgYDVQQDDAdQaXZvdGFsMRwwGgYJKoZIhvcN\n" + + "AQkBFg1pbmZvQG9rdGEuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCeil67/TLOiTZU\n" + + "WWgW2XEGgFZ94bVO90v5J1XmcHMwL8v5Z/8qjdZLpGdwI7Ph0CyXMMNklpaR/Ljb8fsls3amdT5O\n" + + "Bw92Zo8ulcpjw2wuezTwL0eC0wY/GQDAZiXL59npE6U+fH1lbJIq92hx0HJSru/0O1q3+A/+jjZL\n" + + "3tL/SwIDAQABMA0GCSqGSIb3DQEBBQUAA4GBAI5BoWZoH6Mz9vhypZPOJCEKa/K+biZQsA4Zqsuk\n" + + "vvphhSERhqk/Nv76Vkl8uvJwwHbQrR9KJx4L3PRkGCG24rix71jEuXVGZUsDNM3CUKnARx4MEab6\n" + + "GFHNkZ6DmoT" + + "/PFagngecHu+EwmuDtaG0rEkFrARwe+d8Ru0BN558abFburn:oasis:names:tc:SAML:1.1:nameid-format:emailAddressurn:oasis:names:tc:SAML:1.1:nameid-format:unspecified\n") + .nameId( + "urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress") + .assertionConsumerIndex(0) + .metadataTrustCheck(false) + .showSamlLink(false) + .socketFactoryClassName( + "org.apache.commons.httpclient.protocol.DefaultProtocolSocketFactory") + .linkText( + "IDPEndpointsMockTests Saml" + + " Provider:SAML") + .groupMappingMode( + ExternalGroupMappingMode + .EXPLICITLY_MAPPED) + .build()) + .identityZoneId(identityZoneName) + .name(name) + .originKey("SAML") + .type(SAML) + .build())) + .then(requestListIdentityProviders(this.uaaClient, identityZoneName)) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> SAML.equals(provider.getType())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String name = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then(requestCreateIdentityProvider(this.uaaClient, identityZoneName, name)) + .flatMap( + response -> + this.uaaClient + .identityProviders() + .delete( + DeleteIdentityProviderRequest.builder() + .identityProviderId(response.getId()) + .identityZoneId( + response.getIdentityZoneId()) + .build())) + .then(requestListIdentityProviders(this.uaaClient, identityZoneName)) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> name.equals(provider.getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String name = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then(requestCreateIdentityProvider(this.uaaClient, identityZoneName, name)) + .flatMap( + response -> + this.uaaClient + .identityProviders() + .get( + GetIdentityProviderRequest.builder() + .identityProviderId(response.getId()) + .identityZoneId(identityZoneName) + .build())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String name = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then(requestCreateIdentityProvider(this.uaaClient, identityZoneName, name)) + .then( + this.uaaClient + .identityProviders() + .list( + ListIdentityProvidersRequest.builder() + .identityZoneId(identityZoneName) + .build())) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> OAUTH2.equals(provider.getType())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String oldName = this.nameFactory.getIdentityProviderName(); + String newName = this.nameFactory.getIdentityProviderName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.userId + .flatMap( + userId -> + requestCreateIdentityZone( + this.uaaClient, identityZoneName, subdomainName)) + .then(requestCreateIdentityProvider(this.uaaClient, identityZoneName, oldName)) + .flatMap( + response -> + this.uaaClient + .identityProviders() + .update( + UpdateIdentityProviderRequest.builder() + .configuration( + OAuth2Configuration.builder() + .addShadowUserOnLogin(true) + .authUrl("http://auth.url") + .relyingPartyId("uaa") + .relyingPartySecret( + "secret") + .showLinkText(false) + .skipSslVerification(false) + .tokenKey("token-key") + .tokenUrl( + "http://token.url") + .build()) + .identityProviderId(response.getId()) + .identityZoneId(identityZoneName) + .name(newName) + .originKey("oauth2.0") + .type(OAUTH2) + .version(1) + .build())) + .then(requestListIdentityProviders(this.uaaClient, identityZoneName)) + .flatMapIterable(ListIdentityProvidersResponse::getIdentityProviders) + .filter(provider -> newName.equals(provider.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono requestCreateIdentityProvider( + UaaClient uaaClient, String identityZoneName, String name) { + return uaaClient + .identityProviders() + .create( + CreateIdentityProviderRequest.builder() + .active(true) + .configuration( + OAuth2Configuration.builder() + .addShadowUserOnLogin(true) + .authUrl("http://auth.url") + .relyingPartyId("uaa") + .relyingPartySecret("secret") + .showLinkText(false) + .skipSslVerification(false) + .tokenKey("token-key") + .tokenUrl("http://token.url") + .build()) + .identityZoneId(identityZoneName) + .name(name) + .originKey("oauth2.0") + .type(OAUTH2) + .build()); + } + + private static Mono requestCreateIdentityZone( + UaaClient uaaClient, String identityZoneName, String subdomainName) { + return uaaClient + .identityZones() + .create( + CreateIdentityZoneRequest.builder() + .identityZoneId(identityZoneName) + .name(identityZoneName) + .subdomain(subdomainName) + .build()); + } + + private static Mono requestListIdentityProviders( + UaaClient uaaClient, String identityZoneName) { + return uaaClient + .identityProviders() + .list( + ListIdentityProvidersRequest.builder() + .identityZoneId(identityZoneName) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/IdentityZonesTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/IdentityZonesTest.java new file mode 100644 index 00000000000..5837481254f --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/IdentityZonesTest.java @@ -0,0 +1,166 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.CreateIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.DeleteIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.GetIdentityZoneRequest; +import org.cloudfoundry.uaa.identityzones.GetIdentityZoneResponse; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesRequest; +import org.cloudfoundry.uaa.identityzones.ListIdentityZonesResponse; +import org.cloudfoundry.uaa.identityzones.UpdateIdentityZoneRequest; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class IdentityZonesTest extends AbstractIntegrationTest { + + @Autowired private UaaClient uaaClient; + + @Test + public void create() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String subdomainName = this.nameFactory.getDomainName(); + + this.uaaClient + .identityZones() + .create( + CreateIdentityZoneRequest.builder() + .subdomain(subdomainName) + .name(identityZoneName) + .build()) + .then(requestListIdentityZones(this.uaaClient)) + .flatMapIterable(ListIdentityZonesResponse::getIdentityZones) + .filter(resource -> identityZoneName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String subdomainName = this.nameFactory.getDomainName(); + + getIdentityZoneId(this.uaaClient, identityZoneName, subdomainName) + .flatMap( + identityZoneId -> + this.uaaClient + .identityZones() + .delete( + DeleteIdentityZoneRequest.builder() + .identityZoneId(identityZoneId) + .build())) + .then(requestListIdentityZones(this.uaaClient)) + .flatMapIterable(ListIdentityZonesResponse::getIdentityZones) + .filter(resource -> identityZoneName.equals(resource.getName())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void get() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String subdomainName = this.nameFactory.getDomainName(); + + getIdentityZoneId(this.uaaClient, identityZoneName, subdomainName) + .flatMap( + identityZoneId -> + this.uaaClient + .identityZones() + .get( + GetIdentityZoneRequest.builder() + .identityZoneId(identityZoneId) + .build())) + .map(GetIdentityZoneResponse::getName) + .as(StepVerifier::create) + .expectNext(identityZoneName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String subdomainName = this.nameFactory.getDomainName(); + + requestCreateIdentityZone(this.uaaClient, identityZoneName, subdomainName) + .then( + this.uaaClient + .identityZones() + .list(ListIdentityZonesRequest.builder().build())) + .flatMapIterable(ListIdentityZonesResponse::getIdentityZones) + .filter(resource -> identityZoneName.equals(resource.getName())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String identityZoneName = this.nameFactory.getIdentityZoneName(); + String baseSubdomainName = this.nameFactory.getDomainName(); + String newSubdomainName = this.nameFactory.getDomainName(); + + getIdentityZoneId(this.uaaClient, identityZoneName, baseSubdomainName) + .flatMap( + identityZoneId -> + this.uaaClient + .identityZones() + .update( + UpdateIdentityZoneRequest.builder() + .identityZoneId(identityZoneId) + .name(identityZoneName) + .subdomain(newSubdomainName) + .build())) + .then(requestListIdentityZones(this.uaaClient)) + .flatMapIterable(ListIdentityZonesResponse::getIdentityZones) + .filter(resource -> newSubdomainName.equals(resource.getSubdomain())) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getIdentityZoneId( + UaaClient uaaClient, String identityZoneName, String subdomainName) { + return requestCreateIdentityZone(uaaClient, identityZoneName, subdomainName) + .map(CreateIdentityZoneResponse::getId); + } + + private static Mono requestCreateIdentityZone( + UaaClient uaaClient, String identityZoneName, String subdomainName) { + return uaaClient + .identityZones() + .create( + CreateIdentityZoneRequest.builder() + .subdomain(subdomainName) + .name(identityZoneName) + .build()); + } + + private static Mono requestListIdentityZones(UaaClient uaaClient) { + return uaaClient.identityZones().list(ListIdentityZonesRequest.builder().build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/RatelimitTestConfiguration.java b/integration-test/src/test/java/org/cloudfoundry/uaa/RatelimitTestConfiguration.java new file mode 100644 index 00000000000..e162955e4d4 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/RatelimitTestConfiguration.java @@ -0,0 +1,73 @@ +package org.cloudfoundry.uaa; + +import java.time.Duration; +import org.cloudfoundry.IntegrationTestConfiguration.FailingDeserializationProblemHandler; +import org.cloudfoundry.ThrottlingUaaClient; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.DefaultConnectionContext; +import org.cloudfoundry.reactor.ProxyConfiguration; +import org.cloudfoundry.reactor.tokenprovider.ClientCredentialsGrantTokenProvider; +import org.cloudfoundry.reactor.uaa.ReactorUaaClient; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.boot.autoconfigure.EnableAutoConfiguration; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.util.StringUtils; + +@Configuration +@EnableAutoConfiguration +public class RatelimitTestConfiguration { + + @Bean + UaaClient adminUaaClient( + ConnectionContext connectionContext, + @Value("${test.admin.clientId}") String clientId, + @Value("${test.admin.clientSecret}") String clientSecret, + @Value("${uaa.api.request.limit:0}") int uaaLimit) { + ReactorUaaClient client = + ReactorUaaClient.builder() + .connectionContext(connectionContext) + .tokenProvider( + ClientCredentialsGrantTokenProvider.builder() + .clientId(clientId) + .clientSecret(clientSecret) + .build()) + .build(); + if (uaaLimit > 0) { + return new ThrottlingUaaClient(client, uaaLimit); + } + return client; + } + + @Bean + DefaultConnectionContext connectionContext( + @Value("${test.apiHost}") String apiHost, + @Value("${test.proxy.host:}") String proxyHost, + @Value("${test.proxy.password:}") String proxyPassword, + @Value("${test.proxy.port:8080}") Integer proxyPort, + @Value("${test.proxy.username:}") String proxyUsername, + @Value("${test.skipSslValidation:false}") Boolean skipSslValidation) { + + DefaultConnectionContext.Builder connectionContext = + DefaultConnectionContext.builder() + .apiHost(apiHost) + .problemHandler( + new FailingDeserializationProblemHandler()) // Test-only problem + // handler + .skipSslValidation(skipSslValidation) + .sslHandshakeTimeout(Duration.ofSeconds(30)); + + if (StringUtils.hasText(proxyHost)) { + ProxyConfiguration.Builder proxyConfiguration = + ProxyConfiguration.builder().host(proxyHost).port(proxyPort); + + if (StringUtils.hasText(proxyUsername)) { + proxyConfiguration.password(proxyPassword).username(proxyUsername); + } + + connectionContext.proxyConfiguration(proxyConfiguration.build()); + } + + return connectionContext.build(); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java new file mode 100644 index 00000000000..f12fa616dc4 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/ServerInformationTest.java @@ -0,0 +1,177 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; + +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import java.time.Duration; +import java.util.function.Consumer; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.uaa.serverinformation.AutoLoginRequest; +import org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeRequest; +import org.cloudfoundry.uaa.serverinformation.GetAutoLoginAuthenticationCodeResponse; +import org.cloudfoundry.uaa.serverinformation.GetInfoRequest; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.condition.DisabledIf; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.converter.json.Jackson2ObjectMapperBuilder; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class ServerInformationTest extends AbstractIntegrationTest { + + @Autowired private String clientId; + + @Autowired private String clientSecret; + + @Autowired private String password; + + @Autowired private UaaClient uaaClient; + + @Autowired private String username; + + @Autowired private ConnectionContext context; + + @Test + public void autoLogin() { + getAuthenticationCode( + this.uaaClient, + this.clientId, + this.clientSecret, + this.password, + this.username) + .flatMap( + code -> + this.uaaClient + .serverInformation() + .autoLogin( + AutoLoginRequest.builder() + .clientId(this.clientId) + .code(code) + .build())) + .as(StepVerifier::create) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getAutoLoginAuthenticationCode() { + this.uaaClient + .serverInformation() + .getAuthenticationCode( + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .password(this.password) + .username(this.username) + .build()) + .map(GetAutoLoginAuthenticationCodeResponse::getPath) + .as(StepVerifier::create) + .expectNext("/oauth/authorize") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + @DisabledIf(value = "tasSpecificUaaVersion") + public void getInfo() { + this.uaaClient + .serverInformation() + .getInfo(GetInfoRequest.builder().build()) + .map(response -> response.getLinks().getPassword()) + .as(StepVerifier::create) + .consumeNextWith(endsWithExpectation("password")) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Consumer endsWithExpectation(String suffix) { + return actual -> assertThat(actual).endsWith(suffix); + } + + private static Mono getAuthenticationCode( + UaaClient uaaClient, + String clientId, + String clientSecret, + String password, + String username) { + return requestAuthenticationCode(uaaClient, clientId, clientSecret, password, username) + .map(GetAutoLoginAuthenticationCodeResponse::getCode); + } + + private static Mono requestAuthenticationCode( + UaaClient uaaClient, + String clientId, + String clientSecret, + String password, + String username) { + return uaaClient + .serverInformation() + .getAuthenticationCode( + GetAutoLoginAuthenticationCodeRequest.builder() + .clientId(clientId) + .clientSecret(clientSecret) + .password(password) + .username(username) + .build()); + } + + /** + * TAS has a specific line of UAA releases 77.20.x, where x >= 8. + * The latest OSS release of that line is v77.20.7. + * In those proprietary releases, the UAA info response has extra properties and crashes some tests. + * We do not want to include those extra fields into the OSS releases of CF-java-client. To have our + * integration tests succeed, we exclude these specific UAA releases. + */ + private boolean tasSpecificUaaVersion() { + ObjectMapper mapper = Jackson2ObjectMapperBuilder.json().build(); + + Boolean hasTasSpecificUaaVersion = + context.getRootProvider() + .getRoot("uaa", context) + .map(url -> context.getHttpClient().baseUrl(url)) + .flatMap( + client -> + client.get() + .uri("/info") + .responseContent() + .aggregate() + .asString()) + .map( + r -> { + try { + return mapper.readTree(r).at("/app/version").asText(); + } catch (JsonProcessingException e) { + throw new RuntimeException("Can't parse"); + } + }) + .map( + version -> { + String[] versionParts = version.split("\\."); + int major = Integer.parseInt(versionParts[0]); + int minor = Integer.parseInt(versionParts[1]); + int patch = Integer.parseInt(versionParts[2]); + return major == 77 && minor == 20 && patch > 8; + }) + .onErrorReturn(false) + .block(); + return Boolean.TRUE.equals(hasTasSpecificUaaVersion); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/TokensTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/TokensTest.java new file mode 100644 index 00000000000..40b02850f02 --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/TokensTest.java @@ -0,0 +1,285 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.reactor.ConnectionContext; +import org.cloudfoundry.reactor.TokenProvider; +import org.cloudfoundry.uaa.authorizations.AuthorizeByAuthorizationCodeGrantApiRequest; +import org.cloudfoundry.uaa.tokens.CheckTokenRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByAuthorizationCodeRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByAuthorizationCodeResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByClientCredentialsRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByClientCredentialsResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByOneTimePasscodeRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByOneTimePasscodeResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByOpenIdRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByOpenIdResponse; +import org.cloudfoundry.uaa.tokens.GetTokenByPasswordRequest; +import org.cloudfoundry.uaa.tokens.GetTokenByPasswordResponse; +import org.cloudfoundry.uaa.tokens.GetTokenKeyRequest; +import org.cloudfoundry.uaa.tokens.GetTokenKeyResponse; +import org.cloudfoundry.uaa.tokens.ListTokenKeysRequest; +import org.cloudfoundry.uaa.tokens.RefreshTokenRequest; +import org.cloudfoundry.uaa.tokens.RefreshTokenResponse; +import org.cloudfoundry.uaa.tokens.TokenFormat; +import org.cloudfoundry.uaa.tokens.TokenKey; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class TokensTest extends AbstractIntegrationTest { + + @Autowired private String clientId; + + @Autowired private String clientSecret; + + @Autowired private ConnectionContext connectionContext; + + @Autowired private String password; + + @Autowired private TokenProvider tokenProvider; + + @Autowired private UaaClient uaaClient; + + @Autowired private String username; + + @Test + public void checkTokenNotAuthorized() { + this.tokenProvider + .getToken(this.connectionContext) + .flatMap( + token -> + this.uaaClient + .tokens() + .check( + CheckTokenRequest.builder() + .token(token) + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .scopes("password.write", "scim.userids") + .build())) + .as(StepVerifier::create) + .consumeErrorWith( + t -> + assertThat(t) + .isInstanceOf(UaaException.class) + .hasMessage("access_denied: Access is denied")) + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getTokenByAuthorizationCode() { + requestGetAuthorizationCode(this.uaaClient, this.clientId) + .flatMap( + authorizationCode -> + this.uaaClient + .tokens() + .getByAuthorizationCode( + GetTokenByAuthorizationCodeRequest.builder() + .authorizationCode(authorizationCode) + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .build())) + .map(GetTokenByAuthorizationCodeResponse::getTokenType) + .as(StepVerifier::create) + .expectNext("bearer") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getTokenByClientCredentials() { + this.uaaClient + .tokens() + .getByClientCredentials( + GetTokenByClientCredentialsRequest.builder() + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .map(GetTokenByClientCredentialsResponse::getTokenType) + .as(StepVerifier::create) + .expectNext("bearer") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + // TODO: Ready to Implement - Await https://github.com/cloudfoundry/cf-java-client/issues/862 to + // get passcode + @Disabled( + "Ready to Implement - Await https://github.com/cloudfoundry/cf-java-client/issues/862" + + " to get passcode") + @Test + public void getTokenByOneTimePasscode() { + this.uaaClient + .tokens() + .getByOneTimePasscode( + GetTokenByOneTimePasscodeRequest.builder() + .passcode("some passcode") + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .tokenFormat(TokenFormat.OPAQUE) + .build()) + .map(GetTokenByOneTimePasscodeResponse::getAccessToken) + .as(StepVerifier::create) + .expectNext("bearer") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getTokenByOpenId() { + requestGetAuthorizationCode(this.uaaClient, this.clientId) + .flatMap( + authorizationCode -> + this.uaaClient + .tokens() + .getByOpenId( + GetTokenByOpenIdRequest.builder() + .authorizationCode(authorizationCode) + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .tokenFormat(TokenFormat.OPAQUE) + .build())) + .map(GetTokenByOpenIdResponse::getTokenType) + .as(StepVerifier::create) + .expectNext("bearer") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getTokenByPassword() { + this.uaaClient + .tokens() + .getByPassword( + GetTokenByPasswordRequest.builder() + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .password(this.password) + .tokenFormat(TokenFormat.OPAQUE) + .username(this.username) + .build()) + .map(GetTokenByPasswordResponse::getTokenType) + .as(StepVerifier::create) + .expectNext("bearer") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getTokenKey() { + this.uaaClient + .tokens() + .getKey(GetTokenKeyRequest.builder().build()) + .as(StepVerifier::create) + .expectNextCount(1) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void listTokenKeys() { + this.uaaClient + .tokens() + .getKey(GetTokenKeyRequest.builder().build()) + .flatMap( + getKey -> + Mono.zip( + this.uaaClient + .tokens() + .listKeys(ListTokenKeysRequest.builder().build()) + .flatMapMany( + response -> + Flux.fromIterable( + response.getKeys())) + .filter( + tokenKey -> + getKey.getValue() + .equals( + tokenKey + .getValue())) + .single() + .map(TokenKey::getId), + Mono.just(getKey).map(GetTokenKeyResponse::getId))) + .as(StepVerifier::create) + .consumeNextWith(tupleEquality()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void refreshToken() { + getRequestToken( + this.uaaClient, + this.clientId, + this.clientSecret, + this.password, + this.username) + .flatMap( + refreshToken -> + this.uaaClient + .tokens() + .refresh( + RefreshTokenRequest.builder() + .tokenFormat(TokenFormat.OPAQUE) + .clientId(this.clientId) + .clientSecret(this.clientSecret) + .refreshToken(refreshToken) + .build())) + .map(RefreshTokenResponse::getTokenType) + .as(StepVerifier::create) + .expectNext("bearer") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono getRequestToken( + UaaClient uaaClient, + String clientId, + String clientSecret, + String password, + String username) { + return uaaClient + .tokens() + .getByPassword( + GetTokenByPasswordRequest.builder() + .clientId(clientId) + .clientSecret(clientSecret) + .password(password) + .tokenFormat(TokenFormat.OPAQUE) + .username(username) + .build()) + .map(GetTokenByPasswordResponse::getRefreshToken); + } + + private static Mono requestGetAuthorizationCode(UaaClient uaaClient, String clientId) { + return uaaClient + .authorizations() + .authorizationCodeGrantApi( + AuthorizeByAuthorizationCodeGrantApiRequest.builder() + .clientId(clientId) + .build()); + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/UaaRatelimitTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/UaaRatelimitTest.java new file mode 100644 index 00000000000..116b20338da --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/UaaRatelimitTest.java @@ -0,0 +1,72 @@ +package org.cloudfoundry.uaa; + +import java.time.Duration; +import org.cloudfoundry.ThrottlingUaaClient; +import org.cloudfoundry.uaa.ratelimit.Current; +import org.cloudfoundry.uaa.ratelimit.RatelimitRequest; +import org.cloudfoundry.uaa.ratelimit.RatelimitResponse; +import org.junit.jupiter.api.Test; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +@SpringJUnitConfig(classes = RatelimitTestConfiguration.class) +public class UaaRatelimitTest { + private static final Logger LOGGER = LoggerFactory.getLogger(UaaRatelimitTest.class); + + @Autowired private UaaClient adminUaaClient; + + @Test + public void getRatelimit() { + int envRatelimit; + if (adminUaaClient instanceof ThrottlingUaaClient) { + ThrottlingUaaClient throttlingClient = (ThrottlingUaaClient) adminUaaClient; + envRatelimit = throttlingClient.getMaxRequestsPerSecond(); + } else { + envRatelimit = 0; + } + Mono tmp = + adminUaaClient + .rateLimit() + .getRatelimit(RatelimitRequest.builder().build()) + .map(response -> getServerRatelimit(response, envRatelimit)) + .timeout(Duration.ofSeconds(5)) + .onErrorResume( + ex -> { + LOGGER.error( + "Warning: could not fetch UAA rate limit, using default" + + " " + + 0 + + ". Cause: " + + ex); + return Mono.just(false); + }); + StepVerifier.create(tmp.materialize()).expectNextCount(1).verifyComplete(); + } + + private Boolean getServerRatelimit(RatelimitResponse response, int maxRequestsPerSecond) { + Current curr = response.getCurrentData(); + if (!"ACTIVE".equals(curr.getStatus())) { + LOGGER.debug( + "UaaRatelimitInitializer server ratelimit is not 'ACTIVE', but " + + curr.getStatus() + + ". Ignoring server value for ratelimit."); + return false; + } + Integer result = curr.getLimiterMappings(); + LOGGER.info( + "Server uses uaa rate limiting. There are " + + result + + " mappings declared in file " + + response.getFromSource()); + if (maxRequestsPerSecond == 0) { + LOGGER.warn( + "Ratelimiting is not set locally, set variable 'UAA_API_REQUEST_LIMIT' to a" + + " save value or you might experience http 429 responses."); + } + return true; + } +} diff --git a/integration-test/src/test/java/org/cloudfoundry/uaa/UsersTest.java b/integration-test/src/test/java/org/cloudfoundry/uaa/UsersTest.java new file mode 100644 index 00000000000..0413b81b6fd --- /dev/null +++ b/integration-test/src/test/java/org/cloudfoundry/uaa/UsersTest.java @@ -0,0 +1,356 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.uaa; + +import static org.assertj.core.api.Assertions.assertThat; + +import java.time.Duration; +import org.cloudfoundry.AbstractIntegrationTest; +import org.cloudfoundry.CloudFoundryVersion; +import org.cloudfoundry.IfCloudFoundryVersion; +import org.cloudfoundry.uaa.users.ChangeUserPasswordRequest; +import org.cloudfoundry.uaa.users.CreateUserRequest; +import org.cloudfoundry.uaa.users.CreateUserResponse; +import org.cloudfoundry.uaa.users.DeleteUserRequest; +import org.cloudfoundry.uaa.users.DeleteUserResponse; +import org.cloudfoundry.uaa.users.Email; +import org.cloudfoundry.uaa.users.ExpirePasswordRequest; +import org.cloudfoundry.uaa.users.ExpirePasswordResponse; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkRequest; +import org.cloudfoundry.uaa.users.GetUserVerificationLinkResponse; +import org.cloudfoundry.uaa.users.InviteUsersRequest; +import org.cloudfoundry.uaa.users.InviteUsersResponse; +import org.cloudfoundry.uaa.users.ListUsersRequest; +import org.cloudfoundry.uaa.users.ListUsersResponse; +import org.cloudfoundry.uaa.users.LookupUserIdsRequest; +import org.cloudfoundry.uaa.users.LookupUserIdsResponse; +import org.cloudfoundry.uaa.users.Name; +import org.cloudfoundry.uaa.users.UpdateUserRequest; +import org.cloudfoundry.uaa.users.User; +import org.cloudfoundry.uaa.users.UserId; +import org.cloudfoundry.uaa.users.UserInfoRequest; +import org.cloudfoundry.uaa.users.UserInfoResponse; +import org.cloudfoundry.uaa.users.VerifyUserRequest; +import org.cloudfoundry.uaa.users.VerifyUserResponse; +import org.junit.jupiter.api.Test; +import org.springframework.beans.factory.annotation.Autowired; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; +import reactor.test.StepVerifier; + +public final class UsersTest extends AbstractIntegrationTest { + + @Autowired private UaaClient uaaClient; + + @Test + public void changePassword() { + String userName = this.nameFactory.getUserName(); + + requestCreateUser(this.uaaClient, userName) + .map(CreateUserResponse::getId) + .flatMap( + userId -> + this.uaaClient + .users() + .changePassword( + ChangeUserPasswordRequest.builder() + .oldPassword("test-password") + .password("test-new-password") + .userId(userId) + .build())) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getMessage()).isEqualTo("password updated"); + assertThat(response.getStatus()).isEqualTo("ok"); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void create() { + String userName = this.nameFactory.getUserName(); + + this.uaaClient + .users() + .create( + CreateUserRequest.builder() + .email(Email.builder().value("test-email").primary(true).build()) + .externalId("test-external-id") + .name( + Name.builder() + .familyName("test-family-name") + .givenName("test-given-name") + .build()) + .password("test-password") + .userName(userName) + .build()) + .as(StepVerifier::create) + .consumeNextWith( + response -> { + assertThat(response.getExternalId()).isEqualTo("test-external-id"); + assertThat(response.getUserName()).isEqualTo(userName); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void delete() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .delete(DeleteUserRequest.builder().userId(userId).build())) + .map(DeleteUserResponse::getId) + .flatMap(userId -> requestListUsers(this.uaaClient, userId)) + .map(ListUsersResponse::getTotalResults) + .as(StepVerifier::create) + .expectNext(0) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(greaterThanOrEqualTo = CloudFoundryVersion.PCF_1_10) + @Test + public void expirePassword() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .expirePassword( + ExpirePasswordRequest.builder() + .passwordChangeRequired(true) + .userId(userId) + .build())) + .as(StepVerifier::create) + .expectNext(ExpirePasswordResponse.builder().passwordChangeRequired(true).build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @IfCloudFoundryVersion(equalTo = CloudFoundryVersion.PCF_1_9) + @Test + public void expirePassword19() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .expirePassword( + ExpirePasswordRequest.builder() + .passwordChangeRequired(true) + .userId(userId) + .build())) + .as(StepVerifier::create) + .expectNext(ExpirePasswordResponse.builder().build()) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void getVerificationLink() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .getVerificationLink( + GetUserVerificationLinkRequest.builder() + .redirectUri("test-redirect-uri") + .userId(userId) + .build())) + .map(GetUserVerificationLinkResponse::getVerifyLink) + .as(StepVerifier::create) + .consumeNextWith(location -> assertThat(location).contains("/verify_user?code=")) + .expectComplete(); + } + + @Test + public void invite() { + this.uaaClient + .users() + .invite( + InviteUsersRequest.builder() + .email("test@email.address") + .redirectUri("test-redirect-uri") + .build()) + .flatMapIterable(InviteUsersResponse::getNewInvites) + .single() + .as(StepVerifier::create) + .consumeNextWith( + invite -> { + assertThat(invite.getEmail()).isEqualTo("test@email.address"); + assertThat(invite.getErrorCode()).isNull(); + assertThat(invite.getSuccess()).isTrue(); + }) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void list() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .list( + ListUsersRequest.builder() + .filter( + String.format( + "id eq \"%s\"", userId)) + .build())) + .flatMapIterable(ListUsersResponse::getResources) + .map(User::getUserName) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void lookup() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .lookup( + LookupUserIdsRequest.builder() + .filter( + String.format( + "id eq \"%s\"", userId)) + .build())) + .flatMapIterable(LookupUserIdsResponse::getResources) + .map(UserId::getUserName) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void update() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .update( + UpdateUserRequest.builder() + .email( + Email.builder() + .value("test-email-2") + .primary(true) + .build()) + .id(userId) + .name( + Name.builder() + .familyName( + "test-family-name") + .givenName( + "test-given-name") + .build()) + .userName(userName) + .version("0") + .build())) + .flatMapMany( + response -> Flux.fromIterable(response.getEmail()).map(Email::getValue)) + .as(StepVerifier::create) + .expectNext("test-email-2") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void userInfo() { + this.uaaClient + .users() + .userInfo(UserInfoRequest.builder().build()) + .map(UserInfoResponse::getName) + .as(StepVerifier::create) + .expectNext("Test User") + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + @Test + public void verifyUser() { + String userName = this.nameFactory.getUserName(); + + createUserId(this.uaaClient, userName) + .flatMap( + userId -> + this.uaaClient + .users() + .verify(VerifyUserRequest.builder().userId(userId).build())) + .map(VerifyUserResponse::getUserName) + .as(StepVerifier::create) + .expectNext(userName) + .expectComplete() + .verify(Duration.ofMinutes(5)); + } + + private static Mono createUserId(UaaClient uaaClient, String userName) { + return requestCreateUser(uaaClient, userName).map(CreateUserResponse::getId); + } + + private static Mono requestCreateUser( + UaaClient uaaClient, String userName) { + return uaaClient + .users() + .create( + CreateUserRequest.builder() + .email(Email.builder().value("test-email").primary(true).build()) + .name( + Name.builder() + .familyName("test-family-name") + .givenName("test-given-name") + .build()) + .password("test-password") + .verified(false) + .userName(userName) + .build()); + } + + private static Mono requestListUsers(UaaClient uaaClient, String userId) { + return uaaClient + .users() + .list( + ListUsersRequest.builder() + .filter(String.format("id eq \"%s\"", userId)) + .build()); + } +} diff --git a/integration-test/src/test/resources/logback-test.xml b/integration-test/src/test/resources/logback-test.xml new file mode 100644 index 00000000000..3c774460d3c --- /dev/null +++ b/integration-test/src/test/resources/logback-test.xml @@ -0,0 +1,45 @@ + + + + + + + + %date{HH:mm:ss.SSS} %-27thread %-37logger %msg%n + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cf-java-client-test-apps/simple-spring-app/src/main/resources/empty.properties b/integration-test/src/test/resources/test-application 2/Staticfile similarity index 100% rename from cf-java-client-test-apps/simple-spring-app/src/main/resources/empty.properties rename to integration-test/src/test/resources/test-application 2/Staticfile diff --git a/integration-test/src/test/resources/test-application 2/index.html b/integration-test/src/test/resources/test-application 2/index.html new file mode 100644 index 00000000000..27310af2b48 --- /dev/null +++ b/integration-test/src/test/resources/test-application 2/index.html @@ -0,0 +1,10 @@ + + + + +Hello Web! + + +

          Hello Web!

          + + diff --git a/integration-test/src/test/resources/test-application.zip b/integration-test/src/test/resources/test-application.zip new file mode 100644 index 00000000000..73938807357 Binary files /dev/null and b/integration-test/src/test/resources/test-application.zip differ diff --git a/integration-test/src/test/resources/test-application/Staticfile b/integration-test/src/test/resources/test-application/Staticfile new file mode 100644 index 00000000000..e69de29bb2d diff --git a/integration-test/src/test/resources/test-application/index.html b/integration-test/src/test/resources/test-application/index.html new file mode 100644 index 00000000000..f281100e587 --- /dev/null +++ b/integration-test/src/test/resources/test-application/index.html @@ -0,0 +1,27 @@ + + + + + + + +Hello Web! + + +

          Hello Web!

          + + diff --git a/integration-test/src/test/resources/test-buildpack.zip b/integration-test/src/test/resources/test-buildpack.zip new file mode 100644 index 00000000000..10128057373 Binary files /dev/null and b/integration-test/src/test/resources/test-buildpack.zip differ diff --git a/integration-test/src/test/resources/test-buildpack/bin/compile b/integration-test/src/test/resources/test-buildpack/bin/compile new file mode 100644 index 00000000000..fb408b970c1 --- /dev/null +++ b/integration-test/src/test/resources/test-buildpack/bin/compile @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "compile" diff --git a/integration-test/src/test/resources/test-buildpack/bin/detect b/integration-test/src/test/resources/test-buildpack/bin/detect new file mode 100644 index 00000000000..7cb161980c9 --- /dev/null +++ b/integration-test/src/test/resources/test-buildpack/bin/detect @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "detect" diff --git a/integration-test/src/test/resources/test-buildpack/bin/release b/integration-test/src/test/resources/test-buildpack/bin/release new file mode 100644 index 00000000000..40d7d787cd7 --- /dev/null +++ b/integration-test/src/test/resources/test-buildpack/bin/release @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +echo "release" diff --git a/integration-test/src/test/resources/test-droplet.tgz b/integration-test/src/test/resources/test-droplet.tgz new file mode 100644 index 00000000000..a066743c9b7 Binary files /dev/null and b/integration-test/src/test/resources/test-droplet.tgz differ diff --git a/integration-test/src/test/resources/test-log-cache.jar b/integration-test/src/test/resources/test-log-cache.jar new file mode 100644 index 00000000000..448d7791288 Binary files /dev/null and b/integration-test/src/test/resources/test-log-cache.jar differ diff --git a/integration-test/src/test/resources/test-manifest.yml b/integration-test/src/test/resources/test-manifest.yml new file mode 100644 index 00000000000..e255e27d16e --- /dev/null +++ b/integration-test/src/test/resources/test-manifest.yml @@ -0,0 +1,4 @@ +--- +version: 1 +applications: +- name: test-application \ No newline at end of file diff --git a/integration-test/src/test/resources/test-php.zip b/integration-test/src/test/resources/test-php.zip new file mode 100644 index 00000000000..bdb15f43c18 Binary files /dev/null and b/integration-test/src/test/resources/test-php.zip differ diff --git a/integration-test/src/test/resources/test-service-broker.jar b/integration-test/src/test/resources/test-service-broker.jar new file mode 100644 index 00000000000..9b136a61917 Binary files /dev/null and b/integration-test/src/test/resources/test-service-broker.jar differ diff --git a/license.txt b/license.txt deleted file mode 100644 index a3c81a791c2..00000000000 --- a/license.txt +++ /dev/null @@ -1,3993 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - -======================================================================= - - -Cloud Foundry Java Client: - -Cloud Foundry Java Client: includes a number of subcomponents with separate copyright -notices and license terms. The product that includes this file -does not necessarily use all the open source subcomponents referred -to below. Your use of the source code for the these subcomponents -is subject to the terms and conditions of the following licenses. - - -SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES - - >>> aopalliance-1.0 - >>> classworlds-1.1 - >>> hamcrest-all-1.1 - >>> hamcrest-core-1.1 - >>> jsch-0.1.38 - >>> junit-4.7 - >>> mockito-all-1.8.5 - >>> mockito-all-1.9.0 - >>> mockito-core-1.9.5 - >>> plexus-container-default-1.0-alpha-9-stable-1 - >>> plexus-interactivity-api-1.0-alpha-4 - >>> slf4j-api-1.5.10 - >>> slf4j-api-1.5.6 - >>> slf4j-jdk14-1.5.6 - >>> slf4j-log4j12-1.5.10 - - - -SECTION 2: Apache License, V2.0 - - >>> cloudfoundry-client-lib-0.8.3 - >>> cloudfoundry-client-lib-0.8.4.build-snapshot - >>> commons-cli-1.2 - >>> commons-codec-1.3 - >>> commons-io-2.1 - >>> doxia-logging-api-1.1 - >>> doxia-sink-api-1.1 - >>> jackson-core-asl-1.6.2 - >>> jackson-mapper-asl-1.6.2 - >>> jcl-over-slf4j-1.5.10 - >>> jcl-over-slf4j-1.5.6 - >>> log4j-1.2.14 - >>> log4j-over-slf4j-1.5.6 - >>> maven-artifact-2.2.1 - >>> maven-artifact-manager-2.2.1 - >>> maven-core-2.2.1 - >>> maven-error-diagnostics-2.2.1 - >>> maven-model-2.2.1 - >>> maven-monitor-2.2.1 - >>> maven-plugin-api-2.0 - >>> maven-plugin-descriptor-2.2.1 - >>> maven-plugin-parameter-documenter-2.2.1 - >>> maven-plugin-registry-2.2.1 - >>> maven-plugin-testing-harness-1.1 - >>> maven-profile-2.2.1 - >>> maven-project-2.2.1 - >>> maven-reporting-api-2.2.1 - >>> maven-repository-metadata-2.2.1 - >>> maven-settings-2.2.1 - >>> nekohtml-1.9.6.2 - >>> non-ascii-file-name-0.1.0.build-snapshot - >>> objenesis-1.0 - >>> plexus-archiver-1.0-alpha-7 - >>> plexus-cipher-1.4 - >>> plexus-interpolation-1.11 - >>> plexus-sec-dispatcher-1.3 - >>> plexus-utils-3.0 - >>> simple-spring-app-0.1.0.build-snapshot - >>> spring-aop-3.0.7.release - >>> spring-aop-3.1.0.release - >>> spring-asm-3.0.7.release - >>> spring-asm-3.1.0.release - >>> spring-beans-3.0.7.release - >>> spring-beans-3.1.0.release - >>> spring-context-3.0.7.release - >>> spring-context-3.1.0.release - >>> spring-context-support-3.0.7.release - >>> spring-context-support-3.1.0.release - >>> spring-core-3.0.7.release - >>> spring-core-3.1.0.release - >>> spring-expression-3.0.7.release - >>> spring-expression-3.1.0.release - >>> spring-security-config-3.1.0.release - >>> spring-security-core-3.1.0.release - >>> spring-security-crypto-3.1.0.release - >>> spring-security-oauth2-1.0.0.rc1 - >>> spring-security-web-3.1.0.release - >>> spring-test-3.0.7.release - >>> spring-web-3.0.7.release - >>> spring-web-3.1.0.release - >>> spring-webmvc-3.0.7.release - >>> spring-webmvc-3.1.0.release - >>> wagon-file-1.0-beta-6 - >>> wagon-http-1.0-beta-6 - >>> wagon-http-lightweight-1.0-beta-6 - >>> wagon-http-shared-1.0-beta-6 - >>> wagon-provider-api-2.2 - >>> wagon-ssh-1.0-beta-6 - >>> wagon-ssh-common-1.0-beta-6 - >>> wagon-ssh-external-1.0-beta-6 - >>> xercesminimal-1.9.6.2 - - - -SECTION 3: Common Development and Distribution License, V1.0 - - >>> jsp-api-2.1 - >>> jstl-1.2 - >>> servlet-api-2.5 - - - -SECTION 4: Common Public License, V1.0 - - >>> junit-4.8.2 - - - -SECTION 5: Eclipse Public License, V1.0 - - >>> aspectjrt-1.6.9 - >>> javax.inject-1.0.0 - - - -APPENDIX. Standard License Files - - - >>> Common Development and Distribution License, V1.0 - - >>> Eclipse Public License, V1.0 - - >>> Common Public License, V1.0 - - - - - ---------------- SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES ---------- - -BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES are applicable to the following component(s). - - ->>> aopalliance-1.0 - -LICENCE: all the source code provided by AOP Alliance is Public Domain. - - ->>> classworlds-1.1 - -Copyright 2002 (C) The Codehaus. All Rights Reserved. - - Redistribution and use of this software and associated documentation - ("Software"), with or without modification, are permitted provided - that the following conditions are met: - - 1. Redistributions of source code must retain copyright - statements and notices. Redistributions must also contain a - copy of this document. - - 2. Redistributions in binary form must reproduce the - above copyright notice, this list of conditions and the - following disclaimer in the documentation and/or other - materials provided with the distribution. - - 3. The name "classworlds" must not be used to endorse or promote - products derived from this Software without prior written - permission of The Codehaus. For written permission, please - contact bob@codehaus.org. - - 4. Products derived from this Software may not be called "classworlds" - nor may "classworlds" appear in their names without prior written - permission of The Codehaus. "classworlds" is a registered - trademark of The Codehaus. - - 5. Due credit should be given to The Codehaus. - (http://classworlds.codehaus.org/). - - THIS SOFTWARE IS PROVIDED BY THE CODEHAUS AND CONTRIBUTORS - ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT - NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL - THE CODEHAUS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> hamcrest-all-1.1 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> hamcrest-core-1.1 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES= OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT= SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> jsch-0.1.38 - -Sch 0.0.* was released under the GNU LGPL license. Later, we have switched over to a BSD-style license. - ------------------------------------------------------------------------------- -Copyright (c) 2002,2003,2004,2005,2006,2007,2008 Atsuhiko Yamanaka, JCraft,Inc. - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. The names of the authors may not be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL JCRAFT, INC. OR ANY CONTRIBUTORS TO THIS SOFTWARE BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> junit-4.7 - -BSD License - -Copyright (c) 2000-2006, www.hamcrest.org - -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -Neither the name of Hamcrest nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> mockito-all-1.8.5 - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - -ADDITIONAL LICENSE INFORMATION: - -> BSD - -mockito-all-1.8.5-sources.jar\asm-license.txt - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - -> Apache 2.0 - -mockito-all-1.8.5-sources.jar\org\mockito\cglib\beans\BeanCopier.java - -Copyright 2003,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -> MIT style - - -mockito-all-1.8.5-sources.jar\org\objenesis\instantiator\jrockit\JRockit131Instantiator.java - -COPYRIGHT & LICENSE - -This code is Copyright (c) 2006 BEA Systems, inc. It is provided free, as-is and without any warranties for the purpose of -inclusion in Objenesis or any other open source project with a FSF approved license, as long as this notice is not -removed. There are no limitations on modifying or repackaging the code apart from this. - -BEA does not guarantee that the code works, and provides no support for it. Use at your own risk. - -Originally developed by Leonardo Mesquita. Copyright notice added by Henrik Sthl, BEA JRockit Product Manager. - - ->>> mockito-all-1.9.0 - -The MIT License - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - - - -ADDITIONAL LICENSE INFORMATION: - - -> BSD - -mockito-all-1.9.0-sources.jar\asm-license.txt - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in the -documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its -contributors may be used to endorse or promote products derived from -this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - - -> Apache 2.0 - -mockito-all-1.9.0-sources.jar\org\mockito\cglib\beans\ImmutableBean.java - -Copyright 2003,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> mockito-core-1.9.5 - -The MIT License - -Copyright (c) 2007 Mockito contributors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. - -ADDITIONAL LICENSE INFORMATION: - -> BSD - -mockito-core-1.9.5-sources.jar\asm-license.txt - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - -> Apache 2.0 - -mockito-core-1.9.5-sources.jar\org\mockito\cglib\beans\ImmutableBean.java - -Copyright 2003,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> plexus-container-default-1.0-alpha-9-stable-1 - -The MIT License - -Copyright (c) 2004, The Codehaus - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -plexus-container-default-1.0-alpha-9-stable-1-sources.jar\org\codehaus\plexus\component\discovery\PlexusXmlComponentDiscoverer.java - -Copyright 2001-2005 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - -> Apache 1.1 - -plexus-container-default-1.0-alpha-9-stable-1-sources.jar\org\codehaus\plexus\configuration\PlexusConfigurationException.java - -The Apache Software License, Version 1.1 - -Copyright (c) 1997-2003 The Apache Software Foundation. All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. The end-user documentation included with the redistribution, if any, must include the following acknowledgment: -"This product includes software developed by the Apache Software Foundation (http://www.apache.org/)." Alternately, this acknowledgment may appear in the software itself, if and wherever such third-party acknowledgments normally appear. - -4. The names "Jakarta", "Avalon", and "Apache Software Foundation" must not be used to endorse or promote products derived from this software without prior written permission. For written permission, please contact apache@apache.org. - -5. Products derived from this software may not be called "Apache", nor may "Apache" appear in their name, without prior written permission of the Apache Software Foundation. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -This software consists of voluntary contributions made by many individuals on behalf of the Apache Software Foundation. For more information on the Apache Software Foundation, please see .The Apache Software License, Version 1.1 - - ->>> plexus-interactivity-api-1.0-alpha-4 - -The MIT License - -Copyright (c) 2005, The Codehaus - -Permission is hereby granted, free of charge, to any person obtaining a copy of -this software and associated documentation files (the "Software"), to deal in -the Software without restriction, including without limitation the rights to -use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies -of the Software, and to permit persons to whom the Software is furnished to do -so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. - - ->>> slf4j-api-1.5.10 - -Copyright (c) 2004-2007 QOS.ch - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - ->>> slf4j-api-1.5.6 - -Copyright (c) 2004-2008 QOS.ch - -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining - a copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, and/or sell copies of the Software, and to permit persons - to whom the Software is furnished to do so, provided that the above - copyright notice(s) and this permission notice appear in all copies of - the Software and that both the above copyright notice(s) and this - permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, - EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT - OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR - HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY - SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER - RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF - CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN - CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder - shall not be used in advertising or otherwise to promote the sale, use - or other dealings in this Software without prior written authorization - of the copyright holder. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -slf4j-1.5.6.tar.gz\slf4j-1.5.6.tar\slf4j-1.5.6\log4j-over-slf4j\src\main\java\org\apache\log4j\Logger.java - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ->>> slf4j-jdk14-1.5.6 - -Copyright (c) 2004-2005 SLF4J.ORG -Copyright (c) 2004-2005 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. - - ->>> slf4j-log4j12-1.5.10 - -Copyright (c) 2004-2005 SLF4J.ORG -Copyright (c) 2004-2005 QOS.ch -All rights reserved. - -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, provided that the above copyright notice(s) and this permission notice appear in all copies of the Software and that both the above copyright notice(s) and this permission notice appear in supporting documentation. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder. - - ---------------- SECTION 2: Apache License, V2.0 ---------- - -Apache License, V2.0 is applicable to the following component(s). - - ->>> cloudfoundry-client-lib-0.8.3 - -Copyright 2009-2011 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> cloudfoundry-client-lib-0.8.4.build-snapshot - -License: Apache 2.0 -UNKNOWN - ->>> commons-cli-1.2 - -Apache Commons CLI -Copyright 2001-2009 The Apache Software Foundation - -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). - - ->>> commons-codec-1.3 - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> commons-io-2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. - -See the NOTICE file distributed with this work for additional information regarding copyright ownership. - -The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - - ->>> doxia-logging-api-1.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -doxia-logging-api-1.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Doxia :: Logging API - -From: 'Codehaus' (http://www.codehaus.org/) -- Plexus Classworlds org.codehaus.plexus:plexus-classworlds:jar:1.2-alpha-9 -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-30 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.7 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> doxia-sink-api-1.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -doxia-sink-api-1.1.jar\META-INF\ DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Doxia :: Sink API - -From: 'Codehaus' (http://www.codehaus.org/) - -- Plexus Classworlds org.codehaus.plexus:plexus-classworlds:jar:1.2-alpha-9 - -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-30 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.7 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Doxia :: Logging API (http://maven.apache.org/doxia/doxia/doxia-logging-api) org.apache.maven.doxia:doxia-logging-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> jackson-core-asl-1.6.2 - -This copy of Jackson JSON processor is licensed under the Apache (Software) License, version 2.0 ("the License"). - -See the License for details about distribution rights, and the specific rights regarding derivate works. - -You may obtain a copy of the License at: http://www.apache.org/licenses/ - -A copy is also included with both the downloadable source code package and jar that contains class bytecodes, as file "ASL 2.0". In both cases, that file should be located next to this file: in source distribution the location should be "release-notes/asl"; and in jar "META-INF/" - - ->>> jackson-mapper-asl-1.6.2 - -This copy of Jackson JSON processor is licensed under the Apache (Software) License, version 2.0 ("the License"). - -See the License for details about distribution rights, and the specific rights regarding derivate works. - -You may obtain a copy of the License at: http://www.apache.org/licenses/ - -A copy is also included with both the downloadable source code package and jar that contains class bytecodes, as file "ASL 2.0". In both cases, that file should be located next to this file: in source distribution the location should be "release-notes/asl"; and in jar "META-INF/" - - ->>> jcl-over-slf4j-1.5.10 - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - - ->>> jcl-over-slf4j-1.5.6 - -Copyright 2001-2004 The Apache Software Foundation. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. - - ->>> log4j-1.2.14 - -Apache log4j -Copyright 2007 The Apache Software Foundation - -This product includes software developed at -The Apache Software Foundation (http://www.apache.org/). - - ->>> log4j-over-slf4j-1.5.6 - -Copyright 2001-2004 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> maven-artifact-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-artifact-2.2.1-sources.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. -Maven Artifact - -From: 'Codehaus' (http://www.codehaus.org/) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> maven-artifact-manager-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-artifact-manager-2.2.1-sources.jar\META-INF\ DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Artifact Manager - -From: 'Codehaus' (http://www.codehaus.org/) - Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Artifact (http://maven.apache.org/maven-artifact) org.apache.maven:maven-artifact:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Repository Metadata Model (http://maven.apache.org/maven-repository-metadata) org.apache.maven:maven-repository-metadata:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Public Domain - -From: 'Dawid Kurzyniec' (http://www.mathcs.emory.edu/~dawidk/) -- Backport of JSR 166 (http://backport-jsr166.sourceforge.net/) backport-util-concurrent:backport-util-concurrent:jar:3.1 -License: Public Domain (http://creativecommons.org/licenses/publicdomain) - - -> Apapche 1.1 - -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-core-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - - -> Apache 2.0 - -maven-core-2.2.1-sources.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Core - -From: 'an unknown organization' - -- Codec commons-codec:commons-codec:jar:1.2 - -- Neko HTML (http://nekohtml.sourceforge.net/) nekohtml:nekohtml:jar:1.9.6.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) -- Unnamed - nekohtml:xercesMinimal:jar:1.9.6.2 nekohtml:xercesMinimal:jar:1.9.6.2) - -- Plexus Cipher: encryption/decryption Component (http://spice.sonatype.org/plexus-cipher) org.sonatype.plexus:plexus cipher:jar:1.4 -License: Apache Public License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - -- Plexus Security Dispatcher Component (http://spice.sonatype.org/plexus-sec-dispatcher) org.sonatype.plexus:plexus-sec-dispatcher:jar:1.3 -License: Apache Public License 2.0 (http://www.apache.org/licenses/LICENSE-2.0) - -From: 'Apache Software Foundation' (http://jakarta.apache.org/) -- HttpClient (http://jakarta.apache.org/commons/httpclient/) commons-httpclient:commons-httpclient:jar:3.0 -License: Apache License (http://www.apache.org/licenses/LICENSE-2.0) - -From: 'Codehaus' (http://www.codehaus.org/) -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Default Interactivity Handler org.codehaus.plexus:plexus-interactivity-api:jar:1.0-alpha-4 - -- Plexus Interpolation API (http://plexus.codehaus.org/plexus-components/plexus-interpolation) org.codehaus.plexus:plexus-interpolation:jar:1.11 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Commons CLI (http://commons.apache.org/cli/) commons-cli:commons-cli:jar:1.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Jackrabbit JCR Commons (http://jackrabbit.apache.org/jackrabbit-jcr-commons) org.apache.jackrabbit:jackrabbit-jcr-commons:bundle:1.5.0 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Jackrabbit WebDAV Library (http://jackrabbit.apache.org/jackrabbit-webdav) org.apache.jackrabbit:jackrabbit-webdav:jar:1.5.0 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Artifact (http://maven.apache.org/maven-artifact) org.apache.maven:maven-artifact:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Artifact Manager (http://maven.apache.org/maven-artifact-manager) org.apache.maven:maven-artifact-manager:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Error Diagnostics (http://maven.apache.org/maven-error-diagnostics) org.apache.maven:maven-error-diagnostics:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Model (http://maven.apache.org/maven-model) org.apache.maven:maven-model:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Monitor (http://maven.apache.org/maven-monitor) org.apache.maven:maven-monitor:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin API (http://maven.apache.org/maven-plugin-api) org.apache.maven:maven-plugin-api:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Descriptor Model (http://maven.apache.org/maven-plugin-descriptor) org.apache.maven:maven-plugin-descriptor:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Parameter Documenter API (http://maven.apache.org/maven-plugin-parameter-documenter) org.apache.maven:maven-plugin-parameter-documenter:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Registry Model (http://maven.apache.org/maven-plugin-registry) org.apache.maven:maven-plugin-registry:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Profile Model (http://maven.apache.org/maven-profile) org.apache.maven:maven-profile:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Project Builder (http://maven.apache.org/maven-project) org.apache.maven:maven-project:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Repository Metadata Model (http://maven.apache.org/maven-repository-metadata) org.apache.maven:maven-repository-metadata:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Local Settings Model (http://maven.apache.org/maven-settings) org.apache.maven:maven-settings:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Doxia :: Logging API (http://maven.apache.org/doxia/doxia/doxia-logging-api) org.apache.maven.doxia:doxia-logging-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Doxia :: Sink API (http://maven.apache.org/doxia/doxia/doxia-sink-api) org.apache.maven.doxia:doxia-sink-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Reporting API (http://maven.apache.org/maven-reporting/maven-reporting-api) org.apache.maven.reporting:maven-reporting-api:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon File Provider (http://maven.apache.org/wagon/wagon-providers/wagon-file) org.apache.maven.wagon:wagon-file:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon HTTP Provider (http://maven.apache.org/wagon/wagon-providers/wagon-http) org.apache.maven.wagon:wagon-http:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon Lightweight HTTP Provider (http://maven.apache.org/wagon/wagon-providers/wagon-http-lightweight) org.apache.maven.wagon:wagon-http-lightweight:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon HTTP Shared Library (http://maven.apache.org/wagon/wagon-providers/wagon-http-shared) org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon SSH Provider (http://maven.apache.org/wagon/wagon-providers/wagon-ssh) org.apache.maven.wagon:wagon-ssh:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon SSH Common Library (http://maven.apache.org/wagon/wagon-providers/wagon-ssh-common) org.apache.maven.wagon:wagon-ssh-common:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon SSH External Provider (http://maven.apache.org/wagon/wagon-providers/wagon-ssh-external) org.apache.maven.wagon:wagon-ssh-external:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon WebDav Provider (http://maven.apache.org/wagon/wagon-providers/wagon-webdav-jackrabbit) org.apache.maven.wagon:wagon-webdav-jackrabbit:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Public Domain - -From: 'Dawid Kurzyniec' (http://www.mathcs.emory.edu/~dawidk/) -- Backport of JSR 166 (http://backport-jsr166.sourceforge.net/) backport-util-concurrent:backport-util-concurrent:jar:3.1 -License: Public Domain (http://creativecommons.org/licenses/publicdomain) - -> BSD - -From: 'jcraft' (http://www.jcraft.com/jsch) -- JSch (http://www.jcraft.com/jsch/) com.jcraft:jsch:jar:0.1.38 -License: BSD (http://www.jcraft.com/jsch/LICENSE.txt - -> MIT - -From: 'QOS.ch' (http://www.qos.ch) - - - JCL 1.1.1 implemented over SLF4J (http://www.slf4j.org) org.slf4j:jcl-over-slf4j:jar:1.5.6 - - - SLF4J API Module (http://www.slf4j.org) org.slf4j:slf4j-api:jar:1.5.6 - - - SLF4J JDK14 Binding (http://www.slf4j.org) org.slf4j:slf4j-jdk14:jar:1.5.6 - - - SLF4J NOP Binding (http://www.slf4j.org) org.slf4j:slf4j-nop:jar:1.5.3 - -> Apache 1.1 -From: 'The Codehaus' (http://codehaus.org/) - - classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-error-diagnostics-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-error-diagnostics-2.2.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Error Diagnostics - -From: 'Codehaus' (http://www.codehaus.org/) -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Apache 1.1 - -From: 'The Codehaus' (http://codehaus.org/) - - classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-model-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-model-2.2.1.jar\META-INF\ DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. -Maven Model - -From: 'Codehaus' (http://www.codehaus.org/) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> maven-monitor-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - ->>> maven-plugin-api-2.0 - -Copyright 2001-2005 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the License for the specific language governing permissions and limitations under the License. - - ->>> maven-plugin-descriptor-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -ADDITIONAL LICENSE INFORMATION: - - -> Apache 2.0 - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Plugin Descriptor Model - -From: 'Codehaus' (http://www.codehaus.org/) - - Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - - - Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) - - Maven Artifact (http://maven.apache.org/maven-artifact) org.apache.maven:maven-artifact:jar:2.2.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Maven Plugin API (http://maven.apache.org/maven-plugin-api) org.apache.maven:maven-plugin-api:jar:2.2.1 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -> Apache 1.1 - -From: 'The Codehaus' (http://codehaus.org/) - - classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-plugin-parameter-documenter-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-plugin-parameter-documenter-2.2.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Plugin Parameter Documenter API - -From: 'Codehaus' (http://www.codehaus.org/) -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -> Apache 1.1 -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-plugin-registry-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY] KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-plugin-registry-2.2.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Plugin Registry Model - -From: 'Codehaus' (http://www.codehaus.org/) -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -> Apache 1.1 - -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-plugin-testing-harness-1.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - ->>> maven-profile-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-profile-2.2.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. -Maven Profile Model - -From: 'Codehaus' (http://www.codehaus.org/) - -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Interpolation API (http://plexus.codehaus.org/plexus-components/plexus-interpolation) org.codehaus.plexus:plexus-interpolation:jar:1.11 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) -From: 'The Apache Software Foundation' (http://www.apache.org/) - -- Maven Model (http://maven.apache.org/maven-model) org.apache.maven:maven-model:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Apache 1.1 -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-project-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. - -See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-project-2.2.1.jar\META-INF\maven\org.apache.maven\maven-project\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Project Builder - -From: 'Codehaus' (http://www.codehaus.org/) - Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Interpolation API (http://plexus.codehaus.org/plexus-components/plexus-interpolation) org.codehaus.plexus:plexus-interpolation:jar:1.11 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'Dawid Kurzyniec' (http://www.mathcs.emory.edu/~dawidk/) -- Backport of JSR 166 (http://backport-jsr166.sourceforge.net/) backport-util-concurrent:backport-util-concurrent:jar:3.1 -License: Public Domain (http://creativecommons.org/licenses/publicdomain) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Artifact (http://maven.apache.org/maven-artifact) org.apache.maven:maven-artifact:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Artifact Manager (http://maven.apache.org/maven-artifact-manager) org.apache.maven:maven-artifact-manager:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Model (http://maven.apache.org/maven-model) org.apache.maven:maven-model:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Plugin Registry Model (http://maven.apache.org/maven-plugin-registry) org.apache.maven:maven-plugin-registry:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Profile Model (http://maven.apache.org/maven-profile) org.apache.maven:maven-profile:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Repository Metadata Model (http://maven.apache.org/maven-repository-metadata) org.apache.maven:maven-repository-metadata:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Local Settings Model (http://maven.apache.org/maven-settings) org.apache.maven:maven-settings:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - -> Apache 1.1 - -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-reporting-api-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-reporting-api-2.2.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Reporting API - -From: 'Codehaus' (http://www.codehaus.org/) -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Doxia :: Logging API (http://maven.apache.org/doxia/doxia/doxia-logging-api) org.apache.maven.doxia:doxia-logging-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Doxia :: Sink API (http://maven.apache.org/doxia/doxia/doxia-sink-api) org.apache.maven.doxia:doxia-sink-api:jar:1.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -> Apache 1.1 -From: 'The Codehaus' (http://codehaus.org/) -- classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> maven-repository-metadata-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-repository-metadata-2.2.1.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Repository Metadata Model - -From: 'Codehaus' (http://www.codehaus.org/) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> maven-settings-2.2.1 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -maven-settings-2.2.1.jar\META-INF\ DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. -Maven Local Settings Model - -From: 'Codehaus' (http://www.codehaus.org/) - -- Default Plexus Container org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1 - -- Plexus Interpolation API (http://plexus.codehaus.org/plexus-components/plexus-interpolation) org.codehaus.plexus:plexus-interpolation:jar:1.11 - -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Plexus Common Utilities (http://plexus.codehaus.org/plexus-utils) org.codehaus.plexus:plexus-utils:jar:1.5.15 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Model (http://maven.apache.org/maven-model) org.apache.maven:maven-model:jar:2.2.1 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -> Apache 1.1 -From: 'The Codehaus' (http://codehaus.org/) - - classworlds (http://classworlds.codehaus.org/) classworlds:classworlds:jar:1.1 - - ->>> nekohtml-1.9.6.2 - -License: Apapche 2.0 - - ->>> non-ascii-file-name-0.1.0.build-snapshot - -License: Apache 2.0 -UNKNOWN - ->>> objenesis-1.0 - -Code license: Apache License 2.0 - - ->>> plexus-archiver-1.0-alpha-7 - -Copyright 2001,2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> plexus-cipher-1.4 - -Copyright (c) 2008 Sonatype, Inc. All rights reserved. - -This program is licensed to you under the Apache License Version 2.0, and you may not use this file except in compliance with the Apache License Version 2.0. - -You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - -Unless required by applicable law or agreed to in writing, software distributed under the Apache License Version 2.0 is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - - ->>> plexus-interpolation-1.11 - -Copyright 2001-2008 Codehaus Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> plexus-sec-dispatcher-1.3 - -Copyright (c) 2008 Sonatype, Inc. All rights reserved. - -This program is licensed to you under the Apache License Version 2.0, and you may not use this file except in compliance with the Apache License Version 2.0. - -You may obtain a copy of the Apache License Version 2.0 at http://www.apache.org/licenses/LICENSE-2.0. - -Unless required by applicable law or agreed to in writing, software distributed under the Apache License Version 2.0 is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - -See the Apache License Version 2.0 for the specific language governing permissions and limitations there under. - - ->>> plexus-utils-3.0 - -Copyright The Codehaus Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - - -> Apache 1.1 - -plexus-utils-3.0-sources.jar\org\codehaus\plexus\util\ Expand.java - -The Apache Software License, Version 1.1 - -Copyright (c) 2000-2002 The Apache Software Foundation. All rights -reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright -notice, this list of conditions and the following disclaimer in -the documentation and/or other materials provided with the -distribution. - -3. The end-user documentation included with the redistribution, if -any, must include the following acknowlegement: -"This product includes software developed by the -Apache Software Foundation (http://www.codehaus.org/)." -Alternately, this acknowlegement may appear in the software itself, -if and wherever such third-party acknowlegements normally appear. - -4. The names "The Jakarta Project", "Ant", and "Apache Software -Foundation" must not be used to endorse or promote products derived -from this software without prior written permission. For written -permission, please contact codehaus@codehaus.org. - -5. Products derived from this software may not be called "Apache" -nor may "Apache" appear in their names without prior written -permission of the Apache Group. - -THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED -WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES -OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR -ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF -USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND -ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT -OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF -SUCH DAMAGE. - - -> BSD - -plexus-utils-3.0-sources.jar\licenses\ javolution.license.TXT - -Javolution - Java(TM) Solution for Real-Time and Embedded Systems -Copyright (c) 2006, Javolution (http://javolution.org) -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -Redistributions of source code must retain the above copyright notice, -this list of conditions and the following disclaimer. -Redistributions in binary form must reproduce the above copyright notice, -this list of conditions and the following disclaimer in the documentation -and/or other materials provided with the distribution. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - -> BSD - -plexus-utils-3.0-sources.jar\licenses\ thoughtworks.TXT - -CruiseControl, a Continuous Integration Toolkit -Copyright (c) 2001-2003, ThoughtWorks, Inc. -651 W Washington Ave. Suite 500 -Chicago, IL 60661 USA -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -Redistributions of source code must retain the above copyright -notice, this list of conditions and the following disclaimer. - -Redistributions in binary form must reproduce the above -copyright notice, this list of conditions and the following -disclaimer in the documentation and/or other materials provided -with the distribution. - -Neither the name of ThoughtWorks, Inc., CruiseControl, nor the -names of its contributors may be used to endorse or promote -products derived from this software without specific prior -written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR -CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, -EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, -PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR -PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - ->>> simple-spring-app-0.1.0.build-snapshot - -Cloud Foundry Java Client 1.0 -Copyright (c) 2010-2011 VMware, Inc. All Rights Reserved. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices -and license terms. Your use of these subcomponents is subject to the terms and -conditions of the subcomponent's license, as noted in the LICENSE file. - -This software downloads additional open source software components upon install -that are distributed under separate terms and conditions. Please see the license -information provided in the individual software components for more information. -UNKNOWN - ->>> spring-aop-3.0.7.release - -Copyright 2002-2007 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-aop-3.1.0.release - -Copyright 2002-2006 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-asm-3.0.7.release - -License: Apapche 2.0 - - ->>> spring-asm-3.1.0.release - -License: Apache 2.0 - - ->>> spring-beans-3.0.7.release - -Copyright 2002-2009 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-beans-3.1.0.release - -Copyright 2002-2011 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-context-3.0.7.release - -Copyright 2002-2009 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-context-3.1.0.release - -Spring Framework 3.1 -Copyright (c) 2002-2011 SpringSource, a division of VMware, Inc. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices and -license terms. Your use of the source code for the these subcomponents is subject to -the terms and conditions of the subcomponent's license, as noted in the LICENSE file. - - - -ADDITIONAL LICENSE INFORMATION: - - -\spring-context-3.1.0.RELEASE.jar\META-INF\license.txt - - -SPRING FRAMEWORK 3.1 SUBCOMPONENTS: - -Spring Framework 3.1 includes a number of subcomponents with -separate copyright notices and license terms. The product that -includes this file does not necessarily use all the open source -subcomponents referred to below. Your use of the source -code for these subcomponents is subject to the terms and -conditions of the following licenses. - ->>> asm-2.2.3: - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - -Copyright (c) 1999-2009, OW2 Consortium - -======================================================================= - -To the extent any open source subcomponents are licensed under the EPL and/or other -similar licenses that require the source code and/or modifications to -source code to be made available (as would be noted above), you may obtain a -copy of the source code corresponding to the binaries for such open source -components and modifications thereto, if any, (the "Source Files"), by -downloading the Source Files from http://www.springsource.org/download, -or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview -Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All -such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General -Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent -physical medium. This offer to obtain a copy of the Source Files is valid for three -years from the date you acquired this Software product. - - ->>> spring-context-support-3.0.7.release - -Copyright 2002-2006 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-context-support-3.1.0.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-core-3.0.7.release - -Copyright 2002-2008 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-core-3.1.0.release - -Spring Framework 3.1 - -Copyright (c) 2002-2011 SpringSource, a division of VMware, Inc. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices and license terms. Your use of the source code for the these subcomponents is subject to the terms and conditions of the subcomponent's license, as noted in the LICENSE file. - - -ADDITIONAL LICENSE INFORMATION: - -spring-core-3.1.0.RELEASE.jar\META-INF\ license.txt - -SPRING FRAMEWORK 3.1 SUBCOMPONENTS: - -Spring Framework 3.1 includes a number of subcomponents with separate copyright notices and license terms. The product that includes this file does not necessarily use all the open source subcomponents referred to below. Your use of the source code for these subcomponents is subject to the terms and conditions of the following licenses. - ->>> asm-2.2.3: - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: -1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - - -Copyright (c) 1999-2009, OW2 Consortium - -To the extent any open source subcomponents are licensed under the EPL and/or other similar licenses that require the source code and/or modifications to source code to be made available (as would be noted above), you may obtain a copy of the source code corresponding to the binaries for such open source components and modifications thereto, if any, (the "Source Files"), by downloading the Source Files from http://www.springsource.org/download, or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent physical medium. This offer to obtain a copy of the Source Files is valid for three years from the date you acquired this Software product. - - ->>> spring-expression-3.0.7.release - -Copyright 2002-2009 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-expression-3.1.0.release - -Spring Framework 3.1 -Copyright (c) 2002-2011 SpringSource, a division of VMware, Inc. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices and -license terms. Your use of the source code for the these subcomponents is subject to -the terms and conditions of the subcomponent's license, as noted in the LICENSE file. - - - -ADDITIONAL LICENSE INFORMATION: - - -\spring-expression-3.1.0.RELEASE.jar\META-INF\license.txt - - -SPRING FRAMEWORK 3.1 SUBCOMPONENTS: - -Spring Framework 3.1 includes a number of subcomponents with -separate copyright notices and license terms. The product that -includes this file does not necessarily use all the open source -subcomponents referred to below. Your use of the source -code for these subcomponents is subject to the terms and -conditions of the following licenses. - ->>> asm-2.2.3: - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - -Copyright (c) 1999-2009, OW2 Consortium - -======================================================================= - -To the extent any open source subcomponents are licensed under the EPL and/or other -similar licenses that require the source code and/or modifications to -source code to be made available (as would be noted above), you may obtain a -copy of the source code corresponding to the binaries for such open source -components and modifications thereto, if any, (the "Source Files"), by -downloading the Source Files from http://www.springsource.org/download, -or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview -Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All -such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General -Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent -physical medium. This offer to obtain a copy of the Source Files is valid for three -years from the date you acquired this Software product. - - ->>> spring-security-config-3.1.0.release - -License: Apache 2.0 - - ->>> spring-security-core-3.1.0.release - -Copyright 2004, 2005, 2006 Acegi Technology Pty Limited - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-security-crypto-3.1.0.release - -Copyright 2002-2011 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> MIT - -spring-security-crypto-3.1.0.RELEASE-sources.jar\org\springframework\security\crypto\bcrypt\BCrypt.java - -Copyright (c) 2006 Damien Miller djm@mindrot.org - -Permission to use, copy, modify, and distribute this software for any -purpose with or without fee is hereby granted, provided that the above -copyright notice and this permission notice appear in all copies. - -THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - - ->>> spring-security-oauth2-1.0.0.rc1 - -====================================================================== -== NOTICE file corresponding to section 4 d of the Apache License, == -== Version 2.0, in this case for the spring-security-oauth == -== distribution. == -====================================================================== - -This product includes software developed by -the Apache Software Foundation (http://www.apache.org). - -This product includes software developed by the Spring Framework -Project (http://www.springframework.org). - -The end-user documentation included with a redistribution, if any, -must include the following acknowledgement: - - "This product includes software developed by Web Cohesion - (http://www.webcohesion.com)." - -Alternately, this acknowledgement may appear in the software itself, -if and wherever such third-party acknowledgements normally appear. - -The name spring-security-oauth must not be used to endorse or promote -products derived from this software without prior written permission. -For written permission, please contact ryan@webcohesion.com. - - ->>> spring-security-web-3.1.0.release - -Copyright 2004, 2005, 2006 Acegi Technology Pty Limited - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-test-3.0.7.release - -Copyright 2002-2009 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-web-3.0.7.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-web-3.1.0.release - -Spring Framework 3.1 -Copyright (c) 2002-2011 SpringSource, a division of VMware, Inc. - -This product is licensed to you under the Apache License, Version 2.0 (the "License"). -You may not use this product except in compliance with the License. - -This product may include a number of subcomponents with separate copyright notices and -license terms. Your use of the source code for the these subcomponents is subject to -the terms and conditions of the subcomponent's license, as noted in the LICENSE file. - - - -ADDITIONAL LICENSE INFORMATION: - - -\spring-web-3.1.0.RELEASE.jar\META-INF\\license.txt - - -SPRING FRAMEWORK 3.1 SUBCOMPONENTS: - -Spring Framework 3.1 includes a number of subcomponents with -separate copyright notices and license terms. The product that -includes this file does not necessarily use all the open source -subcomponents referred to below. Your use of the source -code for these subcomponents is subject to the terms and -conditions of the following licenses. - ->>> asm-2.2.3: - -Copyright (c) 2000-2005 INRIA, France Telecom -All rights reserved. - -Redistribution and use in source and binary forms, with or without -modification, are permitted provided that the following conditions -are met: - -1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - -2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - -3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE -ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE -LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR -CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF -SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS -INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN -CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) -ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF -THE POSSIBILITY OF SUCH DAMAGE. - -Copyright (c) 1999-2009, OW2 Consortium - -======================================================================= - -To the extent any open source subcomponents are licensed under the EPL and/or other -similar licenses that require the source code and/or modifications to -source code to be made available (as would be noted above), you may obtain a -copy of the source code corresponding to the binaries for such open source -components and modifications thereto, if any, (the "Source Files"), by -downloading the Source Files from http://www.springsource.org/download, -or by sending a request, with your name and address to: VMware, Inc., 3401 Hillview -Avenue, Palo Alto, CA 94304, United States of America or email info@vmware.com. All -such requests should clearly specify: OPEN SOURCE FILES REQUEST, Attention General -Counsel. VMware shall mail a copy of the Source Files to you on a CD or equivalent -physical medium. This offer to obtain a copy of the Source Files is valid for three -years from the date you acquired this Software product. - - ->>> spring-webmvc-3.0.7.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> spring-webmvc-3.1.0.release - -Copyright 2002-2010 the original author or authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> wagon-file-1.0-beta-6 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations= under the License. - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -wagon-file-1.0-beta-6.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Wagon File Provider - -From: 'Codehaus' (http://www.codehaus.org/) -- Plexus Common Utilities org.codehaus.plexus:plexus-utils:jar:1.4.2License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> wagon-http-1.0-beta-6 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -wagon-http-1.0-beta-6.jar\META-INF\DEPENDENCIES - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Wagon HTTP Provider - -From: 'an unknown organization' -- Codec commons-codec:commons-codec:jar:1.2 -- Neko HTML (http://nekohtml.sourceforge.net/) nekohtml:nekohtml:jar:1.9.6.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) -- Unnamed nekohtml :xercesMinimal:jar:1.9.6.2 nekohtml :Xerces Minimal: jar: 1.9.6.2 - -From: 'Apache Software Foundation' (http://jakarta.apache.org/) - - HttpClient (http://jakarta.apache.org/httpcomponents/httpclient-3.x/) commons-httpclient:commons-httpclient:jar:3.1 -License: Apache License (http://www.apache.org/licenses/LICENSE-2.0) - -From: 'Codehaus' (http://www.codehaus.org/) -- Plexus Common Utilities org.codehaus.plexus:plexus-utils:jar:1.4.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://jakarta.apache.org) -- Logging (http://jakarta.apache.org/commons/logging/) commons-logging:commons-logging:jar:1.0.4 -License: The Apache Software License, Version 2.0 (/LICENSE.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Wagon HTTP Shared Library (http://maven.apache.org/wagon/wagon-providers/wagon-http-shared) org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> wagon-http-lightweight-1.0-beta-6 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - -ADDITIONAL LICENSE INFORMATION: - -> Apache 2.0 - -Transitive dependencies of this project determined from the maven pom organized by organization. -Maven Wagon Lightweight HTTP Provider - -From: 'an unknown organization' - - Neko HTML (http://nekohtml.sourceforge.net/) nekohtml:nekohtml:jar:1.9.6.2 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - Unnamed - nekohtml:xercesMinimal:jar:1.9.6.2 nekohtml:xercesMinimal:jar:1.9.6.2 - -From: 'Codehaus' (http://www.codehaus.org/) - - Plexus Common Utilities org.codehaus.plexus:plexus-utils:jar:1.4.2 - License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) - - Maven Wagon HTTP Shared Library (http://maven.apache.org/wagon/wagon-providers/wagon-http-shared) org.apache.maven.wagon:wagon-http-shared:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> wagon-http-shared-1.0-beta-6 - -Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. - -You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. - - -ADDITIONAL LICENSE INFORMATION: - - -> Apache 2.0 - -Transitive dependencies of this project determined from the maven pom organized by organization. - -Maven Wagon HTTP Shared Library - -From: 'an unknown organization' - Codec commons-codec:commons-codec:jar:1.2 - -- Neko HTML (http://nekohtml.sourceforge.net/) nekohtml:nekohtml:jar:1.9.6.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) -- Unnamed - nekohtml:xercesMinimal:jar:1.9.6.2 nekohtml:xercesMinimal:jar:1.9.6.2 - -From: 'Apache Software Foundation' (http://jakarta.apache.org/) -- HttpClient (http://jakarta.apache.org/httpcomponents/httpclient-3.x/) commons-httpclient:commons-httpclient:jar:3.1 -License: Apache License (http://www.apache.org/licenses/LICENSE-2.0) - -From: 'Codehaus' (http://www.codehaus.org/) -- Plexus Common Utilities org.codehaus.plexus:plexus-utils:jar:1.4.2 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - -From: 'The Apache Software Foundation' (http://jakarta.apache.org) -- Logging (http://jakarta.apache.org/commons/logging/) commons-logging:commons-logging:jar:1.0.4 -License: The Apache Software License, Version 2.0 (/LICENSE.txt) - -From: 'The Apache Software Foundation' (http://www.apache.org/) -- Maven Wagon API (http://maven.apache.org/wagon/wagon-provider-api) org.apache.maven.wagon:wagon-provider-api:jar:1.0-beta-6 -License: The Apache Software License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0.txt) - - ->>> wagon-provider-api-2.2 - -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - - ->>> wagon-ssh-1.0-beta-6 - -Copyright 2001-2006 The Apache Software Foundation. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> wagon-ssh-common-1.0-beta-6 - -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - - ->>> wagon-ssh-external-1.0-beta-6 - -Licensed to the Apache Software Foundation (ASF) under one -or more contributor license agreements. See the NOTICE file -distributed with this work for additional information -regarding copyright ownership. The ASF licenses this file -to you under the Apache License, Version 2.0 (the -"License"); you may not use this file except in compliance -with the License. You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. - - ->>> xercesminimal-1.9.6.2 - -Copyright 2002-2008 Andy Clark - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ---------------- SECTION 3: Common Development and Distribution License, V1.0 ---------- - -Common Development and Distribution License, V1.0 is applicable to the following component(s). - - ->>> jsp-api-2.1 - -The contents of this file are subject to the terms - of the Common Development and Distribution License - (the "License"). You may not use this file except - in compliance with the License. - - You can obtain a copy of the license at - glassfish/bootstrap/legal/CDDLv1.0.txt or - https://glassfish.dev.java.net/public/CDDLv1.0.html. - See the License for the specific language governing - permissions and limitations under the License. - - When distributing Covered Code, include this CDDL - HEADER in each file and include the License file at - glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, - add the following below this CDDL HEADER, with the - fields enclosed by brackets "[]" replaced with your - own identifying information: Portions Copyright [yyyy] - [name of copyright owner] - - Copyright 2005 Sun Microsystems, Inc. All rights reserved. - - -ADDITIONAL LICENSE INFORMATION: - - -> CDDL 1.0 - -jsp-api-2.1-7.0.0pre1-sources.jar\javax\servlet\jsp\resources\web-jsptaglibrary_2_1.xsd - -[PLEASE NOTE: GOPIVOTAL, INC. ELECTS TO USE AND DISTRIBUTE THIS COMPONENT UNDER THE TERMS OF THE CDDL 1.0. PLEASE SEE THE APPENDIX TO REVIEW THE FULL TEXT OF THE CDDL 1.0. THE ORIGINAL LICENSE TERMS ARE REPRODUCED BELOW ONLY AS A REFERENCE.] - -DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. - - Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved. - - Portions Copyright Apache Software Foundation. - - The contents of this file are subject to the terms of either the GNU - General Public License Version 2 only ("GPL") or the Common Development - and Distribution License("CDDL") (collectively, the "License"). You - may not use this file except in compliance with the License. You can obtain - a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL.html - or glassfish/bootstrap/legal/LICENSE.txt. See the License for the specific - language governing permissions and limitations under the License. - - When distributing the software, include this License Header Notice in each - file and include the License file at glassfish/bootstrap/legal/LICENSE.txt. - Sun designates this particular file as subject to the "Classpath" exception - as provided by Sun in the GPL Version 2 section of the License file that - accompanied this code. If applicable, add the following below the License - Header, with the fields enclosed by brackets [] replaced by your own - identifying information: "Portions Copyrighted [year] - [name of copyright owner]" - - Contributor(s): - - If you wish your version of this file to be governed by only the CDDL or - only the GPL Version 2, indicate your decision by adding "[Contributor] - elects to include this software in this distribution under the [CDDL or GPL - Version 2] license." If you don't indicate a single choice of license, a - recipient has the option to distribute your version of this file under - either the CDDL, the GPL Version 2 or to extend the choice of license to - its licensees as provided above. However, if you add GPL Version 2 code - and therefore, elected the GPL Version 2 license, then the option applies - only if the new code is made subject to such option by the copyright - holder. - - -> Apache 2.0 - -sp-api-2.1-7.0.0pre1-sources.jar\javax\servlet\jsp\resources\jspxml_2_0.dtd - -Copyright 2004 The Apache Software Foundation - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - -http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. - - ->>> jstl-1.2 - -The contents of this file are subject to the terms -of the Common Development and Distribution License -(the "License"). You may not use this file except -in compliance with the License. - -You can obtain a copy of the license at -glassfish/bootstrap/legal/CDDLv1.0.txt or -https://glassfish.dev.java.net/public/CDDLv1.0.html. -See the License for the specific language governing -permissions and limitations under the License. - -When distributing Covered Code, include this CDDL -HEADER in each file and include the License file at -glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, -add the following below this CDDL HEADER, with the -fields enclosed by brackets "[]" replaced with your -own identifying information: Portions Copyright [yyyy] -[name of copyright owner] - -Copyright 2005 Sun Microsystems, Inc. All rights reserved. - -Portions Copyright Apache Software Foundation. - - ->>> servlet-api-2.5 - -The contents of this file are subject to the terms -of the Common Development and Distribution License -(the "License"). You may not use this file except -in compliance with the License. - -You can obtain a copy of the license at -glassfish/bootstrap/legal/CDDLv1.0.txt or -https://glassfish.dev.java.net/public/CDDLv1.0.html. -See the License for the specific language governing -permissions and limitations under the License. - -When distributing Covered Code, include this CDDL -HEADER in each file and include the License file at -glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable, -add the following below this CDDL HEADER, with the -fields enclosed by brackets "[]" replaced with your -own identifying information: Portions Copyright [yyyy] -[name of copyright owner] - -Copyright 2005 Sun Microsystems, Inc. All rights reserved. - -Portions Copyright Apache Software Foundation. - - ---------------- SECTION 4: Common Public License, V1.0 ---------- - -Common Public License, V1.0 is applicable to the following component(s). - - ->>> junit-4.8.2 - -LICENSE: CPL 1.0 - - ---------------- SECTION 5: Eclipse Public License, V1.0 ---------- - -Eclipse Public License, V1.0 is applicable to the following component(s). - - ->>> aspectjrt-1.6.9 - -Copyright (c) 1999-2001 Xerox Corporation, 2002 Palo Alto Research Center, Incorporated (PARC). - -All rights reserved. - -This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution and is available at http://www.eclipse.org/legal/epl-v10.html - -Contributors: Xerox/PARC initial implementation - - ->>> javax.inject-1.0.0 - -About - -About This Content -October, 2009 -License -The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available at -http://www.eclipse.org/legal/epl-v10.html -. For purposes of the EPL, "Program" will mean the Content. -If you did not receive this Content directly from the Eclipse Foundation, the Content is being redistributed by another party ("Redistributor") and different terms and conditions may apply to your use of any object code in the Content. Check the Redistributor's license that was provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise indicated below, the terms and conditions of the EPL still apply to any source code in the Content and such source code may be obtained at http://www.eclipse.org. - - -Third Party Content - - -(ADDITIONAL LICENSE INFORMATION) - -The Content includes items that have been sourced from third parties as set out below. If you did not receive this Content directly from the Eclipse Foundation, the following is provided for informational purposes only, and you should look to the Redistributor's license for terms and conditions of use. - - -> Apache 2.0 - -javax.inject 1.0 -This plug-in includes the package "javax.inject" from the atinject project, which is licensed under the Apache 2.0 license, available at -http://www.apache.org/licenses/LICENSE-2.0 -. The license is copied below. -The source for the bundle is available from the atinject website at -http://code.google.com/p/atinject/ -. -Apache License -Version 2.0, January 2004 -http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - -"License" shall mean the terms and conditions for use, reproduction, and -distribution as defined by Sections 1 through 9 of this document. - -"Licensor" shall mean the copyright owner or entity authorized by the copyright -owner that is granting the License. - -"Legal Entity" shall mean the union of the acting entity and all other entities -that control, are controlled by, or are under common control with that entity. -For the purposes of this definition, "control" means (i) the power, direct or -indirect, to cause the direction or management of such entity, whether by -contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the -outstanding shares, or (iii) beneficial ownership of such entity. - -"You" (or "Your") shall mean an individual or Legal Entity exercising -permissions granted by this License. - -"Source" form shall mean the preferred form for making modifications, including -but not limited to software source code, documentation source, and configuration -files. - -"Object" form shall mean any form resulting from mechanical transformation or -translation of a Source form, including but not limited to compiled object code, -generated documentation, and conversions to other media types. - -"Work" shall mean the work of authorship, whether in Source or Object form, made -available under the License, as indicated by a copyright notice that is included -in or attached to the work (an example is provided in the Appendix below). - -"Derivative Works" shall mean any work, whether in Source or Object form, that -is based on (or derived from) the Work and for which the editorial revisions, -annotations, elaborations, or other modifications represent, as a whole, an -original work of authorship. For the purposes of this License, Derivative Works -shall not include works that remain separable from, or merely link (or bind by -name) to the interfaces of, the Work and Derivative Works thereof. - -"Contribution" shall mean any work of authorship, including the original version -of the Work and any modifications or additions to that Work or Derivative Works -thereof, that is intentionally submitted to Licensor for inclusion in the Work -by the copyright owner or by an individual or Legal Entity authorized to submit -on behalf of the copyright owner. For the purposes of this definition, -"submitted" means any form of electronic, verbal, or written communication sent -to the Licensor or its representatives, including but not limited to -communication on electronic mailing lists, source code control systems, and -issue tracking systems that are managed by, or on behalf of, the Licensor for -the purpose of discussing and improving the Work, but excluding communication -that is conspicuously marked or otherwise designated in writing by the copyright -owner as "Not a Contribution." - -"Contributor" shall mean Licensor and any individual or Legal Entity on behalf -of whom a Contribution has been received by Licensor and subsequently -incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of this -License, each Contributor hereby grants to You a perpetual, worldwide, -non-exclusive, no-charge, royalty-free, irrevocable copyright license to -reproduce, prepare Derivative Works of, publicly display, publicly perform, -sublicense, and distribute the Work and such Derivative Works in Source or -Object form. - -3. Grant of Patent License. Subject to the terms and conditions of this License, -each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, -no-charge, royalty-free, irrevocable (except as stated in this section) patent -license to make, have made, use, offer to sell, sell, import, and otherwise -transfer the Work, where such license applies only to those patent claims -licensable by such Contributor that are necessarily infringed by their -Contribution(s) alone or by combination of their Contribution(s) with the Work -to which such Contribution(s) was submitted. If You institute patent litigation -against any entity (including a cross-claim or counterclaim in a lawsuit) -alleging that the Work or a Contribution incorporated within the Work -constitutes direct or contributory patent infringement, then any patent licenses -granted to You under this License for that Work shall terminate as of the date -such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the Work or -Derivative Works thereof in any medium, with or without modifications, and in -Source or Object form, provided that You meet the following conditions: - - 1. You must give any other recipients of the Work or Derivative Works a copy - of this License; and - - 2. You must cause any modified files to carry prominent notices stating that - You changed the files; and - - 3. You must retain, in the Source form of any Derivative Works that You - distribute, all copyright, patent, trademark, and attribution notices from - the Source form of the Work, excluding those notices that do not pertain to - any part of the Derivative Works; and - - 4. If the Work includes a "NOTICE" text file as part of its distribution, - then any Derivative Works that You distribute must include a readable copy of - the attribution notices contained within such NOTICE file, excluding those - notices that do not pertain to any part of the Derivative Works, in at least - one of the following places: within a NOTICE text file distributed as part of - the Derivative Works; within the Source form or documentation, if provided - along with the Derivative Works; or, within a display generated by the - Derivative Works, if and wherever such third-party notices normally appear. - The contents of the NOTICE file are for informational purposes only and do - not modify the License. You may add Your own attribution notices within - Derivative Works that You distribute, alongside or as an addendum to the - NOTICE text from the Work, provided that such additional attribution notices - cannot be construed as modifying the License. - -You may add Your own copyright statement to Your modifications and may provide -additional or different license terms and conditions for use, reproduction, or -distribution of Your modifications, or for any such Derivative Works as a whole, -provided Your use, reproduction, and distribution of the Work otherwise complies -with the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, any -Contribution intentionally submitted for inclusion in the Work by You to the -Licensor shall be under the terms and conditions of this License, without any -additional terms or conditions. Notwithstanding the above, nothing herein shall -supersede or modify the terms of any separate license agreement you may have -executed with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade names, -trademarks, service marks, or product names of the Licensor, except as required -for reasonable and customary use in describing the origin of the Work and -reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or agreed to in -writing, Licensor provides the Work (and each Contributor provides its -Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied, including, without limitation, any warranties -or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A -PARTICULAR PURPOSE. You are solely responsible for determining the -appropriateness of using or redistributing the Work and assume any risks -associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, whether in -tort (including negligence), contract, or otherwise, unless required by -applicable law (such as deliberate and grossly negligent acts) or agreed to in -writing, shall any Contributor be liable to You for damages, including any -direct, indirect, special, incidental, or consequential damages of any character -arising as a result of this License or out of the use or inability to use the -Work (including but not limited to damages for loss of goodwill, work stoppage, -computer failure or malfunction, or any and all other commercial damages or -losses), even if such Contributor has been advised of the possibility of such -damages. - -9. Accepting Warranty or Additional Liability. While redistributing the Work or -Derivative Works thereof, You may choose to offer, and charge a fee for, -acceptance of support, warranty, indemnity, or other liability obligations -and/or rights consistent with this License. However, in accepting such -obligations, You may act only on Your own behalf and on Your sole -responsibility, not on behalf of any other Contributor, and only if You agree -to indemnify, defend, and hold each Contributor harmless for any liability -incurred by, or claims asserted against, such Contributor by reason of your -accepting any such warranty or additional liability. - - -=============== APPENDIX. Standard License Files ============== - - - - ---------------- SECTION 1: Common Development and Distribution License, V1.0 ----------- - -COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 - -1. Definitions. - -1.1. "Contributor" means each individual or entity that creates or -contributes to the creation of Modifications. - -1.2. "Contributor Version" means the combination of the Original Software, -prior Modifications used by a Contributor (if any), and the Modifications -made by that particular Contributor. - -1.3. "Covered Software" means (a) the Original Software, or (b) -Modifications, or (c) the combination of files containing Original -Software with files containing Modifications, in each case including -portions thereof. - -1.4. "Executable" means the Covered Software in any form other than -Source Code. - -1.5. "Initial Developer" means the individual or entity that first makes -Original Software available under this License. - -1.6. "Larger Work" means a work which combines Covered Software or -portions thereof with code not governed by the terms of this License. - -1.7. "License" means this document. - -1.8. "Licensable" means having the right to grant, to the maximum extent -possible, whether at the time of the initial grant or subsequently -acquired, any and all of the rights conveyed herein. - -1.9. "Modifications" means the Source Code and Executable form of any -of the following: - - A. Any file that results from an addition to, deletion from or - modification of the contents of a file containing Original Software - or previous Modifications; - - B. Any new file that contains any part of the Original Software or - previous Modification; or - - C. Any new file that is contributed or otherwise made available - under the terms of this License. - -1.10. "Original Software" means the Source Code and Executable form of -computer software code that is originally released under this License. - -1.11. "Patent Claims" means any patent claim(s), now owned or hereafter -acquired, including without limitation, method, process, and apparatus -claims, in any patent Licensable by grantor. - -1.12. "Source Code" means (a) the common form of computer software code -in which modifications are made and (b) associated documentation included -in or with such code. - -1.13. "You" (or "Your") means an individual or a legal entity exercising -rights under, and complying with all of the terms of, this License. For -legal entities, "You" includes any entity which controls, is controlled -by, or is under common control with You. For purposes of this definition, -"control" means (a) the power, direct or indirect, to cause the direction -or management of such entity, whether by contract or otherwise, or (b) -ownership of more than fifty percent (50%) of the outstanding shares or -beneficial ownership of such entity. - -2. License Grants. - -2.1. The Initial Developer Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, the Initial Developer hereby -grants You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer, to use, reproduce, modify, - display, perform, sublicense and distribute the Original Software - (or portions thereof), with or without Modifications, and/or as part - of a Larger Work; and - - (b) under Patent Claims infringed by the making, using or selling - of Original Software, to make, have made, use, practice, sell, and - offer for sale, and/or otherwise dispose of the Original Software - (or portions thereof). - - (c) The licenses granted in Sections 2.1(a) and (b) are effective - on the date Initial Developer first distributes or otherwise makes - the Original Software available to a third party under the terms of - this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: (1) for code that You delete from the Original Software, - or (2) for infringements caused by: (i) the modification of the - Original Software, or (ii) the combination of the Original Software - with other software or devices. - -2.2. Contributor Grant. - -Conditioned upon Your compliance with Section 3.1 below and subject to -third party intellectual property claims, each Contributor hereby grants -You a world-wide, royalty-free, non-exclusive license: - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications created - by such Contributor (or portions thereof), either on an unmodified - basis, with other Modifications, as Covered Software and/or as part - of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or selling - of Modifications made by that Contributor either alone and/or - in combination with its Contributor Version (or portions of such - combination), to make, use, sell, offer for sale, have made, and/or - otherwise dispose of: (1) Modifications made by that Contributor - (or portions thereof); and (2) the combination of Modifications - made by that Contributor with its Contributor Version (or portions - of such combination). - - (c) The licenses granted in Sections 2.2(a) and 2.2(b) are effective - on the date Contributor first distributes or otherwise makes the - Modifications available to a third party. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: (1) for any code that Contributor has deleted from the - Contributor Version; (2) for infringements caused by: (i) third - party modifications of Contributor Version, or (ii) the combination - of Modifications made by that Contributor with other software - (except as part of the Contributor Version) or other devices; or (3) - under Patent Claims infringed by Covered Software in the absence of - Modifications made by that Contributor. - -3. Distribution Obligations. - -3.1. Availability of Source Code. - -Any Covered Software that You distribute or otherwise make available -in Executable form must also be made available in Source Code form and -that Source Code form must be distributed only under the terms of this -License. You must include a copy of this License with every copy of the -Source Code form of the Covered Software You distribute or otherwise make -available. You must inform recipients of any such Covered Software in -Executable form as to how they can obtain such Covered Software in Source -Code form in a reasonable manner on or through a medium customarily used -for software exchange. - -3.2. Modifications. - -The Modifications that You create or to which You contribute are governed -by the terms of this License. You represent that You believe Your -Modifications are Your original creation(s) and/or You have sufficient -rights to grant the rights conveyed by this License. - -3.3. Required Notices. - -You must include a notice in each of Your Modifications that identifies -You as the Contributor of the Modification. You may not remove or alter -any copyright, patent or trademark notices contained within the Covered -Software, or any notices of licensing or any descriptive text giving -attribution to any Contributor or the Initial Developer. - -3.4. Application of Additional Terms. - -You may not offer or impose any terms on any Covered Software in Source -Code form that alters or restricts the applicable version of this License -or the recipients' rights hereunder. You may choose to offer, and to -charge a fee for, warranty, support, indemnity or liability obligations to -one or more recipients of Covered Software. However, you may do so only -on Your own behalf, and not on behalf of the Initial Developer or any -Contributor. You must make it absolutely clear that any such warranty, -support, indemnity or liability obligation is offered by You alone, and -You hereby agree to indemnify the Initial Developer and every Contributor -for any liability incurred by the Initial Developer or such Contributor -as a result of warranty, support, indemnity or liability terms You offer. - -3.5. Distribution of Executable Versions. - -You may distribute the Executable form of the Covered Software under the -terms of this License or under the terms of a license of Your choice, -which may contain terms different from this License, provided that You are -in compliance with the terms of this License and that the license for the -Executable form does not attempt to limit or alter the recipient's rights -in the Source Code form from the rights set forth in this License. If -You distribute the Covered Software in Executable form under a different -license, You must make it absolutely clear that any terms which differ -from this License are offered by You alone, not by the Initial Developer -or Contributor. You hereby agree to indemnify the Initial Developer and -every Contributor for any liability incurred by the Initial Developer -or such Contributor as a result of any such terms You offer. - -3.6. Larger Works. - -You may create a Larger Work by combining Covered Software with other code -not governed by the terms of this License and distribute the Larger Work -as a single product. In such a case, You must make sure the requirements -of this License are fulfilled for the Covered Software. - -4. Versions of the License. - -4.1. New Versions. - -Sun Microsystems, Inc. is the initial license steward and may publish -revised and/or new versions of this License from time to time. Each -version will be given a distinguishing version number. Except as provided -in Section 4.3, no one other than the license steward has the right to -modify this License. - -4.2. Effect of New Versions. - -You may always continue to use, distribute or otherwise make the Covered -Software available under the terms of the version of the License under -which You originally received the Covered Software. If the Initial -Developer includes a notice in the Original Software prohibiting it -from being distributed or otherwise made available under any subsequent -version of the License, You must distribute and make the Covered Software -available under the terms of the version of the License under which You -originally received the Covered Software. Otherwise, You may also choose -to use, distribute or otherwise make the Covered Software available -under the terms of any subsequent version of the License published by -the license steward. - -4.3. Modified Versions. - -When You are an Initial Developer and You want to create a new license -for Your Original Software, You may create and use a modified version of -this License if You: (a) rename the license and remove any references -to the name of the license steward (except to note that the license -differs from this License); and (b) otherwise make it clear that the -license contains terms which differ from this License. - -5. DISCLAIMER OF WARRANTY. - -COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, -WITHOUT LIMITATION, WARRANTIES THAT THE COVERED SOFTWARE IS FREE OF -DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE -ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED SOFTWARE -IS WITH YOU. SHOULD ANY COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, -YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST -OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF -WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF ANY -COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -6. TERMINATION. - -6.1. This License and the rights granted hereunder will terminate -automatically if You fail to comply with terms herein and fail to cure -such breach within 30 days of becoming aware of the breach. Provisions -which, by their nature, must remain in effect beyond the termination of -this License shall survive. - -6.2. If You assert a patent infringement claim (excluding declaratory -judgment actions) against Initial Developer or a Contributor (the -Initial Developer or Contributor against whom You assert such claim is -referred to as "Participant") alleging that the Participant Software -(meaning the Contributor Version where the Participant is a Contributor -or the Original Software where the Participant is the Initial Developer) -directly or indirectly infringes any patent, then any and all rights -granted directly or indirectly to You by such Participant, the Initial -Developer (if the Initial Developer is not the Participant) and all -Contributors under Sections 2.1 and/or 2.2 of this License shall, upon 60 -days notice from Participant terminate prospectively and automatically -at the expiration of such 60 day notice period, unless if within such -60 day period You withdraw Your claim with respect to the Participant -Software against such Participant either unilaterally or pursuant to a -written agreement with Participant. - -6.3. In the event of termination under Sections 6.1 or 6.2 above, all end -user licenses that have been validly granted by You or any distributor -hereunder prior to termination (excluding licenses granted to You by -any distributor) shall survive termination. - -7. LIMITATION OF LIABILITY. - -UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING -NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY -OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED SOFTWARE, OR ANY SUPPLIER -OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, -INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT -LIMITATION, DAMAGES FOR LOST PROFITS, LOSS OF GOODWILL, WORK STOPPAGE, -COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER COMMERCIAL DAMAGES -OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN INFORMED OF THE POSSIBILITY -OF SUCH DAMAGES. THIS LIMITATION OF LIABILITY SHALL NOT APPLY TO LIABILITY -FOR DEATH OR PERSONAL INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO -THE EXTENT APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS -DO NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL -DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -8. U.S. GOVERNMENT END USERS. - -The Covered Software is a "commercial item," as that term is defined -in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer -software" (as that term is defined at 48 C.F.R. 252.227-7014(a)(1)) and -"commercial computer software documentation" as such terms are used in -48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 -C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End -Users acquire Covered Software with only those rights set forth herein. -This U.S. Government Rights clause is in lieu of, and supersedes, any -other FAR, DFAR, or other clause or provision that addresses Government -rights in computer software under this License. - -9. MISCELLANEOUS. - -This License represents the complete agreement concerning subject matter -hereof. If any provision of this License is held to be unenforceable, -such provision shall be reformed only to the extent necessary to make it -enforceable. This License shall be governed by the law of the jurisdiction -specified in a notice contained within the Original Software (except to -the extent applicable law, if any, provides otherwise), excluding such -jurisdiction's conflict-of-law provisions. Any litigation relating to -this License shall be subject to the jurisdiction of the courts located -in the jurisdiction and venue specified in a notice contained within -the Original Software, with the losing party responsible for costs, -including, without limitation, court costs and reasonable attorneys' -fees and expenses. The application of the United Nations Convention on -Contracts for the International Sale of Goods is expressly excluded. Any -law or regulation which provides that the language of a contract shall -be construed against the drafter shall not apply to this License. -You agree that You alone are responsible for compliance with the United -States export administration regulations (and the export control laws and -regulation of any other countries) when You use, distribute or otherwise -make available any Covered Software. - -10. RESPONSIBILITY FOR CLAIMS. - -As between Initial Developer and the Contributors, each party is -responsible for claims and damages arising, directly or indirectly, out -of its utilization of rights under this License and You agree to work -with Initial Developer and Contributors to distribute such responsibility -on an equitable basis. Nothing herein is intended or shall be deemed to -constitute any admission of liability. - - - ---------------- SECTION 2: Eclipse Public License, V1.0 ----------- - -Eclipse Public License - v 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE -PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION -OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; where such changes and/or - additions to the Program originate from and are distributed - by that particular Contributor. A Contribution 'originates' - from a Contributor if it was added to the Program by such - Contributor itself or anyone acting on such Contributor's - behalf. Contributions do not include additions to the Program - which: (i) are separate modules of software distributed in - conjunction with the Program under their own license agreement, - and (ii) are not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents" mean patent claims licensable by a Contributor which -are necessarily infringed by the use or sale of its Contribution alone -or when combined with the Program. - -"Program" means the Contributions distributed in accordance with this -Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free copyright - license to reproduce, prepare derivative works of, publicly display, - publicly perform, distribute and sublicense the Contribution of such - Contributor, if any, and such derivative works, in source code and - object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free patent - license under Licensed Patents to make, use, sell, offer to sell, - import and otherwise transfer the Contribution of such Contributor, - if any, in source code and object code form. This patent license - shall apply to the combination of the Contribution and the Program - if, at the time the Contribution is added by the Contributor, such - addition of the Contribution causes such combination to be covered - by the Licensed Patents. The patent license shall not apply to any - other combinations which include the Contribution. No hardware per - se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. Each - Contributor disclaims any liability to Recipient for claims brought by - any other entity based on infringement of intellectual property rights - or otherwise. As a condition to exercising the rights and licenses - granted hereunder, each Recipient hereby assumes sole responsibility - to secure any other intellectual property rights needed, if any. For - example, if a third party patent license is required to allow - Recipient to distribute the Program, it is Recipient's responsibility - to acquire that license before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form -under its own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all - warranties and conditions, express and implied, including - warranties or conditions of title and non-infringement, and - implied warranties or conditions of merchantability and fitness - for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all - liability for damages, including direct, indirect, special, - incidental and consequential damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement - are offered by that Contributor alone and not by any other - party; and - - iv) states that source code for the Program is available from - such Contributor, and informs licensees how to obtain it in a - reasonable manner on or through a medium customarily used for - software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of - the Program. Contributors may not remove or alter any copyright - notices contained within the Program. - -Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities -with respect to end users, business partners and the like. While this -license is intended to facilitate the commercial use of the Program, the -Contributor who includes the Program in a commercial product offering -should do so in a manner which does not create potential liability for -other Contributors. Therefore, if a Contributor includes the Program in a -commercial product offering, such Contributor ("Commercial Contributor") -hereby agrees to defend and indemnify every other Contributor -("Indemnified Contributor") against any losses, damages and costs -(collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any -claims or Losses relating to any actual or alleged intellectual property -infringement. In order to qualify, an Indemnified Contributor must: a) -promptly notify the Commercial Contributor in writing of such claim, -and b) allow the Commercial Contributor to control, and cooperate with -the Commercial Contributor in, the defense and any related settlement -negotiations. The Indemnified Contributor may participate in any such -claim at its own expense. - -For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance claims, -or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under -this section, the Commercial Contributor would have to defend claims -against the other Contributors related to those performance claims and -warranties, and if a court requires any other Contributor to pay any -damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED -ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER -EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR -CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. Each Recipient is solely responsible for determining -the appropriateness of using and distributing the Program and assumes -all risks associated with its exercise of rights under this Agreement -, including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR -ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION -OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against any entity (including -a cross-claim or counterclaim in a lawsuit) alleging that the Program -itself (excluding combinations of the Program with other software or -hardware) infringes such Recipient's patent(s), then such Recipient's -rights granted under Section 2(b) shall terminate as of the date such -litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails -to comply with any of the material terms or conditions of this Agreement -and does not cure such failure in a reasonable period of time after -becoming aware of such noncompliance. If all Recipient's rights under -this Agreement terminate, Recipient agrees to cease use and distribution -of the Program as soon as reasonably practicable. However, Recipient's -obligations under this Agreement and any licenses granted by Recipient -relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, -but in order to avoid inconsistency the Agreement is copyrighted and may -only be modified in the following manner. The Agreement Steward reserves -the right to publish new versions (including revisions) of this Agreement -from time to time. No one other than the Agreement Steward has the right -to modify this Agreement. The Eclipse Foundation is the initial Agreement -Steward. The Eclipse Foundation may assign the responsibility to serve -as the Agreement Steward to a suitable separate entity. Each new version -of the Agreement will be given a distinguishing version number. The -Program (including Contributions) may always be distributed subject to -the version of the Agreement under which it was received. In addition, -after a new version of the Agreement is published, Contributor may elect -to distribute the Program (including its Contributions) under the new -version. Except as expressly stated in Sections 2(a) and 2(b) above, -Recipient receives no rights or licenses to the intellectual property of -any Contributor under this Agreement, whether expressly, by implication, -estoppel or otherwise. All rights in the Program not expressly granted -under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to -this Agreement will bring a legal action under this Agreement more than -one year after the cause of action arose. Each party waives its rights -to a jury trial in any resulting litigation. - - - ---------------- SECTION 3: Common Public License, V1.0 ----------- - -Common Public License Version 1.0 - -THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS COMMON PUBLIC -LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM -CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT. - -1. DEFINITIONS - -"Contribution" means: - - a) in the case of the initial Contributor, the initial code and - documentation distributed under this Agreement, and - - b) in the case of each subsequent Contributor: - - i) changes to the Program, and - - ii) additions to the Program; - - where such changes and/or additions to the Program originate from - and are distributed by that particular Contributor. A Contribution - 'originates' from a Contributor if it was added to the Program - by such Contributor itself or anyone acting on such Contributor's - behalf. Contributions do not include additions to the Program which: - (i) are separate modules of software distributed in conjunction - with the Program under their own license agreement, and (ii) are - not derivative works of the Program. - -"Contributor" means any person or entity that distributes the Program. - -"Licensed Patents " mean patent claims licensable by a Contributor which are -necessarily infringed by the use or sale of its Contribution alone or when -combined with the Program. - -"Program" means the Contributions distributed in accordance with this Agreement. - -"Recipient" means anyone who receives the Program under this Agreement, -including all Contributors. - -2. GRANT OF RIGHTS - - a) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free copyright - license to reproduce, prepare derivative works of, publicly display, - publicly perform, distribute and sublicense the Contribution of such - Contributor, if any, and such derivative works, in source code and - object code form. - - b) Subject to the terms of this Agreement, each Contributor hereby - grants Recipient a non-exclusive, worldwide, royalty-free patent - license under Licensed Patents to make, use, sell, offer to sell, - import and otherwise transfer the Contribution of such Contributor, - if any, in source code and object code form. This patent license - shall apply to the combination of the Contribution and the Program - if, at the time the Contribution is added by the Contributor, such - addition of the Contribution causes such combination to be covered - by the Licensed Patents. The patent license shall not apply to any - other combinations which include the Contribution. No hardware per - se is licensed hereunder. - - c) Recipient understands that although each Contributor grants the - licenses to its Contributions set forth herein, no assurances are - provided by any Contributor that the Program does not infringe the - patent or other intellectual property rights of any other entity. Each - Contributor disclaims any liability to Recipient for claims brought by - any other entity based on infringement of intellectual property rights - or otherwise. As a condition to exercising the rights and licenses - granted hereunder, each Recipient hereby assumes sole responsibility - to secure any other intellectual property rights needed, if any. - For example, if a third party patent license is required to allow - Recipient to distribute the Program, it is Recipient's responsibility - to acquire that license before distributing the Program. - - d) Each Contributor represents that to its knowledge it has sufficient - copyright rights in its Contribution, if any, to grant the copyright - license set forth in this Agreement. - -3. REQUIREMENTS - -A Contributor may choose to distribute the Program in object code form under its -own license agreement, provided that: - - a) it complies with the terms and conditions of this Agreement; and - - b) its license agreement: - - i) effectively disclaims on behalf of all Contributors all - warranties and conditions, express and implied, including - warranties or conditions of title and non-infringement, and - implied warranties or conditions of merchantability and fitness - for a particular purpose; - - ii) effectively excludes on behalf of all Contributors all - liability for damages, including direct, indirect, special, - incidental and consequential damages, such as lost profits; - - iii) states that any provisions which differ from this Agreement - are offered by that Contributor alone and not by any other - party; and - - iv) states that source code for the Program is available from - such Contributor, and informs licensees how to obtain it in a - reasonable manner on or through a medium customarily used for - software exchange. - -When the Program is made available in source code form: - - a) it must be made available under this Agreement; and - - b) a copy of this Agreement must be included with each copy of the Program. -Contributors may not remove or alter any copyright notices contained -within the Program. - -Each Contributor must identify itself as the originator of its -Contribution, if any, in a manner that reasonably allows subsequent -Recipients to identify the originator of the Contribution. - -4. COMMERCIAL DISTRIBUTION - -Commercial distributors of software may accept certain responsibilities -with respect to end users, business partners and the like. While this -license is intended to facilitate the commercial use of the Program, the -Contributor who includes the Program in a commercial product offering -should do so in a manner which does not create potential liability for -other Contributors. Therefore, if a Contributor includes the Program in a -commercial product offering, such Contributor ("Commercial Contributor") -hereby agrees to defend and indemnify every other Contributor -("Indemnified Contributor") against any losses, damages and costs -(collectively "Losses") arising from claims, lawsuits and other legal -actions brought by a third party against the Indemnified Contributor to -the extent caused by the acts or omissions of such Commercial Contributor -in connection with its distribution of the Program in a commercial -product offering. The obligations in this section do not apply to any -claims or Losses relating to any actual or alleged intellectual property -infringement. In order to qualify, an Indemnified Contributor must: - - a) promptly notify the Commercial Contributor in writing of such - claim, and - - b) allow the Commercial Contributor to control, and cooperate with - the Commercial Contributor in, the defense and any related settlement - negotiations. The Indemnified Contributor may participate in any - such claim at its own expense. - -For example, a Contributor might include the Program in a commercial -product offering, Product X. That Contributor is then a Commercial -Contributor. If that Commercial Contributor then makes performance claims, -or offers warranties related to Product X, those performance claims and -warranties are such Commercial Contributor's responsibility alone. Under -this section, the Commercial Contributor would have to defend claims -against the other Contributors related to those performance claims and -warranties, and if a court requires any other Contributor to pay any -damages as a result, the Commercial Contributor must pay those damages. - -5. NO WARRANTY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED -ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER -EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR -CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A -PARTICULAR PURPOSE. Each Recipient is solely responsible for determining -the appropriateness of using and distributing the Program and assumes -all risks associated with its exercise of rights under this Agreement, -including but not limited to the risks and costs of program errors, -compliance with applicable laws, damage to or loss of data, programs or -equipment, and unavailability or interruption of operations. - -6. DISCLAIMER OF LIABILITY - -EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR -ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, -INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING -WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF -LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING -NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION -OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF -ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - -7. GENERAL - -If any provision of this Agreement is invalid or unenforceable under -applicable law, it shall not affect the validity or enforceability of -the remainder of the terms of this Agreement, and without further action -by the parties hereto, such provision shall be reformed to the minimum -extent necessary to make such provision valid and enforceable. - -If Recipient institutes patent litigation against a Contributor with -respect to a patent applicable to software (including a cross-claim or -counterclaim in a lawsuit), then any patent licenses granted by that -Contributor to such Recipient under this Agreement shall terminate -as of the date such litigation is filed. In addition, if Recipient -institutes patent litigation against any entity (including a cross-claim -or counterclaim in a lawsuit) alleging that the Program itself (excluding -combinations of the Program with other software or hardware) infringes -such Recipient's patent(s), then such Recipient's rights granted under -Section 2(b) shall terminate as of the date such litigation is filed. - -All Recipient's rights under this Agreement shall terminate if it fails -to comply with any of the material terms or conditions of this Agreement -and does not cure such failure in a reasonable period of time after -becoming aware of such noncompliance. If all Recipient's rights under -this Agreement terminate, Recipient agrees to cease use and distribution -of the Program as soon as reasonably practicable. However, Recipient's -obligations under this Agreement and any licenses granted by Recipient -relating to the Program shall continue and survive. - -Everyone is permitted to copy and distribute copies of this Agreement, -but in order to avoid inconsistency the Agreement is copyrighted and may -only be modified in the following manner. The Agreement Steward reserves -the right to publish new versions (including revisions) of this Agreement -from time to time. No one other than the Agreement Steward has the right -to modify this Agreement. IBM is the initial Agreement Steward. IBM -may assign the responsibility to serve as the Agreement Steward to a -suitable separate entity. Each new version of the Agreement will be given -a distinguishing version number. The Program (including Contributions) -may always be distributed subject to the version of the Agreement under -which it was received. In addition, after a new version of the Agreement -is published, Contributor may elect to distribute the Program (including -its Contributions) under the new version. Except as expressly stated in -Sections 2(a) and 2(b) above, Recipient receives no rights or licenses -to the intellectual property of any Contributor under this Agreement, -whether expressly, by implication, estoppel or otherwise. All rights in -the Program not expressly granted under this Agreement are reserved. - -This Agreement is governed by the laws of the State of New York and the -intellectual property laws of the United States of America. No party to -this Agreement will bring a legal action under this Agreement more than -one year after the cause of action arose. Each party waives its rights -to a jury trial in any resulting litigation. - - - -=========================================================================== - -To the extent any open source components are licensed under the -GPL and/or LGPL, or other similar licenses that require the -source code and/or modifications to source code to be made -available (as would be noted above), you may obtain a copy of -the source code corresponding to the binaries for such open -source components and modifications thereto, if any, (the -"Source Files"), by downloading the Source Files from VMware's website at -http://www.vmware.com/download/open_source.html, or by sending a request, -with your name and address to: GoPivotal, Inc., 1900 S. Norfolk Street #125, -San Mateo, CA 94403, Attention: General Counsel. -All such requests should clearly specify: OPEN SOURCE FILES REQUEST, -Attention General Counsel. GoPivotal shall mail a copy of the -Source Files to you on a CD or equivalent physical medium. This -offer to obtain a copy of the Source Files is valid for three -years from the date you acquired this Software product. Alternatively, -the Source Files may accompany the GoPivotal product. - -[CFVCAPJAVACLIENT8152013AV082013] diff --git a/mvnw b/mvnw new file mode 100755 index 00000000000..19529ddf8c6 --- /dev/null +++ b/mvnw @@ -0,0 +1,259 @@ +#!/bin/sh +# ---------------------------------------------------------------------------- +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# ---------------------------------------------------------------------------- + +# ---------------------------------------------------------------------------- +# Apache Maven Wrapper startup batch script, version 3.3.2 +# +# Optional ENV vars +# ----------------- +# JAVA_HOME - location of a JDK home dir, required when download maven via java source +# MVNW_REPOURL - repo url base for downloading maven distribution +# MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +# MVNW_VERBOSE - true: enable verbose log; debug: trace the mvnw script; others: silence the output +# ---------------------------------------------------------------------------- + +set -euf +[ "${MVNW_VERBOSE-}" != debug ] || set -x + +# OS specific support. +native_path() { printf %s\\n "$1"; } +case "$(uname)" in +CYGWIN* | MINGW*) + [ -z "${JAVA_HOME-}" ] || JAVA_HOME="$(cygpath --unix "$JAVA_HOME")" + native_path() { cygpath --path --windows "$1"; } + ;; +esac + +# set JAVACMD and JAVACCMD +set_java_home() { + # For Cygwin and MinGW, ensure paths are in Unix format before anything is touched + if [ -n "${JAVA_HOME-}" ]; then + if [ -x "$JAVA_HOME/jre/sh/java" ]; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + JAVACCMD="$JAVA_HOME/jre/sh/javac" + else + JAVACMD="$JAVA_HOME/bin/java" + JAVACCMD="$JAVA_HOME/bin/javac" + + if [ ! -x "$JAVACMD" ] || [ ! -x "$JAVACCMD" ]; then + echo "The JAVA_HOME environment variable is not defined correctly, so mvnw cannot run." >&2 + echo "JAVA_HOME is set to \"$JAVA_HOME\", but \"\$JAVA_HOME/bin/java\" or \"\$JAVA_HOME/bin/javac\" does not exist." >&2 + return 1 + fi + fi + else + JAVACMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v java + )" || : + JAVACCMD="$( + 'set' +e + 'unset' -f command 2>/dev/null + 'command' -v javac + )" || : + + if [ ! -x "${JAVACMD-}" ] || [ ! -x "${JAVACCMD-}" ]; then + echo "The java/javac command does not exist in PATH nor is JAVA_HOME set, so mvnw cannot run." >&2 + return 1 + fi + fi +} + +# hash string like Java String::hashCode +hash_string() { + str="${1:-}" h=0 + while [ -n "$str" ]; do + char="${str%"${str#?}"}" + h=$(((h * 31 + $(LC_CTYPE=C printf %d "'$char")) % 4294967296)) + str="${str#?}" + done + printf %x\\n $h +} + +verbose() { :; } +[ "${MVNW_VERBOSE-}" != true ] || verbose() { printf %s\\n "${1-}"; } + +die() { + printf %s\\n "$1" >&2 + exit 1 +} + +trim() { + # MWRAPPER-139: + # Trims trailing and leading whitespace, carriage returns, tabs, and linefeeds. + # Needed for removing poorly interpreted newline sequences when running in more + # exotic environments such as mingw bash on Windows. + printf "%s" "${1}" | tr -d '[:space:]' +} + +# parse distributionUrl and optional distributionSha256Sum, requires .mvn/wrapper/maven-wrapper.properties +while IFS="=" read -r key value; do + case "${key-}" in + distributionUrl) distributionUrl=$(trim "${value-}") ;; + distributionSha256Sum) distributionSha256Sum=$(trim "${value-}") ;; + esac +done <"${0%/*}/.mvn/wrapper/maven-wrapper.properties" +[ -n "${distributionUrl-}" ] || die "cannot read distributionUrl property in ${0%/*}/.mvn/wrapper/maven-wrapper.properties" + +case "${distributionUrl##*/}" in +maven-mvnd-*bin.*) + MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ + case "${PROCESSOR_ARCHITECTURE-}${PROCESSOR_ARCHITEW6432-}:$(uname -a)" in + *AMD64:CYGWIN* | *AMD64:MINGW*) distributionPlatform=windows-amd64 ;; + :Darwin*x86_64) distributionPlatform=darwin-amd64 ;; + :Darwin*arm64) distributionPlatform=darwin-aarch64 ;; + :Linux*x86_64*) distributionPlatform=linux-amd64 ;; + *) + echo "Cannot detect native platform for mvnd on $(uname)-$(uname -m), use pure java version" >&2 + distributionPlatform=linux-amd64 + ;; + esac + distributionUrl="${distributionUrl%-bin.*}-$distributionPlatform.zip" + ;; +maven-mvnd-*) MVN_CMD=mvnd.sh _MVNW_REPO_PATTERN=/maven/mvnd/ ;; +*) MVN_CMD="mvn${0##*/mvnw}" _MVNW_REPO_PATTERN=/org/apache/maven/ ;; +esac + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +[ -z "${MVNW_REPOURL-}" ] || distributionUrl="$MVNW_REPOURL$_MVNW_REPO_PATTERN${distributionUrl#*"$_MVNW_REPO_PATTERN"}" +distributionUrlName="${distributionUrl##*/}" +distributionUrlNameMain="${distributionUrlName%.*}" +distributionUrlNameMain="${distributionUrlNameMain%-bin}" +MAVEN_USER_HOME="${MAVEN_USER_HOME:-${HOME}/.m2}" +MAVEN_HOME="${MAVEN_USER_HOME}/wrapper/dists/${distributionUrlNameMain-}/$(hash_string "$distributionUrl")" + +exec_maven() { + unset MVNW_VERBOSE MVNW_USERNAME MVNW_PASSWORD MVNW_REPOURL || : + exec "$MAVEN_HOME/bin/$MVN_CMD" "$@" || die "cannot exec $MAVEN_HOME/bin/$MVN_CMD" +} + +if [ -d "$MAVEN_HOME" ]; then + verbose "found existing MAVEN_HOME at $MAVEN_HOME" + exec_maven "$@" +fi + +case "${distributionUrl-}" in +*?-bin.zip | *?maven-mvnd-?*-?*.zip) ;; +*) die "distributionUrl is not valid, must match *-bin.zip or maven-mvnd-*.zip, but found '${distributionUrl-}'" ;; +esac + +# prepare tmp dir +if TMP_DOWNLOAD_DIR="$(mktemp -d)" && [ -d "$TMP_DOWNLOAD_DIR" ]; then + clean() { rm -rf -- "$TMP_DOWNLOAD_DIR"; } + trap clean HUP INT TERM EXIT +else + die "cannot create temp dir" +fi + +mkdir -p -- "${MAVEN_HOME%/*}" + +# Download and Install Apache Maven +verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +verbose "Downloading from: $distributionUrl" +verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +# select .zip or .tar.gz +if ! command -v unzip >/dev/null; then + distributionUrl="${distributionUrl%.zip}.tar.gz" + distributionUrlName="${distributionUrl##*/}" +fi + +# verbose opt +__MVNW_QUIET_WGET=--quiet __MVNW_QUIET_CURL=--silent __MVNW_QUIET_UNZIP=-q __MVNW_QUIET_TAR='' +[ "${MVNW_VERBOSE-}" != true ] || __MVNW_QUIET_WGET='' __MVNW_QUIET_CURL='' __MVNW_QUIET_UNZIP='' __MVNW_QUIET_TAR=v + +# normalize http auth +case "${MVNW_PASSWORD:+has-password}" in +'') MVNW_USERNAME='' MVNW_PASSWORD='' ;; +has-password) [ -n "${MVNW_USERNAME-}" ] || MVNW_USERNAME='' MVNW_PASSWORD='' ;; +esac + +if [ -z "${MVNW_USERNAME-}" ] && command -v wget >/dev/null; then + verbose "Found wget ... using wget" + wget ${__MVNW_QUIET_WGET:+"$__MVNW_QUIET_WGET"} "$distributionUrl" -O "$TMP_DOWNLOAD_DIR/$distributionUrlName" || die "wget: Failed to fetch $distributionUrl" +elif [ -z "${MVNW_USERNAME-}" ] && command -v curl >/dev/null; then + verbose "Found curl ... using curl" + curl ${__MVNW_QUIET_CURL:+"$__MVNW_QUIET_CURL"} -f -L -o "$TMP_DOWNLOAD_DIR/$distributionUrlName" "$distributionUrl" || die "curl: Failed to fetch $distributionUrl" +elif set_java_home; then + verbose "Falling back to use Java to download" + javaSource="$TMP_DOWNLOAD_DIR/Downloader.java" + targetZip="$TMP_DOWNLOAD_DIR/$distributionUrlName" + cat >"$javaSource" <<-END + public class Downloader extends java.net.Authenticator + { + protected java.net.PasswordAuthentication getPasswordAuthentication() + { + return new java.net.PasswordAuthentication( System.getenv( "MVNW_USERNAME" ), System.getenv( "MVNW_PASSWORD" ).toCharArray() ); + } + public static void main( String[] args ) throws Exception + { + setDefault( new Downloader() ); + java.nio.file.Files.copy( java.net.URI.create( args[0] ).toURL().openStream(), java.nio.file.Paths.get( args[1] ).toAbsolutePath().normalize() ); + } + } + END + # For Cygwin/MinGW, switch paths to Windows format before running javac and java + verbose " - Compiling Downloader.java ..." + "$(native_path "$JAVACCMD")" "$(native_path "$javaSource")" || die "Failed to compile Downloader.java" + verbose " - Running Downloader.java ..." + "$(native_path "$JAVACMD")" -cp "$(native_path "$TMP_DOWNLOAD_DIR")" Downloader "$distributionUrl" "$(native_path "$targetZip")" +fi + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +if [ -n "${distributionSha256Sum-}" ]; then + distributionSha256Result=false + if [ "$MVN_CMD" = mvnd.sh ]; then + echo "Checksum validation is not supported for maven-mvnd." >&2 + echo "Please disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + elif command -v sha256sum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | sha256sum -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + elif command -v shasum >/dev/null; then + if echo "$distributionSha256Sum $TMP_DOWNLOAD_DIR/$distributionUrlName" | shasum -a 256 -c >/dev/null 2>&1; then + distributionSha256Result=true + fi + else + echo "Checksum validation was requested but neither 'sha256sum' or 'shasum' are available." >&2 + echo "Please install either command, or disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." >&2 + exit 1 + fi + if [ $distributionSha256Result = false ]; then + echo "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised." >&2 + echo "If you updated your Maven version, you need to update the specified distributionSha256Sum property." >&2 + exit 1 + fi +fi + +# unzip and move +if command -v unzip >/dev/null; then + unzip ${__MVNW_QUIET_UNZIP:+"$__MVNW_QUIET_UNZIP"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -d "$TMP_DOWNLOAD_DIR" || die "failed to unzip" +else + tar xzf${__MVNW_QUIET_TAR:+"$__MVNW_QUIET_TAR"} "$TMP_DOWNLOAD_DIR/$distributionUrlName" -C "$TMP_DOWNLOAD_DIR" || die "failed to untar" +fi +printf %s\\n "$distributionUrl" >"$TMP_DOWNLOAD_DIR/$distributionUrlNameMain/mvnw.url" +mv -- "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" "$MAVEN_HOME" || [ -d "$MAVEN_HOME" ] || die "fail to move MAVEN_HOME" + +clean || : +exec_maven "$@" diff --git a/mvnw.cmd b/mvnw.cmd new file mode 100644 index 00000000000..b150b91ed50 --- /dev/null +++ b/mvnw.cmd @@ -0,0 +1,149 @@ +<# : batch portion +@REM ---------------------------------------------------------------------------- +@REM Licensed to the Apache Software Foundation (ASF) under one +@REM or more contributor license agreements. See the NOTICE file +@REM distributed with this work for additional information +@REM regarding copyright ownership. The ASF licenses this file +@REM to you under the Apache License, Version 2.0 (the +@REM "License"); you may not use this file except in compliance +@REM with the License. You may obtain a copy of the License at +@REM +@REM http://www.apache.org/licenses/LICENSE-2.0 +@REM +@REM Unless required by applicable law or agreed to in writing, +@REM software distributed under the License is distributed on an +@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +@REM KIND, either express or implied. See the License for the +@REM specific language governing permissions and limitations +@REM under the License. +@REM ---------------------------------------------------------------------------- + +@REM ---------------------------------------------------------------------------- +@REM Apache Maven Wrapper startup batch script, version 3.3.2 +@REM +@REM Optional ENV vars +@REM MVNW_REPOURL - repo url base for downloading maven distribution +@REM MVNW_USERNAME/MVNW_PASSWORD - user and password for downloading maven +@REM MVNW_VERBOSE - true: enable verbose log; others: silence the output +@REM ---------------------------------------------------------------------------- + +@IF "%__MVNW_ARG0_NAME__%"=="" (SET __MVNW_ARG0_NAME__=%~nx0) +@SET __MVNW_CMD__= +@SET __MVNW_ERROR__= +@SET __MVNW_PSMODULEP_SAVE=%PSModulePath% +@SET PSModulePath= +@FOR /F "usebackq tokens=1* delims==" %%A IN (`powershell -noprofile "& {$scriptDir='%~dp0'; $script='%__MVNW_ARG0_NAME__%'; icm -ScriptBlock ([Scriptblock]::Create((Get-Content -Raw '%~f0'))) -NoNewScope}"`) DO @( + IF "%%A"=="MVN_CMD" (set __MVNW_CMD__=%%B) ELSE IF "%%B"=="" (echo %%A) ELSE (echo %%A=%%B) +) +@SET PSModulePath=%__MVNW_PSMODULEP_SAVE% +@SET __MVNW_PSMODULEP_SAVE= +@SET __MVNW_ARG0_NAME__= +@SET MVNW_USERNAME= +@SET MVNW_PASSWORD= +@IF NOT "%__MVNW_CMD__%"=="" (%__MVNW_CMD__% %*) +@echo Cannot start maven from wrapper >&2 && exit /b 1 +@GOTO :EOF +: end batch / begin powershell #> + +$ErrorActionPreference = "Stop" +if ($env:MVNW_VERBOSE -eq "true") { + $VerbosePreference = "Continue" +} + +# calculate distributionUrl, requires .mvn/wrapper/maven-wrapper.properties +$distributionUrl = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionUrl +if (!$distributionUrl) { + Write-Error "cannot read distributionUrl property in $scriptDir/.mvn/wrapper/maven-wrapper.properties" +} + +switch -wildcard -casesensitive ( $($distributionUrl -replace '^.*/','') ) { + "maven-mvnd-*" { + $USE_MVND = $true + $distributionUrl = $distributionUrl -replace '-bin\.[^.]*$',"-windows-amd64.zip" + $MVN_CMD = "mvnd.cmd" + break + } + default { + $USE_MVND = $false + $MVN_CMD = $script -replace '^mvnw','mvn' + break + } +} + +# apply MVNW_REPOURL and calculate MAVEN_HOME +# maven home pattern: ~/.m2/wrapper/dists/{apache-maven-,maven-mvnd--}/ +if ($env:MVNW_REPOURL) { + $MVNW_REPO_PATTERN = if ($USE_MVND) { "/org/apache/maven/" } else { "/maven/mvnd/" } + $distributionUrl = "$env:MVNW_REPOURL$MVNW_REPO_PATTERN$($distributionUrl -replace '^.*'+$MVNW_REPO_PATTERN,'')" +} +$distributionUrlName = $distributionUrl -replace '^.*/','' +$distributionUrlNameMain = $distributionUrlName -replace '\.[^.]*$','' -replace '-bin$','' +$MAVEN_HOME_PARENT = "$HOME/.m2/wrapper/dists/$distributionUrlNameMain" +if ($env:MAVEN_USER_HOME) { + $MAVEN_HOME_PARENT = "$env:MAVEN_USER_HOME/wrapper/dists/$distributionUrlNameMain" +} +$MAVEN_HOME_NAME = ([System.Security.Cryptography.MD5]::Create().ComputeHash([byte[]][char[]]$distributionUrl) | ForEach-Object {$_.ToString("x2")}) -join '' +$MAVEN_HOME = "$MAVEN_HOME_PARENT/$MAVEN_HOME_NAME" + +if (Test-Path -Path "$MAVEN_HOME" -PathType Container) { + Write-Verbose "found existing MAVEN_HOME at $MAVEN_HOME" + Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" + exit $? +} + +if (! $distributionUrlNameMain -or ($distributionUrlName -eq $distributionUrlNameMain)) { + Write-Error "distributionUrl is not valid, must end with *-bin.zip, but found $distributionUrl" +} + +# prepare tmp dir +$TMP_DOWNLOAD_DIR_HOLDER = New-TemporaryFile +$TMP_DOWNLOAD_DIR = New-Item -Itemtype Directory -Path "$TMP_DOWNLOAD_DIR_HOLDER.dir" +$TMP_DOWNLOAD_DIR_HOLDER.Delete() | Out-Null +trap { + if ($TMP_DOWNLOAD_DIR.Exists) { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } + } +} + +New-Item -Itemtype Directory -Path "$MAVEN_HOME_PARENT" -Force | Out-Null + +# Download and Install Apache Maven +Write-Verbose "Couldn't find MAVEN_HOME, downloading and installing it ..." +Write-Verbose "Downloading from: $distributionUrl" +Write-Verbose "Downloading to: $TMP_DOWNLOAD_DIR/$distributionUrlName" + +$webclient = New-Object System.Net.WebClient +if ($env:MVNW_USERNAME -and $env:MVNW_PASSWORD) { + $webclient.Credentials = New-Object System.Net.NetworkCredential($env:MVNW_USERNAME, $env:MVNW_PASSWORD) +} +[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12 +$webclient.DownloadFile($distributionUrl, "$TMP_DOWNLOAD_DIR/$distributionUrlName") | Out-Null + +# If specified, validate the SHA-256 sum of the Maven distribution zip file +$distributionSha256Sum = (Get-Content -Raw "$scriptDir/.mvn/wrapper/maven-wrapper.properties" | ConvertFrom-StringData).distributionSha256Sum +if ($distributionSha256Sum) { + if ($USE_MVND) { + Write-Error "Checksum validation is not supported for maven-mvnd. `nPlease disable validation by removing 'distributionSha256Sum' from your maven-wrapper.properties." + } + Import-Module $PSHOME\Modules\Microsoft.PowerShell.Utility -Function Get-FileHash + if ((Get-FileHash "$TMP_DOWNLOAD_DIR/$distributionUrlName" -Algorithm SHA256).Hash.ToLower() -ne $distributionSha256Sum) { + Write-Error "Error: Failed to validate Maven distribution SHA-256, your Maven distribution might be compromised. If you updated your Maven version, you need to update the specified distributionSha256Sum property." + } +} + +# unzip and move +Expand-Archive "$TMP_DOWNLOAD_DIR/$distributionUrlName" -DestinationPath "$TMP_DOWNLOAD_DIR" | Out-Null +Rename-Item -Path "$TMP_DOWNLOAD_DIR/$distributionUrlNameMain" -NewName $MAVEN_HOME_NAME | Out-Null +try { + Move-Item -Path "$TMP_DOWNLOAD_DIR/$MAVEN_HOME_NAME" -Destination $MAVEN_HOME_PARENT | Out-Null +} catch { + if (! (Test-Path -Path "$MAVEN_HOME" -PathType Container)) { + Write-Error "fail to move MAVEN_HOME" + } +} finally { + try { Remove-Item $TMP_DOWNLOAD_DIR -Recurse -Force | Out-Null } + catch { Write-Warning "Cannot remove $TMP_DOWNLOAD_DIR" } +} + +Write-Output "MVN_CMD=$MAVEN_HOME/bin/$MVN_CMD" diff --git a/pom.xml b/pom.xml index bef791068e1..df2a45ed6e9 100644 --- a/pom.xml +++ b/pom.xml @@ -1,44 +1,406 @@ - - 4.0.0 - org.cloudfoundry - cf-java-client - pom - Cloud Foundry Java Client Parent - 1.0.0.BUILD-SNAPSHOT - - - - default - - true - - - cf-java-client-test-apps - cloudfoundry-client-lib - cloudfoundry-maven-plugin - - - - integration-test - - cf-java-client-test-apps - cloudfoundry-client-lib - cloudfoundry-maven-plugin - - - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - + + + + + 4.0.0 + + org.cloudfoundry + cloudfoundry-java-client + Cloud Foundry Java Client Parent + A Java language binding for interacting with a Cloud Foundry instance + 6.0.0-SNAPSHOT + pom + https://github.com/cloudfoundry/cf-java-client + + + + Apache License, Version 2.0 + https://www.apache.org/licenses/LICENSE-2.0 + + + + + https://github.com/cloudfoundry/cf-java-client + + + + + VMware + info@vmware.com + VMware, Inc. + https://www.cloudfoundry.org + + + + + cloudfoundry-client + cloudfoundry-client-reactor + cloudfoundry-operations + cloudfoundry-util + + + + 1.8 + UTF-8 + + 2.7.17 + + 1.27.1 + 3.13.0 + 1.3 + 2.10.1 + 2.16.1 + 0.10.2 + 0.12.6 + 5.10.1 + 5.8.0 + 2.2 + 3.7.1 + 3.0.2 + + 2.44.4 + 1.7.0 + + + + + + org.springframework.boot + spring-boot-dependencies + ${dependencies.version} + pom + import + + + + com.github.zafarkhaja + java-semver + ${java-semver.version} + + + com.squareup.wire + wire-runtime + ${wire.version} + + + com.squareup.wire + wire-runtime-jvm + ${wire.version} + + + io.jsonwebtoken + jjwt-api + ${jjwt.version} + + + io.jsonwebtoken + jjwt-impl + ${jjwt.version} + runtime + + + io.jsonwebtoken + jjwt-jackson + ${jjwt.version} + runtime + + + org.apache.commons + commons-compress + ${commons-compress.version} + + + org.atteo + evo-inflector + ${evo-inflector.version} + + + org.immutables + value + ${immutables.version} + + + + + + + + + com.squareup.wire + wire-maven-plugin + ${wire.plugin.version} + + + generate-sources + + generate-sources + + + + + + org.apache.maven.plugins + maven-compiler-plugin + 3.14.0 + + + -Xlint:all + -Xlint:-options + -Xlint:-processing + -Xlint:-serial + + true + ${java.version} + ${java.version} + + + + org.apache.maven.plugins + maven-jar-plugin + 3.4.2 + + + org.apache.maven.plugins + maven-deploy-plugin + 3.1.4 + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.11.2 + + + https://projectreactor.io/docs/core/release/api/ + + true + 8 + + + + attach-javadocs + + jar + + + + + + org.apache.maven.plugins + maven-source-plugin + 3.3.1 + + + attach-sources + + jar + + + + + + org.apache.maven.plugins + maven-surefire-plugin + 3.5.3 + + random + + + + + + + + org.jfrog.buildinfo + artifactory-maven-plugin + 3.7.0 + false + + + build-info + + publish + + + + https://repo.spring.io + {{ARTIFACTORY_USERNAME}} + {{ARTIFACTORY_PASSWORD}} + {{ARTIFACTORY_REPO_KEY|"libs-release-local"}} + {{ARTIFACTORY_SNAPSHOT_REPO_KEY|"libs-snapshot-local"}} + *-tests.jar + + + + + + + org.apache.maven.plugins + maven-gpg-plugin + 3.2.7 + + + sign-artifacts + verify + + sign + + + + --pinentry-mode + loopback + + + + + + + com.diffplug.spotless + spotless-maven-plugin + ${spotless.version} + + + + **/_*.java + + + 1.19.1 + + true + false + + + + + + + + + + + + false + + jfrog-jars + jfrog-jars + https://oss.jfrog.org/artifactory/jfrog-jars/ + + + + + + integration-test + + + integration-test + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + + + + test-logcache + + + test-log-cache + + + + test-service-broker + + + test-service-broker + + + + + jdk-17 + + 17 + + + 17 + 3.2.1 + 4.9.1 + 3.0.2 + -jvm + + + ${project.artifactId}-jdk17-${project.version} + + + org.apache.maven.plugins + maven-compiler-plugin + + + true + + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + + true + ${java.version} + ${java.version} + + + + + + + + jdk-21 + + 21 + + + 21 + 3.2.1 + 4.9.1 + 3.0.2 + -jvm + + + ${project.artifactId}-jdk21-${project.version} + + + org.apache.maven.plugins + maven-compiler-plugin + + + true + + -J--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED + + true + ${java.version} + ${java.version} + + + + + + + diff --git a/test-log-cache/README.md b/test-log-cache/README.md new file mode 100644 index 00000000000..1007971fcb4 --- /dev/null +++ b/test-log-cache/README.md @@ -0,0 +1,2 @@ +Application for testing [Log Cache](https://github.com/cloudfoundry/log-cache-release) client. This application uses +[Metric Registrar](https://docs.pivotal.io/platform/application-service/2-9/metric-registrar/using.html) to produce different types of metrics. \ No newline at end of file diff --git a/test-log-cache/pom.xml b/test-log-cache/pom.xml new file mode 100644 index 00000000000..65cc77ed824 --- /dev/null +++ b/test-log-cache/pom.xml @@ -0,0 +1,86 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + test-log-cache + Test Log Cache App + jar + + + + org.immutables + value + provided + + + org.springframework.boot + spring-boot-starter-web + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.springframework.boot + spring-boot-maven-plugin + + test-log-cache + ${project.parent.basedir}/integration-test/src/test/resources + + + + + + diff --git a/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/LogCacheTestApplication.java b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/LogCacheTestApplication.java new file mode 100644 index 00000000000..37860a0082a --- /dev/null +++ b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/LogCacheTestApplication.java @@ -0,0 +1,85 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcachetest; + +import com.fasterxml.jackson.databind.ObjectMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +@SpringBootApplication +@RestController +public class LogCacheTestApplication { + + private final ObjectMapper objectMapper; + + @Autowired + public LogCacheTestApplication(ObjectMapper objectMapper) { + this.objectMapper = objectMapper; + } + + public static void main(String[] args) { + SpringApplication.run(LogCacheTestApplication.class, args); + } + + @RequestMapping("/counter") + public String counter(@RequestParam("name") String name, @RequestParam("delta") Long delta) throws Exception { + final String json = this.objectMapper.writeValueAsString(Counter.builder() + .name(name) + .delta(delta) + .build()); + System.out.println(json); + return json; + } + + @RequestMapping("/event") + public String event(@RequestParam("title") String title, @RequestParam("body") String body) throws Exception { + final String json = this.objectMapper.writeValueAsString(Event.builder() + .title(title) + .body(body) + .build()); + System.out.println(json); + return json; + } + + @RequestMapping("/gauge") + public String gauge(@RequestParam("name") String name, @RequestParam("value") Double value) throws Exception { + final String json = this.objectMapper.writeValueAsString(Gauge.builder() + .name(name) + .value(value) + .build()); + System.out.println(json); + return json; + } + + @RequestMapping("/log") + public String log(@RequestParam("message") String message) { + System.out.println(message); + return message; + } + + @RequestMapping("/test") + public String test() { + final String output = "{\"type\":\"event\",\"title\":\"Test Title\",\"body\":\"Test Body\"}"; + System.out.println(output); + return output; + } + +} diff --git a/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Counter.java b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Counter.java new file mode 100644 index 00000000000..6b147bb1e2f --- /dev/null +++ b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Counter.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcachetest; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Counter { + + @JsonProperty("type") + public String getType() { + return "counter"; + } + + @JsonProperty("delta") + abstract Long getDelta(); + + @JsonProperty("name") + abstract String getName(); + +} diff --git a/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Event.java b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Event.java new file mode 100644 index 00000000000..6270ba6cafa --- /dev/null +++ b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Event.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcachetest; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Event { + + @JsonProperty("type") + public String getType() { + return "event"; + } + + @JsonProperty("body") + abstract String getBody(); + + @JsonProperty("title") + abstract String getTitle(); + +} diff --git a/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Gauge.java b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Gauge.java new file mode 100644 index 00000000000..fc160cb0c93 --- /dev/null +++ b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/_Gauge.java @@ -0,0 +1,36 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.logcachetest; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Gauge { + + @JsonProperty("type") + public String getType() { + return "gauge"; + } + + @JsonProperty("name") + abstract String getName(); + + @JsonProperty("value") + abstract Double getValue(); + +} diff --git a/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/package-info.java b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/package-info.java new file mode 100644 index 00000000000..d1daa10d1d0 --- /dev/null +++ b/test-log-cache/src/main/java/org/cloudfoundry/logcachetest/package-info.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +@Value.Style( + add = "*", + defaults = @Value.Immutable(copy = false), + depluralize = true, + jdkOnly = true, + put = "*", + typeAbstract = "_*", + typeImmutable = "*" +) +package org.cloudfoundry.logcachetest; + +import org.immutables.value.Value; diff --git a/test-service-broker/pom.xml b/test-service-broker/pom.xml new file mode 100644 index 00000000000..2326a92d2ce --- /dev/null +++ b/test-service-broker/pom.xml @@ -0,0 +1,92 @@ + + + + + + 4.0.0 + + + org.cloudfoundry + cloudfoundry-java-client + 6.0.0-SNAPSHOT + + + test-service-broker + Test Service Broker + jar + + + + org.immutables + value + provided + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework.boot + spring-boot-devtools + true + + + + + + + org.apache.maven.plugins + maven-compiler-plugin + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + org.apache.maven.plugins + maven-javadoc-plugin + + true + + + + org.apache.maven.plugins + maven-source-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + + org.springframework.boot + spring-boot-maven-plugin + + test-service-broker + ${project.parent.basedir}/integration-test/src/test/resources + + + + + + diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/Nullable.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/Nullable.java new file mode 100644 index 00000000000..9477c5faeee --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/Nullable.java @@ -0,0 +1,21 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker; + +public @interface Nullable { + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/TestServiceBroker.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/TestServiceBroker.java new file mode 100644 index 00000000000..27f45192141 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/TestServiceBroker.java @@ -0,0 +1,38 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker; + +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.Bean; + +@SpringBootApplication +public class TestServiceBroker { + + public static void main(String[] args) { + SpringApplication.run(TestServiceBroker.class, args); + } + + @Bean + ObjectMapper objectMapper() { + return new ObjectMapper() + .disable(SerializationFeature.FAIL_ON_EMPTY_BEANS); + } + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/BindingController.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/BindingController.java new file mode 100644 index 00000000000..8672573385f --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/BindingController.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.binding; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RestController; + +@RestController +final class BindingController { + + @PutMapping("/v2/service_instances/{instanceId}/service_bindings/{bindingId}") + ResponseEntity bind() { + return ResponseEntity.status(HttpStatus.CREATED) + .body(BindResponse.builder() + .build()); + } + + @DeleteMapping("/v2/service_instances/{instanceId}/service_bindings/{bindingId}") + ResponseEntity unbind() { + return ResponseEntity.ok() + .body(UnbindResponse.builder() + .build()); + } + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/_BindResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/_BindResponse.java new file mode 100644 index 00000000000..0ed2aaf2281 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/_BindResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.binding; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +import java.util.Map; + +@Value.Immutable +abstract class _BindResponse { + + @JsonProperty("credentials") + abstract Map getCredentials(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/_UnbindResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/_UnbindResponse.java new file mode 100644 index 00000000000..044653808f9 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/binding/_UnbindResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.binding; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _UnbindResponse { + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/CatalogController.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/CatalogController.java new file mode 100644 index 00000000000..08210f066e5 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/CatalogController.java @@ -0,0 +1,117 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import org.springframework.beans.factory.annotation.Value; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.UUID; + +@RestController +final class CatalogController { + + private final Catalog catalog; + + CatalogController(@Value("${service.name}") String serviceName, @Value("${plan.name}") String planName) { + this.catalog = Catalog.builder() + .service(Service.builder() + .id(UUID.randomUUID().toString()) + .name(serviceName) + .require("route_forwarding") + .description("test-service-description") + .bindable(true) + .planUpdateable(true) + .metadata(ServiceMetadata.builder() + .displayName("test-service-display-name") + .listing(Listing.builder() + .blurb("test-listing-blurb") + .imageUrl("http://test-image-host/test-image.gif") + .longDescription("test-listing-long-description") + .build()) + .provider(Provider.builder() + .name("test-provider-name") + .build()) + .build()) + .dashboardClient(DashboardClient.builder() + .id(UUID.randomUUID().toString()) + .redirectUri("http://test-dashboard-host") + .secret(UUID.randomUUID().toString()) + .build()) + .plan(Plan.builder() + .id(UUID.randomUUID().toString()) + .name(planName) + .description("test-plan-description") + .metadata(PlanMetadata.builder() + .bullet(Bullet.builder() + .content("test-plan-metadata-bullet") + .build()) + .cost(Cost.builder() + .amount("usd", 1) + .unit("MONTHLY") + .build()) + .build()) + .build()) + .build()) + .service(Service.builder() + .id(UUID.randomUUID().toString()) + .name(serviceName + "-shareable") + .description("test-service-description-shareable") + .bindable(true) + .planUpdateable(true) + .metadata(ServiceMetadata.builder() + .displayName("test-service-display-name") + .listing(Listing.builder() + .blurb("test-listing-blurb") + .imageUrl("http://test-image-host/test-image.gif") + .longDescription("test-listing-long-description") + .build()) + .provider(Provider.builder() + .name("test-provider-name") + .build()) + .shareable(true) + .build()) + .dashboardClient(DashboardClient.builder() + .id(UUID.randomUUID().toString()) + .redirectUri("http://test-dashboard-host") + .secret(UUID.randomUUID().toString()) + .build()) + .plan(Plan.builder() + .id(UUID.randomUUID().toString()) + .name(planName + "-shareable") + .description("test-plan-description-shareable") + .metadata(PlanMetadata.builder() + .bullet(Bullet.builder() + .content("test-plan-metadata-bullet") + .build()) + .cost(Cost.builder() + .amount("usd", 1) + .unit("MONTHLY") + .build()) + .build()) + .build()) + .build()) + .build(); + } + + @GetMapping("/v2/catalog") + ResponseEntity catalog() { + return ResponseEntity.ok(this.catalog); + } + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Bullet.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Bullet.java new file mode 100644 index 00000000000..e46d2128e44 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Bullet.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Bullet { + + @JsonProperty("content") + abstract String getContent(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Catalog.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Catalog.java new file mode 100644 index 00000000000..a019b1f615c --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Catalog.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _Catalog { + + @JsonProperty("services") + abstract List getServices(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Cost.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Cost.java new file mode 100644 index 00000000000..2c239e17b22 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Cost.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +import java.util.Map; + +@Value.Immutable +abstract class _Cost { + + @JsonProperty("amount") + abstract Map getAmounts(); + + @JsonProperty("unit") + abstract String getUnit(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_DashboardClient.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_DashboardClient.java new file mode 100644 index 00000000000..efc8b76b921 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_DashboardClient.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _DashboardClient { + + @JsonProperty("id") + abstract String getId(); + + @JsonProperty("redirect_uri") + abstract String getRedirectUri(); + + @JsonProperty("secret") + abstract String getSecret(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Listing.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Listing.java new file mode 100644 index 00000000000..a7a584e442b --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Listing.java @@ -0,0 +1,34 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Listing { + + @JsonProperty("blurb") + abstract String getBlurb(); + + @JsonProperty("imageUrl") + abstract String getImageUrl(); + + @JsonProperty("longDescription") + abstract String getLongDescription(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Plan.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Plan.java new file mode 100644 index 00000000000..0da04931c1d --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Plan.java @@ -0,0 +1,42 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.servicebroker.Nullable; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Plan { + + @JsonProperty("description") + abstract String getDescription(); + + @JsonProperty("id") + abstract String getId(); + + @JsonProperty("max_storage_tb") + @Nullable + abstract Integer getMaxStorageTb(); + + @JsonProperty("metadata") + abstract PlanMetadata getMetadata(); + + @JsonProperty("name") + abstract String getName(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_PlanMetadata.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_PlanMetadata.java new file mode 100644 index 00000000000..ec6c8f45477 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_PlanMetadata.java @@ -0,0 +1,33 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _PlanMetadata { + + @JsonProperty("bullets") + abstract List getBullets(); + + @JsonProperty("costs") + abstract List getCosts(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Provider.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Provider.java new file mode 100644 index 00000000000..8b0377d422c --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Provider.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _Provider { + + @JsonProperty("name") + abstract String getName(); +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Service.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Service.java new file mode 100644 index 00000000000..dc8c1747099 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_Service.java @@ -0,0 +1,62 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.servicebroker.Nullable; +import org.immutables.value.Value; + +import java.util.List; + +@Value.Immutable +abstract class _Service { + + @JsonProperty("bindable") + abstract boolean getBindable(); + + @JsonProperty("dashboard_client") + abstract DashboardClient getDashboardClient(); + + @JsonProperty("description") + abstract String getDescription(); + + @JsonProperty("id") + abstract String getId(); + + @JsonProperty("max_db_per_node") + @Nullable + abstract Integer getMaxDbPerNode(); + + @JsonProperty("metadata") + abstract ServiceMetadata getMetadata(); + + @JsonProperty("name") + abstract String getName(); + + @JsonProperty("plan_updateable") + abstract Boolean getPlanUpdateable(); + + @JsonProperty("plans") + abstract List getPlans(); + + @JsonProperty("requires") + abstract List getRequires(); + + @JsonProperty("tags") + abstract List getTags(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_ServiceMetadata.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_ServiceMetadata.java new file mode 100644 index 00000000000..a8cf0971833 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/catalog/_ServiceMetadata.java @@ -0,0 +1,39 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.catalog; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.servicebroker.Nullable; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _ServiceMetadata { + + @JsonProperty("displayName") + abstract String getDisplayName(); + + @JsonProperty("listing") + abstract Listing getListing(); + + @JsonProperty("provider") + abstract Provider getProvider(); + + @JsonProperty("shareable") + @Nullable + abstract Boolean getShareable(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/InstanceController.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/InstanceController.java new file mode 100644 index 00000000000..ae5aa07a6ad --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/InstanceController.java @@ -0,0 +1,94 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import org.cloudfoundry.servicebroker.lastoperation.LastOperationRepository; +import org.cloudfoundry.servicebroker.lastoperation.OperationType; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.PatchMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; +import java.util.Optional; + +@RestController +final class InstanceController { + + private final LastOperationRepository lastOperationRepository; + + InstanceController(LastOperationRepository lastOperationRepository) { + this.lastOperationRepository = lastOperationRepository; + } + + @DeleteMapping("/v2/service_instances/{instanceId}") + ResponseEntity deprovision(@RequestParam("accepts_incomplete") Optional acceptsIncomplete, @PathVariable String instanceId) { + if (acceptsIncomplete.orElse(false)) { + this.lastOperationRepository.register(instanceId, OperationType.DEPROVISION); + + return ResponseEntity.accepted() + .body(DeprovisionAsyncResponse.builder() + .operation("test-operation") + .build()); + } + + return ResponseEntity.ok() + .body(DeprovisionSyncResponse.builder() + .build()); + } + + @PutMapping("/v2/service_instances/{instanceId}") + ResponseEntity provision(@PathVariable String instanceId, @RequestBody Map payload) { + boolean acceptsIncomplete = (boolean) payload.getOrDefault("accepts_incomplete", false); + + if (acceptsIncomplete) { + this.lastOperationRepository.register(instanceId, OperationType.PROVISION); + + return ResponseEntity.accepted() + .body(ProvisionAsyncResponse.builder() + .build()); + } + + return ResponseEntity.status(HttpStatus.CREATED) + .body(ProvisionSyncResponse.builder() + .dashboardUrl(String.format("http://test-dashboard-host/%s", instanceId)) + .build()); + } + + @PatchMapping("/v2/service_instances/{instanceId}") + ResponseEntity update(@PathVariable String instanceId, @RequestBody Map payload) { + boolean acceptsIncomplete = (boolean) payload.getOrDefault("accepts_incomplete", false); + + if (acceptsIncomplete) { + this.lastOperationRepository.register(instanceId, OperationType.UPDATE); + + return ResponseEntity.accepted() + .body(UpdateAsyncResponse.builder() + .build()); + } + + return ResponseEntity.ok() + .body(UpdateSyncResponse.builder() + .build()); + } + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_DeprovisionAsyncResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_DeprovisionAsyncResponse.java new file mode 100644 index 00000000000..667c2defd05 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_DeprovisionAsyncResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.servicebroker.Nullable; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _DeprovisionAsyncResponse { + + @JsonProperty("operation") + @Nullable + abstract String getOperation(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_DeprovisionSyncResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_DeprovisionSyncResponse.java new file mode 100644 index 00000000000..a4ec3c5f227 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_DeprovisionSyncResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _DeprovisionSyncResponse { + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_ProvisionAsyncResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_ProvisionAsyncResponse.java new file mode 100644 index 00000000000..8a1df183d21 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_ProvisionAsyncResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.servicebroker.Nullable; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _ProvisionAsyncResponse { + + @JsonProperty("operation") + @Nullable + abstract String getOperation(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_ProvisionSyncResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_ProvisionSyncResponse.java new file mode 100644 index 00000000000..dce69608c18 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_ProvisionSyncResponse.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _ProvisionSyncResponse { + + @JsonProperty("dashboard_url") + abstract String getDashboardUrl(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_UpdateAsyncResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_UpdateAsyncResponse.java new file mode 100644 index 00000000000..36f3fb132f5 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_UpdateAsyncResponse.java @@ -0,0 +1,30 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.cloudfoundry.servicebroker.Nullable; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _UpdateAsyncResponse { + + @JsonProperty("operation") + @Nullable + abstract String getOperation(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_UpdateSyncResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_UpdateSyncResponse.java new file mode 100644 index 00000000000..e288a0a6dfb --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/instance/_UpdateSyncResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.instance; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _UpdateSyncResponse { + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/LastOperationController.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/LastOperationController.java new file mode 100644 index 00000000000..db2ad4cf325 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/LastOperationController.java @@ -0,0 +1,54 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.lastoperation; + +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; + +@RestController +final class LastOperationController implements LastOperationRepository { + + private final Map operations = new ConcurrentHashMap<>(); + + @Override + public void register(String instanceId, OperationType operationType) { + this.operations.put(instanceId, operationType); + } + + @GetMapping("/v2/service_instances/{instanceId}/last_operation") + ResponseEntity lastOperation(@PathVariable String instanceId) { + OperationType operationType = this.operations.get(instanceId); + + if (OperationType.DEPROVISION == operationType) { + return ResponseEntity.status(HttpStatus.GONE) + .body(LastOperationDeprovisionResponse.builder() + .build()); + } + + return ResponseEntity.ok() + .body(LastOperationProvisionUpdateResponse.builder() + .state(State.SUCCEEDED) + .build()); + } + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/LastOperationRepository.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/LastOperationRepository.java new file mode 100644 index 00000000000..9800d2bba5c --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/LastOperationRepository.java @@ -0,0 +1,23 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.lastoperation; + +public interface LastOperationRepository { + + void register(String instanceId, OperationType operationType); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/OperationType.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/OperationType.java new file mode 100644 index 00000000000..3ba632f2172 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/OperationType.java @@ -0,0 +1,27 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.lastoperation; + +public enum OperationType { + + DEPROVISION, + + PROVISION, + + UPDATE + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/State.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/State.java new file mode 100644 index 00000000000..f6eceaebbcf --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/State.java @@ -0,0 +1,40 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.lastoperation; + +import com.fasterxml.jackson.annotation.JsonValue; + +enum State { + + FAILED("failed"), + + IN_PROGRESS("in progress"), + + SUCCEEDED("succeeded"); + + private final String value; + + State(String value) { + this.value = value; + } + + @JsonValue + String getValue() { + return this.value; + } + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/_LastOperationDeprovisionResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/_LastOperationDeprovisionResponse.java new file mode 100644 index 00000000000..ff669bcdb13 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/_LastOperationDeprovisionResponse.java @@ -0,0 +1,24 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.lastoperation; + +import org.immutables.value.Value; + +@Value.Immutable +abstract class _LastOperationDeprovisionResponse { + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/_LastOperationProvisionUpdateResponse.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/_LastOperationProvisionUpdateResponse.java new file mode 100644 index 00000000000..be6b2d19e6c --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/lastoperation/_LastOperationProvisionUpdateResponse.java @@ -0,0 +1,28 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.cloudfoundry.servicebroker.lastoperation; + +import com.fasterxml.jackson.annotation.JsonProperty; +import org.immutables.value.Value; + +@Value.Immutable +abstract class _LastOperationProvisionUpdateResponse { + + @JsonProperty("state") + abstract State getState(); + +} diff --git a/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/package-info.java b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/package-info.java new file mode 100644 index 00000000000..cd1e62f2296 --- /dev/null +++ b/test-service-broker/src/main/java/org/cloudfoundry/servicebroker/package-info.java @@ -0,0 +1,32 @@ +/* + * Copyright 2013-2021 the original author or authors. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * Created by bhale on 2/22/17. + */ + +@Value.Style( + add = "*", + defaults = @Value.Immutable(copy = false), + depluralize = true, + jdkOnly = true, + put = "*", + typeAbstract = "_*", + typeImmutable = "*" +) +package org.cloudfoundry.servicebroker; + +import org.immutables.value.Value; diff --git a/test-service-broker/src/main/resources/application.properties b/test-service-broker/src/main/resources/application.properties new file mode 100644 index 00000000000..8169314be4c --- /dev/null +++ b/test-service-broker/src/main/resources/application.properties @@ -0,0 +1,18 @@ +# +# Copyright 2013-2021 the original author or authors. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +service.name=test-service +plan.name=test-plan diff --git a/vendor/dropsonde-protocol b/vendor/dropsonde-protocol new file mode 160000 index 00000000000..24458aa89c7 --- /dev/null +++ b/vendor/dropsonde-protocol @@ -0,0 +1 @@ +Subproject commit 24458aa89c76f79dd2d48893bfea4e3f0a4799cb